diff --git a/install_all.sh b/install_all.sh index c46f01e..530aec5 100644 --- a/install_all.sh +++ b/install_all.sh @@ -25,42 +25,46 @@ if ! mkdir "$header_dir"; then exit 1 fi git clone --single-branch -b "$2" "$1" "$kernel_dir" +remove="arc c6x csky h8300 hexagon microblaze nds32 nios2 openrisc sh unicore32 xtensa um" +archs=$(cd "$kernel_dir/arch" && + for arch in *; do + test -d $arch || continue + case " $remove " in *" $arch "*) continue;; esac + echo $arch + done) pushd "$kernel_dir" -cp Makefile "$header_dir" -make O="$header_dir" headers_install_all -# kvm.h and aout.h are only installed if SRCARCH is an architecture -# that has support for them. As the package is noarch we need to make -# sure we get the full support on x86 -make SRCARCH=x86 O="$header_dir" headers_install_all +for arch in $archs; do + mkdir "$header_dir/$arch" + cp Makefile "$header_dir/$arch" + make O="$header_dir/$arch" headers_install ARCH=$arch +done popd pushd "$header_dir" -remove="arc c6x csky h8300 hexagon microblaze nds32 nios2 openrisc sh unicore32 xtensa" -for asm in $remove; do - rm -rf usr/include/arch-$asm -done -rm -f Makefile .cache.mk -find -type f \( -name "..install.cmd" -or -name ".install" \) -exec rm {} + -#------------------------------------------------------------------- -#Fri Sep 5 10:43:49 CEST 2008 - matz@suse.de +find -type f \( -name ".*.cmd" -o -name Makefile \) -exec rm {} + +for arch in $archs; do + cd $arch + #------------------------------------------------------------------- + #Fri Sep 5 10:43:49 CEST 2008 - matz@suse.de -#- Remove the kernel version of drm headers, they conflict -# with the libdrm ones, and those are slightly newer. -# -rm -rf usr/include/drm/ -# Remove confusing empty uapi directory -test ! -d usr/include/uapi || rmdir usr/include/uapi -for dir in *; do - case "$dir" in - usr) ;; - *) - if test -d "$dir"; then - rm -rf "$dir" - fi - ;; - esac + #- Remove the kernel version of drm headers, they conflict + # with the libdrm ones, and those are slightly newer. + # + rm -rf usr/include/drm/ + # Remove confusing empty uapi directory + test ! -d usr/include/uapi || rmdir usr/include/uapi + for dir in *; do + case "$dir" in + usr) ;; + *) + if test -d "$dir"; then + rm -rf "$dir" + fi + ;; + esac + done + cd .. done popd -du -sh "$header_dir/usr" +du -sh "$header_dir" tar -cJf "$header_dir.tar.xz" --owner=root --group=root "${header_dir##*/}" rm -rf "$header_dir" "$kernel_dir" - diff --git a/linux-glibc-devel-5.2.tar.xz b/linux-glibc-devel-5.2.tar.xz deleted file mode 100644 index b2246e4..0000000 --- a/linux-glibc-devel-5.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e590165918daf03f731a0b3e95b2e01e3578927c09816453de4a931f5867045 -size 1142912 diff --git a/linux-glibc-devel-5.3.tar.xz b/linux-glibc-devel-5.3.tar.xz new file mode 100644 index 0000000..5355025 --- /dev/null +++ b/linux-glibc-devel-5.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:604a11dcb1d94d59c4f604ea5ac5cd1d8adb402422e1ec3d662e45f57872e81e +size 1600312 diff --git a/linux-glibc-devel.changes b/linux-glibc-devel.changes index b208f31..ceb3858 100644 --- a/linux-glibc-devel.changes +++ b/linux-glibc-devel.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 18 08:25:47 UTC 2019 - Andreas Schwab + +- Update to kernel headers 5.2 +- Make it arch dependent due to difference in installed headers + ------------------------------------------------------------------- Mon Jul 8 10:01:19 UTC 2019 - Andreas Schwab diff --git a/linux-glibc-devel.spec b/linux-glibc-devel.spec index aa29517..fa08c0a 100644 --- a/linux-glibc-devel.spec +++ b/linux-glibc-devel.spec @@ -17,7 +17,7 @@ Name: linux-glibc-devel -Version: 5.2 +Version: 5.3 Release: 0 Summary: Linux headers for userspace development License: GPL-2.0-only @@ -35,7 +35,31 @@ PreReq: coreutils Provides: kernel-headers Provides: linux-kernel-headers = %{version} Obsoletes: linux-kernel-headers < %{version} -BuildArch: noarch +%global kernel_arch %target_cpu +%ifarch x86_64 %ix86 +%global kernel_arch x86 +%endif +%ifarch ppc ppc64 ppc64le +%global kernel_arch powerpc +%endif +%ifarch %arm +%global kernel_arch arm +%endif +%ifarch aarch64 +%global kernel_arch arm64 +%endif +%ifarch riscv64 +%global kernel_arch riscv +%endif +%ifarch s390x +%global kernel_arch s390 +%endif +%ifarch hppa +%global kernel_arch parisc +%endif +%ifarch sparc64 +%global kernel_arch sparc +%endif %description This package provides Linux kernel headers, the kernel API description @@ -48,6 +72,7 @@ packages, instead. %setup -q -n linux-glibc-devel-%{version} %build +cd %{kernel_arch} cat > version.h <<\BOGUS #ifdef __KERNEL__ #error "=======================================================" @@ -92,86 +117,20 @@ BOGUS cat version.h %install +cd %{kernel_arch} cp -a usr %{buildroot}/ cp -a version.h %{buildroot}%{_includedir}/linux/ # resolve file conflict with glibc for now rm -fv %{buildroot}/%{_includedir}/scsi/scsi.h -# Replace the directory /usr/include/asm with a symlink. -# libc contained a symlink /usr/include/asm into kernel-source up to 7.0 (2.1.3) -# glibc-devel contained a symlink /usr/include/asm into kernel-source in 7.1 (2.2) -# glibc-devel contained a directory /usr/include/asm from 7.2 (2.2.2) up to 10.1/SLES10 (2.4) -# The directory moved from glibc-devel to linux-kernel-headers in 10.2 (2.6.18.2) -# The directory turned into a symlink in 10.3 (2.6.22) -# rpm will remove obsolete files after the post install scripts -# A trigger will run after the /usr/include/asm was removed -# Create a dummy symlink now for rpmlint happiness, we %%ghost this and create -# a proper symlink during %%post: -ln -sfn asm-dummy %{buildroot}%{_includedir}/asm %fdupes %{buildroot}%{_includedir} -%postun -if test "$1" = 0 -then - rm -f %{_includedir}/asm +%pre +if test -L %{_includedir}/asm; then + rm -f %{_includedir}/asm fi -exit 0 - -%post -asm_link= -case "$(uname -m)" in - alpha*) asm_link=alpha ;; - ppc*) asm_link=powerpc ;; - s390*) asm_link=s390 ;; - ia64) asm_link=ia64 ;; - *arm*) asm_link=arm ;; - parisc) asm_link=parisc ;; - *mips*) asm_link=mips ;; - sparc*) asm_link=sparc ;; - aarch64) asm_link=arm64 ;; - m68k) asm_link=m68k ;; - riscv*) asm_link=riscv ;; - *) asm_link=x86 ;; -esac -if test -L %{_includedir}/asm -then - case "$(readlink %{_includedir}/asm)" in - *../src/linux/include*) - echo "%{_includedir}/asm points to kernel-source, waiting for triggerpostun to symlink to arch-$asm_link/asm" - rm -fv %{_includedir}/asm - exit 0 - ;; - esac - # symlink is ok, update it below in case of an arch change -elif test -d %{_includedir}/asm -then - echo "%{_includedir}/asm is a directory, waiting for triggerpostun to symlink to arch-$asm_link/asm" - exit 0 -fi -ln -sfn arch-$asm_link/asm %{_includedir}/asm -exit 0 - -%triggerpostun -- linux-kernel-headers, glibc-devel < 2.5, libc < 2.2 -asm_link= -case "$(uname -m)" in - alpha*) asm_link=alpha ;; - ppc*) asm_link=powerpc ;; - s390*) asm_link=s390 ;; - ia64) asm_link=ia64 ;; - *arm*) asm_link=arm ;; - parisc) asm_link=parisc ;; - *mips*) asm_link=mips ;; - sparc*) asm_link=sparc ;; - aarch64) asm_link=arm64 ;; - m68k) asm_link=m68k ;; - riscv*) asm_link=riscv ;; - *) asm_link=x86 ;; -esac -ln -sfn arch-$asm_link/asm %{_includedir}/asm -exit 0 %files %defattr(-,root,root) %{_includedir}/* -%ghost %{_includedir}/asm %changelog