r8259 - in /branches/upstream/libquota-perl/current: CHANGES Quota.pm README contrib/mount-list-qcarg.pl

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sun Oct 14 15:56:27 UTC 2007


Author: gregoa-guest
Date: Sun Oct 14 15:56:26 2007
New Revision: 8259

URL: http://svn.debian.org/wsvn/?sc=1&rev=8259
Log:
[svn-upgrade] Integrating new upstream version, libquota-perl (1.6.0+dfsg)

Modified:
    branches/upstream/libquota-perl/current/CHANGES
    branches/upstream/libquota-perl/current/Quota.pm
    branches/upstream/libquota-perl/current/README
    branches/upstream/libquota-perl/current/contrib/mount-list-qcarg.pl

Modified: branches/upstream/libquota-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/branches/upstream/libquota-perl/current/CHANGES?rev=8259&op=diff
==============================================================================
--- branches/upstream/libquota-perl/current/CHANGES (original)
+++ branches/upstream/libquota-perl/current/CHANGES Sun Oct 14 15:56:26 2007
@@ -1,3 +1,8 @@
+Changes in 1.6.0 (October 2007)
+- Work-around for different getmntent() semantics for linux loop mounts
+  Thanks Wouter de Jong (wouter at widexs.nl) for reporting this issue.
+- (late) version bump due to the interface change in 1.5.2
+
 Changes in 1.5.2 (October 2007)
 - Added support for new quotactl() parameters in JFS2 on AIX 5.3.
   Thanks to Joshua Frigerio (joshua at uic.edu) for providing a development

Modified: branches/upstream/libquota-perl/current/Quota.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libquota-perl/current/Quota.pm?rev=8259&op=diff
==============================================================================
--- branches/upstream/libquota-perl/current/Quota.pm (original)
+++ branches/upstream/libquota-perl/current/Quota.pm Sun Oct 14 15:56:26 2007
@@ -22,7 +22,7 @@
 @ISA = qw(Exporter DynaLoader);
 @EXPORT = ();
 
-$VERSION = '1.5.1';
+$VERSION = '1.6.0';
 
 bootstrap Quota;
 
@@ -65,20 +65,30 @@
   my($dev) = (stat($target))[0];
   my($ret) = undef;
   my($argtyp,$fsupp) = (Quota::getqcargtype() =~ /([^,]*)(,.*)?/);
