LBRY-Vault/contrib/build-linux/sdist
SomberNight 24a007840f
sdist build: use modern pip
the one in apt refused to install certain package versions (that were pinned by hash!!)
and installed different versions instead... e.g.:

Collecting wheel==0.34.2 (from -r /opt/electrum/contrib/build-linux/sdist/../../../contrib/deterministic-build/requirements.txt (line 112))
  Downloading 521c6dc7fe/wheel-0.34.2.tar.gz (58kB)
    100% |████████████████████████████████| 61kB 3.8MB/s
  Requested wheel==0.34.2 from 521c6dc7fe/wheel-0.34.2.tar.gz (sha256)=8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96 (from -r /opt/electrum/contrib/build-linux/sdist/../../../contrib/deterministic-build/requirements.txt (line 112)), but installing version 0.30.0
2020-06-12 19:48:19 +02:00
..
build.sh sdist build: use modern pip 2020-06-12 19:48:19 +02:00
Dockerfile attempt at reproducible tarballs (sdist) 2020-06-12 19:48:15 +02:00
make_tgz attempt at reproducible tarballs (sdist) 2020-06-12 19:48:15 +02:00
README.md attempt at reproducible tarballs (sdist) 2020-06-12 19:48:15 +02:00

Source tarballs

This script does not produce reproducible output (yet!).

This assumes an Ubuntu (x86_64) host, but it should not be too hard to adapt to another similar system. The docker commands should be executed in the project's root folder.

  1. Install Docker

    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    $ sudo apt-get update
    $ sudo apt-get install -y docker-ce
    
  2. Build image

    $ sudo docker build -t electrum-sdist-builder-img contrib/build-linux/sdist
    
  3. Build source tarballs

    It's recommended to build from a fresh clone (but you can skip this if reproducibility is not necessary).

    $ FRESH_CLONE=contrib/build-linux/sdist/fresh_clone && \
        sudo rm -rf $FRESH_CLONE && \
        mkdir -p $FRESH_CLONE && \
        cd $FRESH_CLONE  && \
        git clone https://github.com/spesmilo/electrum.git && \
        cd electrum
    

    And then build from this directory:

    $ git checkout $REV
    $ sudo docker run -it \
        --name electrum-sdist-builder-cont \
        -v $PWD:/opt/electrum \
        --rm \
        --workdir /opt/electrum/contrib/build-linux/sdist \
        electrum-sdist-builder-img \
        ./build.sh
    
  4. The generated distributables are in ./dist.