From b2903b64ab46f1e2909f27a4f660af980671ee02 Mon Sep 17 00:00:00 2001 From: Krish Jain Date: Sun, 16 Jul 2023 04:28:41 +0530 Subject: [PATCH] sys-fs/udisks: Add from Gentoo It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850. --- .../portage-stable/sys-fs/udisks/Manifest | 1 + .../udisks/files/udisks-2.9.4-undefined.patch | 143 +++++++++++++++++ .../portage-stable/sys-fs/udisks/metadata.xml | 18 +++ .../sys-fs/udisks/udisks-2.9.4-r3.ebuild | 150 ++++++++++++++++++ 4 files changed, 312 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/udisks/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/udisks/files/udisks-2.9.4-undefined.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/udisks/metadata.xml create mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/udisks/udisks-2.9.4-r3.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/udisks/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/udisks/Manifest new file mode 100644 index 0000000000..a888522f13 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/udisks/Manifest @@ -0,0 +1 @@ +DIST udisks-2.9.4.tar.bz2 1699288 BLAKE2B 913f6dd02988c0bded13ae15a5f05e5b3c6404f0b0d58a493601a0762c7534403f89e9fb46ec6a536b85d5f9ca1f788c7a308f5563a897b324d212da0e7bab4b SHA512 35f5429bc2a7092aa659cba9296837d127e2b17c23ab23111d0d9b230d15ef5a6965e112b1f3829748a69a52fb5b09722153f86f1ef70977b3ad7b7a4ec40ec5 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/udisks/files/udisks-2.9.4-undefined.patch b/sdk_container/src/third_party/portage-stable/sys-fs/udisks/files/udisks-2.9.4-undefined.patch new file mode 100644 index 0000000000..271a5271e3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/udisks/files/udisks-2.9.4-undefined.patch @@ -0,0 +1,143 @@ +Upstream-PR: https://github.com/storaged-project/udisks/pull/978 +Upstream-PR: https://github.com/storaged-project/udisks/pull/979 +Upstream-Commit: 362cc8f1613193f8e68d13a416421bb36fd7f713 +Upstream-Commit: 6cbce6602ce447127cb4f77706870b6706bf1c5f +Upstream-Commit: 97bb17425e52ee6b2f11b13b3764d0dd6e8cfc97 +From 362cc8f1613193f8e68d13a416421bb36fd7f713 Mon Sep 17 00:00:00 2001 +From: orbea +Date: Tue, 10 May 2022 09:29:10 -0700 +Subject: [PATCH 1/3] modules/btrfs: Add missing dependency + +When building udisks with --enable-btrfs using slibtool instead of GNU +libtool the build will fail with undefined references. + +This is because of a missing dependency for libudisks2_btrfs_la_LIBADD +and GNU libtool will hide this issue by silently ignoring -no-undefined +while slibtool does not. + +Gentoo Bug: https://bugs.gentoo.org/782061 +--- + modules/btrfs/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/btrfs/Makefile.am b/modules/btrfs/Makefile.am +index ac8c941849..f96cd16186 100644 +--- a/modules/btrfs/Makefile.am ++++ b/modules/btrfs/Makefile.am +@@ -73,6 +73,7 @@ libudisks2_btrfs_la_LDFLAGS = \ + $(NULL) + + libudisks2_btrfs_la_LIBADD = \ ++ $(top_builddir)/src/libudisks-daemon.la \ + $(GLIB_LIBS) \ + $(GIO_LIBS) \ + $(GUDEV_LIBS) \ + +From 6cbce6602ce447127cb4f77706870b6706bf1c5f Mon Sep 17 00:00:00 2001 +From: orbea +Date: Wed, 11 May 2022 07:55:13 -0700 +Subject: [PATCH 2/3] modules/bcache: Add missing dependency + +--- + modules/bcache/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/bcache/Makefile.am b/modules/bcache/Makefile.am +index 571541a6d4..7509205ba2 100644 +--- a/modules/bcache/Makefile.am ++++ b/modules/bcache/Makefile.am +@@ -71,6 +71,7 @@ libudisks2_bcache_la_LDFLAGS = \ + $(NULL) + + libudisks2_bcache_la_LIBADD = \ ++ $(top_builddir)/src/libudisks-daemon.la \ + $(GLIB_LIBS) \ + $(GIO_LIBS) \ + $(GUDEV_LIBS) \ + +From 97bb17425e52ee6b2f11b13b3764d0dd6e8cfc97 Mon Sep 17 00:00:00 2001 +From: orbea +Date: Wed, 11 May 2022 07:55:25 -0700 +Subject: [PATCH 3/3] modules/lvm2: Add missing dependency + +--- + modules/lvm2/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/lvm2/Makefile.am b/modules/lvm2/Makefile.am +index 3342ad8e9b..67b8aa6b3f 100644 +--- a/modules/lvm2/Makefile.am ++++ b/modules/lvm2/Makefile.am +@@ -76,6 +76,7 @@ libudisks2_lvm2_la_LDFLAGS = \ + $(NULL) + + libudisks2_lvm2_la_LIBADD = \ ++ $(top_builddir)/src/libudisks-daemon.la \ + $(GLIB_LIBS) \ + $(GIO_LIBS) \ + $(GUDEV_LIBS) \ +From 663f8194eeac75ec26fbfbd8855c5873315c495c Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Fri, 13 May 2022 17:04:52 +0200 +Subject: [PATCH 1/3] modules/iscsi: Add missing linker dependency + +--- + modules/iscsi/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/iscsi/Makefile.am b/modules/iscsi/Makefile.am +index 05af5ece29..2cecc300e9 100644 +--- a/modules/iscsi/Makefile.am ++++ b/modules/iscsi/Makefile.am +@@ -77,6 +77,7 @@ libudisks2_iscsi_la_LDFLAGS = \ + $(NULL) + + libudisks2_iscsi_la_LIBADD = \ ++ $(top_builddir)/src/libudisks-daemon.la \ + $(GLIB_LIBS) \ + $(GIO_LIBS) \ + $(GUDEV_LIBS) \ + +From 8ff2214d740f9819d6ede02534d7d0f23d6a3818 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Fri, 13 May 2022 17:05:26 +0200 +Subject: [PATCH 2/3] modules/lsm: Add missing linker dependency + +--- + modules/lsm/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/lsm/Makefile.am b/modules/lsm/Makefile.am +index 2193115417..b77a9013fa 100644 +--- a/modules/lsm/Makefile.am ++++ b/modules/lsm/Makefile.am +@@ -71,6 +71,7 @@ libudisks2_lsm_la_LDFLAGS = \ + $(NULL) + + libudisks2_lsm_la_LIBADD = \ ++ $(top_builddir)/src/libudisks-daemon.la \ + $(GLIB_LIBS) \ + $(GIO_LIBS) \ + $(GUDEV_LIBS) \ + +From 4f59e7fd5b9ad94091230713c28f6a818269d48c Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Fri, 13 May 2022 17:05:43 +0200 +Subject: [PATCH 3/3] modules/zram: Add missing linker dependency + +--- + modules/zram/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules/zram/Makefile.am b/modules/zram/Makefile.am +index 9e5e9a6315..40f929583d 100644 +--- a/modules/zram/Makefile.am ++++ b/modules/zram/Makefile.am +@@ -78,6 +78,7 @@ libudisks2_zram_la_LDFLAGS = \ + $(NULL) + + libudisks2_zram_la_LIBADD = \ ++ $(top_builddir)/src/libudisks-daemon.la \ + $(GLIB_LIBS) \ + $(GIO_LIBS) \ + $(GUDEV_LIBS) \ diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/udisks/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-fs/udisks/metadata.xml new file mode 100644 index 0000000000..8e19b03530 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/udisks/metadata.xml @@ -0,0 +1,18 @@ + + + + + freedesktop-bugs@gentoo.org + + + Build the system daemon, not just the client tool + Use sys-auth/elogind for session tracking + Add support for Logical Volume Management via sys-fs/lvm2. + Support sys-apps/systemd's logind + Enable Virtual Data Optimizer support. + Enable ZRAM support (requires sys-apps/systemd). + + + storaged-project/udisks + + diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/udisks/udisks-2.9.4-r3.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/udisks/udisks-2.9.4-r3.ebuild new file mode 100644 index 0000000000..12ec4ea23e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/udisks/udisks-2.9.4-r3.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools bash-completion-r1 linux-info systemd tmpfiles udev xdg-utils + +DESCRIPTION="Daemon providing interfaces to work with storage devices" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/udisks" +SRC_URI="https://github.com/storaged-project/udisks/releases/download/${P}/${P}.tar.bz2" + +LICENSE="LGPL-2+ GPL-2+" +SLOT="2" +KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86" +IUSE="acl +daemon debug elogind +introspection lvm nls selinux systemd vdo zram" + +REQUIRED_USE=" + ?? ( elogind systemd ) + elogind? ( daemon ) + systemd? ( daemon ) + zram? ( systemd ) +" + +# See configure.ac file for the required min version +BLOCKDEV_MIN_VER="2.25" + +# mount, umount, swapon, swapoff (see also #403073) +RDEPEND="${COMMON_DEPEND} + >=sys-block/parted-3 + >=sys-apps/util-linux-2.30 + selinux? ( sec-policy/selinux-devicekit ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-3.1 +" +BDEPEND=" + app-text/docbook-xsl-stylesheets + >=dev-util/gdbus-codegen-2.32 + >=dev-util/gtk-doc-am-1.3 + virtual/pkgconfig + nls? ( >=sys-devel/gettext-0.19.8 ) +" +# If adding a eautoreconf, then these might be needed at buildtime: +# dev-libs/gobject-introspection-common +# sys-devel/autoconf-archive + +DOCS=( AUTHORS HACKING NEWS README.md ) + +PATCHES=( + "${FILESDIR}/${P}-undefined.patch" # 782061 +) + +pkg_setup() { + # Listing only major arch's here to avoid tracking kernel's defconfig + if use amd64 || use arm || use ppc || use ppc64 || use x86; then + CONFIG_CHECK="~!IDE" #319829 + CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" #412377 + CONFIG_CHECK+=" ~NLS_UTF8" #425562 + kernel_is lt 3 10 && CONFIG_CHECK+=" ~USB_SUSPEND" #331065, #477278 + linux-info_pkg_setup + fi +} + +src_prepare() { + xdg_environment_reset + default + + if ! use systemd ; then + sed -i -e 's:libsystemd-login:&disable:' configure || die + fi + + # Added for bug # 782061 + eautoreconf +} + +src_configure() { + local myeconfargs=( + --enable-btrfs + --disable-gtk-doc + --disable-static + --localstatedir="${EPREFIX}"/var + --with-html-dir="${EPREFIX}"/usr/share/gtk-doc/html + --with-modprobedir="${EPREFIX}"/lib/modprobe.d + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + --with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d + --with-udevdir="${EPREFIX}$(get_udevdir)" + $(use_enable acl) + $(use_enable daemon) + $(use_enable debug) + $(use_enable introspection) + $(use_enable lvm lvm2) + $(use_enable lvm lvmcache) + $(use_enable nls) + $(use_enable vdo) + $(use_enable zram) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${ED}" -type f -name "*.la" -delete || die + keepdir /var/lib/udisks2 #383091 + + rm -rf "${ED}"/usr/share/bash-completion + dobashcomp data/completions/udisksctl +} + +pkg_preinst() { + # Remove gtk-doc symlink, #597628 + if [[ -L "${EROOT}"/usr/share/gtk-doc/html/udisks2 ]]; then + rm "${EROOT}"/usr/share/gtk-doc/html/udisks2 || die + fi +} + +pkg_postinst() { + udev_reload + + # TODO: obsolete with tmpfiles_process? + # mkdir -p "${EROOT}"/run #415987 + + tmpfiles_process udisks2.conf + + # See pkg_postinst() of >=sys-apps/baselayout-2.1-r1. Keep in sync? + if ! grep -qs "^tmpfs.*/run " "${EROOT}"/proc/mounts ; then + echo + ewarn "You should reboot the system now to get /run mounted with tmpfs!" + fi +} + +pkg_postrm() { + udev_reload +}