scripts and tools: Upgrade gitian image before signing #15766

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20190407-gitian-upgrade-image changing 1 files +2 −2
  1. hebasto commented at 1:46 PM on April 7, 2019: member

    The package upgrade in the Ubuntu repositories in the period between the building and the signing causes (particularly, using LXC) an error:

    Creating package manifest
    Could not download some packages, please run gbuild --upgrade
    

    For example, the busybox-initramfs package was upgraded from 1:1.27.2-2ubuntu3.1 to 1:1.27.2-2ubuntu3.2 on 2019-03-06.

    This PR forces gitian image upgrade for the --sign command.

    Ref: devrandom/gitian-builder/target-bin/grab-packages.sh

    #!/bin/sh
    
    # Get an installed package manifest
    
    set -e
    
    cd /var/cache/apt/archives
    
    # make sure all packages with installed versions are downloaded
    # (except for held packages, which may not be available for download)
    dpkg-query -W -f '${Status}\t${Package}=${Version}\n' | grep -v ^hold | cut -f2- | xargs -n 50 apt-get install -q --reinstall -y -d > /tmp/download.log
    grep "cannot be downloaded" /tmp/download.log && { echo Could not download some packages, please run gbuild --upgrade 1>&2 ; exit 1 ; }
    sha256sum *.deb | sort --key 2
    
  2. Upgrade gitian image before signing beda0dae95
  3. fanquake added the label Scripts and tools on Apr 7, 2019
  4. laanwj commented at 8:56 AM on April 10, 2019: member

    It's unfortunate that this is needed, as the upgrade step makes VM setup much slower, but I think it is, I've seen similar issues outside this script utACK beda0dae953aa125e08302713d2c7b214eddbe5a

  5. hebasto commented at 5:00 AM on April 19, 2019: member

    @laanwj Thank you for your review.

    It's unfortunate that this is needed, as the upgrade step makes VM setup much slower, but I think it is, I've seen similar issues outside this script

    Since the current target image is reused (-i|--skip-image option), the upgrade step does not take much time (a dozen of seconds on my Core i3).

  6. hebasto commented at 5:41 AM on April 24, 2019: member

    @ken2812221 would you mind reviewing this PR?

  7. fanquake commented at 1:46 PM on May 8, 2019: member

    utACK beda0da

  8. laanwj merged this on May 9, 2019
  9. laanwj closed this on May 9, 2019

  10. laanwj referenced this in commit a65fd92f7b on May 9, 2019
  11. hebasto deleted the branch on May 9, 2019
  12. sidhujag referenced this in commit d27146429d on May 10, 2019
  13. UdjinM6 referenced this in commit 334d9f4cf6 on Sep 1, 2021
  14. UdjinM6 referenced this in commit f22c322712 on Sep 2, 2021
  15. UdjinM6 referenced this in commit fc3d07774b on Sep 2, 2021
  16. UdjinM6 referenced this in commit 01a6b2334e on Sep 2, 2021
  17. DrahtBot locked this on Dec 16, 2021

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: 2026-04-24 21:14 UTC

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