FreeBSD Bugzilla – Attachment 82752 Details for
Bug 118362
Update port: sysutils/p5-Sys-Filesystem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 11.88 KB, created by
Jim Pirzyk
on 2007-11-30 22:10:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Jim Pirzyk
Created:
2007-11-30 22:10:00 UTC
Size:
11.88 KB
patch
obsolete
>diff -Nru p5-Sys-Filesystem/Makefile p5-Sys-Filesystem.new/Makefile >--- p5-Sys-Filesystem/Makefile Mon Oct 1 05:10:20 2007 >+++ p5-Sys-Filesystem.new/Makefile Thu Nov 29 18:23:18 2007 >@@ -6,8 +6,8 @@ > # > > PORTNAME= Sys-Filesystem >-PORTVERSION= 1.21 >-PORTREVISION= 1 >+PORTVERSION= 1.22 >+#PORTREVISION= 1 > CATEGORIES= sysutils perl5 > MASTER_SITES= ${MASTER_SITE_PERL_CPAN} > MASTER_SITE_SUBDIR= Sys >diff -Nru p5-Sys-Filesystem/distinfo p5-Sys-Filesystem.new/distinfo >--- p5-Sys-Filesystem/distinfo Thu Jun 29 03:36:42 2006 >+++ p5-Sys-Filesystem.new/distinfo Thu Nov 29 18:24:23 2007 >@@ -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 -Nru p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Aix.pm p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Aix.pm >--- p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Aix.pm Wed Dec 31 18:00:00 1969 >+++ p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Aix.pm Fri Nov 30 11:56:02 2007 >@@ -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 -Nru p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Cygwin.pm p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Cygwin.pm >--- p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Cygwin.pm Wed Dec 31 18:00:00 1969 >+++ p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Cygwin.pm Fri Nov 30 11:56:02 2007 >@@ -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 -Nru p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Freebsd.pm p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Freebsd.pm >--- p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Freebsd.pm Mon Sep 18 13:13:41 2006 >+++ p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Freebsd.pm Fri Nov 30 13:05:28 2007 >@@ -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 -Nru p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Linux.pm p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Linux.pm >--- p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Linux.pm Wed Dec 31 18:00:00 1969 >+++ p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Linux.pm Fri Nov 30 11:56:02 2007 >@@ -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 -Nru p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Solaris.pm p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Solaris.pm >--- p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Solaris.pm Wed Dec 31 18:00:00 1969 >+++ p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Solaris.pm Fri Nov 30 11:56:02 2007 >@@ -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 -Nru p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Unix.pm p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Unix.pm >--- p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem-Unix.pm Wed Dec 31 18:00:00 1969 >+++ p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem-Unix.pm Fri Nov 30 11:56:02 2007 >@@ -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 -Nru p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem.pm p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem.pm >--- p5-Sys-Filesystem/files/patch-lib-Sys-Filesystem.pm Fri Nov 30 09:36:47 2007 >+++ p5-Sys-Filesystem.new/files/patch-lib-Sys-Filesystem.pm Fri Nov 30 11:56:02 2007 >@@ -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';
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 118362
: 82752