diff options
author | 2011-08-06 03:01:34 +0000 | |
---|---|---|
committer | 2011-08-06 03:01:34 +0000 | |
commit | 99ead0c2b71a30a4b27a851e5abcef229dc584df (patch) | |
tree | 0def0848c638ad7da1ed43c28342c90d6f6f4261 | |
parent | Version bump (bug #365935). Also fixes HPPA miscompile (bug #322831) and IA64 (diff) | |
download | historical-99ead0c2b71a30a4b27a851e5abcef229dc584df.tar.gz historical-99ead0c2b71a30a4b27a851e5abcef229dc584df.tar.bz2 historical-99ead0c2b71a30a4b27a851e5abcef229dc584df.zip |
Clean up ebuild: fix chown arguments by Agostino Sarubbo (bug #362617), long lines, nearly incomprehensible brace expansion arguments, spelling, die() more often, remove unused eclass.
Package-Manager: portage-2.2.0_alpha50/cvs/Linux x86_64
-rw-r--r-- | net-nntp/inn/ChangeLog | 11 | ||||
-rw-r--r-- | net-nntp/inn/Manifest | 18 | ||||
-rw-r--r-- | net-nntp/inn/files/inn-2.4.3-berkdb45.patch | 62 | ||||
-rw-r--r-- | net-nntp/inn/files/inn-2.4.3-configure.patch | 50 | ||||
-rw-r--r-- | net-nntp/inn/files/inn-2.4.3-runtests.patch | 58 | ||||
-rw-r--r-- | net-nntp/inn/inn-2.5.2-r1.ebuild (renamed from net-nntp/inn/inn-2.5.1.ebuild) | 123 |
6 files changed, 101 insertions, 221 deletions
diff --git a/net-nntp/inn/ChangeLog b/net-nntp/inn/ChangeLog index e4c4a8e89521..64940027811d 100644 --- a/net-nntp/inn/ChangeLog +++ b/net-nntp/inn/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-nntp/inn # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/ChangeLog,v 1.37 2011/06/22 21:22:01 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/ChangeLog,v 1.38 2011/08/06 03:01:33 jer Exp $ + +*inn-2.5.2-r1 (06 Aug 2011) + + 06 Aug 2011; Jeroen Roovers <jer@gentoo.org> -files/inn-2.4.3-berkdb45.patch, + -files/inn-2.4.3-configure.patch, -files/inn-2.4.3-runtests.patch, + -inn-2.5.1.ebuild, +inn-2.5.2-r1.ebuild: + Clean up ebuild: fix chown arguments by Agostino Sarubbo (bug #362617), long + lines, nearly incomprehensible brace expansion arguments, spelling, die() + more often, remove unused eclass. 22 Jun 2011; Brent Baude <ranger@gentoo.org> inn-2.5.2.ebuild: Marking inn-2.5.2 ppc for bug 362517 diff --git a/net-nntp/inn/Manifest b/net-nntp/inn/Manifest index 5a2302900a4b..7ff205d047d8 100644 --- a/net-nntp/inn/Manifest +++ b/net-nntp/inn/Manifest @@ -1,10 +1,16 @@ -AUX inn-2.4.3-berkdb45.patch 2389 RMD160 d0580cc8e2f1cdf60feacd597991edbfb412d3f8 SHA1 e3fe46034f4e0061276378a3e0c576b289876612 SHA256 2e762081a319a898135c98ae5a5f5e0fbcc8b25deeb65814c343a0a6683c62e2 -AUX inn-2.4.3-configure.patch 1927 RMD160 cddc4079e5c0f1c7ee25caab846873128705cb62 SHA1 9d9040346fec8ec4d5e8f47c22d8de46fbde2299 SHA256 3850d3df15c09b0d12199e7e69a3ade12f41d85ab0b22461fa75b82bb1b60d59 -AUX inn-2.4.3-runtests.patch 2543 RMD160 68605c14e225eb8484461d3170e98737198b3c2a SHA1 b365a0c100045bdd3e3338f81de05f8232f89207 SHA256 2efa10ebb0b33630f42bc070d535a99ff6ed1287ecab53b7ca8210ad74f229b0 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX innd 503 RMD160 5631966614d5bb4e1c304195e1e796a1fbc9421e SHA1 85aa86e4fcca7837e32e2e3be31fbd50e96b79c2 SHA256 ab2082ee261d632dafeaaf9ebb459e5afe684597c67b860ca0a7a8ff3bf554ed -DIST inn-2.5.1.tar.gz 2305406 RMD160 8cb24ac4fcea299b02b2b0b043a4f5506b902c47 SHA1 e49a58a3484bbb7fd230b37ca17cc34eb10c10f1 SHA256 bb486d1bd0259762a9d7339309c4e8600bd5fc6ce1af4fccde6fe9d1f64a1c58 DIST inn-2.5.2.tar.gz 2331916 RMD160 2fce7fade8bd8df3fe7f813b6feb37ff2b2bf07c SHA1 e7a9512acb5fa09ecdf116a4bde39c9f5efe65db SHA256 f5edd48f48ecee9b6430db94fe504f893d7dfae4257f55f382ba1cf7375b4e68 -EBUILD inn-2.5.1.ebuild 8017 RMD160 b8c2ce32fe93f6a6eaed7649c69fdaebec90cbef SHA1 8498ead3edb554227894302517330823ef305ca5 SHA256 7a60692beb0a91fc0ffc6100a6a4a1d9fce12a2b11d65067f5021a3a007726c7 +EBUILD inn-2.5.2-r1.ebuild 8296 RMD160 121da26a30d7bcea274cbae7827cb0ee5f18c06d SHA1 50c120ea90dde9e1697a6c718e8b3e0f62328473 SHA256 0475fbeacb9074f56045e28cb85a3a9924c406a025865489de77fda2b2bc2edb EBUILD inn-2.5.2.ebuild 8015 RMD160 4a37c5d5589b4f93440e4721dd80eda0ca14b0a9 SHA1 a29dff7239c331972cf10d077f7f10122c74b473 SHA256 571730ba03b8c7c4ac800e1a32c5d701b5621893a7cec7e40ad50a08086b64bd -MISC ChangeLog 7836 RMD160 94576f3661ff676371a86c9f57037957510ceb2b SHA1 69227d1dcab36ad06d3b170bf27bc699df07025b SHA256 194ca0355fdd437b420f70e8104afb32dda98ed4af7a3611f2ef69704fc6e6fe +MISC ChangeLog 8246 RMD160 97f018328a7a41613f2457cb1411db5422095275 SHA1 b0faa3d3a6663df1c7f8dd6b6f99f2073bd24d7c SHA256 c2ab777e592bc0febae6515e97ca36423fe871df741769f8a2009bf381facba5 MISC metadata.xml 352 RMD160 802eed9c30b34a5226648155bf521f9fd3bef350 SHA1 230d40e31eb709966710ca40e489ad00962c80bb SHA256 c58a5ed6da2054c42c3e7a6328456cedbdc45664210a95223fdd18a0fec340ce +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iEYEARECAAYFAk48rpYACgkQVWmRsqeSphNKqQCfcGG4Kuot7qZAlQm7CVyxxmZ2 +J/IAn1Rubrd1kDW1+Sh1OKGOuSUD7S69 +=SzdN +-----END PGP SIGNATURE----- diff --git a/net-nntp/inn/files/inn-2.4.3-berkdb45.patch b/net-nntp/inn/files/inn-2.4.3-berkdb45.patch deleted file mode 100644 index 6d649931a01e..000000000000 --- a/net-nntp/inn/files/inn-2.4.3-berkdb45.patch +++ /dev/null @@ -1,62 +0,0 @@ -Index: frontends/ovdb_stat.c ---- frontends/ovdb_stat.c.orig 2006-03-20 05:14:57 +0100 -+++ frontends/ovdb_stat.c 2006-09-29 07:17:19 +0200 -@@ -266,13 +266,17 @@ - { INT32, F(st_nobjects), -1, -1, "Current objects" }, - { INT32, F(st_maxnobjects), -1, -1, "Maximum objects" }, - #endif -+#if !(DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 4) - { INT32, F(st_nconflicts), -1, -1, "Lock conflicts" }, -+#endif - { INT32, F(st_nrequests), -1, -1, "Lock requests" }, - { INT32, F(st_nreleases), -1, -1, "Lock releases" }, - { DIFF32, F(st_nrequests), F(st_nreleases), F(st_ndeadlocks), "Outstanding locks" }, - #if DB_VERSION_MAJOR >= 4 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 0) -+#if !(DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 4) - { INT32, F(st_nnowaits), -1, -1, "Lock requests that would have waited" }, - #endif -+#endif - { INT32, F(st_ndeadlocks), -1, -1, "Deadlocks" }, - #if DB_VERSION_MAJOR >= 4 - { INT32, F(st_nlocktimeouts), -1, -1, "Lock timeouts" }, -Index: scripts/innwatch.in ---- scripts/innwatch.in.orig 2006-03-20 05:14:57 +0100 -+++ scripts/innwatch.in 2006-09-29 07:17:19 +0200 -@@ -126,7 +126,12 @@ - NEXTSLEEP=1 - HASEXITED=false - --while { sleep ${NEXTSLEEP} & wait; } ; : ; do -+SLEEPTINY=4 -+while { sleep ${SLEEPTINY} & wait; } ; : ; do -+ NEXTSLEEP=`expr ${NEXTSLEEP} - ${SLEEPTINY}` -+ if [ $NEXTSLEEP -gt 0 ]; then -+ continue; -+ fi - NEXTSLEEP=${INNWATCHSLEEPTIME} - - ## If news.daily is running, idle: we don't want to change the -Index: site/Makefile ---- site/Makefile.orig 2006-03-20 05:14:57 +0100 -+++ site/Makefile 2006-09-29 07:17:19 +0200 -@@ -137,7 +137,6 @@ - chmod $(FILEMODE) $@ - $D$(PATH_HISTORY): - touch $@ -- $(PATHBIN)/makedbz -i -o - - ## Remove files that are unchanged from the release version. - clean: -Index: storage/ovdb/ovdb.c ---- storage/ovdb/ovdb.c.orig 2006-03-20 05:14:57 +0100 -+++ storage/ovdb/ovdb.c 2006-09-29 07:55:00 +0200 -@@ -1526,7 +1526,9 @@ - - OVDBenv->set_errcall(OVDBenv, OVDBerror); - OVDBenv->set_cachesize(OVDBenv, 0, ovdb_conf.cachesize, 1); -+#if DB_VERSION_MAJOR < 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 5) - OVDBenv->set_lk_max(OVDBenv, ovdb_conf.maxlocks); -+#endif - - #if DB_VERSION_MAJOR >= 4 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR >= 2) - if(ovdb_conf.txn_nosync) diff --git a/net-nntp/inn/files/inn-2.4.3-configure.patch b/net-nntp/inn/files/inn-2.4.3-configure.patch deleted file mode 100644 index 6a9dee5ef3b3..000000000000 --- a/net-nntp/inn/files/inn-2.4.3-configure.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -Nur inn-2.4.3.orig/configure.in inn-2.4.3/configure.in ---- inn-2.4.3.orig/configure.in 2009-05-07 13:49:50.000000000 +0200 -+++ inn-2.4.3/configure.in 2009-05-07 14:44:30.000000000 +0200 -@@ -804,19 +818,23 @@ - - dnl Check for Kerberos libraries for auth_krb5, and if found define KRB5_AUTH - dnl to the relevant object file, which will enable compilation of it. --INN_SEARCH_AUX_LIBS(krb5_parse_name, krb5, KRB5_LIB, -- [KRB5_AUTH="auth_krb5" -- KRB5_LIB="$KRB5_LDFLAGS $KRB5_LIB -lk5crypto -lcom_err" -- AC_SUBST(KRB5_AUTH) -- AC_SUBST(KRB5_INC) -- AC_CHECK_HEADERS([et/com_err.h])], , [$LIBS -lk5crypto -lcom_err]) -+if test x"$KRB5_INC" != x ; then -+ INN_SEARCH_AUX_LIBS(krb5_parse_name, krb5, KRB5_LIB, -+ [KRB5_AUTH="auth_krb5" -+ KRB5_LIB="$KRB5_LDFLAGS $KRB5_LIB -lk5crypto -lcom_err" -+ AC_SUBST(KRB5_AUTH) -+ AC_SUBST(KRB5_INC) -+ AC_CHECK_HEADERS([et/com_err.h])], , [$LIBS -lk5crypto -lcom_err]) -+fi - - dnl Check for necessity of krb5_init_ets - dnl OSX does not require this function --inn_save_LIBS=$LIBS --LIBS=$KRB5_LIB --AC_CHECK_FUNCS(krb5_init_ets) --LIBS=$inn_save_LIBS -+if test x"$KRB5_INC" != x ; then -+ inn_save_LIBS=$LIBS -+ LIBS=$KRB5_LIB -+ AC_CHECK_FUNCS(krb5_init_ets) -+ LIBS=$inn_save_LIBS -+fi - - dnl Libraries and flags for embedded Perl. Some distributions of Linux have - dnl Perl linked with gdbm but don't normally have gdbm installed, so on that -diff -Nur inn-2.4.3.orig/include/config.h.in inn-2.4.3/include/config.h.in ---- inn-2.4.3.orig/include/config.h.in 2006-03-20 05:14:57.000000000 +0100 -+++ inn-2.4.3/include/config.h.in 2008-06-29 19:56:57.000000000 +0200 -@@ -312,6 +312,9 @@ - /* Define if you have the <dlfcn.h> header file. */ - #undef HAVE_DLFCN_H - -+/* Define if you have the <et/com_err.h> header file. */ -+#undef HAVE_ET_COM_ERR_H -+ - /* Define if you have the <gdbm-ndbm.h> header file. */ - #undef HAVE_GDBM_NDBM_H - diff --git a/net-nntp/inn/files/inn-2.4.3-runtests.patch b/net-nntp/inn/files/inn-2.4.3-runtests.patch deleted file mode 100644 index d614620bbd78..000000000000 --- a/net-nntp/inn/files/inn-2.4.3-runtests.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -Nur inn-2.4.3.orig/tests/runtests.c inn-2.4.3/tests/runtests.c ---- inn-2.4.3.orig/tests/runtests.c 2006-03-20 05:14:57.000000000 +0100 -+++ inn-2.4.3/tests/runtests.c 2007-05-18 21:42:05.000000000 +0200 -@@ -126,13 +126,13 @@ - static void sysdie(const char *format, ...); - static void *x_malloc(size_t, const char *file, int line); - static char *x_strdup(const char *, const char *file, int line); --static int test_analyze(const struct testset *); -+static int test_analyze(struct testset *); - static int test_batch(const char *testlist); - static void test_checkline(const char *line, struct testset *); - static void test_fail_summary(const struct testlist *); - static int test_init(const char *line, struct testset *); - static int test_print_range(int first, int last, int chars, int limit); --static void test_summarize(const struct testset *, int status); -+static void test_summarize(struct testset *, int status); - static pid_t test_start(const char *path, int *fd); - static double tv_diff(const struct timeval *, const struct timeval *); - static double tv_seconds(const struct timeval *); -@@ -369,7 +369,7 @@ - with a non-zero status, and a negative integer representing the signal - that terminated it if it was killed by a signal. */ - static void --test_summarize(const struct testset *ts, int status) -+test_summarize(struct testset *ts, int status) - { - int i; - int missing = 0; -@@ -436,7 +436,7 @@ - few special error messages, and then pass it along to test_summarize() - for the regular output. */ - static int --test_analyze(const struct testset *ts) -+test_analyze(struct testset *ts) - { - if (ts->reported) return 0; - if (WIFEXITED(ts->status) && WEXITSTATUS(ts->status) != 0) { -@@ -522,7 +522,7 @@ - static void - test_fail_summary(const struct testlist *fails) - { -- const struct testset *ts; -+ struct testset *ts; - int i, chars, total, first, last; - - puts(header); -diff -Nur inn-2.4.3.orig/tests/lib/snprintf-t.c inn-2.4.3/tests/lib/snprintf-t.c ---- inn-2.4.3.orig/tests/lib/snprintf-t.c 2006-03-20 05:14:57.000000000 +0100 -+++ inn-2.4.3/tests/lib/snprintf-t.c 2007-05-19 12:33:14.000000000 +0200 -@@ -125,7 +125,7 @@ - test_format(21, true, "abcdefghij4444", 14, "%.10s%n%d", string, &count, - 4444); - ok(22, count == 10); -- test_format(23, true, "abcdefghijklmnopqrstuvwxyz01234", 36, "%ln%s%n", -+ test_format(23, true, "abcdefghijklmnopqrstuvwxyz01234", 36, "%n%s%ln", - &count, string, &lcount); - ok(24, count == 0); - ok(25, lcount == 31); diff --git a/net-nntp/inn/inn-2.5.1.ebuild b/net-nntp/inn/inn-2.5.2-r1.ebuild index d26f338577f3..036585394b39 100644 --- a/net-nntp/inn/inn-2.5.1.ebuild +++ b/net-nntp/inn/inn-2.5.2-r1.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/inn-2.5.1.ebuild,v 1.9 2010/12/29 15:46:51 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nntp/inn/inn-2.5.2-r1.ebuild,v 1.1 2011/08/06 03:01:33 jer Exp $ -EAPI="2" +EAPI="4" -inherit autotools eutils fixheadtails multilib ssl-cert +inherit autotools multilib ssl-cert DESCRIPTION="The Internet News daemon, fully featured NNTP server" HOMEPAGE="https://www.isc.org/software/inn" @@ -12,10 +12,10 @@ SRC_URI="ftp://ftp.isc.org/isc/inn/${P}.tar.gz" SLOT="0" LICENSE="as-is BSD GPL-2" -KEYWORDS="amd64 ppc x86" +KEYWORDS="~amd64 ~ppc ~x86" IUSE="berkdb innkeywords inntaggedhash ipv6 kerberos perl python sasl ssl" -RDEPEND=" +DEPEND=" virtual/mta dev-perl/MIME-tools kerberos? ( virtual/krb5 ) @@ -24,19 +24,18 @@ RDEPEND=" python? ( dev-lang/python ) berkdb? ( sys-libs/db ) " -DEPEND="${RDEPEND}" +RDEPEND="${DEPEND}" src_prepare() { - #ht_fix_file configure.in support/fixscript.in - sed -i -e "s/ -B .OLD//" Makefile.global.in || die "sed failed" + sed -i -e "s/ -B .OLD//" Makefile.global.in || die # Do not treat LDFLAGS as if it contained libraries to link to - sed -i m4/python.m4 -e 's|LDFLAGS||g' || die "sed python.m4 failed" + sed -i m4/python.m4 -e 's|LDFLAGS||g' || die # We do not have the biff service, but we do have comsat sed -i tests/lib/getnameinfo-t.c \ -e 's|"biff"|"comsat"|g' \ - || die "sed getnameinfo-t.c failed" + || die eautoreconf } @@ -73,14 +72,23 @@ src_configure() { } src_install() { - emake DESTDIR="${D}/" P="" SPECIAL="" install || die "make install failed" - - chown -R root:0 "${D}"/usr/{$(get_libdir)/news/{lib,include},share/{doc,man}} - chmod 644 "${D}"/etc/news/* - for file in control.ctl expire.ctl incoming.conf nntpsend.ctl passwd.nntp readers.conf - do - chmod 640 "${D}"/etc/news/${file} - done + emake DESTDIR="${D}/" P="" SPECIAL="" install + + chown -R root:0 \ + "${D}"/usr/$(get_libdir)/news/$(get_libdir) \ + "${D}"/usr/$(get_libdir)/news/include \ + "${D}"/usr/share/doc \ + "${D}"/usr/share/man \ + || die + chmod 644 "${D}"/etc/news/* || die + chmod 640 \ + "${D}"/etc/news/control.ctl \ + "${D}"/etc/news/expire.ctl \ + "${D}"/etc/news/incoming.conf \ + "${D}"/etc/news/nntpsend.ctl \ + "${D}"/etc/news/passwd.nntp \ + "${D}"/etc/news/readers.conf \ + || die # Prevent old db/* files from being overwritten insinto /usr/share/inn/dbexamples @@ -88,13 +96,22 @@ src_install() { newins site/newsgroups.minimal newsgroups keepdir \ - /var/{log,run}/news \ - /var/spool/news/{,archive,articles,db,incoming{,/bad},innfeed,outgoing,overview,tmp} + /var/log/news \ + /var/run/news \ + /var/spool/news/archive \ + /var/spool/news/articles \ + /var/spool/news/db \ + /var/spool/news/incoming \ + /var/spool/news/incoming/bad \ + /var/spool/news/innfeed \ + /var/spool/news/outgoing \ + /var/spool/news/overview \ + /var/spool/news/tmp dodoc ChangeLog MANIFEST README* doc/checklist use ipv6 && dodoc doc/IPv6-info - # So other programs can build against INN. (eg. Suck) + # So other programs can build against INN insinto /usr/$(get_libdir)/news/include doins include/*.h @@ -108,7 +125,8 @@ pkg_postinst() { if [[ -f ${ROOT}/usr/share/inn/dbexamples/${db_file} ]] then - cp "${ROOT}"/usr/share/inn/dbexamples/${db_file} "${ROOT}"/var/spool/news/db/${db_file} + cp "${ROOT}"/usr/share/inn/dbexamples/${db_file} \ + "${ROOT}"/var/spool/news/db/${db_file} else touch "${ROOT}"/var/spool/news/db/${db_file} fi @@ -130,7 +148,8 @@ pkg_postinst() { if use ssl then install_cert /etc/news/cert/cert - chown news:news "${ROOT}"/etc/news/cert/cert.{crt,csr,key,pem} + chown news:news \ + "${ROOT}"/etc/news/cert/cert.{crt,csr,key,pem} elog elog "You may want to start nnrpd manually for native ssl support." @@ -190,14 +209,21 @@ pkg_config() { chmod 644 "${NEWSSPOOL_DIR}"/db/history su - news -c "/usr/$(get_libdir)/news/bin/makedbz -i" - [[ -f ${NEWSSPOOL_DIR}/db/history.n.dir ]] && mv -f "${NEWSSPOOL_DIR}"/db/history.n.dir "${NEWSSPOOL_DIR}"/db/history.dir - [[ -f ${NEWSSPOOL_DIR}/db/history.n.pag ]] && mv -f "${NEWSSPOOL_DIR}"/db/history.n.pag "${NEWSSPOOL_DIR}"/db/history.pag - [[ -f ${NEWSSPOOL_DIR}/db/history.n.hash ]] && mv -f "${NEWSSPOOL_DIR}"/db/history.n.hash "${NEWSSPOOL_DIR}"/db/history.hash - [[ -f ${NEWSSPOOL_DIR}/db/history.n.index ]] && mv -f "${NEWSSPOOL_DIR}"/db/history.n.index "${NEWSSPOOL_DIR}"/db/history.index + [[ -f ${NEWSSPOOL_DIR}/db/history.n.dir ]] && \ + mv -f "${NEWSSPOOL_DIR}"/db/history.n.dir \ + "${NEWSSPOOL_DIR}"/db/history.dir + [[ -f ${NEWSSPOOL_DIR}/db/history.n.pag ]] && \ + mv -f "${NEWSSPOOL_DIR}"/db/history.n.pag \ + "${NEWSSPOOL_DIR}"/db/history.pag + [[ -f ${NEWSSPOOL_DIR}/db/history.n.hash ]] && \ + mv -f "${NEWSSPOOL_DIR}"/db/history.n.hash \ + "${NEWSSPOOL_DIR}"/db/history.hash + [[ -f ${NEWSSPOOL_DIR}/db/history.n.index ]] && \ + mv -f "${NEWSSPOOL_DIR}"/db/history.n.index \ + "${NEWSSPOOL_DIR}"/db/history.index su - news -c /usr/$(get_libdir)/news/bin/makehistory else NEWS_ERRFLAG="1" - eerror eerror "Your installation seems to be screwed up." eerror "${NEWSSPOOL_DIR}/db/history does not exist, but there's" eerror "one of the files history.dir, history.hash or history.index" @@ -205,41 +231,50 @@ pkg_config() { eerror "Use your backup to restore the history database." fi else - einfo "${NEWSSPOOL_DIR}/db/history found. Leaving history database as it is." + einfo "${NEWSSPOOL_DIR}/db/history found." + einfo "Leaving history database as it is." fi - INNCFG_INODES="$(sed -e '/innwatchspoolnodes/ ! d' /etc/news/inn.conf | sed -e 's/[^ ]*[ ]*\([^ ]*\)/\1/')" - INNSPOOL_INODES="$(df -Pi ${NEWSSPOOL_DIR} | sed -e 's/[^ ]*[ ]*\([^ ]*\).*/\1/' | sed -e '1 d')" - if [[ ${INNCFG_INODES} -gt ${INNSPOOL_INODES} ]] - then + INNCFG_INODES=$( + sed -e '/innwatchspoolnodes/ ! d' | \ + sed -e 's/[^ ]*[ ]*\([^ ]*\)/\1/' \ + /etc/news/inn.conf + ) + INNSPOOL_INODES=$( + df -Pi ${NEWSSPOOL_DIR} | \ + sed -e 's/[^ ]*[ ]*\([^ ]*\).*/\1/' | \ + sed -e '1 d' + ) + if [[ ${INNCFG_INODES} -gt ${INNSPOOL_INODES} ]]; then ewarn "Setting innwatchspoolinodes to zero, because the filesystem behind" ewarn "$NEWSSPOOL_DIR works without inodes." ewarn cp /etc/news/inn.conf /etc/news/inn.conf.OLD einfo "A copy of your old inn.conf has been saved to /etc/news/inn.conf.OLD." - sed -i -e '/innwatchspoolnodes/ s/\([^ ]*\)\([ ]*\).*/\1\20/' /etc/news/inn.conf + sed -i /etc/news/inn.conf \ + -e '/innwatchspoolnodes/ s/\([^ ]*\)\([ ]*\).*/\1\20/' chown news:news /etc/news/inn.conf chmod 644 /etc/news/inn.conf fi - INNCHECK_LINES="$(su - news -c "/usr/$(get_libdir)/news/bin/inncheck | wc -l")" - if [[ ${INNCHECK_LINES} -gt 0 ]] - then + INNCHECK_LINES=$( + su - news -c "/usr/$(get_libdir)/news/bin/inncheck | wc -l" + ) + if [[ ${INNCHECK_LINES} -gt 0 ]]; then NEWS_ERRFLAG="1" ewarn "inncheck most certainly found an error." ewarn "Please check its output:" eerror "`su - news -c /usr/$(get_libdir)/news/bin/inncheck`" fi - if [[ ${NEWS_ERRFLAG} -gt 0 ]] - then + if [[ ${NEWS_ERRFLAG} -gt 0 ]]; then eerror - eerror "There were one or more errors/warnings checking your configuration." - eerror "Please read inn's documentation and fix them accordingly." + eerror "There were one or more errors/warnings checking your" + eerror "configuration. Please read inn's documentation and" + eerror "fix them accordingly." else einfo einfo "Inn configuration tests passed successfully." - einfo - ewarn "Please ensure you configured inn properly." + ewarn "Please ensure you have configured inn properly." fi } |