lvm2: install lvmetad; add systemd services from dmeventd, lvmetad and lvm on crypt (via Arch).
This commit is contained in:
parent
0c5e30c021
commit
58f46b6bf6
12 changed files with 112 additions and 26 deletions
|
@ -2,10 +2,7 @@
|
|||
#
|
||||
noarch=yes
|
||||
depends="readline-devel ncurses-devel device-mapper-${version}_${revision}"
|
||||
short_desc="${sourcepkg} development files"
|
||||
long_desc="
|
||||
This package contains the development files for the kernel device-mapper
|
||||
library, libdevmapper."
|
||||
short_desc="Device Mapper userspace library -- development files"
|
||||
|
||||
do_install() {
|
||||
vmove usr/include usr
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
# Template file for 'device-mapper'
|
||||
#
|
||||
short_desc="Device Mapper userspace library and tools"
|
||||
long_desc="
|
||||
This package contains the supporting userspace utility, dmsetup,
|
||||
for the kernel device-mapper and its required library, libdevmapper."
|
||||
|
||||
replaces="lvm2<2.02.95_3"
|
||||
|
||||
do_install() {
|
||||
|
@ -16,4 +12,9 @@ do_install() {
|
|||
for f in 10-dm 13-dm-disk 95-dm-notify; do
|
||||
vmove usr/lib/udev/rules.d/${f}.rules usr/lib/udev/rules.d
|
||||
done
|
||||
vmkdir usr/lib/systemd/system/sockets.target.wants
|
||||
vinstall ${FILESDIR}/dmeventd.service 644 usr/lib/systemd/system
|
||||
vinstall ${FILESDIR}/dmeventd.socket 644 usr/lib/systemd/system
|
||||
ln -sf /usr/lib/systemd/system/dmeventd.socket \
|
||||
${DESTDIR}/usr/lib/systemd/system/sockets.target.wants/dmeventd.socket
|
||||
}
|
||||
|
|
14
srcpkgs/lvm2/files/dmeventd.service
Normal file
14
srcpkgs/lvm2/files/dmeventd.service
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=Device-mapper event daemon
|
||||
Documentation=man:dmeventd(8)
|
||||
Requires=dmeventd.socket
|
||||
After=dmeventd.socket
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/dmeventd
|
||||
ExecReload=/usr/sbin/dmeventd -R
|
||||
Environment=SD_ACTIVATION=1
|
||||
PIDFile=/run/dmeventd.pid
|
||||
OOMScoreAdjust=-1000
|
11
srcpkgs/lvm2/files/dmeventd.socket
Normal file
11
srcpkgs/lvm2/files/dmeventd.socket
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Device-mapper event daemon FIFOs
|
||||
Documentation=man:dmeventd(8)
|
||||
Before=sockets.target
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
|
||||
[Socket]
|
||||
ListenFIFO=/run/dmeventd-server
|
||||
ListenFIFO=/run/dmeventd-client
|
||||
SocketMode=0600
|
18
srcpkgs/lvm2/files/lvm-monitoring.service
Normal file
18
srcpkgs/lvm2/files/lvm-monitoring.service
Normal file
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
|
||||
Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
|
||||
Requires=dmeventd.socket
|
||||
After=dmeventd.socket lvmetad.socket lvmetad.service dmeventd.service
|
||||
Before=local-fs-pre.target
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
|
||||
ExecStart=/usr/sbin/lvm vgchange --monitor y
|
||||
ExecStop=/usr/sbin/lvm vgchange --monitor n
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
16
srcpkgs/lvm2/files/lvm-on-crypt.service
Normal file
16
srcpkgs/lvm2/files/lvm-on-crypt.service
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=LVM activation of encrypted devices
|
||||
DefaultDependencies=no
|
||||
Requires=systemd-udev-settle.service
|
||||
After=systemd-udev-settle.service cryptsetup.target
|
||||
Before=shutdown.target
|
||||
Conflicts=shutdown.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/sbin/vgchange --sysinit --available y
|
||||
Type=oneshot
|
||||
TimeoutSec=0
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
2
srcpkgs/lvm2/files/lvm2.tmpfiles
Normal file
2
srcpkgs/lvm2/files/lvm2.tmpfiles
Normal file
|
@ -0,0 +1,2 @@
|
|||
d /run/lock/lvm 0755 root root -
|
||||
d /run/lvm 0755 root root -
|
16
srcpkgs/lvm2/files/lvmetad.service
Normal file
16
srcpkgs/lvm2/files/lvmetad.service
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=LVM2 metadata daemon
|
||||
Documentation=man:lvmetad(8)
|
||||
Requires=lvmetad.socket
|
||||
After=lvmetad.socket
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
NonBlocking=true
|
||||
ExecStart=/usr/sbin/lvmetad
|
||||
ExecReload=/usr/sbin/lvmetad -R
|
||||
Environment=SD_ACTIVATION=1
|
||||
Restart=on-abort
|
||||
PIDFile=/run/lvmetad.pid
|
10
srcpkgs/lvm2/files/lvmetad.socket
Normal file
10
srcpkgs/lvm2/files/lvmetad.socket
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=LVM2 metadata daemon socket
|
||||
Documentation=man:lvmetad(8)
|
||||
Before=sockets.target systemd-udev-trigger.service
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/lvm/lvmetad.socket
|
||||
SocketMode=0600
|
|
@ -4,9 +4,6 @@ noarch=yes
|
|||
depends="device-mapper-devel-${version}_${revision}
|
||||
liblvm2app-${version}_${revision}"
|
||||
short_desc="LVM2 application library - development files"
|
||||
long_desc="
|
||||
This package contains files needed to develop applications that use the
|
||||
lvm2app library."
|
||||
|
||||
do_install() {
|
||||
vmove usr/include/lvm2app.h usr/include
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
# Template file for 'liblvm2app'
|
||||
#
|
||||
short_desc="LVM2 application library"
|
||||
long_desc="
|
||||
This package contains the lvm2app shared library. It allows easier access
|
||||
to the basic LVM objects and provides functions to enumerate, create or
|
||||
modify them."
|
||||
|
||||
|
||||
do_install() {
|
||||
vmove "usr/lib/liblvm2app.so*" usr/lib
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
# Template file for 'lvm2'
|
||||
pkgname=lvm2
|
||||
version=2.02.98
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc=LVM2.${version}
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-selinux --enable-readline --enable-pkgconfig
|
||||
--enable-fsadm --enable-applib --sbindir=/usr/sbin --libdir=/usr/lib
|
||||
--enable-dmeventd --enable-cmdlib --enable-udev_sync --enable-udev_rules
|
||||
--with-udevdir=/usr/lib/udev/rules.d"
|
||||
makedepends="pkg-config readline-devel libudev-devel>=183"
|
||||
--with-udevdir=/usr/lib/udev/rules.d
|
||||
--with-systemdsystemunitdir=/usr/lib/systemd/system --with-default-pid-dir=/run
|
||||
--with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm
|
||||
--with-default-locking-dir=/run/lock/lvm --enable-lvmetad"
|
||||
makedepends="pkg-config readline-devel libudev-devel>=183 systemd-devel"
|
||||
subpackages="liblvm2app liblvm2app-devel device-mapper device-mapper-devel"
|
||||
conf_files="/etc/lvm/lvm.conf"
|
||||
short_desc="Logical Volume Manager 2 utilities"
|
||||
|
@ -17,14 +20,20 @@ homepage="http://sourceware.org/lvm2/"
|
|||
license="GPL-2, LGPL-2.1"
|
||||
distfiles="ftp://sources.redhat.com/pub/lvm2/LVM2.${version}.tgz"
|
||||
checksum=71030a58fef7e00d82ca4144334548e46aad24551a3cfbe7c3059b1bd137d864
|
||||
long_desc="
|
||||
LVM2 includes all of the support for handling read/write operations on
|
||||
physical volumes (hard disks, RAID-Systems, magneto optical, etc.,
|
||||
multiple devices (MD), see mdadd(8) or even loop devices, see
|
||||
losetup(8)), creating volume groups (kind of virtual disks) from one
|
||||
or more physical volumes and creating one or more logical volumes
|
||||
(kind of logical partitions) in volume groups."
|
||||
|
||||
make_dirs="
|
||||
/etc/lvm/archive 0755 root root
|
||||
/etc/lvm/backup 0755 root root"
|
||||
|
||||
post_install() {
|
||||
vinstall ${FILESDIR}/lvm2.tmpfiles 644 usr/lib/tmpfiles.d lvm2.conf
|
||||
vinstall ${FILESDIR}/lvm-monitoring.service 644 usr/lib/systemd/system
|
||||
vinstall ${FILESDIR}/lvmetad.service 644 usr/lib/systemd/system
|
||||
vinstall ${FILESDIR}/lvmetad.socket 644 usr/lib/systemd/system
|
||||
vinstall ${FILESDIR}/lvm-on-crypt.service 644 usr/lib/systemd/system
|
||||
vmkdir usr/lib/systemd/system/sockets.target.wants
|
||||
ln -sf /usr/lib/systemd/system/lvmetad.socket \
|
||||
${DESTDIR}/usr/lib/systemd/system/sockets.target.wants/lvmetad.socket
|
||||
# enable lvmetad
|
||||
sed 's|use_lvmetad = 0|use_lvmetad = 1|' -i ${DESTDIR}/etc/lvm/lvm.conf
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue