Gentoo Archives: gentoo-commits

From: "Alexander Gabert (pappy)" <pappy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/hardened-glibc: hardened-glibc-2.6.1.ebuild hardened-glibc-2.6.1-r1.ebuild
Date: Sun, 27 Apr 2008 23:17:45
Message-Id: E1JqG7q-0007l1-KT@stork.gentoo.org
1 pappy 08/04/27 23:17:42
2
3 Modified: hardened-glibc-2.6.1.ebuild
4 Added: hardened-glibc-2.6.1-r1.ebuild
5 Log:
6 adding test version with depends and rdepend
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.2 sys-libs/hardened-glibc/hardened-glibc-2.6.1.ebuild
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1.ebuild?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1.ebuild?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1.ebuild?r1=1.1&r2=1.2
15
16 Index: hardened-glibc-2.6.1.ebuild
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1.ebuild,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- hardened-glibc-2.6.1.ebuild 27 Apr 2008 22:29:48 -0000 1.1
23 +++ hardened-glibc-2.6.1.ebuild 27 Apr 2008 23:17:42 -0000 1.2
24 @@ -1,6 +1,6 @@
25 # Copyright 1999-2008 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1.ebuild,v 1.1 2008/04/27 22:29:48 pappy Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1.ebuild,v 1.2 2008/04/27 23:17:42 pappy Exp $
29
30 inherit eutils
31
32 @@ -28,7 +28,9 @@
33 SLOT="1"
34
35 # only works for x86 so far
36 -KEYWORDS="~x86"
37 +# test version, do not use
38 +# will disappear from portage soon again
39 +KEYWORDS="-x86"
40 IUSE=""
41
42 PROVIDE="virtual/libc"
43
44
45
46 1.1 sys-libs/hardened-glibc/hardened-glibc-2.6.1-r1.ebuild
47
48 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1-r1.ebuild?rev=1.1&view=markup
49 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1-r1.ebuild?rev=1.1&content-type=text/plain
50
51 Index: hardened-glibc-2.6.1-r1.ebuild
52 ===================================================================
53 # Copyright 1999-2008 Gentoo Foundation
54 # Distributed under the terms of the GNU General Public License v2
55 # $Header: /var/cvsroot/gentoo-x86/sys-libs/hardened-glibc/hardened-glibc-2.6.1-r1.ebuild,v 1.1 2008/04/27 23:17:42 pappy Exp $
56
57 inherit eutils
58
59 # the main installation routine and patches
60 # from http://www.linuxfromscratch.org/hlfs
61 # and one file of patches of sys-libs/glibc
62
63 DESCRIPTION="Gentoo Hardened GNU libc6"
64 HOMEPAGE="http://www.gentoo.org/proj/en/hardened/"
65
66 KERNELVER="2.6.18"
67
68 GNU_MIRROR="ftp://ftp.gnu.org/gnu"
69
70 PATCHDIST="http://dev.gentoo.org/~pappy/dist/hardened"
71 PATCHPATH="sys-libs/hardened-glibc/files/2.6.1"
72 GENTOOPATCHES="glibc-2.6.1-GENTOOPATCHES.patch.gz"
73
74 SRC_URI="${SRC_URI} \
75 ${GNU_MIRROR}/glibc/glibc-2.6.1.tar.bz2"
76 SRC_URI="${SRC_URI} \
77 ${PATCHDIST}/${PATCHPATH}/${GENTOOPATCHES}"
78
79 LICENSE="LGPL-2"
80 SLOT="1"
81
82 # only works for x86 so far
83 KEYWORDS="~x86"
84 IUSE=""
85
86 PROVIDE="virtual/libc"
87 RESTRICT="strip" #46186
88
89 DEPEND=">=sys-devel/binutils-2.15.94
90 >=sys-devel/gcc-config-1.3.12
91 >=app-misc/pax-utils-0.1.10
92 virtual/os-headers
93 sys-devel/gettext
94 >=sys-apps/portage-2.1.2"
95
96 RDEPEND="sys-devel/gettext"
97
98 pkg_setup() {
99 # hardcoding the CHOST in this ebuild (for x86 stages)
100 export CHOST="i486-pc-linux-gnu"
101 export CFLAGS="-O2 -pipe"
102 export CXXFLAGS="${CFLAGS}"
103
104 export CPPFLAGS=""
105 export ASFLAGS=""
106 export LDFLAGS=""
107
108 if [[ "x${MAKEOPTS}y" == "xy" ]]
109 then
110 export MAKEOPTS="-j4"
111 fi
112
113 einfo "using CHOST:${CHOST}"
114 einfo "using C(XX)FLAGS:${CFLAGS}:${CXXFLAGS}"
115 einfo "using MAKEOPTS:${MAKEOPTS}"
116 }
117
118 src_compile() {
119 cd "${WORKDIR}/glibc-${PV}"
120
121 epatch "${WORKDIR}/glibc-2.6.1-GENTOOPATCHES.patch"
122
123 mkdir -p "${WORKDIR}/glibc-build"
124 cd "${WORKDIR}/glibc-build"
125
126 "${WORKDIR}/glibc-${PV}/configure" \
127 --target="${CHOST}" \
128 --prefix=/usr \
129 --enable-bind-now \
130 --without-gd \
131 --disable-profile \
132 --enable-add-ons=nptl \
133 --without-selinux \
134 --with-tls \
135 --with-__thread \
136 --enable-kernel="${KERNELVER}" \
137 --without-cvs || die "configuration failed"
138
139 make || die "compile failed"
140 }
141
142 src_install() {
143 cd "${WORKDIR}/glibc-build"
144
145 make install_root="${D}" install || die "make install failed"
146
147 # NOTE: for installing all glibc locales in the binpackage,
148 # NOTE: make install_root="${D}" localedata/install-locales
149
150 insinto /etc
151
152 local configfiles="${WORKDIR}/glibc-${PV}/gentoo"
153
154 # install the locale-gen helper utility and config file
155 dosbin "${configfiles}/locale/locale-gen" || \
156 die "locale-gen helper script could not be installed"
157
158 doins "${configfiles}/locale/locale.gen" || \
159 die "locale.gen config file could not be installed"
160
161 # install the nscd startup script
162 doinitd "${configfiles}/etc/nscd" || \
163 die "nscd run level startup script could not be installed"
164
165 # install the config files for glibc
166 doins "${configfiles}"/etc/*.conf || \
167 die "glibc config files could not be installed"
168
169 # make sure the localtime is not overwritten by glibc emerges
170 rm "${D}/etc/localtime"
171 }
172
173 # NOTE: the locales are not in the .tbz2 file of the binpackage
174 # NOTE: but will be generated in the postinst routine from here
175 pkg_postinst() {
176 # make sure the file exists on the installed system
177 touch "${ROOT}/ld.so.conf"
178
179 # install locales (logic taken from sys-libs/glibc)
180 local locale_list="${ROOT}/etc/locale.gen"
181 if [[ -z $(locale-gen --list --config "${locale_list}") ]]
182 then
183 locale_list="${ROOT}/usr/share/i18n/SUPPORTED"
184 fi
185
186 # find the number of jobs available
187 local x jobs
188 for x in ${MAKEOPTS} ; do [[ "${x}" == -j* ]] && jobs=${x#-j} ; done
189
190 # generate the locales
191 locale-gen -j ${jobs:-2} --config "${locale_list}"
192
193 # set the timezone automatically if not found
194 if [[ ! -f "${ROOT}/etc/localtime" ]]
195 then
196 einfo "timezone not found: setting timezone to UTC"
197 cp --remove-destination \
198 "${ROOT}/usr/share/zoneinfo/UTC" \
199 "${ROOT}/etc/localtime"
200 fi
201 }
202
203
204
205
206 --
207 gentoo-commits@l.g.o mailing list