LXC gitian linux build fails due to wrong password #8212

issue laanwj openend this issue on June 17, 2016
  1. laanwj commented at 7:57 am on June 17, 2016: member

    I’m not sure whether this is LXC specific, or whether this is some specific VM setting I should have configured differently. From var/build.log:

    0[sudo] password for ubuntu: Sorry, try again.
    1[sudo] password for ubuntu: 
    2sudo: 1 incorrect password attempt
    

    This is due to the following, introduced in #8188

    0echo "ubuntu" | sudo -S true
    1sudo mkdir -p /usr/include/i386-linux-gnu/
    2sudo ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/i386-linux-gnu/asm
    

    I don’t think gitian base image setup ever gave me the chance to configure a password. Looking at /etc/shadow confirms this, there isn’t one:

    0ubuntu:x:1000:1000:ubuntu,,,:/home/ubuntu:/bin/bash
    

    I think we need to find an alternative solution to this.

    Possibly a change to gitian descriptors: a preparation script that is executed as root? This works fine:

    0LXC_ARCH=amd64 LXC_SUITE=trusty libexec/on-target -u root
    1root@gitian:~# 
    
  2. laanwj added the label Build system on Jun 17, 2016
  3. laanwj added this to the milestone 0.13.0 on Jun 17, 2016
  4. theuni commented at 8:54 am on June 17, 2016: member

    Dammit, sorry.

    I was afraid of some regression here. See my notes in https://github.com/bitcoin/bitcoin/commit/9d253620874087d96d64d0c4c771a582d9774657

    Bottom line is that we need some way to be root in gitian scripts. Whether that means launching as root, or fixing sudo to be passwordless, I don’t care either way.

  5. laanwj commented at 8:57 am on June 17, 2016: member

    Bottom line is that we need some way to be root in gitian scripts. Whether that means launching as root, or fixing sudo to be passwordless, I don’t care either way.

    What about my suggestion: have a section in the descriptor that is run as root, after installing the packages, but before running the rest?

  6. theuni commented at 9:16 am on June 17, 2016: member

    Ah sorry, I missed the “preparation script” keywords there. I thought you were simply suggesting to run as root.

    Yes, that makes perfect sense.

  7. laanwj commented at 9:55 am on June 17, 2016: member

    Hm yes. Running everything as root inside a container isn’t that crazy either, though I do prefer some separation of privileges there still.

    Yes, that makes perfect sense.

    I’ll give it a try (while wishing gitian was Python and not Ruby…)

  8. laanwj referenced this in commit 9bca29b013 on Jun 17, 2016
  9. laanwj commented at 1:25 pm on June 20, 2016: member
  10. laanwj closed this on Jul 8, 2016

  11. MarcoFalke locked this on Sep 8, 2021


laanwj theuni

Labels
Build system

Milestone
0.13.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-18 00:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me