This file is indexed.

/usr/lib/pegasus/perl/Pegasus/DAX/Executable.pm is in pegasus-wms 4.4.0+dfsg-7.

This file is owned by root:root, with mode 0o644.

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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
#
# License: (atend)
# $Id$
#
package Pegasus::DAX::Executable;
use 5.006;
use strict;
use Carp; 

use Pegasus::DAX::Base qw(:xml); 
use Pegasus::DAX::CatalogType; 
use Pegasus::DAX::InvokeMixin;
use Exporter;
our @ISA = qw(Pegasus::DAX::CatalogType Pegasus::DAX::InvokeMixin Exporter); 

use constant ARCH_IA64    => 'ia64';
use constant ARCH_PPC     => 'ppc';
use constant ARCH_PPC_64  => 'ppc_64';
use constant ARCH_SPARCV7 => 'sparcv7'; 
use constant ARCH_SPARCV9 => 'sparcv9';
use constant ARCH_X86     => 'x86';
use constant ARCH_X86_64  => 'x86_64'; 
use constant ARCH_AMD64   => 'x86_64'; 

use constant OS_AIX       => 'aix';
use constant OS_LINUX     => 'linux';
use constant OS_DARWIN    => 'darwin';
use constant OS_MACOSX    => 'darwin'; 
use constant OS_SUNOS     => 'sunos';
use constant OS_SOLARIS   => 'sunos'; 
use constant OS_WINDOWS   => 'windows'; 

our $VERSION = '3.3'; 
our @EXPORT = (); 
our %EXPORT_TAGS = ( 
    arch =>[qw(ARCH_IA64 ARCH_PPC ARCH_PPC_64 ARCH_SPARCV7 ARCH_SPARCV9 
	ARCH_X86 ARCH_X86_64 ARCH_AMD64)],
    os => [qw(OS_AIX OS_LINUX OS_DARWIN OS_MACOSX OS_WINDOWS 
	OS_SUNOS OS_SOLARIS)]
    ); 
$EXPORT_TAGS{all} = [ map { @{$_} } values %EXPORT_TAGS ]; 
our @EXPORT_OK = ( @{$EXPORT_TAGS{all}} ); 

# one AUTOLOAD to rule them all
BEGIN { *AUTOLOAD = \&Pegasus::DAX::Base::AUTOLOAD }

sub new {
    my $proto = shift;
    my $class = ref($proto) || $proto;
    my $self = $class->SUPER::new();
    
    if ( @_ == 0 ) { 
	# nothing to do
    } elsif ( @_ > 1 ) {
	# called with a=>b,c=>d list
	%{$self} = ( %{$self}, @_ ); 
    } elsif ( @_ == 1 && ref $_[0] eq 'HASH' ) { 
	# called with { a=>b, c=>d } hashref
	%{$self} = ( %{$self}, %{ shift() } ); 
    } else {
	croak "invalid c'tor invocation"; 
    }

    bless $self, $class; 
}

# forward declarations
sub namespace;
#sub name;	# inherited from parent
sub version;
sub arch;
sub os;
sub osrelease;
sub osversion;
sub glibc;
sub installed;
    
sub key {
    # purpose: create the distinguishing key 
    # returns: a string that can be used in a hash
    #
    my $self = shift;
    my @x = ( $self->namespace
	    , $self->name
	    , $self->version
	    , $self->arch
	    , $self->os
	    , $self->osrelease
	    , $self->osversion
	    , $self->glibc
	    , boolean($self->installed)
	    );
    join( $;, grep { defined $_ } @x );
}

sub toXML {
    # purpose: put self onto stream as XML
    # paramtr: F (IN): perl file handle open for writing
    #          ident (IN): indentation level
    #          xmlns (opt. IN): namespace of element, if necessary
    #
    my $self = shift; 
    my $f = shift; 
    my $indent = shift || '';
    my $xmlns = shift; 
    my $tag = defined $xmlns && $xmlns ? "$xmlns:executable" : 'executable';

    $f->print( "$indent<$tag"
	     , attribute('namespace',$self->namespace,$xmlns)
	     , attribute('name',$self->name,$xmlns)
	     , attribute('version',$self->version,$xmlns)
	     , attribute('arch',$self->arch,$xmlns)
	     , attribute('os',$self->os,$xmlns)
	     , attribute('osrelease',$self->osrelease,$xmlns)
	     , attribute('osversion',$self->osversion,$xmlns)
	     , attribute('glibc',$self->glibc,$xmlns)
	     , attribute('installed',boolean($self->installed),$xmlns)
	     , ">\n" );
    $self->innerXML($f,"  $indent",$xmlns); 

    #
    # <invoke>
    #
    if ( exists $self->{invokes} ) {
	foreach my $i ( @{$self->{invokes}} ) {
	    $i->toXML($f,"  $indent",$xmlns);
	}
    }

    $f->print( "$indent</$tag>\n" );
}

