r46120 - in /branches/upstream/liblchown-perl/current: Build.PL Changes Lchown.pm Lchown.xs MANIFEST MANIFEST.SKIP META.yml Makefile.PL README lib/ lib/Lchown.pm lib/Lchown.xs t/allplatforms.t t/noimport.t t/notsup.t t/pod-coverage.t t/pod.t t/sup.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Tue Oct 20 17:09:05 UTC 2009


Author: jawnsy-guest
Date: Tue Oct 20 17:08:58 2009
New Revision: 46120

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46120
Log:
[svn-upgrade] Integrating new upstream version, liblchown-perl (1.01)

Added:
    branches/upstream/liblchown-perl/current/Build.PL
    branches/upstream/liblchown-perl/current/MANIFEST.SKIP
    branches/upstream/liblchown-perl/current/lib/
    branches/upstream/liblchown-perl/current/lib/Lchown.pm
    branches/upstream/liblchown-perl/current/lib/Lchown.xs
Removed:
    branches/upstream/liblchown-perl/current/Lchown.pm
    branches/upstream/liblchown-perl/current/Lchown.xs
Modified:
    branches/upstream/liblchown-perl/current/Changes
    branches/upstream/liblchown-perl/current/MANIFEST
    branches/upstream/liblchown-perl/current/META.yml
    branches/upstream/liblchown-perl/current/Makefile.PL
    branches/upstream/liblchown-perl/current/README
    branches/upstream/liblchown-perl/current/t/allplatforms.t
    branches/upstream/liblchown-perl/current/t/noimport.t
    branches/upstream/liblchown-perl/current/t/notsup.t
    branches/upstream/liblchown-perl/current/t/pod-coverage.t
    branches/upstream/liblchown-perl/current/t/pod.t
    branches/upstream/liblchown-perl/current/t/sup.t

Added: branches/upstream/liblchown-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/Build.PL?rev=46120&op=file
==============================================================================
--- branches/upstream/liblchown-perl/current/Build.PL (added)
+++ branches/upstream/liblchown-perl/current/Build.PL Tue Oct 20 17:08:58 2009
@@ -1,0 +1,18 @@
+use strict;
+use warnings;
+use Module::Build;
+
+my $builder = Module::Build->new(
+    module_name => 'Lchown',
+    dist_author => 'Nick Cleaton <nick at cleaton.net>',
+    all_from    => 'lib/Lchown.pm',
+    license     => 'perl',
+    build_requires => {
+        'ExtUtils::CBuilder' => 0,
+        'Test::More'         => 0,
+    },
+    add_to_cleanup     => [ 'Lchown-*' ],
+    create_makefile_pl => 'small',
+);
+
+$builder->create_build_script();

Modified: branches/upstream/liblchown-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/Changes?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/Changes (original)
+++ branches/upstream/liblchown-perl/current/Changes Tue Oct 20 17:08:58 2009
@@ -1,28 +1,32 @@
 Revision history for Perl extension Lchown.
 
-0.01  Sep 26 2003
-    - original version; created by h2xs 1.19
+1.01    2009-10-18
+        RT #25968
+        changed to Module::Build
 
-0.02  Sep 28 2003
-    - got it working and added tests
+1.00    Nov 13 2004
+        now works on perls back to 5.00404
+        minor code tidy
+        added pod tests
 
-0.03  Sep 28 2003
-    - tidied docs and Makefile.PL
+0.07    Jan 02 2004
+        fixed test failure on platforms without symlinks
 
-0.04  Sep 30 2003
-    - added a README
+0.06    Oct 01 2003
+        replaced ENOTSUP with the more appropriate ENOSYS
 
-0.05  Sep 30 2003
-    - really added a README this time
+0.05    Sep 30 2003
+        really added a README this time
 
-0.06  Oct 01 2003
-    - replaced ENOTSUP with the more appropriate ENOSYS
+0.04    Sep 30 2003
+        added a README
 
-0.07  Jan 02 2004
-    - fixed test failure on platforms without symlinks
+0.03    Sep 28 2003
+        tidied docs and Makefile.PL
 
