Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| elearning:workbooks:centos:8:avance:l115 [2024/11/07 15:28] – admin | elearning:workbooks:centos:8:avance:l115 [2024/11/08 12:39] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 360: | Ligne 360: | ||
| </ | </ | ||
| - | Installez maintenant les paquets | + | Installez maintenant les paquets |
| < | < | ||
| [root@centos8 ~]# dnf groupinstall " | [root@centos8 ~]# dnf groupinstall " | ||
| ... | ... | ||
| - | [root@centos8 ~]# dnf install asciidoc audit-libs-devel bash bc binutils binutils-devel bison diffutils elfutils elfutils-devel elfutils-libelf-devel findutils flex gawk gcc gettext gzip hmaccalc hostname make module-init-tools ncurses-devel net-tools newt-devel numactl-devel openssl patch pciutils-devel perl perl-ExtUtils-Embed pesign redhat-rpm-config rpm-build rpmdevtools sh-utils tar xmlto xz zlib-devel rpmdevtools | + | [root@centos8 ~]# dnf install asciidoc audit-libs-devel bash bc binutils binutils-devel bison diffutils elfutils elfutils-devel elfutils-libelf-devel findutils flex gawk gcc gettext gzip hmaccalc hostname make module-init-tools ncurses-devel net-tools newt-devel numactl-devel openssl patch pciutils-devel perl perl-ExtUtils-Embed pesign redhat-rpm-config rpm-build rpmdevtools sh-utils tar xmlto xz zlib-devel rpmdevtools |
| ... | ... | ||
| </ | </ | ||
| Ligne 596: | Ligne 596: | ||
| < | < | ||
| - | [trainee@centos8 ~]$ uname -a | + | [root@centos8 ~]# uname -a |
| - | Linux centos8.ittraining.loc 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Tue Jun 29 21:55:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux | + | Linux centos8.ittraining.loc 4.18.0-553.6.1.el8.x86_64 #1 SMP Thu May 30 04:13:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux |
| - | [trainee@centos8 ~]$ cat / | + | [root@centos8 ~]# cat / |
| - | CentOS | + | CentOS |
| - | [trainee@centos8 ~]$ wget https://vault.centos.org/ | + | [trainee@centos8 ~]$ wget https://mirror.stream.centos.org/ |
| - | --2021-07-14 02: | + | |
| - | Resolving vault.centos.org (vault.centos.org)... 81.171.33.194, | + | |
| - | Connecting to vault.centos.org (vault.centos.org)|81.171.33.194|: | + | |
| - | HTTP request sent, awaiting response... 200 OK | + | |
| - | Length: 123000617 (117M) [application/ | + | |
| - | Saving to: ‘kernel-4.18.0-305.7.1.el8_4.src.rpm’ | + | |
| - | + | ||
| - | kernel-4.18.0-305.7.1. 100%[===========================> | + | |
| - | + | ||
| - | 2021-07-14 02:55:33 (1.49 MB/s) - ‘kernel-4.18.0-305.7.1.el8_4.src.rpm’ saved [123000617/ | + | |
| </ | </ | ||
| Ligne 624: | Ligne 614: | ||
| ... | ... | ||
| - | [root@centos8 ~]# yum-builddep / | + | [root@centos8 ~]# yum-builddep / |
| ... | ... | ||
| </ | </ | ||
| - | Installez maintenant le paquet **kernel-4.18.0-305.7.1.el8_4.src.rpm** : | + | Installez maintenant le paquet **kernel-4.18.0-553.16.1.el8_10.src.rpm** : |
| < | < | ||
| [root@centos8 ~]# exit | [root@centos8 ~]# exit | ||
| logout | logout | ||
| - | [trainee@centos8 ~]$ rpm -Uvh kernel-4.18.0-305.7.1.el8_4.src.rpm | + | [trainee@centos8 ~]$ rpm -Uvh kernel-4.18.0-553.16.1.el8_10.src.rpm |
| Updating / installing... | Updating / installing... | ||
| - | | + | |
| warning: group mockbuild does not exist - using root | warning: group mockbuild does not exist - using root | ||
| warning: user mockbuild does not exist - using root | warning: user mockbuild does not exist - using root | ||
| Ligne 814: | Ligne 804: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cp configs/ | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ cp configs/ |
| </ | </ | ||
| Ligne 820: | Ligne 810: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ make oldconfig | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ make oldconfig |
| scripts/ | scripts/ | ||
| # | # | ||
| Ligne 840: | Ligne 830: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ make menuconfig | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ make menuconfig |
| UPD | UPD | ||
| HOSTCC | HOSTCC | ||
| Ligne 851: | Ligne 841: | ||
| HOSTLD | HOSTLD | ||
| scripts/ | scripts/ | ||
| - | # | ||
| - | # using defaults found in / | ||
| - | # | ||
| </ | </ | ||
| Ligne 879: | Ligne 866: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ ls -a | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ ls -a |
| - | . | + | . .gitattributes |
| - | .. .clang-format | + | .. .gitlab-ci.yml |
| - | arch .cocciconfig | + | .clang-format |
| - | block .config | + | .cocciconfig |
| + | .config | ||
| + | .config.old | ||
| + | .get_maintainer.ignore | ||
| </ | </ | ||
| Ligne 889: | Ligne 879: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ more .config | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ more .config |
| # | # | ||
| # Automatically generated file; DO NOT EDIT. | # Automatically generated file; DO NOT EDIT. | ||
| Ligne 896: | Ligne 886: | ||
| # | # | ||
| - | # Compiler: gcc (GCC) 8.4.1 20200928 | + | # Compiler: gcc (GCC) 8.5.0 20210514 |
| # | # | ||
| CONFIG_64BIT=y | CONFIG_64BIT=y | ||
| Ligne 913: | Ligne 903: | ||
| CONFIG_GENERIC_ISA_DMA=y | CONFIG_GENERIC_ISA_DMA=y | ||
| CONFIG_GENERIC_BUG=y | CONFIG_GENERIC_BUG=y | ||
| - | CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y | ||
| - | CONFIG_GENERIC_HWEIGHT=y | ||
| - | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
| - | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| - | CONFIG_ARCH_HAS_CPU_RELAX=y | ||
| - | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y | ||
| - | CONFIG_ARCH_HAS_FILTER_PGPROT=y | ||
| - | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | ||
| - | CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y | ||
| - | CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y | ||
| - | CONFIG_ARCH_HIBERNATION_POSSIBLE=y | ||
| - | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
| - | CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y | ||
| - | CONFIG_ARCH_WANT_GENERAL_HUGETLB=y | ||
| - | CONFIG_ZONE_DMA32=y | ||
| - | CONFIG_AUDIT_ARCH=y | ||
| - | CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y | ||
| - | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | ||
| - | CONFIG_HAVE_INTEL_TXT=y | ||
| - | CONFIG_X86_64_SMP=y | ||
| --More--(0%) | --More--(0%) | ||
| </ | </ | ||
| Ligne 948: | Ligne 918: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ more Makefile | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ more Makefile |
| # SPDX-License-Identifier: | # SPDX-License-Identifier: | ||
| VERSION = 4 | VERSION = 4 | ||
| Ligne 959: | Ligne 929: | ||
| # DRM backport version | # DRM backport version | ||
| # | # | ||
| - | RHEL_DRM_VERSION = 5 | + | RHEL_DRM_VERSION = 6 |
| - | RHEL_DRM_PATCHLEVEL = 9 | + | RHEL_DRM_PATCHLEVEL = 3 |
| - | RHEL_DRM_SUBLEVEL = 14 | + | RHEL_DRM_SUBLEVEL = |
| + | RHEL_DRM_EXTRAVERSION = | ||
| # *DOCUMENTATION* | # *DOCUMENTATION* | ||
| Ligne 971: | Ligne 942: | ||
| # That's our default target when none is given on the command line | # That's our default target when none is given on the command line | ||
| PHONY := _all | PHONY := _all | ||
| - | _all: | + | --More--(0%) |
| - | + | ||
| - | # o Do not use make's built-in rules and variables | + | |
| - | # (this increases performance and avoids hard-to-debug behaviour); | + | |
| - | # o Look for make include files relative to root of kernel src | + | |
| - | MAKEFLAGS += -rR --include-dir=$(CURDIR) | + | |
| - | + | ||
| - | # Avoid funny character set dependencies | + | |
| - | unexport LC_ALL | + | |
| - | LC_COLLATE=C | + | |
| - | LC_NUMERIC=C | + | |
| - | export LC_COLLATE LC_NUMERIC | + | |
| - | + | ||
| - | # Avoid interference with shell env settings | + | |
| - | unexport GREP_OPTIONS | + | |
| - | + | ||
| - | # Set RHEL variables | + | |
| - | # Use this spot to avoid future merge conflicts | + | |
| - | include Makefile.rhelver | + | |
| - | + | ||
| - | # We are using a recursive build, so we need to do a little thinking | + | |
| - | --Plus--(2%) | + | |
| </ | </ | ||
| Ligne 1004: | Ligne 954: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ uname -i | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ uname -i |
| x86_64 | x86_64 | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ vi .config | + | |
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ head .config | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ vi .config |
| + | |||
| + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ head .config | ||
| # x86_64 | # x86_64 | ||
| # | # | ||
| Ligne 1015: | Ligne 967: | ||
| # | # | ||
| - | # Compiler: gcc (GCC) 8.4.1 20200928 | + | # Compiler: gcc (GCC) 8.5.0 20210514 |
| # | # | ||
| CONFIG_64BIT=y | CONFIG_64BIT=y | ||
| Ligne 1023: | Ligne 975: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cp .config ~/ | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ cp .config ~/ |
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ ls ~/ | + | |
| - | centos-ca-secureboot.der cpupower.config | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ ls ~/ |
| - | centos-dup.x509 | + | Module.kabi_aarch64 |
| - | centos-kpatch.x509 debrand-rh-i686-cpu.patch generate_bls_conf.sh kernel-s390x-zfcpdump.config | + | Module.kabi_dup_aarch64 |
| - | centos.pem debrand-rh_taint.patch | + | Module.kabi_dup_ppc64le |
| - | centossecureboot001.der | + | Module.kabi_dup_s390x |
| - | centossecureboot201.der | + | Module.kabi_dup_x86_64 |
| - | centossecurebootca2.der | + | Module.kabi_ppc64le |
| - | check-kabi | + | Module.kabi_s390x |
| - | config-x86_64-generic | + | Module.kabi_x86_64 |
| + | centossecureboot201.cer | ||
| + | centossecurebootca2.cer kernel-ppc64le-debug.config | ||
| + | check-kabi | ||
| + | config-x86_64-generic | ||
| + | cpupower.config | ||
| + | cpupower.service | ||
| + | filter-aarch64.sh kernel-x86_64-debug.config | ||
| + | filter-modules.sh | ||
| + | filter-ppc64le.sh | ||
| </ | </ | ||
| Ligne 1039: | Ligne 1000: | ||
| < | < | ||
| - | [trainee@centos8 linux-4.18.0-305.7.1.el8.x86_64]$ cp configs/* ~/ | + | [trainee@centos8 linux-4.18.0-553.16.1.el8.x86_64]$ cp configs/* ~/ |
| </ | </ | ||
| Ligne 1064: | Ligne 1025: | ||
| %define _binary_payload w3T.xzdio | %define _binary_payload w3T.xzdio | ||
| - | # For a kernel released for public testing, released_kernel should be 1. | + | %global distro_build |
| - | # For internal testing builds during development, | + | |
| - | %global released_kernel 1 | + | |
| - | + | ||
| - | %global distro_build | + | |
| # Sign the x86_64 kernel for secure boot authentication | # Sign the x86_64 kernel for secure boot authentication | ||
| - | %ifarch x86_64 aarch64 | + | %ifarch x86_64 aarch64 |
| %global signkernel 1 | %global signkernel 1 | ||
| %else | %else | ||
| Ligne 1091: | Ligne 1048: | ||
| %endif | %endif | ||
| - | %define buildid .i2tch | + | %define buildid .ittraining |
| - | %define | + | %define |
| - | %define pkgrelease | + | %define pkgrelease |
| # allow pkg_release to have configurable %%{?dist} tag | # allow pkg_release to have configurable %%{?dist} tag | ||
| - | %define specrelease | + | %define specrelease |
| %define pkg_release %{specrelease}%{? | %define pkg_release %{specrelease}%{? | ||
| + | |||
| + | # libexec dir is not used by the linker, so the shared object there | ||
| + | # should not be exported to RPM provides | ||
| + | %global __provides_exclude_from ^%{_libexecdir}/ | ||
| </ | </ | ||
| Ligne 1107: | Ligne 1068: | ||
| < | < | ||
| - | [trainee@centos7 | + | [trainee@centos8 |
| + | [1] 96990 | ||
| + | [trainee@centos8 SPECS]$ Building target platforms: x86_64 | ||
| + | Building for target x86_64 | ||
| + | ... | ||
| </ | </ | ||
| <WRAP center round important 60%> | <WRAP center round important 60%> | ||
| - | **Important** - La compilation peut prendre des heures. Arrêtez donc le processus avec les touches ^C. Arrêtez ensuite votre VM. Demandez à votre formateur de démarrer la VM contenant le noyau déjà compilé. | + | **Important** - La compilation peut prendre des heures. |
| </ | </ | ||
| Ligne 1118: | Ligne 1083: | ||
| < | < | ||
| ... | ... | ||
| - | Wrote: / | + | Wrote: / |
| - | Wrote: / | + | ... |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Wrote: / | + | |
| - | Executing(%clean): | + | |
| [1]+ Done rpmbuild -bb --target=`uname -m` kernel.spec 2> build-err.log | tee build-out.log | [1]+ Done rpmbuild -bb --target=`uname -m` kernel.spec 2> build-err.log | tee build-out.log | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | [trainee@centos8 SPECS]$ cd ../RPMS | ||
| - | [trainee@centos8 RPMS]$ ls | ||
| - | x86_64 | ||
| - | [trainee@centos8 RPMS]$ cd x86_64/ | ||
| - | [trainee@centos8 x86_64]$ ls | ||
| - | bpftool-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | bpftool-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | kernel-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | kernel-core-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | kernel-cross-headers-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | kernel-debug-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | kernel-debug-core-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | kernel-debug-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | kernel-debug-devel-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| - | kernel-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64.rpm | ||
| </ | </ | ||
| Ligne 1191: | Ligne 1110: | ||
| < | < | ||
| + | [trainee@centos8 SPECS]$ cd ../ | ||
| + | |||
| [root@centos8 x86_64]# dnf localinstall kernel-*.rpm | [root@centos8 x86_64]# dnf localinstall kernel-*.rpm | ||
| - | Last metadata expiration check: 2:25:32 ago on Tue 20 Jul 2021 08:37:00 EDT. | ||
| - | Dependencies resolved. | ||
| - | =============================================================================================================================================================================================================== | ||
| - | | ||
| - | =============================================================================================================================================================================================================== | ||
| - | Installing: | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | Downgrading: | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | Transaction Summary | ||
| - | =============================================================================================================================================================================================================== | ||
| - | Install | ||
| - | Downgrade | ||
| - | |||
| - | Total size: 1.6 G | ||
| - | Is this ok [y/N]: y | ||
| </ | </ | ||
| Ligne 1238: | Ligne 1121: | ||
| </ | </ | ||
| - | Connectez-vous en tant que trainee et devenez root. Listez ensuite les noyaux installés : | + | Connectez-vous en tant que trainee et devenez root. Constatez l' |
| - | + | ||
| - | < | + | |
| - | [root@centos8 ~]# rpm -qa | grep kernel | + | |
| - | kernel-modules-4.18.0-305.3.1.el8.x86_64 | + | |
| - | kernel-tools-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-headers-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-debug-core-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-modules-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-modules-4.18.0-305.7.1.el8_4.x86_64 | + | |
| - | kernel-debug-modules-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-tools-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-tools-libs-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-debug-modules-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-cross-headers-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-core-4.18.0-305.7.1.el8_4.x86_64 | + | |
| - | kernel-devel-4.18.0-305.7.1.el8_4.x86_64 | + | |
| - | kernel-debuginfo-common-x86_64-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-debug-modules-extra-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-debug-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-tools-libs-devel-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-modules-extra-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-4.18.0-305.7.1.el8_4.x86_64 | + | |
| - | kernel-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-core-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-selftests-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-debug-debuginfo-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-debug-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-4.18.0-305.3.1.el8.x86_64 | + | |
| - | kernel-core-4.18.0-305.3.1.el8.x86_64 | + | |
| - | kernel-modules-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | kernel-ipaclones-internal-4.18.0-305.7.1.el8.i2tch.x86_64 | + | |
| - | </ | + | |
| - | + | ||
| - | Constatez l' | + | |
| < | < | ||
| - | [root@centos8 ~]# grep i2tch / | + | [root@centos8 ~]# grep ittraining |
| - | saved_entry=95bd69e34a7444a7b58cb74fbfb86df2-4.18.0-305.7.1.el8.i2tch.x86_64 | + | saved_entry=95bd69e34a7444a7b58cb74fbfb86df2-4.18.0-553.16.1.el8.ittraining.x86_64 |
| </ | </ | ||
| Ligne 1285: | Ligne 1132: | ||
| < | < | ||
| [root@centos8 ~]# uname -r | [root@centos8 ~]# uname -r | ||
| - | 4.18.0-305.7.1.el8.i2tch.x86_64 | + | 4.18.0-553.16.1.el8.ittraining.x86_64 |
| </ | </ | ||