Skip to contentSkip to conversation

package/udisks: bump version to 2.9.0

PATCH Superseded aduskett at gmail.com 2 participants 16 messages Jul 24, 2020 – Jul 25, 2020

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover package/udisks: bump version to 2.9.0

From: Adam Duskett <[email protected]>

Hello again!

Round 2 of this patch series is now out, and with it brings some changes.

First off, I stripped out all of the dependencies from libblocksize and libbytesize, and rebuilt the packages from the ground up, ensuring that only the bare minimum dependencies are selected.

I found that the problem building udisks on older distributions was NOT due to a polkit being too old or not being present, but instead, it is due to host-gettext-gnu's msgfmt utility attempting to use the host /usr/share/gettext directory, which may or may not exist.

To fix udisks failing to build on older distributions when NLS support is enabled, the first patch adds a small msgfmt wrapper which exports GETTEXTDATADIR to "${TARGET_DIR}/usr/share/gettext/"
before calling msgfmt.real. This wrapper is installed with a post-install hook.

This problem does not happen with gettext-tiny as it has its own msgfmt, which works correctly.

I broke up the plugin selection quite a bit more and added a patch per plugin for the libblockdev package, which should be even MORE pleasing to Thomas!

I have not included introspection patches, I will wait until this patch series is implemented.

Thanks again for the feedback and help!

Adam

Adam Duskett (13):
package/gettext-gnu: add msgfmt wrapper package/libblockdev: new package package/libbytesize: new package package/libblockdev: add crypto plugin support package/libblockdev: add support for fs plugin package/libblockdev: add support for loop plugin package/libblockdev: add support for lvm plugin package/libblockdev: add support for mdraid plugin package/libblockdev: add support for parted plugin package/libblockdev: add support for swap plugin package/udisks/Config.in: alphabatize package selection package/udisks/udisks.mk: alphabatize dependencies package/udisks: bump version to 2.9.0

 DEVELOPERS                                    |  2 +
 package/Config.in                             |  1 +
 package/gettext-gnu/gettext-gnu.mk            | 13 +++
 package/gettext-gnu/msgfmt                    |  3 +
 package/libblockdev/Config.in                 | 69 ++++++++++++++++
 package/libblockdev/libblockdev.hash          |  3 +
 package/libblockdev/libblockdev.mk            | 79 ++++++++++++++++++
 .../0001-remove-msgcat-dependency.patch       | 36 +++++++++
 package/libbytesize/Config.in                 | 10 +++
 package/libbytesize/libbytesize.hash          |  3 +
 package/libbytesize/libbytesize.mk            | 27 +++++++
 ...-fix-build-with-newer-glibc-versions.patch | 29 -------
 .../0002-Fix-systemd-service-file.patch       | 33 --------
 ...issue-with-missing-sys-sysmacros.h-i.patch | 81 -------------------
 package/udisks/Config.in                      | 20 ++++-
 package/udisks/udisks.hash                    |  4 +-
 package/udisks/udisks.mk                      | 36 ++++++---
 17 files changed, 289 insertions(+), 160 deletions(-)
 create mode 100644 package/gettext-gnu/msgfmt
 create mode 100644 package/libblockdev/Config.in
 create mode 100644 package/libblockdev/libblockdev.hash
 create mode 100644 package/libblockdev/libblockdev.mk
 create mode 100644 package/libbytesize/0001-remove-msgcat-dependency.patch
 create mode 100644 package/libbytesize/Config.in
 create mode 100644 package/libbytesize/libbytesize.hash
 create mode 100644 package/libbytesize/libbytesize.mk
 delete mode 100644 package/udisks/0001-fix-build-with-newer-glibc-versions.patch
 delete mode 100644 package/udisks/0002-Fix-systemd-service-file.patch
 delete mode 100644 package/udisks/0003-Fix-compilation-issue-with-missing-sys-sysmacros.h-i.patch
Signature · 1 line
2.26.2
#1 lore raw

PATCH v2 1/13 package/gettext-gnu: add msgfmt wrapper

From: Adam Duskett <[email protected]>

The msgfmt provided by gettext-gnu uses a default GETTEXTDATADIR path of /usr/share/gettext, causing problems with msgfmt, particularly if the host does not have gettext development packages installed, or if the host has a different version of gettext. Install a wrapper that sets the GETTEXTDATADIR to ${TARGET_DIR}/usr/share/gettext/ to ensure that any package using the msgfmt utility uses the proper GETTEXTDATADIR path.

This wrapper is not needed for gettext-tiny, as their implimentation of msgfmt is written completely from scratch and does not use the GETTEXTDATADIR variable.

---
 package/gettext-gnu/gettext-gnu.mk | 13 +++++++++++++
 package/gettext-gnu/msgfmt         |  3 +++
 2 files changed, 16 insertions(+)
 create mode 100644 package/gettext-gnu/msgfmt
package/gettext-gnu/gettext-gnu.mk +13 -0
index ee7e97baf7..0b25203b5c 100644
@@ -87,6 +87,19 @@ define HOST_GETTEXT_GNU_GETTEXTIZE_CONFIRMATION
 endef
 HOST_GETTEXT_GNU_POST_INSTALL_HOOKS += HOST_GETTEXT_GNU_GETTEXTIZE_CONFIRMATION
 
