diff options
author | 2024-04-29 11:20:26 -0500 | |
---|---|---|
committer | 2024-04-29 11:20:26 -0500 | |
commit | 89280d3b386a0efa0260bdf0f36ca29fe17a36d4 (patch) | |
tree | 7622861169a72558f648ba54b87e872db5ec83a0 | |
parent | Revert "gkbuilds/lvm: add 2.03 support" (diff) | |
download | genkernel-89280d3b386a0efa0260bdf0f36ca29fe17a36d4.tar.gz genkernel-89280d3b386a0efa0260bdf0f36ca29fe17a36d4.tar.bz2 genkernel-89280d3b386a0efa0260bdf0f36ca29fe17a36d4.zip |
gkbuilds/lvm: move 2.03 changes to new file
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
-rw-r--r-- | gkbuilds/lvm-2.03.22.gkbuild | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/gkbuilds/lvm-2.03.22.gkbuild b/gkbuilds/lvm-2.03.22.gkbuild new file mode 100644 index 00000000..b806d77a --- /dev/null +++ b/gkbuilds/lvm-2.03.22.gkbuild @@ -0,0 +1,78 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +src_configure() { + # devicemapper needs to find udev + append-ldflags -Wl,-rpath-link,${BROOT}/usr/lib + + export ac_cv_header_security_pam_misc_h=no + export ac_cv_header_security_pam_appl_h=no + + local myconf=( + --enable-static_link + --enable-pkgconfig + --enable-dmeventd + --enable-cmdlib + --disable-lvmetad + --with-clvmd=none + --with-cluster=none + --disable-readline + --disable-selinux + --with-mirrors=internal + --with-snapshots=internal + --with-thin=internal + --with-cache=internal + --disable-udev-systemd-background-jobs + --enable-udev_sync + --enable-udev_rules + ) + + local texec + for texec in check dump repair restore + do + myconf+=( --with-thin-${texec}=/usr/sbin/thin_${texec} ) + myconf+=( --with-cache-${texec}=/usr/sbin/cache_${texec} ) + done + + # Hard-wire this to bash as some shells (dash) don't know + # "-o pipefail" #682404, #716496 + CONFIG_SHELL="/bin/bash" \ + gkconf "${myconf[@]}" +} + +src_install() { + default + + rm -rf \ + "${D}"/etc \ + "${D}"/usr/sbin/* \ + "${D}"/share + + cp -a libdm/dm-tools/dmsetup.static"${D}"/usr/sbin/lvm \ + || die "Failed to copy '${S}/tools/lvm.static' to '${D}/usr/sbin/lvm'!" + + "${STRIP}" --strip-all "${D}"/usr/sbin/lvm \ + || die "Failed to strip '${D}/usr/sbin/lvm'!" + + cp -a tools/dmsetup.static "${D}"/usr/sbin/dmsetup \ + || die "Failed to copy '${S}/tools/dmsetup.static' to '${D}/usr/sbin/dmsetup'!" + + "${STRIP}" --strip-all "${D}"/usr/sbin/dmsetup \ + || die "Failed to strip '${D}/usr/sbin/dmsetup'!" + + ln -s dmsetup "${D}"/usr/sbin/dmstats \ + || die "Failed to create symlink '${D}/usr/sbin/dmstats' to '${D}/usr/sbin/dmsetup'!" + + # For backward compatibility (packages like multipath-tools are + # expecting /sbin/dmsetup in udev rules). + mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" + + ln -s ../usr/sbin/dmsetup "${D}"/sbin/dmsetup \ + || die "Failed to create symlink '${D}/sbin/dmsetup' to '${D}/usr/sbin/dmsetup'!" + + ln -s ../usr/sbin/dmstats "${D}"/sbin/dmstats \ + || die "Failed to create symlink '${D}/sbin/dmstats' to '${D}/usr/sbin/dmstats'!" + + ln -s ../usr/sbin/lvm "${D}"/sbin/lvm \ + || die "Failed to create symlink '${D}/sbin/lvm' to '${D}/usr/sbin/lvm'!" +} |