Debian Bug report logs - #877813
reprotest: regression between 0.7.1 and 0.7.2

version graph

Package: reprotest; Maintainer for reprotest is Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>; Source for reprotest is src:reprotest (PTS, buildd, popcon).

Reported by: gregor herrmann <gregoa@debian.org>

Date: Thu, 5 Oct 2017 21:57:02 UTC

Severity: important

Found in version reprotest/0.7.2

Fixed in version reprotest/0.7.4

Done: Ximin Luo <infinity0@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Thu, 05 Oct 2017 21:57:04 GMT) (full text, mbox, link).


Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
New Bug report received and forwarded. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 05 Oct 2017 21:57:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: gregor herrmann <gregoa@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: reprotest: regression between 0.7.1 and 0.7.2
Date: Thu, 05 Oct 2017 23:53:18 +0200
Package: reprotest
Version: 0.7.2
Severity: important

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

reprotest 0.7 and 0.7.1 work fine for me, 0.7.2 explodes horribly:

#v+
preset auto-selected: ReprotestPreset(build_command='\n        if [ "$(id -u)" = 0 ]; then\n            sudo -E -u "$LOGNAME" sh -ec \'dpkg-buildpackage --no-sign -b\';\n        else\n            sh -ec \'dpkg-buildpackage --no-sign -b\';\n        fi\n        ', artifact_pattern='../*.deb', testbed_pre=None, testbed_init='apt-get -y --no-install-recommends install disorderfs faketime locales-all sudo util-linux;         test -c /dev/fuse || mknod -m 666 /dev/fuse c 10 229;         test -f /etc/mtab || ln -s ../proc/self/mounts /etc/mtab', testbed_build_pre='apt-get -y --no-install-recommends build-dep ./"."', source_pattern=None, diffoscope_args=[])
STARTING VIRTUAL SERVER ['/usr/lib/python3/dist-packages/reprotest/virt/autopkgtest-virt-schroot', 'default']
reprotest [23:26:51]: version @version@
reprotest [23:26:51]: host jadzia; command line: /usr/bin/reprotest --variations=+all,-build_path,-user_group --verbosity 1 . -- schroot default
reprotest [23:26:52]: testbed package architecture: amd64
reprotest [23:26:52]: testbed running kernel: Linux 4.12.0-2-amd64 #1 SMP Debian 4.12.13-1 (2017-09-19)
Reading package lists...
Building dependency tree...
[..]
executing: if ( mv /tmp/autopkgtest.03NT2s/build-control/ /tmp/autopkgtest.03NT2s/const_build_path && umask 0022 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.03NT2s/const_build_path/ && export REPROTEST_UMASK=$(umask) && linux64 --uname-2.6 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; 
        if [ "$(id -u)" = 0 ]; then
            sudo -E -u "$LOGNAME" sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        else
            sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        fi
        ' ); then
    ( __c=0; mv /tmp/autopkgtest.03NT2s/const_build_path /tmp/autopkgtest.03NT2s/build-control/ || __c=$?; exit $__c; );
else
    __x=$?;
    if ( __c=0; mv /tmp/autopkgtest.03NT2s/const_build_path /tmp/autopkgtest.03NT2s/build-control/ || __c=$?; exit $__c; ); then exit $__x; else
        echo >&2; "cleanup failed with exit code $?"; exit $__x;
    fi;
fi

sudo: unable to resolve host jadzia
dpkg-buildpackage: error: fakeroot not found, either install the fakeroot
package, specify a command with the -r option, or run this as root
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 720, in run
    return 0 if check_func(*check_args) else 1
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 332, in check
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 332, in <listcomp>
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 298, in corun_builds
    bctx.run_build(testbed, build, artifact_pattern, testbed_build_pre)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 186, in run_build
    kind='build')
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 61, in check_exec2
    adtlog.AutopkgtestError)
  File "/usr/lib/python3/dist-packages/reprotest/lib/adt_testbed.py", line 370, in bomb
    raise _type(m)
reprotest.lib.adtlog.AutopkgtestError: "sh -ec if ( mv /tmp/autopkgtest.03NT2s/build-control/ /tmp/autopkgtest.03NT2s/const_build_path && umask 0022 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.03NT2s/const_build_path/ && export REPROTEST_UMASK=$(umask) && linux64 --uname-2.6 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; 
        if [ "$(id -u)" = 0 ]; then
            sudo -E -u "$LOGNAME" sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        else
            sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        fi
        ' ); then
    ( __c=0; mv /tmp/autopkgtest.03NT2s/const_build_path /tmp/autopkgtest.03NT2s/build-control/ || __c=$?; exit $__c; );
else
    __x=$?;
    if ( __c=0; mv /tmp/autopkgtest.03NT2s/const_build_path /tmp/autopkgtest.03NT2s/build-control/ || __c=$?; exit $__c; ); then exit $__x; else
        echo >&2; "cleanup failed with exit code $?"; exit $__x;
    fi;
fi
" failed with status 2
#v-

This seems to be related to the "sudo" use in the output above (or
the funny output in the first line?), or

  * Improve the dsc+schroot preset to run builds as non-root.

in the changelog, or 62416ab in git.

After that, my python knowledge and domain knowledge ends; but
unfortunately this means that reprotest 0.7.2 is unusable for me.

I'm happy to provide any further information or do any tests.


Cheers,
gregor


- -- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'unstable-debug'), (500, 'oldoldstable'), (500, 'experimental'), (500, 'testing'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=de_AT.utf8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages reprotest depends on:
ii  apt-utils              1.5
ii  diffoscope             87
ii  libdpkg-perl           1.18.24
ii  procps                 2:3.3.12-3
ii  python3                3.5.3-3
ii  python3-debian         0.1.31
ii  python3-pkg-resources  36.2.7-2

Versions of packages reprotest recommends:
ii  diffoscope   87
ii  diffutils    1:3.6-1
ii  disorderfs   0.5.2-1
ii  faketime     0.9.6-7+b1
pn  locales-all  <none>
ii  sudo         1.8.21p2-2

Versions of packages reprotest suggests:
ii  autodep8     0.10
ii  qemu-system  1:2.10.0+dfsg-1
ii  qemu-utils   1:2.10.0+dfsg-1
ii  schroot      1.6.10-4

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAlnWqc5fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgb0fA//Ri01jeVkPetlBg4U+XEhbCGPXF3em0pT4M7KQFnMdvnrARTvXmvmVfRV
3CUXFpZQc7SoBYGtcMa89HaDOQMZooQGqWI6DnGF/+Srp5k5lscxdmR6xfqUZVYw
dCOWF9TDAIyD0QGQ2tGGiRUC9/YEo3Wld6mU3ikMsr5zgRK9A1vpW1IR3TTlzGnV
w7HtLzQG1FHFxYyE8KwLV/Spb8Z8SIy++9/x2xT/EvjL7tiBf3IPkrrOMIodN47I
0NN84fo4na4+XjmRakYpCQSj5P36oqbsUAALIL0y1fmuOL2UG1M9aUZlbhuXL4YM
5y+JwtaHMMqNyR6V2Y8Fc2vWH8aeDKQrwtWKczI89MFd7cXEl0NKRM+qck0+N6Em
5bfv5JM+PV0MtatE0FiVGnurydTH9iR+cPhzT8ewio/EyxYXtKUkizsR1PbmGMxn
zQDa4cAqI0kw1aIx3twjWW0DyFk069OUxGxRyaTg4RxcSPt6DuuIRvYpX3PGVpeu
kxkNQUp5deOTBfUvTSBCxesn+Ju7NL5g0W+WIu6Yv/GB6Hx1Rp9XNT81Lw4Aluf5
q4OGwvPAg9DshEmRc4q83wxCd4rGqo5hVL9A9RTUanc2sX/cUdgCk8Cu1grd58MT
T/u3bQ/v9aYIl+Y0YP7URnFFVCUyVTFk6eW5AnQQF9vjRmb9h/s=
=bnw1
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Thu, 05 Oct 2017 22:21:06 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 05 Oct 2017 22:21:07 GMT) (full text, mbox, link).


Message #10 received at 877813@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: gregor herrmann <gregoa@debian.org>, 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Thu, 05 Oct 2017 22:16:00 +0000
gregor herrmann:
> [..]> dpkg-buildpackage: error: fakeroot not found, either install the fakeroot
> package, specify a command with the -r option, or run this as root
> [..]
> 
> This seems to be related to the "sudo" use in the output above (or
> the funny output in the first line?), or
> 
>   * Improve the dsc+schroot preset to run builds as non-root.
> 
> in the changelog, or 62416ab in git.
> 
> After that, my python knowledge and domain knowledge ends; but
> unfortunately this means that reprotest 0.7.2 is unusable for me.
> 
Hi gregor, does it work if log into your "default" schroot and install the "fakeroot" package?