+# The msgfmt provided by gettext-gnu uses a default GETTEXTDATADIR path of
+# /usr/share/gettext, causing problems with msgfmt, particularly if the host
+# does not have gettext development packages installed, or if the host has a
+# different version of gettext. Install a wrapper that sets the GETTEXTDATADIR
+# to ${TARGET_DIR}/usr/share/gettext/ to ensure that any package using the
+# msgfmt utility uses the proper GETTEXTDATADIR path.
+define GETTEXT_GNU_INSTALL_MSGFMT_WRAPPER
+	mv $(HOST_DIR)/bin/msgfmt $(HOST_DIR)/bin/msgfmt.real
+	$(INSTALL) -D -m 755 \
+			$(GETTEXT_GNU_PKGDIR)/msgfmt $(HOST_DIR)/bin/msgfmt
+endef
+HOST_GETTEXT_GNU_POST_INSTALL_HOOKS += GETTEXT_GNU_INSTALL_MSGFMT_WRAPPER
+
 # autoreconf expects gettextize to install ABOUT-NLS, but it only gets
 # installed by gettext-runtime which we don't build/install for the
 # host, so do it manually
package/gettext-gnu/msgfmt new file +3 -0
new file mode 100644
index 0000000000..06f1a523da
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+GETTEXTDATADIR="${TARGET_DIR}/usr/share/gettext/" ${HOST_DIR}/bin/msgfmt.real "${@}"
Signature · 1 line
2.26.2
#2 lore raw

PATCH v2 2/13 package/libblockdev: new package

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

libblockdev is a C library supporting GObject introspection for manipulation of block devices. It has a plugin-based architecture where each technology (like LVM, Btrfs, MD RAID, Swap,...) is implemented in a separate plugin, possibly with multiple implementations.

Gobject-introspection is not a strict dependency and may be disabled via a configure flag.

This is the base package with everything disabled, the subsequent patches in this series will add more options necessary to bump udisk to the latest

---
Changes V1 -> v2:
- Rework dependencies. (Thomas)

 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/libblockdev/Config.in        | 22 ++++++++++++++++
 package/libblockdev/libblockdev.hash |  3 +++
 package/libblockdev/libblockdev.mk   | 39 ++++++++++++++++++++++++++++
 5 files changed, 66 insertions(+)
 create mode 100644 package/libblockdev/Config.in
 create mode 100644 package/libblockdev/libblockdev.hash
 create mode 100644 package/libblockdev/libblockdev.mk
DEVELOPERS +1 -0
index 043e8ce3f4..cd489754ed 100644
@@ -43,6 +43,7 @@ F:	package/gstreamer1/gst1-vaapi/
 F:	package/imx-usb-loader/
 F:	package/janus-gateway/
 F:	package/json-for-modern-cpp/
+F:	package/libblockdev/
 F:	package/libcpprestsdk/
 F:	package/libcutl/
 F:	package/libodb/
package/Config.in +1 -0
index e6500123f6..faf3768a96 100644
@@ -1493,6 +1493,7 @@ menu "Hardware handling"
 	source "package/let-me-create/Config.in"
 	source "package/libaio/Config.in"
 	source "package/libatasmart/Config.in"
+	source "package/libblockdev/Config.in"
 	source "package/libcec/Config.in"
 	source "package/libfreefare/Config.in"
 	source "package/libftdi/Config.in"
package/libblockdev/Config.in new file +22 -0
new file mode 100644
index 0000000000..4fd80f1f5c
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_LIBBLOCKDEV
+	bool "libblockdev"
+	depends on !BR2_STATIC_LIBS # kmod
+	depends on BR2_USE_WCHAR # libglib2 -> gettext
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	depends on BR2_USE_MMU # fork() # libglib2
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_KMOD
+	help
+	  libblockdev is a C library supporting GObject introspection
+	  for manipulation of block devices. It has a plugin-based
+	  architecture where each technology (like LVM, Btrfs, MD RAID,
+	  Swap,...) is implemented in a separate plugin, possibly with
+	  multiple implementations.
+
+	  https://github.com/storaged-project/libblockdev/
+
+comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
+	depends on BR2_USE_MMU
+	depends on !BR2_PACKAGE_HAS_UDEV
+	depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || BR2_TOOLCHAIN_HAS_THREADS
package/libblockdev/libblockdev.hash new file +3 -0
new file mode 100644
index 0000000000..1c4b1ec7bf
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  dc207c70dbef52c818a8abbcb6b8e298a6b63c0b78a5e1f2773b5f7b89300773  libblockdev-2.24.tar.gz
+sha256  97bdc721d875501b6243a456333fdfdb1ab64d31c4da2554de845caf4674b946  LICENSE
package/libblockdev/libblockdev.mk new file +39 -0
new file mode 100644
index 0000000000..3040a2a690
@@ -0,0 +1,39 @@
+################################################################################
+#
+# libblockdev
+#
+################################################################################
+
+LIBBLOCKDEV_VERSION = 2.24
+LIBBLOCKDEV_SITE = https://github.com/storaged-project/libblockdev/releases/download/$(LIBBLOCKDEV_VERSION)-1
+LIBBLOCKDEV_LICENSE = LGPL-2.1
+LIBBLOCKDEV_LICENSE_FILES = LICENSE
+LIBBLOCKDEV_INSTALL_STAGING = YES
+LIBBLOCKDEV_DEPENDENCIES = host-pkgconf libglib2 kmod udev
+
+LIBBLOCKDEV_CONF_OPTS = \
+	--disable-introspection \
+	--with-loop \
+	--without-bcache \
+	--without-btrfs \
+	--without-crypto \
+	--without-dm \
+	--without-dmraid \
+	--without-escrow \
+	--without-fs \
+	--without-kbd \
+	--without-loop \
+	--without-lvm \
+	--without-lvm_dbus \
+	--without-mdraid \
+	--without-mpath \
+	--without-nvdimm \
+	--without-parted \
+	--without-python2 \
+	--without-python3 \
+	--without-s390 \
+	--without-swap \
+	--without-tools \
+	--without-vdo
+
+$(eval $(autotools-package))
Signature · 1 line
2.26.2
#3 lore raw

