Summary: | POPFile 0.22.1 ebuild | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dirkjan Ochtman (RETIRED) <djc> |
Component: | New packages | Assignee: | Stuart Herbert (RETIRED) <stuart> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | kenyon |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ebuild for DBD::SQLite2
ebuild for popfile-0.22.2 |
Description
Dirkjan Ochtman (RETIRED)
![]() I tried to install popfile-0.22.2 by just changing the filename of Manuzhai's ebuild above, but I ran into a bunch of problems. It does the emerge successfully. When I ran popfile.pl, it complained about not being able to find Loader.pm in @INC. With the permissions set by the ebuild normal users can't read the /usr/share/popfile/POPFile directory, or anything else in /usr/share/popfile. So I changed all the permissions. Also I exported PERLLIB=/usr/share/popfile in my environment. Then I ran it and it says this: $ /usr/share/popfile/popfile.pl POPFile Engine loading Loading... {core:} {classifier:} {interface:} {proxy:} {services:} Can't call method "classifier" on an undefined value at /usr/share/popfile/POPFile/Loader.pm line 556. It does this executing as root also. I looked at this line and decided I better wait until the experts make this ebuild. :) I guess I'll use 0.21.1 for now, but it would be nice to have the latest version. Thanks! Actually I just re-read Bug 48031 Comment 4... Started ./popfile.pl from /usr/share/popfile as root. Gives this output: # ./popfile.pl POPFile Engine loading Loading... {core: config history logger mq} {classifier: bayes wordmangle} {interface: html xmlrpc} {proxy: nntp pop3 smtp} {services: imap} POPFile Engine v0.22.2 starting Initializing... {core: config history logger mq} {classifier: bayes wordmangle} {interface: html xmlrpc} {proxy: nntp pop3 smtp} {services: imap} Starting... {core: config history logger mq} install_driver(SQLite2) failed: Can't locate DBD/SQLite2.pm in @INC (@INC contains: ./ /usr/share/popfile /etc/perl /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i686-linux /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl .) at (eval 35) line 3. Perhaps the DBD::SQLite2 perl module hasn't been fully installed, or perhaps the capitalisation of 'SQLite2' isn't right. Available drivers: DBM, ExampleP, File, Proxy, SQLite, Sponge. at /Classifier/Bayes.pm line 729 So I guess I need to change the ebuild to require DBD/SQLite2... I installed DBD::SQLite2 with g-cpan.pl, and I have POPFile 0.22.2 running just fine now, installed by the renamed 0.22.1 ebuild. I don't know how to make the ebuild do the g-cpan.pl thing, so I also made Bug 75982, a request for the 0.22.1 ebuild in the Portage tree. *** Bug 75982 has been marked as a duplicate of this bug. *** You need DBD::SQLite2 in order to run popfile 0.22.2 DBD::SQLite2 is DBD::SQLite renamed after version 0.31 to allow continued use of the sqlite-2.x api after DBD::SQLite went to version 1.0 using the sqlite-3.x api. In order to do this I used the ebuild from DBD-SQLite-0.31 to create the ebuild of DBD-SQLite2-0.33.ebuild with the change of checking to make sure that the version of DBD was >= 1.03. Created attachment 58402 [details]
ebuild for DBD::SQLite2
This is ebuild was created from DBD-SQLite-0.31
Created attachment 59806 [details]
ebuild for popfile-0.22.2
Note, DIGEST-MD5 moved from dev-perl to perl-core. This ebuild takes that into
account. (orignally this build had dev-perl/DIGEST-MD5 as a dependency now it
has perl-core/DIGEST-MD5. Had to make that change today after syncing my
portage tree.
Comment on attachment 59806 [details] ebuild for popfile-0.22.2 ># Copyright 1999-2004 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/mail-filter/popfile/popfile-0.21.1.ebuild,v 1.4 2004/09/25 17:50:35 ticho Exp $ > >IUSE="" > >S=${WORKDIR} >DESCRIPTION="Anti-spam bayesian filter" >HOMEPAGE="http://popfile.sourceforge.net/" >SRC_URI="mirror://sourceforge/popfile/${P}.zip" > >SLOT="0" >LICENSE="GPL-2" >KEYWORDS="~x86 ~ppc" > >DEPEND=">=dev-lang/perl-5.8 > perl-core/Digest-MD5 > dev-perl/Text-Kakasi > perl-core/MIME-Base64 > dev-perl/HTML-Tagset > dev-perl/DBD-SQLite2 > dev-perl/HTML-Template > dev-perl/TimeDate > app-arch/unzip" > >src_compile() { > # do nothing > echo > /dev/null >} > >src_install() { > # yes, this is crude, but it's a start > > dodir /usr/share/popfile > find . -type f -print | xargs chmod 600 > find . -type d -print | xargs chmod 700 > tar -cf - * | ( cd ${D}/usr/share/popfile && tar -xf - ) > > fperms 0755 usr/share/popfile/popfile.pl > dodir /usr/share/popfile/corpus > dodir /usr/share/popfile/messages >} > >pkg_postinst () { > einfo "To start popfile, run /usr/share/popfile/popfile.pl" > einfo > einfo "A /etc/init.d script will be added once popfile can support" > einfo "multiple users" >} Well looks like MIME-Base64 and DIGEST-MD5 were the only ones moved from dev-perl to perl-core. Hmm? In portage, closing a stale bug. |