Changeset 1273


Ignore:
Timestamp:
Mar 26, 2007, 7:37:17 PM (12 years ago)
Author:
bruno
Message:
  • On CentOS 4.4 mdrun isn't available anymore so init should use mdadm instead.

(based on a patch of Momtchil Momtchev <momtchil.momtchev_at_linagora.com>)

  • mkchangelog now supports an fc option for Fedora pkg genration
  • Try to improve Fedora official packages generation
Location:
branches/2.2.2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.2/mindi/rootfs/sbin/init

    r1236 r1273  
    309309StartRaids() {
    310310    local raid_devices i
     311
     312    raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1`
    311313    if which raidstart > /dev/null 2> /dev/null ; then
    312         raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1`
    313314        for i in $raid_devices ; do
    314315            if grep `basename $i` /proc/mdstat > /dev/null 2> /dev/null ; then
     
    322323        LogIt "Running 'mdrun'" 1
    323324        mdrun
     325    elif which mdadm > /dev/null 2> /dev/null ; then
     326        LogIt "Running 'mdadm'" 1
     327        for i in $raid_devices ; do
     328            if grep `basename $i` /proc/mdstat > /dev/null 2> /dev/null ; then
     329                LogIt "$i is started already; no need to run 'mdadm $i'" 1
     330            else
     331                LogIt "Running 'mdadm $i'" 1
     332                mdadm -Ac partitions -m dev $i
     333            fi
     334        done
    324335    else
    325336        LogIt "Warning: Neither 'raidstart' nor 'mdrun''found. RAID devices may not have started." 1
  • branches/2.2.2/tools/mkchangelog.pl

    r930 r1273  
    9696    $n2date = &UnixDate($date,"%a, %d %b %Y %H:%M:%S %z");
    9797    #print "**$ndate**\n";
    98     if ($dtype eq "rpm") {
     98    if (($dtype eq "rpm") || ($dtype eq "fc")) {
    9999        if ($ver !~ /-/) {
    100100            if ($first eq 1) {
     
    120120            print OUTPUT "  * $tmp";
    121121        }
    122         else {
     122        else if ($dtype eq "rpm") {
    123123            print OUTPUT "$tmp";
    124124        }
  • branches/2.2.2/tools/pkg2fc

    r1011 r1273  
    6161for p in $ppkg ; do
    6262    rpm -ivh \$p
     63    src=\`rpm -qlp \$p | grep -E '\.spec'\`
     64    spec=\`tar tvf rpm/SOURCES/\$src | grep -E "\$p-fc.spec"\`
     65    tar xf rpm/SOURCES/\$src \$spec
    6366    s=\`rpm -qlp \$p | egrep '\.spec'\`
     67    mv \$p-fc.spec rpm/SPECS/\$s
    6468    # Use dist for fc
    65     perl -pi -e "s/define Release:[ \t]+([0-9]+)..*/define Release: $1%{?dist}/" rpm/SPECS/\$s
     69    perl -pi -e "s/define Release:[ \t]+([0-9]+)..*/define Release: \$1%{?dist}/" rpm/SPECS/\$s
    6670    perl -pi -e 's/ Bruno Cornec <bruno@mondorescue.org>..*/ Bruno Cornec <bruno@mondorescue.org> %{version}-%{release}/' rpm/SPECS/\$s
    6771    rm -rf rpm/BUILD/*
     
    7983echo "Packages rebuild on ${DSTNODE}"
    8084ssh -q ${ACCOUNT} ${DSTNODE} "./mkmondo"
    81 ) 2>&1 | tee /tmp/pk2mdv.log
     85) 2>&1 | tee /tmp/pk2fc.log
  • branches/2.2.2/tools/svn2build

    r1236 r1273  
    8181            fi
    8282
     83            if [ $ddir = "fedora" ]; then
     84                $TOOLHOME/mkchangelog.pl fc $p $MONDOTMP/$p-fc.spec
     85                m4 $MONDOTMP/mondorescue.mc $inc $dest/distributions/rpm/$p.spec $MONDOTMP/$p-fc.spec > $dest/distributions/${ddir}-$dver/$p-fc.spec
     86            fi
    8387            $TOOLHOME/mkchangelog.pl $dtype $p $MONDOTMP/$p.spec
    8488            if [ $? -ne 0 ]; then
Note: See TracChangeset for help on using the changeset viewer.