From 5711c6777e7610093a43849c3d874c52ac421b64 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 2 Mar 2023 01:27:32 +0000 Subject: gentoo auto-resync : 02:03:2023 - 01:27:32 --- sys-libs/libblockdev/Manifest | 2 + .../files/libblockdev-2.28-sh_tests.patch | 23 ++++ sys-libs/libblockdev/libblockdev-2.28-r1.ebuild | 136 +++++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 sys-libs/libblockdev/files/libblockdev-2.28-sh_tests.patch create mode 100644 sys-libs/libblockdev/libblockdev-2.28-r1.ebuild (limited to 'sys-libs/libblockdev') diff --git a/sys-libs/libblockdev/Manifest b/sys-libs/libblockdev/Manifest index 70fcb2e82189..eec232ec0b16 100644 --- a/sys-libs/libblockdev/Manifest +++ b/sys-libs/libblockdev/Manifest @@ -1,4 +1,6 @@ +AUX libblockdev-2.28-sh_tests.patch 1552 BLAKE2B 3b26cf271a0cb2a0f51ecffe51c9caf9a0ac1c65aecb5adc845a2721f3ac7178df7c994b7647b4fa1bbfd27baf072325bffedf723555c39e164f7d7645163090 SHA512 11fc498db4ed1d3a9e5a9288e1137d64f7581cc7b2d265292f7a3899ef5cfc6d63138fef7f87695abd9d518fa1c74a8bd98ebb54038211eeb0afe7964d85c6c4 DIST libblockdev-2.28.tar.gz 925698 BLAKE2B 63ac7ab5bd02c1ef1848d0b252e09fe721cfe86258f063b7bab616766cbc56311707dcb2dd3a1fadf0e0840187f121aa178fd5959500cd590b846238a9d3e36e SHA512 9e01c41db4f728c8e81e710c6bb4725bbe34b3a7de25ff7f57b7b88ca6b7b5debbe858947585d314770036b2c3c533f9f8ff3d038b7ca50eee3d18f9fbe0d392 +EBUILD libblockdev-2.28-r1.ebuild 3007 BLAKE2B 8bfc3156632d4a2d90e65d1367351fd0823a518547dd2fc8b8752ce40b95a585cd2344c0b4dbc5e4451a96f4e83dda08d67c40ae63ee4665fcad67ad30b2b27f SHA512 25362b3fd4e119f58280103ccb3c57eedc327d2738b3692e618c768214342b58c5a898b03390d41cab87575f332a66a96391f3df18c2d07c4738d32ba6995956 EBUILD libblockdev-2.28.ebuild 2946 BLAKE2B 32bdefce84fc6146b8f03c8889c56c9e25478949071de9e16658ff0535262a3dc8991bd453624676899de2c9e4e9ed49f7a0514fb702417621ddc6b552f59939 SHA512 820425866314934210469b6154c99a932330421d382246b23baea433a39f773b4ca51756564a74f496d5ca0f45b9409e51b42cd18efb94e94abbd0d434b14940 EBUILD libblockdev-9999.ebuild 2733 BLAKE2B b7dd95006279e4717687664c9fa6cff563cb0ff1b8500c0b962742c9b8a440ba51f2e4550cf251a3608c77c17d5bc7f8343372a89052d034b1801e91988044fe SHA512 e0b750ff1819f6de9500855ee87ca55287b7fff6266eda78f9f3c5cc35bb2ea10d2b1d894a8fad90003669144ae10ef533207a3af175aa456849696285792f94 MISC metadata.xml 1233 BLAKE2B 68512209e8f458b5b52a9d82eb86c1c831837681b2976d5050c578c3b3fdb032640c4cc99da9621aae7c061ae8332825ea5010a8f1138fbbbc34e92fccbeddeb SHA512 eb47faef934a8eafe1beeea6f901ddd6b0e7202823f57b3848f6ef131b2a5ffc968740d980a68163696d3de34a98ebef8561e63d26ffe213a42e1022577a9270 diff --git a/sys-libs/libblockdev/files/libblockdev-2.28-sh_tests.patch b/sys-libs/libblockdev/files/libblockdev-2.28-sh_tests.patch new file mode 100644 index 000000000000..2fbeaf49f233 --- /dev/null +++ b/sys-libs/libblockdev/files/libblockdev-2.28-sh_tests.patch @@ -0,0 +1,23 @@ +bash is fine with "test . == ." but e.g. dash fails on not having +the two dots quoted as strings. + +--- a/docs/Makefile.am ++++ b/docs/Makefile.am +@@ -2,7 +2,7 @@ + + html-doc.stamp: ${srcdir}/libblockdev-docs.xml ${srcdir}/libblockdev-sections.txt $(wildcard ${srcdir}/../src/plugins/*.[ch]) $(wildcard ${srcdir}/../src/lib/*.[ch]) $(wildcard ${srcdir}/../src/utils/*.[ch]) + touch ${builddir}/html-doc.stamp +- test ${builddir} == ${srcdir} || cp ${srcdir}/libblockdev-sections.txt ${srcdir}/libblockdev-docs.xml ${builddir} ++ test "${builddir}" == "${srcdir}" || cp ${srcdir}/libblockdev-sections.txt ${srcdir}/libblockdev-docs.xml ${builddir} + gtkdoc-scan --rebuild-types --module=libblockdev --source-dir=${srcdir}/../src/plugins/ --source-dir=${srcdir}/../src/lib/ --source-dir=${srcdir}/../src/utils/ + gtkdoc-mkdb --module=libblockdev --output-format=xml --source-dir=${srcdir}/../src/plugins/ --source-dir=${srcdir}/../src/lib/ --source-dir=${srcdir}/../src/utils/ --source-suffixes=c,h + test -d ${builddir}/html || mkdir ${builddir}/html +@@ -13,7 +13,7 @@ + -rm -rf ${builddir}/html + -rm -rf ${builddir}/xml + test ! -f ${builddir}/html-doc.stamp || rm ${builddir}/html-doc.stamp +- test ${builddir} == ${srcdir} || rm -f ${builddir}/libblockdev-sections.txt ${builddir}/libblockdev-docs.xml ++ test "${builddir}" == "${srcdir}" || rm -f ${builddir}/libblockdev-sections.txt ${builddir}/libblockdev-docs.xml + + install-data-local: + test -d ${DESTDIR}${datadir}/gtk-doc/html/libblockdev || mkdir -p ${DESTDIR}${datadir}/gtk-doc/html/libblockdev diff --git a/sys-libs/libblockdev/libblockdev-2.28-r1.ebuild b/sys-libs/libblockdev/libblockdev-2.28-r1.ebuild new file mode 100644 index 000000000000..0fa5e1d604f8 --- /dev/null +++ b/sys-libs/libblockdev/libblockdev-2.28-r1.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +inherit autotools python-single-r1 xdg-utils + +DESCRIPTION="A library for manipulating block devices" +HOMEPAGE="https://github.com/storaged-project/libblockdev" +if [[ "${PV}" == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git" + BDEPEND=" + sys-devel/autoconf-archive + " +else + MY_PV="${PV}-1" + SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${MY_PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi +LICENSE="LGPL-2+" +SLOT="0" +IUSE="bcache +cryptsetup device-mapper dmraid escrow gtk-doc introspection lvm kbd test +tools vdo" +# Tests require root. In a future release, we may be able to run a smaller +# subset with new run_tests.py arguments. +RESTRICT="!test? ( test ) test" + +RDEPEND=" + >=dev-libs/glib-2.42.2 + dev-libs/libbytesize + >=sys-apps/kmod-19 + >=sys-apps/util-linux-2.27 + >=sys-block/parted-3.1 + cryptsetup? ( + escrow? ( + >=dev-libs/nss-3.18.0 + dev-libs/volume_key + ) + >=sys-fs/cryptsetup-1.6.7:= + ) + device-mapper? ( sys-fs/lvm2 ) + dmraid? ( + sys-fs/dmraid + sys-fs/lvm2 + ) + lvm? ( + sys-fs/lvm2 + virtual/udev + ) + vdo? ( dev-libs/libyaml ) + ${PYTHON_DEPS} +" + +DEPEND=" + ${RDEPEND} +" + +# TODO: relax libbytesize condition once it has gained py3.11 support +BDEPEND+=" + dev-util/gtk-doc-am + gtk-doc? ( dev-util/gtk-doc ) + introspection? ( >=dev-libs/gobject-introspection-1.3.0 ) + test? ( + $(python_gen_cond_dep ' + dev-libs/libbytesize[python,${PYTHON_USEDEP}] + ' python3_{9..10} ) + sys-block/targetcli-fb + ) +" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + escrow? ( cryptsetup )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.28-sh_tests.patch +) + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare() { + xdg_environment_reset #623992 + default + + # https://bugs.gentoo.org/744289 + find -type f \( -name "Makefile.am" -o -name "configure.ac" \) -print0 \ + | xargs --null sed "s@ -Werror@@" -i || die + + eautoreconf +} + +src_configure() { + local myeconfargs=( + --with-btrfs + --with-fs + --with-part + --with-python3 + --without-mpath + --without-nvdimm + --without-python2 + $(use_enable introspection) + $(use_enable test tests) + $(use_with bcache) + $(use_with cryptsetup crypto) + $(use_with device-mapper dm) + $(use_with dmraid) + $(use_with escrow) + $(use_with gtk-doc) + $(use_with kbd) + $(use_with lvm lvm) + $(use_with lvm lvm-dbus) + $(use_with tools) + $(use_with vdo) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + # See http://storaged.org/libblockdev/ch03.html + # The 'check' target just does Pylint. + # ... but it needs root. + emake test +} + +src_install() { + default + find "${ED}" -type f -name "*.la" -delete || die + # This is installed even with USE=-lvm, but libbd_lvm are omitted so it + # doesn't work at all. + if ! use lvm ; then + rm -f "${ED}"/usr/bin/lvm-cache-stats || die + fi + python_optimize #718576 +} -- cgit v1.2.3