PATCH v2 3/13 package/libbytesize: new package

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

Libbytesize is a small library providing a C "class" for working with arbitrary big sizes in bytes.

The mdraid plugin for libblockdev depends on this package, which newer versions of udisks require when building with the udisks daemon enabled.

---
Changes v1 -> v2:
- Add 0001-remove-msgcat-dependency.patch (Thomas)
- Remove dependency on gettext-gnu (Thomas)

 DEVELOPERS                                    |  1 +
 .../0001-remove-msgcat-dependency.patch       | 36 +++++++++++++++++++
 package/libbytesize/Config.in                 | 10 ++++++
 package/libbytesize/libbytesize.hash          |  3 ++
 package/libbytesize/libbytesize.mk            | 27 ++++++++++++++
 5 files changed, 77 insertions(+)
 create mode 100644 package/libbytesize/0001-remove-msgcat-dependency.patch
 create mode 100644 package/libbytesize/Config.in
 create mode 100644 package/libbytesize/libbytesize.hash
 create mode 100644 package/libbytesize/libbytesize.mk
DEVELOPERS +1 -0
index cd489754ed..72216b8fce 100644
@@ -44,6 +44,7 @@ F:	package/imx-usb-loader/
 F:	package/janus-gateway/
 F:	package/json-for-modern-cpp/
 F:	package/libblockdev/
+F:	package/libbytesize/
 F:	package/libcpprestsdk/
 F:	package/libcutl/
 F:	package/libodb/
package/libbytesize/0001-remove-msgcat-dependency.patch new file +36 -0
new file mode 100644
index 0000000000..4c9b96020e
@@ -0,0 +1,36 @@
+From ac16b1a905dbdb06ac7bba6ac105686aa7958093 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Fri, 24 Jul 2020 11:49:14 -0700
+Subject: [PATCH] remove msgcat dependency
+
+Gettext-tiny does not include the msgcat utility, which causes issues when
+building libbytesize for embedded systems, as many embedded systems do not
+build the full gettext, but instead use the gettext-tiny library.
+
+Because msgcat is not needed to build libbytesize, it's safe to remove the
+dependency.
+
+Upstream-status: pending
+https://github.com/storaged-project/libbytesize/pull/76
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2ec4062..7d7f218 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -13,8 +13,7 @@ AC_CONFIG_MACRO_DIR([m4])
+ AC_PATH_PROG([XGETTEXT], [xgettext])
+ AC_PATH_PROG([MSGFMT], [msgfmt])
+ AC_PATH_PROG([MSGMERGE], [msgmerge])
+-AC_PATH_PROG([MSGCAT], [msgcat])
+-AS_IF([test -z "$XGETTEXT" -o -z "$MSGFMT" -o -z "$MSGMERGE" -o -z "$MSGCAT"],
++AS_IF([test -z "$XGETTEXT" -o -z "$MSGFMT" -o -z "$MSGMERGE"],
+       [AC_MSG_FAILURE([gettext not found])])
+ 
+ # Define this so gettext.h works without requiring the whole gettext macro
+-- 
+2.26.2
+
package/libbytesize/Config.in new file +10 -0
new file mode 100644
index 0000000000..6cc550e488
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LIBBYTESIZE
+	bool "libbytesize"
+	select BR2_PACKAGE_GMP
+	select BR2_PACKAGE_MPFR
+	select BR2_PACKAGE_PCRE2
+	help
+	  A tiny library that facilitates the common operations with
+	  sizes in bytes
+
+	  https://github.com/storaged-project/libbytesize/
package/libbytesize/libbytesize.hash new file +3 -0
new file mode 100644
index 0000000000..34cb3b210f
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  3c74113fc8cd1a2fbd8870fa0ed7cef2ef24d60ef91e7145fbc041f9aa144479  libbytesize-2.3.tar.gz
+sha256  97bdc721d875501b6243a456333fdfdb1ab64d31c4da2554de845caf4674b946  LICENSE
package/libbytesize/libbytesize.mk new file +27 -0
new file mode 100644
index 0000000000..b1309c1731
@@ -0,0 +1,27 @@
+################################################################################
+#
+# libbytesize
+#
+################################################################################
+
+LIBBYTESIZE_VERSION = 2.3
+LIBBYTESIZE_SITE = https://github.com/storaged-project/libbytesize/releases/download/$(LIBBYTESIZE_VERSION)
+LIBBYTESIZE_LICENSE = LGPL-2.1+
+LIBBYTESIZE_LICENSE_FILES = LICENSE
+LIBBYTESIZE_INSTALL_STAGING = YES
+
+# 0001-remove-msgcat-dependency.patch
+LIBBYTESIZE_AUTORECONF = YES
+
+LIBBYTESIZE_DEPENDENCIES = \
+	host-pkgconf \
+	host-gettext \
+	gmp \
+	mpfr \
+	pcre2
+
+LIBBYTESIZE_CONF_OPTS += \
+	--without-python3 \
+	--without-tools
+
+$(eval $(autotools-package))
Signature · 1 line
2.26.2
#4 lore raw

PATCH v2 4/13 package/libblockdev: add support for crypto plugin

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

---
Changes v1 -> v2:
- Only depend on and select the cryptsetup package.
The volume-key and libnss packages are only necessary if --with-escrow is passed as a conf opt.

 package/libblockdev/Config.in      | 11 +++++++++++
 package/libblockdev/libblockdev.mk |  8 +++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +11 -0
index 4fd80f1f5c..50c84c0c4d 100644
@@ -16,6 +16,17 @@ config BR2_PACKAGE_LIBBLOCKDEV
 
 	  https://github.com/storaged-project/libblockdev/
 
+if BR2_PACKAGE_LIBBLOCKDEV
+
+comment "plugins"
+
+config BR2_PACKAGE_LIBBLOCKDEV_CRYPTO
+	bool "crypto"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # cryptsetup -> json-c
+	select BR2_PACKAGE_CRYPTSETUP
+
+endif
+
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
 	depends on BR2_USE_MMU
 	depends on !BR2_PACKAGE_HAS_UDEV
package/libblockdev/libblockdev.mk +7 -1
index 3040a2a690..bb6fbcdda1 100644
@@ -16,7 +16,6 @@ LIBBLOCKDEV_CONF_OPTS = \
 	--with-loop \
 	--without-bcache \
 	--without-btrfs \
-	--without-crypto \
 	--without-dm \
 	--without-dmraid \
 	--without-escrow \
@@ -36,4 +35,11 @@ LIBBLOCKDEV_CONF_OPTS = \
 	--without-tools \
 	--without-vdo
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_CRYPTO),y)
+LIBBLOCKDEV_DEPENDENCIES += cryptsetup
+LIBBLOCKDEV_CONF_OPTS += --with-crypto
+else
+LIBBLOCKDEV_CONF_OPTS += --without-crypto
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.26.2
#5 lore raw

