/usr/sbin/gpt_save_flavor 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 | #! /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 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");
}
require Pod::Usage;
use Cwd;
my $VERSION = 0.01;
my $srcdir = cwd();
my $flavor = "noflavor";
my $verbose = 0;
my ($help, $man);
# sub pod2usage {
# my $ex = shift;
# print "gpt_save_flavor [-verbose -help] -flavor=flavor <build-parameters file>";
# exit $ex;
# }
GetOptions( 'flavor=s' => \$flavor, 'verbose=i' => \$verbose, 'help' => \$help)
or Pod::Usage::pod2usage(1);
Pod::Usage::pod2usage(0) if $help;
Pod::Usage::pod2usage(-verbose => 2) if $man;
my $file = shift;
if (!defined $flavor or ! defined $file) {
Pod::Usage::pod2usage(1);
}
require Grid::GPT::V1::FlavorDefinition;
my $obj = new Grid::GPT::V1::FlavorDefinition(name => $flavor,
build_parameters => $file);
die "ERROR: vendorcc not supported\n"
if $flavor =~ m!vendorcc! and ! defined $obj->{'vendorcc'};
die "ERROR: gcc not supported\n"
if $flavor =~ m!gcc! and ! defined $obj->{'gcc'};
$obj->write_xml(filename => "flavor_$flavor.gpt");
__END__
|