Bug 103176 - [MAINTAINER-UPDATE] sysutils/bacula-server-devel : fix breakage, add missing bacula user
Summary: [MAINTAINER-UPDATE] sysutils/bacula-server-devel : fix breakage, add missing ...
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: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 05:30 UTC by Dan Langille
Modified: 2006-10-05 22:30 UTC (History)
1 user (show)

See Also:


Attachments
patch.bacula-server-devel.uid (1.92 KB, text/plain)
2006-09-12 05:30 UTC, Dan Langille
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Langille 2006-09-12 05:30:22 UTC
	
I recently added a chgrp bacula for the bconsole configuration file.  However,
the client port has never, until now, installed the bacula group.
This fix allows bacula-client-devel to build.

How-To-Repeat: 	
see http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.4.2006071303/bacula-client-devel-1.39.22.20060908.log
Comment 1 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-09-12 07:41:05 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

I'll take it.
Comment 2 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-09-12 09:33:13 UTC
State Changed
From-To: open->feedback

Please fix plist (man pages): 
http://sce-tindy.tecnik93.com/tb-exp/index.php?action=describe_port&id=852
Comment 3 Dan Langille 2006-09-12 17:11:45 UTC
Please use the following patch instead of the above.

This fixes the man pages plist entries, and also no longer install
start/stop scripts for MySQL.

diff -ruN /usr/ports/sysutils/bacula-server-devel/Makefile bacula-server-devel/Makefile
--- /usr/ports/sysutils/bacula-server-devel/Makefile	Sat Sep  9 16:17:39 2006
+++ bacula-server-devel/Makefile	Tue Sep 12 12:04:22 2006
@@ -163,16 +163,8 @@
 .if defined(WITH_CLIENT_ONLY)
 MAN8=bacula-fd.8 bconsole.8
 .else
-MAN8=bacula-dir.8 bacula-sd.8 bacula.8 bcopy.8 bextract.8 bls.8 bscan.8 btape.8 dbcheck.8
-MAN1=bsmtp.1
-.endif
-
-.if defined(WITH_GNOMECONSOLE)
-	MAN1+=bacula-console-gnome.1
-.endif
-
-.if defined(WITH_WXCONSOLE)
-	MAN1+=bacula-wxconsole.1
+MAN8=bacula.8 bacula-dir.8 bacula-sd.8 bcopy.8 bextract.8 bls.8 bscan.8 btape.8 btraceback.8 dbcheck.8
+MAN1=bsmtp.1 bacula-console-gnome.1 bacula-tray-monitor.1 bacula-wxconsole.1
 .endif

 pre-everything::
@@ -225,11 +217,9 @@
 		${ECHO_CMD} "${BACULA_DIR} already exists"; \
 	fi

