summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Jonglez2016-12-17 20:12:59 +0100
committerBaptiste Jonglez2016-12-17 22:35:06 +0100
commit74068adef1b7f4a8cfc7f6db992806b2eda1fd71 (patch)
tree4d440e3990e1c4dabdfb5fdfd46759be5969d34e
parent58dc511c8cb005607d5b2bdf78753ecb51ff4ce8 (diff)
downloadaur-74068adef1b7f4a8cfc7f6db992806b2eda1fd71.tar.gz
linux-mptcp: Catch up with linux in [core] (pacman hook for mkinitcpio, etc)
-rw-r--r--.SRCINFO16
-rw-r--r--99-linux.hook11
-rw-r--r--PKGBUILD37
-rw-r--r--linux.install18
-rw-r--r--linux.preset8
5 files changed, 46 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 019273f815cd..2770ae473d3b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Sat Dec 17 18:48:13 UTC 2016
+# Sat Dec 17 21:35:06 UTC 2016
pkgbase = linux-mptcp
pkgver = 0.91.2.r3.g7dc057e
- pkgrel = 1
+ pkgrel = 2
epoch = 1
url = http://www.multipath-tcp.org/
arch = i686
@@ -18,13 +18,15 @@ pkgbase = linux-mptcp
source = git+https://github.com/multipath-tcp/mptcp#commit=7dc057edb502ded02b91ae9a68f1114ddcf4c8ff
source = config
source = config.x86_64
+ source = 99-linux.hook
source = linux.preset
source = change-default-console-loglevel.patch
- md5sums = SKIP
- md5sums = 4b08d92164ee25f2a680700e426f6cd5
- md5sums = 6a74094caead06597a356c864c8872bc
- md5sums = eb14dcfd80c00852ef81ded6e826826a
- md5sums = 92562f0a5d8cc0e5972ab58523dbe0a4
+ sha256sums = SKIP
+ sha256sums = 3fb70bb34f132e0849be975592f98371160f53b9c2c457ed4468e88fdba8c0ed
+ sha256sums = 09c489756410cdd9e014a5504ee7c0508401d445a050c1911b8c0667349e1451
+ sha256sums = 834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0
+ sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
+ sha256sums = 567bdc00dbecae3e03c4d5306c8156d4a76485925404cf0c30f15f2c3661d32f
pkgname = linux-mptcp
pkgdesc = The Linux kernel and modules with Multipath TCP support (based on linux 4.1.35)
diff --git a/99-linux.hook b/99-linux.hook
new file mode 100644
index 000000000000..9851151995bc
--- /dev/null
+++ b/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/PKGBUILD b/PKGBUILD
index a9d51b9ae37a..4a791589c2f4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgbase=linux-mptcp
_srcname=mptcp
pkgver=0.91.2.r3.g7dc057e
-pkgrel=1
+pkgrel=2
epoch=1
arch=('i686' 'x86_64')
url="http://www.multipath-tcp.org/"
@@ -17,14 +17,17 @@ options=('!strip')
source=("git+https://github.com/multipath-tcp/mptcp#commit=7dc057edb502ded02b91ae9a68f1114ddcf4c8ff"
# the main kernel config files
'config' 'config.x86_64'
+ # pacman hook for initramfs regeneration
+ '99-linux.hook'
# standard config files for mkinitcpio ramdisk
'linux.preset'
'change-default-console-loglevel.patch')
-md5sums=('SKIP'
- '4b08d92164ee25f2a680700e426f6cd5'
- '6a74094caead06597a356c864c8872bc'
- 'eb14dcfd80c00852ef81ded6e826826a'
- '92562f0a5d8cc0e5972ab58523dbe0a4')
+sha256sums=('SKIP'
+ '3fb70bb34f132e0849be975592f98371160f53b9c2c457ed4468e88fdba8c0ed'
+ '09c489756410cdd9e014a5504ee7c0508401d445a050c1911b8c0667349e1451'
+ '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
+ 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
+ '567bdc00dbecae3e03c4d5306c8156d4a76485925404cf0c30f15f2c3661d32f')
_kernelname=${pkgbase#linux}
@@ -111,21 +114,17 @@ _package() {
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
# 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}"
# 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"
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
@@ -145,7 +144,7 @@ _package() {
mv "${pkgdir}/lib" "${pkgdir}/usr/"
# add vmlinux
- install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
+ install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
}
_package-headers() {
diff --git a/linux.install b/linux.install
index ef42413835ac..046277584140 100644
--- a/linux.install
+++ b/linux.install
@@ -1,15 +1,7 @@
-# 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}
- echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
- mkinitcpio -p linux${KERNEL_NAME}
+ depmod %KERNVER%
}
post_upgrade() {
@@ -19,9 +11,7 @@ post_upgrade() {
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
- depmod ${KERNEL_VERSION}
- echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
- mkinitcpio -p linux${KERNEL_NAME}
+ depmod %KERNVER%
if [ $(vercmp $2 3.13) -lt 0 ]; then
echo ">>> WARNING: AT keyboard support is no longer built into the kernel."
@@ -32,6 +22,6 @@ post_upgrade() {
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.preset b/linux.preset
index b06292d104ef..66709a8c1537 100644
--- a/linux.preset
+++ b/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"