Bug 136903 - port multicast/beacon does not start
Summary: port multicast/beacon does not start
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: Wesley Shields
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-19 15:50 UTC by Antonio Querubin
Modified: 2009-08-15 14: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 Antonio Querubin 2009-07-19 15:50:03 UTC
	The port multicast/beacon fails to start.  The resulting error 
	message is:

/libexec/ld-elf.so.1: 
/usr/local/lib/perl5/site_perl/5.8.9/mach/auto/Net/Multicast/Beacon/Beacon.so: 
Undefined symbol "beacon_init"

This may be due to an incorrect path being installed because of running 
'make Makefile.perl' in the port's Makefile 'pre-build' section.  The CVS 
log for the port's Makefile shows the 'pre-build' section first appeared 
in revision 1.13 of Makefile.  However, it's not clear why the 'pre-build' 
was added in the first place.

Fix: 

In the port Makefile, comment out the 'pre-build' section.
	Then rebuild and reinstall.
How-To-Repeat: 
	Run '/usr/local/etc/rc.d/beacon start'.
Comment 1 Antonio Querubin 2009-07-19 16:03:04 UTC
Corrections:

That should be port net/beacon, not multicast/beacon.

/usr/local/etc/rc.d/beacon is a local file here.  To reproduce the startup 
error just run /usr/local/bin/beacon with a known working config.

Tony
tony@lava.net
Comment 2 Antonio Querubin 2009-07-24 16:03:24 UTC
The diff below is the necessary patch to Makefile and incorporates a 
startup script mentioned in an earlier followup.  beacon.in should be 
placed in the files directory.

Tony
tony@lava.net

diff -ruN /usr/ports/net/beacon/Makefile ./Makefile
--- /usr/ports/net/beacon/Makefile	2008-08-20 20:17:48.000000000 -1000
+++ ./Makefile	2009-07-24 04:53:06.000000000 -1000
@@ -32,17 +32,14 @@
  CONFIGURE_ARGS+=	--enable-ipv6
  .endif

+USE_RC_SUBR=	beacon
+
  .include <bsd.port.pre.mk>

  .if ${ARCH} != "i386"
  BROKEN=		Does not compile on !i386
  .endif

-pre-build:
-	cd ${WRKSRC}/Net-Multicast-Beacon && \
-		make Makefile.perl && \
-		${REINPLACE_CMD} -E 's,doc_\$$\(INSTALLDIRS\)_install$$,,g' Makefile.perl
-
  post-install:
  	@${ECHO} "Sample config installed at \
  	${PREFIX}/etc/beacon.conf.sample"
diff -ruN /usr/ports/net/beacon/files/beacon.in ./files/beacon.in
--- /usr/ports/net/beacon/files/beacon.in	1969-12-31 14:00:00.000000000 -1000
+++ ./files/beacon.in	2009-07-24 04:46:17.000000000 -1000
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: beacon
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable beacon.
+#
+# beacon_enable="YES"
+
+beacon_enable=${beacon_enable-"NO"}
+
+. %%RC_SUBR%%
+
+name="beacon"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/${name}"
+
+conffile=%%PREFIX%%/etc/beacon.conf
+if [ -f $conffile ]; then
+        piddir=`grep OUTPUTDIR $conffile | awk '{print $3}'`
+fi
+pidfile=${piddir}/multicastbeacon.PID
+
+load_rc_config $name
+
+run_rc_command "$1"
Comment 3 Wesley Shields freebsd_committer freebsd_triage 2009-07-24 16:30:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it.
Comment 4 Wesley Shields freebsd_committer freebsd_triage 2009-07-24 21:18:01 UTC
ports/136903 was recently submitted for a port you maintain. Can you
please take a look at this PR and decide a course of action for it.
Thank you!

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/136903

-- WXS
Comment 5 Wesley Shields freebsd_committer freebsd_triage 2009-07-24 21:18:06 UTC
State Changed
From-To: open->feedback

Pending maintainer approval.
Comment 6 dfilter service freebsd_committer freebsd_triage 2009-08-15 14:34:07 UTC
wxs         2009-08-15 13:33:54 UTC

  FreeBSD ports repository

  Modified files:
    net/beacon           Makefile pkg-plist 
  Added files:
    net/beacon/files     beacon.in 
  Log:
  - Add RC script
  - No need to use pre-build target
  - Fix up plist
  
  PR:             ports/136903
  Submitted by:   Antonio Querubin <tony@lava.net>
  Approved by:    maintainer timeout
  
  Revision  Changes    Path
  1.18      +2 -6      ports/net/beacon/Makefile
  1.1       +30 -0     ports/net/beacon/files/beacon.in (new)
  1.7       +1 -0      ports/net/beacon/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Wesley Shields freebsd_committer freebsd_triage 2009-08-15 14:34:22 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!