FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 06-04-2011, 07:41 AM
Guillem Jover
 
Default Portability improvements with libbsd 0.3.0

Hi!

One of the main motivations when creating the libbsd library was to
ease porting source code with strong BSD origins by needing to patch
them less, and to reduce code duplication in other projects. So if
there are functions, macros or declarations commonly found on the BSDs
that your packages need, I'd gladly consider adding them in libbsd
upstream so that the patch delta in those packages can be reduced (bug
reports in Debian or upstream would be fine). The upstream project
can be found at <http://libbsd.freedesktop.org>.


With this particular release (0.3.0) there's now support to
transparently overlay the BSD portability layer on top of the system
one, so one needs to perform even less patching to the code. To do so
a new pkg-config libbsd-overlay file is available, which will give
the correct compilation flags. As in, for example:

pkg-config --cflags libbsd-overlay

Code that previously had to do something like this, say, to get the
prototype for strlcpy(3):

#include <string.h>
#include <bsd/string.h>

Can now be just left alone as if it was on a BSD system:

#include <string.h>


For existing packages using libbsd-dev (BCCed), several headers will
be removed in the upcoming 0.4.0 upstream release. To test that your
packages will keep building fine, you can temporarily define the
preprocessor macro LIBBSD_DISABLE_DEPRECATED, which will force the
build to fail, otherwise only warnings are emitted in some cases.

thanks,
guillem


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110604074118.GA16507@gaara.hadrons.org">http://lists.debian.org/20110604074118.GA16507@gaara.hadrons.org
 
Old 06-04-2011, 02:24 PM
Thorsten Glaser
 
Default Portability improvements with libbsd 0.3.0

Guillem Jover dixit:

> pkg-config --cflags libbsd-overlay

pkg-config is a GNU abomination and not used by BSD projects.

>For existing packages using libbsd-dev (BCCed), several headers will
>be removed in the upcoming 0.4.0 upstream release. To test that your
>packages will keep building fine, you can temporarily define the
>preprocessor macro LIBBSD_DISABLE_DEPRECATED, which will force the
>build to fail, otherwise only warnings are emitted in some cases.

Nice, that reduces the portability again… now we have to
add code to handle different versions of libbsd.

bye,
//mirabilos
--
If Harry Potter gets a splitting headache in his scar
when he’s near Tom Riddle (aka Voldemort),
does Tom get pain in the arse when Harry is near him?
-- me, wondering why it’s not Jerry Potter………


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: Pine.BSM.4.64L.1106041423340.8474@herc.mirbsd.org" >http://lists.debian.org/Pine.BSM.4.64L.1106041423340.8474@herc.mirbsd.org
 
Old 06-04-2011, 05:25 PM
"Bernhard R. Link"
 
Default Portability improvements with libbsd 0.3.0

* Thorsten Glaser <tg@mirbsd.de> [110604 16:51]:
> Guillem Jover dixit:
>
> > pkg-config --cflags libbsd-overlay
>
> pkg-config is a GNU abomination and not used by BSD projects.

pkg-config is no GNU abomination, it'a a freedesktop thing.
If it was a GNU abomination it would at least have gotten
cflags vs cppflags right.

Bernhard R. Link


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110604172511.GB31874@pcpool00.mathematik.uni-freiburg.de">http://lists.debian.org/20110604172511.GB31874@pcpool00.mathematik.uni-freiburg.de
 
Old 06-06-2011, 04:54 PM
Guillem Jover
 
Default Portability improvements with libbsd 0.3.0

On Sat, 2011-06-04 at 14:24:52 +0000, Thorsten Glaser wrote:
> Guillem Jover dixit:
> > pkg-config --cflags libbsd-overlay
>
> pkg-config is a GNU abomination and not used by BSD projects.

I disagree with the abomination part, but in any case do you have a
better alternative with equivalent functionality?

> >For existing packages using libbsd-dev (BCCed), several headers will
> >be removed in the upcoming 0.4.0 upstream release. To test that your
> >packages will keep building fine, you can temporarily define the
> >preprocessor macro LIBBSD_DISABLE_DEPRECATED, which will force the
> >build to fail, otherwise only warnings are emitted in some cases.
>
> Nice, that reduces the portability again… now we have to
> add code to handle different versions of libbsd.

There's two cases here:

One is the headers residing directly under /usr/include/, these were
causing issues, <nlist.h> conflicts with the libelf implementations,
<libutil.h> is a partial implementation and it has already made perl
pull libbsd unneedingly for its reverse build dependencies once, and
I don't think <vis.h> has caused issues, but just in case...

The other is headers that do not match the paths on the BSD systems,
so the premises here have been that if projects need to eventually
update to a newer libbsd version because they require new functions
from it, or are switching away from blundled implementations, then it
makes sense to remove deprecated headers anyway. That requiring a
newer libbsd unconditionally does not seem like such a big issue. And
finally to avoid unsuspecting developers starting to use them when
there's no need to.

I guess you are in a special place, as you seem to have integrated
libbsd directly in your upstream projects, instead of being just a
packaging patch. I've checked an seems like the only one using a
deprecated header is makefs (/usr/include/bsd/cdefs.h), if that's such
a big deal for you we can certainly talk about it, and I could delay
the removal, for example, or something else.

thanks,
guillem


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110606165440.GB32373@gaara.hadrons.org">http://lists.debian.org/20110606165440.GB32373@gaara.hadrons.org
 
Old 06-06-2011, 05:09 PM
Robert Millan
 
Default Portability improvements with libbsd 0.3.0

2011/6/6 Guillem Jover <guillem@debian.org>:
> On Sat, 2011-06-04 at 14:24:52 +0000, Thorsten Glaser wrote:
>> Guillem Jover dixit:
>> > *pkg-config --cflags libbsd-overlay
>>
>> pkg-config is a GNU abomination and not used by BSD projects.
>
> I disagree with the abomination part,

Just for completeness, I disagree with the GNU part.

--
Robert Millan


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTinpTJ-X_Me6KTGjr+4hrQbwi=mV0Q@mail.gmail.com">http://lists.debian.org/BANLkTinpTJ-X_Me6KTGjr+4hrQbwi=mV0Q@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 10:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org