Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#44127 closed update (fixed)

Update Bacula to Version 7.0.4

Reported by: robertoschwald@… Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch maintainer Cc:
Port: bacula

Description

Attached you find the patch to update to the latest version.

I dropped readline, as it is obsolete and use the conio replacement as stated in the docs. Also, batch support is enabled on all thread-safe database implementations (mysql, postgresql83, postgresql84) to enhance the performance.

Attachments (6)

Portfile-7.0.4.diff (2.3 KB) - added by robertoschwald@… 7 years ago.
diff from 5.0.3 to 7.0.4
Portfile-7.0.4_2014-06-26.diff (6.1 KB) - added by robertoschwald@… 7 years ago.
New Portfile patch
patch-configure-mysql.diff (5.6 KB) - added by robertoschwald@… 7 years ago.
New patch-configure-mysql.diff file
patch-configure-mysql.diff.patch (1.4 KB) - added by robertoschwald@… 7 years ago.
Patch for the existing patch-configure-mysql.diff
Portfile-7.0.4_2014-06-29.diff (11.3 KB) - added by robertoschwald@… 7 years ago.
Portfile patch for 7.0.4, obsoletes all other former Portfile patches of this ticket
patch-create_postgresql_database.diff (504 bytes) - added by robertoschwald@… 7 years ago.
new files/patch-create_postgresql_database.diff patch

Download all attachments as: .zip

Change History (27)

Changed 7 years ago by robertoschwald@…

Attachment: Portfile-7.0.4.diff added

diff from 5.0.3 to 7.0.4

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: mf2k@… removed
Keywords: maintainer added
Owner: changed from macports-tickets@… to mf2k@…
Status: newassigned
Version: 2.3.0

comment:2 Changed 7 years ago by mf2k (Frank Schima)

I'm still testing it. I noticed that the bat application looks different. It's more X11 and less cocoa looking. So it seems a little worse because of this. Is this expected?

comment:3 Changed 7 years ago by mf2k (Frank Schima)

The client does not seem to work for me. I keep getting this error on the server:

Fatal error: Authorization key rejected by Storage daemon.

Any ideas?

comment:4 Changed 7 years ago by mf2k (Frank Schima)

I noticed that 7.0.4 requires the lzo2 port now. I have added it to my local Portfile. Worst case scenario is that I create a new bacula5 port for bacula 5.2.13 and we move the bacula port to 7.0.4. But I'm worried that it is not building correctly if it is failing for me. I'm running Mavericks BTW.

comment:5 Changed 7 years ago by robertoschwald@…

On my side with +postgresql84, server and client work flawlessly together. I performed several backups. What does not work is if your 7.0.4 client tries to connect to an older server, but that has never worked as far as I know, as the protocol is not downward compatible.

I really got problems with the +mysql55 variant. It compiles ok, but as soon as I start the director, I get a linker error. I'll check that today.

comment:6 in reply to:  4 Changed 7 years ago by robertoschwald@…

Replying to mf2k@…:

I noticed that 7.0.4 requires the lzo2 port now. I have added it to my local Portfile. Worst case scenario is that I create a new bacula5 port for bacula 5.2.13 and we move the bacula port to 7.0.4. But I'm worried that it is not building correctly if it is failing for me. I'm running Mavericks BTW.

Didn't notice that. I think I install Mavericks in a VM for build tests with no ports installed to get that. Any recommendations how to best test new port versions?

Last edited 7 years ago by robertoschwald@… (previous) (diff)

comment:7 Changed 7 years ago by robertoschwald@…

This is the error I get on start of bacula-dir in the mysql55 variant:

bacula-dir -v -f
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
  Referenced from: /opt/local/lib/libbaccats-7.0.4.dylib
  Expected in: flat namespace

dyld: Symbol not found: _mysql_init
  Referenced from: /opt/local/lib/libbaccats-7.0.4.dylib
  Expected in: flat namespace

Bacula interrupted by signal 5: Trace/Breakpoint trap
Kaboom! bacula-dir, bacula-dir got signal 5 - Trace/Breakpoint trap at 26-Jun-2014 06:53:30. Attempting traceback.
Kaboom! exepath=/opt/local
Calling: /opt/local/btraceback /opt/local/bacula-dir 548 /opt/local/var/bacula/working
execv: /opt/local/btraceback failed: ERR=No such file or directory

comment:8 Changed 7 years ago by robertoschwald@…

comment:9 Changed 7 years ago by robertoschwald@…

Got the mysql55 / mysql51 server variant running here, too.

