Bug 1257153 - coreutils fails to rebuild as nonroot
coreutils fails to rebuild as nonroot
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: coreutils (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Ondrej Vasik
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-26 07:33 EDT by Karel Volný
Modified: 2015-09-02 08:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-02 08:51:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karel Volný 2015-08-26 07:33:47 EDT
Description of problem:
Trying to rebuild coreutils as ordinary user, I'm getting failure on all systems.

Version-Release number of selected component (if applicable):
coreutils-8.22-14.el7.src.rpm

How reproducible:
always

Steps to Reproduce:
1. $ rpmbuild --rebuild coreutils-8.22-14.el7.src.rpm

Actual results:
FAIL: tests/mkdir/parents
=========================

++ initial_cwd_=/home/test/rpmbuild/BUILD/coreutils-8.22
++ fail=0
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /home/test/rpmbuild/BUILD/coreutils-8.22 gt-parents.sh.XXXX
+++ case $# in
+++ destdir_=/home/test/rpmbuild/BUILD/coreutils-8.22
+++ template_=gt-parents.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ case $template_ in
++++ unset TMPDIR
+++ d=/home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes
+++ case $d in
+++ test -d /home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes
++++ ls -dgo /home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes
++++ tr S -
+++ perms='drwx------+ 2 6 Aug 26 07:30 /home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes'
+++ case $perms in
+++ test 0 = 0
+++ echo /home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes
+++ return
++ test_dir_=/home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes
++ cd /home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes
++ gl_init_sh_nl_='
'
++ IFS=' 
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ trap remove_tmp_ 0
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ case $path_dir_ in
+ abs_path_dir_=/home/test/rpmbuild/BUILD/coreutils-8.22/./src
+ case $abs_path_dir_ in
+ PATH=/home/test/rpmbuild/BUILD/coreutils-8.22/./src:/home/test/rpmbuild/BUILD/coreutils-8.22/src:/usr/lib64/qt-3.3/bin:/usr/lib64/mpich/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
+ create_exe_shims_ /home/test/rpmbuild/BUILD/coreutils-8.22/./src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ mkdir
+ test yes = yes
+ local i
+ for i in '$*'
+ env mkdir --version
mkdir (GNU coreutils) 8.22
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
+ skip_if_setgid_
+ setgid_tmpdir=setgid-10184
+ umask 77
+ mkdir setgid-10184
++ stat --printf %A setgid-10184
+ perms=drwxr-xr-x
+ rmdir setgid-10184
+ case $perms in
+ mkdir -m 700 e-dir
+ mkdir -p e-dir
+ mkdir e-dir
+ umask 077
+ mode_str=drwxr-x-wx
++ rwx_to_mode_ drwxr-x-wx
++ case $# in
++ rwx=drwxr-x-wx
++ case $rwx in
++ s='s/S/@/;s/s/x@/;s/@/s/'
++ t='s/T/@/;s/t/x@/;s/@/t/'
+++ echo drwxr-x-wx
+++ sed 's/^.\(...\).*/,u=\1/;s/-//g;s/^,u=$//;s/S/@/;s/s/x@/;s/@/s/'
++ u=,u=rwx
+++ echo drwxr-x-wx
+++ sed 's/^....\(...\).*/,g=\1/;s/-//g;s/^,g=$//;s/S/@/;s/s/x@/;s/@/s/'
++ g=,g=rx
+++ echo drwxr-x-wx
+++ sed 's/^.......\(...\).*/,o=\1/;s/-//g;s/^,o=$//;s/S/@/;s/s/x@/;s/@/s/;s/T/@/;s/t/x@/;s/@/t/'
++ o=,o=wx
++ echo =,u=rwx,g=rx,o=wx
+ mode_arg==,u=rwx,g=rx,o=wx
+ mkdir -m =,u=rwx,g=rx,o=wx a
+ d_mode_str=drwx-w--wx
++ rwx_to_mode_ drwx-w--wx
++ case $# in
++ rwx=drwx-w--wx
++ case $rwx in
++ s='s/S/@/;s/s/x@/;s/@/s/'
++ t='s/T/@/;s/t/x@/;s/@/t/'
+++ echo drwx-w--wx
+++ sed 's/^.\(...\).*/,u=\1/;s/-//g;s/^,u=$//;s/S/@/;s/s/x@/;s/@/s/'
++ u=,u=rwx
+++ echo drwx-w--wx
+++ sed 's/^....\(...\).*/,g=\1/;s/-//g;s/^,g=$//;s/S/@/;s/s/x@/;s/@/s/'
++ g=,g=w
+++ echo drwx-w--wx
+++ sed 's/^.......\(...\).*/,o=\1/;s/-//g;s/^,o=$//;s/S/@/;s/s/x@/;s/@/s/;s/T/@/;s/t/x@/;s/@/t/'
++ o=,o=wx
++ echo =,u=rwx,g=w,o=wx
+ d_mode_arg==,u=rwx,g=w,o=wx
+ mkdir -p -m =,u=rwx,g=w,o=wx a/b/c/d
++ ls -ld a
++ cut -b-10
+ p=drwxr-x-wx
+ case $p in
++ ls -ld a/b
++ cut -b-10
+ p=drwxr-xr-x
+ case $p in
+ fail=1
++ ls -ld a/b/c
++ cut -b-10
+ p=drwxr-xr-x
+ case $p in
+ fail=1
++ ls -ld a/b/c/d
++ cut -b-10
+ p=drwx-w--wx
+ case $p in
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ cd /home/test/rpmbuild/BUILD/coreutils-8.22
+ chmod -R u+rwx /home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes
+ rm -rf /home/test/rpmbuild/BUILD/coreutils-8.22/gt-parents.sh.Rzes
+ exit 1

FAIL: tests/mkdir/perm
======================

++ initial_cwd_=/home/test/rpmbuild/BUILD/coreutils-8.22
++ fail=0
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /home/test/rpmbuild/BUILD/coreutils-8.22 gt-perm.sh.XXXX
+++ case $# in
+++ destdir_=/home/test/rpmbuild/BUILD/coreutils-8.22
+++ template_=gt-perm.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ case $template_ in
++++ unset TMPDIR
+++ d=/home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT
+++ case $d in
+++ test -d /home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT
++++ ls -dgo /home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT
++++ tr S -
+++ perms='drwx------+ 2 6 Aug 26 07:30 /home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT'
+++ case $perms in
+++ test 0 = 0
+++ echo /home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT
+++ return
++ test_dir_=/home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT
++ cd /home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT
++ gl_init_sh_nl_='
'
++ IFS=' 
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ trap remove_tmp_ 0
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ case $path_dir_ in
+ abs_path_dir_=/home/test/rpmbuild/BUILD/coreutils-8.22/./src
+ case $abs_path_dir_ in
+ PATH=/home/test/rpmbuild/BUILD/coreutils-8.22/./src:/home/test/rpmbuild/BUILD/coreutils-8.22/src:/usr/lib64/qt-3.3/bin:/usr/lib64/mpich/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
+ create_exe_shims_ /home/test/rpmbuild/BUILD/coreutils-8.22/./src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ mkdir
+ test yes = yes
+ local i
+ for i in '$*'
+ env mkdir --version
mkdir (GNU coreutils) 8.22
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
+ skip_if_setgid_
+ setgid_tmpdir=setgid-10284
+ umask 77
+ mkdir setgid-10284
++ stat --printf %A setgid-10284
+ perms=drwxr-xr-x
+ rmdir setgid-10284
+ case $perms in
+ working_umask_or_skip_
+ umask 022
+ touch file1 file2
+ chmod 644 file2
++ ls -l file1 file2
++ sed 's/ .*//'
++ uniq
+ perms=-rw-r--r--.
+ rm -f file1 file2
+ case $perms in
+ tests='
    000  :   empty    : drwxrwxrwx : drwxrwxrwx :
    000  :   -m 016   : drwxrwxrwx : d-----xrw- :
    077  :   empty    : drwx------ : drwx------ :
    050  :   empty    : drwx-w-rwx : drwx-w-rwx :
    050  :   -m 312   : drwx-w-rwx : d-wx--x-w- :
    160  :   empty    : drwx--xrwx : drw---xrwx :
    160  :   -m 743   : drwx--xrwx : drwxr---wx :
    027  :   -m =+x   : drwxr-x--- : d--x--x--- :
    027  :   -m =+X   : drwxr-x--- : d--x--x--- :
    -    :   -        : last       : last       :
    '
++ echo 000 : empty : drwxrwxrwx : drwxrwxrwx : 000 : -m 016 : drwxrwxrwx : d-----xrw- : 077 : empty : drwx------ : drwx------ : 050 : empty : drwx-w-rwx : drwx-w-rwx : 050 : -m 312 : drwx-w-rwx : d-wx--x-w- : 160 : empty : drwx--xrwx : drw---xrwx : 160 : -m 743 : drwx--xrwx : drwxr---wx : 027 : -m =+x : drwxr-x--- : d--x--x--- : 027 : -m =+X : drwxr-x--- : d--x--x--- : - : - : last : last :
++ sed 's/^ *//; s/ *: */:/g'
+ colon_tests='000:empty:drwxrwxrwx:drwxrwxrwx:000:-m 016:drwxrwxrwx:d-----xrw-:077:empty:drwx------:drwx------:050:empty:drwx-w-rwx:drwx-w-rwx:050:-m 312:drwx-w-rwx:d-wx--x-w-:160:empty:drwx--xrwx:drw---xrwx:160:-m 743:drwx--xrwx:drwxr---wx:027:-m =+x:drwxr-x---:d--x--x---:027:-m =+X:drwxr-x---:d--x--x---:-:-:last:last:'
+ for p in empty -p
+ test _empty = _empty
+ p=
+ old_IFS=' 
'
+ IFS=:
+ set 000 empty drwxrwxrwx drwxrwxrwx 000 '-m 016' drwxrwxrwx d-----xrw- 077 empty drwx------ drwx------ 050 empty drwx-w-rwx drwx-w-rwx 050 '-m 312' drwx-w-rwx d-wx--x-w- 160 empty drwx--xrwx drw---xrwx 160 '-m 743' drwx--xrwx drwxr---wx 027 '-m =+x' drwxr-x--- d--x--x--- 027 '-m =+X' drwxr-x--- d--x--x--- - - last last
+ IFS=' 
'
+ :
+ test yes = yes
+ set -x
+ umask=000
+ mode=empty
+ parent_perms=drwxrwxrwx
+ sub_perms=drwxrwxrwx
+ test _empty = _empty
+ mode=
+ test drwxrwxrwx = last
+ shift
+ shift
+ shift
+ shift
+ umask 000
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=drwxr-xr-x
+ test drwxrwxrwx = drwxr-xr-x
+ fail=1
+ echo parent/sub: expected drwxrwxrwx, got drwxr-xr-x
parent/sub: expected drwxrwxrwx, got drwxr-xr-x
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=000
+ mode='-m 016'
+ parent_perms=drwxrwxrwx
+ sub_perms=d-----xrw-
+ test '_-m 016' = _empty
+ test d-----xrw- = last
+ shift
+ shift
+ shift
+ shift
+ umask 000
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir -m 016 parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=d-----xrw-
+ test d-----xrw- = d-----xrw-
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=077
+ mode=empty
+ parent_perms=drwx------
+ sub_perms=drwx------
+ test _empty = _empty
+ mode=
+ test drwx------ = last
+ shift
+ shift
+ shift
+ shift
+ umask 077
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=drwxr-xr-x
+ test drwx------ = drwxr-xr-x
+ fail=1
+ echo parent/sub: expected drwx------, got drwxr-xr-x
parent/sub: expected drwx------, got drwxr-xr-x
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=050
+ mode=empty
+ parent_perms=drwx-w-rwx
+ sub_perms=drwx-w-rwx
+ test _empty = _empty
+ mode=
+ test drwx-w-rwx = last
+ shift
+ shift
+ shift
+ shift
+ umask 050
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=drwxr-xr-x
+ test drwx-w-rwx = drwxr-xr-x
+ fail=1
+ echo parent/sub: expected drwx-w-rwx, got drwxr-xr-x
parent/sub: expected drwx-w-rwx, got drwxr-xr-x
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=050
+ mode='-m 312'
+ parent_perms=drwx-w-rwx
+ sub_perms=d-wx--x-w-
+ test '_-m 312' = _empty
+ test d-wx--x-w- = last
+ shift
+ shift
+ shift
+ shift
+ umask 050
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir -m 312 parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=d-wx--x-w-
+ test d-wx--x-w- = d-wx--x-w-
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=160
+ mode=empty
+ parent_perms=drwx--xrwx
+ sub_perms=drw---xrwx
+ test _empty = _empty
+ mode=
+ test drw---xrwx = last
+ shift
+ shift
+ shift
+ shift
+ umask 160
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=drwxr-xr-x
+ test drw---xrwx = drwxr-xr-x
+ fail=1
+ echo parent/sub: expected drw---xrwx, got drwxr-xr-x
parent/sub: expected drw---xrwx, got drwxr-xr-x
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=160
+ mode='-m 743'
+ parent_perms=drwx--xrwx
+ sub_perms=drwxr---wx
+ test '_-m 743' = _empty
+ test drwxr---wx = last
+ shift
+ shift
+ shift
+ shift
+ umask 160
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir -m 743 parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=drwxr---wx
+ test drwxr---wx = drwxr---wx
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=027
+ mode='-m =+x'
+ parent_perms=drwxr-x---
+ sub_perms=d--x--x---
+ test '_-m =+x' = _empty
+ test d--x--x--- = last
+ shift
+ shift
+ shift
+ shift
+ umask 027
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir -m =+x parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=d--x--x---
+ test d--x--x--- = d--x--x---
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=027
+ mode='-m =+X'
+ parent_perms=drwxr-x---
+ sub_perms=d--x--x---
+ test '_-m =+X' = _empty
+ test d--x--x--- = last
+ shift
+ shift
+ shift
+ shift
+ umask 027
+ test x = x
+ mkdir -m =,u=rwx parent
+ parent_perms=drwx------
+ mkdir -m =+X parent/sub
++ stat --printf %A parent
+ perms=drwx------
+ test drwx------ = drwx------
++ stat --printf %A parent/sub
+ perms=d--x--x---
+ test d--x--x--- = d--x--x---
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=-
+ mode=-
+ parent_perms=last
+ sub_perms=last
+ test _- = _empty
+ test last = last
+ break
+ for p in empty -p
+ test _-p = _empty
+ old_IFS=' 
'
+ IFS=:
+ set 000 empty drwxrwxrwx drwxrwxrwx 000 '-m 016' drwxrwxrwx d-----xrw- 077 empty drwx------ drwx------ 050 empty drwx-w-rwx drwx-w-rwx 050 '-m 312' drwx-w-rwx d-wx--x-w- 160 empty drwx--xrwx drw---xrwx 160 '-m 743' drwx--xrwx drwxr---wx 027 '-m =+x' drwxr-x--- d--x--x--- 027 '-m =+X' drwxr-x--- d--x--x--- - - last last
+ IFS=' 
'
+ :
+ test yes = yes
+ set -x
+ umask=000
+ mode=empty
+ parent_perms=drwxrwxrwx
+ sub_perms=drwxrwxrwx
+ test _empty = _empty
+ mode=
+ test drwxrwxrwx = last
+ shift
+ shift
+ shift
+ shift
+ umask 000
+ test x-p = x
+ mkdir -p parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwxrwxrwx = drwxr-xr-x
+ fail=1
+ echo parent: expected drwxrwxrwx, got drwxr-xr-x
parent: expected drwxrwxrwx, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=drwxr-xr-x
+ test drwxrwxrwx = drwxr-xr-x
+ fail=1
+ echo parent/sub: expected drwxrwxrwx, got drwxr-xr-x
parent/sub: expected drwxrwxrwx, got drwxr-xr-x
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=000
+ mode='-m 016'
+ parent_perms=drwxrwxrwx
+ sub_perms=d-----xrw-
+ test '_-m 016' = _empty
+ test d-----xrw- = last
+ shift
+ shift
+ shift
+ shift
+ umask 000
+ test x-p = x
+ mkdir -p -m 016 parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwxrwxrwx = drwxr-xr-x
+ fail=1
+ echo parent: expected drwxrwxrwx, got drwxr-xr-x
parent: expected drwxrwxrwx, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=d-----xrw-
+ test d-----xrw- = d-----xrw-
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=077
+ mode=empty
+ parent_perms=drwx------
+ sub_perms=drwx------
+ test _empty = _empty
+ mode=
+ test drwx------ = last
+ shift
+ shift
+ shift
+ shift
+ umask 077
+ test x-p = x
+ mkdir -p parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwx------ = drwxr-xr-x
+ fail=1
+ echo parent: expected drwx------, got drwxr-xr-x
parent: expected drwx------, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=drwxr-xr-x
+ test drwx------ = drwxr-xr-x
+ fail=1
+ echo parent/sub: expected drwx------, got drwxr-xr-x
parent/sub: expected drwx------, got drwxr-xr-x
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=050
+ mode=empty
+ parent_perms=drwx-w-rwx
+ sub_perms=drwx-w-rwx
+ test _empty = _empty
+ mode=
+ test drwx-w-rwx = last
+ shift
+ shift
+ shift
+ shift
+ umask 050
+ test x-p = x
+ mkdir -p parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwx-w-rwx = drwxr-xr-x
+ fail=1
+ echo parent: expected drwx-w-rwx, got drwxr-xr-x
parent: expected drwx-w-rwx, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=drwxr-xr-x
+ test drwx-w-rwx = drwxr-xr-x
+ fail=1
+ echo parent/sub: expected drwx-w-rwx, got drwxr-xr-x
parent/sub: expected drwx-w-rwx, got drwxr-xr-x
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=050
+ mode='-m 312'
+ parent_perms=drwx-w-rwx
+ sub_perms=d-wx--x-w-
+ test '_-m 312' = _empty
+ test d-wx--x-w- = last
+ shift
+ shift
+ shift
+ shift
+ umask 050
+ test x-p = x
+ mkdir -p -m 312 parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwx-w-rwx = drwxr-xr-x
+ fail=1
+ echo parent: expected drwx-w-rwx, got drwxr-xr-x
parent: expected drwx-w-rwx, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=d-wx--x-w-
+ test d-wx--x-w- = d-wx--x-w-
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=160
+ mode=empty
+ parent_perms=drwx--xrwx
+ sub_perms=drw---xrwx
+ test _empty = _empty
+ mode=
+ test drw---xrwx = last
+ shift
+ shift
+ shift
+ shift
+ umask 160
+ test x-p = x
+ mkdir -p parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwx--xrwx = drwxr-xr-x
+ fail=1
+ echo parent: expected drwx--xrwx, got drwxr-xr-x
parent: expected drwx--xrwx, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=drwxr-xr-x
+ test drw---xrwx = drwxr-xr-x
+ fail=1
+ echo parent/sub: expected drw---xrwx, got drwxr-xr-x
parent/sub: expected drw---xrwx, got drwxr-xr-x
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=160
+ mode='-m 743'
+ parent_perms=drwx--xrwx
+ sub_perms=drwxr---wx
+ test '_-m 743' = _empty
+ test drwxr---wx = last
+ shift
+ shift
+ shift
+ shift
+ umask 160
+ test x-p = x
+ mkdir -p -m 743 parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwx--xrwx = drwxr-xr-x
+ fail=1
+ echo parent: expected drwx--xrwx, got drwxr-xr-x
parent: expected drwx--xrwx, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=drwxr---wx
+ test drwxr---wx = drwxr---wx
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=027
+ mode='-m =+x'
+ parent_perms=drwxr-x---
+ sub_perms=d--x--x---
+ test '_-m =+x' = _empty
+ test d--x--x--- = last
+ shift
+ shift
+ shift
+ shift
+ umask 027
+ test x-p = x
+ mkdir -p -m =+x parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwxr-x--- = drwxr-xr-x
+ fail=1
+ echo parent: expected drwxr-x---, got drwxr-xr-x
parent: expected drwxr-x---, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=d--x--x---
+ test d--x--x--- = d--x--x---
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=027
+ mode='-m =+X'
+ parent_perms=drwxr-x---
+ sub_perms=d--x--x---
+ test '_-m =+X' = _empty
+ test d--x--x--- = last
+ shift
+ shift
+ shift
+ shift
+ umask 027
+ test x-p = x
+ mkdir -p -m =+X parent/sub
++ stat --printf %A parent
+ perms=drwxr-xr-x
+ test drwxr-x--- = drwxr-xr-x
+ fail=1
+ echo parent: expected drwxr-x---, got drwxr-xr-x
parent: expected drwxr-x---, got drwxr-xr-x
++ stat --printf %A parent/sub
+ perms=d--x--x---
+ test d--x--x--- = d--x--x---
+ chmod -R u+rwx parent
+ rm -rf parent
+ :
+ test yes = yes
+ set -x
+ umask=-
+ mode=-
+ parent_perms=last
+ sub_perms=last
+ test _- = _empty
+ test last = last
+ break
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ cd /home/test/rpmbuild/BUILD/coreutils-8.22
+ chmod -R u+rwx /home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT
+ rm -rf /home/test/rpmbuild/BUILD/coreutils-8.22/gt-perm.sh.F3cT
+ exit 1

Expected results:
no testsuite failures

Additional info:
Comment 2 Ondrej Vasik 2015-08-26 08:58:22 EDT
rpmbuild depends on the operating system where you run the build - use mock and rhel 7 mock config if you want to avoid it. 

I expect underlying operating system is causing the test to fail. Can you please provide more information about your system where you run the rpmbuild?
Comment 3 Ondrej Vasik 2015-08-26 09:08:11 EDT
(For some reasons on your machine parent dirs are created with 755 mode instead of 700, although umask is set to 077. Strange, looks like not correctly working umask on your system.)
Comment 4 Karel Volný 2015-08-26 11:25:35 EDT
(In reply to Ondrej Vasik from comment #2)
> Can you please provide more information about your system where you run the rpmbuild?

the log is from RHEL 7 Server stablesystem, but I've seen failures on other machines too - please see the TPS results in ET for a list of machines
Comment 6 Ondrej Vasik 2015-08-31 04:17:42 EDT
As you can see in http://download.devel.redhat.com/brewroot/work/tasks/6234/9766234/build.log scratch build passes and both tests as well in brew build root ( http://download.devel.redhat.com/brewroot/work/tasks/6234/9766234/root.log for the list of packages used in the build root - you can compare what differs ). I suspect some strange settings in beaker environment, however I don't plan to further investigate this issue in near future.
Comment 7 Kamil Dudka 2015-08-31 04:54:08 EDT
Another cause could be default ACLs:

$ mkdir /tmp/dir
$ setfacl -dm group::rx /tmp/dir
$ setfacl -dm other::rx /tmp/dir
$ umask 077
$ mkdir /tmp/dir/new
$ ls -dl /tmp/dir/new
drwxr-xr-x+ 2 kdudka kdudka 4096 Aug 31 10:44 /tmp/dir/new

Could you please re-check this on a file system mounted with the 'noacl' option?
Comment 8 Karel Volný 2015-08-31 12:32:41 EDT
(In reply to Kamil Dudka from comment #7)
> Could you please re-check this on a file system mounted with the 'noacl'
> option?

this doesn't seem to be the problem

the build has just passed on another testing machine, and it has ACLs enabled

/dev/mapper/... on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/... on /home type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

while the machine where the tests fail has the same options

/dev/mapper/... on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

and they both have empty defaults like:

$ getfacl -d /
getfacl: Removing leading '/' from absolute path names
# file: .
# owner: root
# group: root

$ getfacl -d /home
getfacl: Removing leading '/' from absolute path names
# file: home
# owner: root
# group: root


(or am I missing something, is there anything else to compare about ACLs?)
Comment 10 Kamil Dudka 2015-09-01 04:08:25 EDT
How exactly do you run the tests?

Is there any RHTS test we can try ourselves?

I could not find any coreutils test invoking 'rpmbuild --rebuild'.
Comment 11 Karel Volný 2015-09-01 04:22:07 EDT
it is just manual rebuild - the rebuild test is part of TPS, but due to historical reasons it runs as root which fails too, so I've just retried that manually on the stablesystems that picked the TPS jobs

ping me on irc for details about accessing the systems, if needed
Comment 12 Kamil Dudka 2015-09-01 08:10:58 EDT
Thank you for granting me the access, Karel.  I have confirmed this is really an issue with default ACLs:

$ getfacl /home/test
getfacl: Removing leading '/' from absolute path names
# file: home/test
# owner: test
# group: test
user::rwx
group::---
other::---
default:user::rwx
default:group::---
default:other::---


After clearing the default ACLs on ~/rpmbuild, coreutils builds as expected:

$ setfacl -k -R ~/rpmbuild
Comment 14 Karel Volný 2015-09-01 12:01:07 EDT
(In reply to Kamil Dudka from comment #12)
> Thank you for granting me the access, Karel.

you're welcome and I thank you for taking a look because this isn't exactly my cup of tea and it would take me a long time to get into it (if I had the time ...)

> I have confirmed this is
> really an issue with default ACLs:
> 
> $ getfacl /home/test
> getfacl: Removing leading '/' from absolute path names
> # file: home/test
> # owner: test
> # group: test
> user::rwx
> group::---
> other::---
> default:user::rwx
> default:group::---
> default:other::---

now that's interesting where does it come from - as you can see in comment #8 there was no default and now, on the same machine, I see

# getfacl -d /home/
getfacl: Removing leading '/' from absolute path names
# file: home/
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

... it didn't come to my mind to test $HOME and not just /home before, though

> After clearing the default ACLs on ~/rpmbuild, coreutils builds as expected:
> 
> $ setfacl -k -R ~/rpmbuild

yep, I can confirm


do you think you would be able to find out where the bad ACLs come from?

- I doubt that someone sets that manually just to cause coreutils to fail tests, it must come from some system misconfiguration or new package misbehaviour, I smell some regression here ...
Comment 15 Ondrej Vasik 2015-09-01 14:35:24 EDT
Anyway, not a bug in coreutils package itself - keeping opened only until clarified. In any case, potential misconfiguration or regression will likely be reported in separate bugzilla.
Comment 16 Kamil Dudka 2015-09-02 07:53:38 EDT
(In reply to Karel Volný from comment #14)
> do you think you would be able to find out where the bad ACLs come from?

Not really.  Assuming the default ACLs are not set on a fresh el7 installation, you need to check your scripts to see at which point they appear.  I am pretty sure it is not coreutils what introduces them.
Comment 17 Karel Volný 2015-09-02 08:51:29 EDT
(In reply to Kamil Dudka from comment #16)
> Not really.  Assuming the default ACLs are not set on a fresh el7
> installation, you need to check your scripts to see at which point they
> appear.

it surely doesn't come from "my" or "our" scripts; the other machine mentioned in #c8 has been installed with stablesystem profile too (the difference is that it didn't got updates from unreleased errata) and doesn't have this problem

so closing if there isn't an easy way how to catch the culprit

Note You need to log in before you can comment on or make changes to this bug.