Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14061 - Modifications for the Inn package
Summary: Modifications for the Inn package
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Martin Holzer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-16 15:56 UTC by Stephen Rose
Modified: 2003-04-16 19:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
eBuild for INN 2.3.5 (inn-2.3.5.ebuild,3.27 KB, application/octet-stream)
2003-04-16 16:12 UTC, Stefan Förster
Details
send-uucp.pl including example config and manpage (send-uucp.pl.tar,20.00 KB, application/octet-stream)
2003-04-16 16:17 UTC, Stefan Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Rose 2003-01-16 15:56:12 UTC
Recently, there's been some trouble with the inn package.  I've modified
the .ebuild file and /etc/init.d/innd to address several problems.
These are the problems that I tried to solve:

o Starting inn fails with a segmentation fault.

o The db directory is not a subdirectory as would normally be expected.

o The news tmp directory is /tmp instead of a specific directory owned by
news on a larger partition.

o The current package puts inn's pid files in /var/run rather than a
news owned subdirectory.  This makes inn unhappy.

o Reinstalling the current package deletes some empty directories that
the initial installation creates and are needed by inn.

o The inn include files are not retained for use by other programs that
might need to build against inn.  An example would be 'suck' for pulling
news from another news server.

o Inews is not executable by world.  Inews is used by mailpost, which is
potentially used by users other than news.  Actually, this is probably a
bug with inn rather than the package.

o /etc/init.d/innd doesn't start and stop inn in the manner recommended
by the inn documentation.  There are several problems with this, one of
which is that innwatch does not get started.


The segmentation fault is a problem with perl.  I have noticed some
discussion in the inn developer archives about problems with perl 5.8
that are fixed in the next version of inn.  But since I don't use
embedded perl with inn, I chose to not link against it to solve that
problem for now.  I may try to come up with a package for inn 2.3.4
which was recently released.

Here is the .ebuild file that I have currently:

-------------------------------------------------------------------
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
#

IUSE="ssl tcltk"

S=${WORKDIR}/${P}
DESCRIPTION="The Internet News daemon, fully featured NNTP server"
SRC_URI="ftp://ftp.isc.org/isc/inn/${P}.tar.gz"
HOMEPAGE="http://www.isc.org/products/INN"

SLOT="0"
LICENSE="as-is BSD"
KEYWORDS="x86"

DEPEND="app-crypt/gnupg
        tcltk? ( dev-lang/tcl )
        ssl? ( dev-libs/openssl )"

src_compile() {
        local myconf
        use tcltk && myconf="${myconf} --with-tcl"
        use ssl && myconf="${myconf} --with-openssl"

#       ./configure --prefix=/usr/lib/news \
#               --libexecdir=/usr/lib/awk \
#               --mandir=/usr/share/man \
#               --infodir=/usr/share/info \
#               --with-etc-dir=/etc/news \
#               --with-db-dir=/var/spool/news \
#               --with-spool-dir=/var/spool/news \
#               --with-log-dir=/var/log/news \
#               --with-run-dir=/var/run \
#               --with-tmp-path=/tmp \
#               --host=${CHOST}  \
#               --enable-libtool \
#               --enable-tagged-hash \
#               --with-gnu-ld \
#               --with-perl --with-python \
#               ${myconf} || die
        ./configure --prefix=/usr/lib/news \
                --mandir=/usr/share/man \
                --infodir=/usr/share/info \
                --with-etc-dir=/etc/news \
                --with-db-dir=/var/spool/news/db \
                --with-spool-dir=/var/spool/news \
                --with-log-dir=/var/log/news \
                --with-run-dir=/var/run/news \
                --with-tmp-path=/var/spool/news/tmp \
                --host=${CHOST}  \
                --enable-libtool \
                --with-gnu-ld \
                --with-python \
                ${myconf} || die

        OLD_P=${P}
        unset P
        make || die
        P=${OLD_P}
}

