summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm_5.4.16.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_5.4.16.bb')
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.16.bb712
1 files changed, 0 insertions, 712 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
deleted file mode 100644
index 17c58186f8..0000000000
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ /dev/null
@@ -1,712 +0,0 @@
1SUMMARY = "The RPM package management system"
2DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
3package management system capable of installing, uninstalling, \
4verifying, querying, and updating software packages. Each software \
5package consists of an archive of files along with information about \
6the package like its version, a description, etc."
7
8SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages"
9DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
10
11SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
12DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
13development files will simplify the process of writing programs that \
14manipulate RPM packages and databases. These files are intended to \
15simplify the process of creating graphical package managers or any \
16other tools that need an intimate knowledge of RPM packages in order \
17to function."
18
19SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration"
20DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \
21and configuration common between RPM Package Manager."
22
23SUMMARY_${PN}-build = "Scripts and executable programs used to build packages"
24DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \
25that are used to build packages using the RPM Package Manager."
26
27SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
28DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
29written in the Python programming language to use the interface \
30supplied by the RPM Package Manager libraries."
31
32SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages"
33DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \
34written in the Perl programming language to use the interface \
35supplied by the RPM Package Manager libraries."
36
37HOMEPAGE = "http://rpm5.org/"
38LICENSE = "LGPLv2.1 & Apache-2.0"
39LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
40LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
41
42# We must have gettext-native, we need gettextize, which may not be provided
43DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
44DEPENDS_append_class-native = " file-replacement-native"
45
46# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
47# in order to extract the distribution SRPM into a format we can extract...
48
49# There is no official 5.4.16 release yet, so start w/ 5.4.15 and patch it
50# based on CVS
51S = "${WORKDIR}/rpm-5.4.15"
52
53SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm;name=srpm;extract=rpm-5.4.15.tar.gz \
54 http://downloads.yoctoproject.org/releases/rpm5/rpm-5.4.15-to-5.4.16-20160225.patch.gz;name=rpm-patch \
55 http://downloads.yoctoproject.org/releases/rpm5/syck-5.4.15-to-5.4.16-20160225.patch.gz;name=syck-patch \
56 http://downloads.yoctoproject.org/releases/rpm5/beecrypt-5.4.15-to-5.4.16-20160225.patch.gz;name=beecrypt-patch \
57 http://downloads.yoctoproject.org/releases/rpm5/lua-5.4.15-to-5.4.16-20160225.patch.gz;name=lua-patch \
58 file://perfile_rpmdeps.sh \
59 file://pythondeps.sh \
60"
61
62SRC_URI[srpm.md5sum] = "d53782842ac11b3100a43fb2958c9bc0"
63SRC_URI[srpm.sha256sum] = "d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee"
64
65SRC_URI[rpm-patch.md5sum] = "8b7deb1c9574d3d47ed8ba8c690fd8bf"
66SRC_URI[rpm-patch.sha256sum] = "1c1983d001b04eaa23eb2c8d9598b9d0899acb0a89f54a2d4c4e974086fd17a5"
67
68SRC_URI[syck-patch.md5sum] = "f31d7a32105a364688354419ec3559e4"
69SRC_URI[syck-patch.sha256sum] = "4dd1d04489206d8b5d1970f2a8d143a002f2895cefbe15d73459785096545e8a"
70
71SRC_URI[beecrypt-patch.md5sum] = "9e71ee3ccb0a52985a071dd250279132"
72SRC_URI[beecrypt-patch.sha256sum] ="df7c0708a7fab9bdf6d46194519b42e736f99cb0599dcc1c3c1bf1b228705cde"
73
74SRC_URI[lua-patch.md5sum] = "ca10d03d83b1fc1c31a0b50819534cd7"
75SRC_URI[lua-patch.sha256sum] = "6bde435cc827a7d4b2520e8f3e1c9bd2ca74375de0a4402aa99ef4d48eab9a7e"
76
77# Bug fixes
78SRC_URI += " \
79 file://header-include-fix.patch \
80 file://rpm-libsql-fix.patch \
81 file://rpm-platform.patch \
82 file://rpm-platform2.patch \
83 file://rpm-tools-mtree-LDFLAGS.patch \
84 file://rpm-canonarch.patch \
85 file://rpm-no-loopmsg.patch \
86 file://rpm-resolvedep.patch \
87 file://rpm-packageorigin.patch \
88 file://uclibc-support.patch \
89 file://rpmatch.patch \
90 file://makefile-am-exec-hook.patch \
91 file://python-rpm-rpmsense.patch \
92 file://debugedit-segv.patch \
93 file://debugedit-valid-file-to-fix-segment-fault.patch \
94 file://rpm-platform-file-fix.patch \
95 file://rpm-lsb-compatibility.patch \
96 file://rpm-tag-generate-endian-conversion-fix.patch \
97 file://rpm-hardlink-segfault-fix.patch \
98 file://rpm-payload-use-hashed-inode.patch \
99 file://rpm-fix-logio-cp.patch \
100 file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
101 file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
102 file://0001-define-EM_AARCH64.patch \
103 file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
104 file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
105 file://rpm-mongodb-sasl.patch \
106 file://rpm-fix-parseEmbedded.patch \
107 file://rpm-rpmio-headers.patch \
108 file://rpm-python-restore-origin.patch \
109 file://rpm-keccak-sse-intrin.patch \
110 file://rpm-atomic-ops.patch \
111 file://rpm-gnu-atomic.patch \
112 file://rpm-tagname-type.patch \
113 file://rpm-python-tagname.patch \
114 file://rpm-python-AddErase.patch \
115 file://rpm-rpmpgp-popt.patch \
116 file://rpm-fix-lua-tests-compilation-failure.patch \
117 file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \
118 file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
119 file://gcc6-stdlib.patch \
120 file://0001-system.h-query.c-support-nosignature.patch \
121 file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \
122 file://0001-macros-add-_gpg_sign_cmd_extra_args.patch \
123"
124
125# OE specific changes
126SRC_URI += " \
127 file://rpm-log-auto-rm.patch \
128 file://rpm-db-reduce.patch \
129 file://rpm-autogen.patch \
130 file://rpm-showrc.patch \
131 file://rpm-fileclass.patch \
132 file://rpm-scriptletexechelper.patch \
133 file://rpmdeps-oecore.patch \
134 file://rpm-no-perl-urpm.patch \
135 file://rpm-macros.patch \
136 file://rpm-lua.patch \
137 file://rpm-ossp-uuid.patch \
138 file://rpm-uuid-include.patch \
139 file://rpm-pkgconfigdeps.patch \
140 file://no-ldflags-in-pkgconfig.patch \
141 file://dbconvert.patch \
142 file://rpm-db_buffer_small.patch \
143 file://rpm-py-init.patch \
144 file://rpm-reloc-macros.patch \
145 file://rpm-db5-or-db6.patch \
146 file://rpm-db60.patch \
147 file://rpmqv_cc_b_gone.patch \
148 file://rpm-realpath.patch \
149 file://rpm-check-rootpath-reasonableness.patch \
150 file://rpm-macros.in-disable-external-key-server.patch \
151 file://configure.ac-check-for-both-gpg2-and-gpg.patch \
152 file://rpm-disable-auto-stack-protector.patch \
153 file://popt-disable-auto-stack-protector.patch \
154 file://rpm-syck-fix-gram.patch \
155 file://rpm-rpmdb-grammar.patch \
156 file://rpm-disable-blaketest.patch \
157 file://rpm-autogen-force.patch \
158 file://rpmdb-prevent-race-in-tmpdir-creation.patch \
159 file://rpmdb-more-verbose-error-logging-in-rpmTempFile.patch \
160"
161
162SRC_URI_append_libc-musl = "\
163 file://0001-rpm-Fix-build-on-musl.patch \
164"
165# Uncomment the following line to enable platform score debugging
166# This is useful when identifying issues with Smart being unable
167# to process certain package feeds.
168#SRC_URI += "file://rpm-debug-platform.patch"
169
170UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$"
171
172inherit autotools gettext pkgconfig python-dir
173
174acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
175
176# The local distribution macro directory
177distromacrodir = "${libdir}/rpm/poky"
178
179# Specify the default rpm macros in terms of adjustable variables
180rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
181rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
182rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
183
184# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
185
186# Set the digest algorithm used for verifying file integrity
187# If this value changes, and two different packages have different values
188# the "same file" validation (two packages have a non-conflict file)
189# will fail. This may lead to upgrade problems. You should treat this
190# value as a distribution wide setting, and only change it when you intend
191# a full system upgrade!
192#
193# Defined file digest algorithm values (note: not all are available!):
194# 1 MD5 (legacy RPM default)
195# 2 SHA1
196# 3 RIPEMD-160
197# 5 MD2
198# 6 TIGER-192
199# 8 SHA256
200# 9 SHA384
201# 10 SHA512
202# 11 SHA224
203# 104 MD4
204# 105 RIPEMD-128
205# 106 CRC-32
206# 107 ADLER-32
207# 108 CRC-64 (ECMA-182 polynomial, untested uint64_t problems)
208# 109 Jenkins lookup3.c hashlittle()
209# 111 RIPEMD-256
210# 112 RIPEMD-320
211# 188 BLAKE2B
212# 189 BLAKE2BP
213# 190 BLAKE2S
214# 191 BLAKE2SP
215RPM_FILE_DIGEST_ALGO ?= "1"
216
217# All packages build with RPM5 contain a non-repudiable signature.
218# The purpose of this signature is not to show authenticity of a package,
219# but instead act as a secondary package wide validation that shows it
220# wasn't damaged by accident in transport. (When later you sign the package,
221# this signature may or may not be replaced as there are three signature
222# slots, one for DSA/RSA, one for ECSDA, and one reserved.)
223#
224# There is a known issue w/ RSA signatures that if they start with an 0x00
225# the signing and validation may fail.
226#
227# The following is the list of choices for the non-rpudiable signature
228# (note: not all of these are implemented):
229# DSA (default)
230# RSA (implies SHA1)
231# ECDSA (implies SHA256)
232# DSA/SHA1
233# DSA/SHA224
234# DSA/SHA256
235# DSA/SHA384
236# DSA/SHA512
237# RSA/SHA1
238# RSA/SHA224
239# RSA/SHA256
240# RSA/SHA384
241# RSA/SHA512
242# ECDSA/SHA224 (using NIST P-224)
243# ECDSA/SHA256 (using NIST P-256)
244# ECDSA/SHA384 (using NIST P-384)
245# ECDSA/SHA512 (using NIST P-521)
246RPM_SELF_SIGN_ALGO ?= "DSA"
247
248# Note: perl and sqlite w/o db specified does not currently work.
249# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
250PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python"
251
252# Note: switching to internal popt may not work, as it will generate
253# a shared library which will intentionally not be packaged.
254#
255# If you intend to use the internal version, additional work may be required.
256PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
257
258PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
259PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
260PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
261PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
262
263WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
264 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
265 --with-python-lib-dir=${PYTHON_SITEPACKAGES_DIR} \
266 --without-pythonembed"
267PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
268
269# Perl modules are not built, but they could be enabled fairly easily
270# the perl module creation and installation would need to be patched.
271# (currently has host perl contamination issues)
272WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm"
273WITHOUT_PERL = "--without-perl --without-perl-urpm"
274PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl,"
275
276# The --with-dbsql will only tell RPM to check for support, db
277# may or may not be built w/ the dbsql support.
278WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated"
279PACKAGECONFIG[db] = "${WITH_DB},--without-db,db,"
280
281PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3,"
282
283# This switch simply disables external beecrypt, RPM5 always uses beecrypt
284# for base64 processing and various digest algorithms.
285# Beecrypt is only the preferred crypto engine if it's the only engine enabled.
286PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt,"
287
288# --with-usecrypto= setting defined the item as the preferred system
289# crypto engine, which will take priority over the included beecrypt
290PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl,"
291PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss,"
292PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt,"
293
294PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
295PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
296
297WITH_SELINUX = "--with-selinux --with-sepol --with-semanage"
298WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage"
299PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux,"
300
301WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi"
302WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi"
303PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat,"
304
305PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat,"
306PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl,"
307
308PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
309
310EXTRA_OECONF += "--verbose \
311 --sysconfdir=${sysconfdir} \
312 --with-file \
313 --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \
314 --with-syck=internal \
315 --without-readline \
316 --without-libtasn1 \
317 --without-pakchois \
318 --without-gnutls \
319 --with-pcre \
320 --enable-utf8 \
321 --with-uuid \
322 --with-attr \
323 --with-acl \
324 --with-pthreads \
325 --without-cudf \
326 --without-ficl \
327 --without-aterm \
328 --without-nix \
329 --without-bash \
330 --without-rc \
331 --without-js \
332 --without-gpsee \
333 --without-ruby \
334 --without-squirrel \
335 --without-sasl2 \
336 --without-tomcrypt \
337 --with-build-extlibdep \
338 --with-build-maxextlibdep \
339 --without-valgrind \
340 --disable-openmp \
341 --enable-build-pic \
342 --enable-build-versionscript \
343 --enable-build-warnings \
344 --enable-build-debug \
345 --enable-maintainer-mode \
346 --with-path-macros=${rpm_macros} \
347 --with-path-lib=${libdir}/rpm \
348 --with-bugreport=http://bugzilla.yoctoproject.org \
349 --program-prefix= \
350 YACC=byacc"
351
352CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"
353
354LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
355
356PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale"
357
358SOLIBS = "5.4.so"
359
360# Based on %files section in the rpm.spec
361
362FILES_${PN} = "${bindir}/rpm \
363 ${bindir}/rpmconstant \
364 ${libdir}/rpm/rpm.* \
365 ${libdir}/rpm/tgpg \
366 ${libdir}/rpm/macros \
367 ${libdir}/rpm/rpmpopt \
368 ${libdir}/rpm/rpm2cpio \
369 ${libdir}/rpm/vcheck \
370 ${libdir}/rpm/helpers \
371 ${libdir}/rpm/qf \
372 ${libdir}/rpm/cpuinfo.yaml \
373 ${libdir}/rpm/bin/mtree \
374 ${libdir}/rpm/bin/rpmkey \
375 ${libdir}/rpm/bin/rpmrepo \
376 ${libdir}/rpm/bin/rpmrepo.real \
377 ${libdir}/rpm/bin/rpmspecdump \
378 ${libdir}/rpm/bin/rpmspecdump.real \
379 ${libdir}/rpm/bin/wget \
380 ${localstatedir}/cache \
381 ${localstatedir}/cache/rpm \
382 ${localstatedir}/cache/wdj \
383 ${localstatedir}/lib \
384 ${localstatedir}/lib/rpm \
385 ${localstatedir}/lib/wdj \
386 ${bindir}/rpm.real \
387 ${bindir}/rpmconstant.real \
388 "
389
390FILES_${PN}-common = "${bindir}/rpm2cpio \
391 ${bindir}/rpm2cpio.real \
392 ${bindir}/gendiff \
393 ${sysconfdir}/rpm \
394 ${localstatedir}/spool/repackage \
395 "
396
397FILES_${PN}-libs = "${libdir}/librpm-*.so \
398 ${libdir}/librpmconstant-*.so \
399 ${libdir}/librpmdb-*.so \
400 ${libdir}/librpmio-*.so \
401 ${libdir}/librpmmisc-*.so \
402 ${libdir}/librpmbuild-*.so \
403 "
404
405FILES_${PN}-build = "${prefix}/src/rpm \
406 ${bindir}/rpmbuild \
407 ${bindir}/rpmbuild.real \
408 ${libdir}/rpm/brp-* \
409 ${libdir}/rpm/check-files \
410 ${libdir}/rpm/cross-build \
411 ${libdir}/rpm/find-debuginfo.sh \
412 ${libdir}/rpm/find-lang.sh \
413 ${libdir}/rpm/find-prov.pl \
414 ${libdir}/rpm/find-provides.perl \
415 ${libdir}/rpm/find-req.pl \
416 ${libdir}/rpm/find-requires.perl \
417 ${libdir}/rpm/getpo.sh \
418 ${libdir}/rpm/http.req \
419 ${libdir}/rpm/javadeps.sh \
420 ${libdir}/rpm/mono-find-provides \
421 ${libdir}/rpm/mono-find-requires \
422 ${libdir}/rpm/executabledeps.sh \
423 ${libdir}/rpm/libtooldeps.sh \
424 ${libdir}/rpm/osgideps.pl \
425 ${libdir}/rpm/perldeps.pl \
426 ${libdir}/rpm/perl.prov \
427 ${libdir}/rpm/perl.req \
428 ${libdir}/rpm/php.prov \
429 ${libdir}/rpm/php.req \
430 ${libdir}/rpm/pkgconfigdeps.sh \
431 ${libdir}/rpm/pythondeps.sh \
432 ${libdir}/rpm/bin/debugedit \
433 ${libdir}/rpm/bin/debugedit.real \
434 ${libdir}/rpm/bin/rpmcache \
435 ${libdir}/rpm/bin/rpmcache.real \
436 ${libdir}/rpm/bin/rpmcmp \
437 ${libdir}/rpm/bin/rpmcmp.real \
438 ${libdir}/rpm/bin/rpmdeps \
439 ${libdir}/rpm/bin/rpmdeps.real \
440 ${libdir}/rpm/bin/rpmdeps-oecore \
441 ${libdir}/rpm/bin/rpmdeps-oecore.real \
442 ${libdir}/rpm/bin/rpmdigest \
443 ${libdir}/rpm/bin/rpmdigest.real \
444 ${libdir}/rpm/bin/abi-compliance-checker.pl \
445 ${libdir}/rpm/bin/api-sanity-autotest.pl \
446 ${libdir}/rpm/bin/chroot \
447 ${libdir}/rpm/bin/cp \
448 ${libdir}/rpm/bin/dbsql \
449 ${libdir}/rpm/bin/find \
450 ${libdir}/rpm/bin/install-sh \
451 ${libdir}/rpm/bin/lua \
452 ${libdir}/rpm/bin/luac \
453 ${libdir}/rpm/bin/mkinstalldirs \
454 ${libdir}/rpm/bin/rpmlua \
455 ${libdir}/rpm/bin/rpmluac \
456 ${libdir}/rpm/bin/sqlite3 \
457 ${libdir}/rpm/macros.d/cmake \
458 ${libdir}/rpm/macros.d/java \
459 ${libdir}/rpm/macros.d/libtool \
460 ${libdir}/rpm/macros.d/mandriva \
461 ${libdir}/rpm/macros.d/mono \
462 ${libdir}/rpm/macros.d/perl \
463 ${libdir}/rpm/macros.d/php \
464 ${libdir}/rpm/macros.d/pkgconfig \
465 ${libdir}/rpm/macros.d/python \
466 ${libdir}/rpm/macros.d/ruby \
467 ${libdir}/rpm/macros.d/selinux \
468 ${libdir}/rpm/macros.d/tcl \
469 ${libdir}/rpm/macros.rpmbuild \
470 ${libdir}/rpm/u_pkg.sh \
471 ${libdir}/rpm/vpkg-provides.sh \
472 ${libdir}/rpm/vpkg-provides2.sh \
473 ${libdir}/rpm/perfile_rpmdeps.sh \
474 ${distromacrodir} \
475 "
476RDEPENDS_${PN} = "base-files run-postinsts"
477RDEPENDS_${PN}_class-native = ""
478RDEPENDS_${PN}_class-nativesdk = ""
479RDEPENDS_${PN}-build = "file bash perl"
480
481RDEPENDS_python-rpm = "${PN} python"
482
483FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm"
484PROVIDES += "python-rpm"
485
486FILES_perl-module-rpm = "${libdir}/perl/*/* \
487 "
488
489RDEPENDS_${PN}-dev += "bash"
490
491FILES_${PN}-dev = "${includedir}/rpm \
492 ${libdir}/librpm.la \
493 ${libdir}/librpm.so \
494 ${libdir}/librpmconstant.la \
495 ${libdir}/librpmconstant.so \
496 ${libdir}/librpmdb.la \
497 ${libdir}/librpmdb.so \
498 ${libdir}/librpmio.la \
499 ${libdir}/librpmio.so \
500 ${libdir}/librpmmisc.la \
501 ${libdir}/librpmmisc.so \
502 ${libdir}/librpmbuild.la \
503 ${libdir}/librpmbuild.so \
504 ${libdir}/rpm/lib/liblua.la \
505 ${libdir}/pkgconfig/rpm.pc \
506 ${libdir}/rpm/rpmdb_loadcvt \
507 ${libdir}/rpm/include \
508 "
509
510FILES_${PN}-staticdev = " \
511 ${libdir}/librpm.a \
512 ${libdir}/librpmconstant.a \
513 ${libdir}/librpmdb.a \
514 ${libdir}/librpmio.a \
515 ${libdir}/librpmmisc.a \
516 ${libdir}/librpmbuild.a \
517 ${libdir}/rpm/lib/liblua.a \
518 ${PYTHON_SITEPACKAGES_DIR}/rpm/*.a \
519 "
520
521do_configure() {
522 # Disable tests!
523 echo "all:" > ${S}/tests/Makefile.am
524 sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in
525
526 ( cd ${S}; ${S}/autogen.sh )
527
528 # NASTY hack to make sure configure files the right pkg-config file...
529 sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \
530 -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure
531
532 ( cd ${S}/syck ; set +e ; rm -- -l* ; rm Makefile config.h config.status lib/Makefile libtool stamp-h1 tests/.deps tests/Makefile ) || :
533
534 export varprefix=${localstatedir}
535 oe_runconf
536}
537
538do_install_append() {
539 # Configure -distribution wide- package crypto settings
540 # If these change, effectively all packages have to be upgraded!
541 sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
542 sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
543
544 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
545 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
546 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
547 sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
548 sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
549
550 # Enable MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.)
551 sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
552
553 # Enable Debian style arbitrary tags...
554 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
555
556 install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
557 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
558
559 rm -f ${D}/${includedir}/popt.h
560 rm -f ${D}/${libdir}/libpopt.*
561 rm -f ${D}/${libdir}/pkgconfig/popt.pc
562 rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
563 rm -f ${D}/${mandir}/man3/popt.3
564
565 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.a
566 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.la
567 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.a
568 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.la
569
570 rm -f ${D}/${libdir}/rpm/dbconvert.sh
571 rm -f ${D}/${libdir}/rpm/libsqldb.*
572
573 rm -f ${D}/${libdir}/rpm/gstreamer.sh
574 rm -f ${D}/${libdir}/rpm/gem_helper.rb
575 rm -f ${D}/${libdir}/rpm/rubygems.rb
576 rm -f ${D}/${libdir}/rpm/kmod-deps.sh
577 rm -f ${D}/${libdir}/rpm/pythoneggs.py
578 rm -f ${D}/${libdir}/rpm/macros.d/kernel
579 rm -f ${D}/${libdir}/rpm/macros.d/gstreamer
580 rm -f ${D}/${libdir}/rpm/bin/mgo
581 rm -f ${D}/${libdir}/rpm/bin/pom2spec
582
583 rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
584 rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
585}
586
587do_install_append_class-target() {
588 # Create and install distribution specific macros
589 mkdir -p ${D}/${distromacrodir}
590 cat << EOF > ${D}/${distromacrodir}/macros
591%_defaultdocdir ${docdir}
592
593%_prefix ${prefix}
594%_exec_prefix ${exec_prefix}
595%_datarootdir ${datadir}
596%_bindir ${bindir}
597%_sbindir ${sbindir}
598%_libexecdir %{_libdir}/%{name}
599%_datadir ${datadir}
600%_sysconfdir ${sysconfdir}
601%_sharedstatedir ${sharedstatedir}
602%_localstatedir ${localstatedir}
603%_lib lib
604%_libdir %{_exec_prefix}/%{_lib}
605%_includedir ${includedir}
606%_oldincludedir ${oldincludedir}
607%_infodir ${infodir}
608%_mandir ${mandir}
609%_localedir %{_libdir}/locale
610EOF
611
612 # Create and install multilib specific macros
613 ${@multilib_rpmmacros(d)}
614}
615
616do_install_append_class-native () {
617 sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
618}
619
620do_install_append_class-nativesdk () {
621 sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
622}
623
624def multilib_rpmmacros(d):
625 localdata = d.createCopy()
626 # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
627 localdata.delVar('TOOLCHAIN_OPTIONS')
628
629 # Set 'localdata' values to be consistent with 'd' values.
630 distromacrodirVal = d.getVar('distromacrodir')
631 workdirVal = d.getVar('WORKDIR')
632 dval = d.getVar('D')
633
634 ret = gen_arch_macro(localdata)
635
636 variants = d.getVar("MULTILIB_VARIANTS") or ""
637 for item in variants.split():
638 # Load overrides from 'd' to avoid having to reset the value...
639 localdata = d.createCopy()
640 overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
641 localdata.setVar("OVERRIDES", overrides)
642 localdata.setVar("MLPREFIX", item + "-")
643 localdata.setVar('WORKDIR', workdirVal)
644 localdata.setVar('distromacrodir', distromacrodirVal)
645 localdata.setVar('D', dval)
646 ret += gen_arch_macro(localdata)
647 return ret
648
649def gen_arch_macro(d):
650 # Generate shell script to produce the file as part of do_install
651 val = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
652 val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
653 val += "%_lib ${baselib}\n"
654 val += "%_libdir ${libdir}\n"
655 val += "%_localedir ${localedir}\n"
656 val += "\n"
657 val += "# Toolchain configuration\n"
658 val += "%TOOLCHAIN_OPTIONS %{nil}\n"
659 val += "%__ar ${@d.getVar('AR').replace('$','%')}\n"
660 val += "%__as ${@d.getVar('AS').replace('$','%')}\n"
661 val += "%__cc ${@d.getVar('CC').replace('$','%')}\n"
662 val += "%__cpp ${@d.getVar('CPP').replace('$','%')}\n"
663 val += "%__cxx ${@d.getVar('CXX').replace('$','%')}\n"
664 val += "%__ld ${@d.getVar('LD').replace('$','%')}\n"
665 val += "%__nm ${@d.getVar('NM').replace('$','%')}\n"
666 val += "%__objcopy ${@d.getVar('OBJCOPY').replace('$','%')}\n"
667 val += "%__objdump ${@d.getVar('OBJDUMP').replace('$','%')}\n"
668 val += "%__ranlib ${@d.getVar('RANLIB').replace('$','%')}\n"
669 val += "%__strip ${@d.getVar('STRIP').replace('$','%')}\n"
670 val += "EOF\n"
671 val += "\n"
672 return d.expand(val)
673
674
675add_native_wrapper() {
676 create_wrapper ${D}/${bindir}/rpm \
677 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
678 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
679 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
680
681 create_wrapper ${D}/${bindir}/rpm2cpio \
682 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
683 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
684 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
685
686 create_wrapper ${D}/${bindir}/rpmbuild \
687 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
688 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
689 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
690
691 create_wrapper ${D}/${bindir}/rpmconstant \
692 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
693 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
694 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
695
696 for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do
697 create_wrapper $rpm_binary \
698 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
699 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/rpm} \
700 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/locale
701 done
702}
703
704do_install_append_class-native() {
705 add_native_wrapper
706}
707
708do_install_append_class-nativesdk() {
709 add_native_wrapper
710}
711
712BBCLASSEXTEND = "native nativesdk"