SpamAssassin
v3 cover SpamAssassin
V3:
- fix Perl/CPAN infrastructure
- patch SpamAssassin in order to avoid host-perl modules dependencies
See previous discussion in https://patchwork.ozlabs.org/patch/464635/
Francois Perrad (2):
pkg-perl: avoid insertion of host-perl in the shebang of scripts
perl-mail-spamassassin: new package
package/Config.in | 1 + .../0001-without-host-perl-dependencies.patch | 64 ++++++++++++++++++++++ package/perl-mail-spamassassin/Config.in | 26 +++++++++ .../perl-mail-spamassassin.hash | 3 + .../perl-mail-spamassassin.mk | 31 +++++++++++ package/pkg-perl.mk | 1 + 6 files changed, 126 insertions(+) create mode 100644 package/perl-mail-spamassassin/0001-without-host-perl-dependencies.patch create mode 100644 package/perl-mail-spamassassin/Config.in create mode 100644 package/perl-mail-spamassassin/perl-mail-spamassassin.hash create mode 100644 package/perl-mail-spamassassin/perl-mail-spamassassin.mk
--
2.5.0
PATCH v3 1/2 pkg-perl: avoid insertion of host-perl in the shebang of scripts
--- package/pkg-perl.mk | 1 + 1 file changed, 1 insertion(+)
package/pkg-perl.mk +1 -0
@@ -140,6 +140,7 @@ define $(2)_BUILD_CMDS else \ $$(MAKE1) \ PERL_INC=$$(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$$(PERL_ARCHNAME)/CORE \ + FIXIN=: \ $$($(2)_BUILD_OPTS) pure_all; \ fi endef
Signature · 1 line
2.5.0
PATCH v3 1/2 pkg-perl: avoid insertion of host-perl in the shebang of scripts
Am Fri, 04 Dec 2015 20:26:56 +0100 schrieb Francois Perrad:
package/pkg-perl.mk index
Quoted 12 lines
Signed-off-by: Francois Perrad
<[email protected]>--- package/pkg-perl.mk | 1 + 1 file changed, 1 insertion(+)package/pkg-perl.mk index renamed from package/pkg-perl.mk +0
-0a06c068..a027810 100644 ---
a/package/pkg-perl.mk+++b/package/pkg-perl.mk@@ -140,6 +140,7 @@ define $(2)_BUILD_CMDSpackage/pkg-perl.mk index renamed from package/pkg-perl.mk +0
-0else \ $$(MAKE1) \ PERL_INC=$$(STAGING_DIR)/usr/lib/perl5/$
$(PERL_VERSION)/$$(PERL_ARCHNAME)/CORE
package/pkg-perl.mk index
Quoted 5 lines
package/pkg-perl.mk index renamed from package/pkg-perl.mk +1
-0\ + FIXIN=: \ $$($(2)_BUILD_OPTS) pure_all; \ fi endef
(compile tested with Spamassassin, noticed no problems)
PATCH v3 2/2 perl-mail-spamassassin: new package
In reply to Francois Perrad--- package/Config.in | 1 + .../0001-without-host-perl-dependencies.patch | 64 ++++++++++++++++++++++ package/perl-mail-spamassassin/Config.in | 26 +++++++++ .../perl-mail-spamassassin.hash | 3 + .../perl-mail-spamassassin.mk | 31 +++++++++++ 5 files changed, 125 insertions(+) create mode 100644 package/perl-mail-spamassassin/0001-without-host-perl-dependencies.patch create mode 100644 package/perl-mail-spamassassin/Config.in create mode 100644 package/perl-mail-spamassassin/perl-mail-spamassassin.hash create mode 100644 package/perl-mail-spamassassin/perl-mail-spamassassin.mk
package/Config.in +1 -0
@@ -553,6 +553,7 @@ menu "Perl libraries/modules" source "package/perl-libwww-perl/Config.in" source "package/perl-lwp-mediatypes/Config.in" source "package/perl-mail-dkim/Config.in" + source "package/perl-mail-spamassassin/Config.in" source "package/perl-mailtools/Config.in" source "package/perl-mime-base64/Config.in" source "package/perl-mojolicious/Config.in"
package/perl-mail-spamassassin/0001-without-host-perl-dependencies.patch new file +64 -0
64 lines not on this page · raw message
package/perl-mail-spamassassin/Config.in new file +26 -0
@@ -0,0 +1,26 @@ +config BR2_PACKAGE_PERL_MAIL_SPAMASSASSIN + bool "perl-mail-spamassassin" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_PERL_DIGEST_SHA1 + select BR2_PACKAGE_PERL_HTML_PARSER + select BR2_PACKAGE_PERL_MAIL_DKIM + select BR2_PACKAGE_PERL_NET_DNS + select BR2_PACKAGE_PERL_NETADDR_IP + help + SpamAssassin is an extensible email filter which is used to identify spam + + http://spamassassin.apache.com/ + +comment "perl-mail-spamassassin needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +if BR2_PACKAGE_PERL_MAIL_SPAMASSASSIN + +config BR2_PACKAGE_PERL_MAIL_SPAMASSASSIN_CONTACT_ADDRESS + string "contact address" + default "the administrator of that BR system" + help + What email address or URL should be used in the suspected-spam report + text for users who want more information on your filter installation? + +endif
package/perl-mail-spamassassin/perl-mail-spamassassin.hash new file +3 -0
@@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 76eca1f38c11635d319e62c26d5b034b Mail-SpamAssassin-3.4.1.tar.gz +sha256 9b7a95a594cdca4f265707364478b57813b82a0ec7e520d9bc818bfbcafdd726 Mail-SpamAssassin-3.4.1.tar.gz
package/perl-mail-spamassassin/perl-mail-spamassassin.mk new file +31 -0
@@ -0,0 +1,31 @@ +################################################################################ +# +# perl-mail-spamassassin +# +################################################################################ + +PERL_MAIL_SPAMASSASSIN_VERSION = 3.4.1 +PERL_MAIL_SPAMASSASSIN_SOURCE = Mail-SpamAssassin-$(PERL_MAIL_SPAMASSASSIN_VERSION).tar.gz +PERL_MAIL_SPAMASSASSIN_SITE = $(BR2_CPAN_MIRROR)/authors/id/K/KM/KMCGRAIL/SpamAssassin +PERL_MAIL_SPAMASSASSIN_DEPENDENCIES = perl-digest-sha1 perl-html-parser perl-mail-dkim perl-net-dns perl-netaddr-ip +PERL_MAIL_SPAMASSASSIN_LICENSE = Apache-2.0 + +ifeq ($(BR2_PACKAGE_PERL_ENCODE_DETECT),y) +PERL_MAIL_SPAMASSASSIN_DEPENDENCIES += perl-encode-detect +endif + +ifeq ($(BR2_PACKAGE_PERL_HTTP_DATE),y) +PERL_MAIL_SPAMASSASSIN_DEPENDENCIES += perl-http-date +endif + +ifeq ($(BR2_PACKAGE_PERL_IO_SOCKET_SSL),y) +PERL_MAIL_SPAMASSASSIN_DEPENDENCIES += perl-io-socket-ssl +endif + +ifeq ($(BR2_PACKAGE_PERL_LIBWWW_PERL),y) +PERL_MAIL_SPAMASSASSIN_DEPENDENCIES += perl-libwww-perl +endif + +PERL_MAIL_SPAMASSASSIN_CONF_OPTS += CONTACT_ADDRESS="$(call qstrip,$(BR2_PACKAGE_PERL_MAIL_SPAMASSASSIN_CONTACT_ADDRESS))" + +$(eval $(perl-package))
Signature · 1 line
2.5.0
PATCH v3 2/2 perl-mail-spamassassin: new package
Hi Francois,
thank you very much for your patch, several months ago I tried to create a working Spamassassin package and failed, your patch works fine! I now have a working Spamassassin 3.4.1 daemon running on my buildroot machine :)
Please add perl-db-file as optional package, because
https://api.metacpan.org/source/KMCGRAIL/Mail-SpamAssassin-3.4.1/UPGRADE
"Note for Users Upgrading from SpamAssassin 2.5x
-----------------------------------------------
- Due to major reliability shortcomings in the database support libraries other than DB_File, we now require that the DB_File module be installed to use SpamAssassin's Bayes rules.
SpamAssassin will still work without DB_File installed, but the Bayes support will be disabled."
using Spamassassin without a Bayes database makes not much sense:
ifeq ($(BR2_PACKAGE_PERL_DB_FILE),y) PERL_MAIL_SPAMASSASSIN_DEPENDENCIES += perl-db-file endif
An additional patch is needed to get a working perl-db-file module:
http://patchwork.ozlabs.org/patch/553054/
Furthermore the default paths produced by your package make not much sense:
$ grep "'make' time" output/target/usr/bin/spamassassin my $PREFIX = ''; # substituted at 'make' time my $DEF_RULES_DIR = '/share/spamassassin'; # substituted at 'make' time my $LOCAL_RULES_DIR = '/mail/spamassassin'; # substituted at 'make' time my $LOCAL_STATE_DIR = ''; # substituted at 'make' time
I recommend this patch
-PERL_MAIL_SPAMASSASSIN_CONF_OPTS += CONTACT_ADDRESS="$(call qstrip, $(BR2_PACKAGE_PERL_MAIL_SPAMASSASSIN_CONTACT_ADDRESS))" +PERL_MAIL_SPAMASSASSIN_CONF_OPTS += \
+ CONTACT_ADDRESS="$(call qstrip,
$(BR2_PACKAGE_PERL_MAIL_SPAMASSASSIN_CONTACT_ADDRESS))" \
+ VENDORPREFIX=/usr \
+ INSTALLVENDORCONF=/etc/mail/spamassassin
to have paths like these:
$ grep "'make' time" output/target/usr/bin/spamassassin my $PREFIX = '/usr'; # substituted at 'make' time my $DEF_RULES_DIR = '/usr/share/spamassassin'; # substituted at 'make' time my $LOCAL_RULES_DIR = '/etc/mail/spamassassin'; # substituted at 'make' time my $LOCAL_STATE_DIR = '/var/lib/spamassassin'; # substituted at 'make' time
Regards, Bernd