Changeset 171 in ProjectBuilder for devel/pb


Ignore:
Timestamp:
Oct 4, 2007, 11:44:59 PM (17 years ago)
Author:
Bruno Cornec
Message:

Mandrakelinux 2006.0 has a mandrakeliux-release file which is a link. So creation of a new entry for a mandrakelinux ddir which is then modified in mandrake after detection

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/contrib/pbsetupqemu

    r169 r171  
    2121chmod 0644,$file;
    2222
    23 # Sync date
    24 system "/usr/sbin/ntpdate ntp.home.musique-ancienne.org";
    25 
    2623$file="/etc/passwd";
    2724open(PBFILE,$file) || die "Unable to open $file";
     
    3633        mkdir "/home";
    3734    }
    38     system "useradd pb";
     35    system "useradd pb -d /home/pb";
    3936}
     37
     38chdir "/home/pb";
     39mkdir ".ssh",0700;
     40system 'cp /tmp/pbkey .ssh/authorized_keys';
     41chmod 0600,".ssh/authorized_keys";
     42system 'chown -R pb:pb .ssh';
    4043
    4144# No passwd for pb only keys
     
    6871chmod 0440,$file;
    6972
    70 system 'su - pb -c "mkdir -p .ssh ; chmod 700 .ssh ; cp /tmp/pbkey .ssh/authorized_keys ; chmod 600 .ssh/authorized_keys"';
    7173unlink "/tmp/pbkey";
    7274
     
    8385        $opt="--exclude=*.i?86";
    8486    }
     87
     88    my $topbuilddir=`rpmquery --eval '%{_topdir}' 2> /dev/null`;
     89    chomp($topbuilddir);
     90
     91    my $p = `rpm -q afio`;
     92    chomp($p);
     93    if ($p !~ /^afio/) {
     94        system "rm -f afio-* ; wget ftp://ftp.mondorescue.org/src/afio-2.4.7-1.src.rpm ; rpm -ivh afio-2.4.7-1.src.rpm ; rpmbuild -ba $topbuilddir/SPECS/afio.spec ; chmod 644 $topbuilddir/RPMS/*/*.rpm";
     95    }
     96    $p = `rpm -q buffer`;
     97    chomp($p);
     98    if ($p !~ /^buffer/) {
     99        system "rm -f buffer-* ; wget ftp://ftp.mondorescue.org/src/buffer-1.19-1.src.rpm ; rpm -ivh buffer-1.19-1.src.rpm ; rpmbuild -ba $topbuilddir/SPECS/buffer.spec ; chmod 644 $topbuilddir/RPMS/*/*.rpm";
     100    }
    85101    if ( $dver <= 4 ) {
    86         # FC4
     102        # FC4 - AppConfig unavailable
    87103        system "yum -y $opt install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch cdrecord mkisofs perl-DateManip ntp ; rm -rf AppConfig-* ; wget http://search.cpan.org/CPAN/authors/id/A/AB/ABW/AppConfig-1.66.tar.gz ; tar xvfz AppConfig-1.66.tar.gz ; cd AppConfig* ; perl Makefile.PL ; make ; make install ; cd ..";
    88104    } else {
     
    91107    }
    92108} elsif ( $dfam eq "md" ) {
    93     system "urpmi --auto-select neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch mindi mondo mkisofs cdrecord ntp-client perl-AppConfig perl-DateManip";
     109    if (( $dver eq "2006.0" ) || ( $dver eq "10.2" ) || ( $dver eq "10.1" )) {
     110        # mondo not available
     111        system "urpmi.update -a ; urpmi --auto neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch mkisofs cdrecord ntp-client perl-AppConfig perl-DateManip";
     112    } else {
     113        system "urpmi.update -a ; urpmi --auto neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch mondo mkisofs cdrecord ntp-client perl-AppConfig perl-DateManip";
     114    }
    94115} elsif ( $dfam eq "du" ) {
    95116    system "apt-get install autoconf automake libtool g++ wget patch mondo groff imagemagick docbook-utils docbook2x docbook-to-man openssh-server dpkg-dev debian-builder dh-make fakeroot libnewt-dev ntp-client libncurses5-dev";
     
    99120    print "No pkg to install\n";
    100121}
     122
     123# Sync date
     124system "/usr/sbin/ntpdate ntp.home.musique-ancienne.org";
    101125
    102126# Patch AppConfig
  • devel/pb/lib/ProjectBuilder/Distribution.pm

    r156 r171  
    1919($ddir,$dver) = pb_get_distro() if ((not defined $ddir) || (not defined $dver));
    2020
    21 # There shold be unicity of names between ddir dfam and dtype
     21# There should be unicity of names between ddir dfam and dtype
    2222# In case of duplicate, bad things can happen
    2323if (($ddir =~ /debian/) ||
     
    6060    }
    6161} elsif (($ddir =~ /mandrake/) ||
     62        ($ddir =~ /mandrakelinux/) ||
    6263        ($ddir =~ /mandriva/)) {
    6364    $dfam="md";
    6465    $dtype="rpm";
     66    if ($ddir =~ /mandrakelinux/) {
     67        $ddir = "mandrake";
     68    }
    6569    if ($ddir =~ /mandrake/) {
    6670        my $dver1 = $dver;
     
    100104    'slackware'         =>  'slackware-version',    # >= 10.2
    101105    'mandriva'          =>  'mandriva-release',     # >=2006.0
     106    'mandrakelinux'     =>  'mandrakelinux-release',# = 10.2
    102107    'fedora'            =>  'fedora-release',       # >= 4
    103108    'vmware'            =>  'vmware-release',       # >= 3
     
    133138# List of files that ambiguously indicates what distro we have
    134139my %ambiguous_rel_files = (
    135     'mandrake'          =>  'mandrake-release',     # >= 10.1
     140    'mandrake'          =>  'mandrake-release',     # <= 10.1
    136141    'suse'              =>  'SuSE-release',         # >= 10.0
    137142    'redhat'            =>  'redhat-release',       # >= 7.3
     
    142147# If ambiguity, which other distributions should be checked
    143148my %distro_similar = (
    144     'mandrake'          => ['mandrake'],
     149    'mandrake'          => ['mandrake', 'mandrakelinux'],
    145150    'suse'              => ['suse', 'sles'],
    146151    'redhat'            => ['redhat', 'rhel', 'centos', 'mandrake', 'vmware'],
     
    154159    'slackware'             => 'S[^ ]* (.+)$',
    155160# There should be no ambiguity between potential ambiguous distro
     161    'mandrakelinux'         => 'Mandrakelinux release (.+) \(',
    156162    'mandrake'              => 'Mandr[^ ]* release (.+) \(',
    157163    'mandriva'              => 'Mandr[^ ]* [^ ]* release (.+) \(',
     
    177183my ($d,$r);
    178184while (($d,$r) = each %single_rel_files) {
    179     if (-f "$base/$r" && !-l "$base/$r") {
     185    if (-f "$base/$r" && ! -l "$base/$r") {
    180186        my $tmp=pb_get_content("$base/$r");
    181187        # Found the only possibility.
Note: See TracChangeset for help on using the changeset viewer.