Closed Bug 1073424 Opened 10 years ago Closed 10 years ago

One-Line Bootstrapping raise CalledProcessError on Ubuntu 14.04.1 LTS

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: yahoocbien-dev, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
Build ID: 20140924083558

Steps to reproduce:

Run the following command line to install Firefox build prerequisites:
wget -q -O - https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py | python


Actual results:

Executing as root: sudo apt-get install autoconf2.13 build-essential ccache libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev libgconf2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgtk2.0-dev libiw-dev libnotify-dev libpulse-dev libxt-dev mercurial mesa-common-dev python-dbus python-dev python-setuptools unzip uuid yasm xvfb zip software-properties-common
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
build-essential est déjà la plus récente version disponible.
libxt-dev est déjà la plus récente version disponible.
libxt-dev passé en « installé manuellement ».
python-dbus est déjà la plus récente version disponible.
python-setuptools est déjà la plus récente version disponible.
python-setuptools passé en « installé manuellement ».
unzip est déjà la plus récente version disponible.
zip est déjà la plus récente version disponible.
software-properties-common est déjà la plus récente version disponible.
Les paquets supplémentaires suivants seront installés : 
  autoconf automake automake1.4 autotools-dev debhelper dh-apparmor
  gir1.2-gconf-2.0 gir1.2-gst-plugins-base-0.10 gir1.2-gstreamer-0.10
  gir1.2-gtk-2.0 libatk1.0-dev libavahi-client-dev libavahi-common-dev
  libcairo-script-interpreter2 libcairo2-dev libdrm-dev libfontconfig1-dev
  libfreetype6-dev libgconf2-doc libgcrypt11-dev libgdk-pixbuf2.0-dev
  libglib2.0-dev libgnutls-dev libgnutlsxx27 libgpg-error-dev libharfbuzz-dev
  libharfbuzz-gobject0 libidn11-dev libkrb5-dev libldap2-dev
  libmail-sendmail-perl libossp-uuid16 libp11-kit-dev libpango1.0-dev
  libpcre3-dev libpcrecpp0 libpixman-1-dev libpng12-dev libpython-dev
  libpython2.7-dev librtmp-dev libsys-hostname-long-perl libtasn1-6-dev
  libxcb-render0-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev
  libxdamage-dev libxext-dev libxfixes-dev libxft-dev libxi-dev
  libxinerama-dev libxml2-dev libxml2-utils libxrandr-dev libxrender-dev
  mercurial-common po-debconf python2.7-dev x11proto-composite-dev
  x11proto-damage-dev x11proto-fixes-dev x11proto-randr-dev
  x11proto-render-dev x11proto-xext-dev x11proto-xinerama-dev
Paquets suggérés :
  autoconf-archive gnu-standards autoconf-doc libtool distcc dh-make
  apparmor-easyprof libasound2-doc libcairo2-doc libcurl4-doc libcurl3-dbg
  libgcrypt11-doc libglib2.0-doc gnutls26-doc gnutls-bin gstreamer0.10-doc
  libgtk2.0-doc krb5-doc libpango1.0-doc imagemagick libxext-doc qct kdiff3
  kdiff3-qt kompare meld tkcvs mgdiff python-mysqldb python-pygments
  libmail-box-perl