1; 
__END__

=head1 NAME

Pegasus::DAX::Executable - stores an included transformation catalog entry. 

=head1 SYNOPSIS

    use Pegasus::DAX::Executable; 

    my $a = Pegasus::DAX::Executable(); 
    $a->namespace( 'somewhere' ); 
    $a->name( 'lfn' );
    $a->version( '1.0' ); 
    $a->os( 'x86_64' ); 
  
=head1 DESCRIPTION

This class remembers an included Pegasus transformation catalog entry. 

=head1 CONSTANTS

These constants describe the architecture for which an executable was
compiled. Note that multi-architectures as available on Mac OS X are
currently not supported.

=over 4

=item ARCH_IA64

=item ARCH_PPC

=item ARCH_PPC_64

=item ARCH_SPARCV7

=item ARCH_SPARCV9

=item ARCH_X86

=item ARCH_X86_64

=item ARCH_AMD64

=back

These constants describe the operating system platform. Some of them are
aliases mapping to the same string.

=over 4

=item OS_AIX

The IBM AIX Unix platform. 

=item OS_LINUX

The Linux platform. 

=item OS_DARWIN

The Mac OS X platform. 

=item OS_MACOSX

An alias for the Mac OS X platform. 

=item OS_SUNOS

The SUN Sparc and SUN Intel platforms. 

=item OS_SOLARIS

An alias for the SUN platforms. 

=item OS_WINDOWS

The Microsoft Windows family of platforms. 

=back 

=head1 METHODS

=over 4

=item new()

=item new( a => b, c => d, ... )

=item new( { a => b, c => d, ... } )

The default constructor will create an empty instance whose scalar
attributes can be adjusted using the getters and setters provided by the
C<AUTOLOAD> inherited method.

Other means of construction is to use named lists. However, you will
have to be aware of the internals to be able to use these lists
successfully.

=item namespace

Setter and getter for the optional logical transformation namespace string. 

=item name

Setter and getter for the logical transformation's name string. 

=item version

Setter and getter for the optional logical transformation version number
string.

=item arch

Setter and getter for the optional architecture string. 

=item os

Setter and getter for the optional operating system identifier. 

=item osrelease

Setter and getter for the optional OS release string. 

=item osversion

Setter and getter for the optional OS version string. 

=item glibc

Setter and getter for the optional GNU libc platform identifier string. 

=item key

This function munges all above attributes of this instance into a binary
string that can be used as unique identifier for this instance in a
hash.

=item toXML( $handle, $indent, $xmlns )

The purpose of the C<toXML> function is to recursively generate XML from
the internal data structures. The first argument is a file handle open
for writing. This is where the XML will be generated.  The second
argument is a string with the amount of white-space that should be used
to indent elements for pretty printing. The third argument may not be
defined. If defined, all element tags will be prefixed with this name
space.

=back 

=head1 INHERITED METHODS

Please refer to L<Pegasus::DAX::CatalogType> for inherited methods. 

=over 4

=item addMeta( $key, $type, $value )

=item addMeta( $metadata_instance )

=item addPFN( $url )

=item addPFN( $url, $site )

=item addPFN( $pfn_instance )

=item addProfile( $namespace, $key, $value )

=item addProfile( $profile_instance )

=back

Please refer to L<Pegasus::DAX::InvokeMixin> for inherited methods. 

=over 4

=item addInvoke( $when, $cmd )

=item invoke( $when, $cmd )

=item notify( $when, $cmd )

=back

=head1 SEE ALSO

=over 4

=item L<Pegasus::DAX::CatalogType>

Base class.

=item L<Pegasus::DAX::InvokeMixin>

Base class. 

=item L<Pegasus::DAX::ADAG>

Class using L<Pegasus::DAX::File>. 

=back 

=head1 COPYRIGHT AND LICENSE

Copyright 2007-2011 University Of Southern California

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

=cut