diff options
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm_5.4.0.bb')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.4.0.bb | 52 |
1 files changed, 2 insertions, 50 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb index ba1a2a2341..566325ea4a 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb | |||
@@ -43,12 +43,11 @@ LICENSE = "LGPL 2.1" | |||
43 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" | 43 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" |
44 | 44 | ||
45 | DEPENDS = "bzip2 zlib python perl db openssl elfutils expat libpcre attr acl popt" | 45 | DEPENDS = "bzip2 zlib python perl db openssl elfutils expat libpcre attr acl popt" |
46 | PR = "r10" | 46 | PR = "r11" |
47 | 47 | ||
48 | # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed | 48 | # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed |
49 | # in order to extract the distribution SRPM into a format we can extract... | 49 | # in order to extract the distribution SRPM into a format we can extract... |
50 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm \ | 50 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;unpack=rpm-5.4.0.tar.gz \ |
51 | file://rpm2cpio;md5=1850f9872a4803f5165bfd5816274275 \ | ||
52 | file://perfile_rpmdeps.sh \ | 51 | file://perfile_rpmdeps.sh \ |
53 | file://rpm-autogen.patch \ | 52 | file://rpm-autogen.patch \ |
54 | file://rpm-libsql-fix.patch \ | 53 | file://rpm-libsql-fix.patch \ |
@@ -66,8 +65,6 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm \ | |||
66 | SRC_URI[md5sum] = "19c1a7f68d7765eeb7615c9c4e54e380" | 65 | SRC_URI[md5sum] = "19c1a7f68d7765eeb7615c9c4e54e380" |
67 | SRC_URI[sha256sum] = "887e76218308b570c33c8c2fb10b5298b3afd5d602860d281befc85357b3b923" | 66 | SRC_URI[sha256sum] = "887e76218308b570c33c8c2fb10b5298b3afd5d602860d281befc85357b3b923" |
68 | 67 | ||
69 | SRPM_UNPACK = "rpm-5.4.0.tar.gz" | ||
70 | |||
71 | inherit autotools gettext | 68 | inherit autotools gettext |
72 | 69 | ||
73 | acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" | 70 | acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" |
@@ -328,51 +325,6 @@ FILE_${PN}-dev = "${includedir}/rpm \ | |||
328 | ###%{_rpmhome}/lib/librpmjsm.la | 325 | ###%{_rpmhome}/lib/librpmjsm.la |
329 | ###%{_rpmhome}/lib/librpmjsm.so | 326 | ###%{_rpmhome}/lib/librpmjsm.so |
330 | 327 | ||
331 | def subprocess_setup(): | ||
332 | import signal | ||
333 | # Python installs a SIGPIPE handler by default. This is usually not what | ||
334 | # non-Python subprocesses expect. | ||
335 | # SIGPIPE errors are known issues with gzip/bash | ||
336 | signal.signal(signal.SIGPIPE, signal.SIG_DFL) | ||
337 | |||
338 | # If base_do_unpack is refactored this may have to be adjusted | ||
339 | python base_do_unpack_append() { | ||
340 | import subprocess | ||
341 | |||
342 | for url in bb.data.getVar("SRC_URI", d, True).split(): | ||
343 | local = bb.fetch2.localpath(url, d) | ||
344 | if local is None: | ||
345 | continue | ||
346 | local = os.path.realpath(local) | ||
347 | |||
348 | if local.endswith('.src.rpm') or local.endswith('.srpm'): | ||
349 | cmdname = os.path.join(bb.data.getVar('WORKDIR', localdata, 1),'rpm2cpio') | ||
350 | efile = os.path.join(bb.data.getVar('WORKDIR', localdata, 1),os.path.basename(local)) | ||
351 | cmd = "%s %s | cpio -i" % (cmdname, efile) | ||
352 | cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', localdata, 1), cmd) | ||
353 | old_cwd = os.getcwd() | ||
354 | newdir = os.path.join(d.getVar("WORKDIR", True), 'srpm-unpack') | ||
355 | bb.mkdirhier(newdir) | ||
356 | os.chdir(newdir) | ||
357 | ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True) | ||
358 | os.chdir(old_cwd) | ||
359 | if ret != 0: | ||
360 | raise bb.build.FuncFailed('Unpack command failed: %s (%s)' % (cmd, ret)) | ||
361 | |||
362 | srpm_uri = bb.data.getVar('SRPM_UNPACK', localdata, True).split() | ||
363 | if len(srpm_uri) == 0: | ||
364 | return | ||
365 | |||
366 | rootdir = bb.data.getVar('WORKDIR', localdata, True) | ||
367 | srpm_file_uri = [ "file://" + rootdir + "/srpm-unpack/" + uri for uri in srpm_uri]; | ||
368 | |||
369 | try: | ||
370 | fetcher = bb.fetch2.Fetch(srpm_file_uri, localdata, cache=False) | ||
371 | fetcher.unpack(rootdir, srpm_file_uri) | ||
372 | except bb.fetch2.BBFetchException, e: | ||
373 | raise bb.build.FuncFailed(e) | ||
374 | } | ||
375 | |||
376 | do_configure() { | 328 | do_configure() { |
377 | # Disable tests! | 329 | # Disable tests! |
378 | echo "all:" > tests/Makefile.am | 330 | echo "all:" > tests/Makefile.am |