forked from pool/linux-glibc-devel
- Update to kernel headers 6.12
OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-glibc-devel?expand=0&rev=198
This commit is contained in:
commit
02bcc6b7f0
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
74
install_all.sh
Normal file
74
install_all.sh
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# bash -x $0 linux.git tag
|
||||||
|
set -e
|
||||||
|
kernel=$1
|
||||||
|
if test $# -ne 2 || ! test -d "$1" || test "$2" = "${2#v}"; then
|
||||||
|
echo "Usage: ${0##*/} linux.git tag"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
case $PWD in
|
||||||
|
*:*)
|
||||||
|
echo "do not call this in a directory with : - make will fail"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
version=${2#v}
|
||||||
|
kernel_dir=linux-$version
|
||||||
|
header_dir="$PWD/linux-glibc-devel-$version"
|
||||||
|
if test -d "$kernel_dir"; then
|
||||||
|
echo "$kernel_dir exists, remove it first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! mkdir "$header_dir"; then
|
||||||
|
echo "$header_dir exists, remove it first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
git clone --single-branch -b "$2" "$1" "$kernel_dir"
|
||||||
|
date=$(git -C "$kernel_dir" cat-file -p "$2" | awk '/^tagger/ { print $(NF-1) }')
|
||||||
|
date -d "@$date" || exit 1
|
||||||
|
remove="arc csky hexagon microblaze nios2 openrisc sh 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"
|
||||||
|
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"
|
||||||
|
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
|
||||||
|
done
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
du -sh "$header_dir"
|
||||||
|
tar -cJf "$header_dir.tar.xz" --owner=root --group=root --mtime="@$date" \
|
||||||
|
--sort=name "${header_dir##*/}"
|
||||||
|
touch -d "@$date" "$header_dir.tar.xz"
|
||||||
|
rm -rf "$header_dir" "$kernel_dir"
|
3
linux-glibc-devel-6.10.tar.xz
Normal file
3
linux-glibc-devel-6.10.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6801025148f74219235fd757ebe5c5a441a1d51cd30c3b5f62b3888b3cdd428e
|
||||||
|
size 1873408
|
3
linux-glibc-devel-6.11.tar.xz
Normal file
3
linux-glibc-devel-6.11.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b0802cbaa8f277e86426f4b492bc70c24a7116058634f5e10d03c69ba75d4d8a
|
||||||
|
size 1892520
|
3
linux-glibc-devel-6.12.tar.xz
Normal file
3
linux-glibc-devel-6.12.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:afb44ae42c80b22b6327e451b1c8853356ab26692a0bfe2d932f78272f4a2d71
|
||||||
|
size 1907512
|
3
linux-glibc-devel-6.9.tar.xz
Normal file
3
linux-glibc-devel-6.9.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f0a44c9ec27922f30bba9874097cbbaa566361c436cd7f2d2e44a6e1d0182441
|
||||||
|
size 1868572
|
4989
linux-glibc-devel.changes
Normal file
4989
linux-glibc-devel.changes
Normal file
File diff suppressed because it is too large
Load Diff
180
linux-glibc-devel.spec
Normal file
180
linux-glibc-devel.spec
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
#
|
||||||
|
# spec file for package linux-glibc-devel
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: linux-glibc-devel
|
||||||
|
Version: 6.12
|
||||||
|
Release: 0
|
||||||
|
Summary: Linux headers for userspace development
|
||||||
|
License: GPL-2.0-only
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
URL: http://www.kernel.org/
|
||||||
|
Source: %{name}-%{version}.tar.xz
|
||||||
|
Source1: install_all.sh
|
||||||
|
BuildRequires: xz
|
||||||
|
# rpm-build requires gettext-tools; ignore this, in order to shorten cycles (we have no translations)
|
||||||
|
#!BuildIgnore: gettext-tools
|
||||||
|
# glibc-devel requires linux-kernel-headers, which we are in progress of building
|
||||||
|
#!BuildIgnore: linux-kernel-headers
|
||||||
|
PreReq: coreutils
|
||||||
|
Provides: kernel-headers
|
||||||
|
Provides: linux-kernel-headers = %{version}
|
||||||
|
Obsoletes: linux-kernel-headers < %{version}
|
||||||
|
|
||||||
|
%{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
|
||||||
|
required for compilation of almost all programs. This is the userspace
|
||||||
|
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
|
||||||
|
for karch in *; do
|
||||||
|
cd $karch
|
||||||
|
cat > version.h <<\BOGUS
|
||||||
|
#ifdef __KERNEL__
|
||||||
|
#error "======================================================="
|
||||||
|
#error "You should not include %{_includedir}/{linux,asm}/ header"
|
||||||
|
#error "files directly for the compilation of kernel modules."
|
||||||
|
#error ""
|
||||||
|
#error "glibc now uses kernel header files from a well-defined"
|
||||||
|
#error "working kernel version (as recommended by Linus Torvalds)"
|
||||||
|
#error "These files are glibc internal and may not match the"
|
||||||
|
#error "currently running kernel. They should only be"
|
||||||
|
#error "included via other system header files - user space"
|
||||||
|
#error "programs should not directly include <linux/*.h> or"
|
||||||
|
#error "<asm/*.h> as well."
|
||||||
|
#error ""
|
||||||
|
#error "Since Linux 2.6, the kernel module build process has been"
|
||||||
|
#error "updated such that users building modules should not typically"
|
||||||
|
#error "need to specify additional include directories at all."
|
||||||
|
#error ""
|
||||||
|
#error "To build kernel modules, ensure you have the build environment "
|
||||||
|
#error "available either via the kernel-devel and kernel-<flavor>-devel "
|
||||||
|
#error "packages or a properly configured kernel source tree."
|
||||||
|
#error ""
|
||||||
|
#error "Then, modules can be built using:"
|
||||||
|
#error "make -C <path> M=$PWD"
|
||||||
|
#error ""
|
||||||
|
#error "For the currently running kernel there will be a symbolic "
|
||||||
|
#error "link pointing to the build environment located at "
|
||||||
|
#error "/lib/modules/$(uname -r)/build for use as <path>."
|
||||||
|
#error ""
|
||||||
|
#error "If you are seeing this message, your environment is "
|
||||||
|
#error "not configured properly. "
|
||||||
|
#error ""
|
||||||
|
#error "Please adjust the Makefile accordingly."
|
||||||
|
#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
|
||||||
|
#endif
|
||||||
|
BOGUS
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd %{lua:print(kernel_arch(rpm.expand("%_target_cpu")))}
|
||||||
|
cp -a usr %{buildroot}/
|
||||||
|
cp -a version.h %{buildroot}%{_includedir}/linux/
|
||||||
|
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
|
||||||
|
rm -f %{_includedir}/asm
|
||||||
|
fi
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_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
|
Loading…
Reference in New Issue
Block a user