Bug 93032 - LPRng uses incorrect paths to config files when compiled with PORT_REPLACES_BASE_LPR=yes
Summary: LPRng uses incorrect paths to config files when compiled with PORT_REPLACES_B...
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: Stefan Walter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-08 12:20 UTC by Dmitry Kazarov
Modified: 2006-07-19 18:02 UTC (History)
0 users

See Also:


Attachments
LPRng.patch (1.38 KB, patch)
2006-07-09 08:29 UTC, Stefan Walter
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazarov 2006-02-08 12:20:06 UTC
When PORT_REPLACES_BASE_LPR=yes is defined ${PREFIX} set to /usr
and LPRng commands expect config file to be /usr/etc/lpd.conf due to
these lines in /usr/ports/sysutils/LPRng/Makefile

--with-lpd_conf_path=${PREFIX}/etc/lpd.conf \
--with-lpd_perms_path=${PREFIX}/etc/lpd.perms \


Workaround could be a softlink of /etc to /usr/etc.

Fix: 

This patch also places startup script to /usr/local/etc/rc.d - since /usr/sbin/mergemaster warns about "stale" file lprng.sh in /etc/rc.d--ip7JSmpn32xYYfZETTr2mFBIdeOP6FO9N3ETAtrQJpJmwdht
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig	Wed Feb  1 11:52:10 2006
+++ Makefile	Wed Feb  8 13:40:34 2006
@@ -35,8 +35,8 @@
 		--with-sbindir=${PREFIX}/sbin \
 		--with-filterdir=${PREFIX}/libexec/filters \
 		--with-filter_path="${PREFIX}/bin:/bin:/usr/bin:${PREFIX}/sbin:/sbin:/usr/sbin" \
-		--with-lpd_conf_path=${PREFIX}/etc/lpd.conf \
-		--with-lpd_perms_path=${PREFIX}/etc/lpd.perms \
+		--with-lpd_conf_path=${SYSCONFDIR}/lpd.conf \
+		--with-lpd_perms_path=${SYSCONFDIR}/lpd.perms \
 		--with-printcap_path=/etc/printcap \
 		--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
 		--enable-gdbm=${LOCALBASE}
@@ -90,8 +90,8 @@
 	@${INSTALL_DATA} ${WRKSRC}/lpd.conf ${SYSCONFDIR}/lpd.conf.sample
 	@${INSTALL_DATA} ${WRKSRC}/lpd.perms ${SYSCONFDIR}/lpd.perms.sample
 	@${INSTALL_DATA} ${WRKSRC}/printcap ${SYSCONFDIR}/printcap.sample
-	@${MKDIR} ${PREFIX}/etc/rc.d
-	@${INSTALL_DATA} ${WRKSRC}/init.freebsd ${PREFIX}/etc/rc.d/lprng.sh
+	@${MKDIR} /usr/local/etc/rc.d
+	@${INSTALL_DATA} ${WRKSRC}/init.freebsd /usr/local/etc/rc.d/lprng.sh
 .if !defined(NOPORTDOCS)
 	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}
 	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}/Reference
Comment 1 Edwin Groothuis freebsd_committer 2006-02-08 22:25:26 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Ion-Mihai "IOnut" Tetcu freebsd_committer 2006-06-08 16:24:43 UTC
State Changed
From-To: feedback->open

Maintainer time-out
Comment 3 Stefan Walter freebsd_committer 2006-07-02 08:43:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stefan

I'll take it.
Comment 4 Stefan Walter freebsd_committer 2006-07-09 08:29:12 UTC
Hi,

I have attached a patch that uses ${LOCALBASE} instead of "/usr/local".
However, with the move of lprng.sh to ${LOCALBASE}/etc/rc.d, pkg-plist is
incorrect. Can you have a look at that and maybe provide an updated patch?

Regards,
Stefan
Comment 5 Stefan Walter freebsd_committer 2006-07-09 08:32:16 UTC
State Changed
From-To: open->feedback

Awaiting feedback from submitter.
Comment 6 Stefan Walter freebsd_committer 2006-07-19 18:02:12 UTC
State Changed
From-To: feedback->closed

Committed, thanks!