Debian Bug report logs - #580372
libbsd0: Makefile needs a small fix?

version graph

Package: libbsd0; Maintainer for libbsd0 is Guillem Jover <guillem@debian.org>; Source for libbsd0 is src:libbsd.

Reported by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>

Date: Wed, 5 May 2010 14:36:01 UTC

Severity: wishlist

Tags: fixed-upstream

Found in version libbsd/0.2.0-1

Fixed in version libbsd/0.4.0-1

Done: Guillem Jover <guillem@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#580372; Package libbsd0. (Wed, 05 May 2010 14:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>:
New Bug report received and forwarded. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Wed, 05 May 2010 14:36:04 GMT) Full text and rfc822 format available.

Message #5 received at bugs@bugs.debian.org (full text, mbox):

From: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
To: bugs@bugs.debian.org
Subject: libbsd0: Makefile needs a small fix?
Date: Wed, 5 May 2010 16:34:19 +0200 (CEST)
Package: libbsd0
Version: 0.2.0-1
Severity: wishlist

While porting the package to another arch, I noticed what I think may
be a small problem and this patch should fix:

--- Makefile.~1~	2010-01-10 15:29:51.000000000 +0100
+++ Makefile	2010-05-01 15:23:26.000000000 +0200
@@ -149,7 +149,7 @@
 	ln -fs $^ $@

 $(LIB_SHARED): $(LIB_SHARED_OBJS)
-	gcc -shared \
+	$(CC) -shared \
 	  -Wl,-soname -Wl,$(LIB_SONAME) \
 	  -Wl,--version-script=Versions \
 	  -o $@ $^
@@ -200,4 +200,3 @@
 	rm -f $(LIB_STATIC)
 	rm -f $(LIB_SHARED_OBJS)
 	rm -f $(LIB_SHARED) $(LIB_SONAME) $(LIB_SHARED_SO)
-


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE= (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages libbsd0 depends on:
ii  libc6                         2.10.2-6   Embedded GNU C Library: Shared lib

libbsd0 recommends no packages.

libbsd0 suggests no packages.

-- no debconf information


Cheers,

-- 
Cristian




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#580372; Package libbsd0. (Mon, 10 May 2010 02:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Mon, 10 May 2010 02:33:03 GMT) Full text and rfc822 format available.

Message #10 received at 580372@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>, 580372@bugs.debian.org
Subject: Re: Bug#580372: libbsd0: Makefile needs a small fix?
Date: Mon, 10 May 2010 04:29:05 +0200
tag 580372 fixed-upstream
thanks

On Wed, 2010-05-05 at 16:34:19 +0200, Cristian Ionescu-Idbohrn wrote:
> Package: libbsd0
> Version: 0.2.0-1
> Severity: wishlist
> 
> While porting the package to another arch, I noticed what I think may
> be a small problem and this patch should fix:

Right, I fixed this upstream some time ago, need to prepare a new
release:

  <http://cgit.freedesktop.org/libbsd/commit/?id=1f0b0b23>

thanks,
guillem




Added tag(s) fixed-upstream. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 10 May 2010 02:33:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#580372; Package libbsd0. (Mon, 10 May 2010 09:18:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Mon, 10 May 2010 09:18:05 GMT) Full text and rfc822 format available.

Message #17 received at 580372@bugs.debian.org (full text, mbox):

From: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
To: 580372@bugs.debian.org
Cc: Guillem Jover <guillem@debian.org>
Subject: Re: Bug#580372: libbsd0: Makefile needs a small fix?
Date: Mon, 10 May 2010 10:59:25 +0200 (CEST)
On Mon, 10 May 2010, Guillem Jover wrote:

> tag 580372 fixed-upstream
> thanks
>
> On Wed, 2010-05-05 at 16:34:19 +0200, Cristian Ionescu-Idbohrn wrote:
> > Package: libbsd0
> > Version: 0.2.0-1
> > Severity: wishlist
> >
> > While porting the package to another arch, I noticed what I think may
> > be a small problem and this patch should fix:
>
> Right, I fixed this upstream some time ago, need to prepare a new
> release:
>
>   <http://cgit.freedesktop.org/libbsd/commit/?id=1f0b0b23>

Great.  Thanks.
And when you're at it, I dare to have one more wish :)

I'm cross-building libbsd for an embedded system, and I need the
symlink to _not_ point to the host installed lib, but to the
cross-built one (inside the installed directory tree).  I hacked the
Makefile to do it:

-       ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)$(usrlibdir)/$(LIB_SHARED_SO)
+       ln -sf ../..$(libdir)/$(LIB_SHARED) $(DESTDIR)$(usrlibdir)/$(LIB_SHARED_SO)

