[packages/apache-mod_proctitle] - switch to modern version of module; use setproctitle library

arekm arekm at pld-linux.org
Wed Mar 13 17:33:38 CET 2013


commit 1407fa5c39a301d9e6b3e33e49d958af983634d4
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Mar 13 17:32:48 2013 +0100

    - switch to modern version of module; use setproctitle library

 apache-mod_proctitle.spec | 34 +++++++++++++++++++++++++---------
 setproctitle.patch        | 25 +++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 9 deletions(-)
---
diff --git a/apache-mod_proctitle.spec b/apache-mod_proctitle.spec
index 71a4ba9..7f85239 100644
--- a/apache-mod_proctitle.spec
+++ b/apache-mod_proctitle.spec
@@ -2,14 +2,18 @@
 %define 	apxs		/usr/sbin/apxs
 Summary:	Apache module: set process name to currently serverd virtual host
 Name:		apache-mod_%{mod_name}
-Version:	0.1
-Release:	0.20080707.2
+Version:	0.4
+Release:	1
 License:	Apache v2.0
 Group:		Networking/Daemons/HTTP
-Source0:	mod_proctitle.c
+Source0:	https://github.com/stass/mod_proctitle/archive/0.4.tar.gz
+# Source0-md5:	83043432da02f0ebf6de4badbe404dcd
+Patch0:		setproctitle.patch
+URL:		https://github.com/stass/mod_proctitle
 BuildRequires:	%{apxs}
 BuildRequires:	apache-devel >= 2.0
 BuildRequires:	rpmbuild(macros) >= 1.268
+BuildRequires:	setproctitle-devel
 Requires:	apache(modules-api) = %apache_modules_api
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -21,19 +25,31 @@ mod_proctitle is an experimental module for Apache httpd 2.x which
 changes process name to currently served virtual host.
 
 %prep
-%setup -q -c -T
-install %{SOURCE0} .
+%setup -q -n mod_%{mod_name}-%{version}
+%patch0 -p1
 
 %build
-%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
+%{__libtoolize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
+
+CPPFLAGS="%{rpmcppflags} -D__unused='__attribute__ ((__unused__))'" \
+%configure
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
-install -p .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
 
 cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf << 'EOF'
 LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
+ProctitileEnable On
+# ProctitleUriSep ::
 EOF
 
 %clean
@@ -50,4 +66,4 @@ fi
 %files
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
-%attr(755,root,root) %{_pkglibdir}/*.so
+%attr(755,root,root) %{_pkglibdir}/mod_proctitle.so
diff --git a/setproctitle.patch b/setproctitle.patch
new file mode 100644
index 0000000..4dd7c8f
--- /dev/null
+++ b/setproctitle.patch
@@ -0,0 +1,25 @@
+diff -urN mod_proctitle-0.4.org/src/Makefile.am mod_proctitle-0.4/src/Makefile.am
+--- mod_proctitle-0.4.org/src/Makefile.am	2011-08-24 10:53:02.000000000 +0200
++++ mod_proctitle-0.4/src/Makefile.am	2013-03-13 17:25:00.638504741 +0100
+@@ -5,7 +5,7 @@
+ libdir= @APACHE_MODULEDIR@
+ mod_proctitle_la_LDFLAGS=-module -avoid-version
+ 
+-LIBS=@APR_LDFLAGS@ @APU_LDFLAGS@ @APR_LIBS@ @APU_LIBS@
++LIBS=@APR_LDFLAGS@ @APU_LDFLAGS@ @APR_LIBS@ @APU_LIBS@ -lsetproctitle
+ AM_CFLAGS=@APR_INCLUDES@ @APU_INCLUDES@ -I at APACHE_INCLUDEDIR@
+ 
+ mod_proctitle_la_SOURCES = mod_proctitle.c
+diff -urN mod_proctitle-0.4.org/src/mod_proctitle.c mod_proctitle-0.4/src/mod_proctitle.c
+--- mod_proctitle-0.4.org/src/mod_proctitle.c	2011-08-24 10:53:02.000000000 +0200
++++ mod_proctitle-0.4/src/mod_proctitle.c	2013-03-13 17:24:50.578262647 +0100
+@@ -49,6 +49,9 @@
+ #include <http_core.h>
+ #include <http_request.h>
+ 
++#include <setproctitle.h>
++#define __unused __attribute__ ((__unused__))
++
+ #undef PACKAGE_BUGREPORT /* damn apache */
+ #undef PACKAGE_NAME
+ #undef PACKAGE_STRING
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_proctitle.git/commitdiff/1407fa5c39a301d9e6b3e33e49d958af983634d4



More information about the pld-cvs-commit mailing list