* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libblockdev/files/, sys-libs/libblockdev/
@ 2020-05-12 18:44 Lars Wendler
0 siblings, 0 replies; 4+ messages in thread
From: Lars Wendler @ 2020-05-12 18:44 UTC (permalink / raw
To: gentoo-commits
commit: de893769146655fc76b842d21b3cba7cbf4059e3
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue May 12 18:39:26 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue May 12 18:44:09 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de893769
sys-libs/libblockdev: Don't use bashisms in configure script
Closes: https://bugs.gentoo.org/719442
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
.../files/libblockdev-2.23-avoid_bashisms.patch | 41 ++++++++++++++++++++++
sys-libs/libblockdev/libblockdev-2.23-r1.ebuild | 8 +++--
2 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch b/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch
new file mode 100644
index 00000000000..9c4f94bd841
--- /dev/null
+++ b/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch
@@ -0,0 +1,41 @@
+From e6ab6918ffac65da2d562cb286c6ab50eaf62ca2 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Mon, 11 May 2020 22:14:26 +0200
+Subject: [PATCH] configure.ac: Avoid bashisms
+
+or else we get unpredictable results with shells != /bin/bash like:
+
+checking for gobject-introspection... no (disabled, use --enable-introspection to enable)
+./configure: 13672: test: xno: unexpected operator
+checking for python3... /var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3
+./configure: 13838: test: x/var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3: unexpected operator
+
+Reported-by: Matt Whitlock <gentoo@mattwhitlock.name>
+Gentoo-bug: https://bugs.gentoo.org/719442
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ded64259..bbdff5e7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -60,7 +60,7 @@ AC_ARG_WITH([python3],
+ AC_SUBST(WITH_PYTHON3, 0)
+ if test "x$with_python3" != "xno"; then
+ AC_PATH_PROG([python3], [python3], [no])
+- AS_IF([test "x$python3" == "xno"],
++ AS_IF([test "x$python3" = "xno"],
+ [if test "x$with_python3" = "xyes"; then
+ LIBBLOCKDEV_SOFT_FAILURE([Python3 support requested, but python3 is not available])
+ fi],
+@@ -77,7 +77,7 @@ AC_ARG_WITH([gtk-doc],
+ AC_SUBST(WITH_GTK_DOC, 0)
+ if test "x$with_gtk_doc" != "xno"; then
+ AC_PATH_PROG([gtkdoc_scan], [gtkdoc-scan], [no])
+- AS_IF([test "x$gtkdoc_scan" == "xno"],
++ AS_IF([test "x$gtkdoc_scan" = "xno"],
+ [if test "x$with_gtk_doc" = "xyes"; then
+ LIBBLOCKDEV_SOFT_FAILURE([Building documentation with gtk-doc requested, but not available])
+ fi],
diff --git a/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild b/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
index c252b7d2104..105df4812ba 100644
--- a/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
+++ b/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
@@ -4,12 +4,12 @@
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
-inherit python-single-r1 xdg-utils
+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 autotools git-r3
+ inherit git-r3
EGIT_REPO_URI="https://github.com/storaged-project/libblockdev.git"
BDEPEND="
sys-devel/autoconf-archive
@@ -66,6 +66,8 @@ BDEPEND+="
REQUIRED_USE="${PYTHON_REQUIRED_USE}
escrow? ( cryptsetup )"
+PATCHES=( "${FILESDIR}/${P}-avoid_bashisms.patch" ) #719442
+
pkg_setup() {
python-single-r1_pkg_setup
}
@@ -73,7 +75,7 @@ pkg_setup() {
src_prepare() {
xdg_environment_reset #623992
default
- [[ "${PV}" == *9999 ]] && eautoreconf
+ eautoreconf
}
src_configure() {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libblockdev/files/, sys-libs/libblockdev/
@ 2020-09-23 13:06 Lars Wendler
0 siblings, 0 replies; 4+ messages in thread
From: Lars Wendler @ 2020-09-23 13:06 UTC (permalink / raw
To: gentoo-commits
commit: 1ee85f3a9dd02091f3dcc89820381f281518eed1
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 23 12:54:14 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Sep 23 13:06:02 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ee85f3a
sys-libs/libblockdev: Removed old
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
sys-libs/libblockdev/Manifest | 1 -
.../files/libblockdev-2.23-avoid_bashisms.patch | 41 --------
sys-libs/libblockdev/libblockdev-2.23-r1.ebuild | 116 ---------------------
3 files changed, 158 deletions(-)
diff --git a/sys-libs/libblockdev/Manifest b/sys-libs/libblockdev/Manifest
index 46f8638f2d6..be8c801a203 100644
--- a/sys-libs/libblockdev/Manifest
+++ b/sys-libs/libblockdev/Manifest
@@ -1,2 +1 @@
-DIST libblockdev-2.23.tar.gz 856829 BLAKE2B 131bf429e530fc9dd44fade4f5bc937ec220365b1ee2ae46818a6fa3ec7591775fdc3ed531350cc2546f4151e41551dfd3e331b0a6d5777769a7b54c5c15ed42 SHA512 ecc4d5a3cb977fbbe176bf6872b6754833d2869e927c32f8466685916ee4550cf806e0b0c8f5e8e76de3839ae591a4eec502ff974c2f0678af6cfd46dd3016f3
DIST libblockdev-2.24.tar.gz 905838 BLAKE2B dcc31021d72c2a4f92d8f70387537ec409302e85a9bdb338a09449b02318113d40cabf7fc2f6b4aca819400baccba69a9f67a616b30c744cf843eeac785875e4 SHA512 92b7d734ea2cefbb67e626bef369d6785ba2a4bbbf09a4f59345febe977bc32319fb44f38b3c3177b8652abbc1f87b6cc76d41fdd2d70783c1c168049bdcb1d6
diff --git a/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch b/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch
deleted file mode 100644
index 9c4f94bd841..00000000000
--- a/sys-libs/libblockdev/files/libblockdev-2.23-avoid_bashisms.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From e6ab6918ffac65da2d562cb286c6ab50eaf62ca2 Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Mon, 11 May 2020 22:14:26 +0200
-Subject: [PATCH] configure.ac: Avoid bashisms
-
-or else we get unpredictable results with shells != /bin/bash like:
-
-checking for gobject-introspection... no (disabled, use --enable-introspection to enable)
-./configure: 13672: test: xno: unexpected operator
-checking for python3... /var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3
-./configure: 13838: test: x/var/tmp/portage/sys-libs/libblockdev-2.23-r1/temp/python3.8/bin/python3: unexpected operator
-
-Reported-by: Matt Whitlock <gentoo@mattwhitlock.name>
-Gentoo-bug: https://bugs.gentoo.org/719442
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index ded64259..bbdff5e7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -60,7 +60,7 @@ AC_ARG_WITH([python3],
- AC_SUBST(WITH_PYTHON3, 0)
- if test "x$with_python3" != "xno"; then
- AC_PATH_PROG([python3], [python3], [no])
-- AS_IF([test "x$python3" == "xno"],
-+ AS_IF([test "x$python3" = "xno"],
- [if test "x$with_python3" = "xyes"; then
- LIBBLOCKDEV_SOFT_FAILURE([Python3 support requested, but python3 is not available])
- fi],
-@@ -77,7 +77,7 @@ AC_ARG_WITH([gtk-doc],
- AC_SUBST(WITH_GTK_DOC, 0)
- if test "x$with_gtk_doc" != "xno"; then
- AC_PATH_PROG([gtkdoc_scan], [gtkdoc-scan], [no])
-- AS_IF([test "x$gtkdoc_scan" == "xno"],
-+ AS_IF([test "x$gtkdoc_scan" = "xno"],
- [if test "x$with_gtk_doc" = "xyes"; then
- LIBBLOCKDEV_SOFT_FAILURE([Building documentation with gtk-doc requested, but not available])
- fi],
diff --git a/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild b/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
deleted file mode 100644
index 6007c32f473..00000000000
--- a/sys-libs/libblockdev/libblockdev-2.23-r1.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-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"
- #MY_P="${PN}-${MY_PV}"
- #SRC_URI="https://github.com/storaged-project/${PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
- SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${MY_PV}/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86"
- #S="${WORKDIR}/${MY_P}"
-fi
-LICENSE="LGPL-2+"
-SLOT="0"
-IUSE="bcache +cryptsetup device-mapper dmraid escrow gtk-doc introspection lvm kbd test +tools vdo"
-RESTRICT="!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}
-"
-
-BDEPEND+="
- dev-util/gtk-doc-am
- gtk-doc? ( dev-util/gtk-doc )
- introspection? ( >=dev-libs/gobject-introspection-1.3.0 )
-"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- escrow? ( cryptsetup )"
-
-PATCHES=( "${FILESDIR}/${P}-avoid_bashisms.patch" ) #719442
-
-pkg_setup() {
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- xdg_environment_reset #623992
- default
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- --with-btrfs
- --with-fs
- --with-part
- --without-mpath
- --without-nvdimm
- $(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)
- --without-python2
- --with-python3
- )
- econf "${myeconfargs[@]}"
-}
-
-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
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libblockdev/files/, sys-libs/libblockdev/
@ 2025-06-18 4:34 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-06-18 4:34 UTC (permalink / raw
To: gentoo-commits
commit: 271edaee5439e8fb4fb76de8ef9d2c559556bc14
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 18 03:33:32 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 18 03:33:39 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=271edaee
sys-libs/libblockdev: add 3.3.0
We don't do REQUIRED_USE="test? ( python )" to avoid blocking up arch
testing, instead conditionalising some bits on either USE=test or USE=python.
Closes: https://bugs.gentoo.org/941787
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-libs/libblockdev/Manifest | 1 +
.../files/libblockdev-3.3.0-fix-bashism.patch | 24 ++++
.../files/libblockdev-3.3.0-tests-nvme.patch | 29 ++++
.../files/libblockdev-3.3.0-tests-skip-vdo.patch | 44 ++++++
sys-libs/libblockdev/libblockdev-3.3.0.ebuild | 160 +++++++++++++++++++++
sys-libs/libblockdev/metadata.xml | 1 +
6 files changed, 259 insertions(+)
diff --git a/sys-libs/libblockdev/Manifest b/sys-libs/libblockdev/Manifest
index ad1f4efdf136..a9fc1ab5c882 100644
--- a/sys-libs/libblockdev/Manifest
+++ b/sys-libs/libblockdev/Manifest
@@ -1,2 +1,3 @@
DIST libblockdev-2.29.tar.gz 935117 BLAKE2B 774062459602a6f3730ac6e694b3f535daf0258cc5f509ff138bb8c15f44ff46bdc08e32ae1957909b51a191726cf5e9cb418c0317e5178300687947704cf5e0 SHA512 0d9637800b189f3824483010d2ff079da11b15ed0b42c578352a0d3cd9c35dab4e5945a3cc31c17ea6f88637548151fc7cf237ac8e9c98edfc7b7bce1a756e01
DIST libblockdev-3.1.1.tar.gz 1056270 BLAKE2B b3dbdc7226524d544193b609ced8a9fee725268ba2201b639c22103fcae6d047c94fb1b848e489525300242cb235d688934193894a06279a4dc0e0b33dff6e96 SHA512 44628d9e68a467f8a5d5e65e12d5d6ffb4d9b953c846acd9f6da257eab5ccd79309651d6b20092fa700fb4340f1f718ceef11141203da676d088824aa9d03481
+DIST libblockdev-3.3.0.tar.gz 1157061 BLAKE2B 42166d0a370b0370b32992208727ba99ae20ac8eee0243d29954f2f45339563e5ca2531f015f5b02dc73e0b10faa637b12adeec0568e5c3fbbf840ef69741b44 SHA512 01a980e64ef628ab0f82626a3501f4c157401b56f0ef6e34f91e9f33cb1fd663eb1f56b3563fdee6cd6b431c118bc9be141226867ea765cc703bf3010f10378f
diff --git a/sys-libs/libblockdev/files/libblockdev-3.3.0-fix-bashism.patch b/sys-libs/libblockdev/files/libblockdev-3.3.0-fix-bashism.patch
new file mode 100644
index 000000000000..4157c5ba3ca4
--- /dev/null
+++ b/sys-libs/libblockdev/files/libblockdev-3.3.0-fix-bashism.patch
@@ -0,0 +1,24 @@
+https://github.com/storaged-project/libblockdev/pull/1111
+
+From bc1fa125aed4ba6e12a19bd00bb75be21b96f44a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 18 Jun 2025 04:27:30 +0100
+Subject: [PATCH] configure.ac: fix bashism
+
+configure scripts run with a #!/bin/sh shebang which means they should work
+with a POSIX shell, so avoid using '+=' which is a bashism.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -310,7 +310,7 @@ AS_IF([test "x$with_smart" != "xno"],
+
+ AS_IF([test "x$with_smart" != "xno"],
+ [SAVED_CFLAGS=$CFLAGS
+- CFLAGS+=" -I$drivedb_path"
++ CFLAGS="${CFLAGS} -I$drivedb_path"
+ AC_MSG_CHECKING([for drivedb.h presence])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
diff --git a/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-nvme.patch b/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-nvme.patch
new file mode 100644
index 000000000000..19408ee943ea
--- /dev/null
+++ b/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-nvme.patch
@@ -0,0 +1,29 @@
+https://github.com/storaged-project/libblockdev/commit/96e69ff1d60d343e64731e37c36fa5630f19295c
+
+From 96e69ff1d60d343e64731e37c36fa5630f19295c Mon Sep 17 00:00:00 2001
+From: Tomas Bzatek <tbzatek@redhat.com>
+Date: Mon, 7 Apr 2025 18:26:42 +0200
+Subject: [PATCH] tests: Fix NVMe sanitize log return codes
+
+When calling nvme_get_log_sanitize() on a namespace device through
+io_uring codepath, return codes may differ slightly. This is perfectly
+fine, subject to the kernel implementation. In this case the errno 22
+comes directly from io_uring_wait_cqe().
+---
+ tests/nvme_test.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/nvme_test.py b/tests/nvme_test.py
+index 2ce844c0..72dfcf4e 100644
+--- a/tests/nvme_test.py
++++ b/tests/nvme_test.py
+@@ -283,7 +283,7 @@ def test_sanitize_log(self):
+ with self.assertRaisesRegex(GLib.GError, r".*Failed to open device .*': No such file or directory"):
+ BlockDev.nvme_get_sanitize_log("/dev/nonexistent")
+
+- message = r"NVMe Get Log Page - Sanitize Status Log command error: Invalid Field in Command: A reserved coded value or an unsupported value in a defined field|NVMe Get Log Page - Sanitize Status Log command error: unrecognized"
++ message = r"NVMe Get Log Page - Sanitize Status Log command error: (Invalid Field in Command: A reserved coded value or an unsupported value in a defined field|unrecognized|No such file or directory)"
+ with self.assertRaisesRegex(GLib.GError, message):
+ # Cannot retrieve sanitize log on a nvme target loop devices
+ BlockDev.nvme_get_sanitize_log(self.nvme_dev)
+
diff --git a/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-skip-vdo.patch b/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-skip-vdo.patch
new file mode 100644
index 000000000000..d6a3ae77bd7b
--- /dev/null
+++ b/sys-libs/libblockdev/files/libblockdev-3.3.0-tests-skip-vdo.patch
@@ -0,0 +1,44 @@
+https://github.com/storaged-project/libblockdev/commit/08a78e8bb33963f0221af08cb115ecf83ecba74e
+
+From 08a78e8bb33963f0221af08cb115ecf83ecba74e Mon Sep 17 00:00:00 2001
+From: Vojtech Trefny <vtrefny@redhat.com>
+Date: Thu, 27 Feb 2025 07:42:40 +0100
+Subject: [PATCH] tests: Skip LVM VDO tests if 'vdoformat' is not available
+
+LVM VDO still uses the vdoformat binary which might not be
+available everywhere.
+
+Related: https://github.com/storaged-project/udisks/issues/1353
+---
+ tests/lvm_dbus_tests.py | 3 +++
+ tests/lvm_test.py | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/tests/lvm_dbus_tests.py b/tests/lvm_dbus_tests.py
+index 644d3587..f28e0a79 100644
+--- a/tests/lvm_dbus_tests.py
++++ b/tests/lvm_dbus_tests.py
+@@ -2116,6 +2116,9 @@ def setUpClass(cls):
+ if lvm_version < Version("2.3.07"):
+ raise unittest.SkipTest("LVM version 2.3.07 or newer needed for LVM VDO.")
+
++ if not shutil.which("vdoformat"):
++ raise unittest.SkipTest("vdoformat executable not found in $PATH, skipping.")
++
+ super().setUpClass()
+
+ def setUp(self):
+diff --git a/tests/lvm_test.py b/tests/lvm_test.py
+index 038e580d..0d7fe56f 100644
+--- a/tests/lvm_test.py
++++ b/tests/lvm_test.py
+@@ -1986,6 +1986,9 @@ def setUpClass(cls):
+ if lvm_version < Version("2.3.07"):
+ raise unittest.SkipTest("LVM version 2.3.07 or newer needed for LVM VDO.")
+
++ if not shutil.which("vdoformat"):
++ raise unittest.SkipTest("vdoformat executable not found in $PATH, skipping.")
++
+ super().setUpClass()
+
+ def setUp(self):
diff --git a/sys-libs/libblockdev/libblockdev-3.3.0.ebuild b/sys-libs/libblockdev/libblockdev-3.3.0.ebuild
new file mode 100644
index 000000000000..a9e3c3e39b47
--- /dev/null
+++ b/sys-libs/libblockdev/libblockdev-3.3.0.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+inherit autotools python-single-r1 xdg-utils
+
+DESCRIPTION="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="
+ dev-build/autoconf-archive
+ "
+else
+ SRC_URI="https://github.com/storaged-project/${PN}/releases/download/${PV}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+LICENSE="LGPL-2+"
+SLOT="0/3" # subslot is SOVERSION
+IUSE="+cryptsetup device-mapper escrow gtk-doc introspection lvm +nvme python smart test +tools"
+RESTRICT="!test? ( test )"
+
+# sys-fs/e2fsprogs: required by --with-fs
+# virtual/libudev: required at top-level
+RDEPEND="
+ >=dev-libs/glib-2.42.2
+ dev-libs/libbytesize
+ sys-apps/gptfdisk
+ >=sys-apps/kmod-19
+ >=sys-apps/util-linux-2.27
+ sys-fs/e2fsprogs:=
+ virtual/libudev:=
+ cryptsetup? (
+ >=sys-apps/keyutils-1.5.0:=
+ >=sys-fs/cryptsetup-2.7.0:=
+ escrow? (
+ >=dev-libs/nss-3.18.0
+ dev-libs/volume_key
+ )
+ )
+ device-mapper? ( sys-fs/lvm2 )
+ lvm? (
+ sys-fs/lvm2
+ virtual/udev
+ )
+ nvme? ( sys-libs/libnvme )
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ ')
+ )
+ tools? (
+ >=sys-block/parted-3.1
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND+="
+ dev-build/gtk-doc-am
+ gtk-doc? ( dev-util/gtk-doc )
+ introspection? ( >=dev-libs/gobject-introspection-1.3.0 )
+ test? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-libs/libbytesize[python,${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ ')
+ sys-apps/lsb-release
+ sys-block/targetcli-fb
+ )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ test? ( ${PYTHON_REQUIRED_USE} )
+ escrow? ( cryptsetup )
+ test? ( introspection lvm )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.4-add-non-systemd-method-for-distro-info.patch"
+ "${FILESDIR}/${PN}-3.3.0-fix-bashism.patch"
+ "${FILESDIR}/${PN}-3.3.0-tests-skip-vdo.patch"
+ "${FILESDIR}/${PN}-3.3.0-tests-nvme.patch"
+)
+
+pkg_setup() {
+ if use python || use test ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+
+ xdg_environment_reset # bug #623992
+
+ # bug #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
+ --without-mpath
+ --without-nvdimm
+ # dev-libs/libatasmart is inactive upstream, so we just
+ # have USE=smart control sys-apps/smartmontools use.
+ --without-smart
+
+ $(use_enable introspection)
+ $(use_enable test tests)
+ $(use_with cryptsetup crypto)
+ $(use_with device-mapper dm)
+ $(use_with escrow)
+ $(use_with gtk-doc)
+ $(use_with lvm lvm)
+ $(use_with lvm lvm-dbus)
+ $(use_with nvme)
+ $(use_with python python3)
+ $(use_with smart smartmontools)
+ $(use_with tools)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ # See http://storaged.org/libblockdev/ch03.html
+ # Largest subset which doesn't require root priviledges
+ "${EPYTHON}" tests/run_tests.py --include-tags extradeps sourceonly || die
+}
+
+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
+
+ # bug #718576
+ if use python ; then
+ python_optimize
+ fi
+}
diff --git a/sys-libs/libblockdev/metadata.xml b/sys-libs/libblockdev/metadata.xml
index 9480156e8732..a2844378febd 100644
--- a/sys-libs/libblockdev/metadata.xml
+++ b/sys-libs/libblockdev/metadata.xml
@@ -11,6 +11,7 @@
<flag name="kbd">Enable kernel block device support.</flag>
<flag name="lvm">Enable support for Logical Volume Management via <pkg>sys-fs/lvm2</pkg>.</flag>
<flag name="nvme">Add nvme support via <pkg>sys-libs/libnvme</pkg></flag>
+ <flag name="smart">Add SMART support via <pkg>sys-apps/smartmontools</pkg></flag>
<flag name="tools">Build tools</flag>
<flag name="vdo">Enable Virtual Data Optimizer support.</flag>
</use>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libblockdev/files/, sys-libs/libblockdev/
@ 2025-06-18 4:34 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-06-18 4:34 UTC (permalink / raw
To: gentoo-commits
commit: 16072fc78769f65e1a5af36aefeaf4f88f4aefb1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 18 04:28:43 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 18 04:33:18 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16072fc7
sys-libs/libblockdev: patch CVE-2025-6019
Quoting myself on the bug:
> This is from https://www.openwall.com/lists/oss-security/2025/06/17/4 but
> it's a little complicated in that it relies on a privilege escalation bug
> from unprivileged -> polkit 'allow_active' (bug 958338) that we aren't
> affected by.
>
> But nonetheless, supposing such another such LPE exists, this could form
> part of a chain from 'allow_active' -> root, so it still matters.
My intention is not to rush stabling 3.3.0 as just bumped to it (that
commit bumping to 3.3.0 lands in the same push as this) and we were
a bit behind before so want to give a little bit of time for any regressions
to be reported. Combined with the above, we don't need to hurry s.t. we do
it with no time in ~arch at all.
Bug: https://bugs.gentoo.org/958338
Bug: https://bugs.gentoo.org/958339
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/libblockdev-3.3.0-CVE-2025-6019.patch | 24 ++++++++++++++++++++++
sys-libs/libblockdev/libblockdev-3.3.0.ebuild | 1 +
2 files changed, 25 insertions(+)
diff --git a/sys-libs/libblockdev/files/libblockdev-3.3.0-CVE-2025-6019.patch b/sys-libs/libblockdev/files/libblockdev-3.3.0-CVE-2025-6019.patch
new file mode 100644
index 000000000000..f893e0ab00e9
--- /dev/null
+++ b/sys-libs/libblockdev/files/libblockdev-3.3.0-CVE-2025-6019.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/958339
+https://www.openwall.com/lists/oss-security/2025/06/17/5
+https://www.openwall.com/lists/oss-security/2025/06/17/5/1
+
+From 8e072f794744bd17c57cceabb3884d3f0f6a1602 Mon Sep 17 00:00:00 2001
+From: Thomas Blume <Thomas.Blume@suse.com>
+Date: Fri, 16 May 2025 14:27:10 +0200
+Subject: [PATCH] dont allow suid and dev set on fs resize
+
+--- a/src/plugins/fs/generic.c
++++ b/src/plugins/fs/generic.c
+@@ -683,7 +683,9 @@ static gchar* fs_mount (const gchar *device, gchar *fstype, gboolean read_only,
+ "Failed to create temporary directory for mounting '%s'.", device);
+ return NULL;
+ }
+- ret = bd_fs_mount (device, mountpoint, fstype, read_only ? "ro" : NULL, NULL, &l_error);
++
++ ret = bd_fs_mount (device, mountpoint, fstype, read_only ? "nosuid,nodev,ro" : "nosuid,nodev", NULL, &l_error);
++
+ if (!ret) {
+ g_propagate_prefixed_error (error, l_error, "Failed to mount '%s': ", device);
+ g_rmdir (mountpoint);
+--
+2.48.1
diff --git a/sys-libs/libblockdev/libblockdev-3.3.0.ebuild b/sys-libs/libblockdev/libblockdev-3.3.0.ebuild
index a9e3c3e39b47..be228419698f 100644
--- a/sys-libs/libblockdev/libblockdev-3.3.0.ebuild
+++ b/sys-libs/libblockdev/libblockdev-3.3.0.ebuild
@@ -88,6 +88,7 @@ PATCHES=(
"${FILESDIR}/${PN}-3.3.0-fix-bashism.patch"
"${FILESDIR}/${PN}-3.3.0-tests-skip-vdo.patch"
"${FILESDIR}/${PN}-3.3.0-tests-nvme.patch"
+ "${FILESDIR}/${PN}-3.3.0-CVE-2025-6019.patch"
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-18 4:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-12 18:44 [gentoo-commits] repo/gentoo:master commit in: sys-libs/libblockdev/files/, sys-libs/libblockdev/ Lars Wendler
-- strict thread matches above, loose matches on Subject: below --
2020-09-23 13:06 Lars Wendler
2025-06-18 4:34 Sam James
2025-06-18 4:34 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox