# Contributor: Jacek Migacz # Maintainer: Natanael Copa pkgname=lvm2 pkgver=2.03.21 pkgrel=10 pkgdesc="Logical Volume Manager 2 utilities" url="https://sourceware.org/lvm2/" arch="all" options="!check" # Test tries to use real /dev/mapper/control. license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause" # lvm2 will dlopen libs so we need to add explicit depend depends="lvm2-libs=$pkgver-r$pkgrel" depends_dev="linux-headers" makedepends_host="$depends_dev libaio-dev util-linux-static util-linux-dev" source="https://mirrors.kernel.org/sourceware/lvm2/LVM2.$pkgver.tgz default-udev-sync.patch fix-stdio-usage.patch library_dir-default-config.patch mlockall-default-config.patch no-systemd.patch 0001-lvresize-use-POSIX-shell.patch lvm.initd lvm.confd lvmlockd.initd dmeventd.initd " subpackages=" $pkgname-static:lvm2_static device-mapper-static:dm_static device-mapper-libs:dm_libs device-mapper-event-libs:dm_event_libs $pkgname-dev $pkgname-doc $pkgname-openrc $pkgname-dmeventd $pkgname-dmeventd-openrc:dmeventd_openrc device-mapper:dm device-mapper-udev:udev:noarch $pkgname-libs $pkgname-extra::noarch " builddir="$srcdir/LVM2.$pkgver" if [ -z "$BOOTSTRAP" ]; then # XXX: enable-udev_sync needs a bit more polish to not fail with mdev-only _no_bootstrap="--enable-lvmlockd-sanlock --disable-udev_sync" makedepends_host="$makedepends_host eudev-dev sanlock-dev" subpackages="$subpackages $pkgname-lockd $pkgname-lockd-openrc:lockd_openrc" fi prepare() { default_prepare update_config_sub } build() { # during cross-compilation malloc test goes wrong export ac_cv_func_malloc_0_nonnull=yes export ac_cv_func_realloc_0_nonnull=yes ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --libdir=/lib \ --sbindir=/sbin \ --localstatedir=/var \ --enable-static_link \ --disable-dependency-tracking \ --disable-nls \ --disable-readline \ --enable-pkgconfig \ --with-thin=internal \ --enable-dmeventd \ --enable-cmdlib \ --with-thin-check=/sbin/thin_check \ --disable-thin_check_needs_check \ --with-thin-dump=/sbin/thin_dump \ --with-thin-repair=/sbin/thin_repair \ --with-thin-restore=/sbin/thin_restore \ --with-cache-check=/sbin/cache_check \ --disable-cache_check_needs_check \ --with-cache-dump=/sbin/cache_dump \ --with-cache-repair=/sbin/cache_repair \ --with-cache-restore=/sbin/cache_restore \ --with-dmeventd-path=/sbin/dmeventd \ --without-systemd-run \ --enable-udev_rules \ $_no_bootstrap \ CLDFLAGS="$LDFLAGS" make } package() { make DESTDIR="$pkgdir" install install -d "$pkgdir"/etc/lvm/archive "$pkgdir"/etc/lvm/backup install -Dm755 "$srcdir"/lvm.initd "$pkgdir"/etc/init.d/lvm install -Dm644 "$srcdir"/lvm.confd "$pkgdir"/etc/conf.d/lvm } dmeventd() { pkgdesc="Device-mapper event daemon" amove sbin/dmeventd } dmeventd_openrc() { pkgdesc="Device-mapper event daemon (OpenRC init scripts)" install_if="$pkgname-dmeventd=$pkgver-r$pkgrel openrc" install -Dm755 "$srcdir"/dmeventd.initd "$subpkgdir"/etc/init.d/dmeventd } dm_static() { pkgdesc="Device-mapper static libraries and binaries" provides="device-mapper-event-static=$pkgver-r$pkgrel" amove usr/lib/libdevmapper*.a usr/sbin/dm*.static } dm() { pkgdesc="Device mapper userspace library and tools from LVM2" amove sbin/dm* } udev() { pkgdesc="Device mapper udev rules" install="$subpkgname.post-install $subpkgname.post-upgrade" install_if="device-mapper eudev" amove usr/lib/udev/rules.d } libs() { pkgdesc="LVM2 shared libraries" depends= amove lib/liblvm2*.so.* \ lib/libdevmapper-event-lvm2*.so.* \ lib/device-mapper } dm_libs() { pkgdesc="Device-mapper shared library" depends= amove lib/libdevmapper.so.* } dm_event_libs() { pkgdesc="Device-mapper event daemon shared library" depends= amove lib/libdevmapper-event.so.* } lvm2_static() { pkgdesc="$pkgdesc static library" amove usr/lib/liblvm2*.a usr/sbin/lvm.static } extra() { pkgdesc="LVM2 extra utilities" depends="bash coreutils" amove sbin/lvmdump sbin/fsadm sbin/blkdeactivate sbin/lvm_import_vdo } lockd() { pkgdesc="LVM2 locking daemon" depends="sanlock" # lvmpolld isn't strictly part of this, but is enabled by enabling this, so put it here too amove sbin/lvmlockctl sbin/lvmlockd sbin/lvmpolld } lockd_openrc() { pkgdesc="LVM2 locking daemon (OpenRC init scripts)" install_if="$pkgname-lockd=$pkgver-r$pkgrel openrc" install -Dm755 "$srcdir"/lvmlockd.initd "$subpkgdir"/etc/init.d/lvmlockd } sha512sums=" 6024811c3fa92afd2fc13a10d1c3542352aa9a016f40c3ef588bd2f5f3e41245fed4b36c8a87d9f7f8dddc6e13b7253396f5c811f99665df27751676dc7b5bde LVM2.2.03.21.tgz ce526e0b58236d26fcb21c81090f8a5baecc0909e645696dccf4c9c7b7adc31fb6f2ababb158217a81324aca14a55631d2fac3176177d81f0bbd35032c0b9979 default-udev-sync.patch c65ef16840321d8a58373e872713eeccbc315a84bb35beebccb6bc6063295b0f54b7c0726c799efd8cafedd011c21f51ec8e85f8a50d0d5df80b7428aedf29c3 fix-stdio-usage.patch b790cfcb55aa0362c7046c26a8e050708edecaf0233946adbb34d9c1d967d3614bc19e0c91695da4fd12d7b18adb74041ae11239cd635310cc44b8a7079ccbec library_dir-default-config.patch 07f77491cffa0d9dcda86004e2df428d5d52652a3bda8037a4b09c9c786146253314a11bae42512231c664a8fae110fec815bd12135fc3c6152b94e2101f8213 mlockall-default-config.patch dfcda00e5607606ae8f10e5765de048af933afd05e0719b14036ba84ebc3b4eb07b138e5ce9af9f653416b4a6cc42161591e6f93ee3a36721a2b7396d70d5d91 no-systemd.patch 3cec0a44e44b15dcfc0bb22f8a4318e76bf719fe9a550b6cf99160ea4181707f81ba6a50c8dafedc942638b1ae8bfde901eeff83ba0d6cb8383a178274ba54a5 0001-lvresize-use-POSIX-shell.patch 714e6aaba3437b43af38b0b559d0f983b2cea023e2bc64e0c3763e9c78ae4ca125fb75839fda52128e7044a4add81940fd69e92439d30d232cf20a4204f0e321 lvm.initd 07caf8fa942290f3c953cc2463aaf55bac01d0bcb9351daf3880fa4d0eefb67fe00761c46a7a4da91cd2f8e492a12fed35853a15dc939cd80d19d3303bc3951d lvm.confd 7215daf0872063672d5ad13f65ccd90833c6ebea7347149789b97a232d92af28ddc21c2893cb9ee2cb004f857700822917152c2005300a5060b3095f0582bfdd lvmlockd.initd ca06220065525e93347efb7a5746a367cf55cb03574e50eed29bd7c4eae036bdd199b52c42d81811b6e742649e73ab8e66525f663bed66f9d1d82d0efde50332 dmeventd.initd "