add pve-kernel-libc-dev headers package
This was long overdue, allows to access the full feature set of our kernel for some tools using the Linux API directly. Packaging mostly taken from Debian[0] [0]: https://salsa.debian.org/kernel-team/linux/-/blob/debian/4.19.118-2/debian/rules.real#L367 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Reviewed-By: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
ee4a13eac3
commit
924ae54c14
12
debian/control.in
vendored
12
debian/control.in
vendored
@ -69,3 +69,15 @@ Depends: busybox,
|
|||||||
Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub-efi-arm64,
|
Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub-efi-arm64,
|
||||||
Description: The Proxmox PVE Kernel Image
|
Description: The Proxmox PVE Kernel Image
|
||||||
This package contains the linux kernel and initial ramdisk used for booting
|
This package contains the linux kernel and initial ramdisk used for booting
|
||||||
|
|
||||||
|
Package: pve-kernel-libc-dev
|
||||||
|
Section: devel
|
||||||
|
Priority: optional
|
||||||
|
Architecture: any
|
||||||
|
Provides: linux-libc-dev,
|
||||||
|
Conflicts: linux-libc-dev,
|
||||||
|
Replaces: linux-libc-dev,
|
||||||
|
Depends: ${misc:Depends}
|
||||||
|
Description: Linux support headers for userspace development
|
||||||
|
This package provides userspaces headers from the Linux kernel. These headers
|
||||||
|
are used by the installed headers for GNU libc and other system libraries.
|
||||||
|
22
debian/rules
vendored
22
debian/rules
vendored
@ -15,6 +15,7 @@ CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
|
|||||||
|
|
||||||
PVE_KERNEL_PKG=pve-kernel-${KVNAME}
|
PVE_KERNEL_PKG=pve-kernel-${KVNAME}
|
||||||
PVE_HEADER_PKG=pve-headers-${KVNAME}
|
PVE_HEADER_PKG=pve-headers-${KVNAME}
|
||||||
|
PVE_USR_HEADER_PKG=pve-kernel-libc-dev
|
||||||
LINUX_TOOLS_PKG=linux-tools-${KERNEL_MAJMIN}
|
LINUX_TOOLS_PKG=linux-tools-${KERNEL_MAJMIN}
|
||||||
KERNEL_SRC_COPY=${KERNEL_SRC}_tmp
|
KERNEL_SRC_COPY=${KERNEL_SRC}_tmp
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ debian/control: $(wildcard debian/*.in)
|
|||||||
|
|
||||||
build: .compile_mark .tools_compile_mark .modules_compile_mark
|
build: .compile_mark .tools_compile_mark .modules_compile_mark
|
||||||
|
|
||||||
install: .install_mark .tools_install_mark .headers_install_mark
|
install: .install_mark .tools_install_mark .headers_install_mark .usr_headers_install_mark
|
||||||
dh_installdocs -A debian/copyright debian/SOURCE
|
dh_installdocs -A debian/copyright debian/SOURCE
|
||||||
dh_installchangelogs
|
dh_installchangelogs
|
||||||
dh_installman
|
dh_installman
|
||||||
@ -97,7 +98,7 @@ install: .install_mark .tools_install_mark .headers_install_mark
|
|||||||
|
|
||||||
binary: install
|
binary: install
|
||||||
debian/rules fwcheck abicheck
|
debian/rules fwcheck abicheck
|
||||||
dh_strip -N${PVE_HEADER_PKG}
|
dh_strip -N${PVE_HEADER_PKG} -N${PVE_USR_HEADER_PKG}
|
||||||
dh_makeshlibs
|
dh_makeshlibs
|
||||||
dh_shlibdeps
|
dh_shlibdeps
|
||||||
dh_installdeb
|
dh_installdeb
|
||||||
@ -207,6 +208,23 @@ binary: install
|
|||||||
ln -sf /usr/src/linux-headers-${KVNAME} debian/${PVE_HEADER_PKG}/lib/modules/${KVNAME}/build
|
ln -sf /usr/src/linux-headers-${KVNAME} debian/${PVE_HEADER_PKG}/lib/modules/${KVNAME}/build
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
.usr_headers_install_mark: PKG_DIR = debian/${PVE_USR_HEADER_PKG}
|
||||||
|
.usr_headers_install_mark: OUT_DIR = ${PKG_DIR}/usr
|
||||||
|
.usr_headers_install_mark: .config_mark
|
||||||
|
rm -rf '${PKG_DIR}'
|
||||||
|
mkdir -p '${PKG_DIR}'
|
||||||
|
$(MAKE) -C ${KERNEL_SRC} headers_check ARCH=$(KERNEL_HEADER_ARCH)
|
||||||
|
$(MAKE) -C ${KERNEL_SRC} headers_install ARCH=$(KERNEL_HEADER_ARCH) INSTALL_HDR_PATH='$(CURDIR)'/$(OUT_DIR)
|
||||||
|
rm -rf $(OUT_DIR)/include/drm $(OUT_DIR)/include/scsi
|
||||||
|
find $(OUT_DIR)/include \( -name .install -o -name ..install.cmd \) -execdir rm {} +
|
||||||
|
|
||||||
|
# Move include/asm to arch-specific directory
|
||||||
|
mkdir -p $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)
|
||||||
|
mv $(OUT_DIR)/include/asm $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)/
|
||||||
|
test ! -d $(OUT_DIR)/include/arch || \
|
||||||
|
mv $(OUT_DIR)/include/arch $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)/
|
||||||
|
touch $@
|
||||||
|
|
||||||
.modules_compile_mark: ${MODULES}/zfs.ko
|
.modules_compile_mark: ${MODULES}/zfs.ko
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user