Gentoo Archives: gentoo-proxy-maint

From: "Michał Górny" <mgorny@g.o>
To: "Haelwenn (lanodan) Monnier" <contact@×××××××××.me>, gentoo-proxy-maint@l.g.o
Subject: Re: [gentoo-proxy-maint] [PATCH v2 1/2] app-shells/mksh: USE=static now uses the system libc
Date: Wed, 23 Oct 2019 18:23:58
Message-Id: d79b76232417c57e88d847f9b11c94c7b97c78d1.camel@gentoo.org
In Reply to: [gentoo-proxy-maint] [PATCH v2 1/2] app-shells/mksh: USE=static now uses the system libc by "Haelwenn (lanodan) Monnier"
1 On Tue, 2019-10-22 at 19:02 +0200, Haelwenn (lanodan) Monnier wrote:
2 > Which means that glibc needs to be masked as it's static-linking is
3 > broken.
4 >
5 > I considered dietlibc as a replacement to klibc but:
6 > - dietlibc is maintained-needed too
7 > - it could be a elibc_glibc? in DEPEND but this would probably be a
8 > noblah USE flag
9 > - it would mean that arches where mksh is believed to work and some of
10 > our libc do but not dietlibc or klibc (like alpha with bug #487672)
11 > would be prevented from USE=static
12 >
13 > Closes: https://bugs.gentoo.org/653388
14 > Signed-off-by: Haelwenn (lanodan) Monnier <contact@×××××××××.me>
15 > ---
16 > app-shells/mksh/mksh-57-r2.ebuild | 52 +++++++++++++++++++++++
17 > app-shells/mksh/mksh-9999.ebuild | 12 +++---
18 > profiles/base/package.use.mask | 4 ++
19 > profiles/features/musl/package.use.mask | 3 ++
20 > profiles/features/uclibc/package.use.mask | 3 ++
21 > 5 files changed, 68 insertions(+), 6 deletions(-)
22 > create mode 100644 app-shells/mksh/mksh-57-r2.ebuild
23 >
24 > diff --git a/app-shells/mksh/mksh-57-r2.ebuild b/app-shells/mksh/mksh-57-r2.ebuild
25 > new file mode 100644
26 > index 00000000000..ae3367f2066
27 > --- /dev/null
28 > +++ b/app-shells/mksh/mksh-57-r2.ebuild
29 > @@ -0,0 +1,52 @@
30 > +# Copyright 1999-2019 Gentoo Authors
31 > +# Distributed under the terms of the GNU General Public License v2
32 > +
33 > +EAPI=7
34 > +
35 > +inherit toolchain-funcs
36 > +
37 > +if [[ $PV = 9999 ]]; then
38 > + inherit cvs
39 > + ECVS_SERVER="anoncvs.mirbsd.org:/cvs"
40 > + ECVS_MODULE="mksh"
41 > + ECVS_USER="_anoncvs"
42 > + ECVS_AUTH="ext"
43 > + KEYWORDS=""
44 > +else
45 > + SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz"
46 > + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
47 > +fi
48 > +
49 > +DESCRIPTION="MirBSD Korn Shell"
50 > +HOMEPAGE="http://mirbsd.de/mksh"
51 > +
52 > +LICENSE="BSD"
53 > +SLOT="0"
54 > +IUSE="static test"
55 > +
56 > +DEPEND="
57 > + test? (
58 > + dev-lang/perl
59 > + sys-apps/ed
60 > + )
61 > +"
62 > +
63 > +S="${WORKDIR}/${PN}"
64 > +
65 > +src_compile() {
66 > + tc-export CC
67 > + use static && export LDSTATIC="-static"
68 > + export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\""
69 > + sh Build.sh -r || die
70 > +}
71 > +
72 > +src_install() {
73 > + into /
74 > + dobin mksh
75 > + doman mksh.1
76 > + dodoc dot.mkshrc
77 > +}
78 > +
79 > +src_test() {
80 > + sh test.sh -v || die
81 > +}
82 > diff --git a/app-shells/mksh/mksh-9999.ebuild b/app-shells/mksh/mksh-9999.ebuild
83 > index 3aa638fe245..ae3367f2066 100644
84 > --- a/app-shells/mksh/mksh-9999.ebuild
85 > +++ b/app-shells/mksh/mksh-9999.ebuild
86 > @@ -14,28 +14,28 @@ if [[ $PV = 9999 ]]; then
87 > KEYWORDS=""
88 > else
89 > SRC_URI="http://www.mirbsd.org/MirOS/dist/mir/mksh/${PN}-R${PV}.tgz"
90 > - KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
91 > + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
92 > fi
93 >
94 > DESCRIPTION="MirBSD Korn Shell"
95 > HOMEPAGE="http://mirbsd.de/mksh"
96 > +
97 > LICENSE="BSD"
98 > SLOT="0"
99 > IUSE="static test"
100 > -RDEPEND="static? ( dev-libs/klibc )"
101 > +
102 > DEPEND="
103 > - ${RDEPEND}
104 > test? (
105 > dev-lang/perl
106 > sys-apps/ed
107 > )
108 > "
109 > +
110 > S="${WORKDIR}/${PN}"
111 >
112 > src_compile() {
113 > tc-export CC
114 > - # we want to build static with klibc
115 > - if use static; then export CC="/usr/bin/klcc"; export LDSTATIC="-static"; fi
116 > + use static && export LDSTATIC="-static"
117 > export CPPFLAGS="${CPPFLAGS} -DMKSH_DEFAULT_PROFILEDIR=\\\"${EPREFIX}/etc\\\""
118 > sh Build.sh -r || die
119 > }
120 > @@ -48,5 +48,5 @@ src_install() {
121 > }
122 >
123 > src_test() {
124 > - ./test.sh -v || die
125 > + sh test.sh -v || die
126 > }
127 > diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
128 > index 11e10e8cf56..6d573a628c2 100644
129 > --- a/profiles/base/package.use.mask
130 > +++ b/profiles/base/package.use.mask
131 > @@ -7,6 +7,10 @@
132 > # This file is only for generic masks. For arch-specific masks (i.e.
133 > # mask everywhere, unmask on arch/*) use arch/base.
134 >
135 > +# Haelwenn (lanodan) Monnier <contact@×××××××××.me> (2019-09-19)
136 > +# broken static-linking in glibc and maybe others
137 > +>app-shells/mksh-57-r1 static
138 > +
139 > # Michał Górny <mgorny@g.o> (2019-10-05)
140 > # net-libs/openslp is being removed.
141 > net-nds/openldap slp
142 > diff --git a/profiles/features/musl/package.use.mask b/profiles/features/musl/package.use.mask
143 > index 28e05a4e490..42fe7d31b2c 100644
144 > --- a/profiles/features/musl/package.use.mask
145 > +++ b/profiles/features/musl/package.use.mask
146 > @@ -16,3 +16,6 @@ sys-fs/e2fsprogs nls
147 > # as a fail-only stub in musl. breaks horribly if enabled.
148 > # bash: xmalloc: locale.c:81: cannot allocate 18 bytes (0 bytes allocated)
149 > app-shells/bash mem-scramble
150 > +
151 > +# static linking works with musl
152 > +app-shells/mksh -static
153 > diff --git a/profiles/features/uclibc/package.use.mask b/profiles/features/uclibc/package.use.mask
154 > index eb7b5dc0216..b00ae69a84a 100644
155 > --- a/profiles/features/uclibc/package.use.mask
156 > +++ b/profiles/features/uclibc/package.use.mask
157 > @@ -22,3 +22,6 @@ dev-util/geany-plugins gtkspell
158 > # 'append-libs', but xfsdump's build system doesn't honor $LIBS.
159 > # So this is the best way for now. See 570548.
160 > sys-fs/xfsdump nls
161 > +
162 > +# static linking works with uClibc
163 > +app-shells/mksh -static
164
165 The tests fail for me. Or rather, don't happen at all:
166
167 >>> Test phase: app-shells/mksh-57-r2
168 * Testing regular mksh.
169 * ERROR: app-shells/mksh-57-r2::gentoo failed (test phase):
170 * (no error message)
171 *
172 * Call stack:
173 * ebuild.sh, line 125: Called src_test
174 * environment, line 1126: Called die
175 * The specific snippet of code:
176 * sh test.sh -v || die;
177
178 Also:
179
180 app-shells/mksh
181 HttpsUrlAvailable: version 57-r2: HTTPS url available: http://mirbsd.de/mksh -> https://www.mirbsd.org/mksh.htm
182 HttpsUrlAvailable: version 57-r2: HTTPS url available: http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R57.tgz -> https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R57.tgz
183 MissingTestRestrict: version 57-r2: missing RESTRICT="!test? ( test )" with IUSE=test
184 HttpsUrlAvailable: version 9999: HTTPS url available: http://mirbsd.de/mksh -> https://www.mirbsd.org/mksh.htm
185 MissingTestRestrict: version 9999: missing RESTRICT="!test? ( test )" with IUSE=test
186
187
188 --
189 Best regards,
190 Michał Górny

Attachments

File name MIME type
app-shells:mksh-57-r2:20191023-182116.log text/x-log
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-proxy-maint] [PATCH v3 1/2] app-shells/mksh: USE=static now uses the system libc "Haelwenn (lanodan) Monnier" <contact@×××××××××.me>