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

Attachment: signature.asc
Description: Digital Signature

Reply via email to