Les NOUVEAUX paquets suivants seront installés :
  autoconf autoconf2.13 automake automake1.4 autotools-dev ccache debhelper
  dh-apparmor gir1.2-gconf-2.0 gir1.2-gst-plugins-base-0.10
  gir1.2-gstreamer-0.10 gir1.2-gtk-2.0 libasound2-dev libatk1.0-dev
  libavahi-client-dev libavahi-common-dev libcairo-script-interpreter2
  libcairo2-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev
  libdrm-dev libfontconfig1-dev libfreetype6-dev libgconf2-dev libgconf2-doc
  libgcrypt11-dev libgdk-pixbuf2.0-dev libglib2.0-dev libgnutls-dev
  libgnutlsxx27 libgpg-error-dev libgstreamer-plugins-base0.10-dev
  libgstreamer0.10-dev libgtk2.0-dev libharfbuzz-dev libharfbuzz-gobject0
  libidn11-dev libiw-dev libkrb5-dev libldap2-dev libmail-sendmail-perl
  libnotify-dev libossp-uuid16 libp11-kit-dev libpango1.0-dev libpcre3-dev
  libpcrecpp0 libpixman-1-dev libpng12-dev libpulse-dev libpython-dev
  libpython2.7-dev librtmp-dev libsys-hostname-long-perl libtasn1-6-dev
  libxcb-render0-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev
  libxdamage-dev libxext-dev libxfixes-dev libxft-dev libxi-dev
  libxinerama-dev libxml2-dev libxml2-utils libxrandr-dev libxrender-dev
  mercurial mercurial-common mesa-common-dev po-debconf python-dev
  python2.7-dev uuid x11proto-composite-dev x11proto-damage-dev
  x11proto-fixes-dev x11proto-randr-dev x11proto-render-dev x11proto-xext-dev
  x11proto-xinerama-dev xvfb yasm
0 mis à jour, 86 nouvellement installés, 0 à enlever et 7 non mis à jour.
Il est nécessaire de prendre 40,8 Mo dans les archives.
Après cette opération, 135 Mo d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] Annulation.
Traceback (most recent call last):
  File "<stdin>", line 152, in <module>
  File "<stdin>", line 143, in main
  File "/tmp/tmp5yf3h7k7/mozboot/bootstrap.py", line 96, in bootstrap
  File "/tmp/tmp5yf3h7k7/mozboot/debian.py", line 50, in install_system_packages
  File "/tmp/tmp5yf3h7k7/mozboot/base.py", line 137, in apt_install
  File "/tmp/tmp5yf3h7k7/mozboot/base.py", line 113, in run_as_root
  File "/usr/lib/python3.4/subprocess.py", line 557, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', 'apt-get', 'install', 'autoconf2.13', 'build-essential', 'ccache', 'libasound2-dev', 'libcurl4-openssl-dev', 'libdbus-1-dev', 'libdbus-glib-1-dev', 'libgconf2-dev', 'libgstreamer0.10-dev', 'libgstreamer-plugins-base0.10-dev', 'libgtk2.0-dev', 'libiw-dev', 'libnotify-dev', 'libpulse-dev', 'libxt-dev', 'mercurial', 'mesa-common-dev', 'python-dbus', 'python-dev', 'python-setuptools', 'unzip', 'uuid', 'yasm', 'xvfb', 'zip', 'software-properties-common']' returned non-zero exit status 1


Expected results:

I expect that the scripts run apt and force the install of all dependencies but for some reason the python script cancels the installation and the scripts exits because of a non-zero exit status (status 1).

Please note that I'm using french settings and that apt-get expects "O" for "Oui" instead of "Y" for "Yes" in english. If that's the cause of the error, it may be better to use the apt-get -y option.
I'm pretty sure piping wget into python is the bug here. That means stdin is the pipe and not the terminal. bootstrap.py reads from stdin when invoking things like apt. Having stdin be at EOF will cause apt to assume "no" for the prompt and return 1.

Did some docs instruct you to use the pipe? If so, they need updated so stdin is preserved.
Flags: needinfo?(yahoocbien-dev)
(In reply to Gregory Szorc [:gps] from comment #1)
> Did some docs instruct you to use the pipe? If so, they need updated so
> stdin is preserved.

I followed the instructions at https://developer.mozilla.org/en-US/docs/Simple_Firefox_build/Linux_and_MacOS_build_preparation :

$ wget -q -O - https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py | python
Flags: needinfo?(yahoocbien-dev)
Someone recently changed the instructions to use the pipe. I reverted that change.

Please reopen if the new instructions don't work.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
The instructions work perfectly and the note is clear about the requirement to run Python against a local file. Thank you!
I'd argue we should use apt in a way that doesn't trigger the prompt.
(In reply to Mike Hommey [:glandium] from comment #5)
> I'd argue we should use apt in a way that doesn't trigger the prompt.

The reason the prompts are there is because we don't want to run commands that change the system without the user's permissions. Things are more complicated on OS X, where we present the choice of Homebrew or MacPorts.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.