diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-09-03 01:26:48 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-09-05 22:49:35 -0700 |
commit | aca683fb18c3a62874e6687e36fb4c35a25d0615 (patch) | |
tree | 408a83f10abce10362b1ea7291e5984e56beb754 | |
parent | c5f7b7eb69df7b710461e97aab6c443b567fb995 (diff) | |
download | meta-openembedded-aca683fb18c3a62874e6687e36fb4c35a25d0615.tar.gz |
augeas: Check for __GLIBC__ to use gnu extention for strerror_r
Merge .bb and .inc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 67 insertions, 34 deletions
diff --git a/meta-oe/recipes-support/augeas/augeas.inc b/meta-oe/recipes-support/augeas/augeas.inc deleted file mode 100644 index d46f3888bd..0000000000 --- a/meta-oe/recipes-support/augeas/augeas.inc +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | SUMMARY = "Augeas configuration API" | ||
2 | HOMEPAGE = "http://augeas.net/" | ||
3 | BUGTRACKER = "https://fedorahosted.org/augeas/report/1" | ||
4 | |||
5 | LICENSE = "LGPL-2.1-or-later" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" | ||
7 | |||
8 | SRC_URI = "http://download.augeas.net/${BP}.tar.gz \ | ||
9 | file://sepbuildfix.patch \ | ||
10 | " | ||
11 | |||
12 | DEPENDS = "readline libxml2" | ||
13 | |||
14 | inherit autotools pkgconfig | ||
15 | |||
16 | PACKAGES =+ "${PN}-lenses lib${BPN}" | ||
17 | |||
18 | FILES:${PN}-lenses = "${datadir}/augeas/lenses" | ||
19 | FILES:lib${BPN} = "${libdir}/lib*${SOLIBS}" | ||
20 | |||
21 | RDEPENDS:lib${BPN} += "${PN}-lenses" | ||
22 | RRECOMMENDS:lib${BPN} += "${PN}" | ||
23 | |||
24 | LEAD_SONAME = "libaugeas.so" | ||
25 | |||
26 | do_install:append() { | ||
27 | rm -fr ${D}${datadir}/vim | ||
28 | } | ||
29 | |||
30 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" | ||
31 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | ||
32 | |||
33 | EXTRA_AUTORECONF += "-I ${S}/gnulib/m4" | ||
diff --git a/meta-oe/recipes-support/augeas/augeas/0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch b/meta-oe/recipes-support/augeas/augeas/0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch new file mode 100644 index 0000000000..9424be2aa6 --- /dev/null +++ b/meta-oe/recipes-support/augeas/augeas/0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From e5ccf769c2dc7283b56a597fffdb5dc1558e3ce8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 3 Sep 2022 01:23:28 -0700 | ||
4 | Subject: [PATCH] src/internal: Use __GLIBC__ to check for GNU extention | ||
5 | implementation | ||
6 | |||
7 | __USE_GNU is defined by _GNU_SOURCE and configure explicitly sets this | ||
8 | macro and it does have meaning on musl too, where it may have some level | ||
9 | of GNU compatibility but strerror_r is not one of them. Therefore we | ||
10 | have to check for libc implementation for this to be sure. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | src/internal.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/internal.c b/src/internal.c | ||
20 | index ef83b71..fb326fa 100644 | ||
21 | --- a/src/internal.c | ||
22 | +++ b/src/internal.c | ||
23 | @@ -431,7 +431,7 @@ char *cleanpath(char *path) { | ||
24 | |||
25 | const char *xstrerror(int errnum, char *buf, size_t len) { | ||
26 | #ifdef HAVE_STRERROR_R | ||
27 | -# ifdef __USE_GNU | ||
28 | +# ifdef __GLIBC__ | ||
29 | /* Annoying linux specific API contract */ | ||
30 | return strerror_r(errnum, buf, len); | ||
31 | # else | ||
32 | -- | ||
33 | 2.37.3 | ||
34 | |||
diff --git a/meta-oe/recipes-support/augeas/augeas_1.12.0.bb b/meta-oe/recipes-support/augeas/augeas_1.12.0.bb index d32c4691d2..2c6d4cdc88 100644 --- a/meta-oe/recipes-support/augeas/augeas_1.12.0.bb +++ b/meta-oe/recipes-support/augeas/augeas_1.12.0.bb | |||
@@ -1,4 +1,36 @@ | |||
1 | require augeas.inc | 1 | SUMMARY = "Augeas configuration API" |
2 | HOMEPAGE = "http://augeas.net/" | ||
3 | BUGTRACKER = "https://fedorahosted.org/augeas/report/1" | ||
2 | 4 | ||
5 | LICENSE = "LGPL-2.1-or-later" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" | ||
7 | |||
8 | SRC_URI = "http://download.augeas.net/${BP}.tar.gz \ | ||
9 | file://sepbuildfix.patch \ | ||
10 | file://0001-src-internal-Use-__GLIBC__-to-check-for-GNU-extentio.patch \ | ||
11 | " | ||
3 | SRC_URI[md5sum] = "74f1c7b8550f4e728486091f6b907175" | 12 | SRC_URI[md5sum] = "74f1c7b8550f4e728486091f6b907175" |
4 | SRC_URI[sha256sum] = "321942c9cc32185e2e9cb72d0a70eea106635b50269075aca6714e3ec282cb87" | 13 | SRC_URI[sha256sum] = "321942c9cc32185e2e9cb72d0a70eea106635b50269075aca6714e3ec282cb87" |
14 | |||
15 | DEPENDS = "readline libxml2" | ||
16 | |||
17 | inherit autotools pkgconfig | ||
18 | |||
19 | PACKAGES =+ "${PN}-lenses lib${BPN}" | ||
20 | |||
21 | FILES:${PN}-lenses = "${datadir}/augeas/lenses" | ||
22 | FILES:lib${BPN} = "${libdir}/lib*${SOLIBS}" | ||
23 | |||
24 | RDEPENDS:lib${BPN} += "${PN}-lenses" | ||
25 | RRECOMMENDS:lib${BPN} += "${PN}" | ||
26 | |||
27 | LEAD_SONAME = "libaugeas.so" | ||
28 | |||
29 | do_install:append() { | ||
30 | rm -fr ${D}${datadir}/vim | ||
31 | } | ||
32 | |||
33 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}" | ||
34 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | ||
35 | |||
36 | EXTRA_AUTORECONF += "-I ${S}/gnulib/m4" | ||