I am not sure why it is not installed there already - I have it installed in my unstable-amd64-sbuild chroot.

It would be easy enough to have reprotest install it automatically, but I'm not sure that's the best solution since another tool is already supposed to take care of that.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Thu, 05 Oct 2017 22:39:13 GMT) (full text, mbox, link).


Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 05 Oct 2017 22:39:13 GMT) (full text, mbox, link).


Message #15 received at 877813@bugs.debian.org (full text, mbox, reply):

From: gregor herrmann <gregoa@debian.org>
To: Ximin Luo <infinity0@debian.org>, 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Fri, 6 Oct 2017 00:38:05 +0200
[Message part 1 (text/plain, inline)]
On Thu, 05 Oct 2017 22:16:00 +0000, Ximin Luo wrote:

> gregor herrmann:
> > [..]> dpkg-buildpackage: error: fakeroot not found, either install the fakeroot
> > package, specify a command with the -r option, or run this as root
> > [..]
> > 
> > This seems to be related to the "sudo" use in the output above (or
> > the funny output in the first line?), or
> > 
> >   * Improve the dsc+schroot preset to run builds as non-root.
> > 
> > in the changelog, or 62416ab in git.
> > 
> > After that, my python knowledge and domain knowledge ends; but
> > unfortunately this means that reprotest 0.7.2 is unusable for me.
> > 

> Hi gregor, does it work if log into your "default" schroot and
> install the "fakeroot" package?

Thanks for your super-fast reply.

Unfortunately, the answer is no:

After installing fakeroot in the schroot chroot and upgrading
reprotest again to 0.7.2 the result is -- hm, well different than
before. The first build succeeds, the second aborts with

package 1:

