unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* wip spamassassin
@ 2016-07-26 22:50 Danny Milosavljevic
  2016-07-27  0:01 ` Ben Woodcroft
  2016-07-28 21:47 ` Leo Famulari
  0 siblings, 2 replies; 3+ messages in thread
From: Danny Milosavljevic @ 2016-07-26 22:50 UTC (permalink / raw)
  To: guix-devel

Hi,

I'm trying to package spamassassin.

I've got it to work with

$ guix build -S spamassassin
... extract it
$ guix environment --pure spamassassin
$ perl Makefile.PL PREFIX=/gnu/store/37hdpcyz1b6y5jjwzdmxw14gd1xsf9fv-spamassassin-3.4.1 INSTALLDIRS=site
$ make
... works fine.

But

$ guix package -i spamassassin

fails with:

...
checking for h_errno... yes
checking for in_addr_t... yes
checking for INADDR_NONE... yes
checking for EX__MAX... yes
checking for EAI_ADDRFAMILY... no
checking for EAI_SYSTEM... (cached) no
checking for EAI_NODATA... (cached) no
configure: creating ./config.status
./configure: line 5848: /bin/sh: No such file or directory
Makefile:1815: recipe for target 'spamc/Makefile' failed
make: *** [spamc/Makefile] Error 1
phase `build' failed after 6.1 seconds
builder for `/gnu/store/y604k3bqc40zxclhvja45f2fq8yz4jnz-spamassassin-3.4.1.drv' failed with exit code 1
guix package: error: build failed: build of `/gnu/store/y604k3bqc40zxclhvja45f2fq8yz4jnz-spamassassin-3.4.1.drv' failed

Why?

Patch:

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 6d47016..1d410cb 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1326,3 +1326,41 @@ Khard can also be used from within the email client @command{mutt}.")
   (description "Mail::SPF is the Sender Policy Framework implemented
 in Perl.")
   (license bsd-3)))
+
+(define-public spamassassin
+  (package
+    (name "spamassassin")
+    (version "3.4.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://mirror.klaus-uwe.me/apache/spamassassin/source/"
+                                  "Mail-SpamAssassin-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0la6s5ilamf9129kyjckcma8cr6fpb6b5f2fb64v7106iy0ckhd0"))))
+    (build-system perl-build-system)
+    (inputs `(("perl-html-parser" ,perl-html-parser)
+              ("perl-net-dns" ,perl-net-dns)
+              ("perl-netaddr-ip" ,perl-netaddr-ip)
+              ("perl-digest-sha1" ,perl-digest-sha1)
+              ("perl-db-file" ,perl-db-file)
+              ("perl-mail-spf" ,perl-mail-spf)
+              ("perl-geo-ip" ,perl-geo-ip)
+              ("perl-net-cidr-lite" ,perl-net-cidr-lite)
+              ; FIXME find and re-add ("perl-razor2" ,perl-razor2)
+              ("perl-io-socket-inet6" ,perl-io-socket-inet6)
+              ("perl-io-socket-ssl" ,perl-io-socket-ssl)
+              ;; FIXME fix and re-add ("perl-mail-dkim" ,perl-mail-dkim)
+              ("perl-dbi" ,perl-dbi)
+              ; FIXME find and re-add ("perl-lwp-useragent" ,perl-lwp-useragent)
+              ("perl-http-date" ,perl-http-date)
+              ("perl-encode-detect" ,perl-encode-detect)
+              ("perl-net-patricia" ,perl-net-patricia)
+              ; FIXME find and re-add ("perl-net-dns-nameserver" ,perl-net-dns-nameserver)
+))
+    ; TODO optional binaries: gpg wget curl fetch
+    (synopsis "Spam Filter")
+    (description "SpamAssassin is a complete spam checker, featuring local tests, remote
+tests, Bayesian filtering, and more.")
+    (home-page "http://spamassassin.apache.org/")
+    (license asl2.0)))

It needs all the perl packages I've submitted lately, too.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: wip spamassassin
  2016-07-26 22:50 wip spamassassin Danny Milosavljevic
@ 2016-07-27  0:01 ` Ben Woodcroft
  2016-07-28 21:47 ` Leo Famulari
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Woodcroft @ 2016-07-27  0:01 UTC (permalink / raw)
  To: Danny Milosavljevic, guix-devel

Hi Danny,

Thanks for all your patches.

On 27/07/16 08:50, Danny Milosavljevic wrote:
> Hi,
>
> I'm trying to package spamassassin.
>
> I've got it to work with
>
> $ guix build -S spamassassin
> ... extract it
> $ guix environment --pure spamassassin
> $ perl Makefile.PL PREFIX=/gnu/store/37hdpcyz1b6y5jjwzdmxw14gd1xsf9fv-spamassassin-3.4.1 INSTALLDIRS=site
> $ make
> ... works fine.
>
> But
>
> $ guix package -i spamassassin
>
> fails with:
>
> ...
> checking for h_errno... yes
> checking for in_addr_t... yes
> checking for INADDR_NONE... yes
> checking for EX__MAX... yes
> checking for EAI_ADDRFAMILY... no
> checking for EAI_SYSTEM... (cached) no
> checking for EAI_NODATA... (cached) no
> configure: creating ./config.status
> ./configure: line 5848: /bin/sh: No such file or directory

This seems to be the error here. Is "/bin/sh" hard-coded into a file 
somewhere? This path exists outside the build environment, but doesn't 
inside, potentially explaining why compilation works outside but not inside.

ben

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: wip spamassassin
  2016-07-26 22:50 wip spamassassin Danny Milosavljevic
  2016-07-27  0:01 ` Ben Woodcroft
@ 2016-07-28 21:47 ` Leo Famulari
  1 sibling, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2016-07-28 21:47 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Wed, Jul 27, 2016 at 12:50:58AM +0200, Danny Milosavljevic wrote:
> ./configure: line 5848: /bin/sh: No such file or directory

I recommend you try adapting the 'patch-config-files' phase from
the Vim package definition in (gnu packages vim):

        #:phases
        (modify-phases %standard-phases
          (add-after 'configure 'patch-config-files
            (lambda _
              (substitute* "runtime/tools/mve.awk"
                (("/usr/bin/nawk") (which "gawk")))
              (substitute* "src/testdir/Makefile"
                (("/bin/sh") (which "sh"))))))))

I hope that helps!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-28 21:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-26 22:50 wip spamassassin Danny Milosavljevic
2016-07-27  0:01 ` Ben Woodcroft
2016-07-28 21:47 ` Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).