summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGoliathLabs2020-05-16 19:42:54 +0200
committerGoliathLabs2020-05-16 19:42:54 +0200
commit04573a0d3b9c1bc1b4c47aabc637fb3276bbc04b (patch)
treecb52ded00aae82eb5c3aa3be57510956fa8054ce
parentb49a6e642849e45bdcc39e0a7cc9b9a5a85affbf (diff)
downloadaur-04573a0d3b9c1bc1b4c47aabc637fb3276bbc04b.tar.gz
Updated: 4.9.223
-rw-r--r--.SRCINFO18
-rw-r--r--60-linux.hook12
-rw-r--r--90-linux.hook2
-rw-r--r--PKGBUILD371
-rw-r--r--config14
-rw-r--r--linux-lts.install27
-rw-r--r--linux-lts.preset8
7 files changed, 243 insertions, 209 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e950cb587e01..d3d8fd163525 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = linux-lts49-kallsyms
- pkgver = 4.9.184
+ pkgver = 4.9.223
pkgrel = 1
url = https://www.kernel.org/
arch = x86_64
@@ -13,20 +13,20 @@ pkgbase = linux-lts49-kallsyms
makedepends = git
options = !strip
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.tar.xz
- source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.tar.sign
- source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.9.184.xz
+ source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.9.223.xz
source = config
+ source = 60-linux.hook
source = 90-linux.hook
source = linux-lts.preset
source = change-default-console-loglevel.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
sha256sums = 029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a
- sha256sums = SKIP
- sha256sums = da2c0111013c6b1c45970d8bb7568956efd3718b04b89ece4d5740e912201538
- sha256sums = ed042f5c353291327a68c922ccb47c4430ba1d6101edf1f10f2f4af8a167ce35
- sha256sums = 834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0
- sha256sums = 1f036f7464da54ae510630f0edb69faa115287f86d9f17641197ffda8cfd49e0
+ sha256sums = dab1cf744942db365049c04624ac7d1c148cbc5f2b4c468d137ed8d6c6448814
+ sha256sums = 0d80e4c334006a8bb7f18361359421eea7c84cd2f84b49fbdb3cde2a069b2373
+ sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21
+ sha256sums = 75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919
+ sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
sha256sums = 1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99
pkgname = linux-lts49-kallsyms
@@ -37,10 +37,12 @@ pkgname = linux-lts49-kallsyms
depends = kmod
depends = mkinitcpio>=0.7
optdepends = crda: to set the correct wireless channels of your country
+ provides = linux=4.9.223
backup = etc/mkinitcpio.d/linux-lts49-kallsyms.preset
pkgname = linux-lts49-kallsyms-headers
pkgdesc = Header files and scripts for building modules for Linux-lts49-kallsyms kernel
+ provides = linux-headers=4.9.223
pkgname = linux-lts49-kallsyms-docs
pkgdesc = Kernel hackers manual - HTML documentation that comes with the Linux-lts49-kallsyms kernel
diff --git a/60-linux.hook b/60-linux.hook
new file mode 100644
index 000000000000..b33873c854fb
--- /dev/null
+++ b/60-linux.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/modules/%KERNVER%/*
+Target = usr/lib/modules/%EXTRAMODULES%/*
+
+[Action]
+Description = Updating %PKGBASE% module dependencies...
+When = PostTransaction
+Exec = /usr/bin/depmod %KERNVER%
diff --git a/90-linux.hook b/90-linux.hook
index 9851151995bc..be0d886539f4 100644
--- a/90-linux.hook
+++ b/90-linux.hook
@@ -6,6 +6,6 @@ Target = boot/vmlinuz-%PKGBASE%
Target = usr/lib/initcpio/*
[Action]
-Description = Updating %PKGBASE% initcpios
+Description = Updating %PKGBASE% initcpios...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
diff --git a/PKGBUILD b/PKGBUILD
index 0da1a537c733..814f53389ed3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,59 +1,98 @@
# $Id$
-# Maintainer: oi_wtf <brainpower at mailbox dot org>
+# Maintainer: Felix Golatofski <contact@xdfr.de>
+# Contributor: oi_wtf <brainpower at mailbox dot org>
+# Contributor: Chris Severance aur.severach aATt spamgourmet dott com
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
pkgbase=linux-lts49-kallsyms
-#pkgbase=linux-lts-custom
-_srcname=linux-4.9
-pkgver=4.9.184
+pkgver=4.9.223
+_srcname="linux-${pkgver%.*}"
pkgrel=1
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'git')
options=('!strip')
-source=(https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
- https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz
- # the main kernel config files
- 'config'
- # pacman hook for initramfs regeneration
- '90-linux.hook'
- # standard config files for mkinitcpio ramdisk
- linux-lts.preset
- change-default-console-loglevel.patch)
+_verwatch=('https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/' '.*"patch-\(4\.9\.[0-9]\+\)\.xz.*' 'f')
+source=(
+ "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
+ "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
+ 'config' # the main kernel config file
+ '60-linux.hook' # pacman hook for depmod
+ '90-linux.hook' # pacman hook for initramfs regeneration
+ 'linux-lts.preset' # standard config files for mkinitcpio ramdisk
+ # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
+ # remove this when a Kconfig knob is made available by upstream
+ # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
+ 'change-default-console-loglevel.patch'
+)
+validpgpkeys=(
+ 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds <torvalds@linux-foundation.org>
+ '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>
+)
# https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
+md5suoms=()
sha256sums=('029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a'
- 'SKIP'
- 'da2c0111013c6b1c45970d8bb7568956efd3718b04b89ece4d5740e912201538'
- 'ed042f5c353291327a68c922ccb47c4430ba1d6101edf1f10f2f4af8a167ce35'
- '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
- '1f036f7464da54ae510630f0edb69faa115287f86d9f17641197ffda8cfd49e0'
+ 'dab1cf744942db365049c04624ac7d1c148cbc5f2b4c468d137ed8d6c6448814'
+ '0d80e4c334006a8bb7f18361359421eea7c84cd2f84b49fbdb3cde2a069b2373'
+ 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
+ '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
+ 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99')
-validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds <torvalds@linux-foundation.org>
- '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>
- )
_kernelname=${pkgbase#linux}
+# CFLAGS CXXFLAGS are not used at all.
+# LDFLAGS only works on the make command line. It is not used from the environment.
+_makeopts=(
+ #CC='gcc-7' CXX='g++-7' HOSTCC='gcc-7' HOSTCXX='g++-7'
+)
+#makedepends+=('gcc7')
+
prepare() {
+ set -u
cd "${srcdir}/${_srcname}"
# add upstream patch
- patch -p1 -i "${srcdir}/patch-${pkgver}"
+ patch -Nup1 -i "${srcdir}/patch-${pkgver}"
+ set +u; msg2 "Complete: patch-${pkgver}"; set -u
+ chmod +x tools/objtool/sync-check.sh # GNU patch doesn't support git-style file mode
+
+ # security patches
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
- # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
- # remove this when a Kconfig knob is made available by upstream
- # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
- patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"
+ local _f
+ for _f in "${source[@]}"; do
+ _f="${_f%%::*}"
+ _f="${_f##*/}"
+ case "${_f}" in
+ *.patch)
+ set +u; msg2 "Patch ${_f}"; set +u
+ patch -Nup1 -i "${srcdir}/${_f}"
+ ;;
+ esac
+ done
- cat "${srcdir}/config" > ./.config
+ # Local or private patches
+ shopt -s nullglob
+ local _lpatch
+ for _lpatch in "${startdir}"/*.localpatch; do
+ set +u; msg2 "Local patch: ${_lpatch##*/}"; set -u
+ patch -Nup1 -i "${_lpatch}"
+ done
+ unset _lpatch
+ shopt -u nullglob
+ declare -A _config=([x86_64]='config')
+ cat "${srcdir}/${_config[${CARCH}]}" > './.config'
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config
fi
+ cp './.config' "${srcdir}/config.cmp"
+ rm -f "${startdir}/${_config[${CARCH}]}.new"
# set extraversion to pkgrel
sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
@@ -61,9 +100,20 @@ prepare() {
# don't run depmod on 'make install'. We'll do this ourselves in packaging
sed -i '2iexit 0' scripts/depmod.sh
- # get kernel version
- make oldconfig # using old config from previous kernel version
- make prepare
+ set +u; msg2 'get kernel version'; set +u
+ set -x
+ make -s -j1 prepare "${_makeopts[@]}"
+ set +x
+
+ if ! diff -pNau5 "${srcdir}/config.cmp" './.config'; then
+ ln -s "${PWD}/.config" "${startdir}/${_config[${CARCH}]}.new"
+ rm "${srcdir}/config.cmp"
+ set +u
+ echo 'Some changes were made. Please merge for automation.'
+ false
+ else
+ rm "${srcdir}/config.cmp"
+ fi
# load configuration
# Configure the kernel. Replace the line below with one of your choice.
@@ -73,213 +123,202 @@ prepare() {
#make oldconfig # using old config from previous kernel version
# ... or manually edit .config
- # rewrite configuration
- yes "" | make config >/dev/null
+ set +u; msg2 'rewrite configuration'; set +u
+ set -x
+ yes "" | make -j1 config "${_makeopts[@]}" >/dev/null
+ set +x
+ set +u
}
build() {
+ set -u
cd "${srcdir}/${_srcname}"
- make ${MAKEFLAGS} LOCALVERSION= bzImage modules
+ local _mflags=()
+ local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
+ if [ -z "${MAKEFLAGS:=}" ] || [ "${MAKEFLAGS//-j/}" = "${MAKEFLAGS}" ]; then
+ _mflags+=('-j' "${_nproc}")
+ fi
+
+ rm -f vmlinux vmlinux.o # force relink, for debugging binutils 2.31.1
+
+ set -x
+ nice make -s "${_makeopts[@]}" "${_mflags[@]}" ${MAKEFLAGS} LOCALVERSION= bzImage modules
+ set +x
+ set +u
}
_package() {
pkgdesc="The ${pkgbase/linux/Linux} kernel and modules with KALLSYMS_ALL enabled"
- [ "${pkgbase}" = "linux" ] && groups=('base')
+ #[ "${pkgbase}" = "linux" ] && groups=('base')
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country')
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=linux-lts.install
+ provides=("linux=${pkgver}")
cd "${srcdir}/${_srcname}"
- KARCH=x86
-
# get kernel version
- _kernver="$(make LOCALVERSION= kernelrelease)"
+ _kernver="$(make "${_makeopts[@]}" LOCALVERSION= kernelrelease)"
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
- mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
- make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
- cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
+ mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
+ make -j1 "${_makeopts[@]}" LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
+ cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
- # set correct depmod command for install
- cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
- true && install=${install}.pkg
- sed \
- -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" \
- -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \
- -i "${startdir}/${install}"
-
- # install mkinitcpio preset file for kernel
- install -D -m644 "${srcdir}/linux-lts.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
- sed \
- -e "1s|'linux.*'|'${pkgbase}'|" \
- -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \
- -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \
- -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \
- -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
-
- # install pacman hook for initramfs regeneration
- sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/90-linux.hook" |
- install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
+ # systemd expects to find the kernel here to allow hibernation
+ # https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
+ ln -sr "${pkgdir}/boot/vmlinuz-${pkgbase}" "${pkgdir}/usr/lib/modules/${_kernver}/vmlinuz"
- # remove build and source links
- rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
- rm -rf "${pkgdir}/lib/firmware"
+ rm -r "${pkgdir}/usr/lib/firmware"
+
# make room for external modules
- ln -s "../extramodules-${_basekernel}${_kernelname:--lts}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
- # add real version for building modules and running depmod from post_install/upgrade
- mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--lts}"
- echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--lts}/version"
+ local _extramodules="extramodules-${_basekernel}${_kernelname:--lts}"
+ ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
+
+ # add real version for building modules and running depmod from hook
+ echo "${_kernver}" |
+ install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"
- # Now we call depmod...
- depmod -b "${pkgdir}" -F System.map "${_kernver}"
+ # remove build and source links
+ rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
- # move module tree /lib -> /usr/lib
- mkdir -p "${pkgdir}/usr"
- mv "${pkgdir}/lib" "${pkgdir}/usr/"
+ # now we call depmod...
+ depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
# add vmlinux
- install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
-}
+ install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
-_package-headers() {
- pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
+ # sed expression for following substitutions
+ local _subst="
+ s|%PKGBASE%|${pkgbase}|g
+ s|%KERNVER%|${_kernver}|g
+ s|%EXTRAMODULES%|${_extramodules}|g
+ "
- install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
-
- cd "${srcdir}/${_srcname}"
- install -D -m644 Makefile \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
- install -D -m644 kernel/Makefile \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
- install -D -m644 .config \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
-
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
-
- for i in acpi asm-generic config crypto drm generated keys linux math-emu \
- media net pcmcia scsi soc sound trace uapi video xen; do
- cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
- done
+ # hack to allow specifying an initially nonexisting install file
+ sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
+ true && install=${install}.pkg
- # copy arch includes for external modules
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/x86"
- cp -a arch/x86/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/x86/"
+ # install mkinitcpio preset file
+ sed "${_subst}" ../linux-lts.preset |
+ install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
- # copy files necessary for later builds, like nvidia and vmware
- cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
- cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
+ # install pacman hooks
+ sed "${_subst}" ../60-linux.hook |
+ install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
+ sed "${_subst}" ../90-linux.hook |
+ install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
+ set +u
+}
- # fix permissions on scripts dir
- chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
+_package-headers() {
+ set -u
+ pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
+ provides=("linux-headers=${pkgver}")
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
+ cd ${_srcname}
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
- cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
+ install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
+ install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
- cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
+ mkdir "${_builddir}/.tmp_versions"
- # add docbook makefile
- install -D -m644 Documentation/DocBook/Makefile \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
+ cp -t "${_builddir}" -a include scripts
- # add dm headers
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
- cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
+ install -Dt "${_builddir}/arch/x86" -m644 arch/x86/Makefile
+ install -Dt "${_builddir}/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
- # add inotify.h
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
- cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
+ cp -t "${_builddir}/arch/x86" -a arch/x86/include
+ # add dm headers
+ install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
# add wireless headers
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
- cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
+ install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/9912
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core"
- cp drivers/media/dvb-core/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-core/"
+ install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.h
# and...
# http://bugs.archlinux.org/task/11194
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
- cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
+ install -Dt "${_builddir}/include/config/dvb/" include/config/dvb/*.h
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
# in reference to:
# http://bugs.archlinux.org/task/13146
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
- cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
+ install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
+ install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/lgdt330x.h
# add dvb headers
# in reference to:
# http://bugs.archlinux.org/task/20402
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb"
- cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
- cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
- cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
+ install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
+ install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
+ install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
+
+ # add docbook makefile
+ install -Dt "${_builddir}/Documentation/DocBook/" -m644 Documentation/DocBook/Makefile
+
+ # add inotify.h
+ install -Dt "${_builddir}/include/linux" -m644 include/linux/inotify.h
# add xfs and shmem for aufs building
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
+ mkdir -p "${_builddir}"/{fs/xfs,mm}
# copy in Kconfig files
- for i in $(find . -name "Kconfig*"); do
- mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
- cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
- done
+ find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
# add objtool for external module building and enabled VALIDATION_STACK option
- if [ -f tools/objtool/objtool ]; then
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/tools/objtool"
- cp -a tools/objtool/objtool ${pkgdir}/usr/lib/modules/${_kernver}/build/tools/objtool/
- fi
-
- chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
- find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
-
- # strip scripts directory
- find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
- case "$(file -bi "${binary}")" in
- *application/x-sharedlib*) # Libraries (.so)
- /usr/bin/strip ${STRIP_SHARED} "${binary}";;
- *application/x-archive*) # Libraries (.a)
- /usr/bin/strip ${STRIP_STATIC} "${binary}";;
- *application/x-executable*) # Binaries
- /usr/bin/strip ${STRIP_BINARIES} "${binary}";;
- esac
- done
+ install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
# remove unneeded architectures
- rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa}
+ local _arch
+ for _arch in "${_builddir}"/arch/*/; do
+ [[ ${_arch} == */x86/ ]] && continue
+ rm -r "${_arch}"
+ done
# remove files already in linux-docs package
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.recursion-issue-01"
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.recursion-issue-02"
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.select-break"
+ rm -r "${_builddir}/Documentation"
+
+ # remove now broken symlinks
+ find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
+
+ # Fix permissions
+ chmod -R u=rwX,go=rX "${_builddir}"
+
+ # strip scripts directory
+ local _binary _strip
+ while read -rd '' _binary; do
+ case "$(file -bi "${_binary}")" in
+ *application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
+ *application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
+ *application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
+ *) continue ;;
+ esac
+ /usr/bin/strip ${_strip} "${_binary}"
+ done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
+ set +u
}
_package-docs() {
+ set -u
pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel"
- cd "${srcdir}/${_srcname}"
+ cd "${_srcname}"
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build"
- cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"
- find "${pkgdir}" -type f -exec chmod 444 {} \;
- find "${pkgdir}" -type d -exec chmod 755 {} \;
+ mkdir -p "${_builddir}"
+ cp -t "${_builddir}" -a Documentation
- # remove a file already in linux package
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
+ # Fix permissions
+ chmod -R u=rwX,go=rX "${_builddir}"
+ set +u
}
pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")
@@ -289,3 +328,5 @@ for _p in ${pkgname[@]}; do
_package${_p#${pkgbase}}
}"
done
+
+set +u
diff --git a/config b/config
index e26619630c95..43bccf22008b 100644
--- a/config
+++ b/config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 4.9.173-1 Kernel Configuration
+# Linux/x86 4.9.202-1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@@ -178,7 +178,7 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
-# CONFIG_USER_NS is not set
+CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_SCHED_AUTOGROUP=y
@@ -222,7 +222,7 @@ CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_BPF_SYSCALL=y
-# CONFIG_BPF_JIT_ALWAYS_ON is not set
+CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_ADVISE_SYSCALLS=y
@@ -428,7 +428,8 @@ CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_DEBUG is not set
-# CONFIG_PARAVIRT_SPINLOCKS is not set
+CONFIG_PARAVIRT_SPINLOCKS=y
+# CONFIG_QUEUED_LOCK_STAT is not set
CONFIG_XEN=y
CONFIG_XEN_DOM0=y
CONFIG_XEN_PVHVM=y
@@ -586,6 +587,9 @@ CONFIG_ARCH_RANDOM=y
CONFIG_X86_SMAP=y
CONFIG_X86_INTEL_MPX=y
CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y
+# CONFIG_X86_INTEL_TSX_MODE_OFF is not set
+# CONFIG_X86_INTEL_TSX_MODE_ON is not set
+CONFIG_X86_INTEL_TSX_MODE_AUTO=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_EFI_MIXED=y
@@ -613,7 +617,6 @@ CONFIG_LEGACY_VSYSCALL_EMULATE=y
# CONFIG_CMDLINE_BOOL is not set
CONFIG_MODIFY_LDT_SYSCALL=y
CONFIG_HAVE_LIVEPATCH=y
-# CONFIG_LIVEPATCH is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
@@ -5801,7 +5804,6 @@ CONFIG_USB_EMI62=m
CONFIG_USB_EMI26=m
CONFIG_USB_ADUTUX=m
CONFIG_USB_SEVSEG=m
-CONFIG_USB_RIO500=m
CONFIG_USB_LEGOTOWER=m
CONFIG_USB_LCD=m
CONFIG_USB_CYPRESS_CY7C63=m
diff --git a/linux-lts.install b/linux-lts.install
index 9a8686c61ae9..37ba37494605 100644
--- a/linux-lts.install
+++ b/linux-lts.install
@@ -1,33 +1,10 @@
-# arg 1: the new package version
-# arg 2: the old package version
-
-KERNEL_NAME=-lts-kallsyms
-KERNEL_VERSION=
-
-post_install () {
- # updating module dependencies
- echo ">>> Updating module dependencies. Please wait ..."
- depmod ${KERNEL_VERSION}
-}
-
post_upgrade() {
if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
echo "WARNING: /boot appears to be a separate partition but is not mounted."
fi
-
- # updating module dependencies
- echo ">>> Updating module dependencies. Please wait ..."
- depmod ${KERNEL_VERSION}
-
- if [ $(vercmp $2 3.13) -lt 0 ]; then
- echo ">>> WARNING: AT keyboard support is no longer built into the kernel."
- echo ">>> In order to use your keyboard during early init, you MUST"
- echo ">>> include the 'keyboard' hook in your mkinitcpio.conf."
- fi
}
post_remove() {
- # also remove the compat symlinks
- rm -f boot/initramfs-linux${KERNEL_NAME}.img
- rm -f boot/initramfs-linux${KERNEL_NAME}-fallback.img
+ rm -f boot/initramfs-%PKGBASE%.img
+ rm -f boot/initramfs-%PKGBASE%-fallback.img
}
diff --git a/linux-lts.preset b/linux-lts.preset
index 7300e9c80f92..66709a8c1537 100644
--- a/linux-lts.preset
+++ b/linux-lts.preset
@@ -1,14 +1,14 @@
-# mkinitcpio preset file for the 'linux-lts' package
+# mkinitcpio preset file for the '%PKGBASE%' package
ALL_config="/etc/mkinitcpio.conf"
-ALL_kver="/boot/vmlinuz-linux-lts"
+ALL_kver="/boot/vmlinuz-%PKGBASE%"
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
-default_image="/boot/initramfs-linux-lts.img"
+default_image="/boot/initramfs-%PKGBASE%.img"
#default_options=""
#fallback_config="/etc/mkinitcpio.conf"
-fallback_image="/boot/initramfs-linux-lts-fallback.img"
+fallback_image="/boot/initramfs-%PKGBASE%-fallback.img"
fallback_options="-S autodetect"