[arch-commits] Commit in mkinitcpio/repos (4 files)
Dave Reisner
dreisner at nymeria.archlinux.org
Sun Dec 22 19:38:00 UTC 2013
Date: Sunday, December 22, 2013 @ 20:38:00
Author: dreisner
Revision: 202623
archrelease: copy trunk to testing-any
Added:
mkinitcpio/repos/testing-any/
mkinitcpio/repos/testing-any/0001-Add-l-flag-when-using-lz4-compression.patch
(from rev 202622, mkinitcpio/trunk/0001-Add-l-flag-when-using-lz4-compression.patch)
mkinitcpio/repos/testing-any/PKGBUILD
(from rev 202622, mkinitcpio/trunk/PKGBUILD)
mkinitcpio/repos/testing-any/mkinitcpio.install
(from rev 202622, mkinitcpio/trunk/mkinitcpio.install)
--------------------------------------------------+
0001-Add-l-flag-when-using-lz4-compression.patch | 61 +++++++++++++++++++++
PKGBUILD | 33 +++++++++++
mkinitcpio.install | 15 +++++
3 files changed, 109 insertions(+)
Copied: mkinitcpio/repos/testing-any/0001-Add-l-flag-when-using-lz4-compression.patch (from rev 202622, mkinitcpio/trunk/0001-Add-l-flag-when-using-lz4-compression.patch)
===================================================================
--- testing-any/0001-Add-l-flag-when-using-lz4-compression.patch (rev 0)
+++ testing-any/0001-Add-l-flag-when-using-lz4-compression.patch 2013-12-22 19:38:00 UTC (rev 202623)
@@ -0,0 +1,61 @@
+From 2ce3a416c8714adedc3117e5247e6da364ddebc9 Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner at archlinux.org>
+Date: Sun, 22 Dec 2013 14:11:37 -0500
+Subject: [mkinitcpio] [PATCH] Add -l flag when using lz4 compression
+
+This isn't documented, but it's needed since the kernel lz4 support is
+based on the original streaming format and not the newer default. Use
+-l to force the legacy codec.
+
+Fixup lsinitcpio to support the older format, and, add a warning when
+the newer format is detected. Who knows when this will be "resolved" ...
+
+Upstream discussion: https://code.google.com/p/lz4/issues/detail?id=102
+---
+ lsinitcpio | 15 +++++++++++----
+ mkinitcpio | 3 +++
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/lsinitcpio b/lsinitcpio
+index 10cd663..9d98d57 100755
+--- a/lsinitcpio
++++ b/lsinitcpio
+@@ -91,10 +91,17 @@ detect_filetype() {
+ return
+ fi
+
+- if [[ $(hexdump -n 4 -e '"%x"' "$1") == '184d2204' ]]; then
+- echo 'lz4'
+- return
+- fi
++ case $(hexdump -n 4 -e '"%x"' "$1") in
++ 184d2204)
++ error 'Newer lz4 stream format detected! This may not boot!'
++ echo 'lz4'
++ return
++ ;;
++ 184c2102)
++ echo 'lz4 -l'
++ return
++ ;;
++ esac
+
+ if [[ $(hexdump -n 3 -e '"%c"' "$1") == 'BZh' ]]; then
+ echo 'bzip2'
+diff --git a/mkinitcpio b/mkinitcpio
+index cb94d62..42abde7 100755
+--- a/mkinitcpio
++++ b/mkinitcpio
+@@ -202,6 +202,9 @@ build_image() {
+ xz)
+ COMPRESSION_OPTIONS+=' --check=crc32'
+ ;;
++ lz4)
++ COMPRESSION_OPTIONS+=' -l'
++ ;;
+ esac
+
+ cpio_opts=('-0' '-o' '-H' 'newc')
+--
+1.8.5.2
+
Copied: mkinitcpio/repos/testing-any/PKGBUILD (from rev 202622, mkinitcpio/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD (rev 0)
+++ testing-any/PKGBUILD 2013-12-22 19:38:00 UTC (rev 202623)
@@ -0,0 +1,33 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=mkinitcpio
+pkgver=16
+pkgrel=2
+pkgdesc="Modular initramfs image creation utility"
+arch=('any')
+url="https://projects.archlinux.org/mkinitcpio.git/"
+license=('GPL')
+depends=('awk' 'mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.23' 'libarchive'
+ 'coreutils' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'gzip' 'systemd')
+optdepends=('xz: Use lzma or xz compression for the initramfs image'
+ 'bzip2: Use bzip2 compression for the initramfs image'
+ 'lzop: Use lzo compression for the initramfs image'
+ 'lz4: Use lz4 compression for the initramfs image'
+ 'mkinitcpio-nfs-utils: Support for root filesystem on NFS')
+backup=('etc/mkinitcpio.conf')
+source=("ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
+ 0001-Add-l-flag-when-using-lz4-compression.patch)
+install=mkinitcpio.install
+sha256sums=('10821e533eb1ca51a9d3c1d06d8999c08a6151910a9a6029a45ff1638e9228a2'
+ 'SKIP'
+ 'e8dd2d3fb29e6c41bed53be2f8659a7e5daeae3c9495d8527b6b938787c54703')
+
+prepare() {
+ patch -d "$pkgname-$pkgver" -Np1 <"$srcdir/0001-Add-l-flag-when-using-lz4-compression.patch"
+}
+
+package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+}
Copied: mkinitcpio/repos/testing-any/mkinitcpio.install (from rev 202622, mkinitcpio/trunk/mkinitcpio.install)
===================================================================
--- testing-any/mkinitcpio.install (rev 0)
+++ testing-any/mkinitcpio.install 2013-12-22 19:38:00 UTC (rev 202623)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+post_upgrade() {
+ if [ "$(vercmp 0.9.0 "$2")" -eq 1 ]; then
+ printf '==> If your /usr is on a separate partition, you must add the "usr" hook\n'
+ printf ' to /etc/mkinitcpio.conf and regenerate your images before rebooting\n'
+ fi
+
+ if [ "$(vercmp 0.12.0 "$2")" -eq 1 ]; then
+ printf '==> The "block" hook has replaced several hooks:\n'
+ printf ' fw, sata, pata, scsi, virtio, mmc, usb\n'
+ printf ' Replace any and all of these in /etc/mkinitcpio.conf with a single\n'
+ printf ' instance of the "block" hook\n'
+ fi
+}
More information about the arch-commits
mailing list