Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=0e24404001778caccda0c3827d5a3f82a2d9d93d
commit 0e24404001778caccda0c3827d5a3f82a2d9d93d Author: crazy <[email protected]> Date: Wed Apr 27 21:08:30 2016 +0200 kernel-4.5.2-2-x86_64 * added patch to fix <linux/if.h> -> glibc <net/if.h> conflicts * based on : http://marc.info/?l=linux-kernel&m=145485386721798&w=2 * fixed broken -docs subpackage ( was empty ) diff --git a/source/base/kernel/FrugalBuild b/source/base/kernel/FrugalBuild index 0386e9b..6a23c29 100644 --- a/source/base/kernel/FrugalBuild +++ b/source/base/kernel/FrugalBuild @@ -11,11 +11,11 @@ depends=('kmod' 'sed') [[ -z "$_F_kernel_name" ]] && makedepends+=('unifdef') groups=('base') archs=('i686' 'x86_64') -options=('nodocs' 'genscriptlet') +options+=('nodocs' 'genscriptlet') _F_archive_grepv="rc" up2date="Flasttar $url" -_F_kernel_patches=('fix-i915.patch' \ +_F_kernel_patches=('fix-i915.patch' 'if.h.patch' \ 'http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.4.0-v7r11/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.4.0.patch' \ 'http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.4.0-v7r11/0002-block-introduce-the-BFQ-v7r11-I-O-sched-for-4.4.0.patch' \ 'http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.4.0-v7r11/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-for.patch' ) @@ -30,20 +30,20 @@ source+=("https://www.kernel.org/pub/linux/kernel/v4.x/$_F_archive_name-$pkgver. signatures+=("https://www.kernel.org/pub/linux/kernel/v4.x/$_F_archive_name-$pkgver.tar.sign" '' '') -subpkgs+=('cpupower') -subdescs+=('Kernel cpu powersaving tool') -subrodepends+=("kernel=$_F_kernelver_ver") -subdepends+=('pciutils') -subgroups+=('apps-extra') -subarchs+=('i686 x86_64') -subbackup+=('etc/sysconfig/cpupower') -subconflicts+=('cpufrequtils') -subprovides+=('cpufrequtils') -subreplaces+=('cpufrequtils') -suboptions+=('') -subinstall+=('') -source+=("cpupower" "cpupower.sh" "cpupower.service") -signatures+=('' '' '') +subpkgs=('cpupower') +subdescs=('Kernel cpu powersaving tool') +subrodepends=("kernel=$_F_kernelver_ver") +subdepends=('pciutils') +subgroups=('apps-extra') +subarchs=('i686 x86_64') +subbackup=('etc/sysconfig/cpupower') +subconflicts=('cpufrequtils') +subprovides=('cpufrequtils') +subreplaces=('cpufrequtils') +suboptions=('') +subinstall=('') +source=("cpupower" "cpupower.sh" "cpupower.service") +signatures=('' '' '') subpkgs+=('x86_energy_perf_policy') subdescs+=('Kernel tool for setting MSR energy policies') @@ -173,6 +173,14 @@ build() make -C $Fdestdir/usr/src/linux-$_F_kernel_ver$_F_kernel_uname prepare || Fdie Fsplit kernel$_F_kernel_name-source usr/src + ## now the kernel$_F_kernel_name-docs + Fmkdir /usr/src/linux-$_F_kernel_ver$_F_kernel_uname + cp -Ra $Fsrcdir/linux-$_F_kernelver_ver/{Documentation,COPYING,CREDITS,MAINTAINERS,README,REPORTING-BUGS} \ + $Fdestdir/usr/src/linux-$_F_kernel_ver$_F_kernel_uname || Fdie + ## do we need to ln /usr/share/doc ?! + Fsplit kernel$_F_kernel_name-docs usr/src + + if [ -z "$_F_kernel_name" ]; then make INSTALL_HDR_PATH=$Fdestdir/usr headers_install || Fdie [ -e $Fdestdir/usr/include/scsi ] && Frm /usr/include/scsi diff --git a/source/base/kernel/if.h.patch b/source/base/kernel/if.h.patch new file mode 100644 index 0000000..cb68c32 --- /dev/null +++ b/source/base/kernel/if.h.patch @@ -0,0 +1,178 @@ +diff -Naur linux-4.5.2/include/uapi/linux/if.h linux-4.5.2-p/include/uapi/linux/if.h +--- linux-4.5.2/include/uapi/linux/if.h 2016-04-20 08:46:35.000000000 +0200 ++++ linux-4.5.2-p/include/uapi/linux/if.h 2016-04-27 19:59:29.429973179 +0200 +@@ -19,14 +19,20 @@ + #ifndef _LINUX_IF_H + #define _LINUX_IF_H + ++#include <linux/libc-compat.h> /* for compatibility with glibc */ + #include <linux/types.h> /* for "__kernel_caddr_t" et al */ + #include <linux/socket.h> /* for "struct sockaddr" et al */ + #include <linux/compiler.h> /* for "__user" et al */ + ++#if __UAPI_DEF_IF_IFNAMSIZ + #define IFNAMSIZ 16 ++#endif /* __UAPI_DEF_IF_IFNAMSIZ */ + #define IFALIASZ 256 + #include <linux/hdlc/ioctl.h> + ++/* For glibc compatibility. An empty enum does not compile. */ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && \ ++ __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 + /** + * enum net_device_flags - &struct net_device flags + * +@@ -68,6 +74,8 @@ + * @IFF_ECHO: echo sent packets. Volatile. + */ + enum net_device_flags { ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS + IFF_UP = 1<<0, /* sysfs */ + IFF_BROADCAST = 1<<1, /* volatile */ + IFF_DEBUG = 1<<2, /* sysfs */ +@@ -84,11 +92,17 @@ + IFF_PORTSEL = 1<<13, /* sysfs */ + IFF_AUTOMEDIA = 1<<14, /* sysfs */ + IFF_DYNAMIC = 1<<15, /* sysfs */ ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO + IFF_LOWER_UP = 1<<16, /* volatile */ + IFF_DORMANT = 1<<17, /* volatile */ + IFF_ECHO = 1<<18, /* volatile */ ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ + }; ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */ + ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS + #define IFF_UP IFF_UP + #define IFF_BROADCAST IFF_BROADCAST + #define IFF_DEBUG IFF_DEBUG +@@ -105,9 +119,13 @@ + #define IFF_PORTSEL IFF_PORTSEL + #define IFF_AUTOMEDIA IFF_AUTOMEDIA + #define IFF_DYNAMIC IFF_DYNAMIC ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */ ++ ++#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO + #define IFF_LOWER_UP IFF_LOWER_UP + #define IFF_DORMANT IFF_DORMANT + #define IFF_ECHO IFF_ECHO ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ + + #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\ + IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) +@@ -166,6 +184,8 @@ + * being very small might be worth keeping for clean configuration. + */ + ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_IFMAP + struct ifmap { + unsigned long mem_start; + unsigned long mem_end; +@@ -175,6 +195,7 @@ + unsigned char port; + /* 3 bytes spare */ + }; ++#endif /* __UAPI_DEF_IF_IFMAP */ + + struct if_settings { + unsigned int type; /* Type of physical device or protocol */ +@@ -200,6 +221,8 @@ + * remainder may be interface specific. + */ + ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_IFREQ + struct ifreq { + #define IFHWADDRLEN 6 + union +@@ -223,6 +246,7 @@ + struct if_settings ifru_settings; + } ifr_ifru; + }; ++#endif /* __UAPI_DEF_IF_IFREQ */ + + #define ifr_name ifr_ifrn.ifrn_name /* interface name */ + #define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ +@@ -249,6 +273,8 @@ + * must know all networks accessible). + */ + ++/* for compatibility with glibc net/if.h */ ++#if __UAPI_DEF_IF_IFCONF + struct ifconf { + int ifc_len; /* size of buffer */ + union { +@@ -256,6 +282,8 @@ + struct ifreq __user *ifcu_req; + } ifc_ifcu; + }; ++#endif /* __UAPI_DEF_IF_IFCONF */ ++ + #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ + #define ifc_req ifc_ifcu.ifcu_req /* array of structures */ + +diff -Naur linux-4.5.2/include/uapi/linux/libc-compat.h linux-4.5.2-p/include/uapi/linux/libc-compat.h +--- linux-4.5.2/include/uapi/linux/libc-compat.h 2016-04-20 08:46:35.000000000 +0200 ++++ linux-4.5.2-p/include/uapi/linux/libc-compat.h 2016-04-27 19:59:29.429973179 +0200 +@@ -51,6 +51,40 @@ + /* We have included glibc headers... */ + #if defined(__GLIBC__) + ++/* Coordinate with glibc net/if.h header. */ ++#if defined(_NET_IF_H) ++ ++/* GLIBC headers included first so don't define anything ++ * that would already be defined. */ ++ ++#define __UAPI_DEF_IF_IFCONF 0 ++#define __UAPI_DEF_IF_IFMAP 0 ++#define __UAPI_DEF_IF_IFNAMSIZ 0 ++#define __UAPI_DEF_IF_IFREQ 0 ++/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 ++/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ ++#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 ++#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ ++ ++#else /* _NET_IF_H */ ++ ++/* Linux headers included first, and we must define everything ++ * we need. The expectation is that glibc will check the ++ * __UAPI_DEF_* defines and adjust appropriately. */ ++ ++#define __UAPI_DEF_IF_IFCONF 1 ++#define __UAPI_DEF_IF_IFMAP 1 ++#define __UAPI_DEF_IF_IFNAMSIZ 1 ++#define __UAPI_DEF_IF_IFREQ 1 ++/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 ++/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 ++ ++#endif /* _NET_IF_H */ ++ + /* Coordinate with glibc netinet/in.h header. */ + #if defined(_NETINET_IN_H) + +@@ -117,6 +151,16 @@ + * that we need. */ + #else /* !defined(__GLIBC__) */ + ++/* Definitions for if.h */ ++#define __UAPI_DEF_IF_IFCONF 1 ++#define __UAPI_DEF_IF_IFMAP 1 ++#define __UAPI_DEF_IF_IFNAMSIZ 1 ++#define __UAPI_DEF_IF_IFREQ 1 ++/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 ++/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ ++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 ++ + /* Definitions for in.h */ + #define __UAPI_DEF_IN_ADDR 1 + #define __UAPI_DEF_IN_IPPROTO 1 diff --git a/source/include/kernel-version.sh b/source/include/kernel-version.sh index 295aaa1..e6452c0 100644 --- a/source/include/kernel-version.sh +++ b/source/include/kernel-version.sh @@ -17,7 +17,7 @@ # * _F_kernelver_nextver: the next kernel version ### _F_kernelver_ver=4.5.2 -_F_kernelver_rel=1 +_F_kernelver_rel=2 ### # == APPENDED VALUES _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
