diff options
| author | Martin Wilke <miwi@FreeBSD.org> | 2007-12-15 23:19:41 +0000 |
|---|---|---|
| committer | Martin Wilke <miwi@FreeBSD.org> | 2007-12-15 23:19:41 +0000 |
| commit | d6cd0dce2b499edf414871a4010fc8be0ddb80c9 (patch) | |
| tree | d1797cba18a100db5c32f9198995fe0b08764c86 /sysutils/p5-Sys-Filesystem | |
| parent | 810f84e649e95e4dfb4625500125a20143de862e (diff) | |
Notes
Diffstat (limited to 'sysutils/p5-Sys-Filesystem')
9 files changed, 184 insertions, 25 deletions
diff --git a/sysutils/p5-Sys-Filesystem/Makefile b/sysutils/p5-Sys-Filesystem/Makefile index 0ac5038d366e..e55411e8e72a 100644 --- a/sysutils/p5-Sys-Filesystem/Makefile +++ b/sysutils/p5-Sys-Filesystem/Makefile @@ -5,11 +5,10 @@ # $FreeBSD$ # -PORTNAME= Sys-Filesystem -PORTVERSION= 1.21 -PORTREVISION= 1 +PORTNAME= Sys-Filesystem +PORTVERSION= 1.22 CATEGORIES= sysutils perl5 -MASTER_SITES= ${MASTER_SITE_PERL_CPAN} +MASTER_SITES= CPAN MASTER_SITE_SUBDIR= Sys PKGNAMEPREFIX= p5- diff --git a/sysutils/p5-Sys-Filesystem/distinfo b/sysutils/p5-Sys-Filesystem/distinfo index 80222ebd5259..c93551d6afd9 100644 --- a/sysutils/p5-Sys-Filesystem/distinfo +++ b/sysutils/p5-Sys-Filesystem/distinfo @@ -1,3 +1,3 @@ -MD5 (Sys-Filesystem-1.21.tar.gz) = 99bdb1a37ed2fde8e6ebede2c36c117e -SHA256 (Sys-Filesystem-1.21.tar.gz) = 9d5a706f730bbdf013d610c46e32b8c2bb8663382799976df8eb1e6fa17483c5 -SIZE (Sys-Filesystem-1.21.tar.gz) = 18352 +MD5 (Sys-Filesystem-1.22.tar.gz) = c73754f0ad3c2ae9cb9552ca70010e8c +SHA256 (Sys-Filesystem-1.22.tar.gz) = 32a10085fc347dd7e02e4df7d2bb2eff9dd7e3528471e7e82f57e0965172fcb2 +SIZE (Sys-Filesystem-1.22.tar.gz) = 18722 diff --git a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Aix.pm b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Aix.pm new file mode 100644 index 000000000000..c9f7d3137bbd --- /dev/null +++ b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Aix.pm @@ -0,0 +1,57 @@ +--- ./lib/Sys/Filesystem/Aix.pm.orig Thu Jun 1 14:10:48 2006 ++++ ./lib/Sys/Filesystem/Aix.pm Fri Nov 30 11:39:17 2007 +@@ -37,7 +37,7 @@ + $args{fstab} ||= '/etc/filesystems'; + + my @fstab_keys = qw(account boot check dev free mount nodename size type vfs vol log); +- my @special_fs = qw(swap procfs proc tmpfs nfs mntfs autofs); ++ push (@Sys::Filesystem::special_fs, qw(procfs mntfs)); + + # Read the fstab + my $fstab = new FileHandle; +@@ -53,18 +53,43 @@ + + # This matches a filesystem attribute + } elsif (my ($key,$value) = $_ =~ /^\s*([a-z]{3,8})\s+=\s+"?(.+)"?\s*$/) { +- $self->{$current_filesystem}->{$key} = $value; + $self->{$current_filesystem}->{unmounted} = -1; # Unknown mount state? + if ($key eq 'vfs') { +- if (grep(/^$value$/, @special_fs)) { ++ if (grep(/^$value$/, @Sys::Filesystem::special_fs)) { + $self->{$current_filesystem}->{special} = 1; + } ++ $self->{$current_filesystem}->{type} = $value; ++ } else { ++ $self->{$current_filesystem}->{$key} = $value ++ if ( $key ne 'type'); + } + } + } + $fstab->close; + } else { + croak "Unable to open fstab file ($args{fstab})\n"; ++ } ++ ++ # /dev/hd4 / jfs Apr 02 13:45 rw,log=/dev/hd8 ++ if ($fstab->open('/usr/sbin/mount -p|')) { ++ while (<$fstab>) { ++ my ($device, $mount_point, $fstype); ++ grep (m|^\s+(/\S+)\s+(/\S+)\s+(\S+)| ++ && ($device=$1, $mount_point=$2, $fstype=$3), $_); ++ ++ if ( defined $mount_point ) { ++ $self->{$mount_point}->{mounted} = 1; ++ $self->{$mount_point}->{device} = $device; ++ $self->{$mount_point}->{mount_point} = $mount_point; ++ $self->{$mount_point}->{fs_vfstype} = $fstype; ++ if (grep(/^$fstype$/, @Sys::Filesystem::special_fs)) { ++ $self->{$mount_point}->{special} = 1; ++ } ++ } ++ } ++ $fstab->close; ++ } else { ++ croak "Unable to run mount command\n"; + } + + bless($self,$class); diff --git a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Cygwin.pm b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Cygwin.pm new file mode 100644 index 000000000000..b314d867c0eb --- /dev/null +++ b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Cygwin.pm @@ -0,0 +1,20 @@ +--- ./lib/Sys/Filesystem/Cygwin.pm.orig Thu Jun 1 14:10:48 2006 ++++ ./lib/Sys/Filesystem/Cygwin.pm Fri Nov 30 11:39:17 2007 +@@ -36,7 +36,7 @@ + + local $/ = "\n"; + my @keys = qw(fs_spec fs_file fs_vfstype fs_mntops); +- my @special_fs = qw(swap proc devpts tmpfs); ++ push (@Sys::Filesystem::special_fs, qw(devpts)); + + my $mtab = new FileHandle; + if ($mtab->open('mount|')) { +@@ -44,7 +44,7 @@ + next if (/^\s*#/ || /^\s*$/); + if (my @vals = $_ =~ /^\s*(.+?) on (\/.+?) type (\S+) \((\S+)\)\s*$/) { + $self->{$vals[1]}->{mounted} = 1; +- $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@special_fs); ++ $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@Sys::Filesystem::special_fs); + for (my $i = 0; $i < @keys; $i++) { + $self->{$vals[1]}->{$keys[$i]} = $vals[$i]; + } diff --git a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Freebsd.pm b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Freebsd.pm index d9eed00ef66e..7cc5542203ad 100644 --- a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Freebsd.pm +++ b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Freebsd.pm @@ -1,6 +1,6 @@ ---- ./lib/Sys/Filesystem/Freebsd.pm.orig Mon Sep 18 11:07:46 2006 -+++ ./lib/Sys/Filesystem/Freebsd.pm Mon Sep 18 11:10:30 2006 -@@ -26,20 +26,33 @@ +--- ./lib/Sys/Filesystem/Freebsd.pm.orig Thu Jun 1 14:10:48 2006 ++++ ./lib/Sys/Filesystem/Freebsd.pm Fri Nov 30 11:53:45 2007 +@@ -26,32 +26,46 @@ use FileHandle; use Carp qw(croak); @@ -24,6 +24,7 @@ ref(my $class = shift) && croak 'Class name required'; my %args = @_; my $self = { }; ++ my (@vals, $i); $args{fstab} ||= '/etc/fstab'; - $args{mtab} ||= '/etc/mtab'; @@ -33,11 +34,26 @@ my @keys = qw(fs_spec fs_file fs_vfstype fs_mntops fs_freq fs_passno); - my @special_fs = qw(swap proc devpts tmpfs); -+ my @special_fs = qw(swap procfs devpts devfs tmpfs); ++ push (@Sys::Filesystem::special_fs, qw(procfs devpts devfs)); # Read the fstab my $fstab = new FileHandle; -@@ -60,24 +73,42 @@ + if ($fstab->open($args{fstab})) { + while (<$fstab>) { + next if (/^\s*#/ || /^\s*$/); +- my @vals = split(/\s+/, $_); ++ @vals = split(/\s+/, $_); + $self->{$vals[1]}->{mount_point} = $vals[1]; + $self->{$vals[1]}->{device} = $vals[0]; + $self->{$vals[1]}->{unmounted} = 1; +- $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@special_fs); +- for (my $i = 0; $i < @keys; $i++) { ++ $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@Sys::Filesystem::special_fs); ++ for ($i = 0; $i < @keys; $i++) { + $self->{$vals[1]}->{$keys[$i]} = $vals[$i]; + } + } +@@ -60,24 +74,42 @@ croak "Unable to open fstab file ($args{fstab})\n"; } @@ -66,16 +82,16 @@ + $buf = ' ' x ( $sizeof * $cnt ); + + if ( ($cnt=syscall(&SYS_getfsstat, $buf, length $buf, &MNT_NOWAIT)) ) { -+ for (my ($i) = 0; $i < $cnt; $i++) { ++ for (($i) = 0; $i < $cnt; $i++) { + + my $offset = ($i)? 'x' . ($i * $sizeof): ''; -+ my @vals = unpack ( $offset . $format, $buf); ++ @vals = unpack ( $offset . $format, $buf); + + delete $self->{$vals[3]}->{unmounted} if exists $self->{$vals[3]}->{unmounted}; + $self->{$vals[3]}->{mounted} = 1; + $self->{$vals[3]}->{mount_point} = $vals[3]; + $self->{$vals[3]}->{device} = $vals[2]; -+ $self->{$vals[3]}->{special} = 1 if grep(/^$vals[1]$/,@special_fs); ++ $self->{$vals[3]}->{special} = 1 if grep(/^$vals[1]$/,@Sys::Filesystem::special_fs); + + $self->{$vals[3]}->{fs_spec} = $vals[2]; + $self->{$vals[3]}->{fs_file} = $vals[3]; diff --git a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Linux.pm b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Linux.pm new file mode 100644 index 000000000000..f8b214cb1bab --- /dev/null +++ b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Linux.pm @@ -0,0 +1,19 @@ +--- ./lib/Sys/Filesystem/Linux.pm.orig Thu Jun 1 14:10:48 2006 ++++ ./lib/Sys/Filesystem/Linux.pm Fri Nov 30 11:39:17 2007 +@@ -41,6 +41,7 @@ + + # Default fstab and mtab layout + my @keys = qw(fs_spec fs_file fs_vfstype fs_mntops fs_freq fs_passno); ++ push (@Sys::Filesystem::special_fs, qw(devpts usbfs sysfs binfmt_misc rpc_pipefs)); + + # Read the fstab + my $fstab = new FileHandle; +@@ -54,7 +55,7 @@ + $self->{$vals[1]}->{mount_point} = $vals[1]; + $self->{$vals[1]}->{device} = $vals[0]; + $self->{$vals[1]}->{unmounted} = 1; +- $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,qw(swap proc devpts tmpfs)); ++ $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@Sys::Filesystem::special_fs); + for (my $i = 0; $i < @keys; $i++) { + $self->{$vals[1]}->{$keys[$i]} = $vals[$i]; + } diff --git a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Solaris.pm b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Solaris.pm new file mode 100644 index 000000000000..0a623ddb862f --- /dev/null +++ b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Solaris.pm @@ -0,0 +1,29 @@ +--- ./lib/Sys/Filesystem/Solaris.pm.orig Thu Jun 1 14:10:48 2006 ++++ ./lib/Sys/Filesystem/Solaris.pm Fri Nov 30 11:39:17 2007 +@@ -42,7 +42,7 @@ + my @fstab_keys = qw(device device_to_fsck mount_point fs_vfstype fs_freq mount_at_boot fs_mntops); + my @mtab_keys = qw(device mount_point fs_vfstype fs_mntops time); + +- my @special_fs = qw(swap proc procfs tmpfs nfs mntfs autofs lofs fd ctfs devfs objfs cachefs); ++ push (@Sys::Filesystem::special_fs, qw(mntfs lofs fd ctfs devfs objfs cachefs)); + local $/ = "\n"; + + # Read the fstab +@@ -57,7 +57,7 @@ + $vals[$i] = '' unless defined $vals[$i]; + } + $self->{$vals[2]}->{unmounted} = 1; +- $self->{$vals[2]}->{special} = 1 if grep(/^$vals[3]$/,@special_fs); ++ $self->{$vals[2]}->{special} = 1 if grep(/^$vals[3]$/,@Sys::Filesystem::special_fs); + for (my $i = 0; $i < @fstab_keys; $i++) { + $self->{$vals[2]}->{$fstab_keys[$i]} = $vals[$i]; + } +@@ -77,7 +77,7 @@ + my @vals = split(/\s+/, $_); + delete $self->{$vals[1]}->{unmounted} if exists $self->{$vals[1]}->{unmounted}; + $self->{$vals[1]}->{mounted} = 1; +- $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@special_fs); ++ $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@Sys::Filesystem::special_fs); + for (my $i = 0; $i < @mtab_keys; $i++) { + $self->{$vals[1]}->{$mtab_keys[$i]} = $vals[$i]; + } diff --git a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Unix.pm b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Unix.pm new file mode 100644 index 000000000000..526243e8dd69 --- /dev/null +++ b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Unix.pm @@ -0,0 +1,19 @@ +--- ./lib/Sys/Filesystem/Unix.pm.orig Thu Jun 1 14:10:48 2006 ++++ ./lib/Sys/Filesystem/Unix.pm Fri Nov 30 11:39:17 2007 +@@ -41,7 +41,6 @@ + + # Default fstab and mtab layout + my @keys = qw(fs_spec fs_file fs_vfstype fs_mntops fs_freq fs_passno); +- my @special_fs = qw(swap proc); + + # Read the fstab + my $fstab = new FileHandle; +@@ -54,7 +53,7 @@ + $self->{$vals[1]}->{mount_point} = $vals[1]; + $self->{$vals[1]}->{device} = $vals[0]; + $self->{$vals[1]}->{unmounted} = 1; +- $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@special_fs); ++ $self->{$vals[1]}->{special} = 1 if grep(/^$vals[2]$/,@Sys::Filesystem::special_fs); + for (my $i = 0; $i < @keys; $i++) { + $self->{$vals[1]}->{$keys[$i]} = $vals[$i]; + } diff --git a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem.pm b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem.pm index c4d3344b99de..9b84ef611989 100644 --- a/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem.pm +++ b/sysutils/p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem.pm @@ -1,11 +1,11 @@ ---- lib/Sys/Filesystem.pm.orig Fri May 26 12:06:39 2006 -+++ lib/Sys/Filesystem.pm Fri May 26 12:06:40 2006 -@@ -108,7 +108,7 @@ - # Invert logic for regular - if (exists $params->{regular}) { - delete $params->{regular}; -- $params->{regular} = undef; -+ $params->{special} = undef; - } +--- ./lib/Sys/Filesystem.pm.orig Thu Jun 1 14:10:48 2006 ++++ ./lib/Sys/Filesystem.pm Fri Nov 30 11:39:17 2007 +@@ -30,6 +30,8 @@ + use vars qw($VERSION $AUTOLOAD); + $VERSION = '1.22' || sprintf('%d', q$Revision: 574 $ =~ /(\d+)/g); - my @filesystems = (); ++our @special_fs = qw(swap proc tmpfs nfs autofs); ++ + sub new { + # Check we're being called correctly with a class name + ref(my $class = shift) && croak 'Class name required'; |