#v+
dpkg-buildpackage: info: binary-only upload (no source included)
copying /tmp/autopkgtest.uaX6su/artifacts-control/ back from virtual server's /tmp/tmp0i8yh6gh/control
build "experiment-1": vary environment, FIX build_path, FIX user_group, vary fileordering, vary home, vary kernel, vary locales, vary exec_path, vary time, vary timezone, vary umask
copying . over to virtual server's /tmp/autopkgtest.uaX6su/build-experiment-1/
starting build with source directory: /tmp/autopkgtest.uaX6su/build-experiment-1/, artifact pattern: ./../*.deb
Note, using directory './.' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
executing: if ( mv /tmp/autopkgtest.uaX6su/build-experiment-1/ /tmp/autopkgtest.uaX6su/const_build_path && mv /tmp/autopkgtest.uaX6su/const_build_path/ /tmp/autopkgtest.uaX6su/const_build_path-before-disorderfs/ && mkdir -p /tmp/autopkgtest.uaX6su/const_build_path/ && disorderfs --shuffle-dirents=yes /tmp/autopkgtest.uaX6su/const_build_path-before-disorderfs/ /tmp/autopkgtest.uaX6su/const_build_path/ && umask 0002 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.uaX6su/const_build_path/ && export REPROTEST_UMASK=$(umask) && faketime +373days+7hours+13minutes linux32 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; 
        if [ "$(id -u)" = 0 ]; then
            sudo -E -u "$LOGNAME" sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        else
            sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        fi
        ' ); then
    ( __c=0; export PATH="/tmp/autopkgtest.uaX6su/bin:$PATH" || __c=$?; fusermount -u /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; rmdir /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; mv /tmp/autopkgtest.uaX6su/const_build_path-before-disorderfs/ /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; mv /tmp/autopkgtest.uaX6su/const_build_path /tmp/autopkgtest.uaX6su/build-experiment-1/ || __c=$?; exit $__c; );
else
    __x=$?;
    if ( __c=0; export PATH="/tmp/autopkgtest.uaX6su/bin:$PATH" || __c=$?; fusermount -u /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; rmdir /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; mv /tmp/autopkgtest.uaX6su/const_build_path-before-disorderfs/ /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; mv /tmp/autopkgtest.uaX6su/const_build_path /tmp/autopkgtest.uaX6su/build-experiment-1/ || __c=$?; exit $__c; ); then exit $__x; else
        echo >&2; "cleanup failed with exit code $?"; exit $__x;
    fi;
fi

disorderfs: shuffling dirents
disorderfs: reversing dirents
sudo: Î޷¨½âÎöÖ÷»ú£ºjadzia
tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
dpkg-buildpackage: erreur: fin de debian/changelog a produit une erreur de sortie de type 1
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 720, in run
    return 0 if check_func(*check_args) else 1
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 332, in check
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 332, in <listcomp>
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 298, in corun_builds
    bctx.run_build(testbed, build, artifact_pattern, testbed_build_pre)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 186, in run_build
    kind='build')
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 61, in check_exec2
    adtlog.AutopkgtestError)
  File "/usr/lib/python3/dist-packages/reprotest/lib/adt_testbed.py", line 370, in bomb
    raise _type(m)
reprotest.lib.adtlog.AutopkgtestError: "sh -ec if ( mv /tmp/autopkgtest.uaX6su/build-experiment-1/ /tmp/autopkgtest.uaX6su/const_build_path && mv /tmp/autopkgtest.uaX6su/const_build_path/ /tmp/autopkgtest.uaX6su/const_build_path-before-disorderfs/ && mkdir -p /tmp/autopkgtest.uaX6su/const_build_path/ && disorderfs --shuffle-dirents=yes /tmp/autopkgtest.uaX6su/const_build_path-before-disorderfs/ /tmp/autopkgtest.uaX6su/const_build_path/ && umask 0002 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.uaX6su/const_build_path/ && export REPROTEST_UMASK=$(umask) && faketime +373days+7hours+13minutes linux32 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; 
        if [ "$(id -u)" = 0 ]; then
            sudo -E -u "$LOGNAME" sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        else
            sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        fi
        ' ); then
    ( __c=0; export PATH="/tmp/autopkgtest.uaX6su/bin:$PATH" || __c=$?; fusermount -u /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; rmdir /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; mv /tmp/autopkgtest.uaX6su/const_build_path-before-disorderfs/ /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; mv /tmp/autopkgtest.uaX6su/const_build_path /tmp/autopkgtest.uaX6su/build-experiment-1/ || __c=$?; exit $__c; );
else
    __x=$?;
    if ( __c=0; export PATH="/tmp/autopkgtest.uaX6su/bin:$PATH" || __c=$?; fusermount -u /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; rmdir /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; mv /tmp/autopkgtest.uaX6su/const_build_path-before-disorderfs/ /tmp/autopkgtest.uaX6su/const_build_path/ || __c=$?; mv /tmp/autopkgtest.uaX6su/const_build_path /tmp/autopkgtest.uaX6su/build-experiment-1/ || __c=$?; exit $__c; ); then exit $__x; else
        echo >&2; "cleanup failed with exit code $?"; exit $__x;
    fi;
fi
" failed with status 1
#v-

package 2:

#v+
dpkg-buildpackage: info: binary-only upload (no source included)
copying /tmp/autopkgtest.ESTMWe/artifacts-control/ back from virtual server's /tmp/tmpisswk1hj/control
build "experiment-1": vary environment, FIX build_path, FIX user_group, vary fileordering, vary home, vary kernel, vary locales, vary exec_path, vary time, vary timezone, vary umask
copying . over to virtual server's /tmp/autopkgtest.ESTMWe/build-experiment-1/
starting build with source directory: /tmp/autopkgtest.ESTMWe/build-experiment-1/, artifact pattern: ./../*.deb
Note, using directory './.' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
executing: if ( mv /tmp/autopkgtest.ESTMWe/build-experiment-1/ /tmp/autopkgtest.ESTMWe/const_build_path && mv /tmp/autopkgtest.ESTMWe/const_build_path/ /tmp/autopkgtest.ESTMWe/const_build_path-before-disorderfs/ && mkdir -p /tmp/autopkgtest.ESTMWe/const_build_path/ && disorderfs --shuffle-dirents=yes /tmp/autopkgtest.ESTMWe/const_build_path-before-disorderfs/ /tmp/autopkgtest.ESTMWe/const_build_path/ && umask 0002 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.ESTMWe/const_build_path/ && export REPROTEST_UMASK=$(umask) && faketime +373days+7hours+13minutes linux32 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; 
        if [ "$(id -u)" = 0 ]; then
            sudo -E -u "$LOGNAME" sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        else
            sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        fi
        ' ); then
    ( __c=0; export PATH="/tmp/autopkgtest.ESTMWe/bin:$PATH" || __c=$?; fusermount -u /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; rmdir /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; mv /tmp/autopkgtest.ESTMWe/const_build_path-before-disorderfs/ /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; mv /tmp/autopkgtest.ESTMWe/const_build_path /tmp/autopkgtest.ESTMWe/build-experiment-1/ || __c=$?; exit $__c; );
else
    __x=$?;
    if ( __c=0; export PATH="/tmp/autopkgtest.ESTMWe/bin:$PATH" || __c=$?; fusermount -u /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; rmdir /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; mv /tmp/autopkgtest.ESTMWe/const_build_path-before-disorderfs/ /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; mv /tmp/autopkgtest.ESTMWe/const_build_path /tmp/autopkgtest.ESTMWe/build-experiment-1/ || __c=$?; exit $__c; ); then exit $__x; else
        echo >&2; "cleanup failed with exit code $?"; exit $__x;
    fi;
fi

disorderfs: shuffling dirents
disorderfs: reversing dirents
sudo: impossible de déterminer le nom de l'hôte jadzia
tail: no se puede abrir 'debian/changelog' para lectura: Permiso denegado
dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 720, in run
    return 0 if check_func(*check_args) else 1
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 332, in check
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 332, in <listcomp>
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 298, in corun_builds
    bctx.run_build(testbed, build, artifact_pattern, testbed_build_pre)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 186, in run_build
    kind='build')
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 61, in check_exec2
    adtlog.AutopkgtestError)
  File "/usr/lib/python3/dist-packages/reprotest/lib/adt_testbed.py", line 370, in bomb
    raise _type(m)
reprotest.lib.adtlog.AutopkgtestError: "sh -ec if ( mv /tmp/autopkgtest.ESTMWe/build-experiment-1/ /tmp/autopkgtest.ESTMWe/const_build_path && mv /tmp/autopkgtest.ESTMWe/const_build_path/ /tmp/autopkgtest.ESTMWe/const_build_path-before-disorderfs/ && mkdir -p /tmp/autopkgtest.ESTMWe/const_build_path/ && disorderfs --shuffle-dirents=yes /tmp/autopkgtest.ESTMWe/const_build_path-before-disorderfs/ /tmp/autopkgtest.ESTMWe/const_build_path/ && umask 0002 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.ESTMWe/const_build_path/ && export REPROTEST_UMASK=$(umask) && faketime +373days+7hours+13minutes linux32 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; 
        if [ "$(id -u)" = 0 ]; then
            sudo -E -u "$LOGNAME" sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        else
            sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        fi
        ' ); then
    ( __c=0; export PATH="/tmp/autopkgtest.ESTMWe/bin:$PATH" || __c=$?; fusermount -u /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; rmdir /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; mv /tmp/autopkgtest.ESTMWe/const_build_path-before-disorderfs/ /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; mv /tmp/autopkgtest.ESTMWe/const_build_path /tmp/autopkgtest.ESTMWe/build-experiment-1/ || __c=$?; exit $__c; );
else
    __x=$?;
    if ( __c=0; export PATH="/tmp/autopkgtest.ESTMWe/bin:$PATH" || __c=$?; fusermount -u /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; rmdir /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; mv /tmp/autopkgtest.ESTMWe/const_build_path-before-disorderfs/ /tmp/autopkgtest.ESTMWe/const_build_path/ || __c=$?; mv /tmp/autopkgtest.ESTMWe/const_build_path /tmp/autopkgtest.ESTMWe/build-experiment-1/ || __c=$?; exit $__c; ); then exit $__x; else
        echo >&2; "cleanup failed with exit code $?"; exit $__x;
    fi;
fi
" failed with status 1
#v-

> I am not sure why it is not installed there already - I have it installed in my unstable-amd64-sbuild chroot.

Well, fakeroot is neither essential nor build-essential.
Besides that, my gut feeling (which may be very wrong) is more that
the problem is more in the sudo corner.
 
> It would be easy enough to have reprotest install it automatically,
> but I'm not sure that's the best solution since another tool is
> already supposed to take care of that.

Which one?


Cheers,
gregor


-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Pink Floyd: Empty Spaces
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Thu, 05 Oct 2017 23:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 05 Oct 2017 23:03:03 GMT) (full text, mbox, link).


Message #20 received at 877813@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: gregor herrmann <gregoa@debian.org>, 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Thu, 05 Oct 2017 22:59:00 +0000
gregor herrmann:
> [..]
> sudo: Î޷¨½âÎöÖ÷»ú£ºjadzia
> tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
> dpkg-buildpackage: erreur: fin de debian/changelog a produit une erreur de sortie de type 1
> [..]
> sudo: impossible de déterminer le nom de l'hôte jadzia
> tail: no se puede abrir 'debian/changelog' para lectura: Permiso denegado
> dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1
> 

tail(1) apparently can't read debian/changelog. I don't know how you set up your schroot, but reprotest is coded against the sbuild-createchroot stuff. Have you tried using that?

What command line are you running to get these errors?

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Thu, 05 Oct 2017 23:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 05 Oct 2017 23:36:03 GMT) (full text, mbox, link).


Message #25 received at 877813@bugs.debian.org (full text, mbox, reply):

From: gregor herrmann <gregoa@debian.org>
To: Ximin Luo <infinity0@debian.org>
Cc: 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Fri, 6 Oct 2017 01:32:41 +0200
[Message part 1 (text/plain, inline)]
On Thu, 05 Oct 2017 22:59:00 +0000, Ximin Luo wrote:

> gregor herrmann:
> > [..]
> > sudo: Î޷¨½âÎöÖ÷»ú£ºjadzia
> > tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
> > dpkg-buildpackage: erreur: fin de debian/changelog a produit une erreur de sortie de type 1
> > [..]
> > sudo: impossible de déterminer le nom de l'hôte jadzia
> > tail: no se puede abrir 'debian/changelog' para lectura: Permiso denegado
> > dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1

> tail(1) apparently can't read debian/changelog. 

Yes, after manually installing fakeroot, which I didn't need to do
for reprotest <= 0.7.1.

And the error before "tail: can't open ..." (in Spanish) is still
"sudo: can't determine hostname ..." (in French).

I might be wrong, but this still sounds like a problem related to
sudo to me.

Full disclosure: I'm not running systems in the Ubuntu-style of "sudo
all all nopasswd everything <myuser>". And so far both autopkgtest
and reprotest (which are both using the same schroot chroot, and are
the only ones, as for building I'm using cowbuilder) just worked.

> I don't know how you set up your schroot, but reprotest is coded
> against the sbuild-createchroot stuff. Have you tried using that?

That's a good question :) And I'm not entirely sure since I did this
years ago and I only use the schroot chroot for autopkgtest and
reprotest; but I think it was sbuild-createchroot as well.
 
> What command line are you running to get these errors?

Another good question; I call reprotest from a wrapper script:

https://anonscm.debian.org/cgit/pkg-perl/packages/pkg-perl-tools.git/tree/examples/check-build#n86

Which, run under 'sh -x' looks like:

#v+
+ read -n 1 -p 'reprotest? y/N ' REPRO
reprotest? y/N y+ '[' y = y ']'
+ REPROTESTLOG=../build-area/openpgp-applet_1.0-2_amd64_reprotest.log
+ '[' -x /usr/bin/schroot ']'
+ schroot -l
+ grep -q default
+ REPROTEST_VIRT_SERVER=schroot
+ REPROTEST_VIRT_SERVER_ARGS=default
+ '[' -n schroot ']'
++ dpkg-query -f '${Version}\n' -W reprotest
+ REPROTESTVERSION=0.7.2
+ dpkg --compare-versions 0.7.2 ge 0.7
+ REPROTESTPARAMS='--variations=+all,-build_path,-user_group --verbosity 1 . '
+ env -u TMPDIR -- reprotest --variations=+all,-build_path,-user_group --verbosity 1 . -- schroot default
+ tee ../build-area/openpgp-applet_1.0-2_amd64_reprotest.log
preset auto-selected: ReprotestPreset(build_command='\n        if [ "$(id -u)" = 0 ]; then\n            sudo -E -u "$LOGNAME" sh -ec \'dpkg-buildpackage --no-sign -b\';\n        else\n            sh -ec \'dpkg-buildpackage --no-sign -b\';\n        fi\n        ', artifact_pattern='../*.deb', testbed_pre=None, testbed_init='apt-get -y --no-install-recommends install disorderfs faketime locales-all sudo util-linux;         test -c /dev/fuse || mknod -m 666 /dev/fuse c 10 229;         test -f /etc/mtab || ln -s ../proc/self/mounts /etc/mtab', testbed_build_pre='apt-get -y --no-install-recommends build-dep ./"."', source_pattern=None, diffoscope_args=[])
STARTING VIRTUAL SERVER ['/usr/lib/python3/dist-packages/reprotest/virt/autopkgtest-virt-schroot', 'default']
reprotest [01:25:00]: version @version@
reprotest [01:25:00]: host jadzia; command line: /usr/bin/reprotest --variations=+all,-build_path,-user_group --verbosity 1 . -- schroot default
reprotest [01:25:00]: testbed package architecture: amd64
reprotest [01:25:01]: testbed running kernel: Linux 4.12.0-2-amd64 #1 SMP Debian 4.12.13-1 (2017-09-19)
Reading package lists...
[.. first build ..]
executing: if ( mv /tmp/autopkgtest.eYrFOo/build-control/ /tmp/autopkgtest.eYrFOo/const_build_path && umask 0022 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.eYrFOo/const_build_path/ && export REPROTEST_UMASK=$(umask) && linux64 --uname-2.6 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; 
        if [ "$(id -u)" = 0 ]; then
            sudo -E -u "$LOGNAME" sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        else
            sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        fi
        ' ); then
    ( __c=0; mv /tmp/autopkgtest.eYrFOo/const_build_path /tmp/autopkgtest.eYrFOo/build-control/ || __c=$?; exit $__c; );
else
    __x=$?;
    if ( __c=0; mv /tmp/autopkgtest.eYrFOo/const_build_path /tmp/autopkgtest.eYrFOo/build-control/ || __c=$?; exit $__c; ); then exit $__x; else
        echo >&2; "cleanup failed with exit code $?"; exit $__x;
    fi;
fi

sudo: unable to resolve host jadzia
dpkg-buildpackage: error: fakeroot not found, either install the fakeroot
package, specify a command with the -r option, or run this as root
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 720, in run
    return 0 if check_func(*check_args) else 1
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 332, in check
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 332, in <listcomp>
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 298, in corun_builds
    bctx.run_build(testbed, build, artifact_pattern, testbed_build_pre)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 186, in run_build
    kind='build')
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 61, in check_exec2
    adtlog.AutopkgtestError)
  File "/usr/lib/python3/dist-packages/reprotest/lib/adt_testbed.py", line 370, in bomb
    raise _type(m)
reprotest.lib.adtlog.AutopkgtestError: "sh -ec if ( mv /tmp/autopkgtest.eYrFOo/build-control/ /tmp/autopkgtest.eYrFOo/const_build_path && umask 0022 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.eYrFOo/const_build_path/ && export REPROTEST_UMASK=$(umask) && linux64 --uname-2.6 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; 
        if [ "$(id -u)" = 0 ]; then
            sudo -E -u "$LOGNAME" sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        else
            sh -ec '"'"'dpkg-buildpackage --no-sign -b'"'"';
        fi
        ' ); then
    ( __c=0; mv /tmp/autopkgtest.eYrFOo/const_build_path /tmp/autopkgtest.eYrFOo/build-control/ || __c=$?; exit $__c; );
else
    __x=$?;
    if ( __c=0; mv /tmp/autopkgtest.eYrFOo/const_build_path /tmp/autopkgtest.eYrFOo/build-control/ || __c=$?; exit $__c; ); then exit $__x; else
        echo >&2; "cleanup failed with exit code $?"; exit $__x;
    fi;
fi
" failed with status 2
#v-


Cheers,
gregor


-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Blumfeld: Testament der Angst
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Mon, 09 Oct 2017 14:21:05 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Mon, 09 Oct 2017 14:21:05 GMT) (full text, mbox, link).


Message #30 received at 877813@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: gregor herrmann <gregoa@debian.org>, 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Mon, 09 Oct 2017 14:16:00 +0000
gregor herrmann:
> On Thu, 05 Oct 2017 22:59:00 +0000, Ximin Luo wrote:
> 
>> gregor herrmann:
>>> [..]
>>> sudo: Î޷¨½âÎöÖ÷»ú£ºjadzia
>>> tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
>>> dpkg-buildpackage: erreur: fin de debian/changelog a produit une erreur de sortie de type 1
>>> [..]
>>> sudo: impossible de déterminer le nom de l'hôte jadzia
>>> tail: no se puede abrir 'debian/changelog' para lectura: Permiso denegado
>>> dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1
> 
>> tail(1) apparently can't read debian/changelog. 
> 
> Yes, after manually installing fakeroot, which I didn't need to do
> for reprotest <= 0.7.1.
> 
> And the error before "tail: can't open ..." (in Spanish) is still
> "sudo: can't determine hostname ..." (in French).
> 
> I might be wrong, but this still sounds like a problem related to
> sudo to me.
> 
> Full disclosure: I'm not running systems in the Ubuntu-style of "sudo
> all all nopasswd everything <myuser>". And so far both autopkgtest
> and reprotest (which are both using the same schroot chroot, and are
> the only ones, as for building I'm using cowbuilder) just worked.
> 
>> I don't know how you set up your schroot, but reprotest is coded
>> against the sbuild-createchroot stuff. Have you tried using that?
> 
> That's a good question :) And I'm not entirely sure since I did this
> years ago and I only use the schroot chroot for autopkgtest and
> reprotest; but I think it was sbuild-createchroot as well.
>  
>> What command line are you running to get these errors?
> 
> Another good question; I call reprotest from a wrapper script:
> 
> https://anonscm.debian.org/cgit/pkg-perl/packages/pkg-perl-tools.git/tree/examples/check-build#n86
> 
> Which, run under 'sh -x' looks like:
> 
> [..]
As a wild guess, make sure the user that you're running the build as is in the "fuse" group. This is needed for disorderfs. If you don't want to do that, give --vary=-fileordering to reprotest. (This is actually already documented in the README / man page, and disorderfs IIRC should output an error message but that part is cut out of your log).

Otherwise, I'm out of ideas. You need to tell me exactly how to reproduce this issue, including how you created the chroot - otherwise I can't make any progress. I can't possibly guess why tail(1) shouldn't be able to read debian/changelog, apart from the "fuse" issue I just mentioned.

(I don't have NOPASSWD in my sudoers file either.)

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Tue, 17 Oct 2017 16:24:06 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Tue, 17 Oct 2017 16:24:06 GMT) (full text, mbox, link).


Message #35 received at 877813@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: gregor herrmann <gregoa@debian.org>, 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Tue, 17 Oct 2017 16:21:00 +0000
Ximin Luo:
> gregor herrmann:
>> On Thu, 05 Oct 2017 22:59:00 +0000, Ximin Luo wrote:
>>
>>> gregor herrmann:
>>>> [..]
>>>> sudo: Î޷¨½âÎöÖ÷»ú£ºjadzia
>>>> tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
>>>> dpkg-buildpackage: erreur: fin de debian/changelog a produit une erreur de sortie de type 1
>>>> [..]
>>>> sudo: impossible de déterminer le nom de l'hôte jadzia
>>>> tail: no se puede abrir 'debian/changelog' para lectura: Permiso denegado
>>>> dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1
>>
>>> tail(1) apparently can't read debian/changelog. 
>>
>> Yes, after manually installing fakeroot, which I didn't need to do
>> for reprotest <= 0.7.1.
>>
>> And the error before "tail: can't open ..." (in Spanish) is still
>> "sudo: can't determine hostname ..." (in French).
>>
>> I might be wrong, but this still sounds like a problem related to
>> sudo to me.
>>

I think the sudo hostname thing is a red herring, I get that on my system too depending on what I have in /etc/hosts in the chroot, but things should still work.

In the latest version 0.7.3 of reprotest, I've fixed the --no-clean-on-error option. Try giving that to reprotest and then when it fails, go into the build directory (either inside or outside the chroot) and then hopefully it should be possible for you to figure out why tail(1) can't read debian/changelog.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Fri, 20 Oct 2017 14:21:03 GMT) (full text, mbox, link).


Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Fri, 20 Oct 2017 14:21:03 GMT) (full text, mbox, link).


Message #40 received at 877813@bugs.debian.org (full text, mbox, reply):

From: gregor herrmann <gregoa@debian.org>
To: Ximin Luo <infinity0@debian.org>, 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Fri, 20 Oct 2017 16:18:05 +0200
[Message part 1 (text/plain, inline)]
On Mon, 09 Oct 2017 14:16:00 +0000, Ximin Luo wrote:

Thanks for your mails and for coming back to this bug!
And sorry for my late reply.

> >> What command line are you running to get these errors?
> > 
> > Another good question; I call reprotest from a wrapper script:
> > 
> > https://anonscm.debian.org/cgit/pkg-perl/packages/pkg-perl-tools.git/tree/examples/check-build#n86
> > 
> > Which, run under 'sh -x' looks like:
> > 
> > [..]
> As a wild guess, make sure the user that you're running the build
> as is in the "fuse" group. This is needed for disorderfs. If you
> don't want to do that, give --vary=-fileordering to reprotest.
> (This is actually already documented in the README / man page, and
> disorderfs IIRC should output an error message but that part is cut
> out of your log).

I run reprotest as the unpriviledged user 'gregoa' which is in the
fuse group, both "outside" and within the chroot.
 

On Tue, 17 Oct 2017 16:21:00 +0000, Ximin Luo wrote:

> >>> tail(1) apparently can't read debian/changelog. 
> >>
> >> Yes, after manually installing fakeroot, which I didn't need to do
> >> for reprotest <= 0.7.1.
> >>
> >> And the error before "tail: can't open ..." (in Spanish) is still
> >> "sudo: can't determine hostname ..." (in French).
> >>
> >> I might be wrong, but this still sounds like a problem related to
> >> sudo to me.
> >>
> I think the sudo hostname thing is a red herring, I get that on my
> system too depending on what I have in /etc/hosts in the chroot,
> but things should still work.

Ack, I got rid of this warning by adding the hostname to /etc/hosts
within the chroot.

So currently I have:

- reprotest called as 
  env -u TMPDIR -- reprotest --variations=+all,-build_path,-user_group --verbosity 1 . -- schroot default 2>&1 | tee ../build-area/libmime-tools-perl_5.509-1_sourceonly_reprotest.log
  (unsetting TMPDIR is necessary because the TMPDIR on my system doesn't exist in the chroot)
- works with 0.7.1 -> libmime-tools-perl_5.509-1_sourceonly_reprotest_0.7.1.log
- fails with 0.7.3 without fakeroot in the chroot -> libmime-tools-perl_5.509-1_sourceonly_reprotest_0.7.3_no-fakeroot.log
- fails with 0.7.3 after installing fakeroot -> libmime-tools-perl_5.509-1_sourceonly_reprotest_0.7.3_fail.log
  again with "tail: impossible d'ouvrir 'debian/changelog' en lecture: Permission non accordée"
 
> In the latest version 0.7.3 of reprotest, I've fixed the
> --no-clean-on-error option. Try giving that to reprotest and then
> when it fails, go into the build directory (either inside or
> outside the chroot) and then hopefully it should be possible for
> you to figure out why tail(1) can't read debian/changelog.

Ok, if I add --no-clean-on-error to the command above, the second
build ends at the following without giving me a shell:


INFO:root:build successful, copying artifacts
INFO:root:copying /tmp/autopkgtest.tgbi5X/artifacts-control/ back from virtual server's /tmp/tmpsk8jqbbl/control
INFO:root:build "experiment-1": vary environment, FIX build_path, FIX user_group, vary fileordering, vary home, vary kernel, vary locales, vary exec_path, vary time, vary timezone, vary umask
INFO:root:copying . over to virtual server's /tmp/autopkgtest.tgbi5X/build-experiment-1/
INFO:root:starting build with source directory: /tmp/autopkgtest.tgbi5X/build-experiment-1/, artifact pattern: ./../*.deb
Note, using directory './.' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
INFO:root:executing build in /tmp/autopkgtest.tgbi5X/const_build_path/
tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
dpkg-buildpackage: error: tail of debian/changelog subprocess returned exit status 1
INFO:root:build successful, copying artifacts
/bin/sh: 2: cd: can't cd to /tmp/autopkgtest.tgbi5X/build-experiment-1/
WARNING:root:preserving temporary files in: /tmp/autopkgtest.tgbi5X
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 783, in run
    return 0 if check_func(*check_args) else 1
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 343, in check
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 343, in <listcomp>
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 309, in corun_builds
    bctx.run_build(testbed, build, os.environ, artifact_pattern, testbed_build_pre, no_clean_on_error)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 206, in run_build
    testbed.check_exec2(shell_copy_pattern(dist_base, self.testbed_src, artifact_pattern))
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 62, in check_exec2
    adtlog.AutopkgtestError)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 68, in bomb
    raise _type(m)
reprotest.lib.adtlog.AutopkgtestError: "sh -ec mkdir -p "/tmp/autopkgtest.tgbi5X/artifacts-experiment-1/source-root"
cd "/tmp/autopkgtest.tgbi5X/build-experiment-1/" && cp --parents -a -t "/tmp/autopkgtest.tgbi5X/artifacts-experiment-1/source-root" ./../*.deb
" failed with status 2

(-> libmime-tools-perl_5.509-1_sourceonly_reprotest_0.7.3_fail_no-clean.log)


Looking into /tmp/autopkgtest.tgbi5X/ from outside
the chroot I have:

# find -name changelog | xargs ls -la
-rw-rw-r-- 1 gregoa gregoa 16422 Oct 20 15:33 ./build-control/debian/changelog
-rw-rw-r-- 1 gregoa gregoa 16422 Oct 20 15:33 ./const_build_path-before-disorderfs/debian/changelog
-rw-rw-r-- 1 gregoa gregoa 16422 Oct 20 15:33 ./const_build_path/debian/changelog


What I don't understand: The second build starts with:

INFO:root:copying /tmp/autopkgtest.tgbi5X/artifacts-control/ back from virtual server's /tmp/tmpsk8jqbbl/control
INFO:root:build "experiment-1": vary environment, FIX build_path, FIX user_group, vary fileordering, vary home, vary kernel, vary locales, vary exec_path, vary time, vary timezone, vary umask
INFO:root:copying . over to virtual server's /tmp/autopkgtest.tgbi5X/build-experiment-1/
INFO:root:starting build with source directory: /tmp/autopkgtest.tgbi5X/build-experiment-1/, artifact pattern: ./../*.deb
..
INFO:root:executing build in /tmp/autopkgtest.tgbi5X/const_build_path/
tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
dpkg-buildpackage: error: tail of debian/changelog subprocess returned exit status 1
INFO:root:build successful, copying artifacts
/bin/sh: 2: cd: can't cd to /tmp/autopkgtest.tgbi5X/build-experiment-1/

but there is no /tmp/autopkgtest.tgbi5X/build-experiment-1/ directory
anywhere:

# ls -la
total 77
drwxrwxrwt  7 root   root    4096 Oct 20 15:54 .
drwxrwxrwt  3 root   root   36864 Oct 20 15:54 ..
drwxrwxr-x  3 root   root    4096 Jan  1  1970 artifacts-control
drwxrwxr-x  3 root   root    4096 Oct 20 15:54 artifacts-experiment-1
drwxrwxr-x 12 gregoa gregoa  4096 Oct 20 15:54 build-control
drwxrwxr-x 10 gregoa gregoa  4096 Oct 20 15:25 const_build_path
drwxrwxr-x 10 gregoa gregoa  4096 Oct 20 15:25 const_build_path-before-disorderfs
-rw-r--r--  1 gregoa gregoa  4470 Oct 20 15:54 libmime-tools-perl_5.509-1_amd64.buildinfo
-rw-r--r--  1 gregoa gregoa  1189 Oct 20 15:54 libmime-tools-perl_5.509-1_amd64.changes
-rw-rw-r--  1 root   root    2795 Oct 20 15:53 testbed-packages


Maybe this gives you some clue what's going on here ...


Cheers,
gregor


-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Various Artists: From Clare to Here
[libmime-tools-perl_5.509-1_sourceonly_reprotest_0.7.1.log (text/plain, attachment)]
[libmime-tools-perl_5.509-1_sourceonly_reprotest_0.7.3_fail.log (text/plain, attachment)]
[libmime-tools-perl_5.509-1_sourceonly_reprotest_0.7.3_fail_no-clean.log (text/plain, attachment)]
[libmime-tools-perl_5.509-1_sourceonly_reprotest_0.7.3_no-fakeroot.log (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Thu, 26 Oct 2017 22:45:03 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 26 Oct 2017 22:45:03 GMT) (full text, mbox, link).


Message #45 received at 877813@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: gregor herrmann <gregoa@debian.org>, 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Thu, 26 Oct 2017 22:40:00 +0000
gregor herrmann:
> [..]
> 
> So currently I have:
> 
> - reprotest called as 
>   env -u TMPDIR -- reprotest --variations=+all,-build_path,-user_group --verbosity 1 . -- schroot default 2>&1 | [..]
> 

Thanks, this helped me reproduce the bug locally. I was having trouble before, because the bug only occurs when fileordering is switched on but user_group is not switched on.

The bug is because disorderfs was being run as root inside the schroot, but the build was being run as the normal unprivileged user. This was because I was dropping privs in the wrong place, I've fixed in commit e367967, see if it works for you:

https://anonscm.debian.org/git/reproducible/reprotest.git/commit/?id=e367967

(The bug didn't show up because the user_group variation has some hacks in it, to force the fileordering variation to run as the target user.)

> [..]
> 
> What I don't understand: The second build starts with:
> 
> [..]
> INFO:root:starting build with source directory: /tmp/autopkgtest.tgbi5X/build-experiment-1/, artifact pattern: ./../*.deb
> ..
> INFO:root:executing build in /tmp/autopkgtest.tgbi5X/const_build_path/
> tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
> dpkg-buildpackage: error: tail of debian/changelog subprocess returned exit status 1
> INFO:root:build successful, copying artifacts
> /bin/sh: 2: cd: can't cd to /tmp/autopkgtest.tgbi5X/build-experiment-1/
> 
> but there is no /tmp/autopkgtest.tgbi5X/build-experiment-1/ directory
> anywhere:
> 
> [..]

This is explained by the fact that reprotest moves stuff from build-experiment-1 to const_build_path, in order to run both builds in the same build path. The build failed, so reprotest didn't run the cleanup to move the directory back. Then, reprotest thought the build was successful (it says "INFO:root:build successful" in your log) so it tried to do more stuff with /tmp/autopkgtest.tgbi5X/build-experiment-1/, but it's not there because the build actually failed.

The fact that reprotest thought the build was successful, was a bug in 0.7.3 with --no-clean-on-error that I just noticed, which I accidentally fixed in a refactoring just before I fixed this bug. The previous code was doing

if ( run_build ); then ( cleanup ); fi

but of course this doesn't preserve the non-zero exit code from run_build, duh. The fix for this is in git / will be in 0.7.4 as well.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Thu, 26 Oct 2017 23:15:03 GMT) (full text, mbox, link).


Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 26 Oct 2017 23:15:03 GMT) (full text, mbox, link).


Message #50 received at 877813@bugs.debian.org (full text, mbox, reply):

From: gregor herrmann <gregoa@debian.org>
To: Ximin Luo <infinity0@debian.org>
Cc: 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Fri, 27 Oct 2017 01:13:35 +0200
[Message part 1 (text/plain, inline)]
On Thu, 26 Oct 2017 22:40:00 +0000, Ximin Luo wrote:

> gregor herrmann:
> > - reprotest called as 
> >   env -u TMPDIR -- reprotest --variations=+all,-build_path,-user_group --verbosity 1 . -- schroot default 2>&1 | [..]
> Thanks, this helped me reproduce the bug locally. I was having
> trouble before, because the bug only occurs when fileordering is
> switched on but user_group is not switched on.

Thanks, that's excellent news.
And sorry for not providing the command I used earlier.
 
> The bug is because disorderfs was being run as root inside the
> schroot, but the build was being run as the normal unprivileged
> user. This was because I was dropping privs in the wrong place,
> I've fixed in commit e367967, see if it works for you:
> https://anonscm.debian.org/git/reproducible/reprotest.git/commit/?id=e367967

I've now built a package from git HEAD (3efb86f), and .. hm .. I guess
this bug is fixed, it's just that I'm running into another issue
which seems related to another recent commit (the domain_host
feature):

#v+
INFO:root:build successful, copying artifacts
INFO:root:copying /tmp/reprotest.5Ab5ie/artifacts-control/ back from virtual server's /tmp/tmpo1_ukgqc/control
INFO:root:build "experiment-1": vary environment, FIX build_path, FIX user_group, vary fileordering, vary domain_host, vary home, vary kernel, vary locales, vary exec_path, vary time, vary timezone, vary umask
WARNING:root:Not using sudo for domain_host; it is recommended. Your build may fail.
WARNING:root:Be sure to `echo 1 > /proc/sys/kernel/unprivileged_userns_clone` if on a Debian system.
INFO:root:copying . over to virtual server's /tmp/reprotest.5Ab5ie/build-experiment-1/
INFO:root:starting build with source directory: /tmp/reprotest.5Ab5ie/build-experiment-1/, artifact pattern: ./../*.deb
Note, using directory './.' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
INFO:root:executing build in /tmp/reprotest.5Ab5ie/const_build_path/
unshare: unshare failed: ²»ÔÊÐíµIJÙ×÷
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 802, in run
    return 0 if check_func(*check_args) else 1
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 351, in check
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 351, in <listcomp>
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 317, in corun_builds
    bctx.run_build(testbed, build, os.environ, artifact_pattern, testbed_build_pre, no_clean_on_error)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 211, in run_build
    kind='build')
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 63, in check_exec2
    adtlog.AutopkgtestError)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 69, in bomb
    raise _type(m)
reprotest.lib.adtlog.AutopkgtestError: "su -s /bin/sh gregoa -c set -e; run_build() {
    mkdir -p /tmp/reprotest.5Ab5ie/build-experiment-1-aux && \
    mv /tmp/reprotest.5Ab5ie/build-experiment-1/ /tmp/reprotest.5Ab5ie/const_build_path && \
    mv /tmp/reprotest.5Ab5ie/const_build_path/ /tmp/reprotest.5Ab5ie/const_build_path-before-disorderfs/ && \
    mkdir -p /tmp/reprotest.5Ab5ie/const_build_path/ && \
    disorderfs -q --shuffle-dirents=yes /tmp/reprotest.5Ab5ie/const_build_path-before-disorderfs/ /tmp/reprotest.5Ab5ie/const_build_path/ && \
    umask 0002 && \
    export REPROTEST_BUILD_PATH=/tmp/reprotest.5Ab5ie/const_build_path/ && \
    export REPROTEST_UMASK=$(umask) && \
    faketime +373days+7hours+13minutes \
    linux32 \
    unshare -r --uts sh -ec '
            hostname reprotest-capture-hostname
            domainname "reprotest-capture-domainname"
            "$@"' - \
    sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; dpkg-buildpackage --no-sign -b'
}

cleanup() {
    __c=0; \
    export PATH="/tmp/reprotest.5Ab5ie/bin:$PATH" || __c=$?; \
    fusermount -u /tmp/reprotest.5Ab5ie/const_build_path/ || __c=$?; \
    rmdir /tmp/reprotest.5Ab5ie/const_build_path/ || __c=$?; \
    mv /tmp/reprotest.5Ab5ie/const_build_path-before-disorderfs/ /tmp/reprotest.5Ab5ie/const_build_path/ || __c=$?; \
    mv /tmp/reprotest.5Ab5ie/const_build_path /tmp/reprotest.5Ab5ie/build-experiment-1/ || __c=$?; \
    rm -rf /tmp/reprotest.5Ab5ie/build-experiment-1-aux || __c=$?; \
    exit $__c
}

trap '( cleanup )' HUP INT QUIT ABRT TERM PIPE # FIXME doesn't quite work reliably yet

if ( run_build ); then ( cleanup ); else
    __x=$?; # save the exit code of run_build
    if ( ! false ); then
        if ( cleanup ); then :; else echo >&2 "cleanup failed with exit code $?"; fi;
    fi
    exit $__x
fi" failed with status 1
#v-

The recommended `echo 1 > /proc/sys/kernel/unprivileged_userns_clone'
(as root on the host) doesn't help.

Adding -domain_host to --variations worksaround the issue as
expected, and confirms that the original issue is indeed fixed.

Yay! Thanks again.


> > What I don't understand: The second build starts with:
> > 
> > [..]
> > INFO:root:starting build with source directory: /tmp/autopkgtest.tgbi5X/build-experiment-1/, artifact pattern: ./../*.deb
> > ..
> > INFO:root:executing build in /tmp/autopkgtest.tgbi5X/const_build_path/
> > tail: Î޷¨´ò¿ª'debian/changelog' ¶ÁȡÊý¾: ȨÏ޲»¹»
> > dpkg-buildpackage: error: tail of debian/changelog subprocess returned exit status 1
> > INFO:root:build successful, copying artifacts
> > /bin/sh: 2: cd: can't cd to /tmp/autopkgtest.tgbi5X/build-experiment-1/
> > 
> > but there is no /tmp/autopkgtest.tgbi5X/build-experiment-1/ directory
> > anywhere:
> > 
> > [..]
> 
> This is explained by the fact that reprotest moves stuff from
> build-experiment-1 to const_build_path, in order to run both builds
> in the same build path. The build failed, so reprotest didn't run
> the cleanup to move the directory back. Then, reprotest thought the
> build was successful (it says "INFO:root:build successful" in your
> log) so it tried to do more stuff with
> /tmp/autopkgtest.tgbi5X/build-experiment-1/, but it's not there
> because the build actually failed.
> 
> The fact that reprotest thought the build was successful, was a bug
> in 0.7.3 with --no-clean-on-error that I just noticed, which I
> accidentally fixed in a refactoring just before I fixed this bug.

Oh, I see.
Glad you found & fixed this bug as well.


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Dire Straits: Tunnel Of Love
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Fri, 27 Oct 2017 12:09:02 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Fri, 27 Oct 2017 12:09:03 GMT) (full text, mbox, link).


Message #55 received at 877813@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: gregor herrmann <gregoa@debian.org>
Cc: 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Fri, 27 Oct 2017 12:06:00 +0000
gregor herrmann:
> [..]
> 
> I've now built a package from git HEAD (3efb86f), and .. hm .. I guess
> this bug is fixed, it's just that I'm running into another issue
> which seems related to another recent commit (the domain_host
> feature):
> 
> [..]
> 
> The recommended `echo 1 > /proc/sys/kernel/unprivileged_userns_clone'
> (as root on the host) doesn't help.
> 

I understand it's not nice to keep having to add -disable flags on every new reprotest release, sorry about that.

Does it work if you give --vary=domain_host.use_sudo=1? (I think it should, if you have root inside the chroot.)

Are you running reprotest on a developer machine or a CI platform or something? If I understood more about how people expect to use reprotest, maybe I could make these newer features smoother to use. My motivation for defaulting use_sudo to 0, was to allow non-root users to "try it out". But perhaps I should just default it to 1, if it causes problems for most people.

> Adding -domain_host to --variations worksaround the issue as
> expected, and confirms that the original issue is indeed fixed.
> 
> Yay! Thanks again.
> 

Welcome!

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Fri, 27 Oct 2017 12:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Fri, 27 Oct 2017 12:36:03 GMT) (full text, mbox, link).


Message #60 received at 877813@bugs.debian.org (full text, mbox, reply):

From: gregor herrmann <gregoa@debian.org>
To: Ximin Luo <infinity0@debian.org>
Cc: 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Fri, 27 Oct 2017 14:32:52 +0200
[Message part 1 (text/plain, inline)]
On Fri, 27 Oct 2017 12:06:00 +0000, Ximin Luo wrote:

> > I've now built a package from git HEAD (3efb86f), and .. hm .. I guess
> > this bug is fixed, it's just that I'm running into another issue
> > which seems related to another recent commit (the domain_host
> > feature):
> I understand it's not nice to keep having to add -disable flags on
> every new reprotest release, sorry about that.

:)
 
> Does it work if you give --vary=domain_host.use_sudo=1? (I think it
> should, if you have root inside the chroot.)

Doesn't work out of the box, I guess this needs some sudo setup
within the chroot:

#v+
INFO:root:build successful, copying artifacts
INFO:root:copying /tmp/reprotest.RUYyhx/artifacts-control/ back from virtual server's /tmp/tmphv2wjego/control
INFO:root:build "experiment-1": vary environment, FIX build_path, FIX user_group, vary fileordering, vary domain_host, vary home, vary kernel, vary locales, vary exec_path, vary time, vary timezone, vary umask
INFO:root:copying . over to virtual server's /tmp/reprotest.RUYyhx/build-experiment-1/
INFO:root:starting build with source directory: /tmp/reprotest.RUYyhx/build-experiment-1/, artifact pattern: ./../*.deb
Note, using directory './.' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
INFO:root:executing build in /tmp/reprotest.RUYyhx/const_build_path/

Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :

    #1) Respectez la vie privée des autres.
    #2) Réfléchissez avant d'utiliser le clavier.
    #3) De grands pouvoirs confèrent de grandes responsabilités.

sudo: pas de tty présent et pas de programme askpass spécifié

Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :

    #1) Respectez la vie privée des autres.
    #2) Réfléchissez avant d'utiliser le clavier.
    #3) De grands pouvoirs confèrent de grandes responsabilités.

sudo: pas de tty présent et pas de programme askpass spécifié

Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :

    #1) Respectez la vie privée des autres.
    #2) Réfléchissez avant d'utiliser le clavier.
    #3) De grands pouvoirs confèrent de grandes responsabilités.

sudo: pas de tty présent et pas de programme askpass spécifié

Nous espérons que vous avez reçu de votre administrateur système local les consignes traditionnelles. Généralement, elles se concentrent sur ces trois éléments :

    #1) Respectez la vie privée des autres.
    #2) Réfléchissez avant d'utiliser le clavier.
    #3) De grands pouvoirs confèrent de grandes responsabilités.

sudo: pas de tty présent et pas de programme askpass spécifié
cleanup failed with exit code 1
#v-

If I add the output of `reprotest --print-sudoers ...' to
/etc/sudoers.d/local-reprotest within the chroot, as recommended in
README.rst, and continue with --vary=domain_host.use_sudo=1, I get a
different error:

#v+
INFO:root:build successful, copying artifacts
INFO:root:copying /tmp/reprotest.dHanan/artifacts-control/ back from virtual server's /tmp/tmp_9z3obv4/control
INFO:root:build "experiment-1": vary environment, FIX build_path, FIX user_group, vary fileordering, vary domain_host, vary home, vary kernel, vary locales, vary exec_path, vary time, vary timezone, vary umask
INFO:root:copying . over to virtual server's /tmp/reprotest.dHanan/build-experiment-1/
INFO:root:starting build with source directory: /tmp/reprotest.dHanan/build-experiment-1/, artifact pattern: ./../*.deb
Note, using directory './.' to get the build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
INFO:root:executing build in /tmp/reprotest.dHanan/const_build_path/
unshare: cannot change root filesystem propagation: Argumento inválido
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 802, in run
    return 0 if check_func(*check_args) else 1
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 351, in check
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 351, in <listcomp>
    local_dists = [proc.send(nv) for nv in zip(bnames, build_variations)]
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 317, in corun_builds
    bctx.run_build(testbed, build, os.environ, artifact_pattern, testbed_build_pre, no_clean_on_error)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 211, in run_build
    kind='build')
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 63, in check_exec2
    adtlog.AutopkgtestError)
  File "/usr/lib/python3/dist-packages/reprotest/__init__.py", line 69, in bomb
    raise _type(m)
reprotest.lib.adtlog.AutopkgtestError: "su -s /bin/sh gregoa -c set -e; run_build() {
    mkdir -p /tmp/reprotest.dHanan/build-experiment-1-aux && \
    mv /tmp/reprotest.dHanan/build-experiment-1/ /tmp/reprotest.dHanan/const_build_path && \
    mv /tmp/reprotest.dHanan/const_build_path/ /tmp/reprotest.dHanan/const_build_path-before-disorderfs/ && \
    mkdir -p /tmp/reprotest.dHanan/const_build_path/ && \
    disorderfs -q --shuffle-dirents=yes /tmp/reprotest.dHanan/const_build_path-before-disorderfs/ /tmp/reprotest.dHanan/const_build_path/ && \
    touch /tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt /tmp/reprotest.dHanan/build-experiment-1-aux/ns-uts && \
    sudo mount -B /tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt /tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt && \
    sudo mount --make-private /tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt && \
    sudo unshare --mount=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt --uts=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-uts true && \
    sudo nsenter --mount=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt --uts=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-uts hostname reprotest-capture-hostname && \
    sudo nsenter --mount=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt --uts=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-uts domainname reprotest-capture-domainname && \
    sh -ec 'echo "127.0.0.1 reprotest-capture-hostname" > /tmp/reprotest.dHanan/build-experiment-1-aux/hosts && cat /etc/hosts >> /tmp/reprotest.dHanan/build-experiment-1-aux/hosts' && \
    sudo nsenter --mount=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt --uts=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-uts mount -B /tmp/reprotest.dHanan/build-experiment-1-aux/hosts /etc/hosts && \
    umask 0002 && \
    export REPROTEST_BUILD_PATH=/tmp/reprotest.dHanan/const_build_path/ && \
    export REPROTEST_UMASK=$(umask) && \
    faketime +373days+7hours+13minutes \
    linux32 \
    sudo -E nsenter --mount=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-mnt --uts=/tmp/reprotest.dHanan/build-experiment-1-aux/ns-uts sudo -E -u gregoa -g gregoa env -u SUDO_COMMAND -u SUDO_GID -u SUDO_UID -u SUDO_USER \
    sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; dpkg-buildpackage --no-sign -b'
}
#v-

So I guess I'll stay with excluding domain_host for now.

> Are you running reprotest on a developer machine or a CI platform
> or something? If I understood more about how people expect to use
> reprotest, maybe I could make these newer features smoother to use.

I'm running it on my laptop, (optionally) from a script after
building a package.

> My motivation for defaulting use_sudo to 0, was to allow non-root
> users to "try it out". But perhaps I should just default it to 1,
> if it causes problems for most people.

It looks like currently both 0 and 1 cause problems :)
 

Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Dido: My Life
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Fri, 27 Oct 2017 17:30:03 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Fri, 27 Oct 2017 17:30:03 GMT) (full text, mbox, link).


Message #65 received at 877813@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: gregor herrmann <gregoa@debian.org>, 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Fri, 27 Oct 2017 17:26:00 +0000
gregor herrmann:
> [..]
> 
> So I guess I'll stay with excluding domain_host for now.
> 
> [..]
> 
> It looks like currently both 0 and 1 cause problems :)
>  
Yes, I've experienced this too. :( I'm hitting what I think might be a bug with nsenter(1), but I have a potential workaround. It'll take a while to code up though.

Unfortunately the code from current git, causes some leftover bits on your system. You probably want to, in this order:

1. check no reprotest processes are running, exit / ctrl-c them if so
2. check the output of `ps -elf | grep autopkgtest-virt` to make sure no autopkgtest-virt-* processes are running. this is a side-effect of --no-clean-on-error I didn't spot. if there are, just `kill -INT` them etc until they go away.
3. check the output of `schroot -la` to make sure there's no extra chroot sessions, if there are you can delete them after performing the previous step
4. check the output of `findmnt` to make sure you don't have extraneous bind mounts on /etc/host, if there are you can just `sudo umount` them.
5. then you can delete any /tmp/autopkgtest.** and /tmp/reprotest.** left over

Sorry about the bother. I'll do some more testing before releasing this, of course.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#877813; Package reprotest. (Fri, 27 Oct 2017 18:09:03 GMT) (full text, mbox, link).


Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Fri, 27 Oct 2017 18:09:03 GMT) (full text, mbox, link).


Message #70 received at 877813@bugs.debian.org (full text, mbox, reply):

From: gregor herrmann <gregoa@debian.org>
To: Ximin Luo <infinity0@debian.org>
Cc: 877813@bugs.debian.org
Subject: Re: Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Date: Fri, 27 Oct 2017 20:06:16 +0200
[Message part 1 (text/plain, inline)]
On Fri, 27 Oct 2017 17:26:00 +0000, Ximin Luo wrote:

> > So I guess I'll stay with excluding domain_host for now.
> > [..]
> > It looks like currently both 0 and 1 cause problems :)
> Yes, I've experienced this too. :( I'm hitting what I think might
> be a bug with nsenter(1), but I have a potential workaround. It'll
> take a while to code up though.

Ok, thanks.
 
> Unfortunately the code from current git, causes some leftover bits
> on your system. You probably want to, in this order:

Thanks for the heads-up.
(I checked everything and found no leftovers luckily.)
 

Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Dido: My Life
[signature.asc (application/pgp-signature, inline)]

Reply sent to Ximin Luo <infinity0@debian.org>:
You have taken responsibility. (Mon, 27 Nov 2017 13:54:03 GMT) (full text, mbox, link).


Notification sent to gregor herrmann <gregoa@debian.org>:
Bug acknowledged by developer. (Mon, 27 Nov 2017 13:54:04 GMT) (full text, mbox, link).


Message #75 received at 877813-close@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: 877813-close@bugs.debian.org
Subject: Bug#877813: fixed in reprotest 0.7.4
Date: Mon, 27 Nov 2017 13:50:50 +0000
Source: reprotest
Source-Version: 0.7.4

We believe that the bug you reported is fixed in the latest version of
reprotest, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 877813@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ximin Luo <infinity0@debian.org> (supplier of updated reprotest package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 27 Nov 2017 14:19:11 +0100
Source: reprotest
Binary: reprotest
Architecture: source
Version: 0.7.4
Distribution: unstable
Urgency: medium
Maintainer: Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>
Changed-By: Ximin Luo <infinity0@debian.org>
Description:
 reprotest  - Build software and check it for reproducibility.
Closes: 877813
Changes:
 reprotest (0.7.4) unstable; urgency=medium
 .
   * Hopefully fix the autopkgtest tests.
   * Add aslr, domain_host, and num_cpu variations.
   * Add a --print-sudoers feature.
   * Properly drop privs when running the build. (Closes: #877813)
   * Fix the time variation to actually make the time constant. This drops the
     time.auto_faketimes variation-spec option.
   * Make --no-clean-on-error a bit more reliable.
Checksums-Sha1:
 797c4859ad808876fab30fedb17d07c55fc04b7f 2119 reprotest_0.7.4.dsc
 8270fc5cf22b9ad8f23f9483013c5e0fe4a94ec6 85448 reprotest_0.7.4.tar.xz
 c06a86529f11a4ddedb520d92884de5c45f3833e 8785 reprotest_0.7.4_source.buildinfo
Checksums-Sha256:
 fa13bd6015c03ada154d5fe1fe50281650307d1ebddb2ee3efbdd462b407b701 2119 reprotest_0.7.4.dsc
 bd701465bcb8573887c08e66b8509a964e4bb359b8d2fc04c72fe7bd7a2aa4fe 85448 reprotest_0.7.4.tar.xz
 3ba6a2aa5c0a25c8dca5665a1498717bcbe06d568ab0fab177299b9758f610cb 8785 reprotest_0.7.4_source.buildinfo
Files:
 529dfb5fa5000a7548dc84cbfc7babed 2119 devel optional reprotest_0.7.4.dsc
 0888f09586c6f243dc0f0ccd8bee2551 85448 devel optional reprotest_0.7.4.tar.xz
 38fda903e45a312cf162ad7a30e92beb 8785 devel optional reprotest_0.7.4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCgAzFiEENmdIajJtsnZtJVVGhg3vO49lC3kFAlocEOQVHGluZmluaXR5
MEBkZWJpYW4ub3JnAAoJEIYN7zuPZQt5BlsP/09eyUKW9KtFhItPXYEic/ABN4Yb
277lS+kpylZa0FJJk+7+KeCJWL0uORziIZNAODEyUboOLZeXD1MHQDpnReOOf2HM
F4XrnJhrUxzT0y05jc3ktSfLXcj9f0Z5zh/3KT1vyH7B/QmsGsjb94Su0pqwpGDX
fF2qUdiyeXzCQECYI6pufL6MpLW1V48nEGACLa9QFlHwe3iiP0ISoGC5QJM4+RQX
k6JrJfgv89RGf0agYaTxU3+FhugwU7LFUnT2Z8rUUoqm7lcKVvca4wcIoJ7aL972
HPEY36etHuOpiqH6sZH8gdF8u3krUojF2kpnO/mVBBFkkgX4PcnJ2etBB+6nTtc4
G98oQEUyMKFXqEaU+cgDuT/zyji9+LkErFD1DllJvod0YuC40jreYpViTnNXPS9n
uuN9Iu9Rgysiac2DqVo7PIQjSzzOR5+VkKmfM4kNO44MSB/A4uT4Vd8yUt5AWsN0
ufwcAtwdZZk9IIl3gWFsKGBWZJhu1LmVe4PInJvyeZql9VV1ck3+BRDjanSXeEC7
sASZ9fpYNKtSfm1YOX6jRVnrf9l7AcJHdh3XbCc5VqlpE950/DoC/IPqhjeHpakl
ZXdi2+sCFbr5ZjWSKAqn8VIaE9xMpfBIQPjb9YsoNd7R9cIzGY2QVJ1emv5wxlaS
0h/Ga/of+nDTj7lN
=7DNv
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 31 Dec 2017 07:26:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 13:53:32 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.