Browse files

Small updates, see ChangeLog.

  • Loading branch information...
1 parent 1e2f594 commit 25d9193325992da9c788d616ed1a57e98528a9be @dagwieers committed Jul 21, 2004
Showing with 29 additions and 10 deletions.
  1. +4 −0 ChangeLog
  2. +17 −5 dar-build
  3. +5 −2 dar-functions
  4. +2 −3 dar-sync
  5. +1 −0 dar.conf
View
4 ChangeLog
@@ -20,6 +20,10 @@ Version 0.6.1 # Probably the last version using bash
- dar-functions: Fixed a small bug in rpmconf()
- dar-prepare: Replace /mnt/dar by ROOT (Edward Rudd)
- dar-build: Added BUILD_GROUP (Edward Rudd)
+- dar-build: Small fixes to SPEC file location
+- dar-build: Added -n flag to build without building a source RPM
+- dar-sync: Added i386 packages to x86_64 (could be done without hardcoding it)
+- dar-build: Added SETARCH supprt (Ralf Ertzinger)
Version 0.6.0
- dar.conf: Removed DISTSMAP, added it to dists specific section
View
22 dar-build
@@ -4,7 +4,7 @@
source "/usr/lib/dar/dar-functions"
-daropts ":a:d:fs:t:v" $@
+daropts ":a:d:fns:t:v" $@
PKGS="$OPTS"
if [ ! -d "$ROOT" ]; then
@@ -33,8 +33,13 @@ for app in $PKGS; do
fi
if [ ! -f "$SPECFILE" ]; then
- SPECFILE="$app.spec"
+ SPECFILE="SPECDIR/$SPECFILE"
fi
+
+ if [ ! -f "$SPECFILE" ]; then
+ SPECFILE="SPECDIR/$app.spec"
+ fi
+
if [ ! -f "$SPECFILE" ]; then
SPECDIR="$SPECSDIR/$app"
SPECFILE="$SPECDIR/$app.spec"
@@ -247,6 +252,13 @@ for app in $PKGS; do
export CCACHE_RECACHE="1"
fi
+ ### Check for Setarch
+ if [ -x "/usr/bin/setarch" -a "$DISTARCH" != "$(uname -m)" ]; then
+ SETARCH="/usr/bin/setarch $DISTARCH"
+ else
+ unset SETARCH
+ fi
+
### Remove buildroot
rm -rf "$TEMPDIR/root-$app-$VERSION"
@@ -286,7 +298,7 @@ for app in $PKGS; do
### Check for building as user
if [ $AS_ROOT -eq 1 ]; then
- chroot "$CHROOTDIR/$dist" /usr/bin/rpmbuild -bb $RPMOPTS \
+ $SETARCH chroot "$CHROOTDIR/$dist" /usr/bin/rpmbuild -bb $RPMOPTS \
--define "_smp_mflags $MAKEFLAGS" \
--define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
--define "_initrddir %{_sysconfdir}/rc.d/init.d" \
@@ -299,7 +311,7 @@ for app in $PKGS; do
--define "$DISTNICK 1" \
"$NEWSPECFILE"
else
- chroot "$CHROOTDIR/$dist" /bin/su - -m $BUILD_USER -c "/usr/bin/rpmbuild -bb $RPMOPTS \
+ $SETARCH chroot "$CHROOTDIR/$dist" /bin/su - -m $BUILD_USER -c "/usr/bin/rpmbuild -bb $RPMOPTS \
--define '_smp_mflags $MAKEFLAGS' \
--define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
--define '_initrddir %{_sysconfdir}/rc.d/init.d' \
@@ -370,7 +382,7 @@ for app in $PKGS; do
done
### Only build when there was a succesful binary build
- if [ "$DARBUILDRC" -eq 0 ]; then
+ if [ "$DARBUILDRC" -eq 0 -a "$NOSOURCE" != "true" ]; then
if [ -z "$SOURCE_DISTS" ]; then SOURCE_DISTS="$DEFAULT_SOURCE_DISTS"; fi
View
7 dar-functions
@@ -134,6 +134,7 @@ function daropts {
(a) FORCE_ARCHS="$OPTARG";;
(d) FORCE_DISTS="$OPTARG";;
(f) FORCE_OVERWRITE="true";;
+ (n) NOSOURCE="true";;
(s) FORCE_SOURCE_DISTS="$OPTARG";;
(t) FORCE_TAG="$OPTARG";;
(v) FORCE_VERBOSE="true";;
@@ -337,8 +338,8 @@ function build_repo_apt {
echo $PACKAGEDIR/*/*.{$tag,0}.$REPO.{noarch,i386,i586,i686,athlon}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null
;;
x86_64)
- echo $PACKAGEDIR/*/*.$REPO.$tag.{noarch,x86_64}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null # Backward compatibility
- echo $PACKAGEDIR/*/*.{$tag,0}.$REPO.{noarch,x86_64}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null
+ echo $PACKAGEDIR/*/*.$REPO.$tag.{noarch,i386,i586,i686,athlon,x86_64}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null # Backward compatibility
+ echo $PACKAGEDIR/*/*.{$tag,0}.$REPO.{noarch,i386,i586,i686,athlon,x86_64}.rpm | xargs -n 1 | xargs -i ln -f {} $FTPDIR/$DISTPATH/RPMS.$REPO/ &>/dev/null
;;
esac
done
@@ -362,6 +363,8 @@ function build_repo_yum {
echo $FTPDIR/$DISTPATH/$REPO/RPMS/*.rpm | xargs rm -f
echo $FTPDIR/$DISTPATH/$REPO/headers/*.hdr | xargs rm -f
+ ### FIXME: This should not be done hardcoded, rather have a list of archs inside the dist-config
+ ### FIXME: And iterate through that list
### Hardlink files
for tag in $DISTTAG; do
case "$DISTARCH" in
View
5 dar-sync
@@ -67,9 +67,8 @@ echo -e "\t($(wc -l $FTPDIR/extra/state/all-packages.list))"
echo -n "Press enter to start remote synchronisation."
read
echo "Starting remote synchronisation."
-RSYNC_OPTIONS=""
if [ $RSYNC_LIMIT ]; then
- RSYNC_OPTIONS="--bwlimit="$RSYNC_LIMIT""
+ RSYNC_OPTIONS="$RSYNC_OPTIONS --bwlimit=\"$RSYNC_LIMIT\""
fi
#rsync -anvzHL --progress --delete-after $RSYNC_OPTIONS -e /usr/bin/ssh $PACKAGEDIR $FTPDIR $RSYNC_TARGET
-rsync -avHL --progress --delete-after $RSYNC_OPTIONS -e "/usr/bin/ssh -oCompression=no" $PACKAGEDIR $FTPDIR $RSYNC_TARGET
+rsync -avHL --progress --delete-after $RSYNC_OPTIONS -e "/usr/bin/ssh -oCompression=no" $FTPDIR $RSYNC_TARGET
View
1 dar.conf
@@ -26,6 +26,7 @@ CPUNR="4"
DISTCC_HOSTS="emyn localhost"
### Variables for dar-sync
+RSYNC_OPTIONS="--exclude dries/"
RSYNC_TARGET="dag@wieers.com:dag.wieers.com/"
### Use wondershaper
#RSYNC_LIMIT="8"

0 comments on commit 25d9193

Please sign in to comment.