[misc] 01/01: Drop rebuild-twice-in-same-path in favour of reprotest.

Chris Lamb chris at chris-lamb.co.uk
Wed Nov 1 20:40:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository misc.

commit bb5f145868cc6fae60a37c277fa7f5d8a9001785
Author: Chris Lamb <lamby at debian.org>
Date:   Wed Nov 1 21:39:36 2017 +0100

    Drop rebuild-twice-in-same-path in favour of reprotest.
---
 rebuild-twice-in-same-path/Makefile.pbuilder |  3 -
 rebuild-twice-in-same-path/README            | 49 ---------------
 rebuild-twice-in-same-path/pbuilder-execute  | 93 ----------------------------
 rebuild-twice-in-same-path/run               | 26 --------
 4 files changed, 171 deletions(-)

diff --git a/rebuild-twice-in-same-path/Makefile.pbuilder b/rebuild-twice-in-same-path/Makefile.pbuilder
deleted file mode 100644
index 9b6c9f0..0000000
--- a/rebuild-twice-in-same-path/Makefile.pbuilder
+++ /dev/null
@@ -1,3 +0,0 @@
-# -*- makefile -*-
-%:
-	cowbuilder --execute --basepath $(BASEPATH) --bindmounts $(BUILD_RESULT) -- $(CURDIR)/pbuilder-execute $(BUILD_RESULT) $@
diff --git a/rebuild-twice-in-same-path/README b/rebuild-twice-in-same-path/README
deleted file mode 100644
index 922437e..0000000
--- a/rebuild-twice-in-same-path/README
+++ /dev/null
@@ -1,49 +0,0 @@
-This directory contains a set of scripts to rebuild packages twice at
-the same location using bind mounts. They are based on cowbuilder.
-
-Disclaimer: some commands are run as root. Depending on your trust
-model, you might want to first start with a fresh virtual
-environment. But you should really read and understand all the scripts
-in this directory first.
-
-A cowbuilder chroot can be created with:
-
-    sudo cowbuilder --create --distribution sid --mirror http://http.debian.net/debian --basepath /var/cache/pbuilder/reproducible.cow
-
-You can log into this chroot to make permanent changes with:
-
-    sudo cowbuilder --login --basepath /var/cache/pbuilder/reproducible.cow --save-after-login
-
-To play with a disposable chroot, just drop the --save-after-login option.
-
-We suppose you made the following permanent changes:
-
- - useradd pbuilder
- - apt-get install fakeroot time devscripts
- - enable deb-src in /etc/apt/sources.list
- - make sure you use the right mirror from inside the chroot
- - patched toolchain (e.g. as in https://wiki.debian.org/ReproducibleBuilds/Rebuild20140126)
-
-To force the use of the patched toolchain, we suggest the following
-/etc/apt/preferences:
-
-    Package: *
-    Pin: release o=Debian
-    Pin-Priority: 999
-
-    Package: *binutils* *dpkg*
-    Pin: origin "reproducible.alioth.debian.org"
-    Pin-Priority: 999
-
-The entry point of the system is the `run` script. Usage:
-
-    sudo ./run /var/cache/pbuilder/reproducible.cow <result-path> <make-arguments> <packages>
-
-It will run the `pbuilder-execute` script through pbuilder, which is
-itself run through make. With make, you can rebuild several packages
-in parallel using the -j option (beware, the interactive output might
-not make any sense then).
-
-The output will be in <result-path> and owned by pbuilder:pbuilder
-inside the chroot. Because of that, you might want it to have the same
-UID/GID as your regular user outside of the chroot.
diff --git a/rebuild-twice-in-same-path/pbuilder-execute b/rebuild-twice-in-same-path/pbuilder-execute
deleted file mode 100755
index fa2d977..0000000
--- a/rebuild-twice-in-same-path/pbuilder-execute
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/bash
-
-# Copyright © 2014 Stéphane Glondu <glondu at debian.org>
-# Licensed under GPL-3+ — https://www.gnu.org/licenses/gpl.txt
-
-# $UID is a bashism
-if [ "$0" != "/runscript" ] || [ "$UID" -ne 0 ]; then
-    echo "This script must be run by pbuilder or one of its variant"
-    exit 1
-fi
-
-result=$1
-pkg=$2
-arch=$(dpkg-architecture -qDEB_BUILD_ARCH)
-
-if [ -z "$result" ] || [ -z "$pkg" ]; then
-    echo "One argument is missing"
-    exit 1
-fi
-
-# The following must be clean, so fail if they already exist
-mkdir /tmp/src || exit 3
-chown pbuilder /tmp/src
-mkdir /usr/src/debian || exit 3
-mkdir $result/$pkg || exit 3
-
-echo "Installing build-dependencies of $pkg..."
-
-apt-get build-dep -y $pkg > $result/$pkg/build-dep 2>&1 || exit 5
-
-su -c "mkdir -p /tmp/src/a && cd /tmp/src/a && apt-get source $pkg | cat && cd .. && cp -a a b" pbuilder || exit 5
-
-version=$(echo /tmp/src/a/*.dsc)
-version=${version%.dsc}
-version=${version##*_}
-base=${pkg}_${version}_${arch}
-
-mv $result/$pkg/build-dep $result/$pkg/$base.deps
-aptitude search --disable-columns -F '%p %V' '~i' > $result/$pkg/$base.installed
-
-# Find the base name of build dir
-for u in /tmp/src/a/*; do
-    if [ -d "$u" ]; then build_dir="${u##*/}"; fi
-done
-if [ -z "$build_dir" ]; then
-    echo "Could not find find dir for package $pkg"
-    exit 2
-fi
-
-echo "First build of $pkg..."
-
-mkdir $result/$pkg/a
-mount --bind /tmp/src/a /usr/src/debian
-/usr/bin/time -o $result/$pkg/a/$base.stats su -c "cd /usr/src/debian/$build_dir && DEB_BUILD_OPTIONS=nocheck GZIP=-n dpkg-buildpackage -us -uc -b" pbuilder > $result/$pkg/a/$base.log 2>&1
-du -sh /usr/src/debian >> $result/$pkg/a/$base.stats
-umount /usr/src/debian
-
-changes=/tmp/src/a/$base.changes
-if [ ! -f $changes ]; then
-    echo "First build of $pkg failed"
-    chown -R pbuilder:pbuilder $result/$pkg
-    exit 4
-fi
-
-timestamp=$(date +%s -d "$(sed -n -e 's/^Date: //p' $changes)")
-dcmd cp $changes $result/$pkg/a
-rm -rf /tmp/src/a
-
-echo "Second build of $pkg..."
-
-mkdir $result/$pkg/b
-mount --bind /tmp/src/b /usr/src/debian
-/usr/bin/time -o $result/$pkg/b/$base.stats su -c "cd /usr/src/debian/$build_dir && DEB_BUILD_OPTIONS=nocheck GZIP=-n DEB_BUILD_TIMESTAMP=$timestamp dpkg-buildpackage -us -uc -b" pbuilder > $result/$pkg/b/$base.log 2>&1
-du -sh /usr/src/debian >> $result/$pkg/b/$base.stats
-umount /usr/src/debian
-
-changes=/tmp/src/b/$base.changes
-if [ ! -f $changes ]; then
-    echo "Second build of $pkg failed"
-    chown -R pbuilder:pbuilder $result/$pkg
-    exit 4
-fi
-
-if diff -u $result/$pkg/a/$base.changes $changes; then
-    touch $result/$pkg/b/reproducible
-else
-    dcmd cp $changes $result/$pkg/b
-fi
-rm -rf /tmp/src/b
-
-chown -R pbuilder:pbuilder $result/$pkg
-
-exit 0
diff --git a/rebuild-twice-in-same-path/run b/rebuild-twice-in-same-path/run
deleted file mode 100755
index 7884e95..0000000
--- a/rebuild-twice-in-same-path/run
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-# Copyright © 2014 Stéphane Glondu <glondu at debian.org>
-# Licensed under GPL-3+ — https://www.gnu.org/licenses/gpl.txt
-
-# $UID is a bashism
-if [ "$UID" -ne 0 ]; then
-    echo "This script must be run as root (at your own risk!)"
-    exit 1
-fi
-
-basepath=$1; shift
-result=$1; shift
-
-# Make sure $basepath is a path to a chroot
-if [ ! -d $basepath/etc ]; then
-    echo "$basepath/etc does not exist"
-    exit 2
-fi
-
-if [ ! -d $result ]; then
-    echo "$result does not exist"
-    exit 2
-fi
-
-make -f Makefile.pbuilder BASEPATH=$basepath BUILD_RESULT=$result "$@"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list