[arch-commits] Commit in cryptsetup/trunk (PKGBUILD sd-encrypt)

Thomas Bächler thomas at nymeria.archlinux.org
Sun Sep 29 00:43:41 UTC 2013


    Date: Sunday, September 29, 2013 @ 02:43:41
  Author: thomas
Revision: 195243

upgpkg: cryptsetup 1.6.2-2 - add sd-encrypt hook

Added:
  cryptsetup/trunk/sd-encrypt
Modified:
  cryptsetup/trunk/PKGBUILD

------------+
 PKGBUILD   |    9 ++++++---
 sd-encrypt |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-09-28 23:11:01 UTC (rev 195242)
+++ PKGBUILD	2013-09-29 00:43:41 UTC (rev 195243)
@@ -2,7 +2,7 @@
 # Maintainer: Thomas Bächler <thomas at archlinux.org>
 pkgname=cryptsetup
 pkgver=1.6.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Userspace setup tool for transparent encryption of block devices using dm-crypt"
 arch=(i686 x86_64)
 license=('GPL')
@@ -13,11 +13,13 @@
 source=(http://cryptsetup.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2
         http://cryptsetup.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2.asc
         encrypt_hook
-        encrypt_install)
+        encrypt_install
+        sd-encrypt)
 md5sums=('cd834da49fbe92dd66df02cc5c61280f'
          'SKIP'
          'c279d86d6dc18322c054d2272ebb9e90'
-         '21c45f9cab3e0b5165f68358884fbd0f')
+         '21c45f9cab3e0b5165f68358884fbd0f'
+         '6cf7e170ecd13e42fe829209628fdb4d')
 
 build() {
   cd "${srcdir}"/$pkgname-${pkgver}
@@ -31,6 +33,7 @@
   # install hook
   install -D -m644 "${srcdir}"/encrypt_hook "${pkgdir}"/usr/lib/initcpio/hooks/encrypt
   install -D -m644 "${srcdir}"/encrypt_install "${pkgdir}"/usr/lib/initcpio/install/encrypt
+  install -D -m644 "${srcdir}"/sd-encrypt "${pkgdir}"/usr/lib/initcpio/install/sd-encrypt
 
   # usrmove
   cd "$pkgdir"/usr

Added: sd-encrypt
===================================================================
--- sd-encrypt	                        (rev 0)
+++ sd-encrypt	2013-09-29 00:43:41 UTC (rev 195243)
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+build() {
+    local mod
+
+    add_module dm-crypt
+    if [[ $CRYPTO_MODULES ]]; then
+        for mod in $CRYPTO_MODULES; do
+            add_module "$mod"
+        done
+    else
+        add_all_modules '/crypto/'
+    fi
+
+    add_binary "dmsetup"
+    add_file "/usr/lib/udev/rules.d/10-dm.rules"
+    add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+    add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+    add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+
+    add_systemd_unit cryptsetup.target
+    add_binary /usr/lib/systemd/system-generators/systemd-cryptsetup-generator
+    add_binary /usr/lib/systemd/systemd-cryptsetup
+
+    add_systemd_unit systemd-ask-password-console.path
+    add_systemd_unit systemd-ask-password-console.service
+
+    [[ -f /etc/crypttab.initramfs ]] && add_file /etc/crypttab.initramfs /etc/crypttab
+}
+
+help() {
+    cat <<HELPEOF
+This hook allows for an encrypted root device with systemd initramfs.
+
+See the manpage of systemd-cryptsetup-generator(8) for available kernel
+command line options. Alternatively, if the file /etc/crypttab.initramfs
+exists, it will be added to the initramfs as /etc/crypttab. See the
+crypttab(5) manpage for more information on crypttab syntax.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:




More information about the arch-commits mailing list