Fedora inn.spec

Fedora inn.spec --- inn.spec 2008-08-29 16:46:18.000000000 +0200 +++ inn-opennews.spec 2009-01-03 06:42:59.000000000 +0100 @@ -1,7 +1,7 @@ Summary: The InterNetNews (INN) system, an Usenet news server Name: inn Version: 2.4.5 -Release: 3%{?dist} +Release: opennews4%{?dist} #see LICENSE file for details License: GPL+ and BSD and MIT and Public Domain Group: System Environment/Daemons @@ -23,6 +23,7 @@ Patch8: inn-2.4.2-makedbz.patch Patch9: inn-2.4.3.rcreaderaddrinuse.patch Patch10: inn-2.4.3-nologinshell.patch Patch11: inn-2.4.5-dynlib.patch +Patch12: inn-2.4.5.filter_nnrpd.patch BuildRequires: perl-devel python db4-devel byacc krb5-devel pam-devel e2fsprogs-devel BuildRequires: perl(ExtUtils::Embed) Requires(pre): shadow-utils @@ -77,7 +78,7 @@ local news servers. %pre getent group news >/dev/null || groupadd -r news getent passwd news >/dev/null || \ -useradd -r -g news -d /etc/news -s /sbin/nologin \ +useradd -r -g news -d /etc/news -s /bin/bash \ -c "News server user" news exit 0 @@ -93,6 +94,7 @@ exit 0 %patch9 -p1 -b .addrinuse %patch10 -p1 -b .nologin %patch11 -p1 -b .dynlib +%patch12 -p1 -b .filter_nnrpd perl -pi -e 's/LOCK_READ/LLOCK_READ/' `find . -type f` perl -pi -e 's/LOCK_WRITE/LLOCK_WRITE/' `find . -type f` @@ -109,12 +111,13 @@ export CFLAGS="$RPM_OPT_FLAGS $DEFINE_IN with_tmp_path=/var/lib/news/tmp ./configure \ --prefix=/usr/lib/news \ --sysconfdir=/etc/news --mandir=%{_mandir} \ - --with-log-dir=/var/log/news --with-spool-dir=/var/spool/news\ - --with-db-dir=/var/lib/news --with-run-dir=/var/run/news \ - --with-etc-dir=/etc/news --with-tmp-dir=/var/lib/news/tmp \ + --with-log-dir=/home/news/log --with-spool-dir=/home/news\ + --with-db-dir=/home/news/db --with-run-dir=/var/run/news \ + --with-etc-dir=/etc/news --with-tmp-dir=/home/news/db/tmp \ --with-perl --enable-shared --enable-uucp-rnews \ --enable-pgp-verify --with-sendmail=/usr/sbin/sendmail \ --with-news-user=news --with-news-group=news --with-news-master=news \ + --with-openssl\ --enable-ipv6 \ --enable-libtool \ %{_target_platform} @@ -131,7 +134,9 @@ make install DESTDIR=$RPM_BUILD_ROOT # -- Install man pages needed by suck et al. mkdir -p $RPM_BUILD_ROOT/usr/include/inn - +mkdir -p $RPM_BUILD_ROOT/var/spool/news +mkdir -p $RPM_BUILD_ROOT/var/log/news +mkdir -p $RPM_BUILD_ROOT/var/lib/news for f in clibrary.h config.h dbz.h libinn.h storage.h do install -c -m 0644 ./include/$f $RPM_BUILD_ROOT/usr/include/inn @@ -144,10 +149,10 @@ done mkdir -p $RPM_BUILD_ROOT/etc mv $RPM_BUILD_ROOT/usr/lib/news/bin/rc.news $RPM_BUILD_ROOT/etc -touch $RPM_BUILD_ROOT/var/lib/news/subscriptions -chmod 644 $RPM_BUILD_ROOT/var/lib/news/subscriptions +touch $RPM_BUILD_ROOT/home/news/db/subscriptions +chmod 644 $RPM_BUILD_ROOT/home/news/db/subscriptions -install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/lib/news/distributions +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/home/news/db/distributions mkdir -p $RPM_BUILD_ROOT/etc/cron.{hourly,daily} install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.daily/inn-cron-expire @@ -157,7 +162,7 @@ install %{SOURCE7} $RPM_BUILD_ROOT/etc/c mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/innd -touch $RPM_BUILD_ROOT/var/lib/news/history +touch $RPM_BUILD_ROOT/home/news/db/history #LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/bin/makedbz -i \ # -f $RPM_BUILD_ROOT/var/lib/news/history #chmod 644 $RPM_BUILD_ROOT/var/lib/news/* @@ -200,9 +205,9 @@ find $RPM_BUILD_ROOT -type f -or -type l sed 's|^/etc/rc.d|%config(noreplace) %attr(-,root,root) &|' | \ sed 's|^/etc|%config(noreplace) &|' | \ sed 's|^/etc/news|%config(noreplace) %attr(0640,news,news)&|' | \ - sed 's|^/var/lib/news/|%config(noreplace) &|' | \ + sed 's|^/home/news/db/|%config(noreplace) &|' | \ sed 's|.*innshellvar|%config &|' | \ - sed 's|/var/log/news|%ghost &|' | \ + sed 's|/home/news/log/news|%ghost &|' | \ sed 's|/usr/lib/news/bin/inndstart$|%attr(4550,root,news) /usr/lib/news/bin/inndstart|' | \ sed 's|/usr/lib/news/bin/startinnfeed$|%attr(4550,root,news) /usr/lib/news/bin/startinnfeed|' | \ sed 's|/usr/lib/news/bin/rnews$|%attr(4550,uucp,news) /usr/lib/news/bin/rnews|' > files.list @@ -225,10 +230,10 @@ rm -f files.list files.main files.devel su -m news -c '/usr/lib/news/bin/makedbz -i -o' umask 002 -touch /var/log/news/news.notice -touch /var/log/news/news.crit -touch /var/log/news/news.err -chown -R news:news /var/log/news* +touch /home/news/log/news.notice +touch /home/news/log/news.crit +touch /home/news/log/news.err +chown -R news:news /home/news/log/news* %triggerpostun -- inn < 2.3.0 service innd stop > /dev/null 2>&1 @@ -249,10 +254,10 @@ if [ -f /etc/rsyslog.conf ]; then >> /etc/rsyslog.conf echo '#' \ >> /etc/rsyslog.conf - echo 'news.=crit /var/log/news/news.crit' >> /etc/rsyslog.conf - echo 'news.=err /var/log/news/news.err' >> /etc/rsyslog.conf - echo 'news.notice /var/log/news/news.notice' >> /etc/rsyslog.conf - echo 'news.=debug /var/log/news/news.debug' >> /etc/rsyslog.conf + echo 'news.=crit /home/news/log/news.crit' >> /etc/rsyslog.conf + echo 'news.=err /home/news/log/news.err' >> /etc/rsyslog.conf + echo 'news.notice /home/news/log/news.notice' >> /etc/rsyslog.conf + echo 'news.=debug /home/news/log/news.debug' >> /etc/rsyslog.conf fi if [ -f /var/run/rsyslogd.pid ]; then @@ -274,9 +279,9 @@ if [ -f /etc/syslog.conf ]; then >> /etc/syslog.conf echo '#' \ >> /etc/syslog.conf - echo 'news.=crit /var/log/news/news.crit' >> /etc/syslog.conf - echo 'news.=err /var/log/news/news.err' >> /etc/syslog.conf - echo 'news.notice /var/log/news/news.notice' >> /etc/syslog.conf + echo 'news.=crit /home/news/log/news.crit' >> /etc/syslog.conf + echo 'news.=err /home/news/log/news.err' >> /etc/syslog.conf + echo 'news.notice /home/news/log/news.notice' >> /etc/syslog.conf fi if [ -f /var/run/syslogd.pid ]; then kill -HUP `cat /var/run/syslogd.pid` 2> /dev/null ||: @@ -287,8 +292,8 @@ fi if [ $1 = 0 ]; then service innd stop > /dev/null 2>&1 /sbin/chkconfig --del innd - if [ -f /var/lib/news/history.dir ]; then - rm -f /var/lib/news/history.* + if [ -f /home/news/db/history.dir ]; then + rm -f /home/news/db/history.* fi fi @@ -315,18 +320,18 @@ exit 0 %dir %{_libdir}/news %endif %dir /etc/news/ -%dir /var/spool/news -%dir /var/spool/news/archive -%dir /var/spool/news/articles -%attr(0775,news,news) %dir /var/spool/news/incoming -%attr(0775,news,news) %dir /var/spool/news/incoming/bad -%dir /var/spool/news/innfeed -%dir /var/spool/news/outgoing -%dir /var/spool/news/overview -%dir /var/log/news -%dir /var/log/news/OLD -%dir /var/lib/news -%dir /var/lib/news/tmp +%dir /home/news +%dir /home/news/archive +%dir /home/news/articles +%attr(0775,news,news) %dir /home/news/incoming +%attr(0775,news,news) %dir /home/news/incoming/bad +%dir /home/news/innfeed +%dir /home/news/outgoing +%dir /home/news/overview +%dir /home/news/log +%dir /home/news/log/OLD +%dir /home/news/db +%dir /home/news/db/tmp %dir /var/run/news %defattr(-,root,root) %{_mandir}/man1/c*.1.gz [compileuser@news SPECS]$ vi inn-opennews.spec [compileuser@news SPECS]$ diff -urpN inn.spec inn-opennews.spec --- inn.spec 2008-08-29 16:46:18.000000000 +0200 +++ inn-opennews.spec 2009-01-03 06:44:22.000000000 +0100 @@ -1,7 +1,7 @@ Summary: The InterNetNews (INN) system, an Usenet news server Name: inn Version: 2.4.5 -Release: 3%{?dist} +Release: opennews4%{?dist} #see LICENSE file for details License: GPL+ and BSD and MIT and Public Domain Group: System Environment/Daemons @@ -23,6 +23,7 @@ Patch8: inn-2.4.2-makedbz.patch Patch9: inn-2.4.3.rcreaderaddrinuse.patch Patch10: inn-2.4.3-nologinshell.patch Patch11: inn-2.4.5-dynlib.patch +Patch12: inn-2.4.5.filter_nnrpd.patch BuildRequires: perl-devel python db4-devel byacc krb5-devel pam-devel e2fsprogs-devel BuildRequires: perl(ExtUtils::Embed) Requires(pre): shadow-utils @@ -77,7 +78,7 @@ local news servers. %pre getent group news >/dev/null || groupadd -r news getent passwd news >/dev/null || \ -useradd -r -g news -d /etc/news -s /sbin/nologin \ +useradd -r -g news -d /etc/news -s /bin/bash \ -c "News server user" news exit 0 @@ -93,6 +94,7 @@ exit 0 %patch9 -p1 -b .addrinuse %patch10 -p1 -b .nologin %patch11 -p1 -b .dynlib +%patch12 -p1 -b .filter_nnrpd perl -pi -e 's/LOCK_READ/LLOCK_READ/' `find . -type f` perl -pi -e 's/LOCK_WRITE/LLOCK_WRITE/' `find . -type f` @@ -109,12 +111,13 @@ export CFLAGS="$RPM_OPT_FLAGS $DEFINE_IN with_tmp_path=/var/lib/news/tmp ./configure \ --prefix=/usr/lib/news \ --sysconfdir=/etc/news --mandir=%{_mandir} \ - --with-log-dir=/var/log/news --with-spool-dir=/var/spool/news\ - --with-db-dir=/var/lib/news --with-run-dir=/var/run/news \ - --with-etc-dir=/etc/news --with-tmp-dir=/var/lib/news/tmp \ + --with-log-dir=/home/news/log --with-spool-dir=/home/news\ + --with-db-dir=/home/news/db --with-run-dir=/var/run/news \ + --with-etc-dir=/etc/news --with-tmp-dir=/home/news/db/tmp \ --with-perl --enable-shared --enable-uucp-rnews \ --enable-pgp-verify --with-sendmail=/usr/sbin/sendmail \ --with-news-user=news --with-news-group=news --with-news-master=news \ + --with-openssl\ --enable-ipv6 \ --enable-libtool \ %{_target_platform} @@ -131,7 +134,9 @@ make install DESTDIR=$RPM_BUILD_ROOT # -- Install man pages needed by suck et al. mkdir -p $RPM_BUILD_ROOT/usr/include/inn - +mkdir -p $RPM_BUILD_ROOT/var/spool/news +mkdir -p $RPM_BUILD_ROOT/var/log/news +mkdir -p $RPM_BUILD_ROOT/var/lib/news for f in clibrary.h config.h dbz.h libinn.h storage.h do install -c -m 0644 ./include/$f $RPM_BUILD_ROOT/usr/include/inn @@ -144,10 +149,10 @@ done mkdir -p $RPM_BUILD_ROOT/etc mv $RPM_BUILD_ROOT/usr/lib/news/bin/rc.news $RPM_BUILD_ROOT/etc -touch $RPM_BUILD_ROOT/var/lib/news/subscriptions -chmod 644 $RPM_BUILD_ROOT/var/lib/news/subscriptions +touch $RPM_BUILD_ROOT/home/news/db/subscriptions +chmod 644 $RPM_BUILD_ROOT/home/news/db/subscriptions -install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/lib/news/distributions +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/home/news/db/distributions mkdir -p $RPM_BUILD_ROOT/etc/cron.{hourly,daily} install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.daily/inn-cron-expire @@ -157,7 +162,7 @@ install %{SOURCE7} $RPM_BUILD_ROOT/etc/c mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d install %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/innd -touch $RPM_BUILD_ROOT/var/lib/news/history +touch $RPM_BUILD_ROOT/home/news/db/history #LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/bin/makedbz -i \ # -f $RPM_BUILD_ROOT/var/lib/news/history #chmod 644 $RPM_BUILD_ROOT/var/lib/news/* @@ -200,9 +205,9 @@ find $RPM_BUILD_ROOT -type f -or -type l sed 's|^/etc/rc.d|%config(noreplace) %attr(-,root,root) &|' | \ sed 's|^/etc|%config(noreplace) &|' | \ sed 's|^/etc/news|%config(noreplace) %attr(0640,news,news)&|' | \ - sed 's|^/var/lib/news/|%config(noreplace) &|' | \ + sed 's|^/home/news/db/|%config(noreplace) &|' | \ sed 's|.*innshellvar|%config &|' | \ - sed 's|/var/log/news|%ghost &|' | \ + sed 's|/home/news/log/news|%ghost &|' | \ sed 's|/usr/lib/news/bin/inndstart$|%attr(4550,root,news) /usr/lib/news/bin/inndstart|' | \ sed 's|/usr/lib/news/bin/startinnfeed$|%attr(4550,root,news) /usr/lib/news/bin/startinnfeed|' | \ sed 's|/usr/lib/news/bin/rnews$|%attr(4550,uucp,news) /usr/lib/news/bin/rnews|' > files.list @@ -225,10 +230,10 @@ rm -f files.list files.main files.devel su -m news -c '/usr/lib/news/bin/makedbz -i -o' umask 002 -touch /var/log/news/news.notice -touch /var/log/news/news.crit -touch /var/log/news/news.err -chown -R news:news /var/log/news* +touch /home/news/log/news.notice +touch /home/news/log/news.crit +touch /home/news/log/news.err +chown -R news:news /home/news/log/news* %triggerpostun -- inn < 2.3.0 service innd stop > /dev/null 2>&1 @@ -249,10 +254,10 @@ if [ -f /etc/rsyslog.conf ]; then >> /etc/rsyslog.conf echo '#' \ >> /etc/rsyslog.conf - echo 'news.=crit /var/log/news/news.crit' >> /etc/rsyslog.conf - echo 'news.=err /var/log/news/news.err' >> /etc/rsyslog.conf - echo 'news.notice /var/log/news/news.notice' >> /etc/rsyslog.conf - echo 'news.=debug /var/log/news/news.debug' >> /etc/rsyslog.conf + echo 'news.=crit /home/news/log/news.crit' >> /etc/rsyslog.conf + echo 'news.=err /home/news/log/news.err' >> /etc/rsyslog.conf + echo 'news.notice /home/news/log/news.notice' >> /etc/rsyslog.conf + echo 'news.=debug /home/news/log/news.debug' >> /etc/rsyslog.conf fi if [ -f /var/run/rsyslogd.pid ]; then @@ -274,9 +279,9 @@ if [ -f /etc/syslog.conf ]; then >> /etc/syslog.conf echo '#' \ >> /etc/syslog.conf - echo 'news.=crit /var/log/news/news.crit' >> /etc/syslog.conf - echo 'news.=err /var/log/news/news.err' >> /etc/syslog.conf - echo 'news.notice /var/log/news/news.notice' >> /etc/syslog.conf + echo 'news.=crit /home/news/log/news.crit' >> /etc/syslog.conf + echo 'news.=err /home/news/log/news.err' >> /etc/syslog.conf + echo 'news.notice /home/news/log/news.notice' >> /etc/syslog.conf fi if [ -f /var/run/syslogd.pid ]; then kill -HUP `cat /var/run/syslogd.pid` 2> /dev/null ||: @@ -287,8 +292,8 @@ fi if [ $1 = 0 ]; then service innd stop > /dev/null 2>&1 /sbin/chkconfig --del innd - if [ -f /var/lib/news/history.dir ]; then - rm -f /var/lib/news/history.* + if [ -f /home/news/db/history.dir ]; then + rm -f /home/news/db/history.* fi fi @@ -315,18 +320,18 @@ exit 0 %dir %{_libdir}/news %endif %dir /etc/news/ -%dir /var/spool/news -%dir /var/spool/news/archive -%dir /var/spool/news/articles -%attr(0775,news,news) %dir /var/spool/news/incoming -%attr(0775,news,news) %dir /var/spool/news/incoming/bad -%dir /var/spool/news/innfeed -%dir /var/spool/news/outgoing -%dir /var/spool/news/overview -%dir /var/log/news -%dir /var/log/news/OLD -%dir /var/lib/news -%dir /var/lib/news/tmp +%dir /home/news +%dir /home/news/archive +%dir /home/news/articles +%attr(0775,news,news) %dir /home/news/incoming +%attr(0775,news,news) %dir /home/news/incoming/bad +%dir /home/news/innfeed +%dir /home/news/outgoing +%dir /home/news/overview +%dir /home/news/log +%dir /home/news/log/OLD +%dir /home/news/db +%dir /home/news/db/tmp %dir /var/run/news %defattr(-,root,root) %{_mandir}/man1/c*.1.gz @@ -353,6 +358,7 @@ exit 0 %{_mandir}/man1/inews* %changelog +* Sa 3. Jan 06:20:56 CET 2009 Arnold Schiller news@news2.open-news-network.org Opennewsversion mit patch fillter_nnrpd.pl * Fri Aug 29 2008 Ondrej Vasik - 2.4.5-3 - patch fuzz clean up
Nicht definiert