Bug 16983 - procmail port not prefix clean
Summary: procmail port not prefix clean
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: dwcjr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-02-25 11:10 UTC by Andreas Klemm
Modified: 2001-06-14 17:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Klemm 2000-02-25 11:10:01 UTC
	If you install procmail with PREFIX=/home/local,
	the port itself installs fine under /usr/local
	But procmail tries to execute /usr/local/bin/formail
	Looking into config.h, many paths are hardcoded /usr/local.
	Lost some mails because of that if they are not somewhere
	temporarily stored.

Fix: 

no fix, sorry.
How-To-Repeat: 
	setenv PREFIX=/home/local
	cd procmail
	make all install clean
	Then try to use procmail in sendmail environment by
	adding this to your sendmail .mc file:
	define(`PROCMAIL_MAILER_PATH', `/home/local/bin/procmail')dnl 
	FEATURE(local_procmail)
Comment 1 Ade Lovett freebsd_committer freebsd_triage 2000-02-25 16:10:55 UTC
Responsible Changed
From-To: freebsd-ports->ache

Over to maintainer. 

Comment 2 Pete Fritchman 2001-01-26 16:20:57 UTC
Yes, it looks like there is a PATH and SPATH (secure PATH I presume)
hard coded into procmail (looking at strings output).

After the following patch I made with PREFIX=/foo and it worked:
electron [508] % strings procmail | grep /foo
/foo/etc/procmailrc
SPATH=/bin:/usr/bin:/foo/bin:/usr/local/bin:/usr/X11R6/bin
PATH=$HOME/bin:/bin:/usr/bin:/foo/bin:/usr/local/bin:/usr/X11R6/bin
/foo/etc/procmailrcs/
electron [509] %

Index: ports/mail/procmail/Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/procmail/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- ports/mail/procmail/Makefile        2001/01/16 17:31:22     1.33
+++ ports/mail/procmail/Makefile        2001/01/26 16:18:06
@@ -23,4 +23,9 @@
 MAN1=          procmail.1 formail.1 lockfile.1
 MAN5=          procmailex.5 procmailrc.5 procmailsc.5

-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+post-configure:
+       @${PERL} -pi -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/config.h
+
+.include <bsd.port.post.mk>

-pete.

-- 
Pete Fritchman <petef@databits.net>
Databits Network Services, Inc. <http://databits.net>
Comment 3 dwcjr 2001-06-14 05:36:16 UTC
    Does this problem still exist and does the patch still work to fix it?
Comment 4 dwcjr freebsd_committer freebsd_triage 2001-06-14 05:36:25 UTC
State Changed
From-To: open->analyzed




Comment 5 dwcjr freebsd_committer freebsd_triage 2001-06-14 05:36:25 UTC
Responsible Changed
From-To: ache->dwcjr

I'll handle this this the maintainer has left it open for a year.
Comment 6 andreas freebsd_committer freebsd_triage 2001-06-14 12:28:15 UTC
On Wed, Jun 13, 2001 at 11:36:16PM -0500, David W. Chapman Jr. wrote:
>     Does this problem still exist and does the patch still work to fix it?


Can you test it yourself by defining another PREFIX in /etc/make.conf ?
I currently don't need procmail to be prefix-clean.
Am using stock /usr/local now for everything.
At the time of the bugreport I used /home/local for generic stuff
(mail, news, ...).

	Andreas ///

-- 
Andreas Klemm - Powered by FreeBSD 4.3
Need a magic printfilter today ? -> http://www.apsfilter.org/
Comment 7 dwcjr freebsd_committer freebsd_triage 2001-06-14 15:18:36 UTC
State Changed
From-To: analyzed->closed

Committed, thanks!