Changeset 391


Ignore:
Timestamp:
Apr 16, 2008, 3:24:40 PM (11 years ago)
Author:
bruno
Message:
  • pb: pod content for Distribution.pm and man page delivery
  • dploy: improved pb setup in progress
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/Makefile.PL

    r338 r391  
    1818    EXE_FILES     => [ qw( bin/pb bin/pbg bin/pbvi bin/pbdistrocheck ) ],
    1919    MAN1PODS      => { 'bin/pb' => '$(INST_MAN1DIR)/pb.$(MAN1EXT)', },
     20    MAN3PODS      => { 'lib/ProjectBuilder/Distribution.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Distribution.$(MAN3EXT)', },
    2021);
  • devel/pb/lib/ProjectBuilder/Distribution.pm

    r329 r391  
    1919our @ISA = qw(Exporter);
    2020our @EXPORT = qw(pb_distro_init pb_get_distro);
     21
     22=pod
     23
     24=head1 NAME
     25
     26ProjectBuilder::Distribution, part of the project-builder.org - module dealing with distribution detection
     27
     28=head1 DESCRIPTION
     29
     30This modules provides functions to allow detection of Linux distributions, and giving back some attributes concerning them.
     31
     32=head1 SYNOPSIS
     33
     34  use ProjectBuilder::Distribution;
     35
     36  #
     37  # Return information on the running distro
     38  #
     39  my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init();
     40  print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf)."\n";
     41  #
     42  # Return information on the requested distro
     43  #
     44  my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init("ubuntu","7.10");
     45  print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf)."\n";
     46  #
     47  # Return information on the running distro
     48  #
     49  my ($ddir,$dver) = pb_get_distro();
     50  my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init($ddir,$dver);
     51  print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf)."\n";
     52
     53=head1 USAGE
     54
     55=over 4
     56
     57=item B<pb_get_distro>
     58
     59This function returns a list of 2 parameters indicating the distribution name and version of the underlying Linux distribution. The value of those 2 fields may be "unknown" in case the function was unable to recognize on which distribution it is running.
     60
     61On my home machine it would currently report ("mandriva","2008.0").
     62
     63=item B<pb_distro_init>
     64
     65This function returns a list of 5 parameters indicating the distribution name, version, family, type of build system and suffix of packages of the underlying Linux distribution. The value of the 5 fields may be "unknown" in case the function was unable to recognize on which distribution it is running.
     66
     67As an example, Ubuntu and Debian are in the same "du" family. As well as RedHat, RHEL, CentOS, fedora are on the same "rh" family.
     68Mandriva, Open SuSE and Fedora have all the same "rpm" type of build system. Ubuntu ad Debian have the same "deb" type of build system.
     69And "fc" is the extension generated for all Fedora packages (Version will be added by pb).
     70
     71When passing the distribution name and version as parameters, the B<pb_distro_init> function returns the parameter of that distribution instead of the underlying one.
     72
     73=back
     74
     75=head1 WEB SITES
     76
     77The main Web site of the project is available at L<http://www.project-builder.org/>. Bug reports should be filled using the trac instance of the project at L<http://trac.project-builder.org/>.
     78
     79=head1 USER MAILING LIST
     80
     81None exists for the moment.
     82
     83=head1 AUTHORS
     84
     85The Project-Builder.org team L<http://trac.project-builder.org/> lead by Bruno Cornec L<mailto:bruno@project-builder.org>.
     86
     87=head1 COPYRIGHT
     88
     89Project-Builder.org is distributed under the GPL v2.0 license
     90described in the file C<COPYING> included with the distribution.
     91
     92=cut
     93
    2194
    2295sub pb_distro_init {
     
    115188# Tested
    116189    'gentoo'            =>  'gentoo-release',       # >= 1.6
    117     'debian'            =>  'debian_version',       # >= 3.1
    118190    'slackware'         =>  'slackware-version',    # >= 10.2
    119191    'mandriva'          =>  'mandriva-release',     # >=2006.0
     
    153225my %ambiguous_rel_files = (
    154226    'mandrake'          =>  'mandrake-release',     # <= 10.1
     227    'debian'            =>  'debian_version',       # >= 3.1
    155228    'suse'              =>  'SuSE-release',         # >= 10.0
    156229    'redhat'            =>  'redhat-release',       # >= 7.3
     
    162235my %distro_similar = (
    163236    'mandrake'          => ['mandrake', 'mandrakelinux'],
     237    'debian'            => ['debian', 'ubuntu'],
    164238    'suse'              => ['suse', 'sles', 'opensuse'],
    165239    'redhat'            => ['redhat', 'rhel', 'centos', 'mandrake', 'vmware'],
     
    183257    'suse'                  => 'SUSE LINUX (\d.+) \(',
    184258    'opensuse'              => 'openSUSE (\d.+) \(',
    185     'debian'                => '(.+)',
    186259    'lsb'                   => '.*[^Ubunt].*\nDISTRIB_RELEASE=(.+)',
    187260# Ubuntu 6.06 includes a /etc/debian_version file that needs to be
     
    190263# Same is true for Ubuntu 7.10 :-(
    191264    'ubuntu'                => '.*Ubuntu.*\nDISTRIB_RELEASE=(.+)',
     265    'debian'                => '(.+)',
    192266# Not tested
    193267    'arch'                  => '.* ([0-9.]+) .*',
     
    198272my $distro;
    199273
    200 # Begin to test presence of non-amiguous files
     274# Begin to test presence of non-ambiguous files
    201275# that way we reduce the choice
    202276my ($d,$r);
  • pbconf/devel/project-builder/rpm/project-builder.spec

    r359 r391  
    5656%{_bindir}/*
    5757%{_mandir}/man1/*
     58%{_mandir}/man3/*
    5859
    5960%changelog
  • projects/dploy/pbconf/devel/dploy-common/rpm/dploy-common.spec

    r388 r391  
    2525%setup -q
    2626
     27%build
     28%{__perl} Makefile.PL INSTALLDIRS=vendor PBKEYWORD=${RPM_BUILD_ROOT}/PBFINALDIR
     29make
     30
    2731%install
    2832%{__rm} -rf $RPM_BUILD_ROOT
     
    3034export PREFIX=%{_exec_prefix}
    3135export CONFDIR=%{_sysconfdir}/PBPROJ
     36make DESTDIR=$RPM_BUILD_ROOT install
    3237./install.sh
     38find ${RPM_BUILD_ROOT} -name perllocal.pod | xargs rm -f
     39
    3340
    3441%clean
     
    3845%defattr(-,dploy,dploy)
    3946%doc ChangeLog
    40 #%doc INSTALL COPYING README AUTHORS NEWS
    4147%config(noreplace) %{_sysconfdir}/PBPROJ
     48%doc NEWS AUTHORS
     49%doc INSTALL COPYING README
     50
     51%{perlvendorlib}/*
     52#%{_bindir}/*
     53#%{_mandir}/man1/*
     54%{_mandir}/man3/*
    4255
    4356%pre
  • projects/dploy/pbconf/devel/dploy.pb

    r388 r391  
    55# $Id$
    66#
    7 
    87#
    9 # Which CMS system is used (Subversion, CVS or tar file content extracted)
    10 #
    11 cms dploy = svn
    12 #cms dploy = cvs
    13 #cms dploy = flat
     8pburl dploy = svn+ssh://dploy@svn.dploy.org@HEAD/
    149
    1510#
    1611# Packager label
    1712#
    18 packager dploy = "Bruno Cornec <bruno@dploy.org>"
     13pbpackager dploy = "Bruno Cornec <bruno@dploy.org>"
    1914#
    2015
     
    3429# a QEMU rhel_3 here means that the VM will be named rhel_3.qemu
    3530#
    36 vmlist dploy = mandrake_10.1,mandrake_10.2,mandriva_2006.0,mandriva_2007.0,mandriva_2007.1,mandriva_2008.0,redhat_7.3,redhat_9,fedora_4,fedora_5,fedora_6,fedora_7,rhel_3,rhel_4,rhel_5,suse_10.0,suse_10.1,suse_10.2,suse_10.3,sles_9,sles_10,gentoo_nover,debian_3.1,debian_4.0,ubuntu_6.06,ubuntu_7.04,ubuntu_7.10
     31vmlist dploy = mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-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,mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,fedora-6-x86_64,fedora-8-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
    3732
    3833#
     
    8782# Files are mentioned relatively to pbroot/defpkgdir
    8883filteredfiles dploy-dhcp = install.sh,bin/dploy-add2dhcp
    89 filteredfiles dploy-common = install.sh
     84filteredfiles dploy-pxe = bin/dploy-add2pxe
     85filteredfiles dploy-common = install.sh,Makefile.PL
    9086#filteredfiles pkg1-doc = configure.in
  • projects/dploy/pbconf/devel/pbfilter/rpm.pbf

    r388 r391  
    1818filter PBOBS =
    1919
     20# Special for pb : MakeMaker has various variable for the dest dir
     21filter PBKEYWORD = destdir
     22filter PBFINALDIR =
     23
Note: See TracChangeset for help on using the changeset viewer.