PATCH v2 5/13 package/libblockdev: add support for fs plugin

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

---
Changes v1 -> v2:
- Change BR2_PACKAGE_UTIL_LINUX_LIBMOUNT to BR2_PACKAGE_PARTED which is the proper dependency on this plugin.

 package/libblockdev/Config.in      | 8 ++++++++
 package/libblockdev/libblockdev.mk | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +8 -0
index 50c84c0c4d..a514f01875 100644
@@ -25,6 +25,14 @@ config BR2_PACKAGE_LIBBLOCKDEV_CRYPTO
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # cryptsetup -> json-c
 	select BR2_PACKAGE_CRYPTSETUP
 
+config BR2_PACKAGE_LIBBLOCKDEV_FS
+	bool "filesystem"
+	depends on BR2_ENABLE_LOCALE # parted
+	select BR2_PACKAGE_PARTED
+
+comment "filesystem plugin needs a toolchain w/ locale"
+	depends on !BR2_ENABLE_LOCALE
+
 endif
 
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
package/libblockdev/libblockdev.mk +7 -1
index bb6fbcdda1..7cb5ceb9bb 100644
@@ -19,7 +19,6 @@ LIBBLOCKDEV_CONF_OPTS = \
 	--without-dm \
 	--without-dmraid \
 	--without-escrow \
-	--without-fs \
 	--without-kbd \
 	--without-loop \
 	--without-lvm \
@@ -42,4 +41,11 @@ else
 LIBBLOCKDEV_CONF_OPTS += --without-crypto
 endif
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_FS),y)
+LIBBLOCKDEV_DEPENDENCIES += parted
+LIBBLOCKDEV_CONF_OPTS += --with-fs
+else
+LIBBLOCKDEV_CONF_OPTS += --without-fs
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.26.2
#6 lore raw

PATCH v2 6/13 package/libblockdev: add support for loop plugin

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

---
 package/libblockdev/Config.in      | 3 +++
 package/libblockdev/libblockdev.mk | 7 ++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +3 -0
index a514f01875..6f0b3435fe 100644
@@ -33,6 +33,9 @@ config BR2_PACKAGE_LIBBLOCKDEV_FS
 comment "filesystem plugin needs a toolchain w/ locale"
 	depends on !BR2_ENABLE_LOCALE
 
+config BR2_PACKAGE_LIBBLOCKDEV_LOOP
+	bool "loop"
+
 endif
 
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
package/libblockdev/libblockdev.mk +6 -1
index 7cb5ceb9bb..fddf7e2e87 100644
@@ -20,7 +20,6 @@ LIBBLOCKDEV_CONF_OPTS = \
 	--without-dmraid \
 	--without-escrow \
 	--without-kbd \
-	--without-loop \
 	--without-lvm \
 	--without-lvm_dbus \
 	--without-mdraid \
