Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=dex77testing.git;a=commitdiff;h=c9635dc19ceef2c826e258ab2c8af1ad756c5c7f

commit c9635dc19ceef2c826e258ab2c8af1ad756c5c7f
Author: James Buren <[email protected]>
Date:   Sun May 4 06:22:03 2014 -0500

lvm2-2.02.105-1-x86_64
* version bump
* enable lvmetad and dmeventd
* include upstream systemd services
* disable lvm.service on upgrade (our old service)

diff --git a/source/base/lvm2/FrugalBuild b/source/base/lvm2/FrugalBuild
index 37056ad..4f48225 100644
--- a/source/base/lvm2/FrugalBuild
+++ b/source/base/lvm2/FrugalBuild
@@ -3,8 +3,8 @@
# Contributor: Miklos Vajna <[email protected]>

pkgname=lvm2
-pkgver=2.02.98
-pkgrel=3
+pkgver=2.02.105
+pkgrel=1
pkgdesc="Logical Volume Manager 2 utilities"
url="http://sources.redhat.com/lvm2/";
rodepends=("$pkgname-libs")
@@ -12,10 +12,11 @@ depends=('systemd>=188' 'readline>=6.2')
backup=(etc/lvm/lvm.conf)
groups=('base')
archs=('i686' 'x86_64' 'arm')
-up2date="lynx -dump ftp://sources.redhat.com/pub/lvm2/|grep tgz$|sed -n 
's/.*LVM2\.\(.*\)\.tgz/\1/;$ p'"
+up2date="Fwcat ftp://sources.redhat.com/pub/lvm2/ | sed -r -n 
's:.*>LVM2\.([0-9]+\.[0-9]+\.[0-9]+)\.tgz.*:\1:p' | Fsort | tail -n1"
source=(ftp://sources.redhat.com/pub/lvm2/LVM2.$pkgver.tgz lvm.service 
README.Frugalware)
signatures=($source.asc '' '')
-_F_systemd_units=(lvm=e)
+_F_systemd_scriptlet=lvm2.install
+_F_systemd_units=(lvm=)
Finclude systemd

# Needed to avoid recursive depends between this and systemd.
@@ -29,11 +30,12 @@ build()
{
Fcd LVM2.$pkgver
Fmake --enable-applib --enable-cmdlib --enable-pkgconfig 
--with-udevdir=/lib/udev/rules.d \
-               --enable-udev_sync --exec-prefix=""
+               --enable-udev_sync --enable-udev_rules --enable-lvmetad 
--enable-dmeventd \
+               --with-systemdsystemunitdir=/lib/systemd/system --exec-prefix=""
make device-mapper || return 1
make DESTDIR=$Fdestdir sbindir="$Fdestdir/sbin" \
confdir="$Fdestdir/etc/lvm" libdir="$Fdestdir/lib" \
-               install install_device-mapper
+               install install_device-mapper install_systemd_units || Fdie
Ffile /lib/systemd/system/lvm.service
Fmkdir /etc/systemd/system/sysinit.target.wants
Fdoc README.Frugalware
@@ -41,11 +43,14 @@ build()
Fsplit $pkgname-libs lib/libdevmapper.*
Fsplit $pkgname-libs lib/liblvm2app.*
Fsplit $pkgname-libs lib/liblvm2cmd.*
+       Fsplit $pkgname-libs {,usr/}lib/libdevmapper-event.*
+       Fsplit $pkgname-libs {,usr/}lib/libdevmapper-event-lvm2.*
+       Fsplit $pkgname-libs 
lib/{,device-mapper/}libdevmapper-event-lvm2{mirror,raid,snapshot,thin}.so
Fsplit $pkgname-libs usr/lib/libdevmapper.*
Fsplit $pkgname-libs usr/lib/liblvm2app.*
Fsplit $pkgname-libs usr/lib/liblvm2cmd.*
-       Fsplit $pkgname-libs usr/lib/pkgconfig/{devmapper,lvm2app}.pc
-       Fsplit $pkgname-libs usr/include/{libdevmapper,lvm2app,lvm2cmd}.h
+       Fsplit $pkgname-libs 
usr/lib/pkgconfig/{devmapper,lvm2app,devmapper-event}.pc
+       Fsplit $pkgname-libs 
usr/include/{libdevmapper,lvm2app,lvm2cmd,libdevmapper-event}.h
}

# optimization ok
diff --git a/source/base/lvm2/lvm2.install b/source/base/lvm2/lvm2.install
new file mode 100644
index 0000000..d988eb3
--- /dev/null
+++ b/source/base/lvm2/lvm2.install
@@ -0,0 +1,58 @@
+sysvinit_units=(@_F_sysvinit_units@)
+systemd_units=(@_F_systemd_units@)
+
+post_install()
+{
+       local unit
+       local op
+
+       for i in ${sysvinit_units[@]}; do
+               chkconfig --del rc.$i >/dev/null 2>&1
+       done
+
+       for i in ${systemd_units[@]}; do
+               unit=$(echo $i | cut -f 1 -d '=')
+               op=$(echo $i | cut -f 2 -d '=')
+               if echo $op | grep -q 'e'; then
+                       systemctl enable $unit.service >/dev/null 2>&1
+               fi
+               if echo $op | grep -q 's'; then
+                       systemctl start $unit.service >/dev/null 2>&1
+               fi
+       done
+}
+
+post_upgrade()
+{
+       for i in ${sysvinit_units[@]}; do
+               chkconfig --del rc.$i >/dev/null 2>&1
+       done
+
+       systemctl daemon-reload >/dev/null 2>&1
+
+       systemctl --no-reload disable lvm.service >/dev/null 2>&1
+}
+
+pre_remove()
+{
+       local unit
+
+       for i in ${sysvinit_units[@]}; do
+               chkconfig --del rc.$i >/dev/null 2>&1
+       done
+
+       for i in ${systemd_units[@]}; do
+               unit=$(echo $i | cut -f 1 -d '=')
+               systemctl --no-reload disable $unit.service >/dev/null 2>&1
+               systemctl stop $unit.service >/dev/null 2>&1
+       done
+}
+
+post_remove()
+{
+       systemctl daemon-reload >/dev/null 2>&1
+}
+
+op=$1
+shift
+$op $*
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to