App-Fetchware
view release on metacpan or search on metacpan
lib/App/Fetchware.pm view on Meta::CPAN
} # end bare block for %month.
sub file_parse_filelist {
my $file_listing = shift;
for my $file (@$file_listing) {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,
$blksize,$blocks)
= stat($file) or die <<EOD;
App-Fetchware: Fetchware failed to stat() the file [$file] while trying to parse
your local [file://] lookup_url. The OS error was [$!]. This should not happen,
and is either a bug in fetchware or some sort of race condition.
EOD
# Replace scalar filename with a arrayref of the filename with its
# assocated timestamp for later processing for lookup().
#
lib/App/Fetchware/Util.pm view on Meta::CPAN
# track down an error in a build script if the directory everything
# is in has been deleted.
my $new_temp_dir = tempdir("fetchware-$$-XXXXXXXXXX",
DIR => cwd());
# Determine /etc/passwd entry for the "effective" uid of the
# current fetchware process. I should use the "effective" uid
# instead of the "real" uid, because effective uid is used to
# determine what each uid can do, and the real uid is only
# really used to track who the original user was in a setuid
# program.
my ($name, $useless, $uid, $gid, $quota, $comment, $gcos, $dir,
$shell, $expire)
= getpwnam(config('user') // 'nobody');
chown($uid, $gid, $new_temp_dir) or die <<EOD;
App-Fetchware-Util: Fetchware failed to chown [$new_temp_dir] to the user it is
dropping privileges to. This just shouldn't happen, and might be a bug, or
perhaps your system temporary directory is full. The OS error was [$!].
EOD
chmod(0700, $new_temp_dir) or die <<EOD;
App-Fetchware-Util: Fetchware failed to change the permissions of its new
temporary directory [$new_temp_dir] to 0700 that it created, because its
dropping privileges. This just shouldn't happen, and is bug, or perhaps your
system temporary directory is full. The OS error is [$!].
EOD
lib/App/Fetchware/Util.pm view on Meta::CPAN
return \$output;
}
# Fork succeeded, child code goes here.
} else {
close $readonly or die <<EOD;
App-Fetchware-Util: Failed to close $readonly pipe in child. Os error [$!].
EOD
# Drop privs.
# drop_privileges() dies on an error just let drop_privs() caller
# catch it.
my ($uid, $gid) = drop_privileges($regular_user);
# Execute the coderef that is supposed to be done as non-root.
$child_code->($writeonly);
# Now close the pipe, to avoid creating a dead pipe causing a
# SIGPIPE to be sent to the parent.
close $writeonly or die <<EOD;
App-Fetchware-Util: Failed to close $writeonly pipe in child. Os error [$!].
EOD
lib/Test/Fetchware.pm view on Meta::CPAN
docs
|
flood
/x),
re(qr/httpd-2\.\d\.\d+?-win32-src\.zip(\.asc)?/),
re(qr/httpd-2\.\d\.\d+?\.tar\.(bz2|gz)(\.asc)?/),
re(qr/httpd-2\.\d\.\d+?-deps\.tar\.(bz2|gz)(\.asc)?/),
re(qr/
libapreq
|
mod_fcgid
|
mod_ftp
|
patches
/x),
re(qr/\d{10,12}/)
) # end any
)
);
EOC
t/App-Fetchware-lookup.t view on Meta::CPAN
[ 'httpd-2.2.22.tar.gz.asc', '999901302206' ],
[ 'httpd-2.4.2-deps.tar.bz2', '999904151233' ],
[ 'httpd-2.4.2-deps.tar.bz2.asc', '999904151233' ],
[ 'httpd-2.4.2-deps.tar.gz', '999904151233' ],
[ 'httpd-2.4.2-deps.tar.gz.asc', '999904151233' ],
[ 'httpd-2.4.2.tar.bz2', '999904151233' ],
[ 'httpd-2.4.2.tar.bz2.asc', '999904151233' ],
[ 'httpd-2.4.2.tar.gz', '999904151233' ],
[ 'httpd-2.4.2.tar.gz.asc', '999904151233' ],
[ 'libapreq', '999903031938' ],
[ 'mod_fcgid', '999904231119' ],
[ 'mod_ftp', '999903031938' ],
[ 'patches', '999903031938' ]
];
if (not $no_current) {
return $filename_listing;
} elsif ($no_current) {
my $no_current_listing;
@$no_current_listing = grep { $_->[0] !~ /^(:?latest|current)[_-]is(.*)$/i } @$filename_listing;
t/App-Fetchware-lookup.t view on Meta::CPAN
<li><a href="#archive">Older Releases</a></li>
<li><a href="#sig">PGP Signatures</a></li>
<li><a href="#patches">Official Patches</a></li>
</ul>
<pre><img src="/icons/blank.gif" alt="Icon "> <a href="?C=N;O=D">Name</a> <a href="?C=M;O=A">Last modified</a> <a href="?C=S;O=A">Size</a> <a href="?C=D;O=A">Description</a><hr><img src="/icons/back.gif" alt="[DIR]"> <...
<img src="/icons/folder.gif" alt="[DIR]"> <a href="binaries/">binaries/</a> 23-Aug-2012 23:27 - Binary distributions
<img src="/icons/folder.gif" alt="[DIR]"> <a href="docs/">docs/</a> 23-Aug-2012 23:28 - Extra documentation packages
<img src="/icons/folder.gif" alt="[DIR]"> <a href="flood/">flood/</a> 23-Aug-2012 23:27 - HTTP Server project
<img src="/icons/folder.gif" alt="[DIR]"> <a href="libapreq/">libapreq/</a> 23-Aug-2012 23:29 - HTTP Server project
<img src="/icons/folder.gif" alt="[DIR]"> <a href="mod_fcgid/">mod_fcgid/</a> 23-Aug-2012 23:25 - HTTP Server project
<img src="/icons/folder.gif" alt="[DIR]"> <a href="mod_ftp/">mod_ftp/</a> 23-Aug-2012 23:25 - HTTP Server project
<img src="/icons/folder.gif" alt="[DIR]"> <a href="patches/">patches/</a> 23-Aug-2012 23:27 - Official patches
<img src="/icons/text.gif" alt="[TXT]"> <a href="Announcement2.0.html">Announcement2.0.html</a> 19-Oct-2010 00:50 5.5K Apache 2.0 Release Note
<img src="/icons/text.gif" alt="[TXT]"> <a href="Announcement2.0.txt">Announcement2.0.txt</a> 19-Oct-2010 00:50 4.2K Apache 2.0 Release Note
<img src="/icons/text.gif" alt="[TXT]"> <a href="Announcement2.2.html">Announcement2.2.html</a> 11-Sep-2012 10:08 3.5K Apache 2.2 Release Note
<img src="/icons/text.gif" alt="[TXT]"> <a href="Announcement2.2.txt">Announcement2.2.txt</a> 11-Sep-2012 10:08 2.6K Apache 2.2 Release Note
<img src="/icons/text.gif" alt="[TXT]"> <a href="Announcement2.4.html">Announcement2.4.html</a> 21-Aug-2012 08:51 3.8K HTTP Server project
<img src="/icons/text.gif" alt="[TXT]"> <a href="Announcement2.4.txt">Announcement2.4.txt</a> 21-Aug-2012 08:51 2.6K HTTP Server project
<img src="/icons/text.gif" alt="[TXT]"> <a href="CHANGES_2.0">CHANGES_2.0</a> 18-Oct-2010 04:32 316K List of changes in 2.0
<img src="/icons/text.gif" alt="[TXT]"> <a href="CHANGES_2.0.64">CHANGES_2.0.64</a> 18-Oct-2010 04:32 3.2K List of changes in 2.0
t/App-FetchwareX-HTMLPageSync.t view on Meta::CPAN
docs
|
flood
/x),
re(qr/httpd-2\.\d\.\d+?-win32-src\.zip(\.asc)?/),
re(qr/httpd-2\.\d\.\d+?\.tar\.(bz2|gz)(\.asc)?/),
re(qr/httpd-2\.\d\.\d+?-deps\.tar\.(bz2|gz)(\.asc)?/),
re(qr/
libapreq
|
mod_fcgid
|
mod_ftp
|
patches
/x),
re(qr/\d{12}/)
) # end any
),
'checked lookup()s return value for acceptable values.'
);
( run in 1.317 second using v1.01-cache-2.11-cpan-ceb78f64989 )