Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/syslinux/, sys-boot/syslinux/files/
Date: Thu, 07 Nov 2019 07:19:35
Message-Id: 1573111091.a1392fec2498c7ac20c7af05ce143f6a767ef6f0.mgorny@gentoo
1 commit: a1392fec2498c7ac20c7af05ce143f6a767ef6f0
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 7 07:18:11 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 7 07:18:11 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1392fec
7
8 sys-boot/syslinux: Revert "Drop old (EAPI 0)"
9
10 Removed one version too many.
11
12 Reverts: c2bee80a1c812e65f094acd3861c6a00b279f56d
13 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
14
15 sys-boot/syslinux/Manifest | 2 +
16 sys-boot/syslinux/files/syslinux-4.05-nopie.patch | 12 ++++
17 sys-boot/syslinux/syslinux-4.07.ebuild | 70 +++++++++++++++++++
18 sys-boot/syslinux/syslinux-5.10.ebuild | 82 +++++++++++++++++++++++
19 4 files changed, 166 insertions(+)
20
21 diff --git a/sys-boot/syslinux/Manifest b/sys-boot/syslinux/Manifest
22 index d67d42371b9..f247daa7748 100644
23 --- a/sys-boot/syslinux/Manifest
24 +++ b/sys-boot/syslinux/Manifest
25 @@ -1,2 +1,4 @@
26 +DIST syslinux-4.07.tar.bz2 5761877 BLAKE2B 2fe28f268f896601a045564b1e3dde618d57ebf4098d007f7e45119ad019fa88221658608f88e55d4d09cd297140427cdeaf03a40a2341d732064a0630fe92b5 SHA512 8efbd14803ec74c5ee699a754b4727e4b975c08afd4dbb39f4b7ccdb90743e4459cd4609c6f1065c7b7efaa26c9d465806254891795d363758f35a2fe5704ae5
27 +DIST syslinux-5.10.tar.xz 5315660 BLAKE2B 19d6861bb6220fe57e12d8d6118d37b197c3c771e4d2e7a51ce7db39219e3c837e6d1543d7a3927820f3a34da34ce849f9badbaf9cd83cb5ee24fd5ed7b705f2 SHA512 56422e14b4aa53ca1a5811da0582dbbb349aa52b9e78868bbedc24c67ef2420c4d0ac63fd68c7f0adc2c22606196276265d503b5b6f9d3d796d9ce42845bbdb5
28 DIST syslinux-6.03.tar.xz 6855224 BLAKE2B 9caccf8bed4e3c3e87393c9dc8f3b3d267c14469bbf8135a648ea41d8a43a4aedbf2b007c6b9a6853de8866152f5bc33e5ea85fca1db86c5f2fac88d97189b0f SHA512 dd2b2916962b9e93bc1e714182e3ca2a727a229b8afabe913050bcfdd43ee2af51ee3acf79121d8c20caf434583efaa7f3196871e0e07c04d82191323a50fe31
29 DIST syslinux-6.04-pre1.tar.xz 5283272 BLAKE2B 800e5977ed13b26a1756c33d8625e850631b642e26a86e3328196ddd998596693c3a26db0ada4c0ba78a4ba692a1cc01886b6eb693d877ddafcfb325ecdeb639 SHA512 7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98
30
31 diff --git a/sys-boot/syslinux/files/syslinux-4.05-nopie.patch b/sys-boot/syslinux/files/syslinux-4.05-nopie.patch
32 new file mode 100644
33 index 00000000000..b50b6b47689
34 --- /dev/null
35 +++ b/sys-boot/syslinux/files/syslinux-4.05-nopie.patch
36 @@ -0,0 +1,12 @@
37 +diff -ur a/mk/com32.mk b/mk/com32.mk
38 +--- a/mk/com32.mk 2011-12-09 19:28:17.000000000 +0100
39 ++++ b/mk/com32.mk 2011-12-18 18:22:11.032342645 +0100
40 +@@ -24,6 +24,8 @@
41 + GCCOPT += $(call gcc_ok,-freg-struct-return,)
42 + GCCOPT += -mregparm=3 -DREGPARM=3 -march=i386 -Os
43 + GCCOPT += $(call gcc_ok,-fPIE,-fPIC)
44 ++GCCOPT += $(call gcc_ok,-nopie,)
45 ++GCCOPT += $(call gcc_ok,-fno-pie,)
46 + GCCOPT += $(call gcc_ok,-fno-exceptions,)
47 + GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
48 + GCCOPT += $(call gcc_ok,-fno-strict-aliasing,)
49
50 diff --git a/sys-boot/syslinux/syslinux-4.07.ebuild b/sys-boot/syslinux/syslinux-4.07.ebuild
51 new file mode 100644
52 index 00000000000..021f559c7eb
53 --- /dev/null
54 +++ b/sys-boot/syslinux/syslinux-4.07.ebuild
55 @@ -0,0 +1,70 @@
56 +# Copyright 1999-2019 Gentoo Authors
57 +# Distributed under the terms of the GNU General Public License v2
58 +
59 +EAPI=0
60 +
61 +inherit eutils toolchain-funcs
62 +
63 +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders"
64 +HOMEPAGE="https://syslinux.zytor.com/"
65 +SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/${PV:0:1}.xx/${P/_/-}.tar.bz2"
66 +
67 +LICENSE="GPL-2"
68 +SLOT="0"
69 +KEYWORDS="-* amd64 x86"
70 +IUSE="custom-cflags"
71 +
72 +RDEPEND="sys-fs/mtools
73 + dev-perl/Crypt-PasswdMD5
74 + dev-perl/Digest-SHA1"
75 +DEPEND="${RDEPEND}
76 + dev-lang/nasm
77 + virtual/os-headers"
78 +
79 +S=${WORKDIR}/${P/_/-}
80 +
81 +# This ebuild is a departure from the old way of rebuilding everything in syslinux
82 +# This departure is necessary since hpa doesn't support the rebuilding of anything other
83 +# than the installers.
84 +
85 +# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore
86 +
87 +src_unpack() {
88 + unpack ${A}
89 + cd "${S}"
90 + # Fix building on hardened
91 + epatch "${FILESDIR}"/${PN}-4.05-nopie.patch
92 +
93 + rm -f gethostip #bug 137081
94 +
95 + # Don't prestrip or override user LDFLAGS, bug #305783
96 + local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile mtools/Makefile \
97 + sample/Makefile utils/Makefile"
98 + sed -i ${SYSLINUX_MAKEFILES} -e '/^LDFLAGS/d' || die "sed failed"
99 +
100 + if use custom-cflags; then
101 + sed -i ${SYSLINUX_MAKEFILES} \
102 + -e 's|-g -Os||g' \
103 + -e 's|-Os||g' \
104 + -e 's|CFLAGS[[:space:]]\+=|CFLAGS +=|g' \
105 + || die "sed custom-cflags failed"
106 + else
107 + QA_FLAGS_IGNORED="
108 + /sbin/extlinux
109 + /usr/bin/memdiskfind
110 + /usr/bin/gethostip
111 + /usr/bin/isohybrid
112 + /usr/bin/syslinux
113 + "
114 + fi
115 +
116 +}
117 +
118 +src_compile() {
119 + emake CC="$(tc-getCC)" installer || die
120 +}
121 +
122 +src_install() {
123 + emake INSTALLSUBDIRS=utils INSTALLROOT="${D}" MANDIR=/usr/share/man install || die
124 + dodoc README NEWS doc/*.txt || die
125 +}
126
127 diff --git a/sys-boot/syslinux/syslinux-5.10.ebuild b/sys-boot/syslinux/syslinux-5.10.ebuild
128 new file mode 100644
129 index 00000000000..bc99bbf6c4e
130 --- /dev/null
131 +++ b/sys-boot/syslinux/syslinux-5.10.ebuild
132 @@ -0,0 +1,82 @@
133 +# Copyright 1999-2018 Gentoo Foundation
134 +# Distributed under the terms of the GNU General Public License v2
135 +
136 +EAPI=4
137 +
138 +inherit eutils toolchain-funcs
139 +
140 +DESCRIPTION="SYSLINUX, PXELINUX, ISOLINUX, EXTLINUX and MEMDISK bootloaders"
141 +HOMEPAGE="https://www.syslinux.org/"
142 +SRC_URI="https://www.kernel.org/pub/linux/utils/boot/syslinux/${PV:0:1}.xx/${P/_/-}.tar.xz"
143 +
144 +LICENSE="GPL-2"
145 +SLOT="0"
146 +KEYWORDS="-* amd64 x86"
147 +IUSE="custom-cflags"
148 +
149 +RDEPEND="sys-fs/mtools
150 + dev-perl/Crypt-PasswdMD5
151 + dev-perl/Digest-SHA1"
152 +DEPEND="${RDEPEND}
153 + dev-lang/nasm
154 + virtual/os-headers"
155 +
156 +S=${WORKDIR}/${P/_/-}
157 +
158 +# This ebuild is a departure from the old way of rebuilding everything in syslinux
159 +# This departure is necessary since hpa doesn't support the rebuilding of anything other
160 +# than the installers.
161 +
162 +# These are executables which come precompiled and are run by the boot loader
163 +QA_PREBUILT="usr/share/${PN}/*.c32"
164 +
165 +# removed all the unpack/patching stuff since we aren't rebuilding the core stuff anymore
166 +
167 +src_prepare() {
168 + # Fix building on hardened
169 + epatch "${FILESDIR}"/${PN}-4.05-nopie.patch
170 +
171 + rm -f gethostip #bug 137081
172 +
173 + # Don't prestrip or override user LDFLAGS, bug #305783
174 + local SYSLINUX_MAKEFILES="extlinux/Makefile linux/Makefile mtools/Makefile \
175 + sample/Makefile utils/Makefile"
176 + sed -i ${SYSLINUX_MAKEFILES} -e '/^LDFLAGS/d' || die "sed failed"
177 +
178 + if use custom-cflags; then
179 + sed -i ${SYSLINUX_MAKEFILES} \
180 + -e 's|-g -Os||g' \
181 + -e 's|-Os||g' \
182 + -e 's|CFLAGS[[:space:]]\+=|CFLAGS +=|g' \
183 + || die "sed custom-cflags failed"
184 + else
185 + QA_FLAGS_IGNORED="
186 + /sbin/extlinux
187 + /usr/bin/memdiskfind
188 + /usr/bin/gethostip
189 + /usr/bin/isohybrid
190 + /usr/bin/syslinux
191 + "
192 + fi
193 +
194 +}
195 +
196 +src_compile() {
197 + emake CC="$(tc-getCC)" installer
198 +}
199 +
200 +src_install() {
201 + emake INSTALLSUBDIRS=utils INSTALLROOT="${D}" MANDIR=/usr/share/man install
202 + dodoc README NEWS doc/*.txt
203 +}
204 +
205 +pkg_postinst() {
206 + # print warning for users upgrading from the previous stable version
207 + if has 4.07 ${REPLACING_VERSIONS}; then
208 + ewarn "syslinux now uses dynamically linked ELF executables. Before you reboot,"
209 + ewarn "ensure that needed dependencies are fulfilled. For example, run from your"
210 + ewarn "syslinux directory:"
211 + ewarn
212 + ewarn "LD_LIBRARY_PATH=\".\" ldd menu.c32"
213 + fi
214 +}