From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Wed, 24 Sep 2008 10:52:55 +0000 (+0100) Subject: Add 'build-everything' script, update smock and documentation. X-Git-Url: http://git.annexia.org/?p=fedora-mingw.git;a=commitdiff_plain;h=3d2e33bc4c25b39c083e7f811cebeaa2602b2884;ds=sidebyside Add 'build-everything' script, update smock and documentation. --- diff --git a/README b/README index 53ece8e..7544230 100644 --- a/README +++ b/README @@ -8,7 +8,22 @@ Other useful information: * 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 diff --git a/build-everything-in-mock.sh b/build-everything-in-mock.sh new file mode 100755 index 0000000..6b079ad --- /dev/null +++ b/build-everything-in-mock.sh @@ -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 diff --git a/show-build-order.pl b/show-build-order.pl index a182d85..a922111 100755 --- a/show-build-order.pl +++ b/show-build-order.pl @@ -58,6 +58,7 @@ sub main { 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. @@ -102,7 +103,7 @@ sub main { 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; } } @@ -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"; - 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"; - 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; } diff --git a/smock/README b/smock/README index b670973..6a4a235 100644 --- a/smock/README +++ b/smock/README @@ -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. + - Create directory $HOME/public_html/smock + - 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 -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 -$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. diff --git a/smock/smock.httpd.conf b/smock/smock.httpd.conf index e14f71e..1fe5f96 100644 --- a/smock/smock.httpd.conf +++ b/smock/smock.httpd.conf @@ -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 - - - Allow from all + + Allow from all Options +Indexes diff --git a/smock/smock.mock.cfg b/smock/smock.mock.cfg deleted file mode 100644 index 0fa4316..0000000 --- a/smock/smock.mock.cfg +++ /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 index 0000000..24c4640 --- /dev/null +++ b/smock/smock.mock.extra @@ -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 diff --git a/smock/smock.sh b/smock/smock.sh index 72b5e17..278a85d 100755 --- a/smock/smock.sh +++ b/smock/smock.sh @@ -1,9 +1,9 @@ #!/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"