-1.00  Nov 13 2004
-    - now works on perls back to 5.00404
-      minor code tidy
-      added pod tests
-   
+0.02    Sep 28 2003
+        got it working and added tests
+
+0.01    Sep 26 2003
+        original version; created by h2xs 1.19
+

Modified: branches/upstream/liblchown-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/MANIFEST?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/MANIFEST (original)
+++ branches/upstream/liblchown-perl/current/MANIFEST Tue Oct 20 17:08:58 2009
@@ -1,13 +1,15 @@
+Build.PL
 Changes
-Lchown.pm
-Lchown.xs
-MANIFEST
-Makefile.PL
+lib/Lchown.pm
+lib/Lchown.xs
+MANIFEST			This list of files
+MANIFEST.SKIP
 README
-META.yml
 t/allplatforms.t
 t/noimport.t
 t/notsup.t
+t/pod-coverage.t
+t/pod.t
 t/sup.t
-t/pod.t
-t/pod-coverage.t
+Makefile.PL
+META.yml

Added: branches/upstream/liblchown-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/MANIFEST.SKIP?rev=46120&op=file
==============================================================================
--- branches/upstream/liblchown-perl/current/MANIFEST.SKIP (added)
+++ branches/upstream/liblchown-perl/current/MANIFEST.SKIP Tue Oct 20 17:08:58 2009
@@ -1,0 +1,47 @@
+
+#!start included /usr/local/share/perl/5.10.0/ExtUtils/MANIFEST.SKIP
+# Avoid version control files.
+\bRCS\b
+\bCVS\b
+\bSCCS\b
+,v$
+\B\.svn\b
+\B\.git\b
+\B\.gitignore\b
+\b_darcs\b
+
+# Avoid Makemaker generated and utility files.
+\bMANIFEST\.bak
+\bMakefile$
+\bblib/
+\bMakeMaker-\d
+\bpm_to_blib\.ts$
+\bpm_to_blib$
+\bblibdirs\.ts$         # 6.18 through 6.25 generated this
+
+# Avoid Module::Build generated and utility files.
+\bBuild$
+\b_build/
+
+# Avoid temp and backup files.
+~$
+\.old$
+\#$
+\b\.#
+\.bak$
+
+# Avoid Devel::Cover files.
+\bcover_db\b
+#!end included /usr/local/share/perl/5.10.0/ExtUtils/MANIFEST.SKIP
+
+
+# Avoid Module::Build generated and utility files.
+\bBuild$
+\bBuild.bat$
+\b_build
+\bBuild.COM$
+\bBUILD.COM$
+\bbuild.com$
+
+# Avoid archives of this distribution
+\bLchown-[\d\.\_]+

Modified: branches/upstream/liblchown-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/META.yml?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/META.yml (original)
+++ branches/upstream/liblchown-perl/current/META.yml Tue Oct 20 17:08:58 2009
@@ -1,11 +1,22 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Lchown
-version:      1.00
-version_from: Lchown.pm
-installdirs:  site
-requires:
-    Test::More:                    0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+---
+name: Lchown
+version: 1.01
+author:
+  - 'Nick Cleaton <nick at cleaton.net>'
+abstract: use the lchown(2) system call from Perl
+license: perl
+resources:
+  license: http://dev.perl.org/licenses/
+build_requires:
+  ExtUtils::CBuilder: 0
+  Test::More: 0
+configure_requires:
+  Module::Build: 0.35
+provides:
+  Lchown:
+    file: lib/Lchown.pm
+    version: 1.01
+generated_by: Module::Build version 0.35
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4

Modified: branches/upstream/liblchown-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/Makefile.PL?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/Makefile.PL (original)
+++ branches/upstream/liblchown-perl/current/Makefile.PL Tue Oct 20 17:08:58 2009
@@ -1,8 +1,6 @@
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
-    'NAME'     	   => 'Lchown',
-    'VERSION_FROM' => 'Lchown.pm',
-    'PREREQ_PM'    => { 'Test::More' => 0 },
-);
-
+# Note: this file was auto-generated by Module::Build::Compat version 0.35
+    use Module::Build::Compat 0.02;
+    
+    Module::Build::Compat->run_build_pl(args => \@ARGV);
+    require Module::Build;
+    Module::Build::Compat->write_makefile(build_class => 'Module::Build');