@@ -48,4 +47,10 @@ else
 LIBBLOCKDEV_CONF_OPTS += --without-fs
 endif
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_LOOP),y)
+LIBBLOCKDEV_CONF_OPTS += --with-loop
+else
+LIBBLOCKDEV_CONF_OPTS += --without-loop
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.26.2
#7 lore raw

PATCH v2 7/13 package/libblockdev: add support for lvm plugin

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

---
 package/libblockdev/Config.in      | 9 +++++++++
 package/libblockdev/libblockdev.mk | 8 +++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +9 -0
index 6f0b3435fe..9da9685bd9 100644
@@ -36,6 +36,15 @@ comment "filesystem plugin needs a toolchain w/ locale"
 config BR2_PACKAGE_LIBBLOCKDEV_LOOP
 	bool "loop"
 
+config BR2_PACKAGE_LIBBLOCKDEV_LVM2
+	bool "lvm2"
+	depends on BR2_ENABLE_LOCALE # parted
+	select BR2_PACKAGE_PARTED
+	select BR2_PACKAGE_LVM2
+
+comment "lvm2 support needs a toolchain w/ locale"
+	depends on !BR2_ENABLE_LOCALE
+
 endif
 
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
package/libblockdev/libblockdev.mk +7 -1
index fddf7e2e87..9362fc10ec 100644
@@ -20,7 +20,6 @@ LIBBLOCKDEV_CONF_OPTS = \
 	--without-dmraid \
 	--without-escrow \
 	--without-kbd \
-	--without-lvm \
 	--without-lvm_dbus \
 	--without-mdraid \
 	--without-mpath \
@@ -53,4 +52,11 @@ else
 LIBBLOCKDEV_CONF_OPTS += --without-loop
 endif
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_LVM2),y)
+LIBBLOCKDEV_DEPENDENCIES += lvm2
+LIBBLOCKDEV_CONF_OPTS += --with-lvm
+else
+LIBBLOCKDEV_CONF_OPTS += --without-lvm
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.26.2
#8 lore raw

PATCH v2 7/13 package/libblockdev: add support for lvm plugin

Quoted 13 lines · On Fri, 24 Jul 2020 16:25:55 -0700 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

---
 package/libblockdev/Config.in      | 9 +++++++++
 package/libblockdev/libblockdev.mk | 8 +++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +0 -0
index 6f0b3435fe..9da9685bd9 100644

package/libblockdev/Config.in comment "filesystem plugin needs a toolchain w/ locale" · line 42

Quoted 7 lines
package/libblockdev/Config.in +4 -0
@@ -36,6 +36,15 @@ comment "filesystem plugin needs a toolchain w/ locale"
 config BR2_PACKAGE_LIBBLOCKDEV_LOOP
 	bool "loop"
 
+config BR2_PACKAGE_LIBBLOCKDEV_LVM2
+	bool "lvm2"
+	depends on BR2_ENABLE_LOCALE # parted
+	select BR2_PACKAGE_PARTED

You're selecting parted here.

package/libblockdev/Config.in comment "filesystem plugin needs a toolchain w/ locale" · line 44

Quoted 2 lines
package/libblockdev/Config.in +2 -0
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_LVM2),y)
+LIBBLOCKDEV_DEPENDENCIES += lvm2

but don't make it a build-time dependency here.

Could you clarify ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw

PATCH v2 8/13 package/libblockdev: add support for mdraid plugin

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

---
 package/libblockdev/Config.in      | 4 ++++
 package/libblockdev/libblockdev.mk | 8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +4 -0
index 9da9685bd9..c51449b6ca 100644
@@ -45,6 +45,10 @@ config BR2_PACKAGE_LIBBLOCKDEV_LVM2
 comment "lvm2 support needs a toolchain w/ locale"
 	depends on !BR2_ENABLE_LOCALE
 
+config BR2_PACKAGE_LIBBLOCKDEV_MDRAID
+	bool "mdraid"
+	select BR2_PACKAGE_LIBBYTESIZE
+
 endif
 
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
package/libblockdev/libblockdev.mk +7 -1
index 9362fc10ec..3b5bf00b90 100644
@@ -21,7 +21,6 @@ LIBBLOCKDEV_CONF_OPTS = \
 	--without-escrow \
 	--without-kbd \
 	--without-lvm_dbus \
-	--without-mdraid \
 	--without-mpath \
 	--without-nvdimm \
 	--without-parted \
@@ -59,4 +58,11 @@ else
 LIBBLOCKDEV_CONF_OPTS += --without-lvm
 endif
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_MDRAID),y)
+LIBBLOCKDEV_CONF_OPTS += --with-mdraid
+LIBBLOCKDEV_DEPENDENCIES += libbytesize
+else
+LIBBLOCKDEV_CONF_OPTS += --without-mdraid
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.26.2
#10 lore raw

PATCH v2 9/13 package/libblockdev: add support for part plugin

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

---
 package/libblockdev/Config.in      | 8 ++++++++
 package/libblockdev/libblockdev.mk | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +8 -0
index c51449b6ca..82e317b25f 100644
@@ -49,6 +49,14 @@ config BR2_PACKAGE_LIBBLOCKDEV_MDRAID
 	bool "mdraid"
 	select BR2_PACKAGE_LIBBYTESIZE
 
