Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
On Fri, 27 Oct 2017 17:26:00 +, 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 Description: Digital Signature
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
On Fri, 27 Oct 2017 12:06:00 +, 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 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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
On Thu, 26 Oct 2017 22:40:00 +, 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 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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
Ximin Luo: > gregor herrmann: >> On Thu, 05 Oct 2017 22:59:00 +, 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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
gregor herrmann: > On Thu, 05 Oct 2017 22:59:00 +, 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 ". 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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
On Thu, 05 Oct 2017 22:59:00 +, 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 ". 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='\nif [ "$(id -u)" = 0 ]; then\nsudo -E -u "$LOGNAME" sh -ec \'dpkg-buildpackage --no-sign -b\';\nelse\nsh -ec \'dpkg-buildpackage --no-sign -b\';\nfi\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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
On Thu, 05 Oct 2017 22:16:00 +, 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 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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
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
Bug#877813: reprotest: regression between 0.7.1 and 0.7.2
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='\nif [ "$(id -u)" = 0 ]; then\nsudo -E -u "$LOGNAME" sh -ec \'dpkg-buildpackage --no-sign -b\';\nelse\nsh -ec \'dpkg-buildpackage --no-sign -b\';\nfi\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 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,