/usr/sbin/gpt-pkg is in grid-packaging-tools 3.6.7-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | #! /usr/bin/perl
my ($prefix, $globus_prefix, $exec_prefix, $bindir, $sbindir, $libdir);
my ($datarootdir, $datadir, $perlmoduledir, $gptdatadir);
my ($gptexecsharedir, $amdir, $pkg_confdir, $aclocaldir);
if (exists $ENV{GPT_LOCATION})
{
$prefix = $ENV{GPT_LOCATION};
}
else
{
$prefix = "/usr";
}
if (exists $ENV{GLOBUS_LOCATION})
{
$globus_prefix = $ENV{GLOBUS_LOCATION};
}
else
{
$globus_prefix = "/usr";
}
$exec_prefix = "${prefix}";
$bindir = "${exec_prefix}/bin";
$sbindir = "${exec_prefix}/sbin";
$libdir = "${exec_prefix}/lib";
$datarootdir = "${prefix}/share";
$datadir = "${prefix}/share";
$perlmoduledir = "/usr/share/perl5";
$gptdatadir = "${datadir}/globus/gpt";
$gptexecsharedir = "${datadir}/globus/gpt";
$amdir = "${datadir}/globus/amdir";
$pkg_confdir = "${datadir}/globus/gpt";
$aclocaldir = "${datadir}/globus/aclocal";
unshift(@INC, "${perlmoduledir}");
use strict;
use Getopt::Long;
use File::Find;
use Cwd;
use Config;
#
# Do a perl check for version >= 5.005.
#
if ( ! ( defined eval "require 5.005" ) )
{
die "GPT requires at least Perl version 5.005";
}
if ( ! ( defined eval "require Grid::GPT::GPTObject" ) )
{
die("$prefix does not appear to hold a valid GPT installation\n");
}
my $VERSION = "0.01";
require Pod::Usage;
# declare all of the option variables
my $startdir = cwd();
my $man = 0;
my $help = 0;
my $pkgdir = "$startdir/binaries";
my ($verbose, $version, $rpm, $all, $logfile, $buildno, $debug,
$installdir, $rpmprefix, $rpmlicense);
#
# if rpmprefix is not passed in, then it should be set to "/usr/grid" by
# the Grid::GPT::Archive module
#
# process the -option options
GetOptions(
'installdir=s' => \$installdir,
'location=s' => \$installdir,
'pkgdir=s' => \$pkgdir,
'buildnumber|buildno=i' => \$buildno,
'native' => \$rpm,
'rpmprefix=s' => \$rpmprefix,
'rpmlicense=s' => \$rpmlicense,
'all' => \$all,
'log' => \$logfile,
'verbose!' => \$verbose,
'debug' => \$debug,
'help|?' => \$help,
'man' => \$man,
'version' => \$version)
or Pod::Usage::pod2usage(0);
Pod::Usage::pod2usage(0) if $help;
Pod::Usage::pod2usage(-verbose => 2) if $man;
require Grid::GPT::GPTIdentity;
Grid::GPT::GPTIdentity::print_gpt_version() if defined $version;
require Grid::GPT::PkgMngmt::Archive;
require Grid::GPT::FilelistFunctions;
require Grid::GPT::Installation;
my @pkgnames = @ARGV;
Pod::Usage::pod2usage(-verbose => 0,
-exitval => 1,
-output => \*STDERR,
-message =>
"ERROR: No packages specified!")
if ! @pkgnames and ! defined $all;
# Create package directory
Grid::GPT::FilelistFunctions::mkinstalldir("$pkgdir");
$pkgdir = Grid::GPT::FilelistFunctions::abspath($pkgdir);
my $log = new Grid::GPT::PkgMngmt::Inform(verbose => $verbose, log => $logfile, debug => $debug);
my $locations = new Grid::GPT::Locations(
installdir => $installdir,
);
my $installation =
new Grid::GPT::Installation(locations => $locations, with_filelists => 1);
my $packager =
new Grid::GPT::PkgMngmt::Archive(locations => $locations,
gpt_rpm_prefix => $rpmprefix,
buildno => $buildno,
verbose => $log->{'verbose'},
license => $rpmlicense,
rpm => $rpm,
log=> $log);
my $pkgs;
if (defined $all) {
@$pkgs = grep { $_->pkgname() ne 'globus_core' } @{$installation->pkgs()};
} else {
$pkgs = [];
for my $pn (@pkgnames) {
my $mypkgs = $installation->query(pkgname => $pn);
die "ERROR: Package $pn not found\n" if( ! @$mypkgs );
push @$pkgs, @$mypkgs;
}
}
chdir $pkgdir;
$packager->archive($pkgs);
chdir $startdir;
exit 0;
__END__
=head1 NAME
B<gpt-pkg> - Creates flavored binary packages out of an installation
=head1 SYNOPSIS
B<gpt-pkg> [options] packages
Options:
-verbose Print copious output
-help Print usage
-man Print man page.
-version Print GPT version.
-native Create native pkgs as well as GPT pkgs (RPMs only).
-all Archive everything in the package directory..
-installdir=PATH Override $GLOBUS_LOCATION
-pkgdir=PATH Directory to put the packages
-rpmprefix=PATH Absolute path encoded in the RPM.
-buildnumber=NUMBER Build number used for pgm_static packages
-rpmlicense=LABEL License Label added to the RPM header
[packages] List of packages to be archived
=head1 DESCRIPTION
B<gpt-pkg> Creates binary packages from an installation. The
installation needs to contain GPT packaging data files. An
installation is created by running I<gpt-build> on a collection of
source packages or bundles.
=head1 FILES IN PGM PACKAGES
Installed files such as executables that are found in pgm and
ptm_static packages will overwrite one another when multiple flavors
of the same package are built by gpt-build. To preserve multiple
flavors of these files, gpt-build copies them into flavored
subdirectories. For example, the program $GLOBUS_LOCATION/bin/foo
will be copied into the location $GLOBUS_LOCATION/bin/gcc32/shared if
it was built with dynamically with the gcc32 flavor. B<gpt-pkg>
retrieves these files and copies them back to their proper location
before packaging them. Thus gpt-pkg will also overwrite these files
as it archives the different flavors of a pgm package.
=head1 OPTIONS
=over 8
=item B<-installdir>
Specify the directory in which the installed files currently live. If
this argument is not supplied, the value of the environment variable
GLOBUS_LOCATION is used instead.
=item B<-all>
Packages all of the binaries in an installation.
=item B<-native>
Creates a package in the native packaging format. Currently only rpm
is supported.
=item B<-rpmprefix=<path_to_installation>>
This should be set to the path to your GLOBUS_LOCATION. GPT will use a
value of "/usr/grid" if this option is not specified.
=item B<-rpmlicense=<label>>
Provides an alternate copyright label for the rpms. The default is
whatever GPT was configured with.
=item B<-verbose>
Prints out all of the build messages.
=item B<-log=FILE>
Appends all of the build messages to FILE. This option also sets -verbose.
=item B<-help>
Print a brief help message and exits.
=item B<-man>
Prints the manual page and exits.
=item B<-version>
Prints the version of GPT and exits.
=back
=head1 pgm and pgm_static packages
gpt-build copies the files for these packages in a flavored location
because different flavors of these types of packages will conflict
with each other. B<gpt-pkg> restores these files when it packages pgm
and pgm_static types.
=head1 SEE ALSO
gpt-bundle(8) gpt-install(8) gpt-build(8)
=head1 AUTHOR
Michael Bletzinger E<lt>mbletzin.ncsa.uiuc.eduE<gt> and Eric Blau
E<lt>blau.mcs.anl.govE<gt>
=cut
|