Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766594 - net-fs/cifs-utils-6.12 /bin/sh: line 1: cd: /var/tmp/portage/net-fs/cifs-utils-6.12/image/sbin: No such file or directory
Summary: net-fs/cifs-utils-6.12 /bin/sh: line 1: cd: /var/tmp/portage/net-fs/cifs-util...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-01-22 21:24 UTC by Chris Whalen
Modified: 2021-01-23 14:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.txt,26.73 KB, text/plain)
2021-01-22 21:25 UTC, Chris Whalen
Details
updated patch for 6.12 (cifs-utils-6.12-ln_in_destdir.patch,1.21 KB, patch)
2021-01-23 00:20 UTC, Chris Whalen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Whalen 2021-01-22 21:24:08 UTC
Hi team, I can't seem to install net-fs/cifs-utils-6.12 after building it.

The source compiles successfully:

>>> Source compiled.
>>> Test phase [not enabled]: net-fs/cifs-utils-6.12
>>> Install net-fs/cifs-utils-6.12 into /var/tmp/portage/net-fs/cifs-utils-6.12/image

but the install phase fails:

/bin/sh: line 1: cd: /var/tmp/portage/net-fs/cifs-utils-6.12/image/sbin: No such file or directory
make[3]: *** [Makefile:1432: install-exec-hook] Error 1


Reproducible: Always

Steps to Reproduce:
emerge "=net-fs/cifs-utils-6.12"
Actual Results:  
The emerge fails during the install phase.

Expected Results:  
The emerge would install and complete with no errors.
Comment 1 Chris Whalen 2021-01-22 21:25:09 UTC
Created attachment 684163 [details]
build.log
Comment 2 Ionen Wolkens gentoo-dev 2021-01-22 21:54:09 UTC
I can only reproduce with MAKEOPTS=-j1

So try another value as a workaround.
Comment 3 Chris Whalen 2021-01-22 21:58:30 UTC
That did it, thanks!
Comment 4 Chris Whalen 2021-01-22 22:54:36 UTC
This patch targets 6.10 and mentions a workaround for MAKEOPTS="-j1':

/usr/portage/net-fs/cifs-utils/files/cifs-utils-6.10-ln_in_destdir.patch


Fix sandbox violation caused by calling ln in /sbin instead of $(DESTDIR)/sbin

Also 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.10/Makefile.am
+++ cifs-utils-6.10/Makefile.am
@@ -118,11 +118,9 @@

SUBDIRS = contrib

-install-exec-hook:
-       (cd $(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
-
install-data-hook:
-       (cd $(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
+       (cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
+       (cd $(DESTDIR)$(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)

uninstall-hook:
(cd $(ROOTSBINDIR) && rm -f $(ROOTSBINDIR)/mount.smb3)
Comment 5 Chris Whalen 2021-01-22 22:58:20 UTC
It looks like that patch was applied in cifs-utils-6.11.ebuild:

PATCHES=( "${FILESDIR}/${PN}-6.10-ln_in_destdir.patch" )

but this line no longer appears in cifs-utils-6.12.ebuild
Comment 6 Chris Whalen 2021-01-22 23:03:24 UTC
Attempting to apply this patch unmodified to cifs-utils-6.12 also doesn't appear to work:

* Applying cifs-utils-6.10-ln_in_destdir.patch ...
patching file Makefile.am
Hunk #1 FAILED at 118.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.am.rej                                                                                                                               [ !! ]
Comment 7 Chris Whalen 2021-01-23 00:20:56 UTC
Created attachment 684172 [details, diff]
updated patch for 6.12
Comment 8 Larry the Git Cow gentoo-dev 2021-01-23 14:26:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ef432c0c5c51667cf0f2c70e1ef62ec4279aa94

commit 7ef432c0c5c51667cf0f2c70e1ef62ec4279aa94
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-01-23 14:26:11 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-01-23 14:26:38 +0000

    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@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(-)