diff options
| -rw-r--r-- | meta-oe/recipes-support/libconfuse/files/0001-only-apply-search-path-logic-to-relative-pathnames.patch | 48 | ||||
| -rw-r--r-- | meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb | 2 |
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libconfuse/files/0001-only-apply-search-path-logic-to-relative-pathnames.patch b/meta-oe/recipes-support/libconfuse/files/0001-only-apply-search-path-logic-to-relative-pathnames.patch new file mode 100644 index 0000000000..aa9fab86e6 --- /dev/null +++ b/meta-oe/recipes-support/libconfuse/files/0001-only-apply-search-path-logic-to-relative-pathnames.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From b684f4cc25821b6e86a58576f864e4b12dfdfecc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rasmus Villemoes <rasmus.villemoes@prevas.dk> | ||
| 3 | Date: Sat, 5 Jun 2021 22:57:51 +0200 | ||
| 4 | Subject: [PATCH] only apply search path logic to relative pathnames | ||
| 5 | |||
| 6 | Adding any directory to the search path via cfg_add_searchpath breaks | ||
| 7 | lookup of absolute paths. So change the logic in cfg_searchpath() to | ||
| 8 | ignore the search path when the given filename is absolute, and merely | ||
| 9 | check that for existence. | ||
| 10 | |||
| 11 | This is technically an ABI change, but the current behaviour is quite | ||
| 12 | unusual and unexpected. | ||
| 13 | |||
| 14 | Upstream-Status: Backport [https://github.com/libconfuse/libconfuse/pull/155] | ||
| 15 | |||
| 16 | Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> | ||
| 17 | --- | ||
| 18 | src/confuse.c | 8 ++++++++ | ||
| 19 | 1 file changed, 8 insertions(+) | ||
| 20 | |||
| 21 | diff --git a/src/confuse.c b/src/confuse.c | ||
| 22 | index 2ea0254..19b56e3 100644 | ||
| 23 | --- a/src/confuse.c | ||
| 24 | +++ b/src/confuse.c | ||
| 25 | @@ -1746,12 +1746,20 @@ DLLIMPORT char *cfg_searchpath(cfg_searchpath_t *p, const char *file) | ||
| 26 | return NULL; | ||
| 27 | } | ||
| 28 | |||
| 29 | + if (file[0] == '/') { | ||
| 30 | + fullpath = strdup(file); | ||
| 31 | + if (!fullpath) | ||
| 32 | + return NULL; | ||
| 33 | + goto check; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | if ((fullpath = cfg_searchpath(p->next, file)) != NULL) | ||
| 37 | return fullpath; | ||
| 38 | |||
| 39 | if ((fullpath = cfg_make_fullpath(p->dir, file)) == NULL) | ||
| 40 | return NULL; | ||
| 41 | |||
| 42 | +check: | ||
| 43 | #ifdef HAVE_SYS_STAT_H | ||
| 44 | err = stat((const char *)fullpath, &st); | ||
| 45 | if ((!err) && S_ISREG(st.st_mode)) | ||
| 46 | -- | ||
| 47 | 2.31.1 | ||
| 48 | |||
diff --git a/meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb b/meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb index ec6d6c7c8c..e6f28c7b69 100644 --- a/meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb +++ b/meta-oe/recipes-support/libconfuse/libconfuse_3.3.bb | |||
| @@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=42fa47330d4051cd219f7d99d023de3a" | |||
| 5 | SRC_URI = "https://github.com/libconfuse/libconfuse/releases/download/v${PV}/confuse-${PV}.tar.gz" | 5 | SRC_URI = "https://github.com/libconfuse/libconfuse/releases/download/v${PV}/confuse-${PV}.tar.gz" |
| 6 | SRC_URI[sha256sum] = "3a59ded20bc652eaa8e6261ab46f7e483bc13dad79263c15af42ecbb329707b8" | 6 | SRC_URI[sha256sum] = "3a59ded20bc652eaa8e6261ab46f7e483bc13dad79263c15af42ecbb329707b8" |
| 7 | 7 | ||
| 8 | SRC_URI += "file://0001-only-apply-search-path-logic-to-relative-pathnames.patch" | ||
| 9 | |||
| 8 | inherit autotools-brokensep pkgconfig gettext | 10 | inherit autotools-brokensep pkgconfig gettext |
| 9 | 11 | ||
| 10 | S = "${WORKDIR}/confuse-${PV}" | 12 | S = "${WORKDIR}/confuse-${PV}" |
