commit:     7ef432c0c5c51667cf0f2c70e1ef62ec4279aa94
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 23 14:26:11 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Jan 23 14:26:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ef432c0

net-fs/cifs-utils: Fixed installation with MAKEOPTS="-j1" (again)

Closes: https://bugs.gentoo.org/766594
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-fs/cifs-utils/cifs-utils-6.12.ebuild           |  8 +++++++-
 .../files/cifs-utils-6.12-ln_in_destdir.patch      | 22 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/net-fs/cifs-utils/cifs-utils-6.12.ebuild 
b/net-fs/cifs-utils/cifs-utils-6.12.ebuild
index f7fa30ad0e4..c93c1869917 100644
--- a/net-fs/cifs-utils/cifs-utils-6.12.ebuild
+++ b/net-fs/cifs-utils/cifs-utils-6.12.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 PYTHON_COMPAT=( python3_{6..9} )
 
-inherit bash-completion-r1 linux-info multilib pam python-single-r1
+inherit autotools bash-completion-r1 linux-info multilib pam python-single-r1
 
 DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems"
 HOMEPAGE="https://wiki.samba.org/index.php/LinuxCIFS_utils";
@@ -40,6 +40,10 @@ REQUIRED_USE="
 
 DOCS="doc/linux-cifs-client-guide.odt"
 
+PATCHES=(
+       "${FILESDIR}/${PN}-6.12-ln_in_destdir.patch" #766594
+)
+
 pkg_setup() {
        linux-info_pkg_setup
 
@@ -64,6 +68,8 @@ src_prepare() {
                # https://bugs.gentoo.org/612584
                eapply "${FILESDIR}/${PN}-6.7-heimdal.patch"
        fi
+
+       eautoreconf
 }
 
 src_configure() {

diff --git a/net-fs/cifs-utils/files/cifs-utils-6.12-ln_in_destdir.patch 
b/net-fs/cifs-utils/files/cifs-utils-6.12-ln_in_destdir.patch
new file mode 100644
index 00000000000..a5f7be668ac
--- /dev/null
+++ b/net-fs/cifs-utils/files/cifs-utils-6.12-ln_in_destdir.patch
@@ -0,0 +1,22 @@
+Fixed an inverted race condition when installing with MAKEOPTS="-j1"
+
+jer found this:
+  install-root_sbinPROGRAMS is called from install-data-am but
+  install-exec-hook is called from install-exec-am
+
+So moving the failing ln call into install-data-hook for now...
+
+--- cifs-utils-6.12/Makefile.am
++++ cifs-utils-6.12/Makefile.am
+@@ -117,10 +117,8 @@
+ 
+ SUBDIRS = contrib
+ 
+-install-exec-hook: install-sbinPROGRAMS
++install-data-hook: install-sbinPROGRAMS
+       (cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
+-
+-install-data-hook:
+ if CONFIG_MAN
+       ( cd $(DESTDIR)$(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
+ endif

Reply via email to