-  my($fsname,$path,$fstyp);
+  my($fsname,$path,$fstyp,$fsopt);
 
   if(defined($dev) && ($target ne "") && !Quota::setmntent()) {
-    while(($fsname,$path,$fstyp) = Quota::getmntent()) {
+    while(($fsname,$path,$fstyp,$fsopt) = Quota::getmntent()) {
       next if $fstyp =~ /^(lofs|ignore|auto.*|proc)$/;
       my($pdev) = (stat($path))[0];
       if (defined($pdev) && ($dev == $pdev)) {
-	if($fsname =~ m|^[^/]+:/|) { $ret = $fsname }   #NFS host:/path
-        elsif (($fstyp =~ /^nfs/i) && ($fsname =~ m#^(/.*)\@([^/]+)$#))
-                                   { $ret = "$2:$1" }   #NFS /path at host
-	elsif($argtyp eq "dev")    { $ret = $fsname }
-	elsif($argtyp eq "qfile")  { $ret = "$path/quotas" }
-	elsif($argtyp eq "any")    { $ret = $target }
-	else                       { $ret = $path }     #($argtyp eq "mntpt")
+        if ($fsname =~ m|^[^/]+:/|) {
+          $ret = $fsname;  #NFS host:/path
+        } elsif (($fstyp =~ /^nfs/i) && ($fsname =~ m#^(/.*)\@([^/]+)$#)) {
+          $ret = "$2:$1";  #NFS /path at host
+        } elsif ($argtyp eq "dev") {
+          if ($fsopt =~ m#(^|,)loop=(/dev/[^,]+)#) {
+            $ret = $2;  # Linux mount -o loop
+          } else {
+            $ret = $fsname;
+          }
+        } elsif ($argtyp eq "qfile") {
+          $ret = "$path/quotas";
+        } elsif ($argtyp eq "any") {
+          $ret = $target;
+        } else { #($argtyp eq "mntpt")
+          $ret = $path;
+        }
 
         # XFS, VxFS and AFS quotas require separate access methods
         # (optional for VxFS: later versions use 'normal' quota interface)
@@ -147,7 +157,7 @@
     Quota::rpcauth([$uid [,$gid [,$hostname]]]);
 
     Quota::setqlim($dev, $uid, $block_soft, $block_hard,
-		   $inode_soft, $inode_hard [,$tlo [,kind]]);
+                   $inode_soft, $inode_hard [,$tlo [,kind]]);
 
     Quota::sync([$dev]);
 
@@ -226,8 +236,8 @@
 
 When I<$kind> is given and set to 1, I<$uid> is taken as gid and
 group quota limits are set. This is supported only on a few
-architectures (see above).When I<$kind> is set to 2, project quotas
-are modified; this is currently only supported for XFS.
+architectures (see above). When I<$kind> is set to 2, project
+quotas are modified; this is currently only supported for XFS.
 When unsupported, this flag is ignored.
 
 Note: if you want to set the quota of a particular user to zero, i.e.

Modified: branches/upstream/libquota-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libquota-perl/current/README?rev=8259&op=diff
==============================================================================
--- branches/upstream/libquota-perl/current/README (original)
+++ branches/upstream/libquota-perl/current/README Sun Oct 14 15:56:26 2007
@@ -3,27 +3,28 @@
 
 Author:    Tom Zoerner (email: tomzo AT nefkom DOT net)
 
-Version:   1.5.2
+Version:   1.6.0
 Date:      October 2007
-DSLI-code: Rdcf
+DLSIP-Code:Rcdfg
            - stable release
+           - C compiler required for installation
            - support by developer
-           - C compiler required for installation
            - plain functions, no references used
+           - licensed under the Perl Artistic License or
+             (at your option) version 2 or later of the
+             GNU General Public License
+Location:  http://www.perl.com/CPAN/authors/Tom_Zoerner/
+
 Supported: SunOS 4.1.3,
-           Solaris 2.4 & 2.5 & 2.6,
+           Solaris 2.4 & 2.5 & 2.6 & 2.8,
            HP-UX 9.0x & 10.10 & 10.20 & 11.00,
            IRIX 5.2 & 5.3 & 6.2 - 6.5,
            OSF/1 & Digital Unix 4,
            BSDi 2, FreeBSD 3, OpenBSD & NetBSD (no RPC),
-           Linux - kernel 2.0.30 and later, incl. Quota API v2,
-           AIX 4.1 & 4.2.
+           Linux - kernel 2.0.30 and later, incl. Quota API v2 and XFS,
+           AIX 4.1, 4.2 and 5.3.
            AFS (Andrew File System) on many of the above (see INSTALL),
 	   VxFS (Veritas File System) on Solaris 2.
-Location:  http://www.perl.com/CPAN/authors/Tom_Zoerner/
-Author:    TOMZO  (Tom Zoerner)
-License:   Same as Perl: Artistic License or GPL version 2 or later;
-           See also http://www.opensource.org/licenses/
 
 Documentation is in pod format at the end of Quota.pm,
 installation hints are in a file named INSTALL inside this package.
@@ -44,7 +45,7 @@
 
          ($block_curr, $block_soft, $block_hard, $block_timelimit,
           $inode_curr, $inode_soft, $inode_hard, $inode_timelimit) =
-         Quota::query($dev [,$uid [,isgrp]]);
+         Quota::query($dev [,$uid [,kind]]);
 
          ($block_curr, $block_soft, $block_hard, $block_timelimit,
           $inode_curr, $inode_soft, $inode_hard, $inode_timelimit) =
@@ -53,7 +54,7 @@
          Quota::rpcpeer([$port [,$use_tcp [,timeout]]]);
 
          Quota::setqlim($dev, $uid, $block_soft, $block_hard,
-                        $inode_soft, $inode_hard [,$tlo [,isgrp]]);
+                        $inode_soft, $inode_hard [,$tlo [,kind]]);
 
          Quota::sync([$dev]);
 
@@ -75,7 +76,7 @@
 
      Functions
 
-     ($bc,$bs,$bh,$bt, $ic,$is,$ih,$it) = Quota::query($dev, $uid, $isgrp)
+     ($bc,$bs,$bh,$bt, $ic,$is,$ih,$it) = Quota::query($dev, $uid, $kind)
          Get current usage and quota limits for a given file
          system and user.  The user is specified by its numeric
          uid; defaults to the process' real uid.
@@ -112,14 +113,15 @@
 	 systems Quota::query will return undef in that case and
 	 errno will be set to ESRCH.
 
-         When $isgrp is given and set to 1, $uid is taken as gid
+         When $kind is given and set to 1, $uid is taken as gid
          and group quotas are queried. This is not supported across
          RPC and even locally only on a few architectures (e.g. Linux
          and other BSD based Unix variants, OSF/1 and AIX - check the
-         quotactl(2) man page on your systems). If unsupported, this
-         flag is ignored.
-
-     Quota::setqlim($dev, $uid, $bs,$bh, $is,$ih, $tlo, $isgrp)
+         quotactl(2) man page on your systems).  When $kind is set
+         to 2, project quotas are queried; this is currently only
+         supported for XFS.  When unsupported, this flag is ignored.
+
+     Quota::setqlim($dev, $uid, $bs,$bh, $is,$ih, $tlo, $kind)
          Sets quota limits for the given user. Meanings of $dev,
          $uid, $bs, $bh, $is and $ih are the same as in
          Quota::query.
@@ -131,10 +133,11 @@
          are set to 7.0 days.  More alternatives (i.e. setting a
          specific time) aren't available in most implementations.
 
-         When $isgrp is given and set to 1, $uid is taken as gid
+         When $kind is given and set to 1, $uid is taken as gid
          and group quota limits are set. This is supported only on a
-         few architectures (see above). If unsupported, this flag
-         is ignored.
+         few architectures (see above).  When I<$kind> is set to 2,
+         project quotas are modified; this is currently only supported
+         for XFS.  When unsupported, this flag is ignored.
 
          Note: if you want to set the quota of a particular user
          to zero, i.e.  no write permission, you must not set all

Modified: branches/upstream/libquota-perl/current/contrib/mount-list-qcarg.pl
URL: http://svn.debian.org/wsvn/branches/upstream/libquota-perl/current/contrib/mount-list-qcarg.pl?rev=8259&op=diff
==============================================================================
--- branches/upstream/libquota-perl/current/contrib/mount-list-qcarg.pl (original)
+++ branches/upstream/libquota-perl/current/contrib/mount-list-qcarg.pl Sun Oct 14 15:56:26 2007
@@ -6,14 +6,14 @@
 my($fsname,$path,$fstyp);
 
 if(!Quota::setmntent()) {
-   while(($fsname,$path,$fstyp) = Quota::getmntent())
+   while(($fsname,$path,$fstyp,$opt) = Quota::getmntent())
    {
-      push(@Mtab, "#$fsname#$path#$fstyp#");
+      push(@Mtab, "#$fsname#$path#$fstyp#$opt#");
    }
 }
 Quota::endmntent();
 
-print Quota::getqcargtype() ."\n\n";
+print "Quota arg type=". Quota::getqcargtype() ."\n\n";
 
 foreach (@Mtab)
 {




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