Add 'build-everything' script, update smock and documentation.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 24 Sep 2008 10:52:55 +0000 (11:52 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 24 Sep 2008 10:52:55 +0000 (11:52 +0100)
README
build-everything-in-mock.sh [new file with mode: 0755]
show-build-order.pl
smock/README
smock/smock.httpd.conf
smock/smock.mock.cfg [deleted file]
smock/smock.mock.extra [new file with mode: 0644]
smock/smock.sh

diff --git a/README b/README
index 53ece8e..7544230 100644 (file)
--- a/README
+++ b/README
@@ -8,7 +8,22 @@ Other useful information:
 
  * https://fedoraproject.org/wiki/SIGs/MinGW
 
 
  * https://fedoraproject.org/wiki/SIGs/MinGW
 
-Build order & package notes:
+Build everything
+----------------------------------------------------------------------
+
+ * Install mock
+
+ * Install smock (read smock/README)
+
+ * Download source tarballs and put them in each package directory
+   (see .hgignore and the specfiles for a list).
+
+ * Run ./build-everything-in-mock.sh
+
+ * Build logs are printed to the screen and saved in 'buildall.log'
+
+Package notes
+----------------------------------------------------------------------
 
  ( 1) mingw-filesystem
 
 
  ( 1) mingw-filesystem
 
diff --git a/build-everything-in-mock.sh b/build-everything-in-mock.sh
new file mode 100755 (executable)
index 0000000..6b079ad
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh -
+
+DIST=fedora-9
+
+specs=`perl show-build-order.pl |
+       grep -v '^#' |
+       grep -Eo '[^[:space:]]+/mingw-[^[:space:]]+\.spec'`
+
+rm -f buildall.log
+echo -e "Specfiles in build order:\n$specs\n\n" >> buildall.log
+
+pwd=`pwd`
+
+for spec in $specs
+do
+    set -e
+    dir=`dirname $spec`
+    srcrpm=`rpmbuild --define "_sourcedir $pwd/$dir" -bs $spec |
+            awk '{print $2}'`
+    smock/smock $DIST $srcrpm
+done 2>&1 | tee -a buildall.log
index a182d85..a922111 100755 (executable)
@@ -58,6 +58,7 @@ sub main {
     delete $br{"mingw-nsis"};
     delete $br{"mingw-wix"};
     delete $br{"mingw-example"};
     delete $br{"mingw-nsis"};
     delete $br{"mingw-wix"};
     delete $br{"mingw-example"};
+    delete $br{"mingw-gdb"};
 
     # There is a dependency loop (gcc -> runtime/w32api -> gcc)
     # which has to be manually resolved below.  Break that loop.
 
     # There is a dependency loop (gcc -> runtime/w32api -> gcc)
     # which has to be manually resolved below.  Break that loop.
@@ -102,7 +103,7 @@ sub main {
            my $br;
            foreach $br (@brs) {
                if (! rpm_installed ($br) && !exists $installed{$br}) {
            my $br;
            foreach $br (@brs) {
                if (! rpm_installed ($br) && !exists $installed{$br}) {
-                   print "as root # rpm -Uvh $br*.rpm\n";
+                   print "# as root: rpm -Uvh $br*.rpm\n";
                    $installed{$br} = 1;
                }
            }
                    $installed{$br} = 1;
                }
            }
@@ -112,11 +113,11 @@ sub main {
                (!rpm_installed ("mingw-runtime") ||
                 !rpm_installed ("mingw-w32api"))) {
                print "rpmbuild -ba --define \"_sourcedir $pwd/runtime-bootstrap\" runtime-bootstrap/mingw-runtime-bootstrap.spec\n";
                (!rpm_installed ("mingw-runtime") ||
                 !rpm_installed ("mingw-w32api"))) {
                print "rpmbuild -ba --define \"_sourcedir $pwd/runtime-bootstrap\" runtime-bootstrap/mingw-runtime-bootstrap.spec\n";
-               print "as root # rpm -Uvh mingw-runtime-bootstrap*.rpm\n";
+               print "# as root: rpm -Uvh mingw-runtime-bootstrap*.rpm\n";
                $installed{"mingw-runtime-bootstrap"} = 1;
 
                print "rpmbuild -ba --define \"_sourcedir $pwd/w32api-bootstrap\" w32api-bootstrap/mingw-w32api-bootstrap.spec\n";
                $installed{"mingw-runtime-bootstrap"} = 1;
 
                print "rpmbuild -ba --define \"_sourcedir $pwd/w32api-bootstrap\" w32api-bootstrap/mingw-w32api-bootstrap.spec\n";
-               print "as root # rpm -Uvh mingw-w32api-bootstrap*.rpm\n";
+               print "# as root: rpm -Uvh mingw-w32api-bootstrap*.rpm\n";
                $installed{"mingw-w32api-bootstrap"} = 1;
            }
 
                $installed{"mingw-w32api-bootstrap"} = 1;
            }
 
index b670973..6a4a235 100644 (file)
@@ -4,22 +4,30 @@
 Smock is a thin wrapper around mock to let you build up a whole
 set of dependant RPMs against an external distro.
 
 Smock is a thin wrapper around mock to let you build up a whole
 set of dependant RPMs against an external distro.
 
+ - Create directory $HOME/public_html/smock
+
  - Copy smock.httpd.conf to /etc/httpd/conf.d/smock.conf, changing the
    /home/[USERNAME]/ to your user
  - Copy smock.httpd.conf to /etc/httpd/conf.d/smock.conf, changing the
    /home/[USERNAME]/ to your user
- - Start httpd
- - Add  smock.mock.conf to all your repos in /etc/mock/ changing the
-   arch and distro name to match
- - Create  $HOME/smock
 
 
- - Edit smock.sh to set which arch(es) you want to build on
+ - Start or restart httpd
+
+ - Insert smock.mock.extra to all your repos in /etc/mock/ changing the
+   USERNAME, arch and distro name to match
+
+ - Copy smock.sh to smock and edit which arch(es) you want to build on
+
+ - Disable SELinux (/usr/sbin/setenforce Permissive) and you may
+   need to do 'chmod 0755 ~' to allow the web server to access your
+   home directory.
 
 Now you can run
 
     ./smock.sh fedora-9 /path/to/srpm
 
 
 Now you can run
 
     ./smock.sh fedora-9 /path/to/srpm
 
-And it'll build  the RPM against the fedora-9-XXX distro for each 'XXX' 
+And it'll build the RPM against the fedora-9-XXX distro for each 'XXX'
 arch you listed.
 
 The resulting src RPMs, binary RPMs and build logs wil be put into
 arch you listed.
 
 The resulting src RPMs, binary RPMs and build logs wil be put into
-$HOME/smock, and a YUM repo created. Further RPMs you build using
-smock will resolve the BuildRequires against this local repo
+$HOME/public_html/smock, and a Yum repo created.  Further RPMs you
+build using smock will resolve the BuildRequires against this local
+repo.
index e14f71e..1fe5f96 100644 (file)
@@ -1,8 +1,9 @@
+# Change USERNAME -> your username and install in
+# /etc/httpd/conf.d/smock.conf
 
 
+Alias /USERNAME-smock /home/USERNAME/public_html/smock
 
 
-Alias /smock /home/USERNAME/smock
-
-<Directory /home/USERNAME/smock>
-   Allow from all
+<Directory /home/USERNAME/public_html/smock>
+  Allow from all
   Options +Indexes
 </Directory>
   Options +Indexes
 </Directory>
diff --git a/smock/smock.mock.cfg b/smock/smock.mock.cfg
deleted file mode 100644 (file)
index 0fa4316..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-[smock]
-name=smock
-baseurl=http://127.0.0.1/smock/yum/fedora-9/i386
-enabled=1
-
diff --git a/smock/smock.mock.extra b/smock/smock.mock.extra
new file mode 100644 (file)
index 0000000..24c4640
--- /dev/null
@@ -0,0 +1,8 @@
+# Change USERNAME and if necessary the distribution name and
+# architecture, and INSERT this file to the relevant distributions
+# in /etc/mock (eg. to /etc/mock/fedora-9-i386.cfg etc.)
+
+[smock]
+name=smock
+baseurl=http://127.0.0.1/USERNAME-smock/yum/fedora-9/i386
+enabled=1
index 72b5e17..278a85d 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 
 
 #!/bin/sh
 
 
-LOCALREPO=$HOME/smock/yum
-#ARCHES="i386 x86_64"
-ARCHES=i386
+LOCALREPO=$HOME/public_html/smock/yum
+ARCHES="i386 x86_64"
+#ARCHES="i386"
 
 help() {
     echo "syntax: $0 DIST SRPM"
 
 help() {
     echo "syntax: $0 DIST SRPM"