Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125729 - Bacula-1.38.5 ebuild has a few issues.
Summary: Bacula-1.38.5 ebuild has a few issues.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: App-Backup Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 127754
  Show dependency tree
 
Reported: 2006-03-10 09:50 UTC by Will Lepofsky
Modified: 2006-06-14 09:16 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for the init/conf discrepancy (bacula-init3.patch,1.32 KB, patch)
2006-03-24 04:52 UTC, Marko Djukic
Details | Diff
Zip file of the fixed ebuild and associated files (bacula-1.38.5-r1.zip,8.61 KB, application/zip)
2006-03-24 09:08 UTC, Marko Djukic
Details
Fix for bacula-clientonly use flag (bacula-1.38.5-r1.ebuild,7.84 KB, application/octet-stream)
2006-03-27 04:42 UTC, Marko Djukic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Lepofsky 2006-03-10 09:50:38 UTC
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.
Comment 1 Will Lepofsky 2006-03-10 10:48:23 UTC
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"
Comment 2 Will Lepofsky 2006-03-10 11:04:44 UTC
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."
Comment 3 Stefan Nickl 2006-03-19 10:02:30 UTC
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...
Comment 4 Marko Djukic 2006-03-24 04:52:55 UTC
Created attachment 82999 [details, diff]
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.
Comment 5 Marko Djukic 2006-03-24 05:40:15 UTC
delete this. i messed up.

(In reply to comment #4)
> Created an attachment (id=82999) [edit]
> 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.
> 

Comment 6 Marko Djukic 2006-03-24 09:08:37 UTC
Created attachment 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
Comment 7 Marko Djukic 2006-03-27 04:42:58 UTC
Created attachment 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.
Comment 8 Tiziano Müller (RETIRED) gentoo-dev 2006-05-25 08:43:45 UTC
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

Comment 9 Tiziano Müller (RETIRED) gentoo-dev 2006-05-25 10:22:06 UTC
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.
Comment 10 Lisa Seelye (RETIRED) gentoo-dev 2006-06-14 08:57:40 UTC
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.