]> git.decadent.org.uk Git - memories.git/commitdiff
Merge commit 'Memories as 1.3'
authorBen Hutchings <ben@decadent.org.uk>
Tue, 4 Nov 2008 04:25:24 +0000 (04:25 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 4 Nov 2008 04:25:24 +0000 (04:25 +0000)
15 files changed:
debian/README.Debian [new file with mode: 0644]
debian/changelog
debian/control
debian/copyright
debian/linda-overrides [new file with mode: 0644]
debian/lintian-overrides [new file with mode: 0644]
debian/memories.cgi [new file with mode: 0644]
debian/memories.docs [deleted file]
debian/memories.postinst [new file with mode: 0755]
debian/memories.postrm [new file with mode: 0755]
debian/patches/101_remove-ancc-refs.diff [new file with mode: 0644]
debian/patches/102_fix-uris.diff [new file with mode: 0644]
debian/patches/201_use-debian-paths.diff [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/rules [changed mode: 0644->0755]

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..6ca9bfc
--- /dev/null
@@ -0,0 +1,32 @@
+You can run Memories through CGI or Apache's mod_perl:
+
+- The CGI script is /usr/lib/cgi-bin/memories.cgi.
+
+- Use of mod_perl is configured in /etc/memories/apache.conf,
+  which by default uses the path /memories/.  If you use mod_perl
+  you must also enable mod_apreq.  If both these modules are
+  enabled for Apache 2 when Memories is installed or upgraded,
+  Memories is added to the Apache configuration automatically.
+  To do this later, run:
+      ln -s ../../memories/apache.conf /etc/apache2/conf.d/memories
+
+In order to run Memories you will need to set up a database with the
+schema given in /usr/share/memories/memories.sql and grant the
+www-data user permission to delete, insert, select and update in all
+the tables in that schema.  Currently only MySQL databases are
+supported.  You can set up a suitable database with the following
+commands in the mysql client:
+
+    mysql> create database memories;
+    mysql> use memories
+    mysql> source /usr/share/memories/memories.sql
+    mysql> grant delete,insert,select,update on * to 'www-data';
+    mysql> quit
+
+The configuration file for Memories itself is /etc/memories/Config.pm.
+You will almost certainly need to change the 'uri_base' and
+'data_store_external' parameters in this to match your web site
+configuration.  You will also need to change the 'dsn' parameter if
+the database name is not 'memories'.
+
+ -- Ben Hutchings <ben@decadent.org.uk>  Tue, 21 Aug 2007 00:37:26 +0100
index 4398e70d2e3690a8e7c0e92f24ee72da83fa99a0..498f7e8a5e2ff895d1be8b4c08a521923131a44d 100644 (file)
@@ -1,3 +1,41 @@
+memories (1.2-5) unstable; urgency=low
+
+  * Changed to work with Apache 2, using Maypole 2.111 - closes: #432504
+  * Split changes into patches managed with quilt
+  * Fixed generation of thumbnail URIs in templates (102_fix-uris.diff)
+  * Added CGI script
+  * Added md5sums
+  * Updated policy version to 3.7.2 (no other changes required)
+
+ -- Ben Hutchings <ben@decadent.org.uk>  Mon, 17 Sep 2007 00:46:20 +0100
+
+memories (1.2-4) unstable; urgency=low
+
+  * Disabled integration with Apache 2 since Memories does not yet work
+    correctly with it
+
+ -- Ben Hutchings <ben@decadentplace.org.uk>  Thu,  6 Apr 2006 23:14:45 +0100
+
+memories (1.2-3) unstable; urgency=low
+
+  * Fixed and overrode linda and lintian warnings as appropriate
+
+ -- Ben Hutchings <ben@decadentplace.org.uk>  Sat, 18 Feb 2006 19:20:55 +0000
+
+memories (1.2-2) unstable; urgency=low
+
+  * Added missing dependencies
+  * Added README.Debian as a quick-start guide
+  * Corrected some file permissions
+
+ -- Ben Hutchings <ben@decadentplace.org.uk>  Fri, 17 Feb 2006 02:12:31 +0000
+
+memories (1.2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Ben Hutchings <ben@decadentplace.org.uk>  Tue, 10 Jan 2006 02:04:45 +0000
+
 memories (1.1-1) unstable; urgency=low
 
   * Initial release - closes: #345277
index 0aee180c092feeea45619b30ed8f1611a928c133..b82dc270dd8c28c72533d1915d33f3163994db1b 100644 (file)
@@ -1,29 +1,15 @@
 Source: memories
-Maintainer: Ben Hutchings <ben@decadentplace.org.uk>
+Maintainer: Ben Hutchings <ben@decadent.org.uk>
 Section: web
 Priority: extra
-Build-Depends-Indep: debhelper (>= 4), perl (>= 5.6.0-16)
-Standards-Version: 3.6.2
+Build-Depends: debhelper (>= 4), quilt
+Build-Depends-Indep: perl (>= 5.6.0-16)
+Standards-Version: 3.7.2
 
 Package: memories
 Architecture: all
-Depends: ${perl:Depends},
- libapache-session-perl,
- libcache-cache-perl,
- libcalendar-simple-perl,
- libclass-dbi-perl,
- libclass-dbi-plugin-pager-perl,
- libhtml-tagcloud-perl,
- libimage-exiftool-perl,
- libimage-imlib2-perl,
- libimage-info-perl,
- libmaypole-perl,
- libmaypole-plugin-authentication-usersessioncookie-perl,
- libmaypole-plugin-upload-perl,
- libtime-piece-perl
-Recommends: libapache-mod-perl | libapache2-mod-perl2,
- libclass-dbi-mysql-perl,
- libdbd-mysql-perl
+Depends: ${perl:Depends}, libapache-session-perl, libcache-cache-perl, libcalendar-simple-perl, libclass-dbi-mysql-perl, libclass-dbi-perl, libclass-dbi-plugin-pager-perl, libdbd-mysql-perl, libhtml-tagcloud-perl, libimage-exiftool-perl, libimage-imlib2-perl, libimage-info-perl, libmaypole-perl (>= 2.11+2.111-2), libmaypole-plugin-authentication-usersessioncookie-perl, libmaypole-plugin-upload-perl (>= 0.02-4), libtime-piece-perl, libxml-rss-perl
+Recommends: apache2, libapache2-mod-perl2, libapache2-request-perl
 Description: a web-based photo sharing application
  Memories allows multiple users to browse and share photos.  Each
  user's photos can be seen in blog format or as albums.  Each photo can
index 84b7ac4ed903aaecb6bec696e06176a6f2ac26e1..0512b3b14f88a22f35f940cae91603f89c2ec7ca 100644 (file)
@@ -1,8 +1,13 @@
 This is the Debian-packaged version of Memories, put together by Ben
-Hutchings <ben@decadentplace.org.uk> using source from:
+Hutchings <ben@decadent.org.uk> using source from:
 
   http://maypole.perl.org/?Applications
 
-The author of Memories is Simon Cozens <simon@simon-cozens.org>.
+Copyright 2005, 2006 Simon Cozens <simon@simon-cozens.org>.
 
-TODO: LICENCE TEXT
+This software is licensed under the GPL version 2 or higher, or the Perl
+Artistic License, at your choice.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in `/usr/share/common-licenses/GPL' and the Artistic
+Licence in `/usr/share/common-licenses/Artistic'.
diff --git a/debian/linda-overrides b/debian/linda-overrides
new file mode 100644 (file)
index 0000000..b288e9f
--- /dev/null
@@ -0,0 +1,3 @@
+# We use non-standard dir permissions to keep session information private.
+Tag: non-standard-dir-perm
+Data: var/lib/memories/session(lock|s)
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
new file mode 100644 (file)
index 0000000..080fa07
--- /dev/null
@@ -0,0 +1,3 @@
+# We use non-standard dir permissions to keep session information private.
+memories binary: non-standard-dir-perm var/lib/memories/sessions/ 0770 != 0755
+memories binary: non-standard-dir-perm var/lib/memories/sessionlock/ 0770 != 0755
diff --git a/debian/memories.cgi b/debian/memories.cgi
new file mode 100644 (file)
index 0000000..a5c90f1
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/perl -w
+
+# CGI wrapper for Memories.
+
+use strict;
+use Memories;
+Memories->run();
diff --git a/debian/memories.docs b/debian/memories.docs
deleted file mode 100644 (file)
index 5b4892f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Changes
-README
diff --git a/debian/memories.postinst b/debian/memories.postinst
new file mode 100755 (executable)
index 0000000..1d32509
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+if [ "x$1" = xconfigure ]; then
+
+    # If mod_perl and mod_apreq are installed, ensure our configuration
+    # fragment is installed and make Apache (re)load the configuration
+    # and application.
+    if [ -e /etc/apache2/mods-enabled/perl.load -a \
+        -e /etc/apache2/mods-enabled/apreq.load -a \
+         -f /usr/share/perl5/Apache2/Upload.pm ]; then
+       if [ \! -e /etc/apache2/conf.d/memories ]; then
+            ln -s ../../memories/apache.conf /etc/apache2/conf.d/memories
+        fi
+        invoke-rc.d apache2 force-reload
+    fi
+
+    # Disable integration with now-unsupported Apache 1.x.
+    for server in apache apache-perl apache-ssl; do
+        if [ -L /etc/$server/conf.d/memories ]; then
+            rm /etc/$server/conf.d/memories
+            if [ -f /etc/init.d/$server ]; then
+                 invoke-rc.d $server force-reload
+            fi
+        fi
+    done
+
+fi
diff --git a/debian/memories.postrm b/debian/memories.postrm
new file mode 100755 (executable)
index 0000000..823999c
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ "x$1" = xremove -o "x$1" = xpurge ]; then
+    # Flush out our configuration fragment and loaded code from Apache.
+    for server in apache apache-perl apache-ssl apache2; do
+        if [ -L /etc/$server/conf.d/memories ]; then
+            rm /etc/$server/conf.d/memories
+            invoke-rc.d $server force-reload
+        fi
+    done
+fi
+
+#DEBHELPER#
diff --git a/debian/patches/101_remove-ancc-refs.diff b/debian/patches/101_remove-ancc-refs.diff
new file mode 100644 (file)
index 0000000..1982369
--- /dev/null
@@ -0,0 +1,32 @@
+--- trunk.orig/templates/frontpage
++++ trunk/templates/frontpage
+@@ -2,8 +2,7 @@
+ <h1> Welcome to Memories </h1>
+ <p>
+- Memories is a site where you can upload and share your photos of
+- college life with your friends.
++ Memories is a site where you can upload and share your photos.
+ </p>
+ <p>
+  To view other people's photos, look at the <a
+--- trunk.orig/templates/header
++++ trunk/templates/header
+@@ -1,6 +1,6 @@
+ <html>
+ <head>
+-    <title> Memories - ANCC Photo Sharing </title>
++    <title> Memories - Photo Sharing </title>
+     <link title="Maypole" href="[%base%]/static/memories.css" type="text/css" rel="stylesheet"/>
+     [% IF photos %]
+ <link rel="alternate" type="application/rdf+xml" title="RSS"
+--- trunk.orig/templates/photo/upload
++++ trunk/templates/photo/upload
+@@ -1,6 +1,6 @@
+ <html>
+ <head>
+-    <title> Memories - ANCC Photo Sharing </title>
++    <title> Memories - Photo Sharing </title>
+     <link title="Maypole" href="[%base%]/static/memories.css" type="text/css" rel="stylesheet"/>
+     <script type="text/javascript" src="[%base%]/tag/list_js"></script>
+     <script type="text/javascript" src="[%base%]/static/upload.js"></script>
diff --git a/debian/patches/102_fix-uris.diff b/debian/patches/102_fix-uris.diff
new file mode 100644 (file)
index 0000000..8e79469
--- /dev/null
@@ -0,0 +1,88 @@
+--- trunk.orig/templates/album/list
++++ trunk/templates/album/list
+@@ -8,7 +8,7 @@
+     [% FOR album = minilist %]
+         <td>
+         <a href="[%base%]/album/view/[%album.id%]">[% album %]<br/>
+-        <img src="[% album.photos.last.thumb_url |uri%]"></a><br/>
++        <img src="[% album.photos.last.thumb_url |html%]"></a><br/>
+         <span class="info">
+             [%album.photos.size %] 
+         photo[%-"s" IF album.photos.size != 1 %]
+--- trunk.orig/templates/custom/list
++++ trunk/templates/custom/list
+@@ -8,7 +8,7 @@
+     [% FOR object = minilist %]
+         <td>
+         <a href="[%base%]/object/view/[%object.id%]">[% object %]<br/>
+-        <img src="[% object.photos.last.thumb_url |uri%]"></a><br/>
++        <img src="[% object.photos.last.thumb_url |html%]"></a><br/>
+         <span class="info">
+             [%object.photos.size %] 
+         photo[%-"s" IF object.photos.size != 1 %]</span>
+--- trunk.orig/templates/macros
++++ trunk/templates/macros
+@@ -2,7 +2,7 @@
+ <table class="thumb">
+     <tr><td>
+         <a href="[%base%]/photo/view/[%photo.id%]">
+-        <img src="[% photo.thumb_url |uri%]" alt="[%photo.title|html%]"/>
++        <img src="[% photo.thumb_url |html%]" alt="[%photo.title|html%]"/>
+         </a>
+         </td> </tr>
+     <tr><td> 
+--- trunk.orig/templates/nav
++++ trunk/templates/nav
+@@ -4,7 +4,7 @@
+ </td><td align="right">
+ [% FOR photo = request.recent_uploads %]
+         <a href="[%base%]/photo/view/[%photo.id%]">
+-        <img src="[% photo.thumb_url |uri%]" alt="[%photo.title|html%]"/>
++        <img src="[% photo.thumb_url |html%]" alt="[%photo.title|html%]"/>
+         </a>
+ [% END %]
+ </td></tr></table>
+--- trunk.orig/templates/recent.rss
++++ trunk/templates/recent.rss
+@@ -12,7 +12,7 @@
+         <description>
+ [% FILTER html %]
+         <a href="[%base%]/photo/view/[%photo.id%]">
+-        <img src="[% photo.thumb_url |uri%]" alt="[%photo.title|html%]"/>
++        <img src="[% photo.thumb_url |html%]" alt="[%photo.title|html%]"/>
+         </a>
+ [% END %]
+         </description>
+--- trunk.orig/templates/systemtag/list
++++ trunk/templates/systemtag/list
+@@ -14,7 +14,7 @@
+         [% IF photos.last %]
+         <tr><td>
+         <a href="[%base%]/tag/view/[%tag.name |html|uri%]">
+-            <img src="[% photos.last.thumb_url |uri%]">
++            <img src="[% photos.last.thumb_url |html%]">
+         </a>
+         </td></tr>
+         <tr><td class="info">
+--- trunk.orig/templates/tag/list
++++ trunk/templates/tag/list
+@@ -14,7 +14,7 @@
+         [% IF photos.last %]
+         <tr><td>
+         <a href="[%base%]/tag/view/[%tag.name |html|uri%]">
+-            <img src="[% photos.last.thumb_url |uri%]">
++            <img src="[% photos.last.thumb_url |html%]">
+         </a>
+         </td></tr>
+         <tr><td class="info">
+--- trunk.orig/templates/user/list
++++ trunk/templates/user/list
+@@ -10,7 +10,7 @@
+         [% SET photos = user.photos %]
+         <a href="[%base%]/user/view/[%user.id%]">[% user %]<br/>
+         [% IF photos.last %]
+-        <img src="[% photos.last.thumb_url |uri%]"></a><br/>
++        <img src="[% photos.last.thumb_url |html%]"></a><br/>
+         <span class="info">
+             [%photos.size %] 
+         photo[%-"s" IF photos.size != 1 %]</span>
diff --git a/debian/patches/201_use-debian-paths.diff b/debian/patches/201_use-debian-paths.diff
new file mode 100644 (file)
index 0000000..b4ccb0f
--- /dev/null
@@ -0,0 +1,37 @@
+--- trunk.orig/Memories/Config.pm
++++ trunk/Memories/Config.pm
+@@ -3,19 +3,19 @@
+ # This parameter should be the external address of your Memories
+ # installation
+-Memories->config->uri_base("http://memories.simon-cozens.org/");
++Memories->config->uri_base("http://localhost/memories/");
+ # This is where your templates will live.
+-Memories->config->{template_root} = "/home/simon/maypole-sites/memories/templates";
++Memories->config->{template_root} = "/etc/memories/templates/";
+ # Here is where uploaded photos will be stored. Your web server user
+ # should own this directory.
+-Memories->config->{data_store} = "/web/photostore/";
++Memories->config->{data_store} = "/var/www/memories/store/";
+ # You also need to configure your web server so that it serves files out
+ # of the data store; this URL should be where that data store directory
+ # is exposed on the web.
+-Memories->config->{data_store_external} = "http://memories.simon-cozens.org/store/";
++Memories->config->{data_store_external} = "http://localhost/memories/store/";
+ # Your database server: the first part should always be "dbi"; the
+ # second, the name of the DBD driver you're using (usually mysql unless
+--- trunk.orig/README
++++ trunk/README
+@@ -24,7 +24,7 @@
+ You will also need a MySQL database. Again, in theory other databases
+ can be used, but in practice, you're on your own again.
+-Configure Maypole/Config.pm to your site, and follow the instructions in
++Configure /etc/memories/Config.pm to your site, and follow the instructions in
+ there - it will require you to set other things up as well.
+ Test that everything works:
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..30a4a70
--- /dev/null
@@ -0,0 +1,3 @@
+101_remove-ancc-refs.diff
+102_fix-uris.diff
+201_use-debian-paths.diff
old mode 100644 (file)
new mode 100755 (executable)
index c34b398..7d4e3ed
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 
-build :
+include /usr/share/quilt/quilt.make
+
+build :  $(QUILT_STAMPFN)
 
 binary : binary-arch binary-indep
 
@@ -9,25 +11,31 @@ binary-arch :
 binary-indep :
        dh_testroot
        install -d debian/memories/usr/share/perl5/Memories
-       install Memories.pm debian/memories/usr/share/perl5/
-       install Memories/*.pm debian/memories/usr/share/perl5/Memories/
+       install -m 644 Memories.pm debian/memories/usr/share/perl5/
+       install -m 644 Memories/*.pm debian/memories/usr/share/perl5/Memories/
+       install -d debian/memories/usr/lib/cgi-bin
+       install -m 755 debian/memories.cgi debian/memories/usr/lib/cgi-bin/
        install -d debian/memories/etc/memories
        mv debian/memories/usr/share/perl5/Memories/Config.pm debian/memories/etc/memories/
        cp -dR templates debian/memories/etc/memories/
        ln -s /etc/memories/Config.pm debian/memories/usr/share/perl5/Memories/
-       install debian/apache.conf debian/memories/etc/memories/
-       install -d debian/memories/etc/apache/conf.d
-       ln -s ../../memories/apache.conf debian/memories/etc/apache/conf.d/memories
+       install -m 644 debian/apache.conf debian/memories/etc/memories/
        install -d debian/memories/usr/share/memories
-       install memories.sql tag_dates debian/memories/usr/share/memories/
+       install -m 644 memories.sql tag_dates debian/memories/usr/share/memories/
        install -d debian/memories/var/lib/memories
        install -d -o www-data -g www-data -m 770 debian/memories/var/lib/memories/sessions debian/memories/var/lib/memories/sessionlock
+       install -d debian/memories/usr/share/linda/overrides
+       install -m 644 debian/linda-overrides debian/memories/usr/share/linda/overrides/memories
+       install -d debian/memories/usr/share/lintian/overrides
+       install -m 644 debian/lintian-overrides debian/memories/usr/share/lintian/overrides/memories
        dh_perl
-       dh_installchangelogs
-       dh_installdocs
+       dh_installchangelogs Changes
+       dh_installdocs README
        dh_compress
        dh_fixperms -X /var/lib/memories/session
+       dh_installdeb
        dh_gencontrol
+       dh_md5sums
        dh_builddeb
 
 clean :