Modified: branches/upstream/liblchown-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/README?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/README (original)
+++ branches/upstream/liblchown-perl/current/README Tue Oct 20 17:08:58 2009
@@ -12,10 +12,10 @@
 
 INSTALLATION
 
-   perl Makefile.PL
-   make
-   make test
-   make install
+   perl Build.PL
+   ./Build
+   ./Build test
+   ./Build install
 
 This module should build and pass tests on systems without the lchown
 system call.  Any lchown call will fail at runtime on such systems.
@@ -24,9 +24,7 @@
 change, most of the tests will be skipped unless "make test" is run as
 root.
 
-Copyright (C) 2003-2004 by Nick Cleaton
+Copyright 2003-2009 Nick Cleaton, all rights reserved.
 
-This library is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself, either Perl version 5.8.0 or, at
-your option, any later version of Perl 5 you may have available.
-
+This program is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.

Added: branches/upstream/liblchown-perl/current/lib/Lchown.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/lib/Lchown.pm?rev=46120&op=file
==============================================================================
--- branches/upstream/liblchown-perl/current/lib/Lchown.pm (added)
+++ branches/upstream/liblchown-perl/current/lib/Lchown.pm Tue Oct 20 17:08:58 2009
@@ -1,0 +1,103 @@
+package Lchown;
+use strict;
+use warnings;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+
+require Exporter;
+
+ at ISA = qw(Exporter);
+ at EXPORT    = qw(lchown);
+ at EXPORT_OK = qw(lchown LCHOWN_AVAILABLE);
+
+$VERSION = '1.01';
+
+require XSLoader;
+XSLoader::load('Lchown', $VERSION);
+
+sub LCHOWN_AVAILABLE () {
+    defined lchown(0,0) ? 1 : 0;
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Lchown - use the lchown(2) system call from Perl
+
+=head1 SYNOPSIS
+
+  use Lchown;
+
+  lchown $uid, $gid, 'foo' or die "lchown: $!";
+
+  my $count = lchown $uid, $gid, @filenames;
+
+  # or
+  
+  use Lchown qw(lchown LCHOWN_AVAILABLE);
+
+  warn "this system lacks the lchown system call\n" unless LCHOWN_AVAILABLE;
+
+  ...
+
+  # or
+  
+  use Lchown ();
+
+  warn "this won't work\n" unless Lchown::LCHOWN_AVAILABLE;
+  Lchown::lchown $uid, $gid, 'foo' or die "lchown: $!";
+
+=head1 DESCRIPTION
+
+Provides a perl interface to the C<lchown()> system call, on platforms that
+support it.
+
+=head1 DEFAULT EXPORTS
+
+The following symbols are exported be default:
+
+=over
+
+=item lchown (LIST)
+
+Like the C<chown> builtin, but using the C<lchown()> system call so that
+symlinks will not be followed.  Returns the number of files successfully
+changed.
+
+On systems without the C<lchown()> system call, C<lchown> always returns
+C<undef> and sets C<errno> to C<ENOSYS> (Function not implemented).
+
+=back
+
+=head1 ADDITIONAL EXPORTS
+
+The following symbols are available for export but are not exported by
+default:
+
+=over 
+
+=item LCHOWN_AVAILABLE ()
+
+Returns true on platforms with the C<lchown()> system call, and false on
+platforms without.
+
+=back
+
+=head1 SEE ALSO
+
+L<perlfunc/chown>, L<lchown(2)>
+
+=head1 AUTHOR
+
+Nick Cleaton E<lt>nick at cleaton.netE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2003-2009 Nick Cleaton, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut

Added: branches/upstream/liblchown-perl/current/lib/Lchown.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/lib/Lchown.xs?rev=46120&op=file
==============================================================================
--- branches/upstream/liblchown-perl/current/lib/Lchown.xs (added)
+++ branches/upstream/liblchown-perl/current/lib/Lchown.xs Tue Oct 20 17:08:58 2009
@@ -1,0 +1,30 @@
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+
+MODULE = Lchown     PACKAGE = Lchown
+
+PROTOTYPES: ENABLE
+
+SV *
+lchown(owner, group, ...)
+        unsigned owner
+        unsigned group
+    PROTOTYPE: @
+    PREINIT:
+        int i;
+        int ok;
+        STRLEN len;
+    CODE:
+#ifdef HAS_LCHOWN
+        ok = 0;
+        for ( i=2 ; i<items ; i++ )
+            if ( lchown((char *)SvPV(ST(i),len), owner, group) == 0 )
+                ok++;
+        ST(0) = sv_2mortal(newSViv(ok));
+#else
+        errno = ENOSYS;
+        ST(0) = &PL_sv_undef;
+#endif
+

Modified: branches/upstream/liblchown-perl/current/t/allplatforms.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/t/allplatforms.t?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/t/allplatforms.t (original)
+++ branches/upstream/liblchown-perl/current/t/allplatforms.t Tue Oct 20 17:08:58 2009
@@ -1,3 +1,6 @@
+use strict;
+use warnings;
+
 use Test::More (tests => 2);
 
 BEGIN { use_ok('Lchown') }

Modified: branches/upstream/liblchown-perl/current/t/noimport.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/t/noimport.t?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/t/noimport.t (original)
+++ branches/upstream/liblchown-perl/current/t/noimport.t Tue Oct 20 17:08:58 2009
@@ -1,3 +1,6 @@
+use strict;
+use warnings;
+
 use Test::More (tests => 3);
 
 use Lchown ();
@@ -9,7 +12,7 @@
     symlink 'bar', 'foo' or die "symlink: $!";
     my $result = Lchown::lchown 123, 456, 'foo';
     is( $result, 1, "Lchown::Lchown prototype works" );
-    ($uid,$gid) = (lstat 'foo')[4,5];
+    my ($uid,$gid) = (lstat 'foo')[4,5];
     is( $uid, 123, "Lchown::lchown foo set uid 123" );
     is( $gid, 456, "Lchown::lchown foo set gid 456" );
 

Modified: branches/upstream/liblchown-perl/current/t/notsup.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/t/notsup.t?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/t/notsup.t (original)
+++ branches/upstream/liblchown-perl/current/t/notsup.t Tue Oct 20 17:08:58 2009
@@ -1,3 +1,6 @@
+use strict;
+use warnings;
+
 use Test::More (tests => 6);
 
 use Lchown qw(lchown LCHOWN_AVAILABLE);
@@ -11,6 +14,9 @@
     ok( ! defined lchown($uid, $gid), "null lchown call failed" );
     like( $!, '/function not implemented/i', "null lchown gave ENOSYS" );
     
+    my $symlink_exists = eval { symlink("",""); 1 };
+    skip "Symlink not supported", 4 if !defined($symlink_exists);
+
     symlink 'bar', 'foo' or skip "can't make a symlink", 2;
     ok( ! defined lchown($uid, $gid, 'foo'), "valid lchown call failed" );
     like( $!, '/function not implemented/i', "valid lchown gave ENOSYS" );

Modified: branches/upstream/liblchown-perl/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/t/pod-coverage.t?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/t/pod-coverage.t (original)
+++ branches/upstream/liblchown-perl/current/t/pod-coverage.t Tue Oct 20 17:08:58 2009
@@ -1,3 +1,6 @@
+use strict;
+use warnings;
+
 use Test::More;
 eval "use Test::Pod::Coverage 1.00";
 plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;

Modified: branches/upstream/liblchown-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/t/pod.t?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/t/pod.t (original)
+++ branches/upstream/liblchown-perl/current/t/pod.t Tue Oct 20 17:08:58 2009
@@ -1,3 +1,6 @@
+use strict;
+use warnings;
+
 use Test::More;
 eval "use Test::Pod 1.00";
 plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;

Modified: branches/upstream/liblchown-perl/current/t/sup.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblchown-perl/current/t/sup.t?rev=46120&op=diff
==============================================================================
--- branches/upstream/liblchown-perl/current/t/sup.t (original)
+++ branches/upstream/liblchown-perl/current/t/sup.t Tue Oct 20 17:08:58 2009
@@ -1,3 +1,5 @@
+use strict;
+use warnings;
 use Test::More (tests => 17);
 
 use Lchown qw(lchown LCHOWN_AVAILABLE);




More information about the Pkg-perl-cvs-commits mailing list