Changes between Version 1 and Version 2 of NightlyBuildBot


Ignore:
Timestamp:
08/06/09 20:52:50 (15 years ago)
Author:
zaytsev
Comment:

Update for EL4

Legend:

Unmodified
Added
Removed
Modified
  • NightlyBuildBot

    v1 v2  
    1616 * patched nss & co for EL5 i386 targets 
    1717 * bleeding edge mock 
    18  * dynamically patch the SPEC to use PCRE for EL targets 
    1918 
    20 Most of this stuff is readily available for you at the [http://infrastructure.fedoraproject.org/ Fedora Infrastructure] repos, because they still use a certain amount of EL5 builders. Be warned, however, that you need a certain amount of knowledge to go this route, so if you don't mind accidentally blowing up your machine, just go ahead. 
     19Most of this stuff is readily available for you at the [http://infrastructure.fedoraproject.org/ Fedora Infrastructure] repos, because they still use a certain number of EL5 builders. Be warned, however, that you need a certain amount of knowledge to go this route, so if you don't mind accidentally blowing up your machine, just go ahead. 
    2120 
    2221The script we use is given below for your convenience (public domain). Feel free to adjust it to suit your system. If you find a potential flaw or want to contribute an enhancement feel free to get in touch with the buildhost maintainer. 
     
    3029PATH_SOURCE=$PATH_BASE/mc-git 
    3130PATH_TEMP=$PATH_BASE/mc-temp 
    32 PATH_RPM=/home/buildbot/src/rpm 
     31PATH_RPM=/home/src/rpm 
    3332PATH_MOCK=/var/lib/mock 
    3433 
    35 BUILD_ARCH="epel-5-i386 epel-5-x86_64 fedora-11-i386 fedora-11-x86_64 fedora-10-i386 fedora-10-x86_64" 
     34BUILD_ARCH="epel-4-i386 epel-4-x86_64 epel-5-i386 epel-5-x86_64 fedora-10-i386 fedora-10-x86_64 fedora-11-i386 fedora-11-x86_64" 
    3635 
    3736echo Suck git updates... 
     
    4443mkdir $PATH_UPLOAD 
    4544 
     45echo Clone source tree... 
     46rm -rf $PATH_TEMP 
     47cp -r $PATH_SOURCE $PATH_TEMP 
     48echo Done! 
     49 
     50echo Make dist 
     51cd $PATH_TEMP 
     52./autogen.sh 
     53./configure 
     54make -j 2 dist 
     55echo Done! 
     56 
    4657for i in $BUILD_ARCH; 
    4758do 
    48  
    49     echo Clone source tree... 
    50     rm -rf $PATH_TEMP 
    51     cp -r $PATH_SOURCE $PATH_TEMP 
    52     echo Done! 
    53  
    54     echo Patching SPEC... 
    55     cd $PATH_BASE 
    56     if [[ "$i" =~ "epel" ]] 
    57     then 
    58         patch -p0 < mc-zyv-spec.patch 
    59     fi 
    60     echo Done! 
    61  
    62     echo Make dist 
    63     cd $PATH_TEMP 
    64     ./autogen.sh 
    65     ./configure 
    66     make -j 2 dist 
    67     echo Done! 
    6859     
    6960    echo Removing old stuff 
     
    7667    cp mc-*.tar.gz $PATH_RPM/SOURCES 
    7768    cp ./contrib/dist/redhat/mc.spec $PATH_RPM/SPECS     
    78     rpmbuild -bs $PATH_RPM/SPECS/mc.spec 
     69 
     70    if [[ "$i" =~ "epel-4" ]]; then 
     71        rpmbuild -bs $PATH_RPM/SPECS/mc.spec --define="dist .el4" --define="el4 1" 
     72    else 
     73        rpmbuild -bs $PATH_RPM/SPECS/mc.spec     
     74    fi 
     75 
    7976    echo Done! 
    8077 
     
    8380    echo Building $i... 
    8481    mkdir $PATH_UPLOAD/$i 
    85     mock $MC_RPM -r $i 
     82    mock $MC_RPM --define="packager John Doe <john@doe.com>" -r $i 
    8683    cp $PATH_MOCK/$i/result/*.rpm $PATH_UPLOAD/$i 
    8784    cp $PATH_MOCK/$i/result/build.log $PATH_UPLOAD/$i 
     
    9188done 
    9289 
     90for i in `find $PATH_UPLOAD -type f`; 
     91do 
     92    sha1sum $i >>$PATH_UPLOAD/sha1sums 
     93done 
     94 
    9395HOME=$PATH_BASE weex mc 
    9496 
    9597}}} 
    9698 
    97 == mc-zyv-spec.patch == 
     99== glib2-CVE-2008-4316.patch == 
     100 
    98101{{{ 
    99 --- mc-temp/contrib/dist/redhat/mc.spec.in        2009-07-04 00:57:19.000000000 +0400 
    100 +++ mc-temp/contrib/dist/redhat/mc.spec.in        2009-07-04 00:53:46.000000000 +0400 
    101 @@ -22,7 +22,7 @@ 
    102  Source0:   mc-%{ver}.tar.gz 
    103  URL:       http://www.midnight-commander.org/ 
    104  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
    105 -BuildRequires: glib2-devel e2fsprogs-devel slang-devel 
    106 +BuildRequires: glib2-devel e2fsprogs-devel slang-devel pcre-devel 
     102diff -up glib-2.12.3/glib/gbase64.c.CVE-2008-4316 glib-2.12.3/glib/gbase64.c 
     103--- glib-2.12.3/glib/gbase64.c.CVE-2008-4316        2006-07-05 12:42:18.000000000 -0400 
     104+++ glib-2.12.3/glib/gbase64.c        2009-03-09 11:48:11.161822330 -0400 
     105@@ -54,8 +54,9 @@ static const char base64_alphabet[] = 
     106  * 
     107  * The output buffer must be large enough to fit all the data that will 
     108  * be written to it. Due to the way base64 encodes you will need 
     109- * at least: @len * 4 / 3 + 6 bytes. If you enable line-breaking you will 
     110- * need at least: @len * 4 / 3 + @len * 4 / (3 * 72) + 7 bytes. 
     111+ * at least: (@len / 3 + 1) * 4 + 4 bytes (+ 4 may be needed in case of 
     112+ * non-zero state). If you enable line-breaking you will need at least: 
     113+ * ((@len / 3 + 1) * 4 + 4) / 72 + 1 bytes of extra space. 
     114  * 
     115  * @break_lines is typically used when putting base64-encoded data in emails. 
     116  * It breaks the lines at 72 columns instead of putting all of the text on  
     117@@ -220,8 +221,13 @@ g_base64_encode (const guchar *data,  
     118   gint state = 0, outlen; 
     119   gint save = 0; 
    107120  
    108  %description 
    109  GNU Midnight Commander is a visual file manager.  It's a feature rich 
     121-  /* We can use a smaller limit here, since we know the saved state is 0 */ 
     122-  out = g_malloc (len * 4 / 3 + 4); 
     123+  /* We can use a smaller limit here, since we know the saved state is 0, 
     124+     +1 is needed for trailing \0, also check for unlikely integer overflow */ 
     125+  if (len >= ((G_MAXSIZE - 1) / 4 - 1) * 3) 
     126+    g_error ("%s: input too large for Base64 encoding (%"G_GSIZE_FORMAT" chars)", 
     127+             G_STRLOC, len); 
     128+ 
     129+  out = g_malloc ((len / 3 + 1) * 4 + 1); 
     130   outlen = g_base64_encode_step (data, len, FALSE, out, &state, &save); 
     131   outlen += g_base64_encode_close (FALSE, 
     132                                    out + outlen,  
     133@@ -264,7 +270,8 @@ static const unsigned char mime_base64_r 
     134  * 
     135  * The output buffer must be large enough to fit all the data that will 
     136  * be written to it. Since base64 encodes 3 bytes in 4 chars you need 
     137- * at least: @len * 3 / 4 bytes. 
     138+ * at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero 
     139+ * state). 
     140  *  
     141  * Return value: The number of bytes of output that was written 
     142  * 
     143@@ -338,12 +345,15 @@ g_base64_decode (const gchar *text, 
     144                  gsize       *out_len) 
     145 { 
     146   guchar *ret; 
     147-  gint inlen, state = 0; 
     148+  gsize inlen; 
     149+  gint state = 0; 
     150   guint save = 0; 
     151    
     152   inlen = strlen (text); 
     153-  ret = g_malloc0 (inlen * 3 / 4); 
     154 
     155+  /* We can use a smaller limit here, since we know the saved state is 0, 
     156+     +1 used to avoid calling g_malloc0(0), and hence retruning NULL */ 
     157+  ret = g_malloc0 ((inlen / 4) * 3 + 1); 
     158+ 
     159   *out_len = g_base64_decode_step (text, inlen, ret, &state, &save); 
     160    
     161   return ret;  
    110162}}}