Re: libraries with version numbers - sysutils/bacula

2014-08-03 Thread Dan Langille

On Aug 3, 2014, at 2:26 PM, Dan Langille  wrote:

> See that 5?  I think it should be a 7.  I have no idea where the 5 is coming 
> from.  It should be the value from LIBBACCATS_LT_RELEASE
> 
> A grep for that gives (not all lines are included here):
> 
> # grep -r LIBBACCATS_LT_RELEASE *
> cats/Makefile:LIBBACCATS_LT_RELEASE = 7.0.4

With help from madpilot, I found that five, hardcoded in a patch file.  Fixed.  
Thanks.

— 
Dan Langille



signature.asc
Description: Message signed with OpenPGP using GPGMail


libraries with version numbers - sysutils/bacula

2014-08-03 Thread Dan Langille
I’m having trouble updating the sysutils/bacula-server port to 7.0.4.  This is 
a packaging issue, not a ‘does it run’ issue.  Regression testing is fine (see 
comment below).

I have https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191311 nearly 
finished. The blocking issue arises with src/cats/install-default-backend.in 
which later stops the installation of the right symlink files.

short version:

After bacula-server installs, we have this:
[dan@testing /usr/local/lib]$ ls -l libbaccats*
-rwxr-xr-x  1 root  wheel   1010 Aug  3 18:20 libbaccats-postgresql.la
lrwxr-xr-x  1 root  wheel 26 Aug  3 18:20 libbaccats-postgresql.so -> 
libbaccats-postgresql.so.7
-rwxr-xr-x  1 root  wheel  42622 Aug  3 18:20 libbaccats-postgresql.so.7
-rwxr-xr-x  1 root  wheel944 Aug  3 18:20 libbaccats.la
lrwxr-xr-x  1 root  wheel 15 Aug  3 18:20 libbaccats.so -> libbaccats.so.7
-rwxr-xr-x  1 root  wheel   6376 Aug  3 18:20 libbaccats.so.7

libbaccats.so.7 should be a symlink to libbaccats-postgresql.so <— this change 
is done by the install-default-backend postgresql script (mentioned soon below).

longer version:

After installation, a grep gives this:
# cd /var/ports/usr/ports/sysutils/bacula-server/work/bacula-7.0.4/src
# grep -r install-default-backend *
cats/Makefile:  ./install-default-backend postgresql 5 $(DESTDIR)$(libdir)
cats/Makefile.in:   ./install-default-backend @DEFAULT_DB_TYPE@ 5 
$(DESTDIR)$(libdir)
cats/Makefile.in.orig:  ./install-default-backend @DEFAULT_DB_TYPE@ 
$(LIBBACCATS_LT_RELEASE) $(DESTDIR)$(libdir)

See that 5?  I think it should be a 7.  I have no idea where the 5 is coming 
from.  It should be the value from LIBBACCATS_LT_RELEASE

A grep for that gives (not all lines are included here):

# grep -r LIBBACCATS_LT_RELEASE *
cats/Makefile:LIBBACCATS_LT_RELEASE = 7.0.4

So I get confused and can’t see why. Spending more hours on this seems 
fruitless.

I am also trying to understand the version numbers used in the Bacula port.  
Bacula 5.2.12_6 installs these libraries:

[dan@bacula:/usr/local/lib] $ ls -l libbac*
-rwxr-xr-x  1 root  wheel 900 Jul  5 22:12 libbac.la
lrwxr-xr-x  1 root  wheel  15 Jul  5 22:12 libbac.so -> libbac.so.5.0.2
lrwxr-xr-x  1 root  wheel  15 Jul  5 22:12 libbac.so.5 -> libbac.so.5.0.2
-rwxr-xr-x  1 root  wheel  434017 Jul  5 22:12 libbac.so.5.0.2
-rwxr-xr-x  1 root  wheel 984 Jul  5 22:15 libbaccats-postgresql.la
lrwxr-xr-x  1 root  wheel  30 Jul  5 22:15 libbaccats-postgresql.so -> 
libbaccats-postgresql.so.5.0.2
lrwxr-xr-x  1 root  wheel  30 Jul  5 22:15 libbaccats-postgresql.so.5 -> 
libbaccats-postgresql.so.5.0.2
-rwxr-xr-x  1 root  wheel   42270 Jul  5 22:15 libbaccats-postgresql.so.5.0.2
-rwxr-xr-x  1 root  wheel 924 Jul  5 22:15 libbaccats.la
lrwxr-xr-x  1 root  wheel  19 Jul  5 22:15 libbaccats.so -> 
libbaccats.so.5.0.2
lrwxr-xr-x  1 root  wheel  24 Jul  5 22:15 libbaccats.so.5 -> 
libbaccats-postgresql.so
-rwxr-xr-x  1 root  wheel6576 Jul  5 22:15 libbaccats.so.5.0.2

… etc

I think 5.0.2 is derived from 5.2.16 by this patch in 
files/patch-src__cats__Makefile.in:

-   $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ 
$(LIBBACSQL_LOBJS) -export-dynamic -rpath $(libdir) -release 
$(LIBBACSQL_LT_RELEASE) $(DB_LIBS)
+   $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ 
$(LIBBACSQL_LOBJS) -export-dynamic -rpath $(libdir) -version-info 
$(LIBBACSQL_LT_RELEASE:S/./:/g:S/12/0/g)

I didn’t create that substitution and I do not understand why it is useful.  
Can help me understand please?

I suspect this approach was taken so minor upgrades do not require reinstalling 
other apps.

Thanks.

— 
Dan Langille



signature.asc
Description: Message signed with OpenPGP using GPGMail