Bug 125729 - Bacula-1.38.5 ebuild has a few issues.
|
Bug#:
125729
|
Product: Gentoo Linux
|
Version: 2006.0
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: app-backup@gentoo.org
|
Reported By: wilscarlet@gmail.com
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: Bacula-1.38.5 ebuild has a few issues.
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-03-10 09:50 0000
|
The new ebuild for bacula-1.38.5 has some issues:
1. The entire Gnome environment is not necessary for the building of the
gnome-console and/or the bacula-tray-monitor.
2. The following lines are in the incorrect order:
einfo " /usr/libexec/bacula/create_${mydb}_database"
einfo " /usr/libexec/bacula/grant_${mydb}_privileges"
einfo " /usr/libexec/bacula/make_${mydb}_tables"
The should reflect to following because the tables have to be present in
order to grant privileges:
einfo " /usr/libexec/bacula/create_${mydb}_database"
einfo " /usr/libexec/bacula/make_${mydb}_tables"
einfo " /usr/libexec/bacula/grant_${mydb}_privileges"
I have attached a diff to correct these errors
Also, the file of /etc/conf.d/bacula-all has a few issues:
1. The SERVICES line should reflect the startup script.
2. The DIR_OPTIONS line should be run with root privilages.
I have also attached a diff for these changes.
These are the changes I had to do in order to get bacula-1.38.5 working for me.
If you need more information, please let me know.
I'm having issues attaching files to this bug (see bug# 125736). In the mean
time until this is resolved here are the patches:
Ebuild diff:
--- /usr/portage/app-backup/bacula/bacula-1.38.5.ebuild 2006-03-10
12:02:03.034468760 -0500
+++ /usr/local/portage/app-backup/bacula/bacula-1.38.5.ebuild 2006-03-10
11:26:18.139971506 -0500
@@ -34,7 +34,6 @@
bacula-console? (
wxwindows? ( >=x11-libs/wxGTK-2.4.2 )
gnome? (
- >=gnome-base/gnome-2
>=gnome-base/libgnome-2
app-admin/gnomesu
)
@@ -283,8 +282,8 @@
if ! use bacula-clientonly && ! use bacula-no-dir ; then
einfo "If this is a new install, you must create the ${mydb}
databases with:"
einfo " /usr/libexec/bacula/create_${mydb}_database"
- einfo " /usr/libexec/bacula/make_${mydb}_tables"
einfo " /usr/libexec/bacula/grant_${mydb}_privileges"
+ einfo " /usr/libexec/bacula/make_${mydb}_tables"
einfo ""
einfo "If you're upgrading from a major release, you must
upgrade your bacula catalog database."
einfo "Please read the manual chapter for how to upgrade your
database."
bacula-all diff:
--- /etc/conf.d/bacula-all 2006-03-10 12:20:40.337279040 -0500
+++ bacula-all 2006-03-10 12:19:59.592036904 -0500
@@ -8,7 +8,7 @@
# sd -
# fd -
# dir -
-SERVICES="bacula-fd bacula-dir bacula-sd"
+SERVICES="fd dir sd"
# If the database server where you store your bacula catalog
# is on a different machine, please set this to 0.
@@ -20,4 +20,4 @@
# access your backup devices.
SD_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-sd.conf"
FD_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-fd.conf"
-DIR_OPTIONS="-u bacula -g bacula -c /etc/bacula/bacula-dir.conf"
+DIR_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-dir.conf"
Sorry edited wrong file for ebuild diff. Here is the correct diff:
--- /usr/portage/app-backup/bacula/bacula-1.38.5.ebuild 2006-03-10
14:00:32.726806386 -0500
+++ /usr/local/portage/app-backup/bacula/bacula-1.38.5.ebuild 2006-03-10
13:59:57.837624687 -0500
@@ -34,7 +34,6 @@
bacula-console? (
wxwindows? ( >=x11-libs/wxGTK-2.4.2 )
gnome? (
- >=gnome-base/gnome-2
>=gnome-base/libgnome-2
app-admin/gnomesu
)
@@ -283,8 +282,8 @@
if ! use bacula-clientonly && ! use bacula-no-dir ; then
einfo "If this is a new install, you must create the ${mydb}
databases with:"
einfo " /usr/libexec/bacula/create_${mydb}_database"
- einfo " /usr/libexec/bacula/grant_${mydb}_privileges"
einfo " /usr/libexec/bacula/make_${mydb}_tables"
+ einfo " /usr/libexec/bacula/grant_${mydb}_privileges"
einfo ""
einfo "If you're upgrading from a major release, you must
upgrade your bacula catalog database."
einfo "Please read the manual chapter for how to upgrade your
database."
Two more notes on this ebuild:
- To build bconsole with readline support, one needs to pass "--disable-conio
--enable-readline" to configure. Without "--disable-conio", readline support
will not be enabled.
- The flags need cleaning up. I know this is a PITA and comes from bacula
configure, but I guess users just want to be able to choose which daemons go
into the build, and not worry about what "bacula-clientonly" could possibly
mean...
Created an attachment (id=82999) [details]
Fix for the init/conf discrepancy
The conf file should have the services defined as "bacula-<service>", yet the
init file only checks for "<service>". From what I can work out seems like the
init script is out of sync, so this is a simple patch to just match what the
conf file states.
delete this. i messed up.
(In reply to comment #4)
> Created an attachment (id=82999) [edit] [details]
> Fix for the init/conf discrepancy
>
> The conf file should have the services defined as "bacula-<service>", yet the
> init file only checks for "<service>". From what I can work out seems like the
> init script is out of sync, so this is a simple patch to just match what the
> conf file states.
>
Created an attachment (id=83022) [details]
Zip file of the fixed ebuild and associated files
This zip contains the new ebuild covering some of the fixes reported above:
- DIR user
- conf services naming
- einfo order
- gnome dependency
Created an attachment (id=83224) [details]
Fix for bacula-clientonly use flag
This updates the ebuild file in the zip file attached above. When using
bacula-clientonly USE flag, the working directory /var/lib/bacula was not being
created properly (shouldn't be in pkg_postinst), so it was moved to
src_install() and keepdir is used instead of dodir.
And the short description for the bacula-console USE-flag should be updated too
(use.local.desc):
app-backup/bacula:bacula-console - Build console only bits, no gui
I have some other questions/suggestions:
i) Providing a pkg_config() for setting up the database-stuff would be really
nice.
ii) Is it really a good idea to choose mysql if more than one use-flag or none
is set? A first-time user might not know that he can't switch afterwards. I
would rather prefer an error during pkg_setup() about this.
iii) sqlite/sqlite3 doesn't seem to be properly handled. The configure script
always chooses sqlite even if sqlite3 is available
iv) QA Notice: USE Flag 'bacula-no-dir' not in IUSE for
app-backup/bacula-1.38.5-r1
v) Filtering unneeded scripts installed in /usr/libexec/bacula/updatedb/
vi) There seems to be some problems (on my machine only?) during install:
dodoc:
/var/tmp/portage/bacula-1.38.5-r1/work/bacula-1.38.5/doc/BaculaRoadMap_*.pdf
does not exist
chmod: Access to
"/var/tmp/portage/bacula-1.38.5-r1/image//var/tmp/portage/bacula-1.38.5-r1/image//usr/libexec/bacula/query.sql"
not possible: File or directory not found.
This is fixed as well as multiple tweaks. See the ChangeLog for details. This
is in 1.38.9 so it's a version bump too.