further updates to move to /usr/lib, lvm2 & cryptsetup, removed from /lib/initcpio

This commit is contained in:
abveritas 2012-06-09 00:12:42 +00:00
parent 7a5d604b7b
commit 920e15cb90
5 changed files with 98 additions and 90 deletions

View File

@ -1,12 +1,10 @@
#
# Core Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# 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
}

View File

@ -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<<HELPEOF
This hook allows for an encrypted root device.
help() {
cat <<HELPEOF
This hook allows for an encrypted root device. Users should specify the device
to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
where 'device' is the path to the raw device, and 'dmname' is the name given to
the device after unlocking, and will be available as /dev/mapper/dmname.
For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
the kernel cmdline, where 'device' represents the raw block device where the key
exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
the absolute path of the keyfile within the device.
Without specifying a keyfile, you will be prompted for the password at runtime.
This means you must have a keyboard available to input it, and you may need
the keymap hook as well to ensure that the keyboard is using the layout you
expect.
HELPEOF
}

View File

@ -1,10 +1,11 @@
# $Id$
# Maintainer: Eric Bélanger <eric@archlinux.org>
# Maintainer: Thomas Bächler <thomas@archlinux.org>
#
# 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"
}

View File

@ -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
}

View File

@ -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<<HELPEOF
This hook loads the necessary modules for an LVM2 root device.
help() {
cat <<HELPEOF
This hook loads the necessary modules for an LVM2 root device.
The optional lvmwait= parameter followed by a comma-separated
list of device names can be given on the command line.
It will cause the hook to wait until all given devices exist
before trying to scan and activate any volume groups.
The optional lvmwait= parameter followed by a comma-separated
list of device names can be given on the command line.
It will cause the hook to wait until all given devices exist
before trying to scan and activate any volume groups.
HELPEOF
}