Bug 146766 - [patch] update sysutils/bacula-server to 5.0.2
Summary: [patch] update sysutils/bacula-server to 5.0.2
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: Wesley Shields
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 17:50 UTC by Allan Jude
Modified: 2010-08-18 00:50 UTC (History)
0 users

See Also:


Attachments
file.diff (4.36 KB, patch)
2010-05-20 17:50 UTC, Allan Jude
no flags Details | Diff
update-to-5.0.2.diff (22.70 KB, patch)
2010-05-20 20:12 UTC, tacid
no flags Details | Diff
update-server-to-5.0.2.diff (17.44 KB, patch)
2010-05-25 14:20 UTC, tacid
no flags Details | Diff
update-bat-to-5.0.2.diff (2.52 KB, patch)
2010-05-25 14:20 UTC, tacid
no flags Details | Diff
update-nagios-to-5.0.2.diff (2.74 KB, patch)
2010-05-25 14:20 UTC, tacid
no flags Details | Diff
update-to-5.0.2.diff (22.98 KB, patch)
2010-06-11 11:55 UTC, tacid
no flags Details | Diff
patch-for-bacula-146766.txt (416 bytes, patch)
2010-07-23 18:06 UTC, Angelo Turetta
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Jude 2010-05-20 17:50:02 UTC
Port has not been updated since Feb 12th (5.0.0)
5.0.2 has been out since Apr 28th and contains a number of important bug fixes re: duplicate jobs

Fix: removed: files/patch-bacula-src-cats-make_catalog_backup.pl.in
removed: files/patch-src-cats-update_postgresql_tables.in

These patches are included in 5.0.2


removed: files/patch-src-dird-ua_prune.c

the target code has been commented out in 5.0.2


Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-05-20 17:50:43 UTC
Maintainer of sysutils/bacula-server,

Please note that PR ports/146766 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/146766

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2010-05-20 17:50:46 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Dan Langille 2010-05-20 17:58:49 UTC
Thank you.

If this passes the standard tinderbox build tests, it has my blessing. I 
won't be able to work on or evaluate this until June 1st at the earliest.


-- 
Dan Langille - http://langille.org/
Comment 4 tacid 2010-05-20 20:12:46 UTC
Please, this patch don't include ports/145642 [1]  and ports/145697 [2] 
fixes, and patch for bacula-bat in ports/144507 [3] by Harald Schmalzbauer.

I've made (it takes two day of work) full patch [4], that also makes 
net-mgmt/nagios-check_bacula slave to sysutils/bacula-server like other 
bacula ports (bacula-client, bacula-bat). I tested this path on 7 my 
hosts with bacula: 2 bacula-servers, 7 bacula-client (one with 
openssl-1.0.0_1), 1 bacula-bat, 1 nagios-check_bacula. All errors I've 
found has been fixed.

If my patch will be approved, than older PR's can be closed

