[tor-commits] [tor-browser-build/master] Bug 23454: restore stderr in build logs

gk at torproject.org gk at torproject.org
Mon Sep 11 14:43:57 UTC 2017


commit 75af4379125bcf3979f54b5773f1ced1c37eb9c6
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Mon Sep 11 14:30:03 2017 +0200

    Bug 23454: restore stderr in build logs
    
    In #23425 we redirected the output from runc start to /dev/null to
    avoid annoying messages saying "stdin: is not a tty". However this also
    removes stderr from build logs.
    
    The command producing the `stdin: is not a tty` message is the `chown -R`
    command from runc/remote_put, so we now only hide stderr from that
    part while keeping it for the runc command running the build script.
---
 rbm.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/rbm.conf b/rbm.conf
index d574f7a..7bda275 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -329,7 +329,7 @@ runc:
     cat > '[% c("var/container/dir") %]'/config.json << EOF
     [% INCLUDE 'runc-config.json' %]
     EOF
-    sudo runc start -b '[% c("var/container/dir") %]' rbm-[% sha256(c("build_id", { error_if_undef => 1 })) %] [% IF ! c("interactive") %]2>/dev/null[% END %]
+    sudo runc start -b '[% c("var/container/dir") %]' rbm-[% sha256(c("build_id", { error_if_undef => 1 })) %] [% IF c("runc_hide_stderr") %]2>/dev/null[% END %]
 
   remote_put: |
     #!/bin/sh
@@ -340,7 +340,10 @@ runc:
     -%]
     sudo mkdir -p '[% c("var/container/dir") %]'/rootfs/[% dst %]
     sudo cp -aP [% src %] '[% c("var/container/dir") %]'/rootfs/[% dst %]
-    [% c("remote_exec", { exec_as_root => 1, exec_cmd => 'chown -R ' _ c("var/container/user") _ ' ' _ dst }) %]
+    # On Ubuntu, the /root/.profile file contains a `mesg n` line which is
+    # producing some `stdin: is not a tty` messages. To hide them, we hide
+    # stderr from this part by setting runc_hide_stderr.
+    [% c("remote_exec", { exec_as_root => 1, exec_cmd => 'chown -R ' _ c("var/container/user") _ ' ' _ dst, runc_hide_stderr => 1 }) %]
 
   remote_get: |
     #!/bin/sh



More information about the tor-commits mailing list