+config BR2_PACKAGE_LIBBLOCKDEV_PART
+	bool "part"
+	depends on BR2_ENABLE_LOCALE # parted
+	select BR2_PACKAGE_PARTED
+
+comment "part plugin needs a toolchain w/ locale"
+	depends on !BR2_ENABLE_LOCALE
+
 endif
 
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
package/libblockdev/libblockdev.mk +7 -1
index 3b5bf00b90..16e1dc46c9 100644
@@ -23,7 +23,6 @@ LIBBLOCKDEV_CONF_OPTS = \
 	--without-lvm_dbus \
 	--without-mpath \
 	--without-nvdimm \
-	--without-parted \
 	--without-python2 \
 	--without-python3 \
 	--without-s390 \
@@ -65,4 +64,11 @@ else
 LIBBLOCKDEV_CONF_OPTS += --without-mdraid
 endif
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_PART),y)
+LIBBLOCKDEV_DEPENDENCIES += parted
+LIBBLOCKDEV_CONF_OPTS += --with-part
+else
+LIBBLOCKDEV_CONF_OPTS += --without-part
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.26.2
#11 lore raw

PATCH v2 10/13 package/libblockdev: add support for swap plugin

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

---
 package/libblockdev/Config.in      | 4 ++++
 package/libblockdev/libblockdev.mk | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +4 -0
index 82e317b25f..9d5d4e6071 100644
@@ -57,6 +57,10 @@ config BR2_PACKAGE_LIBBLOCKDEV_PARTED
 comment "part plugin needs a toolchain w/ locale"
 	depends on !BR2_ENABLE_LOCALE
 
+config BR2_PACKAGE_LIBBLOCKDEV_SWAP
+	bool "swap"
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+
 endif
 
 comment "libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library"
package/libblockdev/libblockdev.mk +6 -1
index 16e1dc46c9..83af24d727 100644
@@ -26,7 +26,6 @@ LIBBLOCKDEV_CONF_OPTS = \
 	--without-python2 \
 	--without-python3 \
 	--without-s390 \
-	--without-swap \
 	--without-tools \
 	--without-vdo
 
@@ -71,4 +70,10 @@ else
 LIBBLOCKDEV_CONF_OPTS += --without-part
 endif
 
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_SWAP),y)
+LIBBLOCKDEV_CONF_OPTS += --with-swap
+else
+LIBBLOCKDEV_CONF_OPTS += --without-swap
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.26.2
#12 lore raw

PATCH v2 10/13 package/libblockdev: add support for swap plugin

Quoted 13 lines · On Fri, 24 Jul 2020 16:25:58 -0700 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

---
 package/libblockdev/Config.in      | 4 ++++
 package/libblockdev/libblockdev.mk | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
package/libblockdev/Config.in +0 -0
index 82e317b25f..9d5d4e6071 100644

package/libblockdev/Config.in config BR2_PACKAGE_LIBBLOCKDEV_PARTED · line 62

Quoted 6 lines
package/libblockdev/Config.in +3 -0
@@ -57,6 +57,10 @@ config BR2_PACKAGE_LIBBLOCKDEV_PARTED
 comment "part plugin needs a toolchain w/ locale"
 	depends on !BR2_ENABLE_LOCALE
 
+config BR2_PACKAGE_LIBBLOCKDEV_SWAP
+	bool "swap"
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID

I think we should also select BR2_PACKAGE_UTIL_LINUX here.

package/libblockdev/Config.in config BR2_PACKAGE_LIBBLOCKDEV_PARTED · line 64

Quoted 2 lines
package/libblockdev/Config.in +2 -0
+ifeq ($(BR2_PACKAGE_LIBBLOCKDEV_SWAP),y)
+LIBBLOCKDEV_CONF_OPTS += --with-swap

No build-time dependency on util-linux ?

package/libblockdev/Config.in config BR2_PACKAGE_LIBBLOCKDEV_PARTED

Quoted 5 lines
package/libblockdev/Config.in +4 -0
+else
+LIBBLOCKDEV_CONF_OPTS += --without-swap
+endif
+
 $(eval $(autotools-package))

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#13 lore raw

PATCH v2 11/13 package/udisks/Config.in: alphabatize package selection

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

This patch makes the upcoming udisk2 version bump patch easier to read, and also fixes the Config.in, so it follows Buildroot's package guidelines.

---
 package/udisks/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
package/udisks/Config.in +4 -4
index 04a632dd8d..2c0d0dab52 100644
@@ -13,12 +13,12 @@ config BR2_PACKAGE_UDISKS
 	depends on !BR2_STATIC_LIBS # lvm2, spidermonkey
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_GLIB
-	select BR2_PACKAGE_SG3_UTILS
-	select BR2_PACKAGE_POLKIT
-	select BR2_PACKAGE_PARTED
-	select BR2_PACKAGE_LVM2
 	select BR2_PACKAGE_LIBATASMART
 	select BR2_PACKAGE_LIBGUDEV
+	select BR2_PACKAGE_LVM2
+	select BR2_PACKAGE_PARTED
+	select BR2_PACKAGE_POLKIT
+	select BR2_PACKAGE_SG3_UTILS
 	help
 	  The udisks project provides
 
Signature · 1 line
2.26.2
#14 lore raw

PATCH v2 12/13 package/udisks/udisks.mk: alphabatize dependencies

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

