Skip to contentSkip to conversation

Fix RPM regressions for Pyro

PATCH In review Peter Kjellerstedt 2 participants 28 messages Aug 29, 2017 – Aug 31, 2017

lore
Share & tools
lore
#2 lore raw

PATCH 2/25 package_manager.py: Generate correct RPM package names again

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

During the transition to RPM4, the package names returned by RpmPM.list_installed() changed from the expected names of the packages that were installed into the image to some fictitious source RPM names.

This restores the original functionality so that the installed-packages.txt files produced by inheriting buildhistory yet again contains a list of the names of the installed packages.

---
 meta/lib/oe/package_manager.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/lib/oe/package_manager.py +3 -3
index 28c6b2aec2..518cf8dbe3 100644
@@ -650,7 +650,7 @@ class RpmPM(PackageManager):
                             symlinks=True)
 
     def list_installed(self):
-        output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{sourcerpm}\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"],
+        output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{name}-%{version}-%{release}.%{arch}.rpm\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"],
                                   print_output = False)
         packages = {}
         current_package = None
@@ -662,8 +662,8 @@ class RpmPM(PackageManager):
                 current_package = package_info[0]
                 package_arch = package_info[1]
                 package_version = package_info[2]
-                package_srpm = package_info[3]
-                packages[current_package] = {"arch":package_arch, "ver":package_version, "filename":package_srpm}
+                package_rpm = package_info[3]
+                packages[current_package] = {"arch":package_arch, "ver":package_version, "filename":package_rpm}
                 current_deps = []
             elif line.startswith("Dependencies:"):
                 current_state = "dependencies"
Signature · 1 line
2.12.0
#6 lore raw

PATCH 6/25 insane.bbclass: Improve the handling of runtime file dependencies

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

This makes the file-rdeps test support:
* versioned dependencies, e.g., "perl (>= 5.000)", and
* package dependencies among the file dependencies, e.g., "perl".

It also ignores all "perl(...)" dependencies since it is expected that these are generated and handled by rpm itself and there is no reason to second guess what it is doing.

---
 meta/classes/insane.bbclass | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
meta/classes/insane.bbclass +10 -6
index 258856266e..fa932ef576 100644
@@ -912,8 +912,9 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
             rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
             for key in rdep_data:
                 if key.startswith("FILERDEPENDS_"):
-                    for subkey in rdep_data[key].split():
-                        if subkey not in ignored_file_rdeps:
+                    for subkey in bb.utils.explode_deps(rdep_data[key]):
+                        if subkey not in ignored_file_rdeps and \
+                                not subkey.startswith('perl('):
                             # We already know it starts with FILERDEPENDS_
                             filerdepends[subkey] = key[13:]
 
@@ -928,11 +929,10 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
                         sub_rdeps = rdep_data.get("RDEPENDS_" + rdep)
                         if not sub_rdeps:
                             continue
-                        for sub_rdep in sub_rdeps.split():
+                        for sub_rdep in bb.utils.explode_deps(sub_rdeps):
                             if sub_rdep in done:
                                 continue
-                            if not sub_rdep.startswith('(') and \
-                                    oe.packagedata.has_subpkgdata(sub_rdep, d):
+                            if oe.packagedata.has_subpkgdata(sub_rdep, d):
                                 # It's a new rdep
                                 done.append(sub_rdep)
                                 new.append(sub_rdep)
@@ -950,11 +950,15 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
                         filerdepends.pop("/usr/bin/python",None)
                         done.remove(py)
                 for rdep in done:
+                    # The file dependencies may contain package names, e.g.,
+                    # perl
+                    filerdepends.pop(rdep,None)
+
                     # For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
                     rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
                     for key in rdep_data:
                         if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES_"):
-                            for subkey in rdep_data[key].split():
+                            for subkey in bb.utils.explode_deps(rdep_data[key]):
                                 filerdepends.pop(subkey,None)
                         # Add the files list to the rprovides
                         if key == "FILES_INFO":
Signature · 1 line
2.12.0
#0 lore raw

cover Fix RPM regressions for Pyro

These are the backported changes from master that re-adds support for having rpm generating file dependencies.

The only change compared to master is in the last patch. There I have added a new variable called ENABLE_RPM_FILEDEPS_FOR_PYRO. Unless it is set to "1", the RPM file dependency machinery will not be activated. This should make it possible to integrate these changes to Pyro, without risking that they break builds for anyone who do not expect the dependency requirements to change. The name of the variable was chosen to clearly indicate that this only affects Pyro.

The first patch in the series is strictly not related to the RPM changes, but since I cannot build core-image-sato without it, I included it here to make my life a little easier.

//Peter

The following changes since commit 9842f64154e633c198b201fae01dbab1fb04c74e:

