Mailing List Archive

[Bug 2885] New: spamc.1 is not built correctly
http://bugzilla.spamassassin.org/show_bug.cgi?id=2885

Summary: spamc.1 is not built correctly
Product: Spamassassin
Version: 2.61
Platform: All
OS/Version: OpenBSD
Status: NEW
Severity: minor
Priority: P5
Component: Building & Packaging
AssignedTo: spamassassin-dev@incubator.apache.org
ReportedBy: greg@wooledge.org


On OpenBSD 3.3 and above (perl 5.8), all versions of spamassassin that I've
tested install an "empty" (comes up blank when read, and causes an error message
to be generated during a weekly system cron job) spamc.1 man page to bc created.
This used to work under OpenBSD 3.2 (perl 5.6). Tested versions of
spamassassin were 2.53, 2.60 and 2.61.

(Diagnosis done by jmc at acn.waw.pl.)

I really think you have a problem with spamassassin and not OpenBSD/perl.
You will probably get better help from spamassassin people. perl is only
doing what it's told - generate a man page from an empty file (in this case
"spamd/spamc$(EXE_EXT)".

The obvious workaround is to generate spamc.1 by hand after you install
spamassassin. i.e.

pod2man spamc.pod > spamc.1

and copying it to /usr/local/man/man1 (or wherever).

The problem seems to be that the (empty) suffix $(EXT_EXE) is being used
for both the spamc executable and man page. Since the suffix is empty,
perl is effectively doing

pod2man spamc > spamc.1

which generates the nroff macros, but doesn't include the .pod file. For
example, I can get the man page installed ok if I change the perl
generated makefile like this:

--- Makefile Wed Dec 31 10:24:40 2003
+++ Makefile.new Wed Dec 31 10:24:30 2003
@@ -161,7 +161,7 @@
H_FILES =
MAN1PODS = sa-learn \
spamassassin \
- spamd/spamc$(EXE_EXT) \
+ spamd/spamc.pod \
spamd/spamd
MAN3PODS = lib/Mail/SpamAssassin.pm \
lib/Mail/SpamAssassin/AutoWhitelist.pm \
@@ -530,7 +530,7 @@


manifypods : pure_all \
- spamd/spamc$(EXE_EXT) \
+ spamd/spamc.pod \
sa-learn \
spamassassin \
spamd/spamd \
@@ -551,7 +551,7 @@
lib/Mail/SpamAssassin/PerMsgLearner.pm \
lib/Mail/SpamAssassin/Bayes.pm
$(NOECHO) $(POD2MAN) --section=1 --perm_rw=$(PERM_RW)\
- spamd/spamc$(EXE_EXT) $(INST_MAN1DIR)/spamc$(EXE_EXT).$(MAN1EXT) \
+ spamd/spamc.pod $(INST_MAN1DIR)/spamc.$(MAN1EXT) \
sa-learn $(INST_MAN1DIR)/sa-learn.$(MAN1EXT) \
spamassassin $(INST_MAN1DIR)/spamassassin.$(MAN1EXT) \
spamd/spamd $(INST_MAN1DIR)/spamd.$(MAN1EXT)

(possibly breaking sth. else in the process :)



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Re: [Bug 2885] New: spamc.1 is not built correctly [ In reply to ]
> MAN1PODS = sa-learn \
> spamassassin \
> - spamd/spamc$(EXE_EXT) \
> + spamd/spamc.pod \


FWIW, I get the following assignment for SA 2.61 on NetBSD with Perl 5.8
(built-in ExtUtils::MakeMaker 6.03):

MAN1PODS = sa-learn \
spamassassin \
spamd/spamc.pod \

The analysis was obviously correct, pod2man cannot create a man page from
spamd/spamc. But the fact that your Makefile includes
spamd/spamc$(EXE_EXT) in the MAN1PODS variable is wrong in the first
place.

From this value in Makefile.PL

'MAN1PODS' => {
...
'spamd/spamc.pod' => '$(INST_MAN1DIR)/spamc.$(MAN1EXT)',

you should _not_ get this assignment in your Makefile

MAN1PODS = ... spamd/spamc$(EXE_EXT)


ciao
Klaus