-.if !defined(WITH_CLIENT_ONLY)
 # 	Extend /etc/services and install UID/GID
 	@ ${SETENV} PKG_PREFIX=${PREFIX} \
 		${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
-.endif

 post-install:
 .if defined(MAN8)
diff -ruN /usr/ports/sysutils/bacula-server-devel/files/patch-scripts-Makefile.in bacula-server-devel/files/patch-scripts-Makefile.in
--- /usr/ports/sysutils/bacula-server-devel/files/patch-scripts-Makefile.in	Wed Dec 31 19:00:00 1969
+++ bacula-server-devel/files/patch-scripts-Makefile.in	Tue Sep 12 12:05:14 2006
@@ -0,0 +1,11 @@
+--- scripts/Makefile.in.orig	Tue Sep 12 12:03:08 2006
++++ scripts/Makefile.in	Tue Sep 12 12:03:08 2006
+@@ -33,8 +33,6 @@
+ 	$(MKDIR) $(DESTDIR)$(mandir)
+
+ install: installdirs
+-	$(INSTALL_SCRIPT) startmysql $(DESTDIR)$(scriptdir)/startmysql
+-	$(INSTALL_SCRIPT) stopmysql $(DESTDIR)$(scriptdir)/stopmysql
+ 	$(INSTALL_SCRIPT) bconsole $(DESTDIR)$(scriptdir)/bconsole
+ 	$(INSTALL_SCRIPT) gconsole $(DESTDIR)$(scriptdir)/gconsole
+ 	$(INSTALL_SCRIPT) bacula $(DESTDIR)$(scriptdir)/bacula
diff -ruN /usr/ports/sysutils/bacula-server-devel/pkg-deinstall.client bacula-server-devel/pkg-deinstall.client
--- /usr/ports/sysutils/bacula-server-devel/pkg-deinstall.client	Wed Mar 15 05:22:09 2006
+++ bacula-server-devel/pkg-deinstall.client	Tue Sep 12 00:13:50 2006
@@ -20,5 +20,12 @@
 	if [ -d ${BACULA_DIR} ]; then
 	    echo "Check if ${BACULA_DIR} is empty and delete it to permanently remove the bacula port"
 	fi
+
+	# Note how to delete UID/GID
+	USER=bacula
+	GROUP=${USER}
+	if pw groupshow "${USER}" 2>/dev/null 1>&2; then
+	    echo "To delete Bacula group permanently, use 'pw groupdel ${GROUP}'"
+	fi
         ;;
 esac
diff -ruN /usr/ports/sysutils/bacula-server-devel/pkg-install.client bacula-server-devel/pkg-install.client
--- /usr/ports/sysutils/bacula-server-devel/pkg-install.client	Wed Mar 15 05:22:09 2006
+++ bacula-server-devel/pkg-install.client	Tue Sep 12 00:07:54 2006
@@ -15,3 +15,29 @@
 # Bacule port end" >> /etc/services
 fi

+case $2 in
+PRE-INSTALL)
+	# Install UID/GID
+	USER=bacula
+	GROUP=${USER}
+	UID=910
+	GID=${UID}
+
+	if [ ! -d ${BACULA_DIR} ]; then
+		mkdir -p ${BACULA_DIR}
+	fi
+
+	if pw group show "${GROUP}" 2>/dev/null; then
+		echo "You already have a group \"${GROUP}\", so I will use it."
+	else
+		if pw groupadd ${GROUP} -g ${GID}; then
+			echo "Added group \"${GROUP}\"."
+		else
+			echo "Adding group \"${GROUP}\" failed..."
+			exit 1
+		fi
+	fi
+
+	chgrp -R ${GROUP} ${BACULA_DIR}
+	;;
+esac
diff -ruN /usr/ports/sysutils/bacula-server-devel/pkg-plist bacula-server-devel/pkg-plist
--- /usr/ports/sysutils/bacula-server-devel/pkg-plist	Sun Sep 10 05:15:55 2006
+++ bacula-server-devel/pkg-plist	Tue Sep 12 12:03:56 2006
@@ -35,8 +35,6 @@
 %%DATADIR%%/make_%%DBTYPE%%_tables
 %%DATADIR%%/mtx-changer
 %%DATADIR%%/query.sql
-%%DATADIR%%/startmysql
-%%DATADIR%%/stopmysql
 %%DATADIR%%/update_bacula_tables
 %%DATADIR%%/update_%%DBTYPE%%_tables



-- 
Dan Langille - http://www.langille.org/
BSDCan - The Technical BSD Conference: http://www.bsdcan.org/
Comment 4 dfilter service freebsd_committer freebsd_triage 2006-10-05 22:21:33 UTC
miwi        2006-10-05 21:21:26 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/bacula-server-devel Makefile pkg-deinstall.client 
                                 pkg-install.client pkg-plist 
  Added files:
    sysutils/bacula-server-devel/files patch-scripts-Makefile.in 
  Log:
  - Correctly handle manpages
  - Always install baucla group so that client install works
  - Do not install mysql start/stop scripts
  - Bump PORTREVISION
  
  PR:             ports/103176
  Submitted by:   Dan Langille (maintainer)
  
  Revision  Changes    Path
  1.7       +3 -12     ports/sysutils/bacula-server-devel/Makefile
  1.4       +11 -0     ports/sysutils/bacula-server-devel/files/patch-scripts-Makefile.in (new)
  1.2       +7 -0      ports/sysutils/bacula-server-devel/pkg-deinstall.client
  1.2       +26 -0     ports/sysutils/bacula-server-devel/pkg-install.client
  1.5       +0 -2      ports/sysutils/bacula-server-devel/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 5 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-10-05 22:24:51 UTC
State Changed
From-To: feedback->closed

closed at miwi@ resuest :) newer update commited.