You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2012/04/07 12:18:35 UTC

svn commit: r1310720 - in /tcl/rivet/debian: changelog control libapache2-mod-rivet.apache2 libapache2-mod-rivet.install libapache2-mod-rivet.postinst libapache2-mod-rivet.prerm patches/ patches/mod_rivet-hardening.patch patches/series rules

Author: mxmanghi
Date: Sat Apr  7 10:18:35 2012
New Revision: 1310720

URL: http://svn.apache.org/viewvc?rev=1310720&view=rev
Log:
Changes and new files to package Rivet 2.0.4 with Debian Apache 2.4

Added:
    tcl/rivet/debian/libapache2-mod-rivet.apache2
    tcl/rivet/debian/patches/
    tcl/rivet/debian/patches/mod_rivet-hardening.patch
    tcl/rivet/debian/patches/series
Modified:
    tcl/rivet/debian/changelog
    tcl/rivet/debian/control
    tcl/rivet/debian/libapache2-mod-rivet.install
    tcl/rivet/debian/libapache2-mod-rivet.postinst
    tcl/rivet/debian/libapache2-mod-rivet.prerm
    tcl/rivet/debian/rules

Modified: tcl/rivet/debian/changelog
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/changelog?rev=1310720&r1=1310719&r2=1310720&view=diff
==============================================================================
--- tcl/rivet/debian/changelog (original)
+++ tcl/rivet/debian/changelog Sat Apr  7 10:18:35 2012
@@ -1,3 +1,16 @@
+libapache2-mod-rivet (2.0.4-2) unstable; urgency=low
+
+  * Fix "sourceful transition towards Apache 2.4" by adding recommended
+    macro and procedure calls (Closes: #666828)
+  * Removed build depends on docbook toolchain. Manual is not created during
+    package build, the html output shipped with the upstream tarball is 
+    copied into libapache2-mod-rivet-doc
+  * Introduced compilation hardening flags to debian/rules and an unused
+    variable. Created with dquilt a patch to be applied to 
+    src/apache-2/mod_rivet.c (mod_rivet-hardening.patch)
+    
+ -- Massimo Manghi <mx...@apache.org>  Sat, 07 Apr 2012 00:13:15 +0200
+
 libapache2-mod-rivet (2.0.4-1) unstable; urgency=low
 
   * New upstream release 2.0.4

Modified: tcl/rivet/debian/control
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/control?rev=1310720&r1=1310719&r2=1310720&view=diff
==============================================================================
--- tcl/rivet/debian/control (original)
+++ tcl/rivet/debian/control Sat Apr  7 10:18:35 2012
@@ -2,14 +2,13 @@ Source: libapache2-mod-rivet
 Section: web
 Priority: extra
 Maintainer: Massimo Manghi <mx...@apache.org>
-Build-Depends: tcl8.5-dev, apache2-prefork-dev, automake, debhelper (>= 7.0.50~)
-Build-Depends-Indep: xsltproc, docbook, docbook-utils, docbook-xsl, docbook-xml
+Build-Depends: tcl8.5-dev, apache2-dev, autoconf, libtool, debhelper (>= 7.0.50~)
 Standards-Version: 3.9.2
 Homepage: http://tcl.apache.org/rivet/
 
 Package: libapache2-mod-rivet
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, itcl3, apache2-mpm-prefork, tcllib
+Depends: ${shlibs:Depends}, ${misc:Depends}, itcl3, tcllib
 Suggests: libapache2-mod-rivet-doc
 Description: Server-side Tcl programming system combining ease of use and power
  Apache Rivet is a system for creating dynamic web content via the Tcl

Added: tcl/rivet/debian/libapache2-mod-rivet.apache2
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/libapache2-mod-rivet.apache2?rev=1310720&view=auto
==============================================================================
--- tcl/rivet/debian/libapache2-mod-rivet.apache2 (added)
+++ tcl/rivet/debian/libapache2-mod-rivet.apache2 Sat Apr  7 10:18:35 2012
@@ -0,0 +1,2 @@
+mod debian/rivet.load   
+mod debian/rivet.conf   

Modified: tcl/rivet/debian/libapache2-mod-rivet.install
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/libapache2-mod-rivet.install?rev=1310720&r1=1310719&r2=1310720&view=diff
==============================================================================
--- tcl/rivet/debian/libapache2-mod-rivet.install (original)
+++ tcl/rivet/debian/libapache2-mod-rivet.install Sat Apr  7 10:18:35 2012
@@ -1,2 +0,0 @@
-debian/rivet.load   etc/apache2/mods-available
-debian/rivet.conf   etc/apache2/mods-available

Modified: tcl/rivet/debian/libapache2-mod-rivet.postinst
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/libapache2-mod-rivet.postinst?rev=1310720&r1=1310719&r2=1310720&view=diff
==============================================================================
--- tcl/rivet/debian/libapache2-mod-rivet.postinst (original)
+++ tcl/rivet/debian/libapache2-mod-rivet.postinst Sat Apr  7 10:18:35 2012
@@ -23,13 +23,35 @@ case "$1" in
     configure)
 	if [ -z "$2" ] ; then
 
-# enabling the module
+# enabling the module. This code was largely taken from 
 
-            a2enmod -q rivet
+	    if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+		. /usr/share/apache2/apache2-maintscript-helper
 
-            if [ -e /etc/apache2/mods-enabled/rivet.load ] ; then
-               invoke-rc.d apache2 restart
-            fi
+		# mod_rivet requires the prefork MPM
+		if [ $(a2query -M) != 'prefork' ] ; then
+		    apache2_msg notice "attempting to enable Apache2 prefork mpm"
+		    if apache2_switch_mpm prefork ; then
+			apache2_invoke enmod rivet
+		    else
+			apache2_msg err "Could not switch to prefork, not enabling mod_rivet"
+		    fi
+
+		else
+		    apache2_invoke enmod rivet
+		fi
+
+	    else 
+
+# Apache 2.2 post installation tasks
+
+                a2enmod -q rivet
+
+                if [ -e /etc/apache2/mods-enabled/rivet.load ] ; then
+                  invoke-rc.d apache2 restart
+                fi
+
+	    fi
        fi
     ;;
 

Modified: tcl/rivet/debian/libapache2-mod-rivet.prerm
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/libapache2-mod-rivet.prerm?rev=1310720&r1=1310719&r2=1310720&view=diff
==============================================================================
--- tcl/rivet/debian/libapache2-mod-rivet.prerm (original)
+++ tcl/rivet/debian/libapache2-mod-rivet.prerm Sat Apr  7 10:18:35 2012
@@ -19,8 +19,15 @@ set -e
 
 case "$1" in
     remove)
-       a2dismod -q -f rivet || true
-       invoke-rc.d apache2 restart
+	if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+		. /usr/share/apache2/apache2-maintscript-helper
+
+	    apache2_invoke dismod foo
+	else
+       	    a2dismod -q -f rivet || true
+            invoke-rc.d apache2 restart
+	fi
+
     ;;
 
     upgrade|deconfigure)

Added: tcl/rivet/debian/patches/mod_rivet-hardening.patch
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/patches/mod_rivet-hardening.patch?rev=1310720&view=auto
==============================================================================
--- tcl/rivet/debian/patches/mod_rivet-hardening.patch (added)
+++ tcl/rivet/debian/patches/mod_rivet-hardening.patch Sat Apr  7 10:18:35 2012
@@ -0,0 +1,60 @@
+Changes to fulfill requirement introduced by the code hardening flags when calling ap_log_error in two cases.
+Pointer to a rivet_dir_conf structure intialized and never used: introduced preprocessor test that checks a RIVET_USE_RDC symbol to tell whether we want use it instead of rivet_server_conf
+
+--- a/src/apache-2/mod_rivet.c
++++ b/src/apache-2/mod_rivet.c
+@@ -1292,7 +1292,7 @@
+     }
+ 
+     ap_log_error(APLOG_MARK, APLOG_CRIT, APR_EGENERAL, 
+-		 rivet_panic_server_rec, buf);
++		 rivet_panic_server_rec,"%s", buf);
+ 
+     abort();
+ }
+@@ -1447,7 +1447,7 @@
+     }
+     if (Tcl_Init(interp) == TCL_ERROR)
+     {
+-        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
++        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s, "%s",
+                 Tcl_GetStringResult(interp));
+         exit(1);
+     }
+@@ -1583,7 +1583,10 @@
+ 
+     rivet_interp_globals *globals = NULL;
+     rivet_server_conf 	*rsc = NULL;
++#ifdef RIVET_USE_RDC
+     rivet_server_conf 	*rdc;
++#endif
++
+ 
+     ctype = Rivet_CheckType(r);  
+     if (ctype == CTYPE_NOT_HANDLED) {
+@@ -1606,10 +1609,12 @@
+ 
+     globals->req->charset = NULL;
+ 
++#ifdef RIVET_USE_RDC
+     if (r->per_dir_config != NULL)
+         rdc = RIVET_SERVER_CONF( r->per_dir_config );
+     else
+         rdc = rsc;
++#endif
+ 
+     r->allowed |= (1 << M_GET);
+     r->allowed |= (1 << M_POST);
+@@ -1652,8 +1657,11 @@
+     }
+ 
+     //TODO: clarify whether rsc or rdc
+-    //Rivet_PropagatePerDirConfArrays( interp, rdc );
++#ifdef RIVET_USE_RDC
++    Rivet_PropagatePerDirConfArrays( interp, rdc );
++#else
+     Rivet_PropagatePerDirConfArrays( interp, rsc );
++#endif
+ 
+     /* Initialize this the first time through and keep it around. */
+     if (request_init == NULL) {

Added: tcl/rivet/debian/patches/series
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/patches/series?rev=1310720&view=auto
==============================================================================
--- tcl/rivet/debian/patches/series (added)
+++ tcl/rivet/debian/patches/series Sat Apr  7 10:18:35 2012
@@ -0,0 +1 @@
+mod_rivet-hardening.patch

Modified: tcl/rivet/debian/rules
URL: http://svn.apache.org/viewvc/tcl/rivet/debian/rules?rev=1310720&r1=1310719&r2=1310720&view=diff
==============================================================================
--- tcl/rivet/debian/rules (original)
+++ tcl/rivet/debian/rules Sat Apr  7 10:18:35 2012
@@ -5,8 +5,13 @@
 
 TCL_VERSION=8.5
 package=libapache2-mod-rivet
-LDFLAGS += -Wl,--as-needed
-CFLAGS = -Wall -g
+
+
+#LDFLAGS += -Wl,--as-needed
+#CFLAGS = -Wall -g
+
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
 
 # Don't let the configure script guess our platform.
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -37,7 +42,7 @@ build-indep: build-stamp
 build-stamp: configure-stamp
 	dh_testdir
 	$(MAKE)
-	( cd doc; $(MAKE) docs )
+#	( cd doc; $(MAKE) docs )
 	touch build-stamp
 
 configure-stamp:
@@ -69,6 +74,7 @@ libapache2-mod-rivet: build
 	dh_installchangelogs ChangeLog
 	dh_installdocs -p$@
 	dh_install -a
+	dh_apache2 
 	dh_installexamples -a -p$@
 	dh_auto_install -a -p$@ --destdir=$(CURDIR)/debian/$@
 



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org