From 0fe826e2dc5e2efe639ef56132ab39c6dfa89c26ebdaa24ceb374ba8fd405720 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 27 Apr 2021 09:26:18 +0000 Subject: [PATCH 1/3] Accepting request 888718 from home:Andreas_Schwab:Factory - Update to kernel headers 5.12 OBS-URL: https://build.opensuse.org/request/show/888718 OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-glibc-devel?expand=0&rev=164 --- linux-glibc-devel-5.11.tar.xz | 3 --- linux-glibc-devel-5.12.tar.xz | 3 +++ linux-glibc-devel.changes | 5 +++++ linux-glibc-devel.spec | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 linux-glibc-devel-5.11.tar.xz create mode 100644 linux-glibc-devel-5.12.tar.xz diff --git a/linux-glibc-devel-5.11.tar.xz b/linux-glibc-devel-5.11.tar.xz deleted file mode 100644 index ffb67e7..0000000 --- a/linux-glibc-devel-5.11.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8f3869d669604dda80abcfb499700ef1f6807478afd2aa6de74523cc6601a778 -size 1718360 diff --git a/linux-glibc-devel-5.12.tar.xz b/linux-glibc-devel-5.12.tar.xz new file mode 100644 index 0000000..7afca37 --- /dev/null +++ b/linux-glibc-devel-5.12.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0154ba57d0cdec6e3004f57e6ed81ec4707285b2bb57663b366dc92fcf3c106 +size 1737044 diff --git a/linux-glibc-devel.changes b/linux-glibc-devel.changes index a4e946d..88bf4db 100644 --- a/linux-glibc-devel.changes +++ b/linux-glibc-devel.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 27 09:22:59 UTC 2021 - Andreas Schwab + +- Update to kernel headers 5.12 + ------------------------------------------------------------------- Wed Feb 17 19:23:12 UTC 2021 - Andreas Schwab diff --git a/linux-glibc-devel.spec b/linux-glibc-devel.spec index 578c1bb..9d7dce8 100644 --- a/linux-glibc-devel.spec +++ b/linux-glibc-devel.spec @@ -17,7 +17,7 @@ Name: linux-glibc-devel -Version: 5.11 +Version: 5.12 Release: 0 Summary: Linux headers for userspace development License: GPL-2.0-only From d560d3bdd7d5e14489f2c20324d0a5d391706b91fa729772dc4e59e952ad6a3c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 20 May 2021 10:24:44 +0000 Subject: [PATCH 2/3] Accepting request 894596 from home:Andreas_Schwab:Factory - Add cross-*-linux-glibc-devel packages OBS-URL: https://build.opensuse.org/request/show/894596 OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-glibc-devel?expand=0&rev=165 --- linux-glibc-devel.changes | 5 ++ linux-glibc-devel.spec | 116 ++++++++++++++++++++++++++------------ 2 files changed, 86 insertions(+), 35 deletions(-) diff --git a/linux-glibc-devel.changes b/linux-glibc-devel.changes index 88bf4db..6f35634 100644 --- a/linux-glibc-devel.changes +++ b/linux-glibc-devel.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 20 09:46:11 UTC 2021 - Andreas Schwab + +- Add cross-*-linux-glibc-devel packages + ------------------------------------------------------------------- Tue Apr 27 09:22:59 UTC 2021 - Andreas Schwab diff --git a/linux-glibc-devel.spec b/linux-glibc-devel.spec index 9d7dce8..21f5d51 100644 --- a/linux-glibc-devel.spec +++ b/linux-glibc-devel.spec @@ -25,7 +25,6 @@ Group: Development/Libraries/C and C++ URL: http://www.kernel.org/ Source: %{name}-%{version}.tar.xz Source1: install_all.sh -BuildRequires: fdupes BuildRequires: xz # rpm-build requires gettext-tools; ignore this, in order to shorten cycles (we have no translations) #!BuildIgnore: gettext-tools @@ -35,31 +34,42 @@ PreReq: coreutils Provides: kernel-headers Provides: linux-kernel-headers = %{version} Obsoletes: linux-kernel-headers < %{version} -%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 + +%{lua: +function cross_archs() + return "aarch64", "arm", "hppa", "i386", "m68k", "mips", "ppc64", "ppc64le", "riscv64", "s390x", "sparc", "sparc64", "x86_64" +end + +function kernel_arch(arch) + local map = { + ["aarch64"] = "arm64", + ["armv6hl"] = "arm", + ["armv7hl"] = "arm", + ["hppa"] = "parisc", + ["i386"] = "x86", + ["i586"] = "x86", + ["i686"] = "x86", + ["ppc"] = "powerpc", + ["ppc64"] = "powerpc", + ["ppc64le"] = "powerpc", + ["riscv64"] = "riscv", + ["s390x"] = "s390", + ["sparc64"] = "sparc", + ["x86_64"] = "x86", + } + return map[arch] or arch +end + +function gcc_target(arch) + local map = { + ["arm"] = "arm-suse-linux-gnueabi", + ["i386"] = "i586-suse-linux", + ["ppc64"] = "powerpc64-suse-linux", + ["ppc64le"] = "powerpc64le-suse-linux", + } + return map[arch] or arch.."-suse-linux" +end +} %description This package provides Linux kernel headers, the kernel API description @@ -68,12 +78,28 @@ interface; compiling external kernel modules requires kernel-(flavor)-devel, or kernel-syms to pull in all kernel-*-devel, packages, instead. +%{lua: + for i,arch in ipairs({cross_archs()}) do + print(rpm.expand([[ + +%package -n cross-]]..arch..[[-linux-glibc-devel +Summary: Linux headers for ]]..arch..[[ userspace cross development +Group: Development/Libraries/C and C++ +BuildArch: noarch + +%description -n cross-]]..arch..[[-linux-glibc-devel +This package provides Linux kernel headers for ]]..arch..[[, the kernel API description +required for compilation of almost all programs. +]])) + end} + %prep %setup -q -n linux-glibc-devel-%{version} %build -cd %{kernel_arch} -cat > version.h <<\BOGUS +for karch in *; do + cd $karch + cat > version.h <<\BOGUS #ifdef __KERNEL__ #error "=======================================================" #error "You should not include %{_includedir}/{linux,asm}/ header" @@ -109,18 +135,31 @@ cat > version.h <<\BOGUS #error "=======================================================" #else BOGUS -# Get LINUX_VERSION_CODE and KERNEL_VERSION directly from kernel -cat usr/include/linux/version.h >> version.h -cat >> version.h <<\BOGUS + # Get LINUX_VERSION_CODE and KERNEL_VERSION directly from kernel + cat usr/include/linux/version.h >> version.h + cat >> version.h <<\BOGUS #endif BOGUS -cat version.h + cd .. +done %install -cd %{kernel_arch} +cd %{lua:print(kernel_arch(rpm.expand("%_target_cpu")))} cp -a usr %{buildroot}/ cp -a version.h %{buildroot}%{_includedir}/linux/ -%fdupes %{buildroot}%{_includedir} +cd .. +%{lua: + for i,arch in ipairs({cross_archs()}) do + print(rpm.expand([[ +sysroot=%{_prefix}/]]..gcc_target(arch)..[[/sys-root +mkdir -p %{buildroot}${sysroot}/%{_includedir}/linux/ +cd ]]..kernel_arch(arch)..[[ + +cp -a usr %{buildroot}${sysroot} +cp -a version.h %{buildroot}${sysroot}/%{_includedir}/linux/ +cd .. +]])) + end} %pre if test -L %{_includedir}/asm; then @@ -128,7 +167,14 @@ if test -L %{_includedir}/asm; then fi %files -%defattr(-,root,root) %{_includedir}/* +%{lua: + for i,arch in ipairs({cross_archs()}) do + print(rpm.expand([[ + +%files -n cross-]]..arch..[[-linux-glibc-devel +%{_prefix}/]]..gcc_target(arch).."\n")) + end} + %changelog From 39cdb132198e48046facdadadc8f475f0d9e1f0cdca656c02c1ac6c205bcd5ef Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 28 Jun 2021 12:36:14 +0000 Subject: [PATCH 3/3] Accepting request 902814 from home:Andreas_Schwab:Factory - Update to kernel headers 5.13 OBS-URL: https://build.opensuse.org/request/show/902814 OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-glibc-devel?expand=0&rev=166 --- linux-glibc-devel-5.12.tar.xz | 3 --- linux-glibc-devel-5.13.tar.xz | 3 +++ linux-glibc-devel.changes | 5 +++++ linux-glibc-devel.spec | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 linux-glibc-devel-5.12.tar.xz create mode 100644 linux-glibc-devel-5.13.tar.xz diff --git a/linux-glibc-devel-5.12.tar.xz b/linux-glibc-devel-5.12.tar.xz deleted file mode 100644 index 7afca37..0000000 --- a/linux-glibc-devel-5.12.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0154ba57d0cdec6e3004f57e6ed81ec4707285b2bb57663b366dc92fcf3c106 -size 1737044 diff --git a/linux-glibc-devel-5.13.tar.xz b/linux-glibc-devel-5.13.tar.xz new file mode 100644 index 0000000..9489653 --- /dev/null +++ b/linux-glibc-devel-5.13.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30a244c3c62d2fb17bba78f494fa67cfe94ddec3d71101da3460c720ec3bc8ac +size 1749116 diff --git a/linux-glibc-devel.changes b/linux-glibc-devel.changes index 6f35634..0c7b74b 100644 --- a/linux-glibc-devel.changes +++ b/linux-glibc-devel.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 28 12:19:57 UTC 2021 - Andreas Schwab + +- Update to kernel headers 5.13 + ------------------------------------------------------------------- Thu May 20 09:46:11 UTC 2021 - Andreas Schwab diff --git a/linux-glibc-devel.spec b/linux-glibc-devel.spec index 21f5d51..06b1f48 100644 --- a/linux-glibc-devel.spec +++ b/linux-glibc-devel.spec @@ -17,7 +17,7 @@ Name: linux-glibc-devel -Version: 5.12 +Version: 5.13 Release: 0 Summary: Linux headers for userspace development License: GPL-2.0-only