* [PATCH] tcp-wrappers: drop libnsl2 build dependency
@ 2024-01-03 11:59 Enrico Scholz
2024-01-04 9:47 ` [OE-core] " Alexandre Belloni
[not found] ` <17A71BE8B9FB3913.10454@lists.openembedded.org>
0 siblings, 2 replies; 3+ messages in thread
From: Enrico Scholz @ 2024-01-03 11:59 UTC (permalink / raw)
To: openembedded-core; +Cc: Enrico Scholz
From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
The only libnsl2 function which is used by tcp-wrappers is
'yp_get_default_domain()'. When USE_GETDOMAIN is set, this is
implemented as a simple wrapper around getdomainname() so that libnsl2
is not used at all.
We added a patch which does '#include <rpcsvc/ypclnt.h>' to avoid
implicit forward declaration. By conditionalizing this, the libnsl2
dependency can be dropped completely.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
...0001-Fix-implicit-function-declaration-warnings.patch | 9 +++++++--
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb | 2 --
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
index ec793ac8ffed..474703885d9b 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
@@ -20,11 +20,16 @@ diff --git a/hosts_access.c b/hosts_access.c
index 0133e5e..58697ea 100644
--- a/hosts_access.c
+++ b/hosts_access.c
-@@ -33,6 +33,7 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
+@@ -33,6 +33,12 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
#endif
#include <netinet/in.h>
#include <arpa/inet.h>
-+#include <rpcsvc/ypclnt.h>
++#ifdef USE_GETDOMAIN
++/* defined in workarounds.c */
++extern int yp_get_default_domain(char **ptr);
++#else
++# include <rpcsvc/ypclnt.h>
++#endif /* USE_GETDOMAIN */
#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index c655da1199e7..bcd1d6f7929e 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -7,8 +7,6 @@ SECTION = "console/network"
LICENSE = "BSD-1-Clause"
LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
-DEPENDS += "libnsl2"
-
PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
FILES:libwrap = "${base_libdir}/lib*${SOLIBS}"
FILES:libwrap-doc = "${mandir}/man3 ${mandir}/man5"
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] tcp-wrappers: drop libnsl2 build dependency
2024-01-03 11:59 [PATCH] tcp-wrappers: drop libnsl2 build dependency Enrico Scholz
@ 2024-01-04 9:47 ` Alexandre Belloni
[not found] ` <17A71BE8B9FB3913.10454@lists.openembedded.org>
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2024-01-04 9:47 UTC (permalink / raw)
To: enrico.scholz; +Cc: openembedded-core
Hello,
Your patch has a declared charset of 'y' which is not a thing and git am
fails with:
error: cannot convert from y to UTF-8
fatal: could not parse patch
You got the following prompt:
The following files are 8bit, but do not declare a Content-Transfer-Encoding.
something.patch
Which 8bit encoding should I declare [UTF-8]?
At that point, you pressed y but you should simply press enter. Please
resend.
On 03/01/2024 12:59:44+0100, Enrico Scholz via lists.openembedded.org wrote:
> From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
>
> The only libnsl2 function which is used by tcp-wrappers is
> 'yp_get_default_domain()'. When USE_GETDOMAIN is set, this is
> implemented as a simple wrapper around getdomainname() so that libnsl2
> is not used at all.
>
> We added a patch which does '#include <rpcsvc/ypclnt.h>' to avoid
> implicit forward declaration. By conditionalizing this, the libnsl2
> dependency can be dropped completely.
>
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
> ...0001-Fix-implicit-function-declaration-warnings.patch | 9 +++++++--
> meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb | 2 --
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
> index ec793ac8ffed..474703885d9b 100644
> --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
> +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
> @@ -20,11 +20,16 @@ diff --git a/hosts_access.c b/hosts_access.c
> index 0133e5e..58697ea 100644
> --- a/hosts_access.c
> +++ b/hosts_access.c
> -@@ -33,6 +33,7 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
> +@@ -33,6 +33,12 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
> #endif
> #include <netinet/in.h>
> #include <arpa/inet.h>
> -+#include <rpcsvc/ypclnt.h>
> ++#ifdef USE_GETDOMAIN
> ++/* defined in workarounds.c */
> ++extern int yp_get_default_domain(char **ptr);
> ++#else
> ++# include <rpcsvc/ypclnt.h>
> ++#endif /* USE_GETDOMAIN */
> #include <stdio.h>
> #include <stdlib.h>
> #include <syslog.h>
> diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
> index c655da1199e7..bcd1d6f7929e 100644
> --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
> +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
> @@ -7,8 +7,6 @@ SECTION = "console/network"
> LICENSE = "BSD-1-Clause"
> LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
>
> -DEPENDS += "libnsl2"
> -
> PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
> FILES:libwrap = "${base_libdir}/lib*${SOLIBS}"
> FILES:libwrap-doc = "${mandir}/man3 ${mandir}/man5"
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#193285): https://lists.openembedded.org/g/openembedded-core/message/193285
> Mute This Topic: https://lists.openembedded.org/mt/103500355/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] tcp-wrappers: drop libnsl2 build dependency
[not found] ` <17A71BE8B9FB3913.10454@lists.openembedded.org>
@ 2024-01-04 9:50 ` Alexandre Belloni
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2024-01-04 9:50 UTC (permalink / raw)
To: enrico.scholz, openembedded-core
Please disregard this, I meant to reply to another one ;)
On 04/01/2024 10:47:47+0100, Alexandre Belloni via lists.openembedded.org wrote:
> Hello,
>
> Your patch has a declared charset of 'y' which is not a thing and git am
> fails with:
>
> error: cannot convert from y to UTF-8
> fatal: could not parse patch
>
> You got the following prompt:
>
> The following files are 8bit, but do not declare a Content-Transfer-Encoding.
> something.patch
> Which 8bit encoding should I declare [UTF-8]?
>
> At that point, you pressed y but you should simply press enter. Please
> resend.
>
>
> On 03/01/2024 12:59:44+0100, Enrico Scholz via lists.openembedded.org wrote:
> > From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> >
> > The only libnsl2 function which is used by tcp-wrappers is
> > 'yp_get_default_domain()'. When USE_GETDOMAIN is set, this is
> > implemented as a simple wrapper around getdomainname() so that libnsl2
> > is not used at all.
> >
> > We added a patch which does '#include <rpcsvc/ypclnt.h>' to avoid
> > implicit forward declaration. By conditionalizing this, the libnsl2
> > dependency can be dropped completely.
> >
> > Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> > ---
> > ...0001-Fix-implicit-function-declaration-warnings.patch | 9 +++++++--
> > meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb | 2 --
> > 2 files changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
> > index ec793ac8ffed..474703885d9b 100644
> > --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
> > +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch
> > @@ -20,11 +20,16 @@ diff --git a/hosts_access.c b/hosts_access.c
> > index 0133e5e..58697ea 100644
> > --- a/hosts_access.c
> > +++ b/hosts_access.c
> > -@@ -33,6 +33,7 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
> > +@@ -33,6 +33,12 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
> > #endif
> > #include <netinet/in.h>
> > #include <arpa/inet.h>
> > -+#include <rpcsvc/ypclnt.h>
> > ++#ifdef USE_GETDOMAIN
> > ++/* defined in workarounds.c */
> > ++extern int yp_get_default_domain(char **ptr);
> > ++#else
> > ++# include <rpcsvc/ypclnt.h>
> > ++#endif /* USE_GETDOMAIN */
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <syslog.h>
> > diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
> > index c655da1199e7..bcd1d6f7929e 100644
> > --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
> > +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
> > @@ -7,8 +7,6 @@ SECTION = "console/network"
> > LICENSE = "BSD-1-Clause"
> > LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
> >
> > -DEPENDS += "libnsl2"
> > -
> > PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
> > FILES:libwrap = "${base_libdir}/lib*${SOLIBS}"
> > FILES:libwrap-doc = "${mandir}/man3 ${mandir}/man5"
> > --
> > 2.43.0
> >
>
> >
> >
> >
>
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#193309): https://lists.openembedded.org/g/openembedded-core/message/193309
> Mute This Topic: https://lists.openembedded.org/mt/103500355/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-04 9:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 11:59 [PATCH] tcp-wrappers: drop libnsl2 build dependency Enrico Scholz
2024-01-04 9:47 ` [OE-core] " Alexandre Belloni
[not found] ` <17A71BE8B9FB3913.10454@lists.openembedded.org>
2024-01-04 9:50 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox