From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] lvm2: Update to 2.02.166 Date: Fri, 21 Oct 2016 11:12:58 +0200 Message-ID: <1477041178-23422-1-git-send-email-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0179345028017742779==" List-Id: --===============0179345028017742779== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is a minor update to the latest available version of lvm2. * Splitt package into more sub-packages. * Enable systemd support and add scriptlets. * Drop SELinux support. Fixes #11215. Signed-off-by: Stefan Schantl --- lvm2/lvm2.nm | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++= -- 1 file changed, 173 insertions(+), 4 deletions(-) diff --git a/lvm2/lvm2.nm b/lvm2/lvm2.nm index 02e4f84..de4bcec 100644 --- a/lvm2/lvm2.nm +++ b/lvm2/lvm2.nm @@ -4,7 +4,7 @@ ############################################################################= ### =20 name =3D lvm2 -version =3D 2.02.147 +version =3D 2.02.166 release =3D 1 thisapp =3D LVM2.%{version} =20 @@ -27,26 +27,195 @@ sources =3D %{thisapp}.tgz =20 build requires - libselinux-devel pkg-config + libblkid-devel + libudev-devel ncurses-devel readline-devel + systemd-devel end =20 configure_options +=3D \ + --with-default-dm-run-dir=3D/run \ + --with-default-run-dir=3D/run/lvm \ + --with-default-pid-dir=3D/run/lvm \ + --with-default-locking-dir=3D/run/lock/lvm \ --with-usrlibdir=3D%{libdir} \ - --enable-pkgconfig + --disable-lvm1_fallback \ + --disable-selinux \ + --enable-fsadm \ + --with-pool=3Dinternal \ + --enable-write_install \ + --with-user=3D \ + --with-group=3D \ + --with-device-uid=3D0 \ + --with-device-gid=3D6 \ + --with-device-mode=3D0660 \ + --enable-dmeventd \ + --enable-blkid_wiping \ + --enable-pkgconfig \ + --enable-applib \ + --enable-cmdlib \ + --with-udevdir=3D%{prefix}/lib/udev/rules.d \ + --enable-udev_sync + + test + # Skip the testsuite, because it requires a mounted + # /tmp with support for block devices (without "nodev") + # and at least one available loopback device, which is not + # available in or chroot build environment. + end + + install_cmds + make install_system_dirs DESTDIR=3D%{BUILDROOT} + make install_systemd_units DESTDIR=3D%{BUILDROOT} + make install_systemd_generators DESTDIR=3D%{BUILDROOT} + make install_tmpfiles_configuration DESTDIR=3D%{BUILDROOT} + end end =20 packages package %{name} + prerequires +=3D \ + systemd-units + + requires + %{name}-libs =3D %{thisver} + end + + script postin + systemctl daemon-reload >/dev/null 2>&1 || : + + # Enable lvm2-monitor.service on completely new installations. + systemctl --no-reload enable lvm2-monitor.service >/dev/null 2>&1 || : + end + + script preun + systemctl --no-reload disable lvm2-monitor.service >/dev/null 2>&1 || : + systemctl stop lvm2-monitor.service >/dev/null 2>&1 || : + end + + script postun + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postup + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl try-restart lvm2-monitor.service >/dev/null 2>&1 || : + end + end + + package %{name}-libs + template LIBS + + requires + libdevmapper =3D %{thisver} + end + + files +=3D \ + %{libdir}/libdevmapper-event-lvm2.so.* \ + %{libdir}/device-mapper + end + + package %{name}-devel + template DEVEL + end + + package device-mapper + summary =3D Device mapper utility. + description + This package contains the supporting userspace utility, dmsetup, + for the kernel device-mapper and the dmeventd daemon for monitoring + the state of device-mapper devices. + end + + prerequires +=3D \ + systemd-units + + requires + libdevmapper =3D %{thisver} + util-linux >=3D 2.24 + end + + conflicts + dracut < 002 + end + + files + %{sbindir}/blkdeactivate + %{sbindir}/dmeventd + %{sbindir}/dmsetup + %{sbindir}/dmstats + %{mandir}/man8/blkdeactivate.8.gz + %{mandir}/man8/dmeventd.8.gz + %{mandir}/man8/dmsetup.8.gz + %{mandir}/man8/dmstats.8.gz + %{udevdir}/10-dm.rules + %{udevdir}/13-dm-disk.rules + %{udevdir}/95-dm-notify.rules + %{unitdir}/dm-event.socket + %{unitdir}/dm-event.service + end + + script postin + systemctl daemon-reload >/dev/null 2>&1 || : + + # dm-event.socket is always enabled and started and ready to + # serve if dmeventd is used. + systemctl --no-reload enable dm-event.socket >/dev/null 2>&1 || : + end + + script preun + systemctl --no-reload disable dm-event.service >/dev/null 2>&1 || : + systemctl --no-reload disable dm-event.socket >/dev/null 2>&1 || : + systemctl stop dm-event.socket >/dev/null 2>&1 || : + systemctl stop dm-event.service >/dev/null 2>&1 || : + end + + script postun + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postup + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl try-restart dm-event.service >/dev/null 2>&1 || : + end + end =20 package libdevmapper template LIBS + + summary =3D Device-mapper shared libraries. + description + This package contains the device-mapper shared libraries, + libdevmapper and libdevmapper-event. + end + + files + %{libdir}/libdevmapper.so.* + %{libdir}/libdevmapper-event.so.* + end end =20 package libdevmapper-devel - template DEVEL + summary =3D Development libraries and headers for the device-mapper. + description + This package contains files needed to develop applications that use + the device-mapper libraries. + end + + requires + libdevmapper =3D %{thisver} + end + + files + %{libdir}/libdevmapper.so + %{libdir}/libdevmapper-event.so + %{includedir}/libdevmapper.h + %{includedir}/libdevmapper-event.h + %{libdir}/pkgconfig/devmapper.pc + %{libdir}/pkgconfig/devmapper-event.pc + end end =20 package %{name}-debuginfo --=20 2.7.4 --===============0179345028017742779==--