[1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145642
[2]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145697
[3]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/144507
[4]: http://tacid.kiev.ua/bacula-update-to-5.0.2.diff
Comment 5 Allan Jude 2010-05-20 20:44:49 UTC
On 2010-05-20 3:12 PM, Tacid wrote:
> Please, this patch don't include ports/145642 [1]  and ports/145697 [2]
> fixes, and patch for bacula-bat in ports/144507 [3] by Harald Schmalzbauer.
> 
> I've made (it takes two day of work) full patch [4], that also makes
> net-mgmt/nagios-check_bacula slave to sysutils/bacula-server like other
> bacula ports (bacula-client, bacula-bat). I tested this path on 7 my
> hosts with bacula: 2 bacula-servers, 7 bacula-client (one with
> openssl-1.0.0_1), 1 bacula-bat, 1 nagios-check_bacula. All errors I've
> found has been fixed.
> 
> If my patch will be approved, than older PR's can be closed
> 
> [1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145642
> [2]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145697
> [3]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/144507
> [4]: http://tacid.kiev.ua/bacula-update-to-5.0.2.diff

Bacula libs are no longer libbac.so.1 etc
they are libbac-5.0.1.so

They are not always in line with the version of bacula, because the libs
don't get bumped if they are unchanged (as they were between 5.0.1 and
5.0.2)

referenced multiple times in your patch
Comment 6 Paul Shepel 2010-05-20 22:11:20 UTC
Have you ever tried my patch?

About libs: in freebsd ldconfig man
Filenames must conform to the lib*.so.[0-9] pattern in order to be
added to the hints file.
So I made patch to replace -release by -version-info in libs Makefile,
for example:

-       $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@
$(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release
$(LIBBACFIND_LT_CURRENT).$(LIBBACFIND_LT_REVISION).$(LIBBACFIND_LT_AGE)
+       $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@
$(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -version-info
$(LIBBACFIND_LT_CURRENT):$(LIBBACFIND_LT_REVISION):$(LIBBACFIND_LT_AGE)

so after linking we'll get libbacfind.so.${MAJOR} library, or for
bacula 5.0.2 - libbacfind.so.5 . I'm not sure thats the best or ever
correct way to follow and ready to listen any better proposal. Maybe
we have to patch over /autoconf/ltmain.sh (libtool) file. Let's follow
lib naming convention if any or agree about new for this port.
Comment 7 tacid 2010-05-20 22:13:21 UTC
2010/5/20 Allan Jude <freebsd.lists@thunderit.com>:
> The OpenSSL 1.x fix should be included in 5.0.2 from the vendor already.
>
>
> Allan Jude

Without patches I didn't made it to compile src/lib/crypto.c and
src/crypto/lts.c on freebsd 6.4-release box with openssl-1.0.0_1
installed. Tell me if you succeed.
Comment 8 tacid 2010-05-25 14:20:50 UTC
I have 5 days bacula-5.0.2 online, working in production mode. Can 
maintainers approve this patches? We have 3 month outdated version of 
Bacula in FreeBSD ports...

P.S. I've split patch in 3 parts: patches for sysutils/bacula-server, 
sysutils/bacula-bat, net-mgmt/nagios-check_bacula ports

Thank you!




Comment 9 Dan Langille 2010-05-25 15:00:45 UTC
I am away until June. If someone else can confirm building, please  
commit

-- 
Dan Langille
http://langille.org/


On May 25, 2010, at 9:20 AM, Paul Shepel <tacid@tacid.kiev.ua> wrote:

> I have 5 days bacula-5.0.2 online, working in production mode. Can  
> maintainers approve this patches? We have 3 month outdated version  
> of Bacula in FreeBSD ports...
>
> P.S. I've split patch in 3 parts: patches for sysutils/bacula- 
> server, sysutils/bacula-bat, net-mgmt/nagios-check_bacula ports
>
> Thank you!
>
>
>
>
>
> <update-server-to-5.0.2.diff>
> <update-bat-to-5.0.2.diff>
> <update-nagios-to-5.0.2.diff>
Comment 10 Anders Troback 2010-05-25 23:25:52 UTC
I approve my part (Nagios that is)!
Comment 11 tacid 2010-05-31 10:50:35 UTC
Can someone confirm building, please, to commit this patches?
Comment 12 andriy.dimov 2010-05-31 11:47:18 UTC
I approve building with Paul's patches
Comment 13 tacid 2010-05-31 18:55:59 UTC
Since port bump done for bacula-server port to 5.0.0_1 old patches
aren't working anymore. So I've made new one. There are links to
patches over sysutils/bacula-server only [1] and new full patch over
three ports: sysutils/bacula-server, sysutils/bacula-bat and
net-mgmt/nagios-check_bacula [2]

[1] http://tacid.kiev.ua/bacula-update-server-5.0.2.diff
[2] http://tacid.kiev.ua/bacula-update-to-5.0.2.diff
Comment 14 Silver Salonen 2010-06-02 07:18:26 UTC
These patches apply perfectly, bacula-server, bacula-client and nagios-
check_bacula ports build OK too.

-- 
Silver
Comment 15 tacid 2010-06-11 11:55:43 UTC
Bump.
Port update is still actual. Waiting for approval.

Thank You,

-- 
Paul Shepel

Comment 16 Dan Langille 2010-07-02 17:47:13 UTC
On 6/11/2010 6:55 AM, Paul Shepel wrote:
> Bump.
> Port update is still actual. Waiting for approval.
>
> Thank You,
>

It has my approval.  Will be playing with it now.  See me on IRC.

-- 
Dan Langille - http://langille.org/
Comment 17 Dan Langille 2010-07-02 19:16:14 UTC
On 6/11/2010 6:55 AM, Paul Shepel wrote:
> Bump.
> Port update is still actual. Waiting for approval.
>
> Thank You,
>

It has my approval.  Will be playing with it now.  See me on IRC.

I see problems when compiling client:


Creating package /var/ports/packages/All/bacula-client-5.0.2.tbz
Registering depends: gettext-0.17_1 libiconv-1.13.1.
Registering conflicts: bacula-server-devel-[0-9]* 
bacula-client-devel-[0-9]* bacula-docs-devel-[0-9]*.
Creating bzip'd tar ball in 
'/var/ports/packages/All/bacula-client-5.0.2.tbz'
tar: lib/libbac.so.5: Cannot stat: No such file or directory
tar: lib/libbaccfg.so.5: Cannot stat: No such file or directory
tar: lib/libbacfind.so.5: Cannot stat: No such file or directory
tar: lib/libbacpy.so.5: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
pkg_create: make_dist: tar command failed with code 256
*** Error code 1

Stop in /usr/home/dan/src/sysutils/bacula-client.
*** Error code 1

Stop in /usr/home/dan/src/sysutils/bacula-client.



-- 
Dan Langille - http://langille.org/
Comment 18 Dan Langille 2010-07-02 19:42:02 UTC
note: I am applying only this patch:

   http://tacid.kiev.ua/bacula-update-to-5.0.2.diff
Comment 19 tacid 2010-07-02 20:04:10 UTC
What exactly you've done to get this compile error? I've checked just 
now on new FreeBSD 8 box:

# cd /usr/ports
# curl http://tacid.kiev.ua/bacula-update-to-5.0.2.diff | patch -p0
# make -C /usr/ports/sysutils/bacula-client make install

all OK. After that I deleted package and have installed it with 
portmaster (with package)

# portmaster -g sysutils/bacula-client

-- 
Paul
Comment 20 Dan Langille 2010-07-02 20:12:54 UTC
On 7/2/2010 3:04 PM, Paul Shepel wrote:
> What exactly you've done to get this compile error? I've checked just
> now on new FreeBSD 8 box:
>
> # cd /usr/ports
> # curl http://tacid.kiev.ua/bacula-update-to-5.0.2.diff | patch -p0
> # make -C /usr/ports/sysutils/bacula-client make install

I do these tests:

 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-testing.html
>
> all OK. After that I deleted package and have installed it with
> portmaster (with package)
>
> # portmaster -g sysutils/bacula-client


I will try again


-- 
Dan Langille - http://langille.org/
Comment 21 tacid 2010-07-02 20:20:31 UTC
02.07.2010 22:12, Dan Langille пиÑеÑ:
> On 7/2/2010 3:04 PM, Paul Shepel wrote:
>> What exactly you've done to get this compile error? I've checked just
>> now on new FreeBSD 8 box:
>>
>> # cd /usr/ports
>> # curl http://tacid.kiev.ua/bacula-update-to-5.0.2.diff | patch -p0
>> # make -C /usr/ports/sysutils/bacula-client make install
>
> I do these tests:
>
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-testing.html 
>
I have problem with step 5 - make package do not add 
/usr/local/share/bacula to package so:
STEP 2:
root@fileserver.gi.local#/usr/ports/sysutils/bacula-client: make package
===>  Building package for bacula-client-5.0.2
Creating package /usr/ports/packages/All/bacula-client-5.0.2.tbz
Registering depends: gettext-0.18_1 libiconv-1.13.1_1.
Registering conflicts: bacula-server-devel-[0-9]* 
bacula-client-devel-[0-9]* bacula-docs-devel-[0-9]*.
Creating bzip'd tar ball in 
'/usr/ports/packages/All/bacula-client-5.0.2.tbz'

STEP 3:
root@fileserver.gi.local#/usr/ports/sysutils/bacula-client: make deinstall
===>  Deinstalling for sysutils/bacula-client
===>   Deinstalling bacula-client-5.0.2
To delete Bacula group permanently, use 'pw groupdel bacula'

STEP 4:
root@fileserver.gi.local#/usr/ports/sysutils/bacula-client: pkg_add 
/usr/ports/packages/All/bacula-client-5.0.2.tbz
bacula:*:910:
You already have a group "bacula", so I will use it.

################################################################################

NOTE:
Sample files are installed in /usr/local/etc:
bconsole.conf.sample, bacula-barcodes.sample, bacula-fd.conf.sample

   Please read this file:

         /usr/local/share/doc/bacula/ReleaseNotes

   as installed by docs port for the upgrade procedure.

Read the ReleaseNotes for further information.

################################################################################

STEP 5:
root@fileserver.gi.local#/usr/ports/sysutils/bacula-client: make deinstall
===>  Deinstalling for sysutils/bacula-client
===>   Deinstalling bacula-client-5.0.2
To delete Bacula group permanently, use 'pw groupdel bacula'
pkg_delete: file '/usr/local/share/bacula' doesn't exist
pkg_delete: unable to completely remove directory '/usr/local/share/bacula'
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)
Comment 22 Dan Langille 2010-07-02 20:25:24 UTC
Seems OK now.  Still testing.
Comment 23 Dan Langille 2010-07-02 20:44:46 UTC
All is fine.  Good to commit.
Comment 24 Mark Linimon freebsd_committer freebsd_triage 2010-07-04 01:42:05 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 25 Wesley Shields freebsd_committer freebsd_triage 2010-07-10 22:40:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it.
Comment 26 dfilter service freebsd_committer freebsd_triage 2010-07-17 02:00:59 UTC
wxs         2010-07-17 01:00:47 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/bacula-bat  Makefile pkg-plist 
    sysutils/bacula-docs Makefile distinfo 
    sysutils/bacula-server Makefile distinfo pkg-plist 
                           pkg-plist.client 
    sysutils/bacula-server/files pkg-message.server.in 
    net-mgmt/nagios-check_bacula Makefile pkg-plist 
  Added files:
    sysutils/bacula-server/files patch-configure 
                                 patch-src-cats-Makefile.in 
                                 patch-src-findlib-Makefile.in 
                                 patch-src-lib-Makefile.in 
                                 patch-src-lib-crypto.c 
                                 patch-src-lib-tls.c 
  Removed files:
    sysutils/bacula-server/files 
                                 patch-bacula-src-cats-make_catalog_backup.pl.in 
                                 patch-src-cats-update_postgresql_tables.in 
                                 patch-src-dird-ua_prune.c 
  Log:
  Update sysutils/bacula-bat, sysutils/bacula-docs, sysutils/bacula-server,
  sysutils/bacula-client and net-mgmt/nagios-check_bacula to 5.0.2.
  
  PR:             ports/146766
  Submitted by:   Allan Jude <freebsd.lists@thunderit.com>
  Approved by:    Dan Langille <dan@langille.org> (maintainer)
  
  Revision  Changes    Path
  1.9       +28 -12    ports/net-mgmt/nagios-check_bacula/Makefile
  1.3       +1 -1      ports/net-mgmt/nagios-check_bacula/pkg-plist
  1.11      +29 -14    ports/sysutils/bacula-bat/Makefile
  1.2       +2 -0      ports/sysutils/bacula-bat/pkg-plist
  1.21      +1 -1      ports/sysutils/bacula-docs/Makefile
  1.21      +6 -6      ports/sysutils/bacula-docs/distinfo
  1.125     +21 -36    ports/sysutils/bacula-server/Makefile
  1.52      +3 -3      ports/sysutils/bacula-server/distinfo
  1.2       +0 -14     ports/sysutils/bacula-server/files/patch-bacula-src-cats-make_catalog_backup.pl.in (dead)
  1.11      +11 -0     ports/sysutils/bacula-server/files/patch-configure (new)
  1.6       +11 -0     ports/sysutils/bacula-server/files/patch-src-cats-Makefile.in (new)
  1.2       +0 -11     ports/sysutils/bacula-server/files/patch-src-cats-update_postgresql_tables.in (dead)
  1.2       +0 -11     ports/sysutils/bacula-server/files/patch-src-dird-ua_prune.c (dead)
  1.1       +11 -0     ports/sysutils/bacula-server/files/patch-src-findlib-Makefile.in (new)
  1.1       +29 -0     ports/sysutils/bacula-server/files/patch-src-lib-Makefile.in (new)
  1.1       +25 -0     ports/sysutils/bacula-server/files/patch-src-lib-crypto.c (new)
  1.1       +11 -0     ports/sysutils/bacula-server/files/patch-src-lib-tls.c (new)
  1.5       +15 -1     ports/sysutils/bacula-server/files/pkg-message.server.in
  1.25      +6 -6      ports/sysutils/bacula-server/pkg-plist
  1.11      +13 -13    ports/sysutils/bacula-server/pkg-plist.client
_______________________________________________
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 27 Wesley Shields freebsd_committer freebsd_triage 2010-07-17 02:01:08 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 28 Angelo Turetta 2010-07-23 18:06:45 UTC
  The patch commited for this update contains a mistake.

The patch was composed by tacid from other pr, but one of the files was 
not patched correctly.
This patch was commited:

--- sysutils/bacula-server.orig/files/patch-src-lib-crypto.c     1970-01-01 03:00:00.000000000 +0300
+++ sysutils/bacula-server/files/patch-src-lib-crypto.c  2010-05-20 20:17:11.000000000 +0300
@@ -0,0 +1,25 @@
+--- src/lib/crypto.c.orig       2010-05-20 20:15:22.000000000 +0300
++++ src/lib/crypto.c    2010-05-20 20:16:39.000000000 +0300
+@@ -316,7 +316,11 @@
+  */
+ static ASN1_OCTET_STRING *openssl_cert_keyid(X509 *cert) {
+    X509_EXTENSION *ext;
++#if (OPENSSL_VERSION_NUMBER<  0x10000000L)
+    const X509V3_EXT_METHOD *method;
++#else
++   const X509V3_EXT_METHOD *method;
++#endif

(where you would say the added #if is quite useless)

while ports/145642 contained:

--- src/lib/crypto.c.orig 2010-01-25 09:56:28.000000000 +0200
+++ src/lib/crypto.c 2010-04-13 15:12:17.000000000 +0300
@@ -309,7 +309,11 @@
*/
static ASN1_OCTET_STRING *openssl_cert_keyid(X509 *cert) {
X509_EXTENSION *ext;
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
X509V3_EXT_METHOD *method;
+#else
+ const X509V3_EXT_METHOD *method;
+#endif

As you see, the commited patch contains one 'const' too much.

I don't know if having that pointer const even for openssl < 1.0 might 
cause problems: in that case, please commit the attached correction

Angelo Turetta
Comment 29 tacid 2010-07-26 15:42:37 UTC
I've tested compiling with openssl 0.9.7, 0.9.8 and 1.0.0 all work with 
this patch so I think we can delete this part:

@@ -316,7 +316,11 @@
   */
  static ASN1_OCTET_STRING *openssl_cert_keyid(X509 *cert) {
     X509_EXTENSION *ext;
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
     const X509V3_EXT_METHOD *method;
+#else
+   const X509V3_EXT_METHOD *method;
+#endif
     ASN1_OCTET_STRING *keyid;
     int i;

because it does nothing
Comment 30 Wesley Shields freebsd_committer freebsd_triage 2010-08-18 00:45:56 UTC
On Fri, Jul 23, 2010 at 07:06:45PM +0200, Angelo Turetta wrote:
>   The patch commited for this update contains a mistake.

Sorry for the delay, I've been very busy traveling for work the past
month. Olli Hauer (ohauer@) has graciously decided to step in and handle
the bacula PR's that I have on my plate. I forwarded this mail along to
him so that he can address it also.

Again, my apologies for the delay and hopefully Olli can handle it from
here.

-- WXS
Comment 31 Dan Langille 2010-08-18 00:48:37 UTC
On 8/17/2010 7:45 PM, Wesley Shields wrote:
> On Fri, Jul 23, 2010 at 07:06:45PM +0200, Angelo Turetta wrote:
>>    The patch commited for this update contains a mistake.
>
> Sorry for the delay, I've been very busy traveling for work the past
> month. Olli Hauer (ohauer@) has graciously decided to step in and handle
> the bacula PR's that I have on my plate. I forwarded this mail along to
> him so that he can address it also.
>
> Again, my apologies for the delay and hopefully Olli can handle it from
> here.

No worries.  Everyone is allowed to have a life. :)

Olli: if you feel up to it, there is one outstanding issue for Bacula 
5.0.3.  I do not have the knowledge to know the solution....

Oh, I see wxs has forwarded that to you as well. Thank you.

-- 
Dan Langille - http://langille.org/