SF.net SVN: opencsw:[674] buildfarm/bin
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Mar 16 13:22:18 CET 2014
Revision: 674
http://sourceforge.net/p/opencsw/code/674
Author: wahwah
Date: 2014-03-16 12:22:15 +0000 (Sun, 16 Mar 2014)
Log Message:
-----------
Bulk-committing local changes from the buildfarm.
The generation scripts call the new catalog generation tool.
Modified Paths:
--------------
buildfarm/bin/dist-hardlinkify
buildfarm/bin/generate-unstable
buildfarm/bin/opencsw-future-update
Added Paths:
-----------
buildfarm/bin/check-and-sign-catalog
Removed Paths:
-------------
buildfarm/bin/generate-catalog
Copied: buildfarm/bin/check-and-sign-catalog (from rev 673, buildfarm/bin/generate-catalog)
===================================================================
--- buildfarm/bin/check-and-sign-catalog (rev 0)
+++ buildfarm/bin/check-and-sign-catalog 2014-03-16 12:22:15 UTC (rev 674)
@@ -0,0 +1,53 @@
+#!/opt/csw/bin/bash
+
+# This script assumes that it's called from the directory containing
+# the package files to build a catalog from.
+
+export PATH=/opt/csw/bin:/opt/csw/sbin:/usr/bin:/usr/sbin
+
+set -u
+set -e
+set -x
+
+readonly _cswsign_host=192.168.1.40
+readonly _cswsign_port=9981
+readonly _signtype=clearsign
+readonly _catalog_path=$1
+_URL=http://${_cswsign_host}:${_cswsign_port}/${_signtype}/${_catalog_path}
+readonly _URL
+
+if [[ ! -e catalog ]]; then
+ echo >&2 "ERROR: The catalog file doesn't exist. Exiting."
+ exit 1
+fi
+
+# bldcat prints a lot of output
+if chkcat -e catalog
+then
+ echo chkcat returned no errors
+else
+ r="$?"
+ if [[ "${r}" -eq 2 ]]; then
+ echo -n "chkcat returned an error in $(pwd) "
+ echo "when generating a catalog."
+ false
+ fi
+fi
+
+# Don't sign catalogs which are already signed
+if grep "BEGIN PGP SIGNED MESSAGE-----" catalog; then
+ echo >&2 "The catalog is already signed, exiting."
+ exit 0
+fi
+
+# This request should return a signed catalog
+echo "Fetching '${_URL}'"
+if curl -s -f ${_URL} > catalog.new
+then
+ mv catalog.new catalog
+ /opt/csw/bin/gzip -9 --to-stdout catalog > catalog.gz
+ exit 0
+else
+ echo "Signing $(pwd) failed."
+ exit 1
+fi
Modified: buildfarm/bin/dist-hardlinkify
===================================================================
--- buildfarm/bin/dist-hardlinkify 2014-03-02 11:20:21 UTC (rev 673)
+++ buildfarm/bin/dist-hardlinkify 2014-03-16 12:22:15 UTC (rev 674)
@@ -19,6 +19,7 @@
sub alldir {
my $dir = shift @_;
+ print "# Reading $dir\n";
opendir DIR, $dir;
my @files = grep {!/^\.\.?$/} readdir DIR;
closedir DIR;
@@ -31,7 +32,7 @@
# ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($filename);
- return if( ! -f $file1 || ! -f $file2 );
+ return if( -l $file1 || ! -f $file1 || -l $file2 || ! -f $file2 );
my @stat1 = stat( $file1 );
my @stat2 = stat( $file2 );
@@ -54,10 +55,18 @@
# print "$pkg ", domd5( $pkg ), "\n";
# }
-my @snapshots = map { "snapshots/$_"; } alldir( "$base/snapshots" );
+#my @snapshots = map { "snapshots/$_"; } alldir( "$base/snapshots" );
+my @snapshots = ();
#foreach my $d (@snapshots, qw(unstable experimental)) {
-foreach my $d (@snapshots, qw(dublin legacy unstable)) {
+foreach my $d (@snapshots, qw(
+beanie
+bratislava
+dublin
+kiel
+legacy
+unstable
+)) {
foreach my $a (qw(sparc i386)) {
foreach my $r (qw(5.8 5.9 5.10)) {
foreach my $f (alldir "$base/$d/$a/$r") {
Deleted: buildfarm/bin/generate-catalog
===================================================================
--- buildfarm/bin/generate-catalog 2014-03-02 11:20:21 UTC (rev 673)
+++ buildfarm/bin/generate-catalog 2014-03-16 12:22:15 UTC (rev 674)
@@ -1,42 +0,0 @@
-#!/opt/csw/bin/bash
-
-# This script assumes that it's called from the directory containing
-# the package files to build a catalog from.
-
-export PATH=/opt/csw/bin:/opt/csw/sbin:/usr/bin:/usr/sbin
-
-set -u
-set -e
-set -x
-
-readonly _cswsign_host=192.168.1.40
-readonly _cswsign_port=9981
-readonly _signtype=clearsign
-readonly _catalog_path=$1
-_URL=http://${_cswsign_host}:${_cswsign_port}/${_signtype}/${_catalog_path}
-readonly _URL
-
-# bldcat prints a lot of output
-if chkcat -e catalog
-then
- echo chkcat returned no errors
-else
- r="$?"
- if [[ "${r}" -eq 2 ]]; then
- echo -n "chkcat returned an error in $(pwd) "
- echo "when generating a catalog."
- false
- fi
-fi
-
-# This request should return a signed catalog
-echo "Fetching '${_URL}'"
-if curl -s -f ${_URL} > catalog.new
-then
- mv catalog.new catalog
- /opt/csw/bin/gzip -9 --to-stdout catalog > catalog.gz
- exit 0
-else
- echo "Signing $(pwd) failed."
- exit 1
-fi
Modified: buildfarm/bin/generate-unstable
===================================================================
--- buildfarm/bin/generate-unstable 2014-03-02 11:20:21 UTC (rev 673)
+++ buildfarm/bin/generate-unstable 2014-03-16 12:22:15 UTC (rev 674)
@@ -24,11 +24,11 @@
for catalog in "${catalogs[@]}"
do
- PYTHONPATH=/home/web/bin/gar \
- /home/web/bin/gar/bin/pkgdb \
- gen-cat --catalog-release "${catalog}" \
- ${mirror_root}/allpkgs \
- ${mirror_root}
+ time \
+ /home/web/bin/make-catalog-links \
+ --catalog-release="${catalog}" \
+ --catalog-root="${mirror_root}" \
+ --pkgdb-url="http://buildfarm.opencsw.org/pkgdb/rest"
pushd "${mirror_root}/${catalog}"
for arch in i386 sparc; do
@@ -39,16 +39,9 @@
pushd "${osrel}"
cat_3="${catalog}/${arch}/${osrel}"
cat_dir="${mirror_name}/${cat_3}"
- abs_cat_dir="${mirror_root}/${cat_3}"
- grm -vf "${abs_cat_dir}/catalog"* "${abs_cat_dir}/descriptions"*
- PYTHONPATH=/home/web/bin/gar \
- /home/web/bin/gar/lib/python/generate_catalog_file.py \
- --catalog-release ${catalog} \
- --arch ${arch} \
- --os-release SunOS${osrel} \
- --out-dir "${abs_cat_dir}"
- # PYTHONPATH=mgar/gar/v2 ./mgar/gar/v2/lib/python/compare_catalog.py /export/mirror/opencsw-official/unstable/sparc/5.10/catalog /export/mirror/opencsw-official/testing/sparc/5.10/catalog >/dev/null 2>&1; echo $?
- /home/web/bin/generate-catalog "${cat_dir}"
+ if [[ -r catalog ]]; then
+ /home/web/bin/check-and-sign-catalog "${cat_dir}"
+ fi
popd
done
popd
Modified: buildfarm/bin/opencsw-future-update
===================================================================
--- buildfarm/bin/opencsw-future-update 2014-03-02 11:20:21 UTC (rev 673)
+++ buildfarm/bin/opencsw-future-update 2014-03-16 12:22:15 UTC (rev 674)
@@ -32,6 +32,7 @@
exec >/opt/csw/apache2/share/htdocs/buildfarm/catalog-generation.log.new 2>&1
date
+# Rsync from the mirror to a copy on the buildfarm
${BASE_DIR}/sync-mirror
${BASE_DIR}/sync-checkpkg
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list