Changeset 2333 in ProjectBuilder for devel/pb


Ignore:
Timestamp:
Oct 24, 2017, 12:49:59 AM (7 years ago)
Author:
Bruno Cornec
Message:

Initial support of apk for pb

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r2327 r2333  
    17001700        } elsif ($pbos->{'type'} eq "hpux") {
    17011701            # TODO: HP-UX
     1702        } elsif ($pbos->{'type'} eq "apk") {
     1703            # TODO: Alpine
    17021704        } else {
    17031705            die "Unknown OS type format $pbos->{'type'}";
     
    38223824EOF
    38233825    # TODO: Level of portability of these cmds ? Critical now for RM
    3824     # TODO: Check existence before adding to avoid errors
     3826    # TODO: use an external parameter
    38253827    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    }
    38283846}
    38293847EOF
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r2325 r2333  
    104104        } elsif ($dtype eq "ebuild") {
    105105            $pbpkgreal = $pbpkg;
     106        } elsif ($dtype eq "apk") {
     107            $pbpkgreal = $pbpkg;
    106108        } elsif ($dtype eq "hpux") {
    107109            $pbpkgreal = $pbpkg;
Note: See TracChangeset for help on using the changeset viewer.