* [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD?
@ 2014-04-06 0:23 Joshua Kinard
2014-04-06 8:49 ` Ulrich Mueller
0 siblings, 1 reply; 7+ messages in thread
From: Joshua Kinard @ 2014-04-06 0:23 UTC (permalink / raw
To: Gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]
So I opened Bug #506046 last week to enable support of DTLS over SCTP
(Stream Control Transmission Protocol) in OpenSSL via a configure flag. But
this means in the ebuild, I have to check for the right userland SCTP
library to depend against:
# Have the sub-libs in RDEPEND with [static-libs] since, logically,
# our libssl.a depends on libz.a/etc... at runtime.
LIB_DEPEND="gmp? ( dev-libs/gmp[static-libs(+)] )
+ sctp? (
+ kernel_linux? ( net-misc/lksctp-tools[static-libs(+)] )
+ kernel_FreeBSD? ( sys-freebsd/freebsd-lib )
+ )
Right now, this check is rather limited, but down the road, if SCTP usage
increases, we'd have to duplicate this specific check more often. Doubly so
if Gentoo/OpenBSD or NetBSD support gets off the ground and a package exists
that supports SCTP, but needs the appropriate userland-lib to link against.
I think the best way to future proof against this is to add a virtual/sctp
package that picks between the appropriate userland library for SCTP
support, depending on the kernel_* USE flags. kernel_linux pulls in
net-misc/lksctp-tools and kernel_FreeBSD will simply depend on
sys-freebsd/freebsd-lib (FBSD is actually the reference implementation of SCTP).
I've attached a first draft of virtual/sctp/sctp-0.ebuild, which passes
repoman checks, but I think it needs to be made multilib-aware.
Additionally, that means lksctp-tools probably needs some multilib-magic
applied. I am not finding a solid guide on properly upgrading an ebuild to
become multilib-aware. Can one of the multilib experts check things and let
me know what is needed if people agree this is a good way to go down?
Otherwise, I'll commit the change to OpenSSL above and resolve that bug.
Thanks!,
--
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28
"The past tempts us, the present confuses us, the future frightens us. And
our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
[-- Attachment #2: sctp-0.ebuild --]
[-- Type: text/plain, Size: 627 bytes --]
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
DESCRIPTION="Virtual to select net-misc/lksctp-tools or sys-freebsd/freebsd-lib for userland SCTP lib support"
HOMEPAGE=""
SRC_URI=""
LICENSE=""
SLOT="0"
KEYWORDS="~alpha ~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
# These default enabled IUSE flags should follow defaults of sys-fs/udev.
IUSE="kernel_linux kernel_FreeBSD static-libs"
DEPEND=""
RDEPEND="|| (
kernel_linux? ( net-misc/lksctp-tools[static-libs(+)] )
kernel_FreeBSD? ( sys-freebsd/freebsd-lib )
)"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD?
2014-04-06 0:23 [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD? Joshua Kinard
@ 2014-04-06 8:49 ` Ulrich Mueller
2014-04-06 20:06 ` Joshua Kinard
0 siblings, 1 reply; 7+ messages in thread
From: Ulrich Mueller @ 2014-04-06 8:49 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
>>>>> On Sat, 05 Apr 2014, Joshua Kinard wrote:
> I've attached a first draft of virtual/sctp/sctp-0.ebuild, which
> passes repoman checks, but I think it needs to be made
> multilib-aware. Additionally, that means lksctp-tools probably needs
> some multilib-magic applied. I am not finding a solid guide on
> properly upgrading an ebuild to become multilib-aware. Can one of
> the multilib experts check things and let me know what is needed if
> people agree this is a good way to go down?
This doesn't answer your multilib question, but I believe that
kernel_* is not needed in IUSE:
> IUSE="kernel_linux kernel_FreeBSD static-libs"
KERNEL is both in USE_EXPAND and USE_EXPAND_IMPLICIT of
profiles/base/make.defaults, therefore it's implicit in EAPI 5.
I'd also omit all empty variable assignments (like HOMEPAGE=""),
they are no longer necessary.
Ulrich
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD?
2014-04-06 8:49 ` Ulrich Mueller
@ 2014-04-06 20:06 ` Joshua Kinard
2014-04-06 20:57 ` Joshua Kinard
2014-04-06 21:00 ` Ulrich Mueller
0 siblings, 2 replies; 7+ messages in thread
From: Joshua Kinard @ 2014-04-06 20:06 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]
On 04/06/2014 04:49, Ulrich Mueller wrote:
>>>>>> On Sat, 05 Apr 2014, Joshua Kinard wrote:
>
>> I've attached a first draft of virtual/sctp/sctp-0.ebuild, which
>> passes repoman checks, but I think it needs to be made
>> multilib-aware. Additionally, that means lksctp-tools probably needs
>> some multilib-magic applied. I am not finding a solid guide on
>> properly upgrading an ebuild to become multilib-aware. Can one of
>> the multilib experts check things and let me know what is needed if
>> people agree this is a good way to go down?
>
> This doesn't answer your multilib question, but I believe that
> kernel_* is not needed in IUSE:
>
>> IUSE="kernel_linux kernel_FreeBSD static-libs"
>
> KERNEL is both in USE_EXPAND and USE_EXPAND_IMPLICIT of
> profiles/base/make.defaults, therefore it's implicit in EAPI 5.
Thanks, I removed those and IUSE as well, since it's empty.
> I'd also omit all empty variable assignments (like HOMEPAGE=""),
> they are no longer necessary.
I derived this ebuild from virtual/udev's (as the leftover comment implied).
Someone might want to remove the empty vars there as well. Perhaps repoman
should check for empty vars like HOMEPAGE/SRC_URI/IUSE and flag as a warning?
--
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28
"The past tempts us, the present confuses us, the future frightens us. And
our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
[-- Attachment #2: sctp-0.ebuild --]
[-- Type: text/plain, Size: 446 bytes --]
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
DESCRIPTION="Virtual to select net-misc/lksctp-tools or sys-freebsd/freebsd-lib for userland SCTP lib support"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
RDEPEND="|| (
kernel_linux? ( net-misc/lksctp-tools )
kernel_FreeBSD? ( sys-freebsd/freebsd-lib )
)"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD?
2014-04-06 20:06 ` Joshua Kinard
@ 2014-04-06 20:57 ` Joshua Kinard
2014-04-06 21:05 ` Ulrich Mueller
2014-04-06 21:00 ` Ulrich Mueller
1 sibling, 1 reply; 7+ messages in thread
From: Joshua Kinard @ 2014-04-06 20:57 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 2160 bytes --]
On 04/06/2014 16:06, Joshua Kinard wrote:
> On 04/06/2014 04:49, Ulrich Mueller wrote:
>>>>>>> On Sat, 05 Apr 2014, Joshua Kinard wrote:
>>
>>> I've attached a first draft of virtual/sctp/sctp-0.ebuild, which
>>> passes repoman checks, but I think it needs to be made
>>> multilib-aware. Additionally, that means lksctp-tools probably needs
>>> some multilib-magic applied. I am not finding a solid guide on
>>> properly upgrading an ebuild to become multilib-aware. Can one of
>>> the multilib experts check things and let me know what is needed if
>>> people agree this is a good way to go down?
>>
>> This doesn't answer your multilib question, but I believe that
>> kernel_* is not needed in IUSE:
>>
>>> IUSE="kernel_linux kernel_FreeBSD static-libs"
>>
>> KERNEL is both in USE_EXPAND and USE_EXPAND_IMPLICIT of
>> profiles/base/make.defaults, therefore it's implicit in EAPI 5.
>
> Thanks, I removed those and IUSE as well, since it's empty.
>
>
>> I'd also omit all empty variable assignments (like HOMEPAGE=""),
>> they are no longer necessary.
>
> I derived this ebuild from virtual/udev's (as the leftover comment implied).
> Someone might want to remove the empty vars there as well. Perhaps repoman
> should check for empty vars like HOMEPAGE/SRC_URI/IUSE and flag as a warning?
>
Derp, since this is a virtual for a linkable library, set DEPEND first, then
RDEPEND to ${DEPEND}.
While FBSD is the only other official non-Linux port (I think OBSD/NBSD are
still only in Prefix?), should REQUIRED_USE be set to limit this virtual to
kernel_linux and kernel_FreeBSD?
Hmm, and further thinking, if we had a kFreeBSD variant, things would get
more interesting. Someone would probably have to abstract the SCTP lib code
out of freebsd-lib to work in that environment, since everything would be
running on top of a glibc userland. I wonder if Debian's run into that yet...
--
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28
"The past tempts us, the present confuses us, the future frightens us. And
our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
[-- Attachment #2: sctp-0.ebuild --]
[-- Type: text/plain, Size: 465 bytes --]
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
DESCRIPTION="Virtual to select net-misc/lksctp-tools or sys-freebsd/freebsd-lib for userland SCTP lib support"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
DEPEND="|| (
kernel_linux? ( net-misc/lksctp-tools )
kernel_FreeBSD? ( sys-freebsd/freebsd-lib )
)"
RDEPEND="${DEPEND}"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD?
2014-04-06 20:06 ` Joshua Kinard
2014-04-06 20:57 ` Joshua Kinard
@ 2014-04-06 21:00 ` Ulrich Mueller
1 sibling, 0 replies; 7+ messages in thread
From: Ulrich Mueller @ 2014-04-06 21:00 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 344 bytes --]
>>>>> On Sun, 06 Apr 2014, Joshua Kinard wrote:
> I derived this ebuild from virtual/udev's (as the leftover comment
> implied). Someone might want to remove the empty vars there as well.
> Perhaps repoman should check for empty vars like
> HOMEPAGE/SRC_URI/IUSE and flag as a warning?
For virtuals, this should be considered indeed.
Ulrich
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD?
2014-04-06 20:57 ` Joshua Kinard
@ 2014-04-06 21:05 ` Ulrich Mueller
2014-04-08 7:21 ` Joshua Kinard
0 siblings, 1 reply; 7+ messages in thread
From: Ulrich Mueller @ 2014-04-06 21:05 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
>>>>> On Sun, 06 Apr 2014, Joshua Kinard wrote:
> Derp, since this is a virtual for a linkable library, set DEPEND
> first, then RDEPEND to ${DEPEND}.
No, setting RDEPEND (as it was in your previous version) in the
virtual is enough.
The package depending on a virtual for a library must have it in
DEPEND, though.
Ulrich
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD?
2014-04-06 21:05 ` Ulrich Mueller
@ 2014-04-08 7:21 ` Joshua Kinard
0 siblings, 0 replies; 7+ messages in thread
From: Joshua Kinard @ 2014-04-08 7:21 UTC (permalink / raw
To: gentoo-dev
On 04/06/2014 17:05, Ulrich Mueller wrote:
>>>>>> On Sun, 06 Apr 2014, Joshua Kinard wrote:
>
>> Derp, since this is a virtual for a linkable library, set DEPEND
>> first, then RDEPEND to ${DEPEND}.
>
> No, setting RDEPEND (as it was in your previous version) in the
> virtual is enough.
>
> The package depending on a virtual for a library must have it in
> DEPEND, though.
Gotcha. Never had to create a virtual before. Doesn't seem there's any
other feedback, so I'll try to put this into the tree sometime this week and
just add the multilib stuff later on when I figure it out. Thanks for the
feedback!
--
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28
"The past tempts us, the present confuses us, the future frightens us. And
our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-08 7:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-06 0:23 [gentoo-dev] virtual/sctp to choose the right SCTP lib for Linux/FreeBSD? Joshua Kinard
2014-04-06 8:49 ` Ulrich Mueller
2014-04-06 20:06 ` Joshua Kinard
2014-04-06 20:57 ` Joshua Kinard
2014-04-06 21:05 ` Ulrich Mueller
2014-04-08 7:21 ` Joshua Kinard
2014-04-06 21:00 ` Ulrich Mueller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox