found 337197 0.99-svn060811-1
tags 337197 + upstream
tags 337197 + patch
thanks

Hi Francesco!

I cc:ed Apache::Gallery author, given that AFAIK the user mailing lists
does not work anymore <http://apachegallery.dk/?p=mailinglists>.

On Thu, 03 Nov 2005 09:09:42 +0100, Francesco Potorti` wrote:
> The default directory for the cached files is /var/tmp/Apache-Gallery.
> I argue that it should be a directory under /var/cache/apache.

Fully agree, according to the File Hierarchy Standard v2.3:

- /var/tmp : Temporary files preserved between system reboots

    
<http://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE>

  Purpose

  The /var/tmp directory is made available for programs that require
  temporary files or directories that are preserved between system
  reboots. Therefore, data stored in /var/tmp is more persistent than
  data in /tmp.

  Files and directories located in /var/tmp must not be deleted when the
  system is booted. Although data stored in /var/tmp is typically
  deleted in a site-specific manner, it is recommended that deletions
  occur at a less frequent interval than /tmp.

- /var/cache : Application cache data

    <http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA>

  Purpose

  /var/cache is intended for cached data from applications. Such data is
  locally generated as a result of time-consuming I/O or
  calculation. The application must be able to regenerate or restore the
  data. Unlike /var/spool, the cached files can be deleted without data
  loss. The data must remain valid between invocations of the
  application and rebooting the system.

  Files located under /var/cache may be expired in an application
  specific manner, by the system administrator, or both. The application
  must always be able to recover from manual deletion of these files
  (generally because of a disk space shortage). No other requirements
  are made on the data format of the cache directories.

  Rationale

  The existence of a separate directory for cached data allows system
  administrators to set different disk and backup policies from other
  directories in /var.

  Specific Options

  Directory       Description
  fonts           Locally-generated fonts (optional)
  man             Locally-formatted manual pages (optional)
  www             WWW proxy or cache data (optional)
  <package>       Package specific cache data (optional)

However, I am not sure /var/cache/apache is a good solution either,
given that the cached files are webserver-agnostic, which should mean
that they could be used by different webservers (untested).  Thus, as
the FHS suggests, I would go for /var/cache/www.

The second attached patch implements the above, while the first one
fixes some spelling typos.

At least on Debian, please note that /var/cache/www does not exist by
default, which means that the Debian package must include it, given that
unfortunately Apache::Gallery can not create it by itself.  I have not
added this note to the Apache::Gallery documentation because I consider
it implicit.  If needed, I can provide such a patch, too.

Thx, bye,
Gismo / Luca

diff -Naur Apache-Gallery-1.0.1_Debian-423004-2/Changes Apache-Gallery-1.0.1/Changes
--- Apache-Gallery-1.0.1_Debian-423004-2/Changes	2011-03-16 01:42:51.663897502 +0100
+++ Apache-Gallery-1.0.1/Changes	2011-03-16 01:52:07.185911711 +0100
@@ -3,8 +3,9 @@
 
 Revision history for Perl extension Apache::Gallery.
 
-1.0.2~1 Wed Mar 16 01:17:35 CET 2011
+1.0.2~1 Wed Mar 16 01:52:06 CET 2011
 
+	- Fixed spelling typos in Gallery.pm and README.  (Luca Capello)
 	- Extended GalleryUnderscoresToSpaces to filenames as well.
 	  (Debian bug #348724, Francesco Potortì)
 	- Added txt to GalleryDocFile, the code in Gallery.pm already
diff -Naur Apache-Gallery-1.0.1_Debian-423004-2/lib/Apache/Gallery.pm Apache-Gallery-1.0.1/lib/Apache/Gallery.pm
--- Apache-Gallery-1.0.1_Debian-423004-2/lib/Apache/Gallery.pm	2011-03-16 01:07:35.126741291 +0100
+++ Apache-Gallery-1.0.1/lib/Apache/Gallery.pm	2011-03-16 01:47:00.494186755 +0100
@@ -1677,7 +1677,7 @@
 
 Directory where Apache::Gallery should create its cache with scaled
 pictures. The default is /var/tmp/Apache-Gallery/ . Here, a directory
-for each virtualhost or location will be created automaticly. Make
+for each virtualhost or location will be created automatically. Make
 sure your webserver has write access to the CacheDir.
 
 =item B<GalleryTemplateDir>
@@ -1795,7 +1795,7 @@
 will be available to your templates as $EXIF_<KEYNAME> (in all uppercase). 
 That means that with the default setting "Picture Taken => DateTimeOriginal, 
 Flash => Flash" you will have the variables $EXIF_DATETIMEORIGINAL and 
-$EXIF_FLASH avilable to your templates. You can place them
+$EXIF_FLASH available to your templates. You can place them
 anywhere you want.
 
 =item B<GalleryRootPath>
@@ -1931,7 +1931,7 @@
 
 Some cameras, like the Canon G3, detects the orientation of a picture
 and adds this info to the EXIF header. Apache::Gallery detects this
-and automaticly rotates images with this info.
+and automatically rotates images with this info.
 
 If your camera does not support this, you can rotate the images 
 manually, This can also be used to override the rotate information
@@ -1939,7 +1939,7 @@
 with the GalleryAutoRotate option.
 
 To use this functionality you have to create file with the name of the 
-picture you want rotated appened with ".rotate". The file should include 
+picture you want rotated appended with ".rotate". The file should include 
 a number where these numbers are supported:
 
 	"1", rotates clockwise by 90 degree
diff -Naur Apache-Gallery-1.0.1_Debian-423004-2/README Apache-Gallery-1.0.1/README
--- Apache-Gallery-1.0.1_Debian-423004-2/README	2011-03-16 01:07:35.126741291 +0100
+++ Apache-Gallery-1.0.1/README	2011-03-16 01:50:33.143544938 +0100
@@ -34,7 +34,7 @@
         Directory where Apache::Gallery should create its cache with scaled
         pictures. The default is /var/tmp/Apache-Gallery/ . Here, a
         directory for each virtualhost or location will be created
-        automaticly. Make sure your webserver has write access to the
+        automatically. Make sure your webserver has write access to the
         CacheDir.
 
     GalleryTemplateDir
@@ -139,7 +139,7 @@
         GalleryInfo will be available to your templates as $EXIF_<KEYNAME>
         (in all uppercase). That means that with the default setting
         "Picture Taken => DateTimeOriginal, Flash => Flash" you will have
-        the variables $EXIF_DATETIMEORIGINAL and $EXIF_FLASH avilable to
+        the variables $EXIF_DATETIMEORIGINAL and $EXIF_FLASH available to
         your templates. You can place them anywhere you want.
 
     GalleryRootPath
@@ -250,7 +250,7 @@
     Rotate images
         Some cameras, like the Canon G3, detects the orientation of a
         picture and adds this info to the EXIF header. Apache::Gallery
-        detects this and automaticly rotates images with this info.
+        detects this and automatically rotates images with this info.
 
         If your camera does not support this, you can rotate the images
         manually, This can also be used to override the rotate information
@@ -258,7 +258,7 @@
         with the GalleryAutoRotate option.
 
         To use this functionality you have to create file with the name of
-        the picture you want rotated appened with ".rotate". The file should
+        the picture you want rotated appended with ".rotate". The file should
         include a number where these numbers are supported:
 
                 "1", rotates clockwise by 90 degree
diff -Naur Apache-Gallery-1.0.1_Debian-337197-1/Changes Apache-Gallery-1.0.1/Changes
--- Apache-Gallery-1.0.1_Debian-337197-1/Changes	2011-03-16 01:54:00.152754513 +0100
+++ Apache-Gallery-1.0.1/Changes	2011-03-18 00:05:49.946297529 +0100
@@ -3,9 +3,11 @@
 
 Revision history for Perl extension Apache::Gallery.
 
-1.0.2~1 Wed Mar 16 01:52:06 CET 2011
+1.0.2~1 Fri Mar 18 00:05:49 CET 2011
 
 	- Fixed spelling typos in Gallery.pm and README.  (Luca Capello)
+	- GalleryCacheDir defaults to /var/cache/www/ per the FHS-2.3.
+	  (Debian bug #337197, Luca Capello)
 	- Extended GalleryUnderscoresToSpaces to filenames as well.
 	  (Debian bug #348724, Francesco Potortì)
 	- Added txt to GalleryDocFile, the code in Gallery.pm already
diff -Naur Apache-Gallery-1.0.1_Debian-337197-1/lib/Apache/Gallery.pm Apache-Gallery-1.0.1/lib/Apache/Gallery.pm
--- Apache-Gallery-1.0.1_Debian-337197-1/lib/Apache/Gallery.pm	2011-03-16 01:54:00.152754513 +0100
+++ Apache-Gallery-1.0.1/lib/Apache/Gallery.pm	2011-03-18 00:05:35.365919682 +0100
@@ -852,7 +852,7 @@
 
 	unless ($r->dir_config('GalleryCacheDir')) {
 
-		$cache_root = '/var/tmp/Apache-Gallery/';
+		$cache_root = '/var/cache/www/';
 		if ($r->server->is_virtual) {
 			$cache_root = File::Spec->catdir($cache_root, $r->server->server_hostname);
 		} else {
@@ -1659,7 +1659,7 @@
 The options are set in the httpd.conf/.htaccess file using the syntax:
 B<PerlSetVar OptionName 'value'>
 
-Example: B<PerlSetVar GalleryCacheDir '/var/tmp/Apache-Gallery/'>
+Example: B<PerlSetVar GalleryCacheDir '/var/cache/www/'>
 
 =over 4
 
@@ -1676,9 +1676,9 @@
 =item B<GalleryCacheDir>
 
 Directory where Apache::Gallery should create its cache with scaled
-pictures. The default is /var/tmp/Apache-Gallery/ . Here, a directory
-for each virtualhost or location will be created automatically. Make
-sure your webserver has write access to the CacheDir.
+pictures. The default is /var/cache/www/ . Here, a directory for each
+virtualhost or location will be created automatically. Make sure your
+webserver has write access to the CacheDir.
 
 =item B<GalleryTemplateDir>
 
diff -Naur Apache-Gallery-1.0.1_Debian-337197-1/README Apache-Gallery-1.0.1/README
--- Apache-Gallery-1.0.1_Debian-337197-1/README	2011-03-16 01:54:00.152754513 +0100
+++ Apache-Gallery-1.0.1/README	2011-03-18 00:04:25.880115606 +0100
@@ -19,7 +19,7 @@
     The options are set in the httpd.conf/.htaccess file using the syntax:
     PerlSetVar OptionName 'value'
 
-    Example: PerlSetVar GalleryCacheDir '/var/tmp/Apache-Gallery/'
+    Example: PerlSetVar GalleryCacheDir '/var/cache/www/'
 
     GalleryAutoRotate
         Some cameras, like the Canon G3, can detect the orientation of a the
@@ -32,10 +32,9 @@
 
     GalleryCacheDir
         Directory where Apache::Gallery should create its cache with scaled
-        pictures. The default is /var/tmp/Apache-Gallery/ . Here, a
-        directory for each virtualhost or location will be created
-        automatically. Make sure your webserver has write access to the
-        CacheDir.
+        pictures. The default is /var/cache/www/ . Here, a directory for each
+        virtualhost or location will be created automatically. Make sure your
+        webserver has write access to the CacheDir.
 
     GalleryTemplateDir
         Full path to the directory where you placed the templates. This

Attachment: pgpCcvlitTRHv.pgp
Description: PGP signature

Reply via email to