diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-05-08 23:39:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-05-08 23:39:55 +0100 |
commit | 2c359e29620429f94a60fc1e832048e54ee41eb5 (patch) | |
tree | 3a24152899725be0796179577e84caf957a80ce3 /x11-wm/i3 | |
parent | d6a3ca89e16356791af128f18ca5d5aeaf1323e0 (diff) |
gentoo auto-resync : 08:05:2023 - 23:39:55
Diffstat (limited to 'x11-wm/i3')
-rw-r--r-- | x11-wm/i3/Manifest | 1 | ||||
-rw-r--r-- | x11-wm/i3/files/i3-4.16-musl-GLOB_TILDE.patch | 86 |
2 files changed, 0 insertions, 87 deletions
diff --git a/x11-wm/i3/Manifest b/x11-wm/i3/Manifest index 7be474ba03f8..d135167d5a84 100644 --- a/x11-wm/i3/Manifest +++ b/x11-wm/i3/Manifest @@ -1,4 +1,3 @@ -AUX i3-4.16-musl-GLOB_TILDE.patch 2783 BLAKE2B 9dea47af64b78a77006d3aa641273aa7a77846d4425e1da17424528445450112ab275cdf7098ba8c2a76f1b08561b1d1a852cb9fd4ee4c61e53832ca702ad55d SHA512 fdff65255e7c9b30eefdbf032e04ba568d5b75a5b7dfc5fce1aecaac0f0d376b6bb4f87338e1eaf5f20b1c5882ebfc7349f8ab43c804349b5f5c626f9fc1d340 DIST i3-4.22.tar.xz 1349276 BLAKE2B fa179f445ba4286bfeec98dc7a2e1dfad14bda6874e84878a48ee5890ed4cf3a90fc542e8e14aedaaba3abebc8d280284a3b00e838da70a783064a4bd271ca41 SHA512 4e4536fb4108e92a1c918b5869232c0f7eb0feca2d3a49ba87250b970df0614cfe256d1e41fbd825a81c43b82898651e5d3fc11ca8101978916754dfa885266a EBUILD i3-4.22.ebuild 1916 BLAKE2B 97f461a7efa127ae9626c98ac973653d49ba78ae671e8467f6c6688b0770ba2376eb5639e2b76f1c197ecb236aa1270d0841dc991b6731208b5e4e24eab5616e SHA512 77dce2ae4c13add87198f854654c9700a901d594df6079c04e86ae1ff86bcfa18589a6d34c8927e78babc5005b9010f1992e1f20bafbd4ea1aa21290b26f8c0a EBUILD i3-9999.ebuild 1910 BLAKE2B 7b066fe5cc374d9419f88703690de0b50b6a0acf485efe897aad943d2fb0c99d2f2672a4379390bd9ff5bb41445b5b03efa8ff4eac1600af632647468ef7c2a9 SHA512 75d8425ce90a13c192c14e92e7ad04ded387318d0b3d7b5d3a63bb5b4466def25e3c8a042e0405267c27ea85be1c399a1ee6f5082b001a8c15700ac0f3b8b6a6 diff --git a/x11-wm/i3/files/i3-4.16-musl-GLOB_TILDE.patch b/x11-wm/i3/files/i3-4.16-musl-GLOB_TILDE.patch deleted file mode 100644 index 1e67ec2a3c4f..000000000000 --- a/x11-wm/i3/files/i3-4.16-musl-GLOB_TILDE.patch +++ /dev/null @@ -1,86 +0,0 @@ -From: Natanael Copa <ncopa@alpinelinux.org> -Patch-Source: https://git.alpinelinux.org/cgit/aports/tree/community/i3wm/musl.patch -Project-Bug-URL: https://github.com/i3/i3/issues/1859 -Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=609306 - -Musl doesn't implement GLOB_TILDE, which is used by i3 when expanding paths. - -This patch replaces usage of GLOB_TILDE in glob() by replacing tilde -with the content of $HOME - if set - manually. - -As mentioned in the i3 bugtracker this is an issue that should be solved by musl. - -A patch has been sent to musl upstream, but it hasn't been merged yet: -http://www.openwall.com/lists/musl/2017/01/17/1 ---- ---- a/i3bar/src/main.c -+++ b/i3bar/src/main.c -@@ -48,14 +48,20 @@ void debuglog(char *fmt, ...) { - * - */ - static char *expand_path(char *path) { -- static glob_t globbuf; -- if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0) { -- ELOG("glob() failed\n"); -- exit(EXIT_FAILURE); -+ char *home, *expanded; -+ -+ if (strncmp(path, "~/", 2) == 0) { -+ home = getenv("HOME"); -+ if (home != NULL) { -+ /* new length: sum - 1 (omit '~') + 1 (for '\0') */ -+ expanded = scalloc(strlen(home)+strlen(path), 1); -+ strcpy(expanded, home); -+ strcat(expanded, path+1); -+ return expanded; -+ } - } -- char *result = sstrdup(globbuf.gl_pathc > 0 ? globbuf.gl_pathv[0] : path); -- globfree(&globbuf); -- return result; -+ -+ return sstrdup(path); - } - - void print_usage(char *elf_name) { ---- a/libi3/resolve_tilde.c -+++ b/libi3/resolve_tilde.c -@@ -19,28 +19,18 @@ - * - */ - char *resolve_tilde(const char *path) { -- static glob_t globbuf; -- char *head, *tail, *result; -+ char *home, *expanded; - -- tail = strchr(path, '/'); -- head = sstrndup(path, tail ? (size_t)(tail - path) : strlen(path)); -- -- int res = glob(head, GLOB_TILDE, NULL, &globbuf); -- free(head); -- /* no match, or many wildcard matches are bad */ -- if (res == GLOB_NOMATCH || globbuf.gl_pathc != 1) -- result = sstrdup(path); -- else if (res != 0) { -- err(EXIT_FAILURE, "glob() failed"); -- } else { -- head = globbuf.gl_pathv[0]; -- result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1, 1); -- strcpy(result, head); -- if (tail) { -- strcat(result, tail); -+ if (strncmp(path, "~/", 2) == 0) { -+ home = getenv("HOME"); -+ if (home != NULL) { -+ /* new length: sum - 1 (omit '~') + 1 (for '\0') */ -+ expanded = scalloc(strlen(home)+strlen(path), 1); -+ strcpy(expanded, home); -+ strcat(expanded, path+1); -+ return expanded; - } - } -- globfree(&globbuf); - -- return result; -+ return sstrdup(path); - } |