Changeset 1652 in ProjectBuilder
- Timestamp:
- Oct 7, 2012, 7:54:06 PM (13 years ago)
- Location:
- devel
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/bin/pbdistrocheck
r1551 r1652 30 30 =head1 SYNOPSIS 31 31 32 pbdistrocheck [- d][-v][-l [-c][-i][-r][-a]][-s] [distro-ver-arch]32 pbdistrocheck [-h][-d][-v][-l [-c][-i][-r][-a]][-s] [distro-ver-arch] 33 33 34 34 =head1 OPTIONS 35 35 36 36 =over 4 37 38 =item B<-h|--help> 39 40 Prints this help 37 41 38 42 =item B<-v|--verbose> … … 42 46 =item B<-a|--all> 43 47 44 print all parameters48 Print all parameters 45 49 46 50 =item B<-s|--short> 47 51 48 generate a short format user friendly, comma separated allowing parsing52 Generate a short format user friendly, comma separated allowing parsing 49 53 50 54 =item B<-l|--lsb> 51 55 52 generate an LSB compliant output56 Generate an LSB compliant output 53 57 54 58 =item B<-d|--description> 55 59 56 print only description (LSB only)60 Print only description (LSB only) 57 61 58 62 =item B<-r|--release> 59 63 60 print only release (LSB only)64 Print only release (LSB only) 61 65 62 66 =item B<-c|--codename> 63 67 64 print only codename (LSB only)68 Print only codename (LSB only) 65 69 66 70 =item B<-i|--id> 67 71 68 print only distribution identificator (LSB only)72 Print only distribution identificator (LSB only) 69 73 70 74 =item B<-a|--all> 71 75 72 print all LSB fields76 Print all LSB fields 73 77 74 78 =back … … 76 80 =head1 ARGUMENTS 77 81 78 arguments are optional. If none given, analyzes the underlying operating system82 Arguments are optional. If none given, analyzes the underlying operating system 79 83 If one is given, it should have the format osname-version-architecture, and in that case pbdistrocheck will provide all the information related to that OS needed by pb. 80 84 … … 107 111 "verbose|v+" => \$opts{'v'}, 108 112 "short|s" => \$opts{'s'}, 113 "help|h" => \$opts{'h'}, 109 114 "description|d" => \$opts{'d'}, 110 115 "id|i" => \$opts{'i'}, -
devel/pb-modules/etc/pb.conf
r1651 r1652 301 301 # These deps are needed for rpmbootstrap to install a base distribution 302 302 # Originally reuse from rinse conf files 303 rbsmindep redhat-6.2 = MAKEDEV,SysVinit,authconfig,basesystem,bash,binutils,bzip2,chkconfig,console-tools,cracklib,cracklib-dicts,dev,dev86,diffutils,dhcpcd,e2fsprogs,file,filesystem,fileutils,findutils,gawk,gdbm,glib,glibc,gmp,grep,gzip,info,initscripts,iproute,iputils,kernel,krb5-configs,krb5-libs,ldconfig,ld.so,libc,libelf,libstdc++,libtermcap,logrotate,make,mingetty,mktemp,modutils,mount,newt,ncurses,net-tools,pam,passwd,patch,perl,popt,procps,psmisc,pwdb,python,readline,redhat-release,rpm,rpm-python,sed,setup,shadow-utils,sh-utils,slang,sysklogd,tar,tcsh,termcap,textutils,util-linux,vim-common,vim-minimal,vixie-cron,which,wget,xntp3,zlib 303 # For Rd Hat 6.2 perl is excluded as a manual install from http://www.cpan.org/src/5.0/perl-5.6.2.tar.gz is required 304 rbsmindep redhat-6.2 = MAKEDEV,SysVinit,authconfig,basesystem,bash,binutils,bzip2,chkconfig,console-tools,cracklib,cracklib-dicts,dev,dev86,diffutils,dhcpcd,e2fsprogs,file,filesystem,fileutils,findutils,gawk,gdbm,glib,glibc,gmp,grep,gzip,info,initscripts,iproute,iputils,kernel,krb5-configs,krb5-libs,ldconfig,ld.so,libc,libelf,libstdc++,libtermcap,logrotate,make,mingetty,mktemp,modutils,mount,newt,ncurses,net-tools,pam,passwd,patch,popt,procps,psmisc,pwdb,python,readline,redhat-release,rpm,rpm-build,rpm-python,sed,setup,shadow-utils,sh-utils,slang,sysklogd,tar,tcsh,termcap,textutils,util-linux,vim-common,vim-minimal,vixie-cron,which,wget,xntp3,zlib 304 305 # 305 306 rbsmindep fedora-4 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,chkconfig,coreutils,cracklib,cracklib-dicts,db4,device-mapper,e2fsprogs,elfutils-libelf,ethtool,expat,filesystem,findutils,gawk,gdbm,glib2,glibc,glibc-common,grep,info,initscripts,iproute,iputils,krb5-libs,libacl,libattr,libcap,libgcc,libidn,libselinux,libsepol,libstdc++,libtermcap,libxml2,libxml2-python,mingetty,mktemp,module-init-tools,ncurses,neon,net-tools,openssl,pam,pcre,popt,procps,psmisc,python,python-elementtree,python-sqlite,python-urlgrabber,readline,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,zlib -
devel/pb-modules/lib/ProjectBuilder/Base.pm
r1651 r1652 453 453 454 454 This function returns the architecture of our local environment and 455 standardize on i386 for those platforms. It also solves issues where a i386 VE on x86_64 returns x86_64 wrongly455 standardize on i386 for those platforms. 456 456 457 457 =cut -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r1651 r1652 132 132 # Initialize arch 133 133 $pbos->{'arch'} = pb_get_arch() if (not defined $pbos->{'arch'}); 134 # Solves a bug on Red Hat 6.x where real arch is not detected when using setarch and a chroot 135 # As it was only i386 forcing it here. 136 $pbos->{'arch'} = "i386" if (($pbos->{'name'} eq "redhat") && ($pbos->{'version'} =~ /^6\./)); 134 137 135 138 # Dig into the tuple to find the best answer … … 330 333 # Get dependencies in the build file if not forced 331 334 $deps = pb_distro_getdeps($f,$pbos) if (not defined $deps); 332 pb_log(1, "ftp_proxy=$ENV{ftp_proxy} http_proxy=$ENV{http_proxy}\n"); 335 pb_log(1, "ftp_proxy=$ENV{ftp_proxy}\n") if (defined $ENV{ftp_proxy}); 336 pb_log(1, "http_proxy=$ENV{http_proxy}\n") if (defined $ENV{http_proxy}); 333 337 pb_log(2,"deps: $deps\n"); 334 338 return if ((not defined $deps) || ($deps =~ /^\s*$/)); -
devel/pb/bin/pb
r1651 r1652 1477 1477 # Older Redhat use _target_platform in %configure incorrectly 1478 1478 my $specialdef = ""; 1479 if (($pbos->{'name'} eq "r edhat") || (($pbos->{'name'} eq "rhel") && ($pbos->{'version'} eq "2.1"))) {1479 if (($pbos->{'name'} eq "rhel") && ($pbos->{'version'} eq "2.1")) { 1480 1480 $specialdef = "--define \'_target_platform \"\"\'"; 1481 } 1482 my $buildcmd = "rpmbuild"; 1483 if (($pbos->{'name'} eq "redhat") && ($pbos->{'version'} =~ /^6/)){ 1484 $buildcmd = "rpm" ; 1481 1485 } 1482 1486 … … 1485 1489 # This could cause an issue in // mode 1486 1490 pb_distro_installdeps($f,$pbos); 1487 pb_system(" rpmbuild $specialdef --define \"packager $ENV{'PBPACKAGER'}\" --define \"_topdir $ENV{'PBBUILDDIR'}\" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}","verbose");1491 pb_system("$buildcmd $specialdef --define \"packager $ENV{'PBPACKAGER'}\" --define \"_topdir $ENV{'PBBUILDDIR'}\" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}","verbose"); 1488 1492 last; 1489 1493 } … … 2343 2347 if ($cmt =~ /^VE/) { 2344 2348 my $res = pb_system("$shcmdroot sed -i '/requiretty/d' /etc/sudoers","Removing potential requiretty in sudoers","quiet"); 2345 pb_system("$shcmdroot sed '/requiretty/d' /etc/sudoers > /tmp/sudoers.new ; mv /tmp/sudoers.new $tpdir/tmp/sudoers.new ; $shcmdroot mv /tmp/sudoers.new /etc/sudoers ","Removing again potential requiretty in sudoers as sed -i failed") if (($res ne 0) && (-f "$tpdir/etc/sudoers"));2349 pb_system("$shcmdroot sed '/requiretty/d' /etc/sudoers > /tmp/sudoers.new ; mv /tmp/sudoers.new $tpdir/tmp/sudoers.new ; $shcmdroot mv /tmp/sudoers.new /etc/sudoers ; $shcmdroot chown root:root /etc/sudoers ; $shcmdroot chmod 440 /etc/sudoers","Removing again potential requiretty in sudoers as sed -i failed") if (($res ne 0) && (-f "$tpdir/etc/sudoers")); 2346 2350 pb_system("$shcmd \"sudo $chowncommand -R $mac $tdir\"","Adapt owner in $tdir to $mac"); 2347 2351 } … … 2369 2373 pb_system("$cpcmd $cp2target/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}-$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$ 2> /dev/null","Get package names in $cp2target"); 2370 2374 if (not -f "$ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$") { 2371 pb_log(0,"ERROR with VM/RM $v on getting $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$ ");2375 pb_log(0,"ERROR with VM/RM $v on getting $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$\n"); 2372 2376 } else { 2373 2377 open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen-$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.$$"; … … 2466 2470 # in $ENV{'PBDESTDIR'}/pbscript.$$ 2467 2471 if ((defined $pbscript ) && ($pbscript ne "$ENV{'PBDESTDIR'}/pbscript.$$")) { 2468 copy($pbscript,"$ENV{'PBDESTDIR'}/pbscript.$$") || die "Unable to create $ENV{'PBDESTDIR'}/pbscript.$$ ";2472 copy($pbscript,"$ENV{'PBDESTDIR'}/pbscript.$$") || die "Unable to create $ENV{'PBDESTDIR'}/pbscript.$$ from $pbscript"; 2469 2473 chmod 0755,"$ENV{'PBDESTDIR'}/pbscript.$$"; 2470 2474 } … … 2763 2767 if ($action eq "build") { 2764 2768 print SCRIPT "# Preparation for pb\n"; 2769 print SCRIPT "rm -f \$HOME/.pbrc\n"; 2765 2770 print SCRIPT "mv .pbrc \$HOME\n"; 2766 2771 print SCRIPT "cd ..\n"; … … 3299 3304 print PBOUT "Defaults:$pbac->{$ENV{'PBPROJ'}} !requiretty\n"; 3300 3305 print PBOUT "Defaults:root !requiretty\n"; 3306 EOF 3307 # RH 6.2 sudo doesn't support env_keep 3308 if (($pbos->{'name'} ne "redhat") && ($pbos->{'version'} ne "6.2")) { 3309 print SCRIPT << "EOF"; 3301 3310 # Keep proxy configuration while using sudo 3302 3311 print PBOUT "Defaults:$pbac->{$ENV{'PBPROJ'}} env_keep += \\\"http_proxy ftp_proxy\\\"\n"; 3303 3312 print PBOUT "Defaults:root env_keep += \\\"http_proxy ftp_proxy\\\"\n"; 3304 3313 EOF 3314 } 3305 3315 # Try to restrict security to what is really needed 3306 3316 if ($vtype =~ /^vm/) { -
devel/rpmbootstrap/bin/rpmbootstrap
r1645 r1652 449 449 unlink("$vepath/tmp/$p1"); 450 450 } 451 # RedHat 6.2 has a buggy termcap setup 452 } elsif ( $pbos->{'name'} =~ /redhat/) {451 # RedHat 6.2 has a buggy termcap setup and doesn't support usage of setarch, so still returns x86_64 in a chroot 452 } elsif (($pbos->{'name'} =~ /redhat/) && ( $pbos->{'version'} =~ /^6/)) { 453 453 pb_system("chroot $vepath ldconfig","Forcing ldconfig on $pbos->{'name'} $pbos->{'version'}"); 454 pb_system("chroot $vepath echo 'arch_canon: x86_64: x86_64 1' >> /etc/rpmrc","Forcing ldconfig on $pbos->{'name'} $pbos->{'version'}"); 455 pb_system("chroot $vepath echo 'arch_compat: x86_64: i386' >> /etc/rpmrc","Forcing ldconfig on $pbos->{'name'} $pbos->{'version'}"); 456 pb_system("chroot $vepath echo 'buildarch_compat: x86_64: i386' >> /etc/rpmrc","Forcing ldconfig on $pbos->{'name'} $pbos->{'version'}"); 457 pb_system("chroot $vepath echo 'buildarchtranslate: x86_64: i386' >> /etc/rpmrc","Forcing ldconfig on $pbos->{'name'} $pbos->{'version'}"); 454 458 } 455 459 # -
devel/rpmbootstrap/etc/.pbrc
r1078 r1652 41 41 #velist default = mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,mandriva-2008.1-i386,mandriva-2009.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-i386,fedora-7-i386,fedora-8-i386,fedora-9-i386,fedora-10-i386,rhel-2.1-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,suse-10.0-i386,suse-10.1-i386,suse-10.2-i386,suse-10.3-i386,sles-9-i386,sles-10-i386,gentoo-nover-i386,debian-3.1-i386,debian-4.0-i386,ubuntu-6.06-i386,ubuntu-7.04-i386,ubuntu-7.10-i386,ubuntu-8.04-i386,mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,mandriva-2008.1-x86_64,mandriva-2009.0-x86_64,fedora-6-x86_64,fedora-7-x86_64,fedora-8-x86_64,fedora-9-x86_64,fedora-10-x86_64,rhel-4-x86_64,rhel-5-x86_64,suse-10.2-x86_64,suse-10.3-x86_64,sles-10-x86_64,gentoo-nover-x86_64,debian-4.0-x86_64,ubuntu-7.04-x86_64,ubuntu-7.10-x86_64,rhel-3-ia64,centos-4-i386,centos-5-i386,centos-4-x86_64,centos-5-x86_64 42 42 #velist default = centos-4-i386,centos-5-i386,centos-4-x86_64,centos-5-x86_64 43 velist default = centos-4-i386,centos-5-i386,centos-4-x86_64,centos-5-x86_64,debian-5.0-i386,debian-5.0-x86_64,lsb-3.2.0-i386,lsb-3.2.0-x86_64,lsb-4.0.1-i386,lsb-4.0.1-x86_64,mandriva-2010.0-x86_64, ubuntu-10.04-x86_64,mandriva-2010.1-x86_6443 velist default = centos-4-i386,centos-5-i386,centos-4-x86_64,centos-5-x86_64,debian-5.0-i386,debian-5.0-x86_64,lsb-3.2.0-i386,lsb-3.2.0-x86_64,lsb-4.0.1-i386,lsb-4.0.1-x86_64,mandriva-2010.0-x86_64,mandriva-2010.1-x86_64,redhat-6.2-i386,ubuntu-10.04-x86_64
Note:
See TracChangeset
for help on using the changeset viewer.