[arch-commits] Commit in linux/trunk (PKGBUILD linux.install)
Thomas Bächler
thomas at archlinux.org
Sat Aug 6 14:50:30 UTC 2011
Date: Saturday, August 6, 2011 @ 10:50:29
Author: thomas
Revision: 134618
linux: Update to 3.0.1 and fix compat symlinks (kernel26 upgrade path)
Modified:
linux/trunk/PKGBUILD
linux/trunk/linux.install
---------------+
PKGBUILD | 11 +++++------
linux.install | 16 ++++++++++++----
2 files changed, 17 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-08-06 13:05:40 UTC (rev 134617)
+++ PKGBUILD 2011-08-06 14:50:29 UTC (rev 134618)
@@ -7,15 +7,15 @@
# pkgname=linux-custom # Build kernel with a different name
_kernelname=${pkgname#linux}
_basekernel=3.0
-pkgver=${_basekernel}
-pkgrel=2
+pkgver=${_basekernel}.1
+pkgrel=1
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
options=('!strip')
source=("ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-${_basekernel}.tar.bz2"
- #"ftp://ftp.kernel.org/pub/linux/kernel/v3.0/patch-${pkgver}.bz2"
+ "ftp://ftp.kernel.org/pub/linux/kernel/v3.0/patch-${pkgver}.bz2"
# the main kernel config files
'config' 'config.x86_64'
# standard config files for mkinitcpio ramdisk
@@ -23,6 +23,7 @@
'fix-i915.patch'
'change-default-console-loglevel.patch')
md5sums=('398e95866794def22b12dfbc15ce89c0'
+ 'ac49f7907f1fc85fbab92d0f1aa1552a'
'fc6aae0fb4d70feff92ec762d29dee45'
'fd5a1712ddea696eee5255de2d854218'
'eb14dcfd80c00852ef81ded6e826826a'
@@ -32,7 +33,7 @@
build() {
cd "${srcdir}/linux-${_basekernel}"
- #patch -p1 -i "${srcdir}/patch-${pkgver}"
+ patch -p1 -i "${srcdir}/patch-${pkgver}"
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
@@ -125,8 +126,6 @@
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
- # add compat symlink for the kernel image
- ln -sf vmlinuz-${pkgname} "${pkgdir}/boot/vmlinuz26${_kernelname}"
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
# gzip -9 all modules to safe 100MB of space
Modified: linux.install
===================================================================
--- linux.install 2011-08-06 13:05:40 UTC (rev 134617)
+++ linux.install 2011-08-06 14:50:29 UTC (rev 134618)
@@ -11,10 +11,18 @@
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
mkinitcpio -p linux${KERNEL_NAME}
- # add compat symlinks for the initramfs images
- ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
- ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
- boot/kernel26${KERNEL_NAME}-fallback.img
+ # compat symlinks for the official kernels only
+ if [ -z "${KERNEL_NAME}" -o "${KERNEL_NAME}" = "-lts" ]; then
+ loaders="$(find /boot -name syslinux.cfg -or -name extlinux.conf -or -name grub.cfg -or -name menu.lst)"
+ [ -f /etc/lilo.conf ] && loaders="$loaders /etc/lilo.conf"
+ if [ -n "${loaders}" ] && grep -q -e vmlinuz26 -e kernel26.img -e kernel26-fallback.img $loaders; then
+ # add compat symlinks for the initramfs images
+ ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
+ ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
+ boot/kernel26${KERNEL_NAME}-fallback.img
+ ln -sf vmlinuz-linux${KERNEL_NAME} /boot/vmlinuz26${KERNEL_NAME}
+ fi
+ fi
}
post_upgrade() {
More information about the arch-commits
mailing list