1 |
commit: e266e13009ebe1786bb496bc346dd5b6a2ca947e |
2 |
Author: Oliver Freyermuth <o.freyermuth <AT> googlemail <DOT> com> |
3 |
AuthorDate: Sat Jan 28 20:43:36 2023 +0000 |
4 |
Commit: Nicolas Bock <nicolasbock <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 30 21:58:18 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e266e130 |
7 |
|
8 |
sys-cluster/charliecloud: multiple fixes |
9 |
|
10 |
- backport patch for readpath from recent glibc [1, 2] |
11 |
- drop 0.31 |
12 |
- do not compress installed examples |
13 |
|
14 |
[1] https://github.com/hpc/charliecloud/pull/1550 |
15 |
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1916968 |
16 |
|
17 |
Closes: https://github.com/gentoo/gentoo/pull/29323 |
18 |
Signed-off-by: Oliver Freyermuth <o.freyermuth <AT> googlemail.com> |
19 |
Signed-off-by: Nicolas Bock <nicolasbock <AT> gentoo.org> |
20 |
|
21 |
...oud-0.31.ebuild => charliecloud-0.31-r1.ebuild} | 9 ++++++ |
22 |
sys-cluster/charliecloud/charliecloud-9999.ebuild | 5 ++++ |
23 |
.../files/charliecloud-0.31-realpath_return.patch | 32 ++++++++++++++++++++++ |
24 |
3 files changed, 46 insertions(+) |
25 |
|
26 |
diff --git a/sys-cluster/charliecloud/charliecloud-0.31.ebuild b/sys-cluster/charliecloud/charliecloud-0.31-r1.ebuild |
27 |
similarity index 94% |
28 |
rename from sys-cluster/charliecloud/charliecloud-0.31.ebuild |
29 |
rename to sys-cluster/charliecloud/charliecloud-0.31-r1.ebuild |
30 |
index db6df71719a9..2efd4a83f907 100644 |
31 |
--- a/sys-cluster/charliecloud/charliecloud-0.31.ebuild |
32 |
+++ b/sys-cluster/charliecloud/charliecloud-0.31-r1.ebuild |
33 |
@@ -48,6 +48,10 @@ DEPEND=" |
34 |
net-misc/rsync |
35 |
)" |
36 |
|
37 |
+PATCHES=( |
38 |
+ "${FILESDIR}"/${P}-realpath_return.patch |
39 |
+) |
40 |
+ |
41 |
src_prepare() { |
42 |
default |
43 |
eautoreconf |
44 |
@@ -72,6 +76,11 @@ src_configure() { |
45 |
econf "${econf_args[@]}" |
46 |
} |
47 |
|
48 |
+src_install() { |
49 |
+ docompress -x "${EPREFIX}"/usr/share/doc/"${PF}"/examples |
50 |
+ default |
51 |
+} |
52 |
+ |
53 |
pkg_postinst() { |
54 |
elog "Various builders are supported, as alternative to the internal ch-image." |
55 |
optfeature "Building with Buildah" app-containers/buildah |
56 |
|
57 |
diff --git a/sys-cluster/charliecloud/charliecloud-9999.ebuild b/sys-cluster/charliecloud/charliecloud-9999.ebuild |
58 |
index db6df71719a9..3e5a83f42d7e 100644 |
59 |
--- a/sys-cluster/charliecloud/charliecloud-9999.ebuild |
60 |
+++ b/sys-cluster/charliecloud/charliecloud-9999.ebuild |
61 |
@@ -72,6 +72,11 @@ src_configure() { |
62 |
econf "${econf_args[@]}" |
63 |
} |
64 |
|
65 |
+src_install() { |
66 |
+ docompress -x "${EPREFIX}"/usr/share/doc/"${PF}"/examples |
67 |
+ default |
68 |
+} |
69 |
+ |
70 |
pkg_postinst() { |
71 |
elog "Various builders are supported, as alternative to the internal ch-image." |
72 |
optfeature "Building with Buildah" app-containers/buildah |
73 |
|
74 |
diff --git a/sys-cluster/charliecloud/files/charliecloud-0.31-realpath_return.patch b/sys-cluster/charliecloud/files/charliecloud-0.31-realpath_return.patch |
75 |
new file mode 100644 |
76 |
index 000000000000..7b320fa9dbab |
77 |
--- /dev/null |
78 |
+++ b/sys-cluster/charliecloud/files/charliecloud-0.31-realpath_return.patch |
79 |
@@ -0,0 +1,32 @@ |
80 |
+From e6d25474fcd326ae657c08d7b49606aeabc98b51 Mon Sep 17 00:00:00 2001 |
81 |
+From: Oliver Freyermuth <o.freyermuth@××××××××××.com> |
82 |
+Date: Sat, 28 Jan 2023 21:25:09 +0100 |
83 |
+Subject: [PATCH] ch-misc: Do not check errno in realpath_ unless realpath |
84 |
+ returns NULL |
85 |
+Bug: https://github.com/hpc/charliecloud/pull/1550 |
86 |
+ |
87 |
+glibc's realpath may set errno also on success, as POSIX specifies |
88 |
+errno should only be checked after realpath if the return value is not NULL. |
89 |
+ |
90 |
+See for example: |
91 |
+ https://bugzilla.redhat.com/show_bug.cgi?id=1916968 |
92 |
+--- |
93 |
+ bin/ch_misc.c | 2 +- |
94 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
95 |
+ |
96 |
+diff --git a/bin/ch_misc.c b/bin/ch_misc.c |
97 |
+index 04ac52a..93a3339 100644 |
98 |
+--- a/bin/ch_misc.c |
99 |
++++ b/bin/ch_misc.c |
100 |
+@@ -589,7 +589,7 @@ char *realpath_(const char *path, bool fail_ok) |
101 |
+ errno = 0; |
102 |
+ pathc = realpath(path, NULL); |
103 |
+ |
104 |
+- if (errno != 0) { |
105 |
++ if (pathc == NULL && errno != 0) { |
106 |
+ if (fail_ok) { |
107 |
+ T_ (pathc = strdup(path)); |
108 |
+ } else { |
109 |
+-- |
110 |
+2.39.1 |
111 |
+ |