view release on metacpan or search on metacpan
dist_version_from => 'lib/AFS/PAG.pm',
dist_author => 'Russ Allbery <rra@cpan.org>',
license => 'mit',
recursive_test_files => 1,
add_to_cleanup => [qw(config.log cover_db glue/*.o)],
# XS configuration.
c_source => 'glue',
extra_compiler_flags => ['-I.'],
# Additional package metadata.
meta_merge => {
resources => {
repository => 'git://git.eyrie.org/afs/afs-pag.git',
bugtracker =>
'https://rt.cpan.org/Public/Dist/Display.html?Name=AFS-PAG',
},
},
# Other package relationships.
configure_requires => {
User-Visible AFS::PAG Changes
AFS::PAG 1.02 (2014-07-27)
Rename NEWS to Changes to match the normal Perl convention.
Add repository and bugtracker information in the distribution
metadata.
Update to rra-c-util 5.5:
* Use Lancaster Consensus environment variables to control tests.
* Work around perltidy bug that leaves behind stray log files.
* Use calloc or reallocarray for protection against integer overflows.
AFS::PAG 1.01 (2013-10-06)
Define the correct preprocessor symbols to build properly if a libkafs
lib/AFS/PAG.xs
LICENSE
MANIFEST This list of files
MANIFEST.SKIP
portable/k_haspag.c
portable/kafs.h
portable/macros.h
portable/stdbool.h
portable/system.h
README
t/data/perl.conf
t/data/perlcriticrc
t/data/perltidyrc
t/docs/pod-coverage.t
t/docs/pod-spelling.t
t/docs/pod.t
t/docs/synopsis.t
t/lib/Test/RRA.pm
t/lib/Test/RRA/Config.pm
t/pag/basic.t
t/pag/isolation.t
t/style/coverage.t
t/style/critic.t
MANIFEST.SKIP view on Meta::CPAN
~$
\.old$
\#$
\b\.#
\.bak$
\.tmp$
\.#
\.rej$
# Avoid OS-specific files/dirs
# Mac OSX metadata
\B\.DS_Store
# Mac OSX SMB mount metadata files
\B\._
# Avoid Devel::Cover and Devel::CoverX::Covered files.
\bcover_db\b
\bcovered\b
# Avoid MYMETA files
^MYMETA\.
# Avoid archives of this distribution
kafs/sys-darwin10.c view on Meta::CPAN
/*
* AFS system call for Mac OS X 10.6 systems (and later).
*
* This is an AFS system call implementation for Mac OS X 10.6 systems (and
* later). It is for use on systems that don't have libkafs or libkopenafs,
* or where a dependency on those libraries is not desirable for some reason.
*
* This file is included by kafs/kafs.c on Mac OS X 10.6 platforms and
* therefore doesn't need its own copy of standard includes, only whatever
* additional data is needed for the Linux interface.
*
* The canonical version of this file is maintained in the rra-c-util package,
* which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
*
* Written by Russ Allbery <eagle@eyrie.org>
* Copyright 2006, 2007, 2009, 2010, 2011
* The Board of Trustees of the Leland Stanford Junior University
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
kafs/sys-darwin10.c view on Meta::CPAN
{
int fd, code, oerrno;
fd = open("/dev/openafs_ioctl", O_RDWR);
if (fd < 0) {
errno = ENOSYS;
return -1;
}
if (sizeof(param1) == 8) {
struct afssysargs64 syscall_data;
syscall_data.syscall = call;
syscall_data.param1 = param1;
syscall_data.param2 = param2;
syscall_data.param3 = param3;
syscall_data.param4 = param4;
syscall_data.param5 = 0;
syscall_data.param6 = 0;
code = ioctl(fd, _IOWR('C', 2, struct afssysargs64), &syscall_data);
if (code == 0)
*rval = syscall_data.retval;
} else {
struct afssysargs syscall_data;
syscall_data.syscall = call;
syscall_data.param1 = param1;
syscall_data.param2 = param2;
syscall_data.param3 = param3;
syscall_data.param4 = param4;
syscall_data.param5 = 0;
syscall_data.param6 = 0;
code = ioctl(fd, _IOWR('C', 1, struct afssysargs), &syscall_data);
if (code == 0)
*rval = syscall_data.retval;
}
oerrno = errno;
close(fd);
errno = oerrno;
return code;
}
kafs/sys-darwin8.c view on Meta::CPAN
* AFS system call for Mac OS X 10.4 and 10.5 systems.
*
* This is an AFS system call implementation for Mac OS X 10.4 and 10.5
* systems only. It is for use on systems that don't have libkafs or
* libkopenafs, or where a dependency on those libraries is not desirable for
* some reason. For Mac OS X 10.6 and later, don't use this interface; it
* doesn't correctly handle mixed 32-bit and 64-bit systems.
*
* This file is included by kafs/kafs.c on Mac OS X 10.4 and 10.5 platforms
* and therefore doesn't need its own copy of standard includes, only whatever
* additional data is needed for the Linux interface.
*
* The canonical version of this file is maintained in the rra-c-util package,
* which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
*
* Written by Russ Allbery <eagle@eyrie.org>
* Copyright 2006, 2007, 2009, 2010
* The Board of Trustees of the Leland Stanford Junior University
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
kafs/sys-darwin8.c view on Meta::CPAN
* that there's all sorts of ugly type conversion happening here.
*
* Returns -1 and sets errno to ENOSYS if attempting a system call fails and 0
* otherwise. If the system call was made, its return status will be stored
* in rval.
*/
static int
k_syscall(long call, long param1, long param2, long param3, long param4,
int *rval)
{
struct afssysargs syscall_data;
int fd, code, oerrno;
fd = open("/dev/openafs_ioctl", O_RDWR);
if (fd < 0) {
errno = ENOSYS;
return -1;
}
syscall_data.syscall = call;
syscall_data.param1 = param1;
syscall_data.param2 = param2;
syscall_data.param3 = param3;
syscall_data.param4 = param4;
syscall_data.param5 = 0;
syscall_data.param6 = 0;
code = ioctl(fd, _IOWR('C', 1, struct afssysargs), &syscall_data);
if (code == 0)
*rval = syscall_data.retval;
oerrno = errno;
close(fd);
errno = oerrno;
return code;
}
kafs/sys-linux.c view on Meta::CPAN
/*
* AFS system call for Linux systems.
*
* This is an AFS system call implementation for Linux systems only (and new
* enough implementations of OpenAFS on Linux that /proc/fs/openafs/afs_ioctl
* exists). It is for use on systems that don't have libkafs or libkopenafs,
* or where a dependency on those libraries is not desirable for some reason.
*
* This file is included by kafs/kafs.c on Linux platforms and therefore
* doesn't need its own copy of standard includes, only whatever additional
* data is needed for the Linux interface.
*
* The canonical version of this file is maintained in the rra-c-util package,
* which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
*
* Written by Russ Allbery <eagle@eyrie.org>
* Copyright 2006, 2007, 2009
* The Board of Trustees of the Leland Stanford Junior University
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
kafs/sys-linux.c view on Meta::CPAN
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* The struct passed to ioctl to do an AFS system call. Definition taken from
* the afs/afs_args.h OpenAFS header.
*/
struct afsprocdata {
long param4;
long param3;
long param2;
long param1;
long syscall;
};
/*
* The workhorse function that does the actual system call. All the values
kafs/sys-linux.c view on Meta::CPAN
* by Arla (at least some versions).
*
* Returns -1 and sets errno to ENOSYS if attempting a system call fails and 0
* otherwise. If the system call was made, its return status will be stored
* in rval.
*/
static int
k_syscall(long call, long param1, long param2, long param3, long param4,
int *rval)
{
struct afsprocdata syscall_data;
int fd, oerrno;
fd = open("/proc/fs/openafs/afs_ioctl", O_RDWR);
if (fd < 0)
fd = open("/proc/fs/nnpfs/afs_ioctl", O_RDWR);
if (fd < 0) {
errno = ENOSYS;
return -1;
}
syscall_data.syscall = call;
syscall_data.param1 = param1;
syscall_data.param2 = param2;
syscall_data.param3 = param3;
syscall_data.param4 = param4;
*rval = ioctl(fd, _IOW('C', 1, void *), &syscall_data);
oerrno = errno;
close(fd);
errno = oerrno;
return 0;
}
kafs/sys-solaris.c view on Meta::CPAN
/*
* AFS system call for Solaris 11 and later.
*
* This is an AFS system call implementation for Solaris 11 and later
* (versions of Solaris where OpenAFS has switched from a system call to an
* ioctl). It is for use on systems that don't have libkafs or libkopenafs,
* or where a dependency on those libraries is not desirable for some reason.
*
* This file is included by kafs/kafs.c on Solaris 11 platforms and therefore
* doesn't need its own copy of standard includes, only whatever additional
* data is needed for the Linux interface.
*
* The canonical version of this file is maintained in the rra-c-util package,
* which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
*
* Written by Russ Allbery <eagle@eyrie.org>
* Copyright 2006, 2007, 2009, 2010
* The Board of Trustees of the Leland Stanford Junior University
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
kafs/sys-solaris.c view on Meta::CPAN
* otherwise. If the system call was made, its return status will be stored
* in rval.
*/
static int
k_syscall(long call, long param1, long param2, long param3, long param4,
int *rval)
{
int fd, code, oerrno, callnum;
#ifdef _ILP32
struct afssysargs syscall_data;
syscall_data.syscall = call;
syscall_data.param1 = param1;
syscall_data.param2 = param2;
syscall_data.param3 = param3;
syscall_data.param4 = param4;
syscall_data.param5 = 0;
syscall_data.param6 = 0;
callnum = _IOW('C', 2, struct afssysargs);
#else
struct afssysargs64 syscall_data;
syscall_data.syscall = call;
syscall_data.param1 = param1;
syscall_data.param2 = param2;
syscall_data.param3 = param3;
syscall_data.param4 = param4;
syscall_data.param5 = 0;
syscall_data.param6 = 0;
callnum = _IOW('C', 1, struct afssysargs64);
#endif
fd = open("/dev/afs", O_RDWR);
if (fd < 0) {
errno = ENOSYS;
return -1;
}
*rval = ioctl(fd, callnum, &syscall_data);
oerrno = errno;
close(fd);
errno = oerrno;
return 0;
}
kafs/sys-syscall.c view on Meta::CPAN
/*
* AFS system call via syscall.
*
* This is an AFS system call implementation for systems that use syscall,
* such as Solaris prior to Solaris 11. It is for use on systems that don't
* have libkafs or libkopenafs, or where a dependency on those libraries is
* not desirable for some reason.
*
* This file is included by kafs/kafs.c on platforms that use syscall and
* therefore doesn't need its own copy of standard includes, only whatever
* additional data is needed for the Linux interface.
*
* The canonical version of this file is maintained in the rra-c-util package,
* which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
*
* Written by Russ Allbery <eagle@eyrie.org>
*
* The authors hereby relinquish any claim to any copyright that they may have
* in this work, whether granted under contract or by operation of law or
* international treaty, and hereby commit to the public, at large, that they
* shall not, at any time in the future, seek to enforce any copyright in this
t/lib/Test/RRA/Config.pm view on Meta::CPAN
# Configuration for Perl test cases.
#
# In order to reuse the same Perl test cases in multiple packages, I use a
# configuration file to store some package-specific data. This module loads
# that configuration and provides the namespace for the configuration
# settings.
#
# The canonical version of this file is maintained in the rra-c-util package,
# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
package Test::RRA::Config;
use 5.006;
use strict;
t/lib/Test/RRA/Config.pm view on Meta::CPAN
$MINIMUM_VERSION %MINIMUM_VERSION @POD_COVERAGE_EXCLUDE @STRICT_IGNORE
@STRICT_PREREQ
);
# This version should match the corresponding rra-c-util release, but with
# two digits for the minor version, including a leading zero if necessary,
# so that it will sort properly.
$VERSION = '5.05';
}
# If BUILD or SOURCE are set in the environment, look for data/perl.conf under
# those paths for a C Automake package. Otherwise, look in t/data/perl.conf
# for a standalone Perl module. Don't use Test::RRA::Automake since it may
# not exist.
our $PATH;
for my $base ($ENV{BUILD}, $ENV{SOURCE}, 't') {
next if !defined($base);
my $path = "$base/data/perl.conf";
if (-r $path) {
$PATH = $path;
last;
}
}
if (!defined($PATH)) {
BAIL_OUT('cannot find data/perl.conf');
}
# Pre-declare all of our variables and set any defaults.
our $COVERAGE_LEVEL = 100;
our @COVERAGE_SKIP_TESTS;
our @CRITIC_IGNORE;
our $LIBRARY_PATH;
our $MINIMUM_VERSION = '5.008';
our %MINIMUM_VERSION;
our @POD_COVERAGE_EXCLUDE;
our @STRICT_IGNORE;
our @STRICT_PREREQ;
# Load the configuration.
if (!do($PATH)) {
my $error = $@ || $! || 'loading file did not return true';
BAIL_OUT("cannot load data/perl.conf: $error");
}
1;
__END__
=for stopwords
Allbery rra-c-util Automake perlcritic .libs namespace subdirectory
sublicense MERCHANTABILITY NONINFRINGEMENT
=head1 NAME
t/lib/Test/RRA/Config.pm view on Meta::CPAN
print "Required Perl version is $MINIMUM_VERSION\n";
=head1 DESCRIPTION
Test::RRA::Config encapsulates per-package configuration for generic Perl
test programs that are shared between multiple packages using the
rra-c-util infrastructure. It handles locating and loading the test
configuration file for both C Automake packages and stand-alone Perl
modules.
Test::RRA::Config looks for a file named F<data/perl.conf> relative to the
root of the test directory. That root is taken from the environment
variables BUILD or SOURCE (in that order) if set, which will be the case
for C Automake packages using C TAP Harness. If neither is set, it
expects the root of the test directory to be a directory named F<t>
relative to the current directory, which will be the case for stand-alone
Perl modules.
The following variables are supported:
=over 4
t/style/coverage.t view on Meta::CPAN
# Skip code coverage unless author tests are enabled since it takes a long
# time, is sensitive to versions of various libraries, and does not detect
# functionality problems.
skip_unless_author('Coverage tests');
# Load prerequisite modules.
use_prereq('Devel::Cover');
use_prereq('Test::Strict');
# Build a list of test directories to use for coverage.
my %ignore = map { $_ => 1 } qw(data docs style), @COVERAGE_SKIP_TESTS;
opendir(my $testdir, 't') or BAIL_OUT("cannot open t: $!");
my @t_dirs = readdir($testdir) or BAIL_OUT("cannot read t: $!");
closedir($testdir) or BAIL_OUT("cannot close t: $!");
# Filter out ignored and system directories.
@t_dirs = grep { !$ignore{$_} } File::Spec->no_upwards(@t_dirs);
# Prepend the t directory name to the directories.
@t_dirs = map { File::Spec->catfile('t', $_) } @t_dirs;
t/style/critic.t view on Meta::CPAN
# Skip tests unless we're running author tests since this test is too
# sensitive to the exact version of Perl::Critic to be generally useful.
skip_unless_author('Coding style tests');
# Load prerequisite modules.
use_prereq('Perl::Critic::Utils');
use_prereq('Test::Perl::Critic');
# Force the embedded Perl::Tidy check to use the correct configuration.
local $ENV{PERLTIDY} = 't/data/perltidyrc';
# Import the configuration file and run Perl::Critic.
Test::Perl::Critic->import(-profile => 't/data/perlcriticrc');
# By default, Test::Perl::Critic only checks blib. We also want to check t,
# Build.PL, and examples.
my @files = Perl::Critic::Utils::all_perl_files('blib');
if (!@files) {
@files = Perl::Critic::Utils::all_perl_files('lib');
}
if (-f 'Build.PL') {
push(@files, 'Build.PL');
}