From 920e15cb90bd4ea83ff8e005fd4be9f4be952e0a Mon Sep 17 00:00:00 2001 From: abveritas Date: Sat, 9 Jun 2012 00:12:42 +0000 Subject: [PATCH] further updates to move to /usr/lib, lvm2 & cryptsetup, removed from /lib/initcpio --- cryptsetup/PKGBUILD | 21 ++++++--------- cryptsetup/encrypt_install | 54 ++++++++++++++++++++++++-------------- lvm2/PKGBUILD | 34 +++++++++++------------- lvm2/lvm2_hook | 38 +++++++++++++-------------- lvm2/lvm2_install | 41 +++++++++++++++-------------- 5 files changed, 98 insertions(+), 90 deletions(-) diff --git a/cryptsetup/PKGBUILD b/cryptsetup/PKGBUILD index 033f2cc09..35d66ecac 100644 --- a/cryptsetup/PKGBUILD +++ b/cryptsetup/PKGBUILD @@ -1,12 +1,10 @@ # # Core Packages for Chakra, part of chakra-project.org # -# maintainer (i686): Phil Miller -# maintainer (x86_64): Manuel Tortosa - +# maintainer abveritas@chakra-project.org pkgname=cryptsetup -pkgver=1.4.1 +pkgver=1.4.2 pkgrel=1 pkgdesc="Userspace setup tool for transparent encryption of block devices using the Linux 2.6 cryptoapi" arch=(i686 x86_64) @@ -20,13 +18,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) -sha256sums=('82b143328c2b427ef2b89fb76c701d311c95b54093c21bbf22342f7b393bddcb' - '71c6506d4b6d0b22b9b6c2a68e604959e4c072af04680ed6acc0126c97bdbc88' +sha256sums=('1fe80d7b19d24b3f65d2e446decfed859e2c4d17fdf7c19289d82dc7cd60dfe7' + '4e6dbece8d1baad861479aca70d0cf30887420da9b5eab45d65d064c656893ed' '811bbea1337106ad811731c746d73ee81039bad00aef52398e3a377ad0766757' - 'd4380195351b70abf8fcb3cd19461879c55a7a07e4915d1f0365b295b112a573') + 'aa02e35420e015b9c6a44d0fb4378aaaba3b87edf68cb6cf4b038a9a1467a498') build() { cd "${srcdir}"/$pkgname-${pkgver} - ./configure --prefix=/usr --disable-static --sbindir=/sbin --libdir=/lib + ./configure --prefix=/usr --disable-static make } @@ -34,10 +32,7 @@ package() { cd "${srcdir}"/$pkgname-${pkgver} make DESTDIR="${pkgdir}" install # install hook - install -D -m644 "${srcdir}"/encrypt_hook "${pkgdir}"/lib/initcpio/hooks/encrypt - install -D -m644 "${srcdir}"/encrypt_install "${pkgdir}"/lib/initcpio/install/encrypt - # Fix pkgconfig location - install -d -m755 "${pkgdir}"/usr/lib - mv "${pkgdir}"/lib/pkgconfig "${pkgdir}"/usr/lib/ + install -D -m644 "${srcdir}"/encrypt_hook "${pkgdir}"/usr/lib/initcpio/hooks/encrypt + install -D -m644 "${srcdir}"/encrypt_install "${pkgdir}"/usr/lib/initcpio/install/encrypt } diff --git a/cryptsetup/encrypt_install b/cryptsetup/encrypt_install index 13174ec06..b8a602b21 100644 --- a/cryptsetup/encrypt_install +++ b/cryptsetup/encrypt_install @@ -1,26 +1,42 @@ -# vim: set ft=sh: +#!/bin/bash -build() -{ - if [ -z "${CRYPTO_MODULES}" ]; then - MODULES=" dm-crypt $(all_modules "/crypto/") " +build() { + local mod + + add_module dm-crypt + if [[ $CRYPTO_MODULES ]]; then + for mod in $CRYPTO_MODULES; do + add_module "$mod" + done else - MODULES=" dm-crypt ${CRYPTO_MODULES} " + add_all_modules '/crypto/' fi - FILES="" - SCRIPT="encrypt" - [ -f "/sbin/cryptsetup" ] && add_binary "/sbin/cryptsetup" "/sbin/cryptsetup" - [ -f "/usr/sbin/cryptsetup" ] && add_binary "/usr/sbin/cryptsetup" "/sbin/cryptsetup" - add_binary "/sbin/dmsetup" - add_file "/lib/udev/rules.d/10-dm.rules" - add_file "/lib/udev/rules.d/13-dm-disk.rules" - add_file "/lib/udev/rules.d/95-dm-notify.rules" - add_file "/lib/initcpio/udev/11-dm-initramfs.rules" "/lib/udev/rules.d/11-dm-initramfs.rules" + + add_binary "cryptsetup" + 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_runscript } -help () -{ -cat< -# Maintainer: Thomas Bächler +# +# Core Packages for Chakra, part of chakra-project.org +# +# maintainer abveritas@chakra-project.org pkgbase=lvm2 pkgname=('lvm2' 'device-mapper') -pkgver=2.02.87 +pkgver=2.02.95 pkgrel=1 arch=('i686' 'x86_64') url="http://sourceware.org/lvm2/" @@ -14,23 +15,20 @@ source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${pkgver}.tgz lvm2_install lvm2_hook 11-dm-initramfs.rules) -md5sums=('4c36c7f216edfe65a6193d2adc389ecd' - 'dcb82506d732cc7b10159a89b579dba8' - '8d613b84a175cd85f752a75198e40e15' +md5sums=('bd470a802046c807603618a443732ea7' + 'd2a2376dd247ae15044dbc5f28479b23' + '14b42c38324160d79b63743b62cb45c4' '69e40679cd8b3658bfc619e48baae125') -sha1sums=('4b217d405133bdc6120568253574a49fae2caa4f' - '7f108b2f2056eb050fc898bf5190ecf9145aed8a' - 'a0e0513c2efb183006e57e595d93ce18be297928' - 'f6a554eea9557c3c236df2943bb6e7e723945c41') build() { cd "${srcdir}/LVM2.${pkgver}" - sed -i 's|/usr/bin/tr|/bin/tr|' scripts/lvmdump.sh + unset LDFLAGS - ./configure --prefix= --sysconfdir=/etc --localstatedir=/var --datarootdir=/usr/share \ - --includedir=/usr/include --with-usrlibdir=/usr/lib \ + + ./configure --prefix=/ --sysconfdir=/etc --localstatedir=/var --datarootdir=/usr/share \ + --includedir=/usr/include --with-usrlibdir=/usr/lib --libdir=/usr/lib --with-udev-prefix=/usr \ --enable-pkgconfig --enable-readline --enable-dmeventd --enable-cmdlib --enable-applib \ - --with-udevdir=/lib/udev/rules.d/ --enable-udev_sync --enable-udev_rules + --enable-udev_sync --enable-udev_rules make } @@ -42,7 +40,7 @@ package_device-mapper() { cd "${srcdir}/LVM2.${pkgver}" make DESTDIR="${pkgdir}" install_device-mapper # extra udev rule for device-mapper in initramfs - install -D -m644 "${srcdir}/11-dm-initramfs.rules" "${pkgdir}/lib/initcpio/udev/11-dm-initramfs.rules" + install -D -m644 "${srcdir}/11-dm-initramfs.rules" "${pkgdir}/usr/lib/initcpio/udev/11-dm-initramfs.rules" } package_lvm2() { @@ -59,6 +57,6 @@ package_lvm2() { # /etc directories install -d "${pkgdir}"/etc/lvm/{archive,backup} # mkinitcpio hook - install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/lib/initcpio/hooks/lvm2" - install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/lib/initcpio/install/lvm2" + install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/usr/lib/initcpio/hooks/lvm2" + install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/usr/lib/initcpio/install/lvm2" } diff --git a/lvm2/lvm2_hook b/lvm2/lvm2_hook index 874b91d06..1af530641 100644 --- a/lvm2/lvm2_hook +++ b/lvm2/lvm2_hook @@ -1,25 +1,23 @@ -# vim:set ft=sh: -run_hook () -{ - /sbin/modprobe -q dm-mod >/dev/null 2>&1 - if [ -e "/sys/class/misc/device-mapper" ]; then - if [ ! -e "/dev/mapper/control" ]; then - mkdir /dev/mapper - mknod "/dev/mapper/control" c $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |') - fi +#!/usr/bin/ash - # If the lvmwait= parameter has been specified on the command line - # wait for the device(s) before trying to activate the volume group(s) - if [ -n "${lvmwait}" ]; then - for pvdev in $(echo ${lvmwait} | sed 's|,| |g'); do - poll_device ${pvdev} ${rootdelay} - done - fi +run_hook() { + local pvdev - [ "${quiet}" = "y" ] && LVMQUIET=">/dev/null" + modprobe -q dm-mod >/dev/null 2>&1 - msg "Activating logical volumes..." - [ -d /etc/lvm ] && /sbin/lvm vgscan --sysinit - eval /sbin/lvm vgchange --sysinit -a y $LVMQUIET + # If the lvmwait= parameter has been specified on the command line + # wait for the device(s) before trying to activate the volume group(s) + for pvdev in ${lvmwait//,/ }; do + poll_device ${pvdev} ${rootdelay} + done + + msg "Activating logical volumes..." + [ -d /etc/lvm ] && lvm vgscan + + if [ -n "$quiet" ]; then + lvm vgchange --sysinit -a y >/dev/null + else + lvm vgchange --sysinit -a y fi } + diff --git a/lvm2/lvm2_install b/lvm2/lvm2_install index 94175b523..7d22b002c 100644 --- a/lvm2/lvm2_install +++ b/lvm2/lvm2_install @@ -1,29 +1,30 @@ -# vim: set ft=sh: +#!/bin/bash -build() -{ - MODULES=" dm-mod dm-snapshot dm-mirror" - BINARIES="" - FILES="" - SCRIPT="lvm2" +build() { + local mod + for mod in dm-mod dm-snapshot dm-mirror; do + add_module "$mod" + done add_binary "/sbin/lvm" add_binary "/sbin/dmsetup" - add_file "/lib/udev/rules.d/10-dm.rules" - add_file "/lib/udev/rules.d/13-dm-disk.rules" - add_file "/lib/udev/rules.d/95-dm-notify.rules" - add_file "/lib/udev/rules.d/11-dm-lvm.rules" - add_file "/lib/initcpio/udev/11-dm-initramfs.rules" "/lib/udev/rules.d/11-dm-initramfs.rules" + 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/udev/rules.d/11-dm-lvm.rules" + add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules" + + add_runscript } -help () -{ -cat<