Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Required updates for supporting %{?dist} and various improvements.

  • Loading branch information...
commit 77157cac40054c2e9f94d183a070124daadee9c9 1 parent d4c60c7
@dagwieers authored
View
25 dar-build
@@ -146,11 +146,11 @@ for arg in $PKGS; do
VERSION="$(rpmconf Version)"
RELEASE="$(rpmconf Release)"
- NEWSPECFILE="$TEMPDIR/$app-$VERSION-$RELEASE.$TAG.spec"
- RPMFILE="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch.rpm"
- LOGFILE="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch"
- LOGFILE_OK="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch.ok.log"
- LOGFILE_KO="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch.ko.log"
+ NEWSPECFILE="$TEMPDIR/$app-$VERSION-$RELEASE.spec"
+ RPMFILE="$app-$VERSION-$RELEASE.$arch.rpm"
+ LOGFILE="$app-$VERSION-$RELEASE.$arch"
+ LOGFILE_OK="$app-$VERSION-$RELEASE.$arch.ok.log"
+ LOGFILE_KO="$app-$VERSION-$RELEASE.$arch.ko.log"
export MAKEFLAGS="%nil"
if [ "$arch" == "nosrc" ]; then
@@ -192,7 +192,7 @@ for arg in $PKGS; do
( echo "----- Build information -----"
echo "Package name: $app"
echo "Package version: $VERSION"
- echo "Package release: $RELEASE.$DISTNAME.$TAG"
+ echo "Package release: $RELEASE"
echo "Packager: $(logname)"
echo "Distribution: $DISTNAME/$DISTARCH"
echo "Package arch: $arch"
@@ -309,7 +309,7 @@ for arg in $PKGS; do
--define \"_buildroot $TEMPDIR/$app-$VERSION-$RELEASE-root\" \
--define \"debug_package %nil\" \
--define \"dtag $DISTNAME\" \
- --define \"disttag $DISTNAME\" \
+ --define \"dist .$DISTNAME.$TAG\" \
--define \"$DISTNAME 1\" \
--define \"$DISTNICK 1\" \"$NEWSPECFILE\""
@@ -321,7 +321,7 @@ for arg in $PKGS; do
cat "$NEWSPECFILE"
echo -e "\n----- Expanded spec file -----"
- rpmdb -D "dtag $DISTNAME" -D "disttag $DISTNAME" -D "$DISTNICK 1" -D "$DISTNAME 1" -D "_smp_mflags $MAKEFLAGS" -E "%{expand:%(cat $SPECFILE)}"
+ rpmdb -D "dtag $DISTNAME" -D "dist .$DISTNAME.$TAG" -D "$DISTNICK 1" -D "$DISTNAME 1" -D "_smp_mflags $MAKEFLAGS" -E "%{expand:%(cat $SPECFILE)}"
echo -e "\n----- Build log -----"
@@ -429,20 +429,17 @@ for arg in $PKGS; do
--define \"_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm\" \
--define \"_srcrpmdir $PACKAGEDIR/$app\" \
--define \"_sourcedir $SPECDIR\" \
- --define \"$dist 1\" \
- --define \"dist $DISTNAME\" \
- --define \"disttag $DISTNAME\" \
- --define \"$DISTNAME 1\" \
+ --define \"dist \" \
\"$NEWSPECFILE\""
echo "$BUILDCMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$dist" /bin/su -lm $BUILD_USER -c "/bin/bash --login -s" &>/dev/null
RC=$?
if [ $RC -eq 0 ]; then
if [ "$FORCE_VERBOSE" == "yes" ]; then
- echo -e "${_GR}Success${_DE} $app [$dist/src], file in [$PACKAGEDIR/$app/]"
+ echo -e "${_BELL}${_GR}Success${_DE} $app [$dist/src], file in [$PACKAGEDIR/$app/]"
fi
echo "$app [$dist/src] ${SPECFILE/*\/}" >>/dar/log/dar-build-success.log
else
- error "${_RE}Failed${_DE} $app [$dist/src], see log [$SPECDIR/_buildlogs/$LOGFILE]"
+ error "${_BELL}${_RE}Failed${_DE} $app [$dist/src], see log [$SPECDIR/_buildlogs/$LOGFILE]"
echo "$app [$dist/src] ${SPECFILE/*\/}" >>/dar/log/dar-build-failed.log
fi
View
4 dar-functions
@@ -25,6 +25,8 @@ _RE_="\033[41m" # Red BG
_BL_="\033[44m" # Blue BG
_WH_="\033[47m" # White BG
+_BELL=""
+
### Cleans environment
function clean_env {
:
@@ -97,7 +99,7 @@ function rpmconf {
(
# if [ -z "$DISTNICK" ] || [ "$RPMVER" \< "4.1" ] || ! chroot "$CHROOTDIR/$DISTNICK" /bin/su -lm $BUILD_USER -c "rpmdb -D \"dtag $DISTNAME\" -D \"disttag $DISTNAME\" -D \"$DISTNICK 1\" -D \"$DISTNAME 1\" -E \"%{expand:%(head -n128 $SPECFILE)}\"" | grep -i "^ *$CONFIG *:" | sed -e "s/^ *$CONFIG *: *//i" | head -1; then
- if [ -z "$DISTNICK" ] || [ "$RPMVER" \< "4.1" ] || ! chroot "$CHROOTDIR/$DISTNICK" /bin/su -lm $BUILD_USER -c "rpmdb -D \"dtag $DISTNAME\" -D \"disttag $DISTNAME\" -D \"$DISTNICK 1\" -D \"$DISTNAME 1\" -E \"%{expand:%(head -n128 $SPECFILE)}\"" | grep -i "^ *$CONFIG *:" | sed -e "s/^ *$CONFIG *: *//i" | head -1; then
+ if [ -z "$DISTNICK" ] || [ "$RPMVER" \< "4.1" ] || ! rpmdb -D "dtag $DISTNAME" -D "dist .$DISTNAME.$TAG" -D "$DISTNICK 1" -D "$DISTNAME 1" -E "%{expand:%(head -n192 $SPECFILE)}" | grep -i "^ *$CONFIG *:" | sed -e "s/^ *$CONFIG *: *//i" | head -1; then
if ! grep -i "^ *$CONFIG *:" $SPECFILE | sed -e "s/^ *$CONFIG *: *//i" | head -1; then
debug "Config $CONFIG not found in $SPECFILE"
fi
View
18 dar-perl.py
@@ -7,6 +7,7 @@
### perl-Tree-Simple tests META.yml
### perl-Tree-Simple-Visitor tests sub-modules
### perl-Kwiki tests perl Buildrequires epoch
+### perl-ExtUtils-FakeConfig tests zip files (unsupported yet)
### More documentation about:
### META.yml http://module-build.sourceforge.net/META-spec-current.html
@@ -88,8 +89,8 @@ def download(url):
try:
req = urllib2.Request(url)
fdin = urllib2.urlopen(req)
- except:
-# print >>sys.stderr, "Failed to download file from %s" % url
+ except Exception, e:
+ print >>sys.stderr, "Failed to download file from %s, %s" % (url, e)
return False
fdout = open(filename, 'w')
fdout.write(fdin.read())
@@ -229,7 +230,6 @@ def parse_makefile(data):
location = path
#print >>sys.stderr, 'We found package %s with version %s with modules:' % (package, version)
-#print >>sys.stderr, pkgmodules
ppath = path.split('/')
mnemo = ppath[2]
@@ -275,14 +275,16 @@ def parse_makefile(data):
### Try to download distribution
archive = os.path.join(tmppath, cdistname)
-if os.path.isfile(archive):
- os.remove(archive)
+#if os.path.isfile(archive):
+# os.remove(archive)
source = "http://www.cpan.org/modules/by-module/%s/%s" % (modparts[0], cdistname)
#if not os.path.isfile(archive):
if not download(source):
source = "http://www.cpan.org/authors/id/%s" % location
if not download(source):
- print >>sys.stderr, "Error: Failed to download %s" % (source)
+ source = "http://search.cpan.org/CPAN/authors/id/%s" % location
+ if not download(source):
+ print >>sys.stderr, "Error: Failed to download %s" % (source)
### Add %{version} and %{real_version} to source
source = source.replace(version, '%{version}')
@@ -380,8 +382,8 @@ def parse_makefile(data):
basedir = basedir.replace(realversion, '%{real_version}')
basedir = rcut(basedir, '/')
-if os.path.isfile(archive):
- os.remove(archive)
+#if os.path.isfile(archive):
+# os.remove(archive)
### Compare deducted information with META.yml
if meta.has_key('name') and meta['name'] != package:
View
2  dar-prepare
@@ -19,7 +19,7 @@ for distname in $DEFAULT_DISTS; do
# rm -rf $CHROOTDIR/$distname{$RPMTMPPATH}/*
mkdir -p $CHROOTDIR/$distname/$ROOT/
- mount -o bind $ROOT $CHROOTDIR/$distname/$ROOT/
+ mount -o bind,noatime $ROOT $CHROOTDIR/$distname/$ROOT/
mkdir -p $CHROOTDIR/$distname/proc/
mount -t proc proc $CHROOTDIR/$distname/proc/
View
5 dar.conf
@@ -11,7 +11,8 @@ BUILDDIR="$ROOT/build"
TEMPDIR="$ROOT/tmp"
#DEFAULT_DISTS="el4a el4i fc3a fc3i fc2a fc2i fc1i el3a el3i rh9i rh7i el2i"
-DEFAULT_DISTS="el5a el5i el4a el4i el3a el3i rh9i rh7i el2i"
+#DEFAULT_DISTS="el5a el5i el4a el4i el3a el3i rh9i rh7i el2i"
+DEFAULT_DISTS="el5a el5i el4a el4i el3a el3i"
DEFAULT_SOURCE_DISTS="el5i"
DEFAULT_ARCHS="i386"
DEFAULT_TAGS="rf dag"
@@ -35,6 +36,6 @@ DISTCC_HOSTS="emyn localhost"
RSYNC_OPTIONS="-avHl --progress --delete-after --exclude /arrfab/ --exclude /bert/ --exclude /dries/ --exclude /redhat/6.2/ --exclude /redhat/8.0/ --include /rpmforge/persona/dag/ --exclude /rpmforge/persona/* --delay-updates"
RSYNC_TARGET="dag@rsync.sw.be:dag.wieers.com/pub/"
### Use wondershaper
-RSYNC_LIMIT="32"
+RSYNC_LIMIT="64"
GPG_PATH="/home/dag/.gnupg"
GPG_NAME="Dag Wieers (Dag Apt Repository v1.0)"
View
2  dists/el2i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-2.96"
DISTCC_CXX="i386-redhat-linux-g++-2.96"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/el3a/config
@@ -5,7 +5,7 @@ DISTCC_CC="x86_64-redhat-linux-gcc-3.2.3"
DISTCC_CXX="x86_64-redhat-linux-g++-3.2.3"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/el3i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-3.2.3"
DISTCC_CXX="i386-redhat-linux-g++-3.2.3"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/el4a/config
@@ -5,7 +5,7 @@ DISTCC_CC="x86_64-redhat-linux-gcc-3.4.3"
DISTCC_CXX="x86_64-redhat-linux-g++-3.4.3"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/el4i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-3.4.3"
DISTCC_CXX="i386-redhat-linux-g++-3.4.3"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/el5a/config
@@ -5,7 +5,7 @@ DISTCC_CC="x86_64-redhat-linux-gcc-3.4.3"
DISTCC_CXX="x86_64-redhat-linux-g++-3.4.3"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/el5i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-3.4.3"
DISTCC_CXX="i386-redhat-linux-g++-3.4.3"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/fc1i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-3.3.2"
DISTCC_CXX="i386-redhat-linux-g++-3.3.2"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/fc2a/config
@@ -8,7 +8,7 @@ DISTCC_CXX="x86_64-redhat-linux-g++-3.3.3"
#UPDATECMD="yum -y update"
#INSTALLCMD="yum -y install %p"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/fc2i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-3.3.3"
DISTCC_CXX="i386-redhat-linux-g++-3.3.3"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/fc3a/config
@@ -5,7 +5,7 @@ DISTCC_CC="x86_64-redhat-linux-gcc-3.3.3"
DISTCC_CXX="x86_64-redhat-linux-g++-3.3.3"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/fc3i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-3.4.2"
DISTCC_CXX="i386-redhat-linux-g++-3.4.2"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/fc4i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-4.0.0"
DISTCC_CXX="i386-redhat-linux-g++-4.0.0"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
#UPDATECMD="yum -y update"
View
2  dists/nodist/config
@@ -5,7 +5,7 @@ DISTCC_CC="echo 'NODIST: ' "
DISTCC_CXX="echo 'NODIST: ' "
#UPDATECMD="apt-get -qq update"
-#UPGRADECMD="apt-get -qq -f -y upgrade"
+#UPGRADECMD="apt-get -qq -f -y dist-upgrade"
#INSTALLCMD="apt-get -qq -y -m install %p"
#UPDATECMD="up2date -u"
#INSTALLCMD="up2date -if"
View
2  dists/rh6i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-2.91.6"
DISTCC_CXX="i386-redhat-linux-g++-2.91.6"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/rh7i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-2.96"
DISTCC_CXX="i386-redhat-linux-g++-2.96"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/rh8i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-3.2"
DISTCC_CXX="i386-redhat-linux-g++-3.2"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
View
2  dists/rh9i/config
@@ -5,7 +5,7 @@ DISTCC_CC="i386-redhat-linux-gcc-3.2.2"
DISTCC_CXX="i386-redhat-linux-g++-3.2.2"
UPDATECMD="apt-get -qq update"
-UPGRADECMD="apt-get -qq -f -y upgrade"
+UPGRADECMD="apt-get -qq -f -y dist-upgrade"
INSTALLCMD="apt-get -qq -y -m install %p"
CLEANCMD="apt-get clean"
#UPDATECMD="yum -y update"
View
14 scripts/pre-brand.sh
@@ -16,14 +16,16 @@ author="$(grep '^# Authority: ' $specfile | sed -e 's|^# Authority: ||')"
vendor="Dag Apt Repository, http://dag.wieers.com/apt/"
case "$author" in
- (dries)
- packager="Dries Verachtert <dries\@ulyssis.org>" ;;
- (bert)
- packager="Bert de Bruijn <bert\@debruijn.be>" ;;
+ (dries)
+ packager="Dries Verachtert <dries\@ulyssis.org>" ;;
+ (bert)
+ packager="Bert de Bruijn <bert\@debruijn.be>" ;;
(hadams)
packager="Heiko Adams <info\@fedora-blog.de>" ;;
- (dag|thias|matthias|*)
- packager="Dag Wieers <dag\@wieers.com>" ;;
+ (cmr)
+ packager="Christoph Maser <cmr\@financial.com>" ;;
+ (dag|thias|matthias|*)
+ packager="Dag Wieers <dag\@wieers.com>" ;;
esac
### Removing existing branding and add own branding
View
2  scripts/pre-disttag.sh
@@ -3,6 +3,8 @@
### This script add a disttag to the SPEC file so packages can be
### identified easier, are unique and don't have the macro clutter.
+return 0
+
script="pre-disttag"
if [ -z "$buildarch" -o -z "$repotag" -o -z "$specfile" -o -z "$disttag" ]; then
Please sign in to comment.
Something went wrong with that request. Please try again.