rootfs-postcommands.bbclass: Prevent linking testdata to itself (2017-08-29 12:22:06 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib pkj/rpm_regressions-pyro
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/rpm_regressions-pyro

Alexander Kanavin (1):
libxml2: move python module to Python 3

Mark Hatle (2):
ltp: Skip the filedependency scan
rpm: Disable perl dependency generation

Martin Jansa (1):
libcheck: fix file-rdeps QA issue

Peter Kjellerstedt (20):
gtk+3: Update the patches to work with old versions of patch package_manager.py: Generate correct RPM package names again
libxml2: Make ptest run the Python tests if Python support is enabled insane.bbclass: Report all file-rdeps errors, not just the first insane.bbclass: Improve the handling of runtime file dependencies buildhistory.bbclass: Improve the generated depends.dot file toaster.bbclass: Simplify parsing of depends.dot toaster.bbclass: Ignore some dependencies in
toaster_buildhistory_dump()
rpm: Simplify the creation of wrappers for the native tools
rpm: Create a wrapper for the native rpmdeps tool
rpm: Do not require that ELF binaries are executable to be
identifiable
rpm: Use conditional to access %{_docdir} in macros.in
rpm: Add a new option --alldeps to rpmdeps
insane.bbclass: Ignore perl as dependency for nativesdk packages
perl: Do not generate file dependencies for perl-ptest
rpm: Add dependencies on bash, perl and python3-core
git: Do not install git cvsserver and git svn by default
texinfo: Avoid a problem with a dependency on perl(Locale::gettext_xs) package_rpm.bbclass: Filter out unwanted file deps for nativesdk
packages
package.bbclass: Restore functionality to detect RPM dependencies

Richard Purdie (1):
bind: Use correct python interpreter path

 meta/classes/buildhistory.bbclass                  |  15 +-
 meta/classes/insane.bbclass                        |  20 +-
 meta/classes/package.bbclass                       |  11 +-
 meta/classes/package_rpm.bbclass                   |  25 +-
 meta/classes/toaster.bbclass                       |  36 +--
 meta/lib/oe/package.py                             |  60 +++--
 meta/lib/oe/package_manager.py                     |   6 +-
 meta/recipes-connectivity/bind/bind_9.10.3-P3.bb   |   2 +-
 ...run-the-python-tests-if-python-is-enabled.patch |  99 ++++++++
 meta/recipes-core/libxml/libxml2_2.9.4.bb          |  17 +-
 meta/recipes-devtools/git/git.inc                  |  21 ++
 meta/recipes-devtools/perl/perl-ptest.inc          |   4 +
 .../rpm/files/0001-perl-disable-auto-reqs.patch    |  32 +++
 ...ire-that-ELF-binaries-are-executable-to-b.patch |  32 +++
 ...onditional-to-access-_docdir-in-macros.in.patch |  36 +++
 .../0013-Add-a-new-option-alldeps-to-rpmdeps.patch | 152 ++++++++++++
 meta/recipes-devtools/rpm/rpm_git.bb               |  83 +++----
 meta/recipes-extended/ltp/ltp_20170116.bb          |   5 +
 meta/recipes-extended/texinfo/texinfo_6.3.bb       |   6 +
 .../gtk+/gtk+3/0001-Hardcoded-libtool.patch        |  12 +-
 ...Do-not-try-to-initialize-GL-without-libGL.patch |   8 +-
 .../0003-Add-disable-opengl-configure-option.patch | 268 +++++++++++++++------
 ...4-configure.ac-Fix-wayland-protocols-path.patch |   8 +-
 meta/recipes-support/libcheck/libcheck_0.10.0.bb   |   1 -
 24 files changed, 756 insertions(+), 203 deletions(-)
 create mode 100644 meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch
Signature · 1 line
2.12.0
#4 lore raw

PATCH 4/25 libxml2: Make ptest run the Python tests if Python support is enabled

From: Peter Kjellerstedt <[email protected]>

Since we go through the trouble of copying the Python tests, we may as well actually run them...

This also avoids the following QA issue:

ERROR: libxml2-2.9.4-r0 do_package_qa: QA Issue:
/usr/lib/libxml2/ptest/python/tests/push.py contained in package libxml2-ptest requires /usr/bin/python, but no providers found in RDEPENDS_libxml2-ptest? [file-rdeps]

---
 ...run-the-python-tests-if-python-is-enabled.patch | 99 ++++++++++++++++++++++
 meta/recipes-core/libxml/libxml2_2.9.4.bb          | 11 ++-
 2 files changed, 108 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch new file +99 -0
new file mode 100644
index 0000000000..d1ad55116a
@@ -0,0 +1,99 @@
+From 78dbd4c09d617a9cb730d796f94ee4d93840d3cc Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <[email protected]>
+Date: Fri, 9 Jun 2017 17:50:46 +0200
+Subject: [PATCH] Make ptest run the python tests if python is enabled
+
+One of the tests (tstLastError.py) needed a minor correction. It might
+be due to the fact that the tests are forced to run with Python 3.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Peter Kjellerstedt <[email protected]>
+---
+ Makefile.am                  |  2 +-
+ python/Makefile.am           |  9 +++++++++
+ python/tests/Makefile.am     | 12 ++++++++++--
+ python/tests/tstLastError.py |  2 +-
+ 4 files changed, 21 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e181ee0..7960e7d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -207,9 +207,9 @@ install-ptest:
+ 	install $(noinst_PROGRAMS) $(DESTDIR))
+ 	cp -r $(srcdir)/test $(DESTDIR)
+ 	cp -r $(srcdir)/result $(DESTDIR)
+-	cp -r $(srcdir)/python $(DESTDIR)
+ 	cp Makefile $(DESTDIR)
+ 	sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
++	$(MAKE) -C python install-ptest
+ 
+ runtests:
+ 	[ -d test   ] || $(LN_S) $(srcdir)/test   .
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 34aed96..ba3ec6a 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+ 
+ $(GENERATED): $(srcdir)/generator.py $(API_DESC)
+ 	$(PYTHON) $(srcdir)/generator.py $(srcdir)
++
++install-ptest:
++	cp -r $(srcdir) $(DESTDIR)
++	sed -e 's|^Makefile:|_Makefile:|' \
++	    -e 's|^\(tests test:\) all|\1|' Makefile >$(DESTDIR)/python/Makefile
++	$(MAKE) -C tests install-ptest
++else
++install-ptest:
+ endif
+ 
++.PHONY: tests test
+ tests test: all
+ 	cd tests && $(MAKE) tests
+diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
+index 95ebead..418e21e 100644
+--- a/python/tests/Makefile.am
++++ b/python/tests/Makefile.am
+@@ -59,6 +59,11 @@ XMLS=		\
+ CLEANFILES = core tmp.xml *.pyc
+ 
+ if WITH_PYTHON
++install-ptest:
++	cp -r $(srcdir) $(DESTDIR)/python
++	sed -e 's|^Makefile:|_Makefile:|' \
++	    -e 's|^\(srcdir = \).*|\1.|' Makefile >$(DESTDIR)/python/tests/Makefile
++
+ tests: $(PYTESTS)
+ 	@for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
+ 	@echo "## running Python regression tests"
+@@ -68,8 +73,11 @@ tests: $(PYTESTS)
+ 	   export LD_LIBRARY_PATH; \
+ 	   for test in $(PYTESTS) ; \
+ 	   do log=`$(PYTHON) $(srcdir)/$$test` ; \
+-	   if [ "`echo $$log | grep OK`" = "" ] ; then \
+-	   echo "-- $$test" ; echo "$$log" ; fi ; done)
++	   if [ "`echo $$log | grep OK`" ]; then \
++	   echo "PASS: $$test"; else \
++	   echo "$$log"; echo "FAIL: $$test"; fi; done)
+ else
++install-ptest:
++
+ tests:
+ endif
+diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py
+index d5f9be7..3e5bef8 100755
+--- a/python/tests/tstLastError.py
++++ b/python/tests/tstLastError.py
+@@ -25,7 +25,7 @@ class TestCase(unittest.TestCase):
+         when the exception is raised, check the libxml2.lastError for
+         expected values."""
+         # disable the default error handler
+-        libxml2.registerErrorHandler(None,None)
++        libxml2.registerErrorHandler(lambda ctx,str: None,None)
+         try:
+             f(*args)
+         except exc:
+-- 
+2.12.0
+
meta/recipes-core/libxml/libxml2_2.9.4.bb +9 -2
index 4de88d39a4..677d8c9bb5 100644
@@ -29,7 +29,8 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
            file://libxml2-CVE-2017-5969.patch \
            file://libxml2-CVE-2017-0663.patch \
            file://CVE-2016-9318.patch \
-          "
+           file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
+           "
 
 SRC_URI[libtar.md5sum] = "ae249165c173b1ff386ee8ad676815f5"
 SRC_URI[libtar.sha256sum] = "ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c"
@@ -48,7 +49,7 @@ inherit autotools pkgconfig binconfig-disabled ptest
 
 inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
 
-RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
+RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-argparse python3-logging python3-shell python3-signal python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
 
 RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
 
@@ -82,6 +83,12 @@ do_configure_prepend () {
 
 do_install_ptest () {
 	cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
+	if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
+		sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \
+		    ${D}${PTEST_PATH}/python/tests/Makefile
+		grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
+			xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
+	fi
 }
 
 do_install_append_class-native () {
Signature · 1 line
2.12.0
#17 lore raw

PATCH 17/25 rpm: Add dependencies on bash, perl and python3-core

In reply to Peter Kjellerstedt

Also modify a Python script (pythondistdeps.py) to use Python 3.

---
 meta/recipes-devtools/rpm/rpm_git.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-devtools/rpm/rpm_git.bb +5 -0
index 5fe52b83ec..971aac7867 100644
@@ -99,6 +99,9 @@ do_install_append_class-target() {
 
 do_install_append () {
 	sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}/${libdir}/rpm/macros
+
+	sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
+	    ${D}${libdir}/rpm/pythondistdeps.py
 }
 
 FILES_${PN} += "${libdir}/rpm-plugins/*.so \
@@ -113,3 +116,5 @@ FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*"
 
 # rpm 5.x was packaging the rpm build tools separately
 RPROVIDES_${PN} += "rpm-build"
+
+RDEPENDS_${PN} = "bash perl python3-core"
Signature · 1 line
2.12.0
#7 lore raw

PATCH 7/25 buildhistory.bbclass: Improve the generated depends.dot file

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

* Convert incorrectly formatted dependencies such as:

    "bar -> "foo" ">=" "1.2.3"
  into dependencies with edge labels:
    "bar -> "foo" [label=">= 1.2.3"]
* Remove rpmlib() and config() dependencies such as:
    "foo" -> "rpmlib(CompressedFileNames)" [label="<= 3.0.4-1"]
  and:
    "base-files" -> "config(base-files)" [label="= 3.0.14-r89.49"]

* Remove the trailing semicolon that was added to each line. It fills no purpose.

---
 meta/classes/buildhistory.bbclass | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
meta/classes/buildhistory.bbclass +11 -4
index 8eafdc9f72..3823c664ab 100644
@@ -446,13 +446,20 @@ buildhistory_get_installed() {
 
 	# Produce dependency graph
 	# First, quote each name to handle characters that cause issues for dot
-	sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp && \
+	sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp &&
 		rm ${WORKDIR}/bh_installed_pkgs_deps.txt
-	# Change delimiter from pipe to -> and set style for recommend lines
-	sed -i -e 's:|: -> :' -e 's:"\[REC\]":[style=dotted]:' -e 's:$:;:' $1/depends.tmp
+	# Remove lines with rpmlib(...) and config(...) dependencies, change the
+	# delimiter from pipe to "->", set the style for recommend lines and
+	# turn versioned dependencies into edge labels.
+	sed -i -e '/rpmlib(/d' \
+	       -e '/config(/d' \
+	       -e 's:|: -> :' \
+	       -e 's:"\[REC\]":[style=dotted]:' \
+	       -e 's:"\([<>=]\+\)" "\([^"]*\)":[label="\1 \2"]:' \
+		$1/depends.tmp
 	# Add header, sorted and de-duped contents and footer and then delete the temp file
 	printf "digraph depends {\n    node [shape=plaintext]\n" > $1/depends.dot
-	cat $1/depends.tmp | sort | uniq >> $1/depends.dot
+	cat $1/depends.tmp | sort -u >> $1/depends.dot
 	echo "}" >>  $1/depends.dot
 	rm $1/depends.tmp
 
Signature · 1 line
2.12.0
#8 lore raw

PATCH 8/25 toaster.bbclass: Simplify parsing of depends.dot

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

By using a single regular expression, the parsing of the depends.dot file can be simplified a lot. This should also make it less susceptible to formatting changes in that file.

---
 meta/classes/toaster.bbclass | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)
meta/classes/toaster.bbclass +13 -15
index 296e4764f0..fbf463bbb7 100644
@@ -270,22 +270,20 @@ python toaster_buildhistory_dump() {
                     images[target][pname.strip()] = {'size':int(psize)*1024, 'depends' : []}
 
             with open("%s/depends.dot" % installed_img_path, "r") as fin:
-                p = re.compile(r' -> ')
-                dot = re.compile(r'.*style=dotted')
+                p = re.compile(r'\s*"(?P<name>[^"]+)"\s*->\s*"(?P<dep>[^"]+)"(?P<rec>.*?\[style=dotted\])?')
                 for line in fin:
-                    line = line.rstrip(';')
-                    linesplit = p.split(line)
-                    if len(linesplit) == 2:
-                        pname = linesplit[0].rstrip('"').strip('"')
-                        dependsname = linesplit[1].split(" ")[0].strip().strip(";").strip('"').rstrip('"')
-                        deptype = "depends"
-                        if dot.match(line):
-                            deptype = "recommends"
-                        if not pname in images[target]:
-                            images[target][pname] = {'size': 0, 'depends' : []}
-                        if not dependsname in images[target]:
-                            images[target][dependsname] = {'size': 0, 'depends' : []}
-                        images[target][pname]['depends'].append((dependsname, deptype))
+                    m = p.match(line)
+                    if not m:
+                        continue
+                    pname = m.group('name')
+                    dependsname = m.group('dep')
+                    deptype = 'recommends' if m.group('rec') else 'depends'
+
+                    if not pname in images[target]:
+                        images[target][pname] = {'size': 0, 'depends' : []}
+                    if not dependsname in images[target]:
+                        images[target][dependsname] = {'size': 0, 'depends' : []}
+                    images[target][pname]['depends'].append((dependsname, deptype))
 
             # files-in-image.txt is only generated if an image file is created,
             # so the file entries ('syms', 'dirs', 'files') for a target will be
Signature · 1 line
2.12.0
#22 lore raw

PATCH 20/25 package_rpm.bbclass: Filter out unwanted file deps for nativesdk packages

In reply to Peter Kjellerstedt

Filter out any file dependencies on absolute paths and any dependencies on Perl modules for nativesdk packages. It is assumed that they will be provided by the native host if needed, and they mess up the dependency handling if they are present.

---
 meta/classes/package_rpm.bbclass | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)
meta/classes/package_rpm.bbclass +23 -2
index 084546f733..62324b30a0 100644
@@ -7,10 +7,28 @@ RPMBUILD="rpmbuild"
 
 PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
 
-# Maintaining the perfile dependencies has singificant overhead when writing the 
+# Maintaining the perfile dependencies has singificant overhead when writing the
 # packages. When set, this value merges them for efficiency.
 MERGEPERFILEDEPS = "1"
 
+# Filter dependencies based on a provided function.
+def filter_deps(var, f):
+    import collections
+
+    depends_dict = bb.utils.explode_dep_versions2(var)
+    newdeps_dict = collections.OrderedDict()
+    for dep in depends_dict:
+        if f(dep):
+            newdeps_dict[dep] = depends_dict[dep]
+    return bb.utils.join_deps(newdeps_dict, commasep=False)
+
+# Filter out absolute paths (typically /bin/sh and /usr/bin/env) and any perl
+# dependencies for nativesdk packages.
+def filter_nativesdk_deps(srcname, var):
+    if var and srcname.startswith("nativesdk-"):
+        var = filter_deps(var, lambda dep: not dep.startswith('/') and dep != 'perl' and not dep.startswith('perl('))
+    return var
+
 # Construct per file dependencies file
 def write_rpm_perfiledata(srcname, d):
     workdir = d.getVar('WORKDIR')
@@ -26,7 +44,8 @@ def write_rpm_perfiledata(srcname, d):
             dependsflist = (d.getVar(dependsflist_key) or "")
             for dfile in dependsflist.split():
                 key = "FILE" + varname + "_" + dfile + "_" + pkg
-                depends_dict = bb.utils.explode_dep_versions(d.getVar(key) or "")
+                deps = filter_nativesdk_deps(srcname, d.getVar(key) or "")
+                depends_dict = bb.utils.explode_dep_versions(deps)
                 file = dfile.replace("@underscore@", "_")
                 file = file.replace("@closebrace@", "]")
                 file = file.replace("@openbrace@", "[")
@@ -359,6 +378,8 @@ python write_specfile () {
             splitrdepends = splitrdepends + " " + get_perfile('RDEPENDS', pkg, d)
             splitrprovides = splitrprovides + " " + get_perfile('RPROVIDES', pkg, d)
 
+        splitrdepends = filter_nativesdk_deps(srcname, splitrdepends)
+
         # Gather special src/first package data
         if srcname == splitname:
             srcrdepends    = splitrdepends
Signature · 1 line
2.12.0
#3 lore raw

PATCH 3/25 libxml2: move python module to Python 3

In reply to Peter Kjellerstedt

From: Alexander Kanavin <[email protected]>

---
 meta/recipes-core/libxml/libxml2_2.9.4.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/recipes-core/libxml/libxml2_2.9.4.bb +4 -4
index 3b081dd2fe..4de88d39a4 100644
@@ -41,16 +41,16 @@ BINCONFIG = "${bindir}/xml2-config"
 PACKAGECONFIG ??= "python \
     ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
 "
-PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
 
 inherit autotools pkgconfig binconfig-disabled ptest
 
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'pythonnative', '', d)}
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
 
-RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-core', '', d)}"
+RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
 
-RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-core', '', d)}"
+RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
 
 RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
 
Signature · 1 line
2.12.0
#9 lore raw

PATCH 9/25 toaster.bbclass: Ignore some dependencies in toaster_buildhistory_dump()

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

When using RPM, depends.dot may contain dependencies such as "/bin/sh", which will confuse _toaster_load_pkgdatafile(). Ignore them. While at it, also ignore dependencies that contain parentheses, e.g., "libc.so.6(GLIBC_2.7)".

---
 meta/classes/toaster.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/classes/toaster.bbclass +8 -0
index fbf463bbb7..6cef0b8f6e 100644
@@ -279,6 +279,14 @@ python toaster_buildhistory_dump() {
                     dependsname = m.group('dep')
                     deptype = 'recommends' if m.group('rec') else 'depends'
 
+                    # If RPM is used for packaging, then there may be
+                    # dependencies such as "/bin/sh", which will confuse
+                    # _toaster_load_pkgdatafile() later on. While at it, ignore
+                    # any dependencies that contain parentheses, e.g.,
+                    # "libc.so.6(GLIBC_2.7)".
+                    if dependsname.startswith('/') or '(' in dependsname:
+                        continue
+
                     if not pname in images[target]:
                         images[target][pname] = {'size': 0, 'depends' : []}
                     if not dependsname in images[target]:
Signature · 1 line
2.12.0
#13 lore raw

PATCH 13/25 rpm: Use conditional to access %{_docdir} in macros.in

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

This avoids the following warning:

warning: Ignoring invalid regex %{_docdir}

when runing rpmdeps -R <file>, since %{_docdir} is only defined when parsing a spec file.

---
 ...onditional-to-access-_docdir-in-macros.in.patch | 36 ++++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_git.bb               |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch
meta/recipes-devtools/rpm/files/0012-Use-conditional-to-access-_docdir-in-macros.in.patch new file +36 -0
new file mode 100644
index 0000000000..996da90d43
@@ -0,0 +1,36 @@
+From 77808db4036dc4a012c47aca36255549ed764a6a Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <[email protected]>
+Date: Tue, 16 May 2017 10:58:18 +0200
+Subject: [PATCH 12/13] Use conditional to access %{_docdir} in macros.in
+
+This avoids the following warning:
+
+warning: Ignoring invalid regex %{_docdir}
+
+when runing `rpmdeps -R <file>`, since %{_docdir} is only defined when
+parsing a spec file (in parseSpec()).
+
+Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/216]
+Signed-off-by: Peter Kjellerstedt <[email protected]>
+---
+ macros.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/macros.in b/macros.in
+index 84ae25275..cca67a500 100644
+--- a/macros.in
++++ b/macros.in
+@@ -200,8 +200,8 @@ package or when debugging this package.\
+ # Their purpouse is to set up global filtering for all packages. If you need
+ # to set up specific filtering for your package use %__requires_exclude_from
+ # and %__provides_exclude_from instead.
+-%__global_requires_exclude_from		%{_docdir}
+-%__global_provides_exclude_from		%{_docdir}
++%__global_requires_exclude_from		%{?_docdir:%{_docdir}}
++%__global_provides_exclude_from		%{?_docdir:%{_docdir}}
+ 
+ #	The path to the gzip executable (legacy, use %{__gzip} instead).
+ %_gzipbin		%{__gzip}
+-- 
+2.12.0
+
meta/recipes-devtools/rpm/rpm_git.bb +1 -0
index 15880377b8..7c5f649a8b 100644
@@ -36,6 +36,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm \
            file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
            file://0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch \
            file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
+           file://0012-Use-conditional-to-access-_docdir-in-macros.in.patch \
            "
 
 PV = "4.13.90+git${SRCPV}"
Signature · 1 line
2.12.0
#24 lore raw

PATCH 22/25 ltp: Skip the filedependency scan

In reply to Peter Kjellerstedt

From: Mark Hatle <[email protected]>

Since LTP includes a set of test cases, we need to skip file dependency generation, as there will be dependencies that can not be satisfied. In this case a csh and ksh dependency come from two tests.

The alternative would be to depend on csh/ksh (a bad idea as they're not available in oe-core) or remove the tests (but this eliminates the tests if someone DOES have csh/ksh in their configurations.)

---
 meta/recipes-extended/ltp/ltp_20170116.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-extended/ltp/ltp_20170116.bb +5 -0
index a5494bc809..58af104919 100644
@@ -107,3 +107,8 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 # However, test_arch_stripped is already stripped, so...
 INSANE_SKIP_${PN} += "already-stripped"
 
+# Avoid file dependency scans, as LTP checks for things that may or may not
+# exist on the running system.  For instance it has specific checks for
+# csh and ksh which are not typically part of OpenEmbedded systems (but
+# can be added via additional layers.)
+SKIP_FILEDEPS_${PN} = '1'
Signature · 1 line
2.12.0
#5 lore raw

PATCH 5/25 insane.bbclass: Report all file-rdeps errors, not just the first

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

---
 meta/classes/insane.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/insane.bbclass +1 -1
index 5a3d017004..258856266e 100644
@@ -968,7 +968,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
                 for key in filerdepends:
                     error_msg = "%s contained in package %s requires %s, but no providers found in RDEPENDS_%s?" % \
                             (filerdepends[key].replace("_%s" % pkg, "").replace("@underscore@", "_"), pkg, key, pkg)
-                package_qa_handle_error("file-rdeps", error_msg, d)
+                    package_qa_handle_error("file-rdeps", error_msg, d)
 
 def package_qa_check_deps(pkg, pkgdest, skip, d):
 
Signature · 1 line
2.12.0
#19 lore raw

PATCH 19/25 texinfo: Avoid a problem with a dependency on perl(Locale::gettext_xs)

In reply to Peter Kjellerstedt

We do not build the Locale::gettext_xs Perl module and the code will test for it and happily use Locale::gettext_pp instead if it is not found. However, this still causes a file dependency on perl(Locale::gettext_xs) to be generated, which must be satisfied by adding an explicit provide for it.

---
 meta/recipes-extended/texinfo/texinfo_6.3.bb | 6 ++++++
 1 file changed, 6 insertions(+)
meta/recipes-extended/texinfo/texinfo_6.3.bb +6 -0
index d82731e11e..f58df928aa 100644
@@ -79,4 +79,10 @@ FILES_${PN}-doc = "${infodir}/texinfo* \
                    ${datadir}/${tex_texinfo} \
                    ${mandir}/man1 ${mandir}/man5"
 
+# Lie about providing the Locale::gettext_xs module. It is not actually built,
+# but the code will test for it and if not found use Locale::gettext_pp instead.
+# However, this causes a file dependency on perl(Locale::gettext_xs) to be
+# generated, which must be satisfied.
+RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.12.0
#10 lore raw

PATCH 10/25 rpm: Simplify the creation of wrappers for the native tools

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

Use a loop rather than calling create_wrapper for each individual tool.

---
 meta/recipes-devtools/rpm/rpm_git.bb | 73 ++++++++++--------------------------
 1 file changed, 19 insertions(+), 54 deletions(-)
meta/recipes-devtools/rpm/rpm_git.bb +19 -54
index 2310ee6b09..531669ae73 100644
@@ -67,62 +67,27 @@ BBCLASSEXTEND = "native nativesdk"
 # Direct rpm-native to read configuration from our sysroot, not the one it was compiled in
 # libmagic also has sysroot path contamination, so override it
 do_install_append_class-native() {
-        create_wrapper ${D}/${bindir}/rpmbuild \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-
-        create_wrapper ${D}/${bindir}/rpmsign \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-
-        create_wrapper ${D}/${bindir}/rpmkeys \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-
-        create_wrapper ${D}/${bindir}/rpm \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-
-        create_wrapper ${D}/${bindir}/rpm2archive \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-
-        create_wrapper ${D}/${bindir}/rpm2cpio \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-
-        create_wrapper ${D}/${bindir}/rpmdb \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-
-        create_wrapper ${D}/${bindir}/rpmgraph \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
-
-        create_wrapper ${D}/${bindir}/rpmspec \
-                RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
-                RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
-                MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
-                RPM_NO_CHROOT_FOR_SCRIPTS=1
+        tools="\
+                ${bindir}/rpm \
+                ${bindir}/rpm2archive \
+                ${bindir}/rpm2cpio \
+                ${bindir}/rpmbuild \
+                ${bindir}/rpmdb \
+                ${bindir}/rpmgraph \
+                ${bindir}/rpmkeys \
+                ${bindir}/rpmsign \
+                ${bindir}/rpmspec \
+        "
+
+        for tool in $tools; do
+                create_wrapper ${D}$tool \
+                        RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
+                        RPM_ETCCONFIGDIR=${STAGING_DIR_NATIVE} \
+                        MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc \
+                        RPM_NO_CHROOT_FOR_SCRIPTS=1
+        done
 }
 
-
 # Rpm's make install creates var/tmp which clashes with base-files packaging
 do_install_append_class-target() {
     rm -rf ${D}/var
Signature · 1 line
2.12.0
#25 lore raw

PATCH 23/25 rpm: Disable perl dependency generation

In reply to Peter Kjellerstedt

From: Mark Hatle <[email protected]>

When rpmdeps files a perl script, it attempts to determine what it provides and what it requires. Often the requires are incorrect, within the context of Wind River Linux. This results in an error that DNF is unable to install a package due to one or more unresolved dependencies.

In RPM5 we had disabled this behavior, the alternative is to require that all perl scripts be 'complete', in that they only require things they absolutely need and that OE provides. If we ever enforce that, this commit can be reverted. Until they fall back to prior behavior (which also matches ipkg and deb style packages.)

---
 .../rpm/files/0001-perl-disable-auto-reqs.patch    | 32 ++++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_git.bb               |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch
meta/recipes-devtools/rpm/files/0001-perl-disable-auto-reqs.patch new file +32 -0
new file mode 100644
index 0000000000..a6c58699d3
@@ -0,0 +1,32 @@
+perl: disable auto requires
+
+When generating automatic requirements, it's possible for perl scripts to
+declare 'optional' dependencies.  These seem to often be incorrect and will
+cause installation failures in OE.  Instead of fixing the perl scripts, it
+was decided it is better to simply disable the automatic dependency
+generation.  This matches the behavior from the previous RPM5 implementation.
+
+Upstream-Status: Inappropriate [OE specific configuration]
+
+Signed-off-by: Mark Hatle <[email protected]>
+
+Index: git/fileattrs/perl.attr
+===================================================================
+--- git.orig/fileattrs/perl.attr
++++ git/fileattrs/perl.attr
+@@ -1,3 +1,3 @@
+-%__perl_requires	%{_rpmconfigdir}/perl.req
++#__perl_requires	%{_rpmconfigdir}/perl.req
+ %__perl_magic		^.*[Pp]erl .*$
+ %__perl_flags		exeonly
+Index: git/fileattrs/perllib.attr
+===================================================================
+--- git.orig/fileattrs/perllib.attr
++++ git/fileattrs/perllib.attr
+@@ -1,5 +1,5 @@
+ %__perllib_provides	%{_rpmconfigdir}/perl.prov
+-%__perllib_requires	%{_rpmconfigdir}/perl.req
++#__perllib_requires	%{_rpmconfigdir}/perl.req
+ %__perllib_magic	^Perl[[:digit:]] module source.*
+ %__perllib_path		\\.pm$
+ %__perllib_flags	magic_and_path
meta/recipes-devtools/rpm/rpm_git.bb +1 -0
index 971aac7867..b0f57809cc 100644
@@ -38,6 +38,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm \
            file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
            file://0012-Use-conditional-to-access-_docdir-in-macros.in.patch \
            file://0013-Add-a-new-option-alldeps-to-rpmdeps.patch \
+           file://0001-perl-disable-auto-reqs.patch \
            "
 
 PV = "4.13.90+git${SRCPV}"
Signature · 1 line
2.12.0
#27 lore raw

PATCH 25/25 package.bbclass: Restore functionality to detect RPM dependencies

In reply to Peter Kjellerstedt

During the transition to dnf and rpm4, the functionality to automatically make RPM determine dependencies was lost.

Before the transition, an OE specific tool called rpmdeps-oecore had been added to the rpm suit. It was based on the rpmdeps tool that is part of rpm. For each file specified on its command line, it would output the provides and requires that RPM could determine.

During the transition to rpm4, rpmdeps-oecore was replaced with the standard rpmdeps. However, what no one noticed was that unless rpmdeps is given options, e.g., -P or -R, to tell it what it should output, it will not output anything. Thus, it would do all the work to determine the requirements, but would keep silent about it. And since no output from rpmdeps is expected unless there are requirements, there were no warnings indicating that everything was not working as expected.

Porting the old rpmdeps-oecore to work with rpm4 is not really possible since it relied on being able to access internals of RPM that are no longer available. However, it turned out that rpmdeps had a debug option, --rpmfcdebug, that would output exactly the information that we need, albeit in a different format and to stderr. To make this usable, rpmdeps has now received a new option, --alldeps, which sends the information we need to stdout.

Since enabling this may cause packages to break, it is required that ENABLE_RPM_FILEDEPS_FOR_PYRO is set to "1" to activate it for Pyro. The name of this variable has been chosen as to indicate that it only affects Pyro (since releases before and after Pyro has it enabled by default).

---
 meta/classes/package.bbclass | 11 +++++---
 meta/lib/oe/package.py       | 60 +++++++++++++++++++++++++++++++-------------
 2 files changed, 50 insertions(+), 21 deletions(-)
meta/classes/package.bbclass +8 -3
index cc466bd1b2..a03c05b9f7 100644
@@ -1434,7 +1434,13 @@ if [ x"$D" = "x" ]; then
 fi
 }
 
-RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps --rcfile ${STAGING_LIBDIR_NATIVE}/rpm/rpmrc  --macros ${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmconfigdir ${STAGING_LIBDIR_NATIVE}/rpm/'"
+# In Morty and earlier releases, and on master (Rocko), the RPM file
+# dependencies are always enabled. However, since they were broken with the
+# release of Pyro and enabling them may cause build problems for some packages,
+# they are not enabled by default in Pyro. Setting ENABLE_RPM_FILEDEPS_FOR_PYRO
+# to "1" will enable them again.
+ENABLE_RPM_FILEDEPS_FOR_PYRO ??= "0"
+RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps${@' --alldeps' if d.getVar('ENABLE_RPM_FILEDEPS_FOR_PYRO') == '1' else ''}"
 
 # Collect perfile run-time dependency metadata
 # Output:
@@ -1451,7 +1457,6 @@ python package_do_filedeps() {
     pkgdest = d.getVar('PKGDEST')
     packages = d.getVar('PACKAGES')
     rpmdeps = d.getVar('RPMDEPS')
-    magic = d.expand("${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc")
 
     def chunks(files, n):
         return [files[i:i+n] for i in range(0, len(files), n)]
@@ -1463,7 +1468,7 @@ python package_do_filedeps() {
         if pkg.endswith('-dbg') or pkg.endswith('-doc') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1 or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-'):
             continue
         for files in chunks(pkgfiles[pkg], 100):
-            pkglist.append((pkg, files, rpmdeps, pkgdest, magic))
+            pkglist.append((pkg, files, rpmdeps, pkgdest))
 
     processed = oe.utils.multiprocess_exec( pkglist, oe.package.filedeprunner)
 
meta/lib/oe/package.py +42 -18

86 lines not on this page · raw message

Signature · 1 line
2.12.0
#11 lore raw

PATCH 11/25 rpm: Create a wrapper for the native rpmdeps tool

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

Rather than trying to call rpmdeps with the correct arguments to work with the sysroot as was done in package.bbclass, create a wrapper for it like all the other native tools already had.

---
 meta/recipes-devtools/rpm/rpm_git.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/rpm/rpm_git.bb +1 -0
index 531669ae73..7665d54cdc 100644
@@ -77,6 +77,7 @@ do_install_append_class-native() {
                 ${bindir}/rpmkeys \
                 ${bindir}/rpmsign \
                 ${bindir}/rpmspec \
+                ${libdir}/rpm/rpmdeps \
         "
 
         for tool in $tools; do
Signature · 1 line
2.12.0
#16 lore raw

PATCH 16/25 perl: Do not generate file dependencies for perl-ptest

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

The perl-ptest package contains Perl internal modules and generating file dependencies for it causes problems.

---
 meta/recipes-devtools/perl/perl-ptest.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/perl/perl-ptest.inc +4 -0
index 04406d5744..1f549af1b3 100644
@@ -39,3 +39,7 @@ python populate_packages_prepend() {
 }
 
 RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc sed libssp"
+
+# The perl-ptest package contains Perl internal modules and generating file
+# dependencies for it causes problems.
+SKIP_FILEDEPS_${PN}-ptest = '1'
Signature · 1 line
2.12.0
#12 lore raw

PATCH 12/25 rpm: Do not require that ELF binaries are executable to be identifiable

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

There is nothing that requires, e.g., a DSO to be executable, but it is still an ELF binary and should be identified as such.

---
 ...ire-that-ELF-binaries-are-executable-to-b.patch | 32 ++++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_git.bb               |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch new file +32 -0
new file mode 100644
index 0000000000..c910a478ee
@@ -0,0 +1,32 @@
+From d65d6e8760afbd7f70b22a1f3297a037bc475fea Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <[email protected]>
+Date: Mon, 15 May 2017 10:21:08 +0200
+Subject: [PATCH 11/13] Do not require that ELF binaries are executable to be
+ identifiable
+
+There is nothing that requires, e.g., a DSO to be executable, but it
+is still an ELF binary and should be identified as such.
+
+Upstream probably expects all ELF binaries to be marked as executable,
+but rather than imposing such a limitation for OE, allow any file to
+be identified as an ELF binary regardless of whether it is executable
+or not.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Peter Kjellerstedt <[email protected]>
+---
+ fileattrs/elf.attr | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr
+index 595b33e09..bac52649d 100644
+--- a/fileattrs/elf.attr
++++ b/fileattrs/elf.attr
+@@ -1,4 +1,3 @@
+ %__elf_provides		%{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
+ %__elf_requires		%{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
+ %__elf_magic		^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*$
+-%__elf_flags		exeonly
+-- 
+2.12.0
+
meta/recipes-devtools/rpm/rpm_git.bb +1 -0
index 7665d54cdc..15880377b8 100644
@@ -35,6 +35,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm \
            file://0001-Fix-build-with-musl-C-library.patch \
            file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
            file://0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch \
+           file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
            "
 
 PV = "4.13.90+git${SRCPV}"
Signature · 1 line
2.12.0
#14 lore raw

PATCH 14/25 rpm: Add a new option --alldeps to rpmdeps

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

This will send the output from rpmfcPrint() to stdout. This is an alternative to using the --rpmfcdebug option, which will send the same output to stderr. The two options have totally different use cases though. While --alldeps is used when the output from rpmfcPrint() is what is wanted, --rpmfcdebug can be used together with the other output options, e.g., --requires, without affecting their output.

---
 .../0013-Add-a-new-option-alldeps-to-rpmdeps.patch | 152 +++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_git.bb               |   1 +
 2 files changed, 153 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch
meta/recipes-devtools/rpm/files/0013-Add-a-new-option-alldeps-to-rpmdeps.patch new file +152 -0
new file mode 100644
index 0000000000..faaf62960c
@@ -0,0 +1,152 @@
+From 3bf20a6116ae3e1a5a3a6907bee7e881b17efb2f Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <[email protected]>
+Date: Mon, 15 May 2017 11:23:26 +0200
+Subject: [PATCH 13/13] Add a new option --alldeps to rpmdeps
+
+This will send the output from rpmfcPrint() to stdout. This is an
+alternative to using the --rpmfcdebug option, which will send the same
+output to stderr. The two options have totally different use cases
+though. While --alldeps is used when the output from rpmfcPrint() is
+what is wanted, --rpmfcdebug can be used together with the other
+output options, e.g., --requires, without affecting their output.
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/220]
+Signed-off-by: Peter Kjellerstedt <[email protected]>
+---
+ build/rpmfc.c   | 27 ++++++++++++++-------------
+ build/rpmfc.h   |  1 -
+ tools/rpmdeps.c | 44 +++++++++++++++++++++++++-------------------
+ 3 files changed, 39 insertions(+), 33 deletions(-)
+
+diff --git a/build/rpmfc.c b/build/rpmfc.c
+index c8e2f876a..44f1cdc9a 100644
+--- a/build/rpmfc.c
++++ b/build/rpmfc.c
+@@ -732,7 +732,6 @@ static rpm_color_t rpmfcColor(const char * fmstr)
+ 
+ void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp)
+ {
+-    rpm_color_t fcolor;
+     int ndx;
+     int dx;
+     int fx;
+@@ -744,21 +743,23 @@ void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp)
+ 
+     if (fc)
+     for (fx = 0; fx < fc->nfiles; fx++) {
+-	rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */
+-	fcolor = fc->fcolor[fx];
+-	ARGV_t fattrs = fc->fattrs[fx];
+-
+ 	fprintf(fp, "%3d %s", fx, fc->fn[fx]);
+-	if (fcolor != RPMFC_BLACK)
++	if (_rpmfc_debug) {
++	    rpmsid cx = fc->fcdictx[fx] + 1; /* id's are one off */
++	    rpm_color_t fcolor = fc->fcolor[fx];
++	    ARGV_t fattrs = fc->fattrs[fx];
++
++	    if (fcolor != RPMFC_BLACK)
+ 		fprintf(fp, "\t0x%x", fc->fcolor[fx]);
+-	else
++	    else
+ 		fprintf(fp, "\t%s", rpmstrPoolStr(fc->cdict, cx));
+-	if (fattrs) {
+-	    char *attrs = argvJoin(fattrs, ",");
+-	    fprintf(fp, " [%s]", attrs);
+-	    free(attrs);
+-	} else {
+-	    fprintf(fp, " [none]");
++	    if (fattrs) {
++		char *attrs = argvJoin(fattrs, ",");
++		fprintf(fp, " [%s]", attrs);
++		free(attrs);
++	    } else {
++		fprintf(fp, " [none]");
++	    }
+ 	}
+ 	fprintf(fp, "\n");
+ 
+diff --git a/build/rpmfc.h b/build/rpmfc.h
+index dae8ea5b1..3d87b31cf 100644
+--- a/build/rpmfc.h
++++ b/build/rpmfc.h
+@@ -45,7 +45,6 @@ typedef const struct rpmfcTokens_s * rpmfcToken;
+ 
+ /** \ingroup rpmfc
+  * Print results of file classification.
+- * @todo Remove debugging routine.
+  * @param msg		message prefix (NULL for none)
+  * @param fc		file classifier
+  * @param fp		output file handle (NULL for stderr)
+diff --git a/tools/rpmdeps.c b/tools/rpmdeps.c
+index a414b6343..f260a38c4 100644
+--- a/tools/rpmdeps.c
++++ b/tools/rpmdeps.c
+@@ -23,6 +23,8 @@ static int print_conflicts;
+ 
+ static int print_obsoletes;
+ 
++static int print_alldeps;
++
+ static void rpmdsPrint(const char * msg, rpmds ds, FILE * fp)
+ {
+     if (fp == NULL) fp = stderr;
+@@ -57,6 +59,8 @@ static struct poptOption optionsTable[] = {
+         NULL, NULL },
+  { "obsoletes", '\0', POPT_ARG_VAL, &print_obsoletes, -1,
+         NULL, NULL },
++ { "alldeps", '\0', POPT_ARG_VAL, &print_alldeps, -1,
++        NULL, NULL },
+ 
+    POPT_AUTOALIAS
+    POPT_AUTOHELP
+@@ -100,25 +104,27 @@ main(int argc, char *argv[])
+     if (rpmfcClassify(fc, av, NULL) || rpmfcApply(fc))
+ 	goto exit;
+ 
+-    if (_rpmfc_debug)
+-	rpmfcPrint(buf, fc, NULL);
+-
+-    if (print_provides)
+-	rpmdsPrint(NULL, rpmfcProvides(fc), stdout);
+-    if (print_requires)
+-	rpmdsPrint(NULL, rpmfcRequires(fc), stdout);
+-    if (print_recommends)
+-	rpmdsPrint(NULL, rpmfcRecommends(fc), stdout);
+-    if (print_suggests)
+-	rpmdsPrint(NULL, rpmfcSuggests(fc), stdout);
+-    if (print_supplements)
+-	rpmdsPrint(NULL, rpmfcSupplements(fc), stdout);
+-    if (print_enhances)
+-	rpmdsPrint(NULL, rpmfcEnhances(fc), stdout);
+-    if (print_conflicts)
+-	rpmdsPrint(NULL, rpmfcConflicts(fc), stdout);
+-    if (print_obsoletes)
+-	rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout);
++    if (print_alldeps || _rpmfc_debug)
++	rpmfcPrint(NULL, fc, print_alldeps ? stdout : NULL);
++
++    if (!print_alldeps) {
++	if (print_provides)
++	    rpmdsPrint(NULL, rpmfcProvides(fc), stdout);
++	if (print_requires)
++	    rpmdsPrint(NULL, rpmfcRequires(fc), stdout);
++	if (print_recommends)
++	    rpmdsPrint(NULL, rpmfcRecommends(fc), stdout);
++	if (print_suggests)
++	    rpmdsPrint(NULL, rpmfcSuggests(fc), stdout);
++	if (print_supplements)
++	    rpmdsPrint(NULL, rpmfcSupplements(fc), stdout);
++	if (print_enhances)
++	    rpmdsPrint(NULL, rpmfcEnhances(fc), stdout);
++	if (print_conflicts)
++	    rpmdsPrint(NULL, rpmfcConflicts(fc), stdout);
++	if (print_obsoletes)
++	    rpmdsPrint(NULL, rpmfcObsoletes(fc), stdout);
++    }
+ 
+     ec = 0;
+ 
+-- 
+2.12.0
+
meta/recipes-devtools/rpm/rpm_git.bb +1 -0
index 7c5f649a8b..5fe52b83ec 100644
@@ -37,6 +37,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm \
            file://0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch \
            file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
            file://0012-Use-conditional-to-access-_docdir-in-macros.in.patch \
+           file://0013-Add-a-new-option-alldeps-to-rpmdeps.patch \
            "
 
 PV = "4.13.90+git${SRCPV}"
Signature · 1 line
2.12.0
#23 lore raw

PATCH 21/25 bind: Use correct python interpreter path

In reply to Peter Kjellerstedt

From: Richard Purdie <[email protected]>

The scripts currently reference "python33", fix this so they reference python3. The move the python3 likely broke these.

---
 meta/recipes-connectivity/bind/bind_9.10.3-P3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/bind/bind_9.10.3-P3.bb +1 -1
index 8160625282..a802274829 100644
@@ -85,7 +85,7 @@ do_install_append() {
 	install -d "${D}${sysconfdir}/init.d"
 	install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
 	install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
-	sed -i -e '1s,#!.*python,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
+	sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
 
 	# Install systemd related files
 	install -d ${D}${sbindir}
Signature · 1 line
2.12.0
#15 lore raw

PATCH 15/25 insane.bbclass: Ignore perl as dependency for nativesdk packages

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

---
 meta/classes/insane.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/insane.bbclass +1 -1
index fa932ef576..42cd15c531 100644
@@ -906,7 +906,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
         if "file-rdeps" not in skip:
             ignored_file_rdeps = set(['/bin/sh', '/usr/bin/env', 'rtld(GNU_HASH)'])
             if bb.data.inherits_class('nativesdk', d):
-                ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl'])
+                ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl', 'perl'])
             # For Saving the FILERDEPENDS
             filerdepends = {}
             rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
Signature · 1 line
2.12.0
#1 lore raw

PATCH 1/25 gtk+3: Update the patches to work with old versions of patch

In reply to Peter Kjellerstedt

From: Peter Kjellerstedt <[email protected]>

The patch "0003-Add-disable-opengl-configure-option.patch" used Git rename syntax, which is not supported by patch 2.6.x and older.

(From OE-Core rev: 43e640ddcf32c718b3e0bb3f3654ed60eb497058)

---
 .../gtk+/gtk+3/0001-Hardcoded-libtool.patch        |  12 +-
 ...Do-not-try-to-initialize-GL-without-libGL.patch |   8 +-
 .../0003-Add-disable-opengl-configure-option.patch | 268 +++++++++++++++------
 ...4-configure.ac-Fix-wayland-protocols-path.patch |   8 +-
 4 files changed, 207 insertions(+), 89 deletions(-)
meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch +6 -6
index 0bda1f1074..c210bbc7d5 100644
@@ -1,4 +1,4 @@
-From 5a73a5b92566e314bbc8a1bd40f1ec204837c111 Mon Sep 17 00:00:00 2001
+From 0ecaa5bab162abf0cb2057d77beeb7b89d5873b4 Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <[email protected]>
 Date: Tue, 21 Jun 2016 14:53:56 +0300
 Subject: [PATCH 1/4] Hardcoded libtool
@@ -12,10 +12,10 @@ Signed-off-by: Jussi Kukkonen <[email protected]>
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 23d3077..b6931d6 100644
+index 6628e21..f43ac09 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -610,7 +610,7 @@ AC_MSG_CHECKING([whether to write dependencies into .pc files])
+@@ -617,7 +617,7 @@ AC_MSG_CHECKING([whether to write dependencies into .pc files])
  case $enable_explicit_deps in
    auto)
      export SED
@@ -24,7 +24,7 @@ index 23d3077..b6931d6 100644
      if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
        enable_explicit_deps=yes
      else
-@@ -876,7 +876,7 @@ else
+@@ -895,7 +895,7 @@ else
      dnl Now we check to see if our libtool supports shared lib deps
      dnl (in a rather ugly way even)
      if $dynworks; then
@@ -33,7 +33,7 @@ index 23d3077..b6931d6 100644
          module_deplibs_check=`$module_libtool_config | \
              grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
              sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -1630,7 +1630,7 @@ AC_SUBST(GTK_PRINT_BACKENDS)
+@@ -1649,7 +1649,7 @@ AC_SUBST(GTK_PRINT_BACKENDS)
  # We are using gmodule-no-export now, but I'm leaving the stripping
  # code in place for now, since pango and atk still require gmodule.
  export SED
@@ -43,5 +43,5 @@ index 23d3077..b6931d6 100644
    GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
    GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
 -- 
-2.1.4
+2.12.0
 
meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch +4 -4
index 989716e513..ab7b659414 100644
@@ -1,4 +1,4 @@
-From d63b926f8c8d8b5c9f9ec33d078b775f0409d88a Mon Sep 17 00:00:00 2001
+From 2d2361f24be1e51201063dbbda570debe8702b6f Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <[email protected]>
 Date: Fri, 16 Oct 2015 16:35:16 +0300
 Subject: [PATCH 2/4] Do not try to initialize GL without libGL
@@ -21,10 +21,10 @@ Signed-off-by: Jussi Kukkonen <[email protected]>
  2 files changed, 12 insertions(+)
 
 diff --git a/configure.ac b/configure.ac
-index b6931d6..e27da49 100644
+index f43ac09..965eec9 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -342,6 +342,13 @@ AC_ARG_ENABLE(mir-backend,
+@@ -346,6 +346,13 @@ AC_ARG_ENABLE(mir-backend,
                                [enable the Mir gdk backend])],
  			      [backend_set=yes])
  
@@ -56,5 +56,5 @@ index 81479d8..3c8c5c0 100644
  
  gint
 -- 
-2.1.4
+2.12.0
 
meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch +193 -75

496 lines not on this page · raw message

meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch +4 -4
index 634b3a46ff..aca55ceaf4 100644
@@ -1,4 +1,4 @@
-From 97b78e566634579bbae51be914aeaaa921137a8b Mon Sep 17 00:00:00 2001
+From 34f4d3928e8206a89b0a601bdf79d6194b3cc77e Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <[email protected]>
 Date: Thu, 9 Jun 2016 11:21:36 +0300
 Subject: [PATCH 4/4] configure.ac: Fix wayland-protocols path
@@ -19,10 +19,10 @@ Signed-off-by: Jussi Kukkonen <[email protected]>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index a3e9beb..dde9dc5 100644
+index 00bf544..5515915 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -461,7 +461,7 @@ fi
+@@ -465,7 +465,7 @@ fi
  if test "$enable_wayland_backend" = "yes"; then
    # For the cairo image backend
    cairo_backends="$cairo_backends cairo"
@@ -32,5 +32,5 @@ index a3e9beb..dde9dc5 100644
    GDK_WINDOWING="$GDK_WINDOWING
  #define GDK_WINDOWING_WAYLAND"
 -- 
-2.1.4
+2.12.0
 
Signature · 1 line
2.12.0
#18 lore raw

PATCH 18/25 git: Do not install git cvsserver and git svn by default

In reply to Peter Kjellerstedt

These git commands require Perl modules that do not exist in OE-Core. Add PACKAGECONFIGs to enable them. Be aware though that if you enable them you must also provide the missing dependencies.

---
 meta/recipes-devtools/git/git.inc | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
meta/recipes-devtools/git/git.inc +21 -0
index 9b0d328bad..5c12ca8d4c 100644
@@ -13,6 +13,10 @@ S = "${WORKDIR}/git-${PV}"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[cvsserver] = ""
+PACKAGECONFIG[svn] = ""
+
 EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
 		--without-tcltk \
 "
@@ -54,6 +58,23 @@ perl_native_fixup () {
 	mkdir -p ${D}${libdir}
 	mv ${D}${exec_prefix}/lib/perl-native/perl ${D}${libdir}
 	rmdir -p ${D}${exec_prefix}/lib/perl-native || true
+
+	if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'cvsserver', d)}" ]; then
+		# Only install the git cvsserver command if explicitly requested
+		# as it requires the DBI Perl module, which does not exist in
+		# OE-Core.
+		rm ${D}${libexecdir}/git-core/git-cvsserver \
+		   ${D}${bindir}/git-cvsserver
+	fi
+
+	if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'svn', d)}" ]; then
+		# Only install the git svn command and all Git::SVN Perl modules
+		# if explicitly requested as they require the SVN::Core Perl
+		# module, which does not exist in OE-Core.
+		rm -r ${D}${libexecdir}/git-core/git-svn \
+		      ${D}${libdir}/perl/site_perl/*/Git/SVN*
+		sed -i -e '/SVN/d' ${D}${libdir}/perl/site_perl/*/auto/Git/.packlist
+	fi
 }
 
 REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
Signature · 1 line
2.12.0
#26 lore raw

PATCH 24/25 libcheck: fix file-rdeps QA issue

In reply to Peter Kjellerstedt

From: Martin Jansa <[email protected]>

* Fixes:
ERROR: nativesdk-libcheck-0.10.0-r0 do_package_qa: QA Issue:
/usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/checkmk contained in package nativesdk-libcheck requires /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/gawk, but no providers found in RDEPENDS_nativesdk-libcheck? [file-rdeps]

---
 meta/recipes-support/libcheck/libcheck_0.10.0.bb | 1 -
 1 file changed, 1 deletion(-)
meta/recipes-support/libcheck/libcheck_0.10.0.bb +0 -1
index 4db2d7528c..9d34198a96 100644
@@ -20,6 +20,5 @@ CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
 RREPLACES_${PN} = "check (<= 0.9.5)"
 RDEPENDS_${PN} += "gawk"
 RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.12.0
#20 lore raw

Re: [pyro][PATCH 19/25] texinfo: Avoid a problem with a dependency on perl(Locale::gettext_xs)

In reply to Peter Kjellerstedt
Quoted 31 lines · Peter Kjellerstedt

We do not build the Locale::gettext_xs Perl module and the code will test for it and happily use Locale::gettext_pp instead if it is not found. However, this still causes a file dependency on perl(Locale::gettext_xs) to be generated, which must be satisfied by adding an explicit provide for it.

---
 meta/recipes-extended/texinfo/texinfo_6.3.bb | 6 ++++++

 1 file changed, 6 insertions(+)
meta/recipes-extended/texinfo/texinfo_6.3.bb +0 -0
index d82731e11e..f58df928aa 100644
@@ -79,4 +79,10 @@ FILES_${PN}-doc = "${infodir}/texinfo* \
                     ${datadir}/${tex_texinfo} \

                    ${mandir}/man1 ${mandir}/man5"

+# Lie about providing the Locale::gettext_xs module. It is not actually built,
+# but the code will test for it and if not found use Locale::gettext_pp instead.
+# However, this causes a file dependency on perl(Locale::gettext_xs) to be

meta/recipes-extended/texinfo/texinfo_6.3.bb +3 -0
+# generated, which must be satisfied.
+RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
+
Quoted 1 line

 BBCLASSEXTEND = "native nativesdk"

Breaks in do_package_write_deb:

e.g.
https://autobuilder.yoctoproject.org/main/builders/nightly-arm64/builds/827

but also many other builds. Possibly missing some other backport?

Cheers,

Richard

#21 lore raw

Re: [pyro][PATCH 19/25] texinfo: Avoid a problem with a dependency on perl(Locale::gettext_xs)

Quoted 48 lines

-----Original Message-----
From: Richard Purdie [mailto:[email protected]]
Sent: den 30 augusti 2017 23:37
To: Peter Kjellerstedt <[email protected]>; Armin Kuster <[email protected]>; [email protected]
Subject: Re: [OE-core] [pyro][PATCH 19/25] texinfo: Avoid a problem with a dependency on perl(Locale::gettext_xs)

Quoted 31 lines · Peter Kjellerstedt

We do not build the Locale::gettext_xs Perl module and the code will test for it and happily use Locale::gettext_pp instead if it is not found. However, this still causes a file dependency on perl(Locale::gettext_xs) to be generated, which must be satisfied by adding an explicit provide for it.

---
 meta/recipes-extended/texinfo/texinfo_6.3.bb | 6 ++++++

 1 file changed, 6 insertions(+)
meta/recipes-extended/texinfo/texinfo_6.3.bb +0 -0
index d82731e11e..f58df928aa 100644
@@ -79,4 +79,10 @@ FILES_${PN}-doc = "${infodir}/texinfo* \
                     ${datadir}/${tex_texinfo} \

                    ${mandir}/man1 ${mandir}/man5"

+# Lie about providing the Locale::gettext_xs module. It is not actually built,
+# but the code will test for it and if not found use Locale::gettext_pp instead.
+# However, this causes a file dependency on perl(Locale::gettext_xs) to be

meta/recipes-extended/texinfo/texinfo_6.3.bb +3 -0
+# generated, which must be satisfied.
+RPROVIDES_${PN} += "perl(Locale::gettext_xs)"
+
Quoted 1 line

 BBCLASSEXTEND = "native nativesdk"

Breaks in do_package_write_deb:

e.g.
https://autobuilder.yoctoproject.org/main/builders/nightly-
arm64/builds/827

Quoted 5 lines

but also many other builds. Possibly missing some other backport?

Cheers,

Richard

Ok, the problem was easily reproducible by building nativesdk-texinfo with package_deb in PACKAGE_CLASSES. What that result in, is an error like this:

dpkg-deb: error: parsing file 'tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-texinfo/6.3-r0/packages-split/nativesdk-texinfo/DEBIAN/control' near line 15 package 'nativesdk-texinfo':
'Provides' field, reference to 'nativesdk-perl__Locale': invalid architecture name ':gettext_xs__': must start with an alphanumeric

Which is due to the following line in the Debian control file:

Provides: nativesdk-perl__Locale::gettext_xs__

And it is clear that dpkg does not like the two colons on that line. However, that got me thinking. Why is this not a problem when building with master of Poky? So I went and built the same with master and looked at log.do_package_write_dep for nativesdl-texinfo, and as I suspected the error was there as well. However, the error was ignored which led to the build succeeding, but without actually producing the texinfo deb package!

After some testing it turned out that commit dd540fba "package_deb:
Enable multithreaded package creation" is the culprit. If I revert that, building nativesdk-texinfo will start to fail for master if Debian packaging is enabled.

Given that Mark disabled Perl dependencies from being generated, I think the easiest solution is to just drop this patch from Pyro, and revert the corresponding patch from master.

I will leave fixing the multithreaded package creation support in package_deb.bbclass to you because I have no idea about that...

//Peter