summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_create_meta_pkg_sets.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-19 14:52:50 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-19 14:52:50 +0100
commita7d25597c6343d660fa4bc3c0856ac599b4aac7f (patch)
tree1ab88597816980b13e7240d1df34ed1afee79d90 /bin/reproducible_create_meta_pkg_sets.sh
parent3e9cbd126669c670efc149e53de91814a586ff7f (diff)
downloadjenkins.debian.net-a7d25597c6343d660fa4bc3c0856ac599b4aac7f.tar.xz
reproducible: move in correct order
Diffstat (limited to 'bin/reproducible_create_meta_pkg_sets.sh')
-rwxr-xr-xbin/reproducible_create_meta_pkg_sets.sh55
1 files changed, 28 insertions, 27 deletions
diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh
index 370e08be..e8494912 100755
--- a/bin/reproducible_create_meta_pkg_sets.sh
+++ b/bin/reproducible_create_meta_pkg_sets.sh
@@ -91,6 +91,34 @@ update_pkg_sets() {
update_if_similar ${META_PKGSET[3]}.pkgset
fi
+ # build-essential-depends
+ #
+ # This set is created using the following procedure:
+ #
+ # 1. take the binary package build-essential and put it into set S
+ # 2. go over every package in S and
+ # 2.1. if it is a binary package
+ # 2.1.1 add all its Depends and Pre-Depends to S
+ # 2.1.2 add the source package it builds from to S
+ # 2.2. if it is a source package add all its Build-Depends,
+ # Build-Depends-Indep and Build-Depends-Arch to S
+ # 3. if step 2 added new packages, repeat step 2, otherwise exit
+ #
+ # This set is important because a package can only be trusted if
+ # also all its dependencies, all its build dependencies and
+ # recursively their own dependencies and build dependencies can be
+ # trusted.
+ # So making this set reproducible is required to make anything
+ # in the essential or build-essential set trusted.
+ if [ ! -z $(find $TPATH -maxdepth 1 -mtime +0 -name ${META_PKGSET[4]}.pkgset) ] || [ ! -f $TPATH/${META_PKGSET[4]}.pkgset ] ; then
+ curl http://bootstrap.debian.net/importance_metric_all.txt > $TMPFILE2
+ # retrieve the highest number in the third column (packages affect)
+ HIGHEST=`sort -n -k 3 $TMPFILE2 | tail -1 | cut -f 3`
+ # now get all lines where the third column is equal to this value
+ awk '$3 == "'$HIGHEST'" { print $1 }' $TMPFILE2 | cut -d ':' -f 2 > $TMPFILE
+ update_if_similar ${META_PKGSET[4]}.pkgset
+ fi
+
# popcon top 1337 installed sources
if [ ! -z $(find $TPATH -maxdepth 1 -mtime +0 -name ${META_PKGSET[5]}.pkgset) ] || [ ! -f $TPATH/${META_PKGSET[5]}.pkgset ] ; then
SQL_QUERY="SELECT popcon_src.source FROM popcon_src ORDER BY popcon_src.insts DESC LIMIT 1337;"
@@ -191,33 +219,6 @@ update_pkg_sets() {
update_if_similar ${META_PKGSET[14]}.pkgset
fi
- # build-essential-depends
- #
- # This set is created using the following procedure:
- #
- # 1. take the binary package build-essential and put it into set S
- # 2. go over every package in S and
- # 2.1. if it is a binary package
- # 2.1.1 add all its Depends and Pre-Depends to S
- # 2.1.2 add the source package it builds from to S
- # 2.2. if it is a source package add all its Build-Depends,
- # Build-Depends-Indep and Build-Depends-Arch to S
- # 3. if step 2 added new packages, repeat step 2, otherwise exit
- #
- # This set is important because a package can only be trusted if
- # also all its dependencies, all its build dependencies and
- # recursively their own dependencies and build dependencies can be
- # trusted.
- # So making this set reproducible is required to make anything
- # in the essential or build-essential set trusted.
- if [ ! -z $(find $TPATH -maxdepth 1 -mtime +0 -name ${META_PKGSET[4]}.pkgset) ] || [ ! -f $TPATH/${META_PKGSET[4]}.pkgset ] ; then
- curl http://bootstrap.debian.net/importance_metric_all.txt > $TMPFILE2
- # retrieve the highest number in the third column (packages affect)
- HIGHEST=`sort -n -k 3 $TMPFILE2 | tail -1 | cut -f 3`
- # now get all lines where the third column is equal to this value
- awk '$3 == "'$HIGHEST'" { print $1 }' $TMPFILE2 | cut -d ':' -f 2 > $TMPFILE
- update_if_similar ${META_PKGSET[4]}.pkgset
- fi
}
TMPFILE=$(mktemp)