From cca3ade68a74f2fed49ba1028268705fba755443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Sat, 19 Nov 2016 17:00:43 -0300 Subject: linux-libre-lts-4.4.32_gnu-2: updating revision * fix lvm2 breakage, move to mkinitcpio running as pacman hook - FS#51818 -> https://bugs.archlinux.org/task/51818 * overhaul sed'ding --- libre/linux-libre-lts/99-linux.hook | 11 +++++++++++ libre/linux-libre-lts/PKGBUILD | 27 +++++++++++++-------------- libre/linux-libre-lts/linux.install | 20 ++++---------------- libre/linux-libre-lts/linux.preset | 8 ++++---- 4 files changed, 32 insertions(+), 34 deletions(-) create mode 100644 libre/linux-libre-lts/99-linux.hook (limited to 'libre/linux-libre-lts') diff --git a/libre/linux-libre-lts/99-linux.hook b/libre/linux-libre-lts/99-linux.hook new file mode 100644 index 000000000..985115199 --- /dev/null +++ b/libre/linux-libre-lts/99-linux.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = boot/vmlinuz-%PKGBASE% +Target = usr/lib/initcpio/* + +[Action] +Description = Updating %PKGBASE% initcpios +When = PostTransaction +Exec = /usr/bin/mkinitcpio -p %PKGBASE% diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD index 59d24921a..3803dda0c 100644 --- a/libre/linux-libre-lts/PKGBUILD +++ b/libre/linux-libre-lts/PKGBUILD @@ -19,7 +19,7 @@ _replacesoldmodules=() # '%' gets replaced with _kernelname _srcname=linux-${_pkgbasever%-*} _archpkgver=${_pkgver%-*} pkgver=${_pkgver//-/_} -pkgrel=1 +pkgrel=2 rcnrel=armv7-x13 arch=('i686' 'x86_64' 'armv7h') url="http://linux-libre.fsfla.org/" @@ -39,6 +39,8 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm.sig" # the main kernel config files 'config.i686' 'config.x86_64' 'config.armv7h' + # pacman hook for initramfs regeneration + '99-linux.hook' # standard config files for mkinitcpio ramdisk 'linux.preset' 'change-default-console-loglevel.patch' @@ -71,7 +73,8 @@ sha256sums=('f53e99866c751f21412737d1f06b0721e207f495c8c64f97dffb681795ee69a0' 'f820ffd8c6a31e97b0086c914415d52644ab8ef6d3b23c03e2cbe8313d383376' '5bfc50836ec2dcb49497d156a03f24bb97bbaebb50514addceb1215efd4d6c78' '73a3cd5215ef4210e41d344fe4f711ca5cafe889d24340427568bd2a657d199a' - 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' + '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0' + 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65' '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' '5313df7cb5b4d005422bd4cd0dae956b2dadba8f3db904275aaf99ac53894375' 'f0a10ea9a669e5200aa33656565c209718b24ff1add03ac5279c4a1f46ab8798' @@ -228,22 +231,18 @@ _package() { fi # set correct depmod command for install - cp -f "${startdir}/${install}" "${startdir}/${install}.pkg" + sed -e "s|%PKGBASE%|${pkgbase}|g;s|%KERNVER%|${_kernver}|g" \ + "${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}" if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/linux.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" + sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" | + install -D -m644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + + # install pacman hook for initramfs regeneration + sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/99-linux.hook" | + install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/99-${pkgbase}.hook" fi # remove build and source links diff --git a/libre/linux-libre-lts/linux.install b/libre/linux-libre-lts/linux.install index 378733c98..97a2a8133 100644 --- a/libre/linux-libre-lts/linux.install +++ b/libre/linux-libre-lts/linux.install @@ -1,33 +1,21 @@ -# arg 1: the new package version -# arg 2: the old package version - -KERNEL_NAME= -KERNEL_VERSION= - post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} + depmod %KERNVER% if [ "$(uname -m)" = "armv7l" ]; then echo ">>> WARNING: Using this kernel requires an updated U-Boot!" - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} fi } post_upgrade() { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} + depmod %KERNVER% if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then 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 - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} - 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" @@ -39,7 +27,7 @@ post_upgrade() { if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then post_remove() { # also remove the compat symlinks - rm -f boot/initramfs-linux-libre${KERNEL_NAME}.img - rm -f boot/initramfs-linux-libre${KERNEL_NAME}-fallback.img + rm -f boot/initramfs-%PKGBASE%.img + rm -f boot/initramfs-%PKGBASE%-fallback.img } fi diff --git a/libre/linux-libre-lts/linux.preset b/libre/linux-libre-lts/linux.preset index b06292d10..66709a8c1 100644 --- a/libre/linux-libre-lts/linux.preset +++ b/libre/linux-libre-lts/linux.preset @@ -1,14 +1,14 @@ -# mkinitcpio preset file for the 'linux' package +# mkinitcpio preset file for the '%PKGBASE%' package ALL_config="/etc/mkinitcpio.conf" -ALL_kver="/boot/vmlinuz-linux" +ALL_kver="/boot/vmlinuz-%PKGBASE%" PRESETS=('default' 'fallback') #default_config="/etc/mkinitcpio.conf" -default_image="/boot/initramfs-linux.img" +default_image="/boot/initramfs-%PKGBASE%.img" #default_options="" #fallback_config="/etc/mkinitcpio.conf" -fallback_image="/boot/initramfs-linux-fallback.img" +fallback_image="/boot/initramfs-%PKGBASE%-fallback.img" fallback_options="-S autodetect" -- cgit v1.2.2