Bacula-users

Re: [Bacula-users] FreeBSD: HEADS UP - port changes

2012-12-17 12:42:58
Subject: Re: [Bacula-users] FreeBSD: HEADS UP - port changes
From: Dan Langille <dan AT langille DOT org>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 17 Dec 2012 12:37:17 -0500
On 2012-12-17 10:47, Dan Langille wrote:
> On 2012-12-16 17:25, Dan Langille wrote:
>> On Oct 27, 2012, at 3:04 PM, Dan Langille wrote:
>>
>>> We are going to be making some major changes to the FreeBSD port of
>>> Bacula.
>>> Before we do this, I'm looking for volunteers to test out the
>>> changes.
>>>
>>> This is a short list of the changes we plan to make:
>>>
>>> - bacula-server will require bacula-client.  you cannot install
>>> bacula-server without bacula-client
>>> - bacula-client and bacula-server will no longer install docs
>>> - all docs are installed only by bacula-docs
>>> - new port added: bacula-client-static (statically linked; so good
>>> for rescue CDs etc)
>>>
>>> Why is bacula-client now required by bacula-server?  A long 
>>> standing
>>> problem between the two
>>> ports was they each installed the same shared libraries.  We solved
>>> this situation by making only bacula-client
>>> install the shared libraries.  This is why bacula-server requires
>>> bacula-client.
>>>
>>> This change to the shared libraries will avoid the continually
>>> reported problems when upgrading
>>> Bacula on FreeBSD and not first deleting both bacula-client and
>>> bacula-server.
>>>
>>> Watch this thread, and I will post a URL from which you can 
>>> download
>>> the upgraded ports
>>> and test them.  We'll give you about a week to report any problems.
>>>
>>> Also, this is the place to discuss any issues with the above
>>> strategies.  :)
>>
>> This was just committed to the FreeBSD ports tree.
>>
>>
>> 
>> http://www.freshports.org/commit.php?message_id=201212161632.qBGGWjZt011350 
>> AT svn.freebsd DOT org
>>
>> I'm about to test the results in a sandbox… if my portsnap update
>> will ever finish...
>
> The portsnap finally finished.  Bacula seems to be running fine.
>
> I wish to emphasize that we've only changed the packaging, not the
> code.  :)
>
> See above.
>
> As you upgrade, please reply here and let us know how it went.

As I upgraded my production server, I encountered a problem.  The 
problem was resolved
by first removing the installed ports and trying again.  This is the 
exact issue
which this new version of the port strives to avoid.

I included the messages below for the archives.