This patch makes the upcoming udisk2 version bump patch easier to read, and also fixes the udisks.mk, so it follows Buildroot's package guidelines.

Host packages are placed on top of the dependency list, followed by target dependencies.

---
 package/udisks/udisks.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
package/udisks/udisks.mk +6 -6
index fe8932a92e..c6119a8b80 100644
@@ -12,16 +12,16 @@ UDISKS_LICENSE_FILES = COPYING
 UDISKS_AUTORECONF = YES
 
 UDISKS_DEPENDENCIES = \
-	sg3_utils \
 	host-pkgconf \
-	udev \
 	dbus \
 	dbus-glib \
-	polkit \
-	parted \
-	lvm2 \
 	libatasmart \
-	libgudev
+	libgudev \
+	lvm2 \
+	parted \
+	polkit \
+	sg3_utils \
+	udev
 
 UDISKS_CONF_OPTS = --disable-remote-access --disable-man-pages
 
Signature · 1 line
2.26.2
#15 lore raw

PATCH v2 13/13 package/udisks: bump version to 2.9.0

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

Changes include:

- Remove upstream patches

Config.in:
- Add a dependency on BR2_TOOLCHAIN_HAS_SYNC_4

- Add a dependency on libblockdev and the following plugins:
- crypto
- fs
- loop
- mdraid
- part
-swap

- Add a dependency on util-linux and util-linux-mount

- Add a dependency on the libblockdev lvm2 plugin if lvm2 support is selected.

udisks.mk:
- Add a dependency on libblockdev

- Rework all of the configure options due to the update.

- Change the upstream URL from free desktop to Github.
Instead of using the GitHub macro, download the provided release tarball. Downloading the released tarball prevents having to use autoreconf.

- Remove UDISKS_AUTORECONF = YES as configure.ac is no longer patched.

- Add libblockdev as a dependency.

- Add $(TARGET_NLS_DEPENDENCIES) as a dependency.

- Disable all configure options except the udisks daemon by default.

---
Changes v1 -> v2:
- Remove dependency on host-polkit, as that was not the true cause of the issue. The true cause being gettext-gnu's msgfmt utility trying to use a host directory that may or may not exist.

- Add NLS support

 ...-fix-build-with-newer-glibc-versions.patch | 29 -------
 .../0002-Fix-systemd-service-file.patch       | 33 --------
 ...issue-with-missing-sys-sysmacros.h-i.patch | 81 -------------------
 package/udisks/Config.in                      | 12 +++
 package/udisks/udisks.hash                    |  4 +-
 package/udisks/udisks.mk                      | 26 ++++--
 6 files changed, 34 insertions(+), 151 deletions(-)
 delete mode 100644 package/udisks/0001-fix-build-with-newer-glibc-versions.patch
 delete mode 100644 package/udisks/0002-Fix-systemd-service-file.patch
 delete mode 100644 package/udisks/0003-Fix-compilation-issue-with-missing-sys-sysmacros.h-i.patch
