Skip to contentSkip to conversation

New: xfsprogs fails to install when user group has space

Bug 200311 [email protected] 1 participant 5 messages Jun 27, 2018 – Jun 28, 2018

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=200311

            Bug ID: 200311
           Summary: xfsprogs fails to install when user group has space
           Product: File System
           Version: 2.5
    Kernel Version: 4.14.37
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: XFS
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

While compiling xfsprogs-4.11.0, install failed because my group has a space ("domain users")

Installing libxfs-install
/usr/bin/gmake --no-print-directory Q= -C libxfs install
i486-openwrt-linux-musl-gcc -MM -Os -pipe -march=pentium4 -fno-caller-saves
-fno-plt -fhonour-copts -Wno-error=unused-but-set-variable
-Wno-error=unused-result -iremap/home/REDETRESC/luizluca/prog-local/openwrt/18.06/build_dir/target-i386_pentium4_musl/xfsprogs-4.11.0:xfsprogs-4.11.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro -I/home/REDETRESC/luizluca/prog-local/openwrt/18.06/staging_dir/target-i386_pentium4_musl/usr/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -I. -g -O2 -DVERSION=\"4.11.0\"
-DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include
-I../libxfs -Wall cache.c crc32.c defer_item.c init.c kmem.c list_sort.c
logitem.c radix-tree.c rdwr.c trans.c util.c xfs_ag_resv.c xfs_alloc.c
xfs_alloc_btree.c xfs_attr.c xfs_attr_leaf.c xfs_attr_remote.c xfs_bit.c
xfs_bmap.c xfs_bmap_btree.c xfs_btree.c xfs_da_btree.c xfs_da_format.c
xfs_defer.c xfs_dir2.c xfs_dir2_block.c xfs_dir2_data.c xfs_dir2_leaf.c
xfs_dir2_node.c xfs_dir2_sf.c xfs_dquot_buf.c xfs_ialloc.c xfs_inode_buf.c
xfs_inode_fork.c xfs_ialloc_btree.c xfs_log_rlimit.c xfs_refcount.c
xfs_refcount_btree.c xfs_rmap.c xfs_rmap_btree.c xfs_rtbitmap.c xfs_sb.c
xfs_symlink_remote.c xfs_trans_resv.c linux.c | /home/REDETRESC/luizluca/prog-local/openwrt/18.06/staging_dir/host/bin/sed -e
's,^\([^:]*\)\.o,\1.lo,' > .ltdep
rm -f .ltdep
../install-sh -o luizluca -g domain users -m 755 -d /usr/include/xfs
cp: cannot stat 'users': No such file or directory
gmake[5]: *** [Makefile:145: install] Error 1
make[4]: *** [Makefile:127: libxfs-install] Error 2

The fix is quite simple:

include/buildmacros:
-INSTALL = $(TOPDIR)/install-sh -o $(PKG_USER) -g $(PKG_GROUP)
+INSTALL = $(TOPDIR)/install-sh -o $(PKG_USER) -g "$(PKG_GROUP)"

install-sh:
-while getopts "Dcm:d:S:o:g:T:" c $*
+while getopts "Dcm:d:S:o:g:T:" c "$@"

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 200311] xfsprogs fails to install when user group has space

https://bugzilla.kernel.org/show_bug.cgi?id=200311

Eric Sandeen ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Eric Sandeen ([email protected]) ---
How did you get a group with a space in it in the first place? That's not supported by groupadd:

# groupadd "space force"
groupadd: 'space force' is not a valid group name

And according to adduser.conf(5) (thanks dchinner), IEEE Std 1003.1-2001 disallows spaces in names.

I'd be shocked if this is the only problem non-standard group names cause ...

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 200311] xfsprogs fails to install when user group has space

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=200311

--- Comment #2 from Luiz Angelo Daros de Luca ([email protected]) --- It's, indeed, the only problem I face with xfsprogs and few others: use of group name without quotes. Group names are rarely used as input.

I normally quote every shell var by default, no matter is usage.

The group came from M$ Active Directory, integrated using sssd. I can rename the unix mapped name to something without spaces, but I normally prefer to detect the problem and report upstream (for those that cannot change the group name)

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

[Bug 200311] xfsprogs fails to install when user group has space

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=200311

Darrick J. Wong ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #4 from Darrick J. Wong ([email protected]) --- If you're going to escape strings, why not escape PKG_USER too?

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.