ports/107721: [MAINTAINER-UPDATE] sysutils/bacula-server upgrade fix database permissions
Dan Langille
dan at langille.org
Tue Jan 9 23:20:25 UTC 2007
>Number: 107721
>Category: ports
>Synopsis: [MAINTAINER-UPDATE] sysutils/bacula-server upgrade fix database permissions
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Jan 09 23:20:10 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Dan Langille
>Release: FreeBSD 4.9-STABLE i386
>Organization:
The FreeBSD Diary
>Environment:
System: FreeBSD xeon.unixathome.org 4.9-STABLE FreeBSD 4.9-STABLE #2: Wed Mar 3 08:16:24 EST 2004 dan at polo.unixathome.org:/usr/obj/usr/src/sys/XEON i386
>Description:
>How-To-Repeat:
>Fix:
Add some patches to upgrade scripts so that PostgreSQL database permissions
are correct. When upgrading and using PostgreSQL, be sure to run first the
update_postgresql_tables and then the grant_postgresql_privileges script.
These patches have been sent upstream, and are in CVS, but not yet released.
--- bacula-server.diff begins here ---
diff -ruN /usr/ports/sysutils/bacula-server/Makefile bacula-server/Makefile
--- /usr/ports/sysutils/bacula-server/Makefile Sat Jan 6 05:28:07 2007
+++ bacula-server/Makefile Tue Jan 9 17:50:55 2007
@@ -7,6 +7,7 @@
PORTNAME= bacula
DISTVERSION= 2.0.0
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= bacula
diff -ruN /usr/ports/sysutils/bacula-server/files/patch-src-cats-grant_postgresql_privileges.in bacula-server/files/patch-src-cats-grant_postgresql_privileges.in
--- /usr/ports/sysutils/bacula-server/files/patch-src-cats-grant_postgresql_privileges.in Wed Dec 31 19:00:00 1969
+++ bacula-server/files/patch-src-cats-grant_postgresql_privileges.in Tue Jan 9 17:52:06 2007
@@ -0,0 +1,28 @@
+Index: grant_postgresql_privileges.in
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/cats/grant_postgresql_privileges.in,v
+retrieving revision 1.9
+diff -u -b -r1.9 grant_postgresql_privileges.in
+--- src/cats/grant_postgresql_privileges.in 6 Nov 2005 18:04:08 -0000 1.9
++++ src/catsgrant_postgresql_privileges.in 9 Jan 2007 22:49:01 -0000
+@@ -28,6 +28,9 @@
+ grant all on storage to ${USER};
+ grant all on device to ${USER};
+ grant all on status to ${USER};
++grant all on location to ${USER};
++grant all on locationlog to ${USER};
++grant all on log to ${USER};
+
+ -- for sequences on those tables
+
+@@ -44,7 +47,9 @@
+ grant select, update on storage_storageid_seq to ${USER};
+ grant select, update on mediatype_mediatypeid_seq to ${USER};
+ grant select, update on device_deviceid_seq to ${USER};
+-
++grant select, update on location_locationid_seq to ${USER};
++grant select, update on locationlog_loclogid_seq to ${USER};
++grant select, update on log_logid_seq to ${USER};
+
+ END-OF-DATA
+ then
diff -ruN /usr/ports/sysutils/bacula-server/files/patch-src-cats-update_postgresql_tables.in bacula-server/files/patch-src-cats-update_postgresql_tables.in
--- /usr/ports/sysutils/bacula-server/files/patch-src-cats-update_postgresql_tables.in Wed Dec 31 19:00:00 1969
+++ bacula-server/files/patch-src-cats-update_postgresql_tables.in Tue Jan 9 17:52:16 2007
@@ -0,0 +1,20 @@
+Index: update_postgresql_tables.in
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/cats/update_postgresql_tables.in,v
+retrieving revision 1.30
+diff -u -b -r1.30 update_postgresql_tables.in
+--- src/cats/update_postgresql_tables.in 27 Jul 2006 01:58:42 -0000 1.30
++++ src/cats/update_postgresql_tables.in 9 Jan 2007 22:49:20 -0000
+@@ -1,10 +1,10 @@
+ #!/bin/sh
+ #
+-# Shell script to update PostgreSQL tables from version 1.38 to 1.39
++# Shell script to update PostgreSQL tables from version 1.38 to 2.0.0 or higher
+ #
+ echo " "
+ echo "This script will update a Bacula PostgreSQL database from version 9 to 10"
+-echo " which is needed to convert from Bacula version 1.38.x to 1.39.x or higher"
++echo " which is needed to convert from Bacula version 1.38.x to 2.0.0 or higher"
+ echo "Depending on the size of your database,"
+ echo "this script may take several minutes to run."
+ echo " "
--- bacula-server.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list