but I'm convinced there's a better (although more intricate) way to do
it.


Cheers,

-- 
Cristian




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#580372; Package libbsd0. (Sat, 15 May 2010 23:45:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sat, 15 May 2010 23:45:06 GMT) Full text and rfc822 format available.

Message #22 received at 580372@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>, 580372@bugs.debian.org
Subject: Re: Bug#580372: libbsd0: Makefile needs a small fix?
Date: Sun, 16 May 2010 01:42:35 +0200
On Mon, 2010-05-10 at 10:59:25 +0200, Cristian Ionescu-Idbohrn wrote:
> And when you're at it, I dare to have one more wish :)
> 
> I'm cross-building libbsd for an embedded system, and I need the
> symlink to _not_ point to the host installed lib, but to the
> cross-built one (inside the installed directory tree).  I hacked the
> Makefile to do it:
> 
> -       ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)$(usrlibdir)/$(LIB_SHARED_SO)
> +       ln -sf ../..$(libdir)/$(LIB_SHARED) $(DESTDIR)$(usrlibdir)/$(LIB_SHARED_SO)
> 
> but I'm convinced there's a better (although more intricate) way to do
> it.

The problem with this patch is that it assumes the relationship
between libdir and usrlibdir is fixed and there's always going to be
two directories below.

The question though, is why do you need this at all? I assume you are
placing the files on a different path from the intended on the target?
This is problematic, and you'll probably find that all other packages
which have the shared library in /lib but the .so symlink in /usr/lib
(as it should be) fail in your case.

regards,
guillem




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#580372; Package libbsd0. (Sun, 16 May 2010 13:21:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sun, 16 May 2010 13:21:06 GMT) Full text and rfc822 format available.

Message #27 received at 580372@bugs.debian.org (full text, mbox):

From: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
To: 580372@bugs.debian.org
Cc: Guillem Jover <guillem@debian.org>
Subject: Re: Bug#580372: libbsd0: Makefile needs a small fix?
Date: Sun, 16 May 2010 15:17:51 +0200 (CEST)
[Message part 1 (text/plain, inline)]
On Sun, 16 May 2010, Guillem Jover wrote:

> On Mon, 2010-05-10 at 10:59:25 +0200, Cristian Ionescu-Idbohrn wrote:
> > And when you're at it, I dare to have one more wish :)
> >
> > I'm cross-building libbsd for an embedded system, and I need the
> > symlink to _not_ point to the host installed lib, but to the
> > cross-built one (inside the installed directory tree).  I hacked the
> > Makefile to do it:
> >
> > -       ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)$(usrlibdir)/$(LIB_SHARED_SO)
> > +       ln -sf ../..$(libdir)/$(LIB_SHARED) $(DESTDIR)$(usrlibdir)/$(LIB_SHARED_SO)
> >
> > but I'm convinced there's a better (although more intricate) way to do
> > it.
>
> The problem with this patch is that it assumes the relationship
> between libdir and usrlibdir is fixed and there's always going to be
> two directories below.

Yes.  As I wrote, it's a hack.

> The question though, is why do you need this at all?

Yes.

> I assume you are placing the files on a different path from the intended
> on the target?

Yes.

> This is problematic, and you'll probably find that all other packages
> which have the shared library in /lib but the .so symlink in /usr/lib
> (as it should be) fail in your case.

My problem is this snippet in the upstream Makefile:

ifeq ($(libdir),$(usrlibdir))
	# If both dirs are the same, do a relative symlink.
	ln -sf $(LIB_SHARED) $(DESTDIR)$(usrlibdir)/$(LIB_SHARED_SO)
else
	# Otherwise, do an absolute one.
	ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)$(usrlibdir)/$(LIB_SHARED_SO)
endif

Specifically, the absolute link.
What I have in mind is attached.
That will create (in debian/tmp/usr/lib) a relative symlink that looks
like this:

	libbsd.so -> ../../lib/libbsd.so.0.2.0

not assuming a relationship between libdir and usrlibdir, using a new
script: lib-link-path.sh.

What do you think?


Cheers,

