SPECS (AC-branch): mailman.spec - merged patches from HEAD - more ...
baggins
baggins at pld-linux.org
Mon Oct 10 01:22:20 CEST 2005
Author: baggins Date: Sun Oct 9 23:22:20 2005 GMT
Module: SPECS Tag: AC-branch
---- Log message:
- merged patches from HEAD
- more FHS compliance work
---- Files affected:
SPECS:
mailman.spec (1.80.2.3 -> 1.80.2.4)
---- Diffs:
================================================================
Index: SPECS/mailman.spec
diff -u SPECS/mailman.spec:1.80.2.3 SPECS/mailman.spec:1.80.2.4
--- SPECS/mailman.spec:1.80.2.3 Mon Oct 10 00:52:51 2005
+++ SPECS/mailman.spec Mon Oct 10 01:22:14 2005
@@ -28,12 +28,17 @@
Patch4: %{name}-encoding.patch
Patch5: %{name}-dont-send-broken-reminder-ugly-hack.patch
Patch6: http://www.list.org/CAN-2005-0202.txt
+Patch7: %{name}-mailmanctl-status.patch
+Patch8: %{name}-cron.patch
+Patch9: %{name}-python-compile.patch
+Patch10: %{name}-build.patch
+Patch11: %{name}-FHS.patch
URL: http://www.list.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: python >= 2.1
BuildRequires: python-devel
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpmbuild(macros) >= 1.202
PreReq: rc-scripts
Requires(pre): /bin/id
Requires(pre): /usr/bin/getgid
@@ -54,6 +59,12 @@
Provides: user(mailman)
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _configdir /etc/%{name}
+%define _lockdir /var/lock/%{name}
+%define _logdir /var/log/%{name}
+%define _logarchdir /var/log/archiv/%{name}
+%define _piddir /var/run/%{name}
+
%description
Mailman -- The GNU Mailing List Management System -- is a mailing list
management system written mostly in Python. Features:
@@ -143,6 +154,11 @@
cd Mailman/Cgi/
%patch6 -p0
cd ../../
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
%build
%{__aclocal}
@@ -152,6 +168,11 @@
--prefix=%{_libdir}/mailman \
--exec-prefix=%{_libdir}/mailman \
--with-var-prefix=/var/lib/mailman \
+ --with-config-dir=%{_configdir} \
+ --with-lock-dir=%{_lockdir} \
+ --with-log-dir=%{_logdir} \
+ --with-pid-dir=%{_piddir} \
+ --with-queue-dir=/var/lib/mailman/qfiles \
--without-permcheck \
--with-username=%{name} \
--with-groupname=%{name} \
@@ -163,7 +184,9 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{cron.d,httpd/httpd.conf,mailman,rc.d/init.d,sysconfig},%{_mandir}}
+install -d $RPM_BUILD_ROOT{/etc/{cron.d,httpd/httpd.conf,rc.d/init.d,sysconfig},%{_mandir}} \
+ $RPM_BUILD_ROOT{%{_varmmdir},%{_quedirdir},%{_configdir},%{_lockdir},%{_logdir},%{_logarchdir},%{_piddir}}
+
PYTHONPATH=$RPM_BUILD_ROOT%{_libdir}/mailman/:$RPM_BUILD_ROOT%{_libdir}/mailman/pythonlib/
export PYTHONPATH
@@ -180,10 +203,11 @@
install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
-mv $RPM_BUILD_ROOT%{_libdir}/%{name}/Mailman/mm_cfg.py $RPM_BUILD_ROOT/etc/%{name}
-ln -s /etc/%{name}/mm_cfg.py $RPM_BUILD_ROOT%{_libdir}/%{name}/Mailman/mm_cfg.py
-cat >> $RPM_BUILD_ROOT/etc/%{name}/mm_cfg.py << EOF
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/Mailman/mm_cfg.py $RPM_BUILD_ROOT%{_configdir}
+ln -s %{_configdir}/mm_cfg.py $RPM_BUILD_ROOT%{_libdir}/%{name}/Mailman/mm_cfg.py
+
+cat >> $RPM_BUILD_ROOT%{_configdir}/mm_cfg.py << EOF
DEFAULT_EMAIL_HOST = 'YOUR.HOST.NAME.HERE'
DEFAULT_URL_HOST = 'YOUR.HOST.NAME.HERE'
IMAGE_LOGOS = '/mailman/icons/'
@@ -196,30 +220,15 @@
# %{_libdir}/mailman/Mailman/Defaults.py
EOF
+# Create a link to the wrapper in /etc/smrsh to allow sendmail to run it.
+ln -s %{_datadir}/%{name}/mail/%{name} $RPM_BUILD_ROOT/etc/smrsh
+
%clean
rm -rf $RPM_BUILD_ROOT
%pre
-if [ -n "`/usr/bin/getgid mailman`" ]; then
- if [ "`/usr/bin/getgid mailman`" != "94" ]; then
- echo "Error: group mailman doesn't have gid=94. Correct this before installing %{name}." 1>&2
- exit 1
- fi
-else
- echo "Adding group mailman GID=94"
- /usr/sbin/groupadd -g 94 mailman
-fi
-
-if [ -n "`/bin/id -u mailman 2>/dev/null`" ]; then
- if [ "`/bin/id -u mailman`" != "94" ]; then
- echo "Error: user mailman doesn't have uid=94. Correct this before installing %{name}." 1>&2
- exit 1
- fi
-else
- echo "Adding user mailman UID=94"
- /usr/sbin/useradd -u 94 -d %{_var}/lib/%{name} -s /bin/false \
- -c "GNU Mailing List Manager" -g mailman mailman 1>&2
-fi
+%groupadd -g 94 mailman
+%useradd -u 94 -d %{_var}/lib/%{name} -s /bin/false -c "GNU Mailing List Manager" -g mailman mailman
%post
if [ "$1" = "1" ]; then
@@ -266,6 +275,7 @@
%attr(640,root,http) %config(noreplace) %verify(not size mtime md5) /etc/httpd/httpd.conf/*%{name}.conf
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/%{name}
%config(noreplace) %verify(not size mtime md5) /etc/cron.d/%{name}
+/etc/smrsh/%{name}
%dir /etc/%{name}
%attr(644,root,mailman) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/mm_cfg.py
@@ -308,6 +318,10 @@
%dir %{_var}/lib/mailman/logs
%dir %{_var}/lib/mailman/qfiles
%dir %{_var}/lib/mailman/spam
+%dir %{_lockdir}
+%dir %{_logdir}
+%dir %{_logarchdir}
+%dir %{_piddir}
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -315,6 +329,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.80.2.4 2005/10/09 23:22:14 baggins
+- merged patches from HEAD
+- more FHS compliance work
+
Revision 1.80.2.3 2005/10/09 22:52:51 baggins
- TODO updated
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/mailman.spec?r1=1.80.2.3&r2=1.80.2.4&f=u
More information about the pld-cvs-commit
mailing list