Gentoo Archives: gentoo-commits

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-db/firebird: firebird-2.5.2.26540.0.ebuild ChangeLog
Date: Fri, 30 May 2014 12:58:26
Message-Id: 20140530125822.30AE22004E@flycatcher.gentoo.org
1 swift 14/05/30 12:58:22
2
3 Modified: ChangeLog
4 Added: firebird-2.5.2.26540.0.ebuild
5 Log:
6 Bump to 2.5.2.26539.0 (upstream security fix), see also bug #467942. Thanks to Vincent Hardy for the notice
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)
9
10 Revision Changes Path
11 1.115 dev-db/firebird/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/firebird/ChangeLog?rev=1.115&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/firebird/ChangeLog?rev=1.115&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/firebird/ChangeLog?r1=1.114&r2=1.115
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-db/firebird/ChangeLog,v
20 retrieving revision 1.114
21 retrieving revision 1.115
22 diff -u -r1.114 -r1.115
23 --- ChangeLog 4 Nov 2013 11:34:17 -0000 1.114
24 +++ ChangeLog 30 May 2014 12:58:22 -0000 1.115
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-db/firebird
27 -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/ChangeLog,v 1.114 2013/11/04 11:34:17 zlogene Exp $
29 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/ChangeLog,v 1.115 2014/05/30 12:58:22 swift Exp $
31 +
32 +*firebird-2.5.2.26540.0 (30 May 2014)
33 +
34 + 30 May 2014; Sven Vermeulen <swift@g.o> +firebird-2.5.2.26540.0.ebuild:
35 + Bump to 2.5.2.26539.0 (upstream security fix), see also bug #467942. Thanks to
36 + Vincent Hardy for the notice
37
38 04 Nov 2013; Mikle Kolyada <zlogene@g.o>
39 -firebird-2.5.1.26351.0-r1.ebuild:
40
41
42
43 1.1 dev-db/firebird/firebird-2.5.2.26540.0.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/firebird/firebird-2.5.2.26540.0.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/firebird/firebird-2.5.2.26540.0.ebuild?rev=1.1&content-type=text/plain
47
48 Index: firebird-2.5.2.26540.0.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/firebird-2.5.2.26540.0.ebuild,v 1.1 2014/05/30 12:58:22 swift Exp $
53
54 EAPI=4
55
56 inherit flag-o-matic eutils autotools multilib user versionator
57
58 MY_P=${PN/f/F}-$(replace_version_separator 4 -)
59 #MY_P=${PN/f/F}-${PV/_rc/-ReleaseCandidate}
60
61 DESCRIPTION="A relational database offering many ANSI SQL:2003 and some SQL:2008 features"
62 HOMEPAGE="http://www.firebirdsql.org/"
63 SRC_URI="mirror://sourceforge/firebird/${MY_P}.tar.bz2
64 doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )"
65
66 LICENSE="IDPL Interbase-1.0"
67 SLOT="0"
68 KEYWORDS="~amd64 -ia64 ~x86"
69 IUSE="doc client superserver xinetd examples debug"
70 RESTRICT="userpriv"
71
72 RDEPEND="dev-libs/libedit
73 dev-libs/icu"
74 DEPEND="${RDEPEND}
75 >=dev-util/btyacc-3.0-r2
76 doc? ( app-arch/unzip )"
77 RDEPEND="${RDEPEND}
78 xinetd? ( virtual/inetd )
79 !sys-cluster/ganglia"
80
81 S="${WORKDIR}/${MY_P}"
82
83 pkg_pretend() {
84 if use client && use superserver ; then
85 die "Use flags client and superserver cannot be used together"
86 fi
87 if use client && use xinetd ; then
88 die "Use flags client and xinetd cannot be used together"
89 fi
90 if use superserver && use xinetd ; then
91 die "Use flags superserver and xinetd cannot be used together"
92 fi
93 }
94
95 pkg_setup() {
96 enewgroup firebird 450
97 enewuser firebird 450 /bin/bash /usr/$(get_libdir)/firebird firebird
98 }
99
100 function check_sed() {
101 MSG="sed of $3, required $2 lines modified $1"
102 einfo "${MSG}"
103 [[ $1 -ge $2 ]] || die "${MSG}"
104 }
105
106 src_unpack() {
107 if use doc; then
108 # Unpack docs
109 mkdir "${WORKDIR}/manuals"
110 cd "${WORKDIR}/manuals"
111 unpack ib_b60_doc.zip
112 cd "${WORKDIR}"
113 fi
114 unpack "${MY_P}.tar.bz2"
115 cd "${S}"
116 }
117
118 src_prepare() {
119 # This patch might be portable, and not need to be duplicated per version
120 # also might no longer be necessary to patch deps or libs, just flags
121 epatch "${FILESDIR}/${PN}-2.5.1.26351.0-deps-flags.patch"
122
123 use client && epatch "${FILESDIR}/${PN}-2.5.1.26351.0-client.patch"
124 if ! use superserver ; then
125 epatch "${FILESDIR}/${PN}-2.5.1.26351.0-superclassic.patch"
126 fi
127
128 # Rename references to isql to fbsql
129 # sed vs patch for portability and addtional location changes
130 check_sed "$(sed -i -e 's:"isql :"fbsql :w /dev/stdout' \
131 src/isql/isql.epp | wc -l)" "1" "src/isql/isql.epp" # 1 line
132 check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \
133 src/msgs/history2.sql | wc -l)" "4" "src/msgs/history2.sql" # 4 lines
134 check_sed "$(sed -i -e 's:--- ISQL:--- FBSQL:w /dev/stdout' \
135 -e 's:isql :fbsql :w /dev/stdout' \
136 -e 's:ISQL :FBSQL :w /dev/stdout' \
137 src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines
138
139 find "${S}" -name \*.sh -print0 | xargs -0 chmod +x
140 rm -rf "${S}"/extern/{btyacc,editline,icu}
141
142 eautoreconf
143 }
144
145 src_configure() {
146 filter-flags -fprefetch-loop-arrays
147 filter-mfpmath sse
148
149 econf --prefix=/usr/$(get_libdir)/firebird \
150 $(use_enable superserver superserver) \
151 $(use_enable debug) \
152 --with-editline \
153 --with-system-editline \
154 --with-system-icu \
155 --with-fbbin=/usr/bin \
156 --with-fbsbin=/usr/sbin \
157 --with-fbconf=/etc/${PN} \
158 --with-fblib=/usr/$(get_libdir) \
159 --with-fbinclude=/usr/include \
160 --with-fbdoc=/usr/share/doc/${P} \
161 --with-fbudf=/usr/$(get_libdir)/${PN}/UDF \
162 --with-fbsample=/usr/share/doc/${P}/examples \
163 --with-fbsample-db=/usr/share/doc/${P}/examples/db \
164 --with-fbhelp=/usr/$(get_libdir)/${PN}/help \
165 --with-fbintl=/usr/$(get_libdir)/${PN}/intl \
166 --with-fbmisc=/usr/share/${PN} \
167 --with-fbsecure-db=/etc/${PN} \
168 --with-fbmsg=/usr/$(get_libdir)/${PN} \
169 --with-fblog=/var/log/${PN}/ \
170 --with-fbglock=/var/run/${PN} \
171 --with-fbplugins=/usr/$(get_libdir)/${PN}/plugins \
172 --with-gnu-ld \
173 ${myconf}
174 }
175
176 src_compile() {
177 MAKEOPTS="${MAKEOPTS/-j*/-j1} ${MAKEOPTS/-j/CPU=}"
178 emake
179 }
180
181 src_install() {
182 cd "${S}/gen/${PN}"
183
184 if use doc; then
185 dodoc "${S}"/doc/*.pdf
186 find "${WORKDIR}"/manuals -type f -iname "*.pdf" -exec dodoc '{}' + || die
187 fi
188
189 insinto /usr/include
190 doins include/*
191
192 rm lib/libfbstatic.a
193
194 insinto /usr/$(get_libdir)
195 dolib.so lib/*.so*
196
197 # links for backwards compatibility
198 dosym libfbclient.so /usr/$(get_libdir)/libgds.so
199 dosym libfbclient.so /usr/$(get_libdir)/libgds.so.0
200 dosym libfbclient.so /usr/$(get_libdir)/libfbclient.so.1
201
202 insinto /usr/$(get_libdir)/${PN}
203 doins *.msg
204
205 use client && return
206
207 einfo "Renaming isql -> fbsql"
208 mv bin/isql bin/fbsql
209
210 local bins="fbsql fbsvcmgr fbtracemgr gbak gdef gfix gpre gsec gstat nbackup qli"
211 for bin in ${bins[@]}; do
212 dobin bin/${bin}
213 done
214
215 dosbin bin/fb_lock_print
216 # SuperServer
217 if use superserver ; then
218 dosbin bin/{fbguard,fbserver}
219 # ClassicServer
220 elif use xinetd ; then
221 dosbin bin/fb_inet_server
222 # SuperClassic
223 else
224 dosbin bin/{fbguard,fb_smp_server}
225
226 #Temp should not be necessary, need to patch/fix
227 dosym "${D}"/usr/$(get_libdir)/libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so
228 fi
229
230 exeinto /usr/bin/${PN}
231 exeopts -m0755
232 doexe bin/{changeRunUser,restoreRootRunUser,changeDBAPassword}.sh
233
234 insinto /usr/$(get_libdir)/${PN}/help
235 doins help/help.fdb
236
237 exeinto /usr/$(get_libdir)/firebird/intl
238 dolib.so intl/libfbintl.so
239 dosym "${D}"/usr/$(get_libdir)/libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl
240 dosym "${D}"/etc/firebird/fbintl.conf /usr/$(get_libdir)/${PN}/intl/fbintl.conf
241
242 exeinto /usr/$(get_libdir)/${PN}/plugins
243 dolib.so plugins/libfbtrace.so
244 dosym "${D}"/usr/$(get_libdir)/libfbtrace.so /usr/$(get_libdir)/${PN}/plugins/libfbtrace.so
245
246 exeinto /usr/$(get_libdir)/${PN}/UDF
247 doexe UDF/*.so
248
249 insinto /usr/share/${PN}/upgrade
250 doins "${S}"/src/misc/upgrade/v2/*
251
252 insinto /etc/${PN}
253 insopts -m0644 -o firebird -g firebird
254 doins ../install/misc/*.conf
255 insopts -m0660 -o firebird -g firebird
256 doins security2.fdb
257
258 if use xinetd ; then
259 insinto /etc/xinetd.d
260 newins "${FILESDIR}/${PN}.xinetd" ${PN}
261 else
262 newinitd "${FILESDIR}/${PN}.init.d.2.5" ${PN}
263 newconfd "${FILESDIR}/${PN}.conf.d.2.5" ${PN}
264 fperms 640 /etc/conf.d/${PN}
265 fi
266
267 insinto /etc/logrotate.d
268 newins "${FILESDIR}/${PN}.logrotate" ${PN}
269
270 diropts -m 755 -o firebird -g firebird
271 dodir /var/log/${PN}
272 dodir /var/run/${PN}
273 keepdir /var/log/${PN}
274 keepdir /var/run/${PN}
275
276 use examples && docinto examples
277 }
278
279 pkg_postinst() {
280 use client && return
281
282 # Hack to fix ownership/perms
283 chown -fR firebird:firebird "${ROOT}/etc/${PN}" "${ROOT}/usr/$(get_libdir)/${PN}"
284 chmod 750 "${ROOT}/etc/${PN}"
285
286 elog
287 elog "Firebird is no longer installed in /opt. Binaries are in"
288 elog "/usr/bin. The core, udfs, etc are in /usr/lib/firebird. Logs"
289 elog "are in /var/log/firebird, and lock files in /var/run/firebird"
290 elog "The command line tool isql has been renamed to fbsql."
291 elog "Please report any problems or issues to bugs.gentoo.org."
292 elog
293 }
294
295 pkg_config() {
296 use client && return
297
298 # if found /etc/security.gdb from previous install, backup, and restore as
299 # /etc/security2.fdb
300 if [ -f "${ROOT}/etc/firebird/security.gdb" ] ; then
301 # if we have scurity2.fdb already, back it 1st
302 if [ -f "${ROOT}/etc/firebird/security2.fdb" ] ; then
303 cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old"
304 fi
305 gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk"
306 gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb"
307 mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old"
308 rm "${ROOT}/etc/firebird/security.gbk"
309
310 # make sure they are readable only to firebird
311 chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}"
312 chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}"
313
314 einfo
315 einfo "Converted old security.gdb to security2.fdb, security.gdb has been "
316 einfo "renamed to security.gdb.old. if you had previous security2.fdb, "
317 einfo "it's backed to security2.fdb.old (all under ${ROOT}/etc/firebird)."
318 einfo
319 fi
320
321 # we need to enable local access to the server
322 if [ ! -f "${ROOT}/etc/hosts.equiv" ] ; then
323 touch "${ROOT}/etc/hosts.equiv"
324 chown root:0 "${ROOT}/etc/hosts.equiv"
325 chmod u=rw,go=r "${ROOT}/etc/hosts.equiv"
326 fi
327
328 # add 'localhost.localdomain' to the hosts.equiv file...
329 if [ grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
330 echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv"
331 einfo "Added localhost.localdomain to ${ROOT}/etc/hosts.equiv"
332 fi
333
334 # add 'localhost' to the hosts.equiv file...
335 if [ grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
336 echo "localhost" >> "${ROOT}/etc/hosts.equiv"
337 einfo "Added localhost to ${ROOT}/etc/hosts.equiv"
338 fi
339
340 HS_NAME=`hostname`
341 if [ grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then
342 echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv"
343 einfo "Added ${HS_NAME} to ${ROOT}/etc/hosts.equiv"
344 fi
345
346 einfo "If you're using UDFs, please remember to move them"
347 einfo "to /usr/lib/firebird/UDF"
348 }