package/udisks/0001-fix-build-with-newer-glibc-versions.patch deleted +0 -29
deleted file mode 100644
index 336fc440a6..0000000000
@@ -1,29 +0,0 @@
-Fix build with newer glibc versions
-
-This patch has been backported from upstream:
-
-http://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=9829152b12a8924d2e091a00133ed1a3a7ba75c0
-
-Signed-off-by: Vicente Olivert Riera <[email protected]>
-
-From 9829152b12a8924d2e091a00133ed1a3a7ba75c0 Mon Sep 17 00:00:00 2001
-From: Alexandre Rostovtsev <[email protected]>
-Date: Fri, 29 May 2015 21:09:39 -0400
-Subject: fix build with newer glibc versions
-
-https://bugs.freedesktop.org/show_bug.cgi?id=90778
-
-diff --git a/src/helpers/job-drive-detach.c b/src/helpers/job-drive-detach.c
-index eeafcab..d122a1f 100644
---- a/src/helpers/job-drive-detach.c
-+++ b/src/helpers/job-drive-detach.c
-@@ -18,6 +18,7 @@
-  *
-  */
- 
-+#include <sys/stat.h>
- #include <stdio.h>
- #include <string.h>
- #include <errno.h>
--- 
-cgit v0.10.2
package/udisks/0002-Fix-systemd-service-file.patch deleted +0 -33
deleted file mode 100644
index ea347aef73..0000000000
@@ -1,33 +0,0 @@
-From bf8b4362cef24a6f747e4329305a4939c8f585d1 Mon Sep 17 00:00:00 2001
-From: David King <[email protected]>
-Date: Thu, 2 Jul 2015 13:49:22 +0100
-Subject: [PATCH] Fix systemd service file
-
-udisks-daemon is installed to $(libexecdir), not $(prefix)/lib/udisks.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1238664
-https://bugs.freedesktop.org/show_bug.cgi?id=91191
-
-[This patch has been backported from upstream:
-https://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=bf8b4362cef24a6f747e4329305a4939c8f585d1]
-Signed-off-by: Pieterjan Camerlynck <[email protected]>
----
- data/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/data/Makefile.am b/data/Makefile.am
-index 411ea0f..08af5f4 100644
---- a/data/Makefile.am
-+++ b/data/Makefile.am
-@@ -31,7 +31,7 @@ systemdservicedir       = $(systemdsystemunitdir)
- systemdservice_DATA     = $(systemdservice_in_files:.service.in=.service)
- 
- $(systemdservice_DATA): $(systemdservice_in_files) Makefile
--	@sed -e "s|\@libexecdir\@|$(prefix)/lib/udisks|" $< > $@
-+	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
- endif
- 
- udevrulesdir = $(slashlibdir)/udev/rules.d
--- 
-2.7.4
-
package/udisks/0003-Fix-compilation-issue-with-missing-sys-sysmacros.h-i.patch deleted +0 -81

81 lines not on this page · raw message

package/udisks/Config.in +12 -0
index 2c0d0dab52..5e240031e8 100644
@@ -9,16 +9,26 @@ config BR2_PACKAGE_UDISKS
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # polkit
 	depends on BR2_USE_MMU # lvm2
 	depends on BR2_USE_WCHAR # dbus-glib -> glib2
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libblockdev -> cryptsetup -> json-c
 	depends on !BR2_TOOLCHAIN_USES_UCLIBC # polkit, lvm2, parted
 	depends on !BR2_STATIC_LIBS # lvm2, spidermonkey
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_GLIB
 	select BR2_PACKAGE_LIBATASMART
+	select BR2_PACKAGE_LIBBLOCKDEV
+	select BR2_PACKAGE_LIBBLOCKDEV_CRYPTO
+	select BR2_PACKAGE_LIBBLOCKDEV_FS
+	select BR2_PACKAGE_LIBBLOCKDEV_LOOP
+	select BR2_PACKAGE_LIBBLOCKDEV_MDRAID
+	select BR2_PACKAGE_LIBBLOCKDEV_PART
+	select BR2_PACKAGE_LIBBLOCKDEV_SWAP
 	select BR2_PACKAGE_LIBGUDEV
 	select BR2_PACKAGE_LVM2
 	select BR2_PACKAGE_PARTED
 	select BR2_PACKAGE_POLKIT
 	select BR2_PACKAGE_SG3_UTILS
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_MOUNT
 	help
 	  The udisks project provides
 
@@ -38,6 +48,7 @@ config BR2_PACKAGE_UDISKS_LVM2
 	# The lvm app library can't compile against musl
 	depends on BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_LVM2_APP_LIBRARY
+	select BR2_PACKAGE_LIBBLOCKDEV_LVM2
 	help
 	  Enable LVM2 support
 
@@ -53,6 +64,7 @@ comment "udisks needs udev /dev management"
 comment "udisks needs a glibc or musl toolchain with locale, C++, wchar, dynamic library, NPTL, gcc >= 4.9"
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on !BR2_ENABLE_LOCALE || BR2_TOOLCHAIN_USES_UCLIBC || \
 		!BR2_INSTALL_LIBSTDCPP || \
 		BR2_STATIC_LIBS || \
package/udisks/udisks.hash +2 -2
index b40161e323..7f81e5bbe5 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 f2ec82eb0ea7e01dc299b5b29b3c18cdf861236ec43dcff66b3552b4b31c6f71  udisks-1.0.5.tar.gz
-sha256 7d30f41a79a9b453b4972a6d7e3425ff104b39232891bde8ba659f1adb21f771  COPYING
+sha256  25b09265d71b9b97069e4a2fae10f696a851e0b812e69b20bcc4b23efee1ad34  udisks-2.9.0.tar.bz2
+sha256  98046e932dc6c739001e79d7079a3bd958fc55475dcd917d27f884c0c93525cc  COPYING
package/udisks/udisks.mk +20 -6
index c6119a8b80..7cff6d9bab 100644
@@ -4,26 +4,40 @@
 #
 ################################################################################
 
-UDISKS_VERSION = 1.0.5
-UDISKS_SITE = http://hal.freedesktop.org/releases
+UDISKS_VERSION = 2.9.0
+UDISKS_SOURCE = udisks-$(UDISKS_VERSION).tar.bz2
+UDISKS_SITE = https://github.com/storaged-project/udisks/releases/download/udisks-$(UDISKS_VERSION)
 UDISKS_LICENSE = GPL-2.0+
 UDISKS_LICENSE_FILES = COPYING
-# For 0002-Fix-systemd-service-file.patch
-UDISKS_AUTORECONF = YES
 
 UDISKS_DEPENDENCIES = \
 	host-pkgconf \
 	dbus \
 	dbus-glib \
 	libatasmart \
+	libblockdev \
 	libgudev \
 	lvm2 \
 	parted \
 	polkit \
 	sg3_utils \
-	udev
+	udev \
+	$(TARGET_NLS_DEPENDENCIES)
 
-UDISKS_CONF_OPTS = --disable-remote-access --disable-man-pages
+UDISKS_CONF_OPTS = \
+	--disable-acl \
+	--disable-bcache \
+	--disable-btrfs \
+	--disable-fhs-media \
+	--disable-introspection \
+	--disable-iscsi \
+	--disable-lsm \
+	--disable-lvm2 \
+	--disable-lvmcache \
+	--disable-man \
+	--disable-rpath \
+	--disable-vdo \
+	--disable-zram
 
 ifeq ($(BR2_PACKAGE_UDISKS_LVM2),y)
 UDISKS_CONF_OPTS += --enable-lvm2
Signature · 1 line
2.26.2