src_install() {
        OLD_P=${P}
        unset P
#       make prefix=${D}/usr/lib/news \
#               PATHETC=${D}/etc/news \
#               PATHMAN=${D}/usr/share/man \
#               PATHLIB=${D}/usr/lib/news/lib \
#               PATHCONTROL=${D}/usr/lib/news/bin/control \
#               PATHFILTER=${D}/usr/lib/news/bin/filter \
#               PATHRUN=${D}/var/run \
#               PATHLOG=${D}/var/log/news \
#               PATHDB=${D}/var/spool/news \
#               PATHSPOOL=${D}/var/spool/news \
#               PATHTMP=${D}/tmp \
#               MAN1=${D}/usr/share/man/man1 \
#               MAN3=${D}/usr/share/man/man3 \
#               MAN5=${D}/usr/share/man/man5 \
#               MAN8=${D}/usr/share/man/man8 \
#               install || die
        make prefix=${D}/usr/lib/news \
                PATHETC=${D}/etc/news \
                PATHMAN=${D}/usr/share/man \
                PATHLIB=${D}/usr/lib/news/lib \
                PATHCONTROL=${D}/usr/lib/news/bin/control \
                PATHFILTER=${D}/usr/lib/news/bin/filter \
                PATHRUN=${D}/var/run/news \
                PATHLOG=${D}/var/log/news \
                PATHDB=${D}/var/spool/news/db \
                PATHSPOOL=${D}/var/spool/news \
                PATHTMP=${D}/var/spool/news/tmp \
                MAN1=${D}/usr/share/man/man1 \
                MAN3=${D}/usr/share/man/man3 \
                MAN5=${D}/usr/share/man/man5 \
                MAN8=${D}/usr/share/man/man8 \
                install || die
        P=${OLD_P}

        touch ${D}/var/spool/news/tmp/.keepme
        touch ${D}/var/spool/news/outgoing/.keepme
        touch ${D}/var/spool/news/incoming/.keepme
        touch ${D}/var/spool/news/incoming/bad/.keepme
        touch ${D}/var/spool/news/archive/.keepme
        touch ${D}/var/run/news/.keepme
        chmod +x ${D}/usr/lib/news/bin/inews

        dodoc CONTRIBUTORS ChangeLog HACKING HISTORY INSTALL LICENSE
        dodoc MANIFEST NEWS README*
        dodoc doc/control-messages doc/sample-control

# So other programs can build against INN.  (eg. Suck)
        insinto ${D}/usr/lib/news/include
        doins include/*.h

        dodir /etc/init.d
        cp ${FILESDIR}/innd ${D}/etc/init.d
}

-------------------------------------------------------------------

Here is the /etc/init.d/innd file that I use:

-------------------------------------------------------------------
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
#

depend() {
        need net
}

start() {
        ebegin "Starting innd"
        su - news -c /usr/lib/news/bin/rc.news
        eend $?
}

stop() {
        ebegin "Stopping innd"
        su - news -c '/usr/lib/news/bin/rc.news stop'
        eend $?
}

-------------------------------------------------------------------

Some of this seems to address issues that have been reported in several
other bugs, 12481, 9448 (maybe), and 6740 and is related to 12943.

I'm still new to Gentoo, so there may be style issues in these files.
At the very least, I would remove the commented original portions that
I've left in for reference, if I were creating a fresh package.
Comment 1 Michael Cummings (RETIRED) gentoo-dev 2003-01-17 08:57:08 UTC
Don't know anything about inn I'm afraid. Seemant or prez?
Comment 2 Stephen Rose 2003-01-23 19:06:01 UTC
I've discovered how better to resolve the inews permission issue that I 
mentioned.  The better solution is to add the option --enable-setgid-inews to 
configure instead of the chmod during the install.  I've updated my ebuild to
reflect this.  Also, I'm working on an ebuild for inn 2.3.4.  In addition, 
I've opened a new bug on the seg fault issue.  The number is 14413.  When 
perl can be included again, I'll submit that ebuild for consideration.
Comment 3 Stefan Förster 2003-04-15 16:00:31 UTC
While at it, adding a "--enable-uuucp-rnews" and including "send-uucp.pl" would also be very nice.

As long as the perl problem is not solved by upstream authors, perhaps adding a dependency on an older perl which is veryfied to work ad explicitly specifing this one during build process would be a nice idea, if it is at all possible.

Is this package still actively maintained? If not, shall Stephen or I jump "inn"? *g*
Comment 4 Stefan Förster 2003-04-15 16:02:47 UTC
Just checked last activity on this and decided to include "bug-wrangler@gentoo.org" in CC again, just in case the developer/maintainer has changed/left the project/whatever.

Hope you don't feel bugged.
Comment 5 Stephen Rose 2003-04-15 16:17:23 UTC
I've had some other trouble since I posted this.  Even without Perl, I've 
had various seg faults that I've traced to malloc or heap corruption issues.  
I'm monitoring inn-workers where there is some discussion about things like 
this as they try to prepare for the release of inn 2.4.  I'm waiting for the 
dust to settle, then I'll try to see if a new ebuild will work with Perl.  If 
not, I'll see if Electric Fence will help.  But I'm sure it would be nice if 
a maintainer were chosen.
Comment 6 Seemant Kulleen (RETIRED) gentoo-dev 2003-04-16 02:08:19 UTC
stephen, I'm looking for one
Comment 7 Stefan Förster 2003-04-16 16:12:48 UTC
Created attachment 10755 [details]
eBuild for INN 2.3.5

This is an actualised ebuild for inn-2.3.5. I hardcoded --without-perl
(Stephen?), grouped some of the configure flags and enabled
--enable-uucp-rnews.

It exepcts to find send-uucp.pl, send-uucp.pl.8.gz and send-uucp.cf in
${FILESDIR} and includes them in the build. I'm quite new to Gentoo, perhaps
there's a better way than copying three times and doing chown/chmod afterwards.
Comment 8 Stefan Förster 2003-04-16 16:17:32 UTC
Created attachment 10756 [details]
send-uucp.pl including example config and manpage

If we need to insert more files than this, I suggest using a real tarfile in
${FILESIDR} (with relative pathnames) and modifying the ebuild so that it
really untars that file into ${D}/.

Oh, well, one thing - I had to unset CFLAGS and CXXFLAGS at home, with more
aggressive optimizations, I didn't get much of a performance boost but still
occasional segfaults :-P
Comment 9 Martin Holzer (RETIRED) gentoo-dev 2003-04-16 19:05:13 UTC
added in cvs