-- 
Cristian
[libbsd-0.2.0cii0.diff (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#580372; Package libbsd0. (Sun, 16 May 2010 14:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sun, 16 May 2010 14:09:03 GMT) Full text and rfc822 format available.

Message #32 received at 580372@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>, 580372@bugs.debian.org
Subject: Re: Bug#580372: libbsd0: Makefile needs a small fix?
Date: Sun, 16 May 2010 13:47:16 +0000 (UTC)
Cristian Ionescu-Idbohrn dixit:

>What I have in mind is attached.

Two comments:

* The changes to the comments in libbsd-0.2.0.cii0/Makefile are… weird,
  especially in the ifeq case.

* Do not use $(shell ./foo.sh), use $(shell sh foo.sh) instead, which
  does not rely on the +x attribute (bad thing) and possibly saves
  one invocation.

bye,
//mirabilos
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>:
Bug#580372; Package libbsd0. (Sun, 16 May 2010 15:06:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>:
Extra info received and forwarded to list. Copy sent to Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>. (Sun, 16 May 2010 15:06:05 GMT) Full text and rfc822 format available.

Message #37 received at 580372@bugs.debian.org (full text, mbox):

From: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
To: 580372@bugs.debian.org
Cc: Thorsten Glaser <tg@mirbsd.de>
Subject: Re: Bug#580372: libbsd0: Makefile needs a small fix?
Date: Sun, 16 May 2010 17:03:14 +0200 (CEST)
On Sun, 16 May 2010, Thorsten Glaser wrote:

> Cristian Ionescu-Idbohrn dixit:
>
> >What I have in mind is attached.
>
> Two comments:
>
> * The changes to the comments in libbsd-0.2.0.cii0/Makefile are… weird,e
>   especially in the ifeq case.

Could you please be more specific?

> * Do not use $(shell ./foo.sh), use $(shell sh foo.sh) instead, which
>   does not rely on the +x attribute (bad thing) and possibly saves
>   one invocation.

I just kept the same style as used at the top of that Makefile:

	VERSION := $(shell ./get-version)


-- 
Cristian




Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Tue, 29 May 2012 07:06:07 GMT) Full text and rfc822 format available.

Notification sent to Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>:
Bug acknowledged by developer. (Tue, 29 May 2012 07:06:07 GMT) Full text and rfc822 format available.

Message #42 received at 580372-close@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: 580372-close@bugs.debian.org
Subject: Bug#580372: fixed in libbsd 0.4.0-1
Date: Tue, 29 May 2012 07:03:33 +0000
Source: libbsd
Source-Version: 0.4.0-1

We believe that the bug you reported is fixed in the latest version of
libbsd, which is due to be installed in the Debian FTP archive:

libbsd-dev_0.4.0-1_amd64.deb
  to main/libb/libbsd/libbsd-dev_0.4.0-1_amd64.deb
libbsd0-dbg_0.4.0-1_amd64.deb
  to main/libb/libbsd/libbsd0-dbg_0.4.0-1_amd64.deb
libbsd0-udeb_0.4.0-1_amd64.udeb
  to main/libb/libbsd/libbsd0-udeb_0.4.0-1_amd64.udeb
libbsd0_0.4.0-1_amd64.deb
  to main/libb/libbsd/libbsd0_0.4.0-1_amd64.deb
libbsd_0.4.0-1.debian.tar.gz
  to main/libb/libbsd/libbsd_0.4.0-1.debian.tar.gz
libbsd_0.4.0-1.dsc
  to main/libb/libbsd/libbsd_0.4.0-1.dsc
libbsd_0.4.0.orig.tar.gz
  to main/libb/libbsd/libbsd_0.4.0.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 580372@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated libbsd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 29 May 2012 08:11:13 +0200
Source: libbsd
Binary: libbsd-dev libbsd0 libbsd0-udeb libbsd0-dbg
Architecture: source amd64
Version: 0.4.0-1
Distribution: unstable
Urgency: low
Maintainer: Debian GNU/kFreeBSD <debian-bsd@lists.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 libbsd-dev - utility functions from BSD systems - development files
 libbsd0    - utility functions from BSD systems - shared library
 libbsd0-dbg - utility functions from BSD systems - debugging symbols
 libbsd0-udeb - utility functions from BSD systems - shared library (udeb)
Closes: 580372 630907 634955 635377 635379 640895 657772 665997 668705
Changes: 
 libbsd (0.4.0-1) unstable; urgency=low
 .
   * New upstream release. (Closes: #668705)
     - Autoconfiscated, supports cross-building natively. (Closes: #665997)
     - Provide endian encoding/decoding inline functions. (Closes: #635377)
     - Provide expand_number(). (Closes: #635379)
     - Ship <nlist.h> under /usr/include/bsd/. (Closes: #634955, #657772)
     - Ship <libutil.h> under /usr/include/bsd/. (Closes: #640895)
     - Fix header protections when using the overlay. (Closes: #630907)
     - Fix .so symlinks to be relative even when the .so.N shared library
       is on a different directory. (Closes: #580372)
     - Remove all deprecated headers and inclusions.
   * Avoid leaving the system w/o an <nlist.h> previously owned by either
     libelfg0-dev or libelf-dev when upgrading from old libsd-dev versions
     which used to Replace them, by restoring <nlist.h> from <bsd/nlist.h>.
Checksums-Sha1: 
 335e03cdd8471cefedcd5b8551447564e1ce7728 1469 libbsd_0.4.0-1.dsc
 87290f6ba92f773a3bfd7221f6ab561cbf88eba6 441567 libbsd_0.4.0.orig.tar.gz
 08a54bb6ee11cf9f281747372c702d4277b4766f 8974 libbsd_0.4.0-1.debian.tar.gz
 8a18008a755a0d61e79f44b61c1e6a7c4e45dc68 134520 libbsd-dev_0.4.0-1_amd64.deb
 0717d525cd186afcc2563bb812e66fbe144fbc9d 54678 libbsd0_0.4.0-1_amd64.deb
 42185c514e7e4814d8b2beae3b7859e51cd5b5a6 18826 libbsd0-udeb_0.4.0-1_amd64.udeb
 6616be60e5bb90c31eb60bd8b6fbc4fe4a64ec96 36102 libbsd0-dbg_0.4.0-1_amd64.deb
Checksums-Sha256: 
 3060d7bd2c1b2c28a515872b2a63c6959b068a3657a15cb87d35a6459f5bb8ea 1469 libbsd_0.4.0-1.dsc
 a285d7108462b913ac49142e46bab2d7e16902cabfacf77ef1101233f472fcb7 441567 libbsd_0.4.0.orig.tar.gz
 4b9f389afa224f4c6634a1e6feb9716b957ca3818e217ecbfca6781d03f77acc 8974 libbsd_0.4.0-1.debian.tar.gz
 66d637feba28c744bf8aded7138b2ea473d9ea385ef31471a5ed796cda1146c1 134520 libbsd-dev_0.4.0-1_amd64.deb
 1e445894035a2de5c3650ef93fcd1eba18f486045117f137ac871cda037f1e72 54678 libbsd0_0.4.0-1_amd64.deb
 91232c55f2ca3921b898803606141e977baaa500c563fa3210bbe8a17bd50c0a 18826 libbsd0-udeb_0.4.0-1_amd64.udeb
 d8420751912307f5361e0be3f13da79f8abca365a3ed86c9a87f93467f343520 36102 libbsd0-dbg_0.4.0-1_amd64.deb
Files: 
 bfff6f2dcb6a6ec722a046df5b90b278 1469 libs optional libbsd_0.4.0-1.dsc
 e61dee73c9e5bd5e6e6f281ac8fae325 441567 libs optional libbsd_0.4.0.orig.tar.gz
 523b6bb337c40ce791c2cef9ac8b79af 8974 libs optional libbsd_0.4.0-1.debian.tar.gz
 2b5991b6ee51a59cde43f7b69d0734d1 134520 libdevel optional libbsd-dev_0.4.0-1_amd64.deb
 67fd550c835a8c468d6d721608a6eea4 54678 libs optional libbsd0_0.4.0-1_amd64.deb
 7249bf90659fac25035a34a2fa3de8dc 18826 debian-installer optional libbsd0-udeb_0.4.0-1_amd64.udeb
 dc694b858361789ddcf256e8122ddedf 36102 debug extra libbsd0-dbg_0.4.0-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk/EcQ8ACgkQuW9ciZ2SjJttUACg3FmtdIhPyxqYtKIEWZZSsoyO
/WEAn2Rt10PLX//4vh/usVpmqCTaTqqx
=bwUO
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 06 Jul 2012 07:49:20 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 06:31:30 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.