Author: wade
Date: 2005-07-06 21:39:31 -0400 (Wed, 06 Jul 2005)
New Revision: 47022

Modified:
   trunk/release/packaging/build
   trunk/release/packaging/do-build
Log:
Run builds as the builder user instead of root
        - May require some modification of the jails



Modified: trunk/release/packaging/build
===================================================================
--- trunk/release/packaging/build       2005-07-07 00:35:26 UTC (rev 47021)
+++ trunk/release/packaging/build       2005-07-07 01:39:31 UTC (rev 47022)
@@ -90,4 +90,4 @@
 rm status/$distro
 
 mkdir -p $package_path/$DEST_ROOT/$package/$VER_PATH
-scp $target_host:$jaildir/tmp/root/built-packages/* 
$package_path/$DEST_ROOT/$package/$VER_PATH
+scp $target_host:$jaildir/tmp/builder/built-packages/* 
$package_path/$DEST_ROOT/$package/$VER_PATH

Modified: trunk/release/packaging/do-build
===================================================================
--- trunk/release/packaging/do-build    2005-07-07 00:35:26 UTC (rev 47021)
+++ trunk/release/packaging/do-build    2005-07-07 01:39:31 UTC (rev 47022)
@@ -1,11 +1,15 @@
 #!/bin/sh
 
+# Run the builds as the builder user inside the jail
+SUDO='sudo -u builder'
+
 mount /proc &> /dev/null
 
 version=$1
 rev=$2
-rm -rf /tmp/root/built-packages || exit 1
-cd /tmp && rm -rf scratch && mkdir scratch && cd scratch || exit 1
+rm -rf /tmp/builder/built-packages     || exit 1
+cd /tmp && rm -rf scratch              || exit 1
+$SUDO mkdir scratch && cd scratch      || exit 1
 
 mv ../ximian-build.conf .
 mv ../*.tar.gz .
@@ -13,10 +17,10 @@
 chown root:root *.tar.gz
 
 
+$SUDO bb_lint -g prebuild -V $version -R $rev -S ''    || exit 1
+$SUDO bb_unpack apply                                  || exit 1
+$SUDO bb_do -V $version -R $rev -S ''                  || exit 1
+$SUDO bb_lint -V $version -R $rev -S ''                        || exit 1
 
-bb_lint -g prebuild -V $version -R $rev -S ''          || exit 1
-bb_unpack apply                                                || exit 1
-bb_do -V $version -R $rev -S ''                                || exit 1
-bb_lint -V $version -R $rev -S ''                      || exit 1
+rm -rf /tmp/builder/built-packages/*.src.rpm
 
-rm -rf /tmp/root/built-packages/*.src.rpm
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to