- Timestamp:
- Oct 24, 2017, 12:49:59 AM (7 years ago)
- Location:
- devel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/etc/pb.yml
r2324 r2333 57 57 # OEL 58 58 oel: /etc/oracle-release 59 60 # Alpine 61 alpine: /etc/alpine-release 59 62 60 63 # HP-UX … … 148 151 redhat: Red Hat Linux release (.+) \( 149 152 cloudlinux: CloudLinux Server release (.+) \( 153 alpine: (\d)\.[0-9.]* 150 154 # If you want to differentiate .release for Scientific 151 155 #scilinux: Scientific Linux release ([0-9\.]+)\b … … 197 201 mandriva: md 198 202 mageia: md 203 alpine: alp 199 204 lsb: rh 200 205 freebsd: bsd … … 214 219 sol: pkg 215 220 hpux: sd 221 alp: apk 216 222 217 223 # Group ostype by os … … 222 228 ebuild: linux 223 229 rpm: linux 230 apk: linux 224 231 port: bsd 225 232 pkg: solaris … … 251 258 novell: sudo /usr/bin/zypper refresh ; sudo /usr/bin/zypper --gpg-auto-import-keys -n update --auto-agree-with-licenses 252 259 redhat: /bin/true 260 apk: sudo apk add -U 253 261 sol: /bin/true 254 262 lsb: /bin/true … … 277 285 novell: sudo /usr/bin/zypper refresh ; sudo /usr/bin/zypper --gpg-auto-import-keys -n install --auto-agree-with-licenses 278 286 redhat: sudo /bin/rpm -i --ignorearch 287 apk: sudo apk add -U 279 288 sol: sudo /usr/sbin/pkgadd -d 280 289 lsb: /bin/true … … 302 311 cloudlinux: cl 303 312 mageia: mga 313 apk: apk 304 314 lsb: lsb 305 315 hpux: sd … … 313 323 gentoo: true 314 324 arch: true 325 alpine: true 315 326 316 327 # For that OS no need to keep the . in the version release … … 336 347 default: perl-YAML,sudo,wget,tar,make,gzip 337 348 deb: libyaml-perl,sudo,wget,tar,make,gzip 349 apk: perl,perl-yaml,sudo,wget,tar,make,gzip 338 350 rhel-7-x86_64: perl-Data-Dumper,sudo,wget,tar,make,gzip 339 351 centos-7-x86_64: perl-YAML,sudo,wget,tar,make,gzip … … 628 640 mandrake-10.1: Date-Manip,YAML 629 641 md: 642 apk: File-MimeInfo 630 643 # LSB 631 644 lsb: Module-Build,Date-Manip,File-MimeInfo,File-BaseDir … … 672 685 mandrake-10.2: rpm-build,wget,patch,make,ntp-client,perl-File-MimeInfo,diffutils,perl-DateManip,perl-YAML 673 686 md: rpm-build,wget,patch,make,ntp-client,perl-File-MimeInfo,perl-File-BaseDir,perl-Date-Manip,diffutils,perl-YAML 687 apk: perl-date-manip,wget,patch,make,perl-file-basedir,perl-date-manip,perl-yaml,diffutils,alpine-sdk,bash 674 688 lsb: 675 689 deb: wget,patch,dpkg-dev,make,debian-builder,dh-make,fakeroot,ntpdate,libfile-mimeinfo-perl,libmodule-build-perl,libdate-manip-perl,libmail-sendmail-perl,diffutils,libyaml-perl -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r2330 r2333 206 206 # 3: Should have the same keys as the previous one. If ambiguity, which other distributions should be checked 207 207 # 4: Matching Rg. Expr to detect distribution and version 208 my ($single_rel_files, $ambiguous_rel_files,$distro_similar,$distro_match ) = pb_conf_get("osrelfile","osrelambfile","osambiguous","osrelexpr");208 my ($single_rel_files, $ambiguous_rel_files,$distro_similar,$distro_match,$nover) = pb_conf_get("osrelfile","osrelambfile","osambiguous","osrelexpr","osnover"); 209 209 210 210 my $release; … … 226 226 ($release) = $tmp =~ m/$distro_match->{$d}/m; 227 227 } else { 228 print STDERR "Unable to find $d version in $r (non-ambiguous)\n"; 229 print STDERR "Please report to the maintainer bruno_at_project-builder.org\n"; 228 if (not defined ($nover->{$d})) { 229 print STDERR "Unable to find $d version in $r (non-ambiguous)\n"; 230 print STDERR "Please report to the maintainer bruno_at_project-builder.org\n"; 231 } 230 232 $release = "unknown"; 231 233 } … … 410 412 } elsif ($pbos->{'type'} eq "deb") { 411 413 $regexp = '^Build-Depends:(.*)$'; 414 } elsif ($pbos->{'type'} eq "apk") { 415 # TODO 416 $regexp = 'TODO\n'; 412 417 } elsif ($pbos->{'type'} eq "ebuild") { 413 418 $sep = '"'.$/; 414 $regexp = '^DEPEND="(.*)"\n' 419 $regexp = '^DEPEND="(.*)"\n'; 415 420 } else { 416 421 # No idea -
devel/pb-modules/lib/ProjectBuilder/VE.pm
r2317 r2333 255 255 } elsif ($pbos->{'type'} eq "ebuild") { 256 256 die "Please teach the dev team how to build gentoo chroot"; 257 } elsif ($pbos->{'type'} eq "apk") { 258 die "Please teach the dev team how to build alpine chroot"; 257 259 } else { 258 260 die "Unknown distribution type $pbos->{'type'}. Report to dev team"; -
devel/pb/bin/pb
r2327 r2333 1700 1700 } elsif ($pbos->{'type'} eq "hpux") { 1701 1701 # TODO: HP-UX 1702 } elsif ($pbos->{'type'} eq "apk") { 1703 # TODO: Alpine 1702 1704 } else { 1703 1705 die "Unknown OS type format $pbos->{'type'}"; … … 3822 3824 EOF 3823 3825 # TODO: Level of portability of these cmds ? Critical now for RM 3824 # TODO: Check existence before adding to avoid errors3826 # TODO: use an external parameter 3825 3827 print SCRIPT << "EOF"; 3826 pb_system("/usr/sbin/groupadd $pbac->{$ENV{'PBPROJ'}}","Adding group $pbac->{$ENV{'PBPROJ'}}"); 3827 pb_system("/usr/sbin/useradd -g $pbac->{$ENV{'PBPROJ'}} -m -d $home/$pbac->{$ENV{'PBPROJ'}} $pbac->{$ENV{'PBPROJ'}}","Adding user $pbac->{$ENV{'PBPROJ'}} (group $pbac->{$ENV{'PBPROJ'}} - home $home/$pbac->{$ENV{'PBPROJ'}})"); 3828 # Most Linux distros 3829 if ( -x "/usr/sbin/groupadd" ) { 3830 pb_system("/usr/sbin/groupadd $pbac->{$ENV{'PBPROJ'}}","Adding group $pbac->{$ENV{'PBPROJ'}}"); 3831 # Alpine with busybox 3832 } elsif ( -x "/usr/sbin/addgroup" ) { 3833 pb_system("/usr/sbin/addgroup $pbac->{$ENV{'PBPROJ'}}","Adding group $pbac->{$ENV{'PBPROJ'}}"); 3834 } else { 3835 die "Unable to find a command to add a group on this distribution"; 3836 } 3837 # Most Linux distros 3838 if ( -x "/usr/sbin/useradd" ) { 3839 pb_system("/usr/sbin/useradd -g $pbac->{$ENV{'PBPROJ'}} -m -d $home/$pbac->{$ENV{'PBPROJ'}} $pbac->{$ENV{'PBPROJ'}}","Adding user $pbac->{$ENV{'PBPROJ'}} (group $pbac->{$ENV{'PBPROJ'}} - home $home/$pbac->{$ENV{'PBPROJ'}})"); 3840 # Alpine with busybox 3841 } elsif ( -x "/usr/sbin/adduser" ) { 3842 pb_system("/usr/sbin/adduser -G $pbac->{$ENV{'PBPROJ'}} -h $home/$pbac->{$ENV{'PBPROJ'}} -D $pbac->{$ENV{'PBPROJ'}}","Adding user $pbac->{$ENV{'PBPROJ'}} (group $pbac->{$ENV{'PBPROJ'}} - home $home/$pbac->{$ENV{'PBPROJ'}})"); 3843 } else { 3844 die "Unable to find a command to add a user on this distribution"; 3845 } 3828 3846 } 3829 3847 EOF -
devel/pb/lib/ProjectBuilder/CMS.pm
r2325 r2333 104 104 } elsif ($dtype eq "ebuild") { 105 105 $pbpkgreal = $pbpkg; 106 } elsif ($dtype eq "apk") { 107 $pbpkgreal = $pbpkg; 106 108 } elsif ($dtype eq "hpux") { 107 109 $pbpkgreal = $pbpkg;
Note:
See TracChangeset
for help on using the changeset viewer.