~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/package/kernel.spec

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/package/kernel.spec (Version linux-6.12-rc7) and /scripts/package/kernel.spec (Version linux-6.6.60)


  1 # _arch is undefined if /usr/lib/rpm/platform/      1 # _arch is undefined if /usr/lib/rpm/platform/*/macros was not included.
  2 %{!?_arch: %define _arch dummy}                     2 %{!?_arch: %define _arch dummy}
  3 %{!?make: %define make make}                        3 %{!?make: %define make make}
  4 %define makeflags %{?_smp_mflags} ARCH=%{ARCH}      4 %define makeflags %{?_smp_mflags} ARCH=%{ARCH}
  5 %define __spec_install_post /usr/lib/rpm/brp-c      5 %define __spec_install_post /usr/lib/rpm/brp-compress || :
  6 %define debug_package %{nil}                        6 %define debug_package %{nil}
  7                                                     7 
  8 Name: kernel                                        8 Name: kernel
  9 Summary: The Linux Kernel                           9 Summary: The Linux Kernel
 10 Version: %(echo %{KERNELRELEASE} | sed -e 's/-     10 Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g')
 11 Release: %{pkg_release}                            11 Release: %{pkg_release}
 12 License: GPL                                       12 License: GPL
 13 Group: System Environment/Kernel                   13 Group: System Environment/Kernel
 14 Vendor: The Linux Community                        14 Vendor: The Linux Community
 15 URL: https://www.kernel.org                        15 URL: https://www.kernel.org
 16 Source0: linux.tar.gz                              16 Source0: linux.tar.gz
 17 Source1: config                                    17 Source1: config
 18 Source2: diff.patch                                18 Source2: diff.patch
 19 Provides: kernel-%{KERNELRELEASE}                  19 Provides: kernel-%{KERNELRELEASE}
 20 BuildRequires: bc binutils bison dwarves           20 BuildRequires: bc binutils bison dwarves
 21 BuildRequires: (elfutils-libelf-devel or libel     21 BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
 22 BuildRequires: gcc make openssl openssl-devel      22 BuildRequires: gcc make openssl openssl-devel perl python3 rsync
 23                                                    23 
 24 %description                                       24 %description
 25 The Linux Kernel, the operating system core it     25 The Linux Kernel, the operating system core itself
 26                                                    26 
 27 %package headers                                   27 %package headers
 28 Summary: Header files for the Linux kernel for     28 Summary: Header files for the Linux kernel for use by glibc
 29 Group: Development/System                          29 Group: Development/System
 30 Obsoletes: kernel-headers < %{version}         !!  30 Obsoletes: kernel-headers
 31 Provides: kernel-headers = %{version}              31 Provides: kernel-headers = %{version}
 32 %description headers                               32 %description headers
 33 Kernel-headers includes the C header files tha     33 Kernel-headers includes the C header files that specify the interface
 34 between the Linux kernel and userspace librari     34 between the Linux kernel and userspace libraries and programs.  The
 35 header files define structures and constants t     35 header files define structures and constants that are needed for
 36 building most standard programs and are also n     36 building most standard programs and are also needed for rebuilding the
 37 glibc package.                                     37 glibc package.
 38                                                    38 
 39 %if %{with_devel}                                  39 %if %{with_devel}
 40 %package devel                                     40 %package devel
 41 Summary: Development package for building kern     41 Summary: Development package for building kernel modules to match the %{version} kernel
 42 Group: System Environment/Kernel                   42 Group: System Environment/Kernel
 43 AutoReqProv: no                                    43 AutoReqProv: no
 44 %description -n kernel-devel                       44 %description -n kernel-devel
 45 This package provides kernel headers and makef     45 This package provides kernel headers and makefiles sufficient to build modules
 46 against the %{version} kernel package.             46 against the %{version} kernel package.
 47 %endif                                             47 %endif
 48                                                    48 
 49 %prep                                              49 %prep
 50 %setup -q -n linux                                 50 %setup -q -n linux
 51 cp %{SOURCE1} .config                              51 cp %{SOURCE1} .config
 52 patch -p1 < %{SOURCE2}                             52 patch -p1 < %{SOURCE2}
 53                                                    53 
 54 %build                                             54 %build
 55 %{make} %{makeflags} KERNELRELEASE=%{KERNELREL     55 %{make} %{makeflags} KERNELRELEASE=%{KERNELRELEASE} KBUILD_BUILD_VERSION=%{release}
 56                                                    56 
 57 %install                                           57 %install
 58 mkdir -p %{buildroot}/lib/modules/%{KERNELRELE !!  58 mkdir -p %{buildroot}/boot
 59 cp $(%{make} %{makeflags} -s image_name) %{bui !!  59 %ifarch ia64
 60 # DEPMOD=true makes depmod no-op. We do not pa !!  60 mkdir -p %{buildroot}/boot/efi
 61 %{make} %{makeflags} INSTALL_MOD_PATH=%{buildr !!  61 cp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/efi/vmlinuz-%{KERNELRELEASE}
                                                   >>  62 ln -s efi/vmlinuz-%{KERNELRELEASE} %{buildroot}/boot/
                                                   >>  63 %else
                                                   >>  64 cp $(%{make} %{makeflags} -s image_name) %{buildroot}/boot/vmlinuz-%{KERNELRELEASE}
                                                   >>  65 %endif
                                                   >>  66 %{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} modules_install
 62 %{make} %{makeflags} INSTALL_HDR_PATH=%{buildr     67 %{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
 63 cp System.map %{buildroot}/lib/modules/%{KERNE !!  68 cp System.map %{buildroot}/boot/System.map-%{KERNELRELEASE}
 64 cp .config %{buildroot}/lib/modules/%{KERNELRE !!  69 cp .config %{buildroot}/boot/config-%{KERNELRELEASE}
 65 if %{make} %{makeflags} run-command KBUILD_RUN << 
 66         %{make} %{makeflags} INSTALL_DTBS_PATH << 
 67 fi                                             << 
 68 ln -fns /usr/src/kernels/%{KERNELRELEASE} %{bu     70 ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEASE}/build
 69 %if %{with_devel}                                  71 %if %{with_devel}
 70 %{make} %{makeflags} run-command KBUILD_RUN_CO     72 %{make} %{makeflags} run-command KBUILD_RUN_COMMAND='${srctree}/scripts/package/install-extmod-build %{buildroot}/usr/src/kernels/%{KERNELRELEASE}'
 71 %endif                                             73 %endif
 72                                                    74 
 73 {                                              << 
 74         echo "/lib/modules/%{KERNELRELEASE}"   << 
 75                                                << 
 76         for x in alias alias.bin builtin.alias << 
 77                                 devname softde << 
 78                 echo "%ghost /lib/modules/%{KE << 
 79         done                                   << 
 80                                                << 
 81         for x in System.map config vmlinuz; do << 
 82                 echo "%ghost /boot/${x}-%{KERN << 
 83         done                                   << 
 84                                                << 
 85         if [ -d "%{buildroot}/lib/modules/%{KE << 
 86                 find "%{buildroot}/lib/modules << 
 87         fi                                     << 
 88                                                << 
 89         echo "%exclude /lib/modules/%{KERNELRE << 
 90 } > %{buildroot}/kernel.list                   << 
 91                                                << 
 92 %clean                                             75 %clean
 93 rm -rf %{buildroot}                                76 rm -rf %{buildroot}
 94                                                    77 
 95 %post                                              78 %post
 96 if [ -x /usr/bin/kernel-install ]; then        !!  79 if [ -x /sbin/installkernel -a -r /boot/vmlinuz-%{KERNELRELEASE} -a -r /boot/System.map-%{KERNELRELEASE} ]; then
 97         /usr/bin/kernel-install add %{KERNELRE !!  80 cp /boot/vmlinuz-%{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm
 98 fi                                             !!  81 cp /boot/System.map-%{KERNELRELEASE} /boot/.System.map-%{KERNELRELEASE}-rpm
 99 for file in vmlinuz System.map config; do      !!  82 rm -f /boot/vmlinuz-%{KERNELRELEASE} /boot/System.map-%{KERNELRELEASE}
100         if ! cmp --silent "/lib/modules/%{KERN !!  83 /sbin/installkernel %{KERNELRELEASE} /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpm
101                 cp "/lib/modules/%{KERNELRELEA !!  84 rm -f /boot/.vmlinuz-%{KERNELRELEASE}-rpm /boot/.System.map-%{KERNELRELEASE}-rpm
102         fi                                     << 
103 done                                           << 
104 if [ -d "/lib/modules/%{KERNELRELEASE}/dtb" ]  << 
105    ! diff -rq "/lib/modules/%{KERNELRELEASE}/d << 
106         rm -rf "/boot/dtb-%{KERNELRELEASE}"    << 
107         cp -r "/lib/modules/%{KERNELRELEASE}/d << 
108 fi                                             << 
109 if [ ! -e "/lib/modules/%{KERNELRELEASE}/modul << 
110         /usr/sbin/depmod %{KERNELRELEASE}      << 
111 fi                                                 85 fi
112                                                    86 
113 %preun                                             87 %preun
114 if [ -x /usr/bin/kernel-install ]; then        !!  88 if [ -x /sbin/new-kernel-pkg ]; then
                                                   >>  89 new-kernel-pkg --remove %{KERNELRELEASE} --rminitrd --initrdfile=/boot/initramfs-%{KERNELRELEASE}.img
                                                   >>  90 elif [ -x /usr/bin/kernel-install ]; then
115 kernel-install remove %{KERNELRELEASE}             91 kernel-install remove %{KERNELRELEASE}
116 fi                                                 92 fi
117                                                    93 
118 %files -f %{buildroot}/kernel.list             !!  94 %postun
                                                   >>  95 if [ -x /sbin/update-bootloader ]; then
                                                   >>  96 /sbin/update-bootloader --remove %{KERNELRELEASE}
                                                   >>  97 fi
                                                   >>  98 
                                                   >>  99 %files
119 %defattr (-, root, root)                          100 %defattr (-, root, root)
120 %exclude /kernel.list                          !! 101 /lib/modules/%{KERNELRELEASE}
                                                   >> 102 %exclude /lib/modules/%{KERNELRELEASE}/build
                                                   >> 103 /boot/*
121                                                   104 
122 %files headers                                    105 %files headers
123 %defattr (-, root, root)                          106 %defattr (-, root, root)
124 /usr/include                                      107 /usr/include
125                                                   108 
126 %if %{with_devel}                                 109 %if %{with_devel}
127 %files devel                                      110 %files devel
128 %defattr (-, root, root)                          111 %defattr (-, root, root)
129 /usr/src/kernels/%{KERNELRELEASE}                 112 /usr/src/kernels/%{KERNELRELEASE}
130 /lib/modules/%{KERNELRELEASE}/build               113 /lib/modules/%{KERNELRELEASE}/build
131 %endif                                            114 %endif
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php