aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2001-12-06 23:55:28 +0800
committersheldonh <sheldonh@FreeBSD.org>2001-12-06 23:55:28 +0800
commit9d33e80972b2b6d60d950e78064e242c63b9c7c5 (patch)
treea555c963253753ca56039fb4c1c2b0eeb3b85b54 /www
parentd76074696f8051bda87028df63c9f9d2fd42b9b8 (diff)
downloadfreebsd-ports-gnome-9d33e80972b2b6d60d950e78064e242c63b9c7c5.tar.gz
freebsd-ports-gnome-9d33e80972b2b6d60d950e78064e242c63b9c7c5.tar.zst
freebsd-ports-gnome-9d33e80972b2b6d60d950e78064e242c63b9c7c5.zip
Add patches that cause Apache::Session to give the administrator a
clue as to WHICH file or directory is missing when it dies because it is unable to create, read or write a session file. Without these patches, setting up things like PageKit and other mod_perl-based software can be much more time-consuming than it needs to be. These patches will be submitted back to the author.
Diffstat (limited to 'www')
-rw-r--r--www/p5-Apache-Session/Makefile1
-rw-r--r--www/p5-Apache-Session/files/patch-Session::Lock::File.pm24
-rw-r--r--www/p5-Apache-Session/files/patch-Session::Store::File.pm71
3 files changed, 96 insertions, 0 deletions
diff --git a/www/p5-Apache-Session/Makefile b/www/p5-Apache-Session/Makefile
index 9f19cd754b49..fce8182480a5 100644
--- a/www/p5-Apache-Session/Makefile
+++ b/www/p5-Apache-Session/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Apache-Session
PORTVERSION= 1.54
+PORTREVISION= 1
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Apache
diff --git a/www/p5-Apache-Session/files/patch-Session::Lock::File.pm b/www/p5-Apache-Session/files/patch-Session::Lock::File.pm
new file mode 100644
index 000000000000..aea3c01aad72
--- /dev/null
+++ b/www/p5-Apache-Session/files/patch-Session::Lock::File.pm
@@ -0,0 +1,24 @@
+--- Session/Lock/File.pm.orig Sat Sep 2 00:21:17 2000
++++ Session/Lock/File.pm Thu Dec 6 17:37:40 2001
+@@ -36,8 +36,9 @@
+
+ my $LockDirectory = $session->{args}->{LockDirectory} ||
+ $Apache::Session::Lock::File::LockDirectory;
++ my $LockFile = $LockDirectory."/Apache-Session-".$session->{data}->{_session_id}.".lock";
+
+- open($fh, "+>".$LockDirectory."/Apache-Session-".$session->{data}->{_session_id}.".lock") || die $!;
++ open($fh, "+> $LockFile") || die "$LockFile: $!";
+
+ $self->{fh} = $fh;
+ $self->{opened} = 1;
+@@ -58,8 +59,9 @@
+
+ my $LockDirectory = $session->{args}->{LockDirectory} ||
+ $Apache::Session::Lock::File::LockDirectory;
++ my $LockFile = $LockDirectory."/Apache-Session-".$session->{data}->{_session_id}.".lock";
+
+- open($fh, "+>".$LockDirectory."/Apache-Session-".$session->{data}->{_session_id}.".lock") || die $!;
++ open($fh, "+> $LockFile") || die "$LockFile: $!";
+
+ $self->{fh} = $fh;
+ $self->{opened} = 1;
diff --git a/www/p5-Apache-Session/files/patch-Session::Store::File.pm b/www/p5-Apache-Session/files/patch-Session::Store::File.pm
new file mode 100644
index 000000000000..27d0b3aa903d
--- /dev/null
+++ b/www/p5-Apache-Session/files/patch-Session::Store::File.pm
@@ -0,0 +1,71 @@
+--- Session/Store/File.pm.orig Mon Jul 24 05:44:52 2000
++++ Session/Store/File.pm Thu Dec 6 17:49:31 2001
+@@ -33,13 +33,14 @@
+ my $session = shift;
+
+ my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
++ my $file = $directory.'/'.$session->{data}->{_session_id};
+
+- if (-e $directory.'/'.$session->{data}->{_session_id}) {
+- die "Object already exists in the data store";
++ if (-e $file) {
++ die "Object already exists in the data store: $file";
+ }
+
+- sysopen ($self->{fh}, $directory.'/'.$session->{data}->{_session_id}, O_RDWR|O_CREAT) ||
+- die "Could not open file: $!";
++ sysopen ($self->{fh}, $file, O_RDWR|O_CREAT) ||
++ die "Could not open $file: $!";
+
+ $self->{opened} = 1;
+
+@@ -51,10 +52,11 @@
+ my $session = shift;
+
+ my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
++ my $file = $directory.'/'.$session->{data}->{_session_id};
+
+ if (!$self->{opened}) {
+- sysopen ($self->{fh}, $directory.'/'.$session->{data}->{_session_id}, O_RDWR|O_CREAT) ||
+- die "Could not open file: $!";
++ sysopen ($self->{fh}, $file, O_RDWR|O_CREAT) ||
++ die "Could not open $file: $!";
+
+ $self->{opened} = 1;
+ }
+@@ -69,11 +71,12 @@
+ my $session = shift;
+
+ my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
++ my $file = $directory.'/'.$session->{data}->{_session_id};
+
+- if (-e $directory.'/'.$session->{data}->{_session_id}) {
++ if (-e $file) {
+ if (!$self->{opened}) {
+- sysopen ($self->{fh}, $directory.'/'.$session->{data}->{_session_id}, O_RDWR|O_CREAT) ||
+- die "Could not open file: $!";
++ sysopen ($self->{fh}, $file, O_RDWR|O_CREAT) ||
++ die "Could not open $file: $!";
+
+ $self->{opened} = 1;
+ }
+@@ -96,15 +99,16 @@
+ my $session = shift;
+
+ my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
++ my $file = $directory.'/'.$session->{data}->{_session_id};
+
+ if ($self->{opened}) {
+ CORE::close $self->{fh};
+ $self->{opened} = 0;
+ }
+
+- if (-e $directory.'/'.$session->{data}->{_session_id}) {
+- unlink ($directory.'/'.$session->{data}->{_session_id}) ||
+- die "Could not remove file: $!";
++ if (-e $file) {
++ unlink ($file) ||
++ die "Could not remove $file: $!";
+ }
+ else {
+ die "Object does not exist in the data store";