==>Entering directory 
/usr/ports/sysutils/bacula-client/work/bacula-5.2.12/src/filed
Compiling filed.c
Compiling authenticate.c
Compiling acl.c
Compiling backup.c
Compiling estimate.c
Compiling fd_plugins.c
Compiling accurate.c
Compiling filed_conf.c
Compiling heartbeat.c
Compiling job.c
Compiling pythonfd.c
Compiling restore.c
Compiling status.c
Compiling verify.c
Compiling verify_vol.c
Compiling xattr.c
Linking bacula-fd ...
/usr/ports/sysutils/bacula-client/work/bacula-5.2.12/libtool --silent 
--tag=CXX --mode=link /usr/bin/c++  -L/usr/local/lib 
-Wl,-rpath=/usr/lib:/usr/local/lib -L../lib -L../findlib -o bacula-fd 
filed.o authenticate.o acl.o backup.o estimate.o fd_plugins.o accurate.o 
filed_conf.o heartbeat.o job.o pythonfd.o restore.o status.o verify.o 
verify_vol.o xattr.o    -lz -lbacfind -lbacpy -lbaccfg -lbac -lm  
-lpthread  -lintl   -lwrap /usr/local/lib/libintl.so 
/usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -L/usr/lib 
-lssl -lcrypto
filed.o(.text+0x141): In function `terminate_filed(int)':
: undefined reference to `lmgr_cleanup_main()'
filed.o(.text+0x94d): In function `main':
: undefined reference to `lmgr_init_thread()'
authenticate.o(.text+0x10c): In function `authenticate_director(JCR*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
authenticate.o(.text+0x13c): In function `authenticate_director(JCR*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
authenticate.o(.text+0x905): In function 
`authenticate_storagedaemon(JCR*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
authenticate.o(.text+0x935): In function 
`authenticate_storagedaemon(JCR*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
backup.o(.text+0x59b): In function `encode_and_send_attributes(JCR*, 
FF_PKT*, int&)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
backup.o(.text+0x5dd): In function `encode_and_send_attributes(JCR*, 
FF_PKT*, int&)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
fd_plugins.o(.text+0x412): In function `baculaAcceptFile(bpContext*, 
save_pkt*)':
: undefined reference to `accept_file(FF_PKT*)'
heartbeat.o(.text+0x47): In function `start_dir_heartbeat(JCR*)':
: undefined reference to `lmgr_thread_create(pthread**, pthread_attr* 
const*, void* (*)(void*), void*)'
heartbeat.o(.text+0xac): In function `start_heartbeat_monitor(JCR*)':
: undefined reference to `lmgr_thread_create(pthread**, pthread_attr* 
const*, void* (*)(void*), void*)'
job.o(.text+0x531d): In function `bootstrap_cmd(JCR*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
job.o(.text+0x5378): In function `bootstrap_cmd(JCR*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
restore.o(.text+0x31ce): In function `do_restore(JCR*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
restore.o(.text+0x3218): In function `do_restore(JCR*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
status.o(.text+0xbb4): In function `list_running_jobs(STATUS_PKT*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
status.o(.text+0xbee): In function `list_running_jobs(STATUS_PKT*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
status.o(.text+0x1024): In function `list_running_jobs(STATUS_PKT*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
status.o(.text+0x1066): In function `list_running_jobs(STATUS_PKT*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
verify.o(.text+0x776): In function `verify_file(JCR*, FF_PKT*, bool)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
verify.o(.text+0x7ad): In function `verify_file(JCR*, FF_PKT*, bool)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
verify_vol.o(.text+0x5ee): In function `do_verify_volume(JCR*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
verify_vol.o(.text+0x633): In function `do_verify_volume(JCR*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
*** Error code 1

Stop in /usr/ports/sysutils/bacula-client/work/bacula-5.2.12/src/filed.


   ====== Error in 
/usr/ports/sysutils/bacula-client/work/bacula-5.2.12/src/filed ======


*** Error code 1

Stop in /usr/ports/sysutils/bacula-client/work/bacula-5.2.12.
*** Error code 1

Stop in /usr/ports/sysutils/bacula-client.
*** Error code 1

Stop in /usr/ports/sysutils/bacula-client.
** Command failed [exit code 1]: /usr/bin/script -qa 
/tmp/portupgrade20121217-92758-1s2403t-0 env UPGRADE_TOOL=portupgrade 
UPGRADE_PORT=bacula-client-5.2.6 UPGRADE_PORT_VER=5.2.6 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
         ! sysutils/bacula-client (bacula-client-5.2.6)  (linker error)
[root@ngaio:~] #
: undefined reference to `lmgr_thread_create(pthread**, pthread_attr* 
const*, void* (*)(void*), void*)'
heartbeat.o(.text+0xac): In function `start_heartbeat_monitor(JCR*)':
: undefined reference to `lmgr_thread_create(pthread**, pthread_attr* 
const*, void* (*)(void*), void*)'
job.o(.text+0x531d): In function `bootstrap_cmd(JCR*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
job.o(.text+0x5378): In function `bootstrap_cmd(JCR*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
restore.o(.text+0x31ce): In function `do_restore(JCR*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
restore.o(.text+0x3218): In function `do_restore(JCR*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
status.o(.text+0xbb4): In function `list_running_jobs(STATUS_PKT*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
status.o(.text+0xbee): In function `list_running_jobs(STATUS_PKT*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
status.o(.text+0x1024): In function `list_running_jobs(STATUS_PKT*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
status.o(.text+0x1066): In function `list_running_jobs(STATUS_PKT*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
verify.o(.text+0x776): In function `verify_file(JCR*, FF_PKT*, bool)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
verify.o(.text+0x7ad): In function `verify_file(JCR*, FF_PKT*, bool)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
verify_vol.o(.text+0x5ee): In function `do_verify_volume(JCR*)':
: undefined reference to `bthread_mutex_lock_p(pthread_mutex**, char 
const*, int)'
verify_vol.o(.text+0x633): In function `do_verify_volume(JCR*)':
: undefined reference to `bthread_mutex_unlock_p(pthread_mutex**, char 
const*, int)'
*** Error code 1

Stop in /usr/ports/sysutils/bacula-client/work/bacula-5.2.12/src/filed.


   ====== Error in 
/usr/ports/sysutils/bacula-client/work/bacula-5.2.12/src/filed ======


*** Error code 1

Stop in /usr/ports/sysutils/bacula-client/work/bacula-5.2.12.
*** Error code 1

Stop in /usr/ports/sysutils/bacula-client.
*** Error code 1

Stop in /usr/ports/sysutils/bacula-client.
** Command failed [exit code 1]: /usr/bin/script -qa 
/tmp/portupgrade20121217-92758-1s2403t-0 env UPGRADE_TOOL=portupgrade 
UPGRADE_PORT=bacula-client-5.2.6 UPGRADE_PORT_VER=5.2.6 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
         ! sysutils/bacula-client (bacula-client-5.2.6)  (linker error)
[root@ngaio:~] # pkg_info | grep bacula
bacula-client-5.2.6 The network backup solution (client)
bacula-server-5.2.6 The network backup solution (server)
nagios-check_bacula-5.0.3 Nagios plugin for Bacula
[root@ngaio:~] # pkg_delete nagios-check_bacula-5.0.3
[root@ngaio:~] # pkg_delete bacula-server-5.2.6
rmdir: /var/db/bacula: Not a directory
Check if /var/db/bacula is empty and delete it to permanently remove 
the bacula port.
To delete Bacula user permanently, use 'pw userdel bacula'
To delete Bacula group permanently, use 'pw groupdel bacula'
pkg_delete: unable to completely remove directory 
'/usr/local/share/bacula'
==> You should manually remove the "bacula" user.
pkg_delete: couldn't entirely delete package (perhaps the packing list 
is
incorrectly specified?)
[root@ngaio:~] # pkg_delete bacula-client-5.2.6
pkg_delete: package 'bacula-client-5.2.6' is required by these other 
packages
and may not be deinstalled:
FreshPorts-ports-1.0
[root@ngaio:~] # pkg_delete FreshPorts-ports-1.0
[root@ngaio:~] # pkg_delete bacula-client-5.2.6
rmdir: /var/db/bacula: Not a directory
Check if /var/db/bacula is empty and delete it to permanently remove 
the bacula port.
To delete Bacula group permanently, use 'pw groupdel bacula'
pkg_delete: file '/usr/local/man/man8/bacula-fd.8.gz' doesn't exist
pkg_delete: file '/usr/local/man/man8/bconsole.8.gz' doesn't exist
pkg_delete: file '/usr/local/lib/libbac.la' doesn't exist
pkg_delete: file '/usr/local/lib/libbac.so' doesn't exist
pkg_delete: file '/usr/local/lib/libbac.so.5' doesn't exist
pkg_delete: file '/usr/local/lib/libbaccfg.la' doesn't exist
pkg_delete: file '/usr/local/lib/libbaccfg.so' doesn't exist
pkg_delete: file '/usr/local/lib/libbaccfg.so.5' doesn't exist
pkg_delete: file '/usr/local/lib/libbacfind.la' doesn't exist
pkg_delete: file '/usr/local/lib/libbacfind.so' doesn't exist
pkg_delete: file '/usr/local/lib/libbacfind.so.5' doesn't exist
pkg_delete: file '/usr/local/lib/libbacpy.la' doesn't exist
pkg_delete: file '/usr/local/lib/libbacpy.so' doesn't exist
pkg_delete: file '/usr/local/lib/libbacpy.so.5' doesn't exist
pkg_delete: file '/usr/local/lib/bpipe-fd.so' doesn't exist
pkg_delete: unable to completely remove directory 
'/usr/local/share/bacula'
==> You should manually remove the "bacula" user.
pkg_delete: file '/usr/local/share/doc/bacula/VERIFYING' doesn't exist
pkg_delete: file '/usr/local/share/doc/bacula/technotes' doesn't exist
pkg_delete: file '/usr/local/share/doc/bacula/ChangeLog' doesn't exist
pkg_delete: file '/usr/local/share/doc/bacula/README' doesn't exist
pkg_delete: file '/usr/local/share/doc/bacula/ReleaseNotes' doesn't 
exist
pkg_delete: file '/usr/local/share/doc/bacula/LICENSE' doesn't exist
pkg_delete: file '/usr/local/share/doc/bacula/INSTALL' doesn't exist
pkg_delete: file '/usr/local/share/doc/bacula' doesn't exist
pkg_delete: unable to completely remove directory 
'/usr/local/share/doc/bacula'
pkg_delete: couldn't entirely delete package (perhaps the packing list 
is
incorrectly specified?)
[root@ngaio:~] # ls /usr/local/share/doc/bacula
ls: /usr/local/share/doc/bacula: No such file or directory
[root@ngaio:~] #

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

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users