Problem is the configure script mysql detection routine, which fits Unix / Linux systems but not OSX.

Attached you find the following patches:

  • patch-configure-mysql.diff:
    • A complete new version of the files/patch-configure-mysql.diff file which corrected a minor problem in setting the MYSQL_INCDIR, MYSQL_BINDIR, AND MYSQL_LIBDIR variables (they are especially needed to link src/cats/ libraries against the mysql library)
  • patch-configure-mysql.diff.patch:
    • This is a patch to the existing files/patch-configure-mysql.diff.patch file (I don't know what you prefer - a new patch file or a patch for the existing file, therefore I provide both)
  • Portfile-7.0.4_2014-06-26.diff:
    • A new diff file for the Portfile with the following changes:
      • bumped version to 7.0.4 (with correct checksums)
      • dropped readline, as it is obsolete and use conio instead
      • removed obsolete configure switches --without-sqlite, --disable-gnome, --disable-wx-console and --disable-tray-monitor
      • removed obsolete variant "sqlite2"
      • added variant "mysql51" (as not everyone is using MySQL 5.5 and MySQL 5.1 is supported by bacula)

Comments are highly appreciated.

Last edited 7 years ago by robertoschwald@… (previous) (diff)

Changed 7 years ago by robertoschwald@…

New Portfile patch

Changed 7 years ago by robertoschwald@…

Attachment: patch-configure-mysql.diff added

New patch-configure-mysql.diff file

Changed 7 years ago by robertoschwald@…

Patch for the existing patch-configure-mysql.diff

comment:10 Changed 7 years ago by robertoschwald@…

One minor thing we should think of is startup item generation for the server variants. Currently, only a startupitem is generated for fd. Is it possible to generate more than one startupitem in the Portfile? If yes we should add them to the server variants:

DIRECTOR:
startupitem.create  yes
startupitem.init    "BIN=${prefix}/sbin/bacula-dir\nPID=${prefix}/var/run/bacula-dir.*.pid"
startupitem.start   "\[ -x \${BIN} \] && \${BIN} -c ${prefix}/etc/bacula/bacula-dir.conf"
startupitem.stop    "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"


STORAGE:
startupitem.create  yes
startupitem.init    "BIN=${prefix}/sbin/bacula-sd\nPID=${prefix}/var/run/bacula-sd.*.pid"
startupitem.start   "\[ -x \${BIN} \] && \${BIN} -c ${prefix}/etc/bacula/bacula-sd.conf"
startupitem.stop    "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"

comment:11 Changed 7 years ago by robertoschwald@…

Currently working on another version of the Portfile with full support for the server variants (startupitems is done, currently working on a patch for the bacula_mysql* scripts, which do not work if mysql is not installed in default locations - I will also propose a change to the bacula bug tracker to fix this). Stay tuned.

Changed 7 years ago by robertoschwald@…

Portfile patch for 7.0.4, obsoletes all other former Portfile patches of this ticket

Changed 7 years ago by robertoschwald@…

new files/patch-create_postgresql_database.diff patch

comment:12 Changed 7 years ago by robertoschwald@…

Managed to get all variants working.

Attached you find the latest version of the Portfile patch and another patch to fix the create_postgresql_database script file.

Portfile-7.0.4_2014-06-29.diff:

  • A new diff file for the Portfile with the following changes:
    • bumped version to 7.0.4 (with correct checksums)
    • dropped readline, as it is obsolete and use conio instead
    • removed obsolete configure switches --without-sqlite, --disable-gnome, --disable-wx-console and --disable-tray-monitor
    • removed obsolete variant "sqlite2"
    • added variant "mysql51" (as not everyone is using MySQL 5.5 and MySQL 5.1 is supported by bacula)
    • add patch "patch-create_postgresql-database.diff" in the postgres variants
    • enable batch support on all server variants
    • added notes to setup the config files prior to use the programs (client and server). This is important, as e.g. the bconsole program currently prints a memory exception if bconsole.conf cannot be found. (See upstream bug report http://bugs.bacula.org/view.php?id=2074)
    • add server daemons to the startupitem (they get loaded when their config files can be found)
    • unload bacula in the pre-deactivate phase (otherwise user gets into trouble as the daemons do not work anymore but are loaded, and port cannot be loaded again on reinstall as the state is "already loaded")
    • Portfile-7.0.4_2014-06-29.diff obsoletes all former Portfile patches added to this ticket.

patch-create_postgresql_database.diff:

patch-configure-mysql.diff.patch:

  • patch for the files/patch-configure-mysql.diff​ patch to get all the server variants working on macports
  • note: This patch could also be applied to the 5.2.13 version of this port, as the same problem exists there - the director for the mysql55 variant is not working there as well

Please apply Portfile-7.0.4_2014-06-29.diff and patch-configure-mysql.diff.patch​, additionally add patch-create_postgresql_database.diff to the files dir.

Last edited 7 years ago by robertoschwald@… (previous) (diff)

comment:13 Changed 7 years ago by mf2k (Frank Schima)

I have created a new bacula5 port in r121582.

comment:14 in reply to:  10 ; Changed 7 years ago by mf2k (Frank Schima)

Replying to robertoschwald@…:

One minor thing we should think of is startup item generation for the server variants. Currently, only a startupitem is generated for fd. Is it possible to generate more than one startupitem in the Portfile? If yes we should add them to the server variants:

It would be best to ask this question on the Macports-dev mailing list. If it's possible, I don't know how to do it. It might help to create separate subports for bacula-client, bacula-server and bacula-storage. I have wanted to split these into separate ports for a while now.

comment:15 Changed 7 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed

Committed in r121587. I removed adding "*******" lines to notes because that is not our standard practice to do that.

comment:16 in reply to:  14 ; Changed 7 years ago by robertoschwald@…

Replying to mf2k@…:

It would be best to ask this question on the Macports-dev mailing list. If it's possible, I don't know how to do it. It might help to create separate subports for bacula-client, bacula-server and bacula-storage. I have wanted to split these into separate ports for a while now.

I already added the server daemons to the startup item. The wrapper script checks if the config file for the daemon exists, and if yes, starts it. Subports was something we discussed before, but the last time I checked, I couldn't find any documentation about it.

comment:17 in reply to:  15 ; Changed 7 years ago by robertoschwald@…

Replying to mf2k@…:

Committed in r121587. I removed adding "*******" lines to notes because that is not our standard practice to do that.

Don't forget to copy over patch-configure-mysql.diff.patch​ attached to this ticket to the new bacula5 port, otherwise the server variants are compiled but throw linker errors when trying to run. The former 5.2.13 patch does not work as intended. I think your main intention is the fd, so we might remove the server variants from bacula5 Portfile.

Last edited 7 years ago by robertoschwald@… (previous) (diff)

comment:18 in reply to:  17 ; Changed 7 years ago by mf2k (Frank Schima)

Replying to robertoschwald@…:

Don't forget to copy over patch-configure-mysql.diff.patch​ attached to this ticket to the new bacula5 port, otherwise the server variants are compiled but throw linker errors when trying to run. The former 5.2.13 patch does not work as intended. I think your main intention is the fd, so we might remove the server variants from bacula5 Portfile.

I just realized that you made a patch of patch! That is not normally how it is done in Macports. Please simply attach the latest version of "patch-configure-mysql.diff" that you want for the bacula and bacula5 ports. I will replace what is there and commit it. I attempted to patch the current "patch-configure-mysql.diff" file but it failed for me.

comment:19 in reply to:  16 Changed 7 years ago by mf2k (Frank Schima)

Replying to robertoschwald@…:

I already added the server daemons to the startup item. The wrapper script checks if the config file for the daemon exists, and if yes, starts it.

OK good.

Subports was something we discussed before, but the last time I checked, I couldn't find any documentation about it.

This has never been documented. Just look at other ports for an example. See the mysql5 portfile among others.

comment:20 in reply to:  18 Changed 7 years ago by robertoschwald@…

I just realized that you made a patch of patch! That is not normally how it is done in Macports. Please simply attach the latest version of "patch-configure-mysql.diff" that you want for the bacula and bacula5 ports. I will replace what is there and commit it. I attempted to patch the current "patch-configure-mysql.diff" file but it failed for me.

maybe you have overseen, but i have both attached a complete new patch and a patch for the patch. see comment:9

patch-configure-mysql.diff: A complete new version of the files/patch-configure-mysql.diff file which corrected a minor problem in setting the MYSQL_INCDIR, MYSQL_BINDIR, AND MYSQL_LIBDIR variables (they are especially needed to link src/cats/ libraries against the mysql library)

patch-configure-mysql.diff.patch: This is a patch to the existing files/patch-configure-mysql.diff.patch file (I don't know what you prefer - a new patch file or a patch for the existing file, therefore I provide both)

comment:21 Changed 7 years ago by mf2k (Frank Schima)

Got it. No need for the patch of the patch next time. Updated bacula in r121612 and bacula5 in r121613. The patches should all be correct now, but please let me know if they are not.

Note: See TracTickets for help on using tickets.