]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - glibc/glibc.nm
Move all packages to root.
[people/amarx/ipfire-3.x.git] / glibc / glibc.nm
CommitLineData
166a6c21 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
166a6c21
MT
4###############################################################################
5
7f617709 6# TODO tzdata
166a6c21 7
802ea3af
MT
8name = glibc
9version = 2.14
10release = 1
11
12maintainer = Michael Tremer <michael.tremer@ipfire.org>
13groups = System/Base
14url = http://sources.redhat.com/glibc/
15license = GPLv2+ LGPLv2+
16summary = The GNU libc libraries.
17
18description
19 The glibc package contains standard libraries which are used by
20 multiple programs on the system. In order to save disk space and
21 memory, as well as to make upgrading easier, common system code is
22 kept in one place and shared between programs. This particular package
23 contains the most important sets of shared libraries: the standard C
24 library and the standard math library. Without these two libraries, a
166a6c21 25 Linux system will not function.
802ea3af
MT
26end
27
28source_dl = http://ftp.gnu.org/gnu/glibc/
29sources = %{thisapp}.tar.xz
30
31build
32 requires
33 audit-devel
34 autoconf
35 automake
36 gettext
37 libcap-devel
38 libselinux-devel
39 texinfo
40 end
41
42 # Build glibc with custom cflags
43 GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -DPIC
44
45 if "%{DISTRO_ARCH}" == "i686"
46 GLIBC_FLAGS += -march=i686 -mtune=generic
47 elif "%{DISTRO_ARCH}" == "x86_64"
48 GLIBC_FLAGS += -mtune=generic
49 end
50
51 export CFLAGS = %{GLIBC_FLAGS}
52 export CXXFLAGS = %{GLIBC_FLAGS}
53
54 # Optimize glibc for kernel
55 OPTIMIZED_KERNEL = 2.6.32
56
57 export QUALITY_AGENT_RPATH_ALLOW_ORIGIN=yes
58
59 prepare_cmds
60 # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
61 # unknown whether this is a bash bug or a Glibc problem. Disable
62 # installation of this locale in order to avoid the problem.
63 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
64
65 # The ldd shell script contains Bash-specific syntax. Change its default
66 # program interpreter to /bin/bash in case another /bin/sh is installed.
67 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
68
69 # We don't install pt_chown(1) on the final system, so why install it to
70 # $(TOOLS_DIR):
71 sed -e "/^install.*pt_chown/d" -i login/Makefile
72
73 # Build nscd with -fstack-protector-all, instead of -fstack-protector:
74 sed -e "s/fstack-protector/&-all/" -i nscd/Makefile
75
76 cat %{DIR_SOURCE}/glibc-stack_chk_fail.c > debug/stack_chk_fail.c
77
78 # Use gnu hash style
79 sed -i Makeconfig \
80 -e "s/-Wl,--hash-style=both/-Wl,--hash-style=gnu -Wl,-O1/"
81
82 # stdlib/tst-putenvmod is not linked against libc.
83 sed -i stdlib/Makefile \
84 -e "s/^CFLAGS-tst-putenvmod.c.*/& -fno-stack-protector/g"
85
86 # stdio-common/bug22 hits timeout.
87 sed -i stdio-common/bug22.c \
88 -e "s/#define TIMEOUT.*/#define TIMEOUT 300/"
89
90 # These tests don't work or need more investigation:
91 sed -i dlfcn/Makefile -e "s/default //g"
92
93 sed -i nptl/Makefile \
94 -e "s/tst-mutex5 //g" \
95 -e "s/tst-mutex5a //g" \
96 -e "s/tst-cond11 //g" \
97 -e "s/tst-rwlock6 //g" \
98 -e "s/tst-rwlock7 //g" \
99 -e "s/tst-sem5 //g" \
100 -e "s/tst-cancelx4 //g" \
101 -e "s/tst-cancelx5 //g" \
102 -e "s/tst-cancelx10 //g" \
103 -e "s/tst-cancelx18 //g" \
104 -e "s/tst-signal1 //g"
105
106 # These are known to fail on x86:
107 sed -i rt/Makefile \
108 -e "s/tst-cpuclock1 //g" \
109 -e "s/tst-cpuclock2 //g"
110
111 sed -i elf/Makefile \
112 -e "s/tst-tls1 //g" \
113 -e "s/tst-tls1-static //g" \
114 -e "s/tst-tls2 //g" \
115 -e "s/tst-tls2-static //g" \
116 -e "s/tst-tls3 //g" \
117 -e "s/resolvfail //g" \
118 -e "s/constload1 //g" \
119 -e "s/order //g" \
120 -e "s/lateglobal //g" \
121 -e "s/dblload //g" \
122 -e "s/dblunload //g" \
123 -e "s/reldep6 //g" \
124 -e "s/circleload1 //g" \
125 -e "s/tst-global1 //g" \
126 -e "s/tst-audit2 //g" \
127 -e "s/check-localplt //g" \
128 -e "s/check-localplt.out$$//g"
129
130 sed -i signal/Makefile \
131 -e "s/tst-sigset2//g"
132 end
133
134 build
135 mkdir %{DIR_SRC}/glibc-build
136 cd %{DIR_SRC}/glibc-build
137
138 CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables" \
139 ../%{thisapp}/configure \
140 --build=%{DISTRO_BUILDTARGET} \
141 --host=%{DISTRO_BUILDTARGET} \
166a6c21
MT
142 --prefix=/usr \
143 --libexecdir=/usr/lib/glibc \
144 --disable-profile \
145 --enable-add-ons \
802ea3af 146 --enable-kernel=%{OPTIMIZED_KERNEL} \
2777fcb0 147 --with-selinux \
166a6c21
MT
148 --disable-werror \
149 --enable-bind-now \
70b63715
MT
150 --enable-__thread \
151 --enable-tls \
152 --enable-experimental-malloc \
153 --with-gd \
154 --with-nss-crypt
155
802ea3af
MT
156 sed -i config.make \
157 -e "s/^build-pic-default=.*/build-pic-default=yes/"
158
159 # Our GCC is already passing -fPIC, and that's all we want for the libraries.
160 # LDFLAGS.so is appended to so we don't build shared libraries with
161 # DT_TEXTREL (and to tell us if something goes wrong). For now we only build
162 # the libraries, not the programs:
163 echo "build-programs=no" >> configparms
164
165 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
166 CFLAGS="%{CFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE" \
167 CXXFLAGS="%{CXXFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE"
168
169 # Then build the programs with hardening, so everything possible in
170 # is hardened:
171 echo "# Nothing in here :D" > configparms
172 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
173 CFLAGS="%{CFLAGS}" CXXFLAGS="%{CXXFLAGS}"
174 end
175
176 #test
177 # cd $(DIR_SRC)/glibc-build
178 # make check TIMEOUTFACTOR=16 \
179 # CFLAGS="%{CFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE" \
180 # CXXFLAGS="%{CXXFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE"
181 #end
182
183 install
184 cd %{DIR_SRC}/glibc-build
185 make install install_root=%{BUILDROOT}
186
187 # Locales
188 mkdir -pv %{BUILDROOT}/usr/lib/locale
189 # This would install all locales that are supported
190 make localedata/install-locales install_root=%{BUILDROOT}
191
192 # Timezone
193 cp -v --remove-destination %{BUILDROOT}/usr/share/zoneinfo/GMT \
194 %{BUILDROOT}/etc/localtime
195
196 # Configuration
197 cp -vf %{DIR_SOURCE}/{ld.so.conf,nsswitch.conf} %{BUILDROOT}/etc
198 mkdir -pv %{BUILDROOT}/etc/{default,ld.so.conf.d}
199 install -p -m644 %{DIR_APP}/nis/nss %{BUILDROOT}/etc/default/nss
200
201 # Remove unused binaries
202 rm -vf %{BUILDROOT}/sbin/sln \
203 %{BUILDROOT}/usr/bin/rpcinfo
204
205 # Don't distribute linker cache
206 rm -vf %{BUILDROOT}/etc/ld.so.cache
207
208 # Include /usr/lib/gconv/gconv-modules.cache
209 > %{BUILDROOT}/usr/lib/gconv/gconv-modules.cache
210 chmod 644 %{BUILDROOT}/usr/lib/gconv/gconv-modules.cache
211
212 strip -g %{BUILDROOT}/usr/lib/*.o
213
214 # Move some libs to correct place
215 mv -v %{BUILDROOT}/lib/lib{memusage,pcprofile}.so %{BUILDROOT}/usr/lib/
216 end
217end
218
219packages
220 package glibc
221 requires = glibc-common=%{thisver}
222 end
223
224 package glibc-common
225 # XXX description and summary are missing
226
227 files
228 /usr/bin
229 /usr/sbin
230 /usr/share
231 !/usr/share/zoneinfo
232 end
233 end
234
235 package glibc-devel
236 summary = Object files for development using standard C libraries.
237 description
238 The glibc-devel package contains the object files necessary
239 for developing programs which use the standard C libraries (which are
240 used by nearly all programs). If you are developing programs which
241 will use the standard C libraries, your system needs to have these
242 standard object files available in order to create the
243 executables.
244
245 Install glibc-devel if you are going to develop programs which will
246 use the standard C libraries.
247 end
248 group = Development/Libraries
249
250 requires = glibc-headers=%{thisver}
251
252 files = /usr/lib/*.a /usr/lib/*.o
253 end
254
255 package glibc-headers
256 description
257 The glibc-headers package contains the header files necessary
258 for developing programs which use the standard C libraries (which are
259 used by nearly all programs). If you are developing programs which
260 will use the standard C libraries, your system needs to have these
261 standard header files available in order to create the
262 executables.
263
264 Install glibc-headers if you are going to develop programs which will
265 use the standard C libraries.
266 end
267
268 requires = kernel-headers
269
270 files
271 /usr/include
272 !/usr/include/linuxthreads
273 !/usr/include/gnu/stubs-[32164]*.h
274 end
275 end
276
277 package nscd
278 summary = A Name Service Caching Daemon (nscd).
279 description
280 Nscd caches name service lookups and can dramatically improve
281 performance with NIS+, and may help with DNS as well.
282 end
283 group = System/Daemons
284
285 files
286 /usr/sbin/nscd
287 end
288 end
289
290 package %{name}-utils
291 summary = Development utilities from GNU C library.
292 description
293 The glibc-utils package contains memusage, a memory usage profiler,
294 mtrace, a memory leak tracer and xtrace, a function call tracer
295 which can be helpful during program debugging.
296 end
297 group = Development/Tools
298
299 files
300 /usr/bin/memusage
301 /usr/bin/memusagestat
302 /usr/bin/mtrace
303 /usr/bin/pcprofiledump
304 /usr/bin/xtrace
305 /usr/lib/libmemusage.so
306 /usr/lib/libpcprofile.so
307 end
308 end
309end