Bug 250887

Summary: textproc/ibus: build error on v1.5.23
Product: Ports & Packages Reporter: Zoltan ALEXANDERSON BESSE <zab>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Not A Bug    
Severity: Affects Some People CC: henry.hu.sh, jkim, thierry
Priority: --- Flags: henry.hu.sh: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
extended patch "files/patch-data_dconf_make-dconf-override-db.sh" none

Description Zoltan ALEXANDERSON BESSE 2020-11-05 23:25:41 UTC
Created attachment 219379 [details]
extended patch "files/patch-data_dconf_make-dconf-override-db.sh"

Base: FreeBSD 12.2-RELEASE (amd64)
Ports: rolling-release (updated weekly and portmaster'd all changes at once)
Currently installed: ibus-1.5.22_1, gvfs-1.46.1_2

Build error:
[...]
gmake[5]: Entering directory '/usr/ports/textproc/ibus/work/ibus-1.5.23/data/dconf'
./make-dconf-override-db.sh > 00-upstream-settings || \
	{ rc=$?; rm -f -rf 00-upstream-settings; exit $rc; }
gmake[5]: *** [Makefile:789: 00-upstream-settings] Error 1
[...]

Cause:
"/usr/ports/textproc/ibus/work/ibus-1.5.23/data/dconf/make-dconf-override-db.sh" tries to umount non-mounted filesystem.

Solution:
Adding another chunk to "files/patch-data_dconf_make-dconf-override-db.sh" for checking fs before umount. It possibly does not break systems where fs mounted actually by gvfs.
Comment 1 Henry Hu 2020-11-07 04:07:30 UTC
So you're the second person hitting this issue.
Now I noticed an issue: you're running gvfs 1.46, while the pkg still has gvfs 1.30.
gvfs 1.30 has FUSE option default to true, so we can have gvfs mounted. Thus, the umount will succeed.
However, gvfs is recently updated to 1.46. Since FUSE option is broken in 1.46, it's disabled by default. Thus, the script fails to umount gvfs, as it's not successfully mounted.

I saw another patch from Kim (another user who hit this issue), and his patch is simpler: just do umount || true, so basically ignores the error. I think that should suffice.
Comment 2 Henry Hu 2020-11-07 05:01:52 UTC
I built it again with 1.46, and it still works.
Checking more carefully, $TMPDIR/cache/gvfs does not exist, so the umount was not executed.
I tried to rebuild with FUSE enabled, and it still works. $TMPDIR/cache/gvfs is still not created.
In summary, I still can't reproduce the issue, but I think that we can commit a workaround. We can revisit this when gvfsd's FUSE option is fixed.
Comment 3 Zoltan ALEXANDERSON BESSE 2020-11-11 21:20:21 UTC
(In reply to Henry Hu from comment #2)
Using your observation on gvfs/FUSE option I successfully reinstalled gvfs and portmastered ibus to version 1.5.23_1. Thank you!

Preventing future PR's from sysadmins, a nice warning might help in devel/gvfs/Makefile:
"[X] FUSE    FUSE (Filesystem in Userspace) support (BROKEN!)"

With/without patching "umount ... | true" and gvfs/FUSE BROKEN! notice, I think this PR can be closed since disabling gvfs/FUSE *is* the solution.

Thanks again.
Comment 4 Henry Hu 2021-01-17 05:10:02 UTC
Okay, please close it. I don't think I can do that.
Comment 5 Zoltan ALEXANDERSON BESSE 2021-01-17 13:22:55 UTC
Closing PR:
 "disabling gvfs/FUSE option solved/circumvent the bug."