[OE-core] couple ambiguities/errors(?) in rootfs-postcommands.bbclass

2017-03-10 Thread Robert P. J. Day

  perusing rootfs-postcommands.bbclass ...

  * very first comment says, "Zap the root password if debug-tweaks
feature is not enabled". should that not more properly say, "Zap
an *empty* root password ..." for clarity?

  * further down:

# We want this to run as late as possible, in particular after
# systemd_sysusers_create and set_user_group
  ^^^ ?

i see no such routine, should this say "systemd_create_users"?

  i'll submit a patch to tweak the above and anything else i notice,
feel free to throw in other suggestions while i'm there.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] openssl: Disable make's -e flag without breaking ${AR}

2017-03-10 Thread Peter Kjellerstedt
From: Olof Johansson 

The OpenSSL recipe tried to workaround the -e make flag (overriding
variables from the environment). And when the -e flag was dropped as
the global default, it was specifically added for OpenSSL. This is
unnecessary, as only the value of ${AR} seems to be affected, and that
can be handled correctly by OpenSSL's build system if we just let it.

Signed-off-by: Olof Johansson 
Signed-off-by: Peter Kjellerstedt 
---
 meta/recipes-connectivity/openssl/openssl.inc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/recipes-connectivity/openssl/openssl.inc 
b/meta/recipes-connectivity/openssl/openssl.inc
index 9afa5bd567..28421dab33 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -17,7 +17,6 @@ S = "${WORKDIR}/openssl-${PV}"
 
 PACKAGECONFIG[perl] = ",,,"
 
-AR_append = " r"
 TERMIO_libc-musl = "-DTERMIOS"
 TERMIO ?= "-DTERMIO"
 # Avoid binaries being marked as requiring an executable stack since it 
@@ -28,7 +27,6 @@ CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', 
'-DL_ENDIAN', '-DB_END
 export DIRS = "crypto ssl apps"
 export EX_LIBS = "-lgcc -ldl"
 export AS = "${CC} -c"
-EXTRA_OEMAKE = "-e MAKEFLAGS="
 
 inherit pkgconfig siteinfo multilib_header ptest relative_symlinks
 
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] useradd-staticids.bbclass: Support recipes specifying static IDs

2017-03-10 Thread Peter Kjellerstedt
If this bblcass is used and a recipe specifies a static ID for a
user/group as part of the USERADD_PARAM_${PN} or GROUPADD_PARAM_${PN},
the build would fail with and error like this if there was no
corresponding ID in the passwd/group files specified via
USERADD_UID_TABLES/USERADD_GID_TABLES:

  ERROR: meta-oe/recipes-support/postgresql/postgresql_9.4.11.bb:
  meta-oe/recipes-support/postgresql/postgresql_9.4.11.bb inherits
  useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or
  GROUPMEMS_PARAM for package postgresql

Signed-off-by: Peter Kjellerstedt 
---
 meta/classes/useradd-staticids.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/useradd-staticids.bbclass 
b/meta/classes/useradd-staticids.bbclass
index a65c3f69cb..9b194df490 100644
--- a/meta/classes/useradd-staticids.bbclass
+++ b/meta/classes/useradd-staticids.bbclass
@@ -125,6 +125,7 @@ def update_useradd_static_config(d):
 if uaargs.LOGIN not in users:
 if not uaargs.uid or not uaargs.uid.isdigit() or not 
uaargs.gid:
 handle_missing_id(uaargs.LOGIN, 'user', pkg)
+newparams.append(param)
 continue
 
 field = users[uaargs.LOGIN]
@@ -260,6 +261,7 @@ def update_useradd_static_config(d):
 if gaargs.GROUP not in groups:
 if not gaargs.gid or not gaargs.gid.isdigit():
 handle_missing_id(gaargs.GROUP, 'group', pkg)
+newparams.append(param)
 continue
 
 field = groups[gaargs.GROUP]
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] toaster.bbclass: Correct parsing of installed-package-sizes.txt

2017-03-10 Thread Peter Kjellerstedt
The recent change in buildhistory.bbclass to use a tab in
installed-package-sizes.txt between "KiB" and the package name caused
toaster_buildhistory_dump() to fail since it parses the file and
expected a space there.

Signed-off-by: Peter Kjellerstedt 
---
 meta/classes/toaster.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index a68557882c..4de380bce2 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -265,8 +265,7 @@ python toaster_buildhistory_dump() {
 with open("%s/installed-package-sizes.txt" % installed_img_path, 
"r") as fin:
 for line in fin:
 line = line.rstrip(";")
-psize, px = line.split("\t")
-punit, pname = px.split(" ")
+psize, punit, pname = line.split()
 # this size is "installed-size" as it measures how much 
space it takes on disk
 images[target][pname.strip()] = {'size':int(psize)*1024, 
'depends' : []}
 
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/1] Whitelist sftp

2017-03-10 Thread Peter Kjellerstedt
I have been trying out the whitelisting of tools in $PATH, and it
seems to work very well. However, one thing that I realized is that
the tools used by the various fetchers need to be whitelisted. This
patch adds sftp to HOSTTOOLS_NONFATAL as that is the only fetcher we
use appart from git and wget, but I expect other tools such as cvs,
svn, hg, etc need to be added as well.

Feel free to squash this commit with the "base/bitbake.conf: Filter
contents of PATH to only allow whitelisted tools" commit.

//Peter

The following changes since commit 1cf50b756c589d8bf8f1f32f2062b69fb769242d:

  base/bitbake.conf: Filter contents of PATH to only allow whitelisted tools 
(2017-03-10 18:07:27 +)

are available in the git repository at:

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

Peter Kjellerstedt (1):
  bitbake.conf: Add 'sftp' to HOSTTOOLS_NONFATAL

 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] bitbake.conf: Add 'sftp' to HOSTTOOLS_NONFATAL

2017-03-10 Thread Peter Kjellerstedt
This is necessary to be able to use the sftp fetcher.

Signed-off-by: Peter Kjellerstedt 
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 5699099b41..4cf1f5d6ff 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -469,7 +469,7 @@ HOSTTOOLS += " \
 HOSTTOOLS += "ps stty ip ssh scp ping vi"
 
 # Link to these if present
-HOSTTOOLS_NONFATAL += "ccache pip3 ld.bfd ld.gold gcc-ar gpg"
+HOSTTOOLS_NONFATAL += "ccache pip3 ld.bfd ld.gold gcc-ar gpg sftp"
 
 CCACHE ??= ""
 # Disable ccache explicitly if CCACHE is null since gcc may be a symlink
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] feature-arm-thumb.inc: fix ARM_THUMB_SUFFIX for armv8

2017-03-10 Thread Andre McCurdy
The current definition for ARM_THUMB_SUFFIX doesn't consider armv8
and will therefore cause TUNE_PKGARCH to be set incorrectly for
machines which inherit arch-armv8 and don't include aarch64 in
TUNE_FEATURES (ie when building for 32bit ARMv8).

Also fix typo in comments and improve TUNEVALID[thumb] wording.

Signed-off-by: Andre McCurdy 
---
 meta/conf/machine/include/arm/feature-arm-thumb.inc | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/meta/conf/machine/include/arm/feature-arm-thumb.inc 
b/meta/conf/machine/include/arm/feature-arm-thumb.inc
index 6d4747b..0b47cca 100644
--- a/meta/conf/machine/include/arm/feature-arm-thumb.inc
+++ b/meta/conf/machine/include/arm/feature-arm-thumb.inc
@@ -1,17 +1,14 @@
-TUNEVALID[thumb] = "Use thumb instructions instead of ARM"
-ARM_THUMB_OPT = "${@['arm', 'thumb'][d.getVar('ARM_INSTRUCTION_SET') == 
'thumb']}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4',  't',  '', 
d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5',  't',  '', 
d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6',  't',  '', 
d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', 't2', '', 
d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7r', 't2', '', 
d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', 
d)}"
-ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', 't2', 
'', d)}"
+
+TUNEVALID[thumb] = "Support Thumb instructions"
+
+ARM_THUMB_SUFFIX = "${@bb.utils.contains_any('TUNE_FEATURES', 'armv4 armv5 
armv6', 't', 't2', d)}"
 
 # If the device supports ARM, then respect ARM_THUMB_OPT (which can be "arm" 
or "thumb")
-# If the defice doesn't support ARM, then always set "thumb" even when
+# If the device doesn't support ARM, then always set "thumb" even when
 # some recipe explicitly sets ARM_INSTRUCTION_SET to "arm"
+ARM_THUMB_OPT = "${@['arm', 'thumb'][d.getVar('ARM_INSTRUCTION_SET') == 
'thumb']}"
 ARM_M_OPT = "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 
'thumb', d)}"
+
 python () {
 if bb.utils.contains('TUNE_FEATURES', 'thumb', False, True, d):
 return
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] selftest/devtool: Add test to verify "modify virtual/kernel"

2017-03-10 Thread jose . perez . carranza
From: Jose Perez Carranza 

The purpose of this test case is to verify that
devtool modify works correctly when building
the kernel.

[YOCTO #10817]

Signed-off-by: Jose Perez Carranza 
---
 meta/lib/oeqa/selftest/devtool.py | 85 +++
 1 file changed, 85 insertions(+)

diff --git a/meta/lib/oeqa/selftest/devtool.py 
b/meta/lib/oeqa/selftest/devtool.py
index f1661ef..c389d50 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -1606,3 +1606,88 @@ class DevtoolTests(DevtoolBase):
 checkvars['S'] = '${WORKDIR}/${BPN}-%s' % recipever
 checkvars['SRC_URI'] = url
 self._test_recipe_contents(newrecipefile, checkvars, [])
+
+@testcase(1577)
+def test_devtool_virtual_kernel_modify(self):
+"""
+Summary:The purpose of this test case is to verify that
+devtool modify works correctly when building
+the kernel.
+Dependencies:   NA
+Steps:  1. Build kernel with bitbake.
+2. Save the config file generated.
+3. Clean the environment.
+4. Use `devtool modify virtual/kernel` to validate 
following:
+   4.1 The source is checked out correctly.
+   4.2 The resulting configuration is the same as
+   what was get on step 2.
+   4.3 The Kernel can be build correctly.
+   4.4 Changes made on the source are reflected on the
+   subsequent builds.
+   4.5 Changes on the configuration are reflected on 
the
+   subsequent builds
+ Expected:   devtool modify is able to checkout the source of the 
kernel
+ and modification to the source and configurations are 
reflected
+ when building the kernel.
+ """
+#Set machine to qemxu86 to be able to modify the kernel and
+#verify the modification.
+features = 'MACHINE = "qemux86"\n'
+self.write_config(features)
+# Clean up the enviroment
+bitbake('linux-yocto -c cleansstate')
+tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+self.track_for_cleanup(tempdir)
+self.track_for_cleanup(self.workspacedir)
+self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+self.add_command_to_tearDown('bitbake -c clean linux-yocto')
+#Step 1
+#Here is just generated the config file instead of all the kernel to 
optimize the
+#time of executing this test case.
+bitbake('linux-yocto -c configure')
+bbconfig = os.path.join(get_bb_var('B',"linux-yocto"),'.config')
+buildir= get_bb_var('TOPDIR')
+#Step 2
+runCmd('cp %s %s' % (bbconfig, buildir))
+self.assertTrue(os.path.exists(os.path.join(buildir, '.config')),
+'Could not copy .config file from kernel')
+
+tmpconfig = os.path.join(buildir, '.config')
+#Step 3
+bitbake('linux-yocto -c cleanall')
+#Step 4.1
+runCmd('devtool modify virtual/kernel -x %s' % tempdir)
+self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile')),
+'Extracted source could not be found')
+#Step 4.2
+configfile = os.path.join(tempdir,'.config')
+diff = runCmd('diff %s %s' % (tmpconfig, configfile))
+self.assertEqual(0,diff.status,'Kernel .config file is not the same 
using bitbake and devtool')
+#Step 4.3
+#NOTE: virtual/kernel is mapped to linux-yocto
+result = runCmd('devtool build linux-yocto')
+self.assertEqual(0,result.status,'Cannot build kernel using `devtool 
build`')
+kernelfile = os.path.join(get_bb_var('KBUILD_OUTPUT',"linux-yocto"), 
'vmlinux')
+self.assertTrue(os.path.exists(kernelfile),'Kernel was not build 
correctly')
+
+#Modify the kernel source, this is specific for qemux86
+modfile = os.path.join(tempdir,'arch/x86/boot/header.S')
+modstring = "use a boot loader - Devtool kernel testing"
+modapplied = runCmd("sed -i 's/boot loader/%s/' %s" % (modstring, 
modfile))
+self.assertEqual(0,modapplied.status,'Modification to %s on kernel 
source failed' % modfile)
+#Modify the configuration
+codeconfigfile = os.path.join(tempdir,'.config.new')
+modconfopt = "CONFIG_SG_POOL=n"
+modconf = runCmd("sed -i 's/CONFIG_SG_POOL=y/%s/' %s" % (modconfopt, 
codeconfigfile))
+self.assertEqual(0,modconf.status,'Modification to %s failed' % 
codeconfigfile)
+#Build again kernel with devtool
+rebuild = runCmd('devtool build linux-yocto')
+

Re: [OE-core] [PATCH v3 2/2] ghostscript: build and install libgs

2017-03-10 Thread Andrew Shadura
On 09/03/17 17:36, Burton, Ross wrote:
> On 9 March 2017 at 14:31, Andrew Shadura 
> wrote:
> 
>> Build and install libgs library, which is a build dependency
>> of a few other libraries, such as libspectre.
>>
>> We don't want to ship the executable binaries, only the library and its
>> headers, hence oe_runmake install-so + rm -rf, not e.g. oe_libinstall.
>>
> 
> This does *way* more:
> 
> packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: PKGSIZE changed
> from 0 to 38856 (+100%)
>   * FILELIST: added "/usr/include/ghostscript/gdevdsp.h
> /usr/include/ghostscript/iapi.h /usr/lib/libgs.so
> /usr/include/ghostscript/gserrors.h /usr/include/ghostscript/ierrors.h"
> packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: RDEPENDS: added
> "ghostscript-lib"
> packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: FILELIST: added
> "/usr/include/ghostscript/gdevdsp.h /usr/include/ghostscript/iapi.h
> /usr/lib/libgs.so /usr/include/ghostscript/gserrors.h
> /usr/include/ghostscript/ierrors.h"
> packages/corei7-64-poky-linux/ghostscript/ghostscript-dev: RRECOMMENDS:
> added "ghostscript-lib-dev"
> 
> That's all good.
> 
> packages/corei7-64-poky-linux/ghostscript/ghostscript-doc: PKGSIZE changed
> from 45465 to 0 (-100%)
>   * FILELIST: removed all items "/usr/share/man/de/man1/ps2pdf.1 ...
> /usr/share/man/man1/pdf2ps.1"
> 
> All the man pages disappeared
> 
> packages/corei7-64-poky-linux/ghostscript/ghostscript: PKGSIZE changed from
> 61037876 to 16376087 (-73%)
>   * FILELIST: removed "/usr/share/ghostscript/9.20/doc/index.html
> /usr/share/ghostscript/9.20/doc/gs.css
> /usr/share/ghostscript/9.20/lib/bjc610a0.upp ...
> /usr/share/ghostscript/9.20/doc/Make.htm /usr/share/ghostscript/9.20/lib/
> wrfont.ps"
> 
> Pretty much all of ghostscript disappeared.

Right. I'm probably removing way too much.

> packages/corei7-64-poky-linux/ghostscript/ghostscript: RDEPENDS: removed
> all items "cups-libimage (['>= 2.2.2']) glibc (['>= 2.25']) cups-lib (['>=
> 2.2.2']) libpng (['>= 1.6.28']) tiff (['>= 4.0.7']) fontconfig (['>=
> 2.12.1'])"
> 
> Was that the intention?  Having libgs sounds sensible but surely both
> should be packaged.

The intention was what I said, probably I misunderstood what the
original packages had, so I haven't noticed things disappearing.

Will investigate and resubmit.

-- 
Cheers,
  Andrew
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version

2017-03-10 Thread Mark Hatle
Just an FYI, I was concerned that $(( ))  (in the new script) was a bash-ism,
but I was able to run the script on an Ubuntu machine using 'dash' as /bin/sh.

--Mark

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> Signed-off-by: Alexander Kanavin 
> ---
>  scripts/rpm2cpio.sh | 108 
> ++--
>  1 file changed, 55 insertions(+), 53 deletions(-)
> 
> diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
> index 5df8c0f7054..cf23472ba95 100755
> --- a/scripts/rpm2cpio.sh
> +++ b/scripts/rpm2cpio.sh
> @@ -1,53 +1,55 @@
> -#!/bin/sh
> -
> -# This comes from the RPM5 5.4.0 distribution.
> -
> -pkg=$1
> -if [ "$pkg" = "" -o ! -e "$pkg" ]; then
> -echo "no package supplied" 1>&2
> -   exit 1
> -fi
> -
> -leadsize=96
> -o=`expr $leadsize + 8`
> -set `od -j $o -N 8 -t u1 $pkg`
> -il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
> -dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
> -# echo "sig il: $il dl: $dl"
> -
> -sigsize=`expr 8 + 16 \* $il + $dl`
> -o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
> -set `od -j $o -N 8 -t u1 $pkg`
> -il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
> -dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
> -# echo "hdr il: $il dl: $dl"
> -
> -hdrsize=`expr 8 + 16 \* $il + $dl`
> -o=`expr $o + $hdrsize`
> -EXTRACTOR="dd if=$pkg ibs=$o skip=1"
> -
> -COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
> -if echo $COMPRESSION |grep -iq gzip; then
> - DECOMPRESSOR=gunzip
> -elif echo $COMPRESSION |grep -iq bzip2; then
> - DECOMPRESSOR=bunzip2
> -elif echo $COMPRESSION |grep -iq xz; then
> - DECOMPRESSOR=unxz
> -elif echo $COMPRESSION |grep -iq cpio; then
> - DECOMPRESSOR=cat
> -else
> - # Most versions of file don't support LZMA, therefore we assume
> - # anything not detected is LZMA
> - DECOMPRESSOR=`which unlzma 2>/dev/null`
> - case "$DECOMPRESSOR" in
> - /* ) ;;
> - *  ) DECOMPRESSOR=`which lzmash 2>/dev/null`
> -  case "$DECOMPRESSOR" in
> -  /* ) DECOMPRESSOR="lzmash -d -c" ;;
> -  *  ) DECOMPRESSOR=cat ;;
> -  esac
> -  ;;
> - esac
> -fi
> -
> -$EXTRACTOR 2>/dev/null | $DECOMPRESSOR
> +#!/bin/sh -efu
> +
> +# This file comes from rpm 4.x distribution
> +
> +fatal() {
> + echo "$*" >&2
> + exit 1
> +}
> +
> +pkg="$1"
> +[ -n "$pkg" -a -e "$pkg" ] ||
> + fatal "No package supplied"
> +
> +_dd() {
> + local o="$1"; shift
> + dd if="$pkg" skip="$o" iflag=skip_bytes status=none $*
> +}
> +
> +calcsize() {
> + offset=$(($1 + 8))
> +
> + local i b b0 b1 b2 b3 b4 b5 b6 b7
> +
> + i=0
> + while [ $i -lt 8 ]; do
> + b="$(_dd $(($offset + $i)) bs=1 count=1)"
> + [ -z "$b" ] &&
> + b="0" ||
> + b="$(exec printf '%u\n' "'$b")"
> + eval "b$i=\$b"
> + i=$(($i + 1))
> + done
> +
> + rsize=$((8 + ((($b0 << 24) + ($b1 << 16) + ($b2 << 8) + $b3) << 4) + 
> ($b4 << 24) + ($b5 << 16) + ($b6 << 8) + $b7))
> + offset=$(($offset + $rsize))
> +}
> +
> +case "$(_dd 0 bs=8 count=1)" in
> + "$(printf '\355\253\356\333')"*) ;; # '\xed\xab\xee\xdb'
> + *) fatal "File doesn't look like rpm: $pkg" ;;
> +esac
> +
> +calcsize 96
> +sigsize=$rsize
> +
> +calcsize $(($offset + (8 - ($sigsize % 8)) % 8))
> +hdrsize=$rsize
> +
> +case "$(_dd $offset bs=3 count=1)" in
> + "$(printf '\102\132')"*) _dd $offset | bunzip2 ;; # '\x42\x5a'
> + "$(printf '\037\213')"*) _dd $offset | gunzip  ;; # '\x1f\x8b'
> + "$(printf '\375\067')"*) _dd $offset | xzcat   ;; # '\xfd\x37'
> + "$(printf '\135\000')"*) _dd $offset | unlzma  ;; # '\x5d\x00'
> + *) fatal "Unrecognized rpm file: $pkg" ;;
> +esac
> 

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 41/44] bash: package bashbug separately

2017-03-10 Thread Mark Hatle
On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> It's a machine-specific script, which is causing conflicts
> when multiple versions of bash are installed in multilib setting,
> and it also does not really make sense for embedded systems anyway.

Out of curiosity what is machine specific here?

(The bashbug shouldn't be part of the main recipe, no disagreement.)  But in the
past we had a single bashbug that would not conflict in multilibs -- that must
have broken at some point.

--Mark

> Signed-off-by: Alexander Kanavin 
> ---
>  meta/recipes-extended/bash/bash.inc | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/meta/recipes-extended/bash/bash.inc 
> b/meta/recipes-extended/bash/bash.inc
> index a05b987b87b..3e9c6625693 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -65,3 +65,7 @@ pkg_postinst_${PN} () {
>  pkg_postrm_${PN} () {
>   printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > 
> $D${sysconfdir}/shells
>  }
> +
> +PACKAGES += "${PN}-bashbug"
> +FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash"
> +FILES_${PN}-bashbug = "${bindir}/bashbug"
> 

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 39/44] package.bbclass: don't exclude package groups from runtime mapping

2017-03-10 Thread Mark Hatle
On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> This ensures that remapping happens correctly, particularly
> when package groups list noarch packages, and multilib is in use. Previously
> this was masked by rpm doing *another* layer of remapping on top of this.

This change is definitely NOT rpm specific.

I'm not sure I understand either why this line was there or why it was removed.

Looking at the history, there was a lot of work being done in this section about
generic package work at the time.

See oe commits:
9c826962ec8fa45c2b035427442b90a41517144e
to
a0cd18ff5405b63b8296b8ef1fc2a488b906f576

--Mark

> Signed-off-by: Alexander Kanavin 
> ---
>  meta/classes/package.bbclass | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index f4c2b5514c5..48fef97251b 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -479,9 +479,6 @@ def get_package_additional_metadata (pkg_type, d):
>  def runtime_mapping_rename (varname, pkg, d):
>  #bb.note("%s before: %s" % (varname, d.getVar(varname)))
>  
> -if bb.data.inherits_class('packagegroup', d):
> -return
> -
>  new_depends = {}
>  deps = bb.utils.explode_dep_versions2(d.getVar(varname) or "")
>  for depend in deps:
> 

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch

2017-03-10 Thread Mark Hatle
On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> This is done for reasons I cannot establish, and greatly complicates the code
> that installs packages into rootfs.

RPM internally resolves ELF dependencies through a resolution system.

If you look at a typical Fedora, SuSe, etc system you will often see:

glibc-x.y.i386.rpm
glibc-x.y.x86-64.rpm

When a package asks for 'glibc', the system will go out and match the one for
the arch that is being requested.

This permits you to have an i386 feed for i386 machines and an x86-64 feed that
can use both.  (This is much less of an issue on x86 these days then it used to
be.  However, it is still an issue on ARM big/LITTLE and some combination
hardware that may have an aarch64 system and an armv7 in the same chassis.)

The typical OE approach is:

glibc-x.y.i386.rpm

and

lib32-glibc-x.y.i386.rpm
glibc-x.y.x86-64.rpm

This means the '32-bit' feeds can not be shared in any way.  The system naming
is also more confusing to people familiar with other RPM distirbutions, as they
are expecting to be able to say 'give me glibc i386' are, and not have to just
know it starts with 'lib32-'.  (This is because internally to RPM, the arch is
treated as part of the naming fields, as long as the contents do not conflict.
So you SHOULD be able to have two non-conflicting glibc* packages installed at
the same time -- the resolver will decide which ELF file to install.)

This is very different in practice to deb/ipkg naming that is required to be 
unique.


The other problem this introduces for people trying to use ISP packages and
other external (non YP sources) is the naming scheme is suddenly wildly
different.  So they may ask (depend on) the wrong named packages.

If you do want to remove this, I would really prefer a switch to full OE/YP
styling naming -- so those that need to keep 'Red Hat style' can do so.

(If having this code in places cause DNF/RPM4 to break, chances are there is a
problem in the configuration or resolving code -- since everything should be
automatic.)

--Mark

> Signed-off-by: Alexander Kanavin 
> ---
>  meta/classes/package_rpm.bbclass | 55 
> 
>  1 file changed, 11 insertions(+), 44 deletions(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass 
> b/meta/classes/package_rpm.bbclass
> index 4f4f8e4e11c..07ab5cdd9e0 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -101,27 +101,6 @@ python write_specfile () {
>  os.chown(f, 0, 0)
>  spec_preamble_top.append('Source%s: %s' % (source_number, 
> source))
>  source_number += 1
> -# We need a simple way to remove the MLPREFIX from the package name,
> -# and dependency information...
> -def strip_multilib(name, d):
> -multilibs = d.getVar('MULTILIBS') or ""
> -for ext in multilibs.split():
> -eext = ext.split(':')
> -if len(eext) > 1 and eext[0] == 'multilib' and name and 
> name.find(eext[1] + '-') >= 0:
> -name = "".join(name.split(eext[1] + '-'))
> -return name
> -
> -def strip_multilib_deps(deps, d):
> -depends = bb.utils.explode_dep_versions2(deps or "")
> -newdeps = {}
> -for dep in depends:
> -newdeps[strip_multilib(dep, d)] = depends[dep]
> -return bb.utils.join_deps(newdeps)
> -
> -#ml = d.getVar("MLPREFIX")
> -#if ml and name and len(ml) != 0 and name.find(ml) == 0:
> -#return ml.join(name.split(ml, 1)[1:])
> -#return name
>  
>  # In RPM, dependencies are of the format: pkg <>= Epoch:Version-Release
>  # This format is similar to OE, however there are restrictions on the
> @@ -283,7 +262,7 @@ python write_specfile () {
>  bb.fatal("No OUTSPECFILE")
>  
>  # Construct the SPEC file...
> -srcname= strip_multilib(d.getVar('PN'), d)
> +srcname= d.getVar('PN')
>  srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
>  srcversion = d.getVar('PKGV').replace('-', '+')
>  srcrelease = d.getVar('PKGR')
> @@ -295,7 +274,7 @@ python write_specfile () {
>  srcdescription = d.getVar('DESCRIPTION') or "."
>  srccustomtagschunk = get_package_additional_metadata("rpm", d)
>  
> -srcdepends = strip_multilib_deps(d.getVar('DEPENDS'), d)
> +srcdepends = d.getVar('DEPENDS')
>  srcrdepends= []
>  srcrrecommends = []
>  srcrsuggests   = []
> @@ -340,7 +319,7 @@ python write_specfile () {
>  if dirfiles is not None:
>  dirfiles = dirfiles.split()
>  
> -splitname= strip_multilib(pkgname, d)
> +splitname= pkgname
>  
>  splitsummary = (localdata.getVar('SUMMARY') or 
> localdata.getVar('DESCRIPTION') or ".")
>  splitversion = (localdata.getVar('PKGV') or "").replace('-', '+')
> @@ -361,12 +340,12 @@ python write_specfile () {
>  # 

Re: [OE-core] [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms

2017-03-10 Thread Mark Hatle
On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> Packages need to contain just one value for the os field, otherwise
> rpm will refuse to install them if they don't match what is in
> /etc/rpm/platform.

How will this work with nativesdk for things like targeting mingw (windows),
darwin, or even alternative OS like Zephyr?

I'm thinking if 'linux-gnu' is invalid, then a simple conversion to 'linux'
would be better then hard coding everything to 'linux'.

--Mark

> Signed-off-by: Alexander Kanavin 
> ---
>  meta/classes/package_rpm.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass 
> b/meta/classes/package_rpm.bbclass
> index 2cdaae0ff25..4f4f8e4e11c 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -692,7 +692,7 @@ python do_package_rpm () {
>  pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
>  d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
>  bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
> -pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
> +pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-linux')
>  bb.utils.mkdirhier(pkgwritedir)
>  os.chmod(pkgwritedir, 0o755)
>  
> 

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages

2017-03-10 Thread Mark Hatle
On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
> are run with it. We can either teach rpm4 and dnf to ignore that dependency
> (a lot of non-upstreamable work), or add auto-satisfy the dependency
> in each package. I've chosen to do the latter.
> 
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/classes/package_rpm.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass 
> b/meta/classes/package_rpm.bbclass
> index ff86dc87980..2cdaae0ff25 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -560,7 +560,7 @@ python write_specfile () {
>  
>  print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
>  print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
> -print_deps(srcrprovides, "Provides", spec_preamble_top, d)
> +print_deps(srcrprovides + (" /bin/sh" if 
> srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d)
>  print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)

I'm confused as to what this is doing...   I see this is only affecting the
virtual 'src package' (or the one built for archiving?)..

But providing /bin/sh as any type of provide seems wrong.  Either --nodeps to
the rpmbuild or there should be a configuration file that the (host/cross) rpm
can use to say "yes I really just have /bin/sh.

(rpm5 has a single file you could put arbitrary file provides into, at one point
rpm4 did as well -- but I don't know if it's still there.)

Doing this runs the risk of someone asking for '/bin/sh' and getting a source
package (a random one) as part of their build process using the DNF sources
option and such.  Definitely not what is expected.

>  
>  # conflicts can not be in a provide!  We will need to filter it.
> 

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 19/44] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags

2017-03-10 Thread Mark Hatle
On 3/10/17 5:23 AM, Alexander Kanavin wrote:
> Previously they were swapped, not sure why. Their meaning, as far as rpm
> world goes, is different:

Just an FYI -- In RPM5 (well before rpm4 had support for recommended packages)
it was implemented as 'suggests'.  I have no idea why.

--Mark

> - Recommends is a soft dependency and will be installed by default; there is
> an option not to do that.
> 
> - Suggests is a suggestion to be picked up and presented to end user by
> package management tools; it has no special meaning otherwise.
> 
> OE packages use RRECOMMENDS, which should be mapped to Recommends rpm tag,
> so that the packages will be picked up as dependencies.
> 
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/classes/package_rpm.bbclass | 12 
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/meta/classes/package_rpm.bbclass 
> b/meta/classes/package_rpm.bbclass
> index 07eb974f736..480c6d58d39 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -450,10 +450,8 @@ python write_specfile () {
>  if splitrpostrm:
>  print_deps(splitrdepends, "Requires(postun)", 
> spec_preamble_bottom, d)
>  
> -# Suggests in RPM are like recommends in OE-core!
> -print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
> -# While there is no analog for suggests... (So call them recommends 
> for now)
> -print_deps(splitrsuggests,  "Recommends", spec_preamble_bottom, d)
> +print_deps(splitrrecommends, "Recommends", spec_preamble_bottom, d)
> +print_deps(splitrsuggests,  "Suggests", spec_preamble_bottom, d)
>  print_deps(splitrprovides,  "Provides", spec_preamble_bottom, d)
>  print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
>  
> @@ -560,10 +558,8 @@ python write_specfile () {
>  if srcrpostrm:
>  print_deps(srcrdepends, "Requires(postun)", spec_preamble_top, d)
>  
> -# Suggests in RPM are like recommends in OE-core!
> -print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
> -# While there is no analog for suggests... (So call them recommends for 
> now)
> -print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
> +print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
> +print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
>  print_deps(srcrprovides, "Provides", spec_preamble_top, d)
>  print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
>  
> 

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 30/44] byacc: remove the recipe

2017-03-10 Thread Mark Hatle
byacc, until recently, was required by the LSB / LSB Test Suite.

So I'd rather is be kept in oe-core through the 2.3 release.

--Mark

On 3/10/17 5:24 AM, Alexander Kanavin wrote:
> It was used only by rpm5 and will be moved to meta-oe
> 
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/recipes-extended/byacc/byacc.inc  |  22 ---
>  .../0001-byacc-do-not-reorder-CC-and-CFLAGS.patch  | 161 
> -
>  meta/recipes-extended/byacc/byacc/byacc-open.patch |  25 
>  meta/recipes-extended/byacc/byacc_20161202.bb  |  12 --
>  .../packagegroup-core-full-cmdline.bb  |   1 -
>  5 files changed, 221 deletions(-)
>  delete mode 100644 meta/recipes-extended/byacc/byacc.inc
>  delete mode 100644 
> meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
>  delete mode 100644 meta/recipes-extended/byacc/byacc/byacc-open.patch
>  delete mode 100644 meta/recipes-extended/byacc/byacc_20161202.bb
> 
> diff --git a/meta/recipes-extended/byacc/byacc.inc 
> b/meta/recipes-extended/byacc/byacc.inc
> deleted file mode 100644
> index adb07193d73..000
> --- a/meta/recipes-extended/byacc/byacc.inc
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -SUMMARY = "Berkeley LALR Yacc parser generator"
> -DESCRIPTION = "A parser generator utility that reads a grammar specification 
> from a file and generates an LR(1) \
> -parser for it.  The parsers consist of a set of LALR(1) parsing tables and a 
> driver routine written in the C \
> -programming language."
> -SECTION = "devel"
> -LICENSE = "PD"
> -
> -SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \
> -   file://byacc-open.patch \
> -   file://0001-byacc-do-not-reorder-CC-and-CFLAGS.patch"
> -
> -EXTRA_OECONF += "--program-transform-name='s,^,b,'"
> -
> -BBCLASSEXTEND = "native"
> -
> -inherit autotools
> -
> -do_configure() {
> - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
> - install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
> - oe_runconf
> -}
> diff --git 
> a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
>  
> b/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
> deleted file mode 100644
> index 7cd2510c8ed..000
> --- 
> a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
> +++ /dev/null
> @@ -1,161 +0,0 @@
> -Subject: byacc: do not reorder $CC and $CFLAGS
> -
> -byacc tries to process $CC and decide which part should belong to CC and 
> which
> -part should below to CFLAGS and then do reordering. It doesn't make much 
> sense
> -for OE. And it doesn't do its work correctly. Some options are dropped.
> -
> -Delete all these stuff so that we could have all options we need.
> -
> -Upstream-Status: Inappropriate [OE Specific]
> -
> -Signed-off-by: Chen Qi 
> 
> - aclocal.m4 |   1 -
> - configure  | 119 
> -
> - 2 files changed, 120 deletions(-)
> -
> -diff --git a/aclocal.m4 b/aclocal.m4
> -index 917a848..62ef241 100644
>  a/aclocal.m4
> -+++ b/aclocal.m4
> -@@ -1021,7 +1021,6 @@ CF_GCC_VERSION
> - CF_ACVERSION_CHECK(2.52,
> - [AC_PROG_CC_STDC],
> - [CF_ANSI_CC_REQD])
> --CF_CC_ENV_FLAGS
> - ])dnl
> - dnl 
> ---
> - dnl CF_PROG_GROFF version: 2 updated: 2015/07/04 11:16:27
> -diff --git a/configure b/configure
> -index 9707e50..4f0497c 100755
>  a/configure
> -+++ b/configure
> -@@ -1946,125 +1946,6 @@ esac
> - # This should have been defined by AC_PROG_CC
> - : ${CC:=cc}
> - 
> --echo "$as_me:1949: checking \$CC variable" >&5
> --echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
> --case "$CC" in
> --(*[\ \  ]-*)
> --echo "$as_me:1953: result: broken" >&5
> --echo "${ECHO_T}broken" >&6
> --{ echo "$as_me:1955: WARNING: your environment misuses the CC variable 
> to hold CFLAGS/CPPFLAGS options" >&5
> --echo "$as_me: WARNING: your environment misuses the CC variable to hold 
> CFLAGS/CPPFLAGS options" >&2;}
> --# humor him...
> --cf_flags=`echo "$CC" | sed -e 's/^.*[   ]\(-[^  ]\)/\1/'`
> --CC=`echo "$CC " | sed -e 's/[   ]-[^].*$//' -e 's/[ ]*$//'`
> --for cf_arg in $cf_flags
> --do
> --case "x$cf_arg" in
> --(x-[IUDfgOW]*)
> --
> --cf_fix_cppflags=no
> --cf_new_cflags=
> --cf_new_cppflags=
> --cf_new_extra_cppflags=
> --
> --for cf_add_cflags in $cf_flags
> --do
> --case $cf_fix_cppflags in
> --(no)
> --case $cf_add_cflags in
> --(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
> --case $cf_add_cflags in
> --(-D*)
> --cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 
> 's/^-D[^=]*='\''\"[^"]*//'`
> --
> --test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
> --&& test 

[OE-core] [PATCH] uninative: remove unneeded call to sparse copy

2017-03-10 Thread Stephano Cetola
As of this commit:

39f5a05152aa0c3503735e18dd3b4c066b284107

patchelf no longer inflates file sizes. Since the files are no longer
inflated by patchelf, we can skip using cp with the --sparse option.
More details as to how patchelf has changed are available in that
commit log.

Signed-off-by: Stephano Cetola 
---
 meta/classes/uninative.bbclass | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 0d1063a13c..ee4ab20c17 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -122,7 +122,4 @@ python uninative_changeinterp () {
 continue
 
 subprocess.check_output(("patchelf-uninative", 
"--set-interpreter", d.getVar("UNINATIVE_LOADER"), f), stderr=subprocess.STDOUT)
-subprocess.check_output(("cp", "--sparse=always", f, f + 
".sparse"), stderr=subprocess.STDOUT)
-os.unlink(f)
-os.rename(f + ".sparse", f)
 }
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [meta-oe][PATCH rebased] wic: Fix and update rootfs-pcbios-ext plugin

2017-03-10 Thread Leonardo Sandoval
On Thu, 2017-03-09 at 23:08 +0100, Adrian Freihofer wrote:
> Resolves #11003

please sign-off and use the correct format for including the bugzilla
entry.




-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] wic: Prevent duplicate entries on fstab

2017-03-10 Thread Otavio Salvador
On Fri, Mar 10, 2017 at 10:43 AM, Patrick Ohly  wrote:
> On Fri, 2017-03-10 at 10:32 -0300, Otavio Salvador wrote:
>> On Fri, Mar 10, 2017 at 4:33 AM, Patrick Ohly  wrote:
>> > Suppose IMAGE_FSTYPES = "ext4 wic", and the WKS_FILE has multiple
>> > partitions and thus needs more entries in /etc/fstab than the
>> > single-partition "ext4" - the result of do_rootfs simply cannot work for
>> > both.
>>
>> That is the point. If the machine requires to use multiple partitions
>> the ext4 should have the /etc/fstab ready for use when deployed.
>
> My thinking was a bit different. I had in mind a setup where the "ext4"
> format as used by qemu has all files of the rootfs in a single
> partition, whereas the wic image splits out the data into multiple
> partitions (it recently gained such a feature).
>
> This could be made to work if wic knew how to change fstab without
> rewriting the root filesystem. But as that can't be done, such a
> combination of different image formats is only possible for a rootfs
> which always works with just a single partition.

So it seems like we need a command line option for wic which says for
it to generate/do not generate the /etc/fstab.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] wic: Prevent duplicate entries on fstab

2017-03-10 Thread Patrick Ohly
On Fri, 2017-03-10 at 10:32 -0300, Otavio Salvador wrote:
> On Fri, Mar 10, 2017 at 4:33 AM, Patrick Ohly  wrote:
> > Suppose IMAGE_FSTYPES = "ext4 wic", and the WKS_FILE has multiple
> > partitions and thus needs more entries in /etc/fstab than the
> > single-partition "ext4" - the result of do_rootfs simply cannot work for
> > both.
> 
> That is the point. If the machine requires to use multiple partitions
> the ext4 should have the /etc/fstab ready for use when deployed.

My thinking was a bit different. I had in mind a setup where the "ext4"
format as used by qemu has all files of the rootfs in a single
partition, whereas the wic image splits out the data into multiple
partitions (it recently gained such a feature).

This could be made to work if wic knew how to change fstab without
rewriting the root filesystem. But as that can't be done, such a
combination of different image formats is only possible for a rootfs
which always works with just a single partition.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/4] meta-selftest: add selftest-ed recipes

2017-03-10 Thread Patrick Ohly
On Fri, 2017-03-10 at 13:27 +, Joshua Lock wrote:
> On Thu, 2017-03-09 at 21:05 +0100, Patrick Ohly wrote:
> > On Wed, 2017-03-08 at 17:24 +, Joshua Lock wrote:
> > > The oe-selftest oescripts.TestScripts.test_cleanup_workdir was
> > > using
> > > gzip and the GPLv2 variant to test cleanup of the workdir. This
> > > broke
> > > with the removal of GPLv2 recipes from OE-Core.
> > > 
> > > Instead of relying on recipes in OE-Core remaining static we should
> > > ensure that meta-selftest provides recipes required for the tests
> > > to pass.
> > > To that end we take a copy of the current GPLv2 and GPLv3 variants
> > > of ed
> > > and include them in meta-selftest as new recipes.
> > > We chose ed over gzip as gzip has dependencies which would require
> > > additional GPLv2 recipes to be included in meta-selftest.
> > 
> > Wouldn't the test become faster when using artificial recipes, i.e.
> > something which doesn't really need sources? Such an artificial
> > recipe
> > can use a local file as its "source", for example.
> 
> Indeed, that would make the test faster. I took a shorter route for
> this series in an attempt to unblock M3, however I realise that the
> bitbake targets used in oe-selftest could do with a consistent review.

Makes sense.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] wic: Prevent duplicate entries on fstab

2017-03-10 Thread Otavio Salvador
On Fri, Mar 10, 2017 at 4:33 AM, Patrick Ohly  wrote:
> On Thu, 2017-03-09 at 18:11 -0300, Otavio Salvador wrote:
...
>> While discussing this with Fabio here, at O.S. Systems, we ended
>> agreeing that wic touching the fstab is wrong. The fstab should be
>> prepare as part of the image and not mangled during the disk
>> generation.
>
> I agree that it is a hack, and I also would prefer to not have wic
> modify the existing rootfs. That also breaks when IMA is enabled,
> because then the content of the /etc/fstab must match the security.ima
> xattr that was calculated for the unmodified content.

Exactly! the generated rootfs should not be modified. This is critical
for IMA but also for root-only fs and delta-based upgrades.

> However, it's a problem that doesn't have a good solution. The image
> recipe which describes what goes into the rootfs and thus determines the
> content of /etc/fstab has little control over the IMAGE_FSTYPES - that's
> typically set by the BSP or the user.

Yes but the /etc/fstab should be modified by the metadata and not
during the image generation. The format used (ext4, fsfs, wic...)
should not impact in the contents inside of the image.

> Suppose IMAGE_FSTYPES = "ext4 wic", and the WKS_FILE has multiple
> partitions and thus needs more entries in /etc/fstab than the
> single-partition "ext4" - the result of do_rootfs simply cannot work for
> both.

That is the point. If the machine requires to use multiple partitions
the ext4 should have the /etc/fstab ready for use when deployed.

> Right now, all one can do is assume (or perhaps check) that the right
> IMAGE_FSTYPES are set.
>
>> The mangled fstab is disastrous if someone uses an image upgrade. The
>> generated tarball or filesystem WILL NOT be the same running on the
>> device as wic will add entries.
>
> When do you take a snapshot of the rootfs? Is it as another do_image_*
> task, via an IMAGE_FSTYPE entry?

We generally use the pristine ext4 filesystem, for example.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/4] meta-selftest: add selftest-ed recipes

2017-03-10 Thread Joshua Lock
On Thu, 2017-03-09 at 21:05 +0100, Patrick Ohly wrote:
> On Wed, 2017-03-08 at 17:24 +, Joshua Lock wrote:
> > The oe-selftest oescripts.TestScripts.test_cleanup_workdir was
> > using
> > gzip and the GPLv2 variant to test cleanup of the workdir. This
> > broke
> > with the removal of GPLv2 recipes from OE-Core.
> > 
> > Instead of relying on recipes in OE-Core remaining static we should
> > ensure that meta-selftest provides recipes required for the tests
> > to pass.
> > To that end we take a copy of the current GPLv2 and GPLv3 variants
> > of ed
> > and include them in meta-selftest as new recipes.
> > We chose ed over gzip as gzip has dependencies which would require
> > additional GPLv2 recipes to be included in meta-selftest.
> 
> Wouldn't the test become faster when using artificial recipes, i.e.
> something which doesn't really need sources? Such an artificial
> recipe
> can use a local file as its "source", for example.

Indeed, that would make the test faster. I took a shorter route for
this series in an attempt to unblock M3, however I realise that the
bitbake targets used in oe-selftest could do with a consistent review.

I've filed an enhancement request to that effect:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=11142

> Or did I misunderstand something and the selftest doesn't really
> build
> ed?

It does build ed, which is an improvement over building gzip but not as
fast as something artificial.

Thanks for the feedback,

Joshua
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] wic/partionedfs: Avoid reserving space for non-existing ext. partition

2017-03-10 Thread Kristian Amlie
We don't need the gap that the extended partition occupies if we
already know that we have less than five partitions. Saves up to one
full alignment of space.

Signed-off-by: Kristian Amlie 
---
 scripts/lib/wic/plugins/imager/direct.py | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index b7e324a..5fbed56 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -344,6 +344,10 @@ class PartitionedImage():
 
 logger.debug("Assigning %s partitions to disks", self.ptable_format)
 
+# The number of primary and logical partitions. Extended partition and
+# partitions not listed in the table are not included.
+num_real_partitions = len([p for p in self.partitions if not 
p.no_table])
+
 # Go through partitions in the order they are added in .ks file
 for num in range(len(self.partitions)):
 part = self.partitions[num]
@@ -369,7 +373,7 @@ class PartitionedImage():
 # Skip one sector required for the partitioning scheme overhead
 self.offset += overhead
 
-if self.realpart > 3:
+if self.realpart > 3 and num_real_partitions > 4:
 # Reserve a sector for EBR for every logical partition
 # before alignment is performed.
 if self.ptable_format == "msdos":
@@ -408,7 +412,7 @@ class PartitionedImage():
 
 if self.ptable_format == "msdos":
 # only count the partitions that are in partition table
-if len([p for p in self.partitions if not p.no_table]) > 4:
+if num_real_partitions > 4:
 if self.realpart > 3:
 part.type = 'logical'
 part.num = self.realpart + 1
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] wic/partionedfs: Avoid reserving space for non-existing ext. partition

2017-03-10 Thread Kristian Amlie

Alright, finally got around to this again. Patch rebased, and passing
tests.

-- 
Kristian
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/3] quilt: Avoid hardcoding paths into output

2017-03-10 Thread Richard Purdie
Avoids:
 quilt-0.65-r0 do_package_qa: QA Issue: 
/usr/lib/quilt/ptest/quilt/scripts/edmail contained in package
 quilt-ptest requires /media/build1/poky/build/tmp/hosttools/perl, but no 
providers found in
 RDEPENDS_quilt-ptest? [file-rdeps]

Signed-off-by: Richard Purdie 
---
 meta/recipes-devtools/quilt/quilt-native.inc | 1 +
 meta/recipes-devtools/quilt/quilt.inc| 2 ++
 2 files changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/quilt/quilt-native.inc 
b/meta/recipes-devtools/quilt/quilt-native.inc
index 5c4b0a2..fce5fa1 100644
--- a/meta/recipes-devtools/quilt/quilt-native.inc
+++ b/meta/recipes-devtools/quilt/quilt-native.inc
@@ -6,6 +6,7 @@ inherit native
 
 PATCHTOOL = "patch"
 EXTRA_OECONF = "--disable-nls"
+EXTRA_OECONF_append_class-target = "--with-perl=perl"
 
 do_configure () {
oe_runconf
diff --git a/meta/recipes-devtools/quilt/quilt.inc 
b/meta/recipes-devtools/quilt/quilt.inc
index 85aaf8d..57e2a14 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -33,6 +33,8 @@ RDEPENDS_${PN} = "bash"
 EXTRA_OE_MAKE_ARGS_darwin ?= ""
 EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}"
 
+EXTRA_OECONF = "--with-perl=perl"
+
 CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash"
 
 # Don't setup symlinks to host utilities, we don't need them
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/3] cdrtools-native: Fix when cc is missing

2017-03-10 Thread Richard Purdie
If cc isn't in PATH, the recipe fails. Set a variable to avoid this.

Signed-off-by: Richard Purdie 
---
 meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb 
b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
index ff4d5ac..0e0be62 100644
--- a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
@@ -14,6 +14,9 @@ SRC_URI[sha256sum] = 
"ed282eb6276c4154ce6a0b5dee0bdb81940d0cbbfc7d03f769c4735ef5
 
 EXTRA_OEMAKE = "-e MAKEFLAGS="
 
+# Stop failures when 'cc' can't be found
+export ac_cv_prog_CC = "${CC}"
+
 inherit native
 
 PV = "3.01a31+really3.01"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/3] runqemu-gen-tapdevs: Improve help text with an example

2017-03-10 Thread Richard Purdie
Figuring how the correct commandline isn't trivial, improve the help
text with RSS in mind.

Signed-off-by: Richard Purdie 
---
 scripts/runqemu-gen-tapdevs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
index bfb60f4..9e5e5b9 100755
--- a/scripts/runqemu-gen-tapdevs
+++ b/scripts/runqemu-gen-tapdevs
@@ -28,6 +28,8 @@ usage() {
echo "Where  is the numeric group id the tap devices will be owned 
by"
echo " is the number of tap devices to create (0 to remove all)"
echo " is the path to the build system's native 
sysroot"
+   echo "e.g. $ bitbake qemu-helper-native -c addto_recipe_sysroot"
+   echo "$ sudo $0 1000 1000 4 
tmp/work/x86_64-linux/qemu-helper-native/*/recipe-sysroot-native/"
exit 1
 }
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 43/44] base-files: do not write the current date into /etc/issue and /etc/issue.net

2017-03-10 Thread Alexander Kanavin
This is causing a problem in multilib where base-files and lib64/32-base-files
clash because they may have different dates. Also, if the package is coming
from sstate it has an incorrect date anyway.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb 
b/meta/recipes-core/base-files/base-files_3.0.14.bb
index d1380053115..c7a9e803cb1 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -145,8 +145,9 @@ do_install_basefilesissue () {
printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
if [ -n "${DISTRO_VERSION}" ]; then
-   printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
-   printf "${DISTRO_VERSION} " >> 
${D}${sysconfdir}/issue.net
+   
distro_version_nodate=${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot').replace('${DATE}','')}
+   printf "%s " $distro_version_nodate >> 
${D}${sysconfdir}/issue
+   printf "%s " $distro_version_nodate >> 
${D}${sysconfdir}/issue.net
fi
printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
echo >> ${D}${sysconfdir}/issue
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 44/44] gpgme: fix python module build and installation

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 ...-Avoid-host-contamination-from-gpg-config.patch | 30 ++
 .../0001-Correctly-install-python-modules.patch| 26 +++
 meta/recipes-support/gpgme/gpgme_1.8.0.bb  |  2 ++
 3 files changed, 58 insertions(+)
 create mode 100644 
meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
 create mode 100644 
meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch

diff --git 
a/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
 
b/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
new file mode 100644
index 000..6ce58ba3f65
--- /dev/null
+++ 
b/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
@@ -0,0 +1,30 @@
+From 96cfc76def123141d0cecaab857da3880396d5ef Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 9 Mar 2017 22:11:00 +0200
+Subject: [PATCH] Avoid host contamination from gpg-config
+
+getconfig is calling gpgme-config (from the source tree) and it
+gives -L{libdir} (i.e. -L/usr/lib) as the first item for linking.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ lang/python/setup.py.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
+index 213fe33..22629e2 100755
+--- a/lang/python/setup.py.in
 b/lang/python/setup.py.in
+@@ -86,7 +86,7 @@ subprocess.check_call([sys.executable, "gpgme-h-clean.py", 
gpg_error_h],
+   stdout=open("errors.i", "w"))
+ 
+ define_macros = []
+-libs = getconfig('libs')
++libs = getconfig('libs')[1:]
+ 
+ # Define extra_macros for both the SWIG and C code
+ for k, v in extra_macros.items():
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch 
b/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch
new file mode 100644
index 000..42655fbbe68
--- /dev/null
+++ 
b/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch
@@ -0,0 +1,26 @@
+From 4d714c097e497b63d2e8b22a834c671045e215e9 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 9 Mar 2017 21:34:55 +0200
+Subject: [PATCH] Correctly install python modules
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ lang/python/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index e32fd12..5ecf6fb 100644
+--- a/lang/python/Makefile.am
 b/lang/python/Makefile.am
+@@ -102,6 +102,7 @@ install-exec-local:
+   for PYTHON in $(PYTHONS); do \
+ $$PYTHON setup.py install \
+ --prefix $(DESTDIR)$(prefix) \
++  --install-lib=$(DESTDIR)${pythondir} \
+ --record files.txt \
+ --verbose ; \
+ cat files.txt >> install_files.txt ; \
+-- 
+2.11.0
+
diff --git a/meta/recipes-support/gpgme/gpgme_1.8.0.bb 
b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
index 86922f6fd98..d3e7880a47b 100644
--- a/meta/recipes-support/gpgme/gpgme_1.8.0.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
@@ -13,6 +13,8 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html;
 SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
file://pkgconfig.patch \
file://python-lang-config.patch \
+   file://0001-Correctly-install-python-modules.patch \
+   file://0001-Avoid-host-contamination-from-gpg-config.patch \
   "
 
 SRC_URI[md5sum] = "722a4153904b9b5dc15485a22d29263b"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 38/44] package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch

2017-03-10 Thread Alexander Kanavin
This is done for reasons I cannot establish, and greatly complicates the code
that installs packages into rootfs.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 55 
 1 file changed, 11 insertions(+), 44 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 4f4f8e4e11c..07ab5cdd9e0 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -101,27 +101,6 @@ python write_specfile () {
 os.chown(f, 0, 0)
 spec_preamble_top.append('Source%s: %s' % (source_number, 
source))
 source_number += 1
-# We need a simple way to remove the MLPREFIX from the package name,
-# and dependency information...
-def strip_multilib(name, d):
-multilibs = d.getVar('MULTILIBS') or ""
-for ext in multilibs.split():
-eext = ext.split(':')
-if len(eext) > 1 and eext[0] == 'multilib' and name and 
name.find(eext[1] + '-') >= 0:
-name = "".join(name.split(eext[1] + '-'))
-return name
-
-def strip_multilib_deps(deps, d):
-depends = bb.utils.explode_dep_versions2(deps or "")
-newdeps = {}
-for dep in depends:
-newdeps[strip_multilib(dep, d)] = depends[dep]
-return bb.utils.join_deps(newdeps)
-
-#ml = d.getVar("MLPREFIX")
-#if ml and name and len(ml) != 0 and name.find(ml) == 0:
-#return ml.join(name.split(ml, 1)[1:])
-#return name
 
 # In RPM, dependencies are of the format: pkg <>= Epoch:Version-Release
 # This format is similar to OE, however there are restrictions on the
@@ -283,7 +262,7 @@ python write_specfile () {
 bb.fatal("No OUTSPECFILE")
 
 # Construct the SPEC file...
-srcname= strip_multilib(d.getVar('PN'), d)
+srcname= d.getVar('PN')
 srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
 srcversion = d.getVar('PKGV').replace('-', '+')
 srcrelease = d.getVar('PKGR')
@@ -295,7 +274,7 @@ python write_specfile () {
 srcdescription = d.getVar('DESCRIPTION') or "."
 srccustomtagschunk = get_package_additional_metadata("rpm", d)
 
-srcdepends = strip_multilib_deps(d.getVar('DEPENDS'), d)
+srcdepends = d.getVar('DEPENDS')
 srcrdepends= []
 srcrrecommends = []
 srcrsuggests   = []
@@ -340,7 +319,7 @@ python write_specfile () {
 if dirfiles is not None:
 dirfiles = dirfiles.split()
 
-splitname= strip_multilib(pkgname, d)
+splitname= pkgname
 
 splitsummary = (localdata.getVar('SUMMARY') or 
localdata.getVar('DESCRIPTION') or ".")
 splitversion = (localdata.getVar('PKGV') or "").replace('-', '+')
@@ -361,12 +340,12 @@ python write_specfile () {
 # Map the dependencies into their final form
 mapping_rename_hook(localdata)
 
-splitrdepends= strip_multilib_deps(localdata.getVar('RDEPENDS'), d)
-splitrrecommends = 
strip_multilib_deps(localdata.getVar('RRECOMMENDS'), d)
-splitrsuggests   = strip_multilib_deps(localdata.getVar('RSUGGESTS'), 
d)
-splitrprovides   = strip_multilib_deps(localdata.getVar('RPROVIDES'), 
d)
-splitrreplaces   = strip_multilib_deps(localdata.getVar('RREPLACES'), 
d)
-splitrconflicts  = strip_multilib_deps(localdata.getVar('RCONFLICTS'), 
d)
+splitrdepends= localdata.getVar('RDEPENDS')
+splitrrecommends = localdata.getVar('RRECOMMENDS')
+splitrsuggests   = localdata.getVar('RSUGGESTS')
+splitrprovides   = localdata.getVar('RPROVIDES')
+splitrreplaces   = localdata.getVar('RREPLACES')
+splitrconflicts  = localdata.getVar('RCONFLICTS')
 splitrobsoletes  = []
 
 splitrpreinst  = localdata.getVar('pkg_preinst')
@@ -640,14 +619,6 @@ python write_specfile () {
 write_specfile[vardepsexclude] = "OVERRIDES"
 
 python do_package_rpm () {
-# We need a simple way to remove the MLPREFIX from the package name,
-# and dependency information...
-def strip_multilib(name, d):
-ml = d.getVar("MLPREFIX")
-if ml and name and len(ml) != 0 and name.find(ml) >= 0:
-return "".join(name.split(ml))
-return name
-
 workdir = d.getVar('WORKDIR')
 tmpdir = d.getVar('TMPDIR')
 pkgd = d.getVar('PKGD')
@@ -665,7 +636,7 @@ python do_package_rpm () {
 # If the spec file already exist, and has not been stored into 
 # pseudo's files.db, it maybe cause rpmbuild src.rpm fail,
 # so remove it before doing rpmbuild src.rpm.
-srcname= strip_multilib(d.getVar('PN'), d)
+srcname= d.getVar('PN')
 outspecfile = workdir + "/" + srcname + ".spec"
 if os.path.isfile(outspecfile):
 os.remove(outspecfile)
@@ -684,11 +655,7 @@ python do_package_rpm () {
 # Let's not fight against 

[OE-core] [PATCH 42/44] db: do the multilib_header processing for db.h

2017-03-10 Thread Alexander Kanavin
As it varies from one machine to another.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-support/db/db_5.3.28.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/db/db_5.3.28.bb 
b/meta/recipes-support/db/db_5.3.28.bb
index 4f5aae60132..b7232fc8942 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -28,7 +28,7 @@ SRC_URI[sha256sum] = 
"e0a992d740709892e81f9d93f06daf305cf73fb81b545afe7247804317
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
 
-inherit autotools
+inherit autotools multilib_header
 
 # Put virtual/db in any appropriate provider of a
 # relational database, use it as a dependency in
@@ -96,6 +96,8 @@ do_install_append() {
ln -s db51/db.h ${D}/${includedir}/db.h
ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
 
+oe_multilib_header db51/db.h
+
# The docs end up in /usr/docs - not right.
if test -d "${D}/${prefix}/docs"
then
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 35/44] security_flags.inc: update to reflect smart->dnf transition

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/conf/distro/include/security_flags.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/conf/distro/include/security_flags.inc 
b/meta/conf/distro/include/security_flags.inc
index 5a1cbb13192..b0a775450fe 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -72,14 +72,13 @@ SECURITY_CFLAGS_pn-openssl = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-opensp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-ppp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-python-backports-lzma = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-pycurl = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python-smartpm = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-python-pygpgme = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3-numpy = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3-pycairo = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3 = "${SECURITY_NO_PIE_CFLAGS}"
-# Revert RPM to using internally supported values
-SECURITY_CFLAGS_pn-rpm = "${lcl_maybe_fortify} -fstack-protector"
 SECURITY_CFLAGS_pn-syslinux = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-slang = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-source-highlight = "${SECURITY_NO_PIE_CFLAGS}"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 39/44] package.bbclass: don't exclude package groups from runtime mapping

2017-03-10 Thread Alexander Kanavin
This ensures that remapping happens correctly, particularly
when package groups list noarch packages, and multilib is in use. Previously
this was masked by rpm doing *another* layer of remapping on top of this.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package.bbclass | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index f4c2b5514c5..48fef97251b 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -479,9 +479,6 @@ def get_package_additional_metadata (pkg_type, d):
 def runtime_mapping_rename (varname, pkg, d):
 #bb.note("%s before: %s" % (varname, d.getVar(varname)))
 
-if bb.data.inherits_class('packagegroup', d):
-return
-
 new_depends = {}
 deps = bb.utils.explode_dep_versions2(d.getVar(varname) or "")
 for depend in deps:
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 41/44] bash: package bashbug separately

2017-03-10 Thread Alexander Kanavin
It's a machine-specific script, which is causing conflicts
when multiple versions of bash are installed in multilib setting,
and it also does not really make sense for embedded systems anyway.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-extended/bash/bash.inc | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index a05b987b87b..3e9c6625693 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -65,3 +65,7 @@ pkg_postinst_${PN} () {
 pkg_postrm_${PN} () {
printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > 
$D${sysconfdir}/shells
 }
+
+PACKAGES += "${PN}-bashbug"
+FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash"
+FILES_${PN}-bashbug = "${bindir}/bashbug"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 36/44] package_rpm.bbclass: do not set the OS dynamically when building rpms

2017-03-10 Thread Alexander Kanavin
Packages need to contain just one value for the os field, otherwise
rpm will refuse to install them if they don't match what is in
/etc/rpm/platform.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 2cdaae0ff25..4f4f8e4e11c 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -692,7 +692,7 @@ python do_package_rpm () {
 pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
 d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
 bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
-pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
+pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-linux')
 bb.utils.mkdirhier(pkgwritedir)
 os.chmod(pkgwritedir, 0o755)
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 40/44] glibc: do the multilib_header magic also for bits/long-double.h

2017-03-10 Thread Alexander Kanavin
Otherwise it will cause conflicts in mutlilib setting, as it
varies from one machine to another.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index a674c237993..5316bb1fdbf 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -82,7 +82,7 @@ do_install_append () {
rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
fi
 
-   oe_multilib_header bits/syscall.h
+   oe_multilib_header bits/syscall.h bits/long-double.h
 
if [ -f ${D}${bindir}/mtrace ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e 
'2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 33/44] run-postinsts: simplify the logic of whether to install it to images

2017-03-10 Thread Alexander Kanavin
The logic is scattered all over the place, but amounts to
"install, unless the rootfs is read only". Let's express that directly.

Signed-off-by: Alexander Kanavin 
---
 meta-selftest/recipes-test/images/oe-selftest-image.bb | 2 +-
 meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +-
 meta/classes/image.bbclass | 2 +-
 meta/classes/rootfs_deb.bbclass| 1 -
 meta/classes/rootfs_ipk.bbclass| 1 -
 meta/classes/rootfs_rpm.bbclass| 1 -
 meta/lib/oe/manifest.py| 2 +-
 meta/recipes-core/images/core-image-minimal.bb | 2 +-
 meta/recipes-devtools/dpkg/dpkg.inc| 2 +-
 meta/recipes-devtools/opkg/opkg_0.3.4.bb   | 2 +-
 10 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb 
b/meta-selftest/recipes-test/images/oe-selftest-image.bb
index f17094c5d08..5d4d10eef69 100644
--- a/meta-selftest/recipes-test/images/oe-selftest-image.bb
+++ b/meta-selftest/recipes-test/images/oe-selftest-image.bb
@@ -1,6 +1,6 @@
 SUMMARY = "An image used during oe-selftest tests"
 
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} dropbear"
+IMAGE_INSTALL = "packagegroup-core-boot dropbear"
 IMAGE_FEATURES = "debug-tweaks"
 
 IMAGE_LINGUAS = " "
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb 
b/meta-selftest/recipes-test/images/wic-image-minimal.bb
index b687935c496..95946971c2c 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -2,7 +2,7 @@ SUMMARY = "An example of partitioned image."
 
 SRC_URI = "file://${FILE_DIRNAME}/${BPN}.wks"
 
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
+IMAGE_INSTALL = "packagegroup-core-boot"
 
 IMAGE_FSTYPES = "wic"
 
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 127e62d5d95..405fd73c043 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -29,7 +29,7 @@ IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs 
empty-root-password
 IMAGE_GEN_DEBUGFS ?= "0"
 
 # rootfs bootstrap install
-ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", 
"package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
+ROOTFS_BOOTSTRAP_INSTALL = "run-postinsts"
 
 # These packages will be removed from a read-only rootfs after all other
 # packages have been installed
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index e8facd43687..10af4b5ff0f 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -3,7 +3,6 @@
 #
 
 ROOTFS_PKGMANAGE = "dpkg apt"
-ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "dpkg-native:do_populate_sysroot 
apt-native:do_populate_sysroot"
 do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot 
apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 6b60c466386..a57b1d34f7b 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -7,7 +7,6 @@
 
 EXTRAOPKGCONFIG ?= ""
 ROOTFS_PKGMANAGE = "opkg ${EXTRAOPKGCONFIG}"
-ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "opkg-native:do_populate_sysroot 
opkg-utils-native:do_populate_sysroot"
 do_populate_sdk[depends] += "opkg-native:do_populate_sysroot 
opkg-utils-native:do_populate_sysroot"
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 65881a60a7b..af0f23877ac 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -3,7 +3,6 @@
 #
 
 ROOTFS_PKGMANAGE = "rpm dnf"
-ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
 
 # dnf is using our custom distutils, and so will fail without these
 export STAGING_INCDIR
diff --git a/meta/lib/oe/manifest.py b/meta/lib/oe/manifest.py
index 6ec9b1af8bc..60c49be0e99 100644
--- a/meta/lib/oe/manifest.py
+++ b/meta/lib/oe/manifest.py
@@ -104,7 +104,7 @@ class Manifest(object, metaclass=ABCMeta):
 pkg_list['lgp'] = \
 "locale-base-en-us locale-base-en-gb"
 elif image_rootfs.find("core-image-minimal") > 0:
-pkg_list[self.PKG_TYPE_MUST_INSTALL] = "run-postinsts 
packagegroup-core-boot"
+pkg_list[self.PKG_TYPE_MUST_INSTALL] = "packagegroup-core-boot"
 
 with open(self.initial_manifest, "w+") as manifest:
 manifest.write(self.initial_manifest_file_header)
diff --git a/meta/recipes-core/images/core-image-minimal.bb 
b/meta/recipes-core/images/core-image-minimal.bb
index 8dd77b3472e..4630026aa9d 100644
--- a/meta/recipes-core/images/core-image-minimal.bb
+++ b/meta/recipes-core/images/core-image-minimal.bb
@@ -1,6 +1,6 @@
 SUMMARY = "A small image just capable of allowing a device 

[OE-core] [PATCH 32/44] oe-selftest: no need to parse gpg output to determine the name of the signing key

2017-03-10 Thread Alexander Kanavin
The parsing fails on my machine, and we use a key with a hardcoded name,
and so can provide it directly.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oeqa/selftest/signing.py | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/meta/lib/oeqa/selftest/signing.py 
b/meta/lib/oeqa/selftest/signing.py
index a9b135aab44..38b2fca8cf9 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -103,13 +103,7 @@ class Signing(oeSelfTest):
 self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
 self.add_command_to_tearDown('rm -rf %s' % sstatedir)
 
-# Determine the pub key signature
-ret = runCmd('gpg --homedir %s --list-keys' % self.gpg_dir)
-pub_key = re.search(r'^pub\s+\S+/(\S+)\s+', ret.output, re.M)
-self.assertIsNotNone(pub_key, 'Failed to determine the public key 
signature.')
-pub_key = pub_key.group(1)
-
-feature = 'SSTATE_SIG_KEY ?= "%s"\n' % pub_key
+feature = 'SSTATE_SIG_KEY ?= "testuser"\n'
 feature += 'SSTATE_SIG_PASSPHRASE ?= "test123"\n'
 feature += 'SSTATE_VERIFY_SIG ?= "1"\n'
 feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 37/44] nspr: do not use shared library symbol resolution with musl

2017-03-10 Thread Alexander Kanavin
It breaks rpm 4.x because musl is printing an error message
when the symbol is not found, and rpm takes it as an actual error.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-support/nspr/nspr_4.13.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/nspr/nspr_4.13.1.bb 
b/meta/recipes-support/nspr/nspr_4.13.1.bb
index 343800c80fc..9c15a8b40ba 100644
--- a/meta/recipes-support/nspr/nspr_4.13.1.bb
+++ b/meta/recipes-support/nspr/nspr_4.13.1.bb
@@ -16,7 +16,7 @@ SRC_URI = 
"http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz
 CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} 
-D_PR_POLL_AVAILABLE \
   -D_PR_HAVE_OFF64_T -D_PR_INET6 
-D_PR_HAVE_INET_NTOP \
   -D_PR_HAVE_GETHOSTBYNAME2 
-D_PR_HAVE_GETADDRINFO \
-  -D_PR_INET6_PROBE'"
+  -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
 
 UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/;
 UPSTREAM_CHECK_REGEX = "v(?P\d+(\.\d+)+)/"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 34/44] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages

2017-03-10 Thread Alexander Kanavin
nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
are run with it. We can either teach rpm4 and dnf to ignore that dependency
(a lot of non-upstreamable work), or add auto-satisfy the dependency
in each package. I've chosen to do the latter.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ff86dc87980..2cdaae0ff25 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -560,7 +560,7 @@ python write_specfile () {
 
 print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
 print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
-print_deps(srcrprovides, "Provides", spec_preamble_top, d)
+print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") 
else ""), "Provides", spec_preamble_top, d)
 print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
 
 # conflicts can not be in a provide!  We will need to filter it.
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 29/44] selftest: update output checks in incremental image test to match what dnf prints

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/lib/oeqa/selftest/buildoptions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/buildoptions.py 
b/meta/lib/oeqa/selftest/buildoptions.py
index 568882ba8f3..a97257e4177 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -22,12 +22,12 @@ class ImageOptionsTests(oeSelfTest):
 bitbake("core-image-minimal")
 log_data_file = os.path.join(get_bb_var("WORKDIR", 
"core-image-minimal"), "temp/log.do_rootfs")
 log_data_created = ftools.read_file(log_data_file)
-incremental_created = re.search("NOTE: load old install solution for 
incremental install\nNOTE: old install solution not exist\nNOTE: creating new 
install solution for incremental install(\n.*)*NOTE: Installing the following 
packages:.*packagegroup-core-ssh-openssh", log_data_created)
+incremental_created = re.search("Installing  : 
packagegroup-core-ssh-openssh", log_data_created)
 self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
 self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % 
log_data_created)
 bitbake("core-image-minimal")
 log_data_removed = ftools.read_file(log_data_file)
-incremental_removed = re.search("NOTE: load old install solution for 
incremental install\nNOTE: creating new install solution for incremental 
install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*", log_data_removed)
+incremental_removed = re.search("Erasing : 
packagegroup-core-ssh-openssh", log_data_removed)
 self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % 
log_data_removed)
 
 @testcase(286)
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 30/44] byacc: remove the recipe

2017-03-10 Thread Alexander Kanavin
It was used only by rpm5 and will be moved to meta-oe

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-extended/byacc/byacc.inc  |  22 ---
 .../0001-byacc-do-not-reorder-CC-and-CFLAGS.patch  | 161 -
 meta/recipes-extended/byacc/byacc/byacc-open.patch |  25 
 meta/recipes-extended/byacc/byacc_20161202.bb  |  12 --
 .../packagegroup-core-full-cmdline.bb  |   1 -
 5 files changed, 221 deletions(-)
 delete mode 100644 meta/recipes-extended/byacc/byacc.inc
 delete mode 100644 
meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
 delete mode 100644 meta/recipes-extended/byacc/byacc/byacc-open.patch
 delete mode 100644 meta/recipes-extended/byacc/byacc_20161202.bb

diff --git a/meta/recipes-extended/byacc/byacc.inc 
b/meta/recipes-extended/byacc/byacc.inc
deleted file mode 100644
index adb07193d73..000
--- a/meta/recipes-extended/byacc/byacc.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Berkeley LALR Yacc parser generator"
-DESCRIPTION = "A parser generator utility that reads a grammar specification 
from a file and generates an LR(1) \
-parser for it.  The parsers consist of a set of LALR(1) parsing tables and a 
driver routine written in the C \
-programming language."
-SECTION = "devel"
-LICENSE = "PD"
-
-SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \
-   file://byacc-open.patch \
-   file://0001-byacc-do-not-reorder-CC-and-CFLAGS.patch"
-
-EXTRA_OECONF += "--program-transform-name='s,^,b,'"
-
-BBCLASSEXTEND = "native"
-
-inherit autotools
-
-do_configure() {
-   install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
-   install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
-   oe_runconf
-}
diff --git 
a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
 
b/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
deleted file mode 100644
index 7cd2510c8ed..000
--- 
a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-Subject: byacc: do not reorder $CC and $CFLAGS
-
-byacc tries to process $CC and decide which part should belong to CC and which
-part should below to CFLAGS and then do reordering. It doesn't make much sense
-for OE. And it doesn't do its work correctly. Some options are dropped.
-
-Delete all these stuff so that we could have all options we need.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-Signed-off-by: Chen Qi 

- aclocal.m4 |   1 -
- configure  | 119 -
- 2 files changed, 120 deletions(-)
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 917a848..62ef241 100644
 a/aclocal.m4
-+++ b/aclocal.m4
-@@ -1021,7 +1021,6 @@ CF_GCC_VERSION
- CF_ACVERSION_CHECK(2.52,
-   [AC_PROG_CC_STDC],
-   [CF_ANSI_CC_REQD])
--CF_CC_ENV_FLAGS
- ])dnl
- dnl 
---
- dnl CF_PROG_GROFF version: 2 updated: 2015/07/04 11:16:27
-diff --git a/configure b/configure
-index 9707e50..4f0497c 100755
 a/configure
-+++ b/configure
-@@ -1946,125 +1946,6 @@ esac
- # This should have been defined by AC_PROG_CC
- : ${CC:=cc}
- 
--echo "$as_me:1949: checking \$CC variable" >&5
--echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
--case "$CC" in
--(*[\ \]-*)
--  echo "$as_me:1953: result: broken" >&5
--echo "${ECHO_T}broken" >&6
--  { echo "$as_me:1955: WARNING: your environment misuses the CC variable 
to hold CFLAGS/CPPFLAGS options" >&5
--echo "$as_me: WARNING: your environment misuses the CC variable to hold 
CFLAGS/CPPFLAGS options" >&2;}
--  # humor him...
--  cf_flags=`echo "$CC" | sed -e 's/^.*[   ]\(-[^  ]\)/\1/'`
--  CC=`echo "$CC " | sed -e 's/[   ]-[^].*$//' -e 's/[ ]*$//'`
--  for cf_arg in $cf_flags
--  do
--  case "x$cf_arg" in
--  (x-[IUDfgOW]*)
--
--cf_fix_cppflags=no
--cf_new_cflags=
--cf_new_cppflags=
--cf_new_extra_cppflags=
--
--for cf_add_cflags in $cf_flags
--do
--case $cf_fix_cppflags in
--(no)
--  case $cf_add_cflags in
--  (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
--  case $cf_add_cflags in
--  (-D*)
--  cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 
's/^-D[^=]*='\''\"[^"]*//'`
--
--  test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
--  && test -z "${cf_tst_cflags}" \
--  && cf_fix_cppflags=yes
--
--  if test $cf_fix_cppflags = yes ; then
--  cf_new_extra_cppflags="$cf_new_extra_cppflags 
$cf_add_cflags"
--  continue
--  elif test "${cf_tst_cflags}" = "\"'" ; then
--  

[OE-core] [PATCH 31/44] gpg_sign.py: fix signing of rpm files using gpg

2017-03-10 Thread Alexander Kanavin
This means
a) calling rpmkeys and rpmsign instead of rpm
b) instructing gpg to run non-interactively; otherwise on my machine
it pops up windows requesting a key passphrase

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/gpg_sign.py   | 7 ---
 meta/lib/oeqa/selftest/signing.py | 8 
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index f7f96c6d5e3..7ce767ee0a0 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -11,7 +11,7 @@ class LocalSigner(object):
   bb.utils.which(os.getenv('PATH'), 'gpg')
 self.gpg_path = d.getVar('GPG_PATH')
 self.gpg_version = self.get_gpg_version()
-self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpm")
+self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
 
 def export_pubkey(self, output_file, keyid, armor=True):
 """Export GPG public key to a file"""
@@ -31,9 +31,10 @@ class LocalSigner(object):
 """Sign RPM files"""
 
 cmd = self.rpm_bin + " --addsign --define '_gpg_name %s'  " % keyid
-cmd += "--define '_gpg_passphrase %s' " % passphrase
+gpg_args = '--batch --passphrase=%s' % passphrase
 if self.gpg_version > (2,1,):
-cmd += "--define '_gpg_sign_cmd_extra_args 
--pinentry-mode=loopback' "
+gpg_args += ' --pinentry-mode=loopback'
+cmd += "--define '_gpg_sign_cmd_extra_args %s' " % gpg_args
 if self.gpg_bin:
 cmd += "--define '%%__gpg %s' " % self.gpg_bin
 if self.gpg_path:
diff --git a/meta/lib/oeqa/selftest/signing.py 
b/meta/lib/oeqa/selftest/signing.py
index 006afbef15a..a9b135aab44 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -27,7 +27,7 @@ class Signing(oeSelfTest):
 cls.pub_key_path = os.path.join(cls.testlayer_path, 'files', 
'signing', "key.pub")
 cls.secret_key_path = os.path.join(cls.testlayer_path, 'files', 
'signing', "key.secret")
 
-runCmd('gpg --homedir %s --import %s %s' % (cls.gpg_dir, 
cls.pub_key_path, cls.secret_key_path))
+runCmd('gpg --batch --homedir %s --import %s %s' % (cls.gpg_dir, 
cls.pub_key_path, cls.secret_key_path))
 
 @testcase(1362)
 def test_signing_packages(self):
@@ -76,13 +76,13 @@ class Signing(oeSelfTest):
 # Use a temporary rpmdb
 rpmdb = tempfile.mkdtemp(prefix='oeqa-rpmdb')
 
-runCmd('%s/rpm --define "_dbpath %s" --import %s' %
+runCmd('%s/rpmkeys --define "_dbpath %s" --import %s' %
(staging_bindir_native, rpmdb, self.pub_key_path))
 
-ret = runCmd('%s/rpm --define "_dbpath %s" --checksig %s' %
+ret = runCmd('%s/rpmkeys --define "_dbpath %s" --checksig %s' %
  (staging_bindir_native, rpmdb, pkg_deploy))
 # tmp/deploy/rpm/i586/ed-1.9-r0.i586.rpm: rsa sha1 md5 OK
-self.assertIn('rsa sha1 md5 OK', ret.output, 'Package signed 
incorrectly.')
+self.assertIn('rsa sha1 (md5) pgp md5 OK', ret.output, 'Package signed 
incorrectly.')
 shutil.rmtree(rpmdb)
 
 @testcase(1382)
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 28/44] selftest: do not perform a full build in test_continue

2017-03-10 Thread Alexander Kanavin
This was fetching and building the toolchain and everything else
against empty download dir and sstate cache, and so was enormously slow.
The test does not need that, it only checks that one fetch task fails and
another succeeds when using bitbake's -k option.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oeqa/selftest/bbtests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/bbtests.py 
b/meta/lib/oeqa/selftest/bbtests.py
index 4d9eec130ad..09e3d0d8461 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -222,7 +222,7 @@ INHERIT_remove = \"report-error\"
 self.track_for_cleanup(os.path.join(self.builddir, 
"download-selftest"))
 self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask 
do_fail_task before do_fetch\n" )
 runCmd('bitbake -c cleanall man xcursor-transparent-theme')
-result = runCmd('bitbake man xcursor-transparent-theme -k', 
ignore_status=True)
+result = runCmd('bitbake -c unpack -k man xcursor-transparent-theme', 
ignore_status=True)
 errorpos = result.output.find('ERROR: Function failed: do_fail_task')
 manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task 
do_unpack: Started", result.output)
 continuepos = result.output.find('NOTE: recipe 
xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 27/44] package_rpm.bbclass: instruct rpm to not remove the buildroot directory

2017-03-10 Thread Alexander Kanavin
This is the ${W}/package directory which may be reused in subsequent builds.

Also clean up various default directories rpm 4 creates.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9b634e583b8..ff86dc87980 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -697,7 +697,7 @@ python do_package_rpm () {
 os.chmod(pkgwritedir, 0o755)
 
 cmd = rpmbuild
-cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " 
--buildroot " + pkgd
+cmd = cmd + " --noclean --nodeps --short-circuit --target " + pkgarch + " 
--buildroot " + pkgd
 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + 
pkgwritedir + "'"
 cmd = cmd + " --define '_builddir " + d.getVar('S') + "'"
 cmd = cmd + " --define '_build_name_fmt 
%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
@@ -721,8 +721,11 @@ python do_package_rpm () {
 bb.build.exec_func('SBUILDSPEC', d)
 cmd = cmd + " -bb " + outspecfile
 
+# rpm 4 creates various empty directories in _topdir, let's clean them up
+cleanupcmd = "rm -rf %s/BUILDROOT %s/SOURCES %s/SPECS %s/SRPMS" % 
(workdir, workdir, workdir, workdir)
+
 # Build the rpm package!
-d.setVar('BUILDSPEC', cmd + "\n")
+d.setVar('BUILDSPEC', cmd + "\n" + cleanupcmd + "\n")
 d.setVarFlag('BUILDSPEC', 'func', '1')
 bb.build.exec_func('BUILDSPEC', d)
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 24/44] package_rpm.bbclass: replace createrepo reference with createrepo_c

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 480c6d58d39..27a2bb479a2 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -763,6 +763,6 @@ do_package_write_rpm[depends] += 
"${@oe.utils.build_depends_string(d.getVar('PAC
 addtask package_write_rpm after do_packagedata do_package
 
 PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
-PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"
+PACKAGEINDEXDEPS += "createrepo-c-native:do_populate_sysroot"
 
 do_build[recrdeptask] += "do_package_write_rpm"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 25/44] package_rpm.bbclass: no need to specify the magic file location

2017-03-10 Thread Alexander Kanavin
It's handled by the rpm wrapper command, created in rpm recipe.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 27a2bb479a2..9b634e583b8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -693,7 +693,6 @@ python do_package_rpm () {
 d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
 bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
-magicfile = 
d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
 bb.utils.mkdirhier(pkgwritedir)
 os.chmod(pkgwritedir, 0o755)
 
@@ -711,7 +710,6 @@ python do_package_rpm () {
 cmd = cmd + " --define '__find_provides %{nil}'"
 cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
 cmd = cmd + " --define 'debug_package %{nil}'"
-cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
 cmd = cmd + " --define '_tmppath " + workdir + "'"
 if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and 
bb.data.inherits_class('archiver', d):
 cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + 
"'"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 26/44] testimage.bbclass: fix runtime test for rpm, port smart tests to dnf

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/classes/testimage.bbclass   |  25 ++--
 meta/lib/oeqa/oetest.py  |   7 --
 meta/lib/oeqa/runtime/cases/dnf.py   | 111 +
 meta/lib/oeqa/runtime/cases/parselogs.py |   1 +
 meta/lib/oeqa/runtime/cases/rpm.py   |  21 ++--
 meta/lib/oeqa/runtime/cases/smart.py | 196 ---
 6 files changed, 133 insertions(+), 228 deletions(-)
 create mode 100644 meta/lib/oeqa/runtime/cases/dnf.py
 delete mode 100644 meta/lib/oeqa/runtime/cases/smart.py

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 8d8443ca848..07744aff92f 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -35,7 +35,7 @@ TEST_NEEDED_PACKAGES_DIR ?= "${WORKDIR}/testimage/packages"
 TEST_EXTRACTED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/extracted"
 TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
 
-RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', 
d)}"
+RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf rpm', '', 
d)}"
 SYSTEMDSUITE = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 MINTESTSUITE = "ping"
 NETTESTSUITE = "${MINTESTSUITE} ssh df date scp oe_syslog ${SYSTEMDSUITE}"
@@ -74,12 +74,11 @@ TESTIMAGEDEPENDS = ""
 TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot 
qemu-helper-native:do_populate_sysroot"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'cpio-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'cpio-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'python-smartpm-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-c-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'dnf-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 
'opkg-utils-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 
'apt-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'python-smartpm-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-c-native:do_populate_sysroot', '', d)}"
 
 TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
 TESTIMAGELOCK_qemuall = ""
@@ -120,7 +119,7 @@ python do_testimage() {
 testimage_sanity(d)
 
 if (d.getVar('IMAGE_PKGTYPE') == 'rpm'
-   and 'smart' in d.getVar('TEST_SUITES')):
+   and 'dnf' in d.getVar('TEST_SUITES')):
 create_rpm_index(d)
 
 testimage_main(d)
@@ -324,30 +323,26 @@ def create_index(arg):
 
 def create_rpm_index(d):
 # Index RPMs
-rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
+rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c")
 index_cmds = []
 archs = (d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or '').replace('-', '_')
 
 for arch in archs.split():
 rpm_dir = os.path.join(d.getVar('DEPLOY_DIR_RPM'), arch)
-idx_path = os.path.join(d.getVar('WORKDIR'), 'rpm', arch)
-db_path = os.path.join(d.getVar('WORKDIR'), 'rpmdb', arch)
+idx_path = os.path.join(d.getVar('WORKDIR'), 'oe-testimage-repo', arch)
 
 if not os.path.isdir(rpm_dir):
 continue
-if os.path.exists(db_path):
-bb.utils.remove(dbpath, True)
 
 lockfilename = os.path.join(d.getVar('DEPLOY_DIR_RPM'), 'rpm.lock')
 lf = bb.utils.lockfile(lockfilename, False)
 oe.path.copyhardlinktree(rpm_dir, idx_path)
 # Full indexes overload a 256MB image so reduce the number of rpms
-# in the feed. Filter to p* since we use the psplash packages and
+# in the feed. Filter to r* since we use the run-postinst packages and
 # this leaves some allarch and machine arch packages too.
-bb.utils.remove(idx_path + "*/[a-oq-z]*.rpm")
+bb.utils.remove(idx_path + "*/[a-qs-z]*.rpm")
 bb.utils.unlockfile(lf)
-cmd = '%s --dbpath %s --update -q %s' % (rpm_createrepo,
- db_path, idx_path)
+cmd = '%s --update -q %s' % (rpm_createrepo, idx_path)
 
 # Create repodata
 result = create_index(cmd)
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 1dad763ff14..f7171260e74 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -128,13 +128,6 @@ class 

[OE-core] [PATCH 23/44] scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 scripts/oe-setup-rpmrepo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index 7dcded8f1d4..df1c61435c1 100755
--- a/scripts/oe-setup-rpmrepo
+++ b/scripts/oe-setup-rpmrepo
@@ -89,7 +89,7 @@ if [ ! -d "$RPM_DIR" ]; then
exit 1
 fi
 
-CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo
+CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo_c
 if [ ! -e "$CREATEREPO" ]; then
echo "Error: can't find createrepo binary"
echo "please run bitbake createrepo-native first"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 22/44] scripts/rpm2cpio.sh: replace 5.x version with 4.x version

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 scripts/rpm2cpio.sh | 108 ++--
 1 file changed, 55 insertions(+), 53 deletions(-)

diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
index 5df8c0f7054..cf23472ba95 100755
--- a/scripts/rpm2cpio.sh
+++ b/scripts/rpm2cpio.sh
@@ -1,53 +1,55 @@
-#!/bin/sh
-
-# This comes from the RPM5 5.4.0 distribution.
-
-pkg=$1
-if [ "$pkg" = "" -o ! -e "$pkg" ]; then
-echo "no package supplied" 1>&2
-   exit 1
-fi
-
-leadsize=96
-o=`expr $leadsize + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "sig il: $il dl: $dl"
-
-sigsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "hdr il: $il dl: $dl"
-
-hdrsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $hdrsize`
-EXTRACTOR="dd if=$pkg ibs=$o skip=1"
-
-COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
-if echo $COMPRESSION |grep -iq gzip; then
-   DECOMPRESSOR=gunzip
-elif echo $COMPRESSION |grep -iq bzip2; then
-   DECOMPRESSOR=bunzip2
-elif echo $COMPRESSION |grep -iq xz; then
-   DECOMPRESSOR=unxz
-elif echo $COMPRESSION |grep -iq cpio; then
-   DECOMPRESSOR=cat
-else
-   # Most versions of file don't support LZMA, therefore we assume
-   # anything not detected is LZMA
-   DECOMPRESSOR=`which unlzma 2>/dev/null`
-   case "$DECOMPRESSOR" in
-   /* ) ;;
-   *  ) DECOMPRESSOR=`which lzmash 2>/dev/null`
-case "$DECOMPRESSOR" in
-/* ) DECOMPRESSOR="lzmash -d -c" ;;
-*  ) DECOMPRESSOR=cat ;;
-esac
-;;
-   esac
-fi
-
-$EXTRACTOR 2>/dev/null | $DECOMPRESSOR
+#!/bin/sh -efu
+
+# This file comes from rpm 4.x distribution
+
+fatal() {
+   echo "$*" >&2
+   exit 1
+}
+
+pkg="$1"
+[ -n "$pkg" -a -e "$pkg" ] ||
+   fatal "No package supplied"
+
+_dd() {
+   local o="$1"; shift
+   dd if="$pkg" skip="$o" iflag=skip_bytes status=none $*
+}
+
+calcsize() {
+   offset=$(($1 + 8))
+
+   local i b b0 b1 b2 b3 b4 b5 b6 b7
+
+   i=0
+   while [ $i -lt 8 ]; do
+   b="$(_dd $(($offset + $i)) bs=1 count=1)"
+   [ -z "$b" ] &&
+   b="0" ||
+   b="$(exec printf '%u\n' "'$b")"
+   eval "b$i=\$b"
+   i=$(($i + 1))
+   done
+
+   rsize=$((8 + ((($b0 << 24) + ($b1 << 16) + ($b2 << 8) + $b3) << 4) + 
($b4 << 24) + ($b5 << 16) + ($b6 << 8) + $b7))
+   offset=$(($offset + $rsize))
+}
+
+case "$(_dd 0 bs=8 count=1)" in
+   "$(printf '\355\253\356\333')"*) ;; # '\xed\xab\xee\xdb'
+   *) fatal "File doesn't look like rpm: $pkg" ;;
+esac
+
+calcsize 96
+sigsize=$rsize
+
+calcsize $(($offset + (8 - ($sigsize % 8)) % 8))
+hdrsize=$rsize
+
+case "$(_dd $offset bs=3 count=1)" in
+   "$(printf '\102\132')"*) _dd $offset | bunzip2 ;; # '\x42\x5a'
+   "$(printf '\037\213')"*) _dd $offset | gunzip  ;; # '\x1f\x8b'
+   "$(printf '\375\067')"*) _dd $offset | xzcat   ;; # '\xfd\x37'
+   "$(printf '\135\000')"*) _dd $offset | unlzma  ;; # '\x5d\x00'
+   *) fatal "Unrecognized rpm file: $pkg" ;;
+esac
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 17/44] package_rpm.bbclass: make architecture-independent .rpm packages "noarch" instead of "all"

2017-03-10 Thread Alexander Kanavin
Too many places in dnf/rpm4 stack make that assumption; let's not fight against 
it.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 4 +++-
 meta/classes/sstate.bbclass  | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index db448ab8d1d..07eb974f736 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -684,7 +684,9 @@ python do_package_rpm () {
 rpmbuild = d.getVar('RPMBUILD')
 targetsys = d.getVar('TARGET_SYS')
 targetvendor = d.getVar('HOST_VENDOR')
-package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", "_")
+# Too many places in dnf stack assume that arch-independent packages are 
"noarch".
+# Let's not fight against this.
+package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", 
"_").replace("all", "noarch")
 sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX') or "nativesdk").replace("-", "_")
 if package_arch not in "all any noarch".split() and not 
package_arch.endswith(sdkpkgsuffix):
 ml_prefix = (d.getVar('MLPREFIX') or "").replace("-", "_")
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 23dda082ca4..b7d8e610f07 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -25,7 +25,7 @@ PV[vardepvalue] = "${PV}"
 SSTATE_EXTRAPATH[vardepvalue] = ""
 
 # For multilib rpm the allarch packagegroup files can overwrite (in theory 
they're identical)
-SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ 
${DEPLOY_DIR_RPM}/all/"
+SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ 
${DEPLOY_DIR_RPM}/noarch/"
 # Avoid docbook/sgml catalog warnings for now
 SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml 
${STAGING_DATADIR_NATIVE}/sgml"
 # Archive the sources for many architectures in one deploy folder
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 19/44] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags

2017-03-10 Thread Alexander Kanavin
Previously they were swapped, not sure why. Their meaning, as far as rpm
world goes, is different:

- Recommends is a soft dependency and will be installed by default; there is
an option not to do that.

- Suggests is a suggestion to be picked up and presented to end user by
package management tools; it has no special meaning otherwise.

OE packages use RRECOMMENDS, which should be mapped to Recommends rpm tag,
so that the packages will be picked up as dependencies.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 07eb974f736..480c6d58d39 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -450,10 +450,8 @@ python write_specfile () {
 if splitrpostrm:
 print_deps(splitrdepends, "Requires(postun)", 
spec_preamble_bottom, d)
 
-# Suggests in RPM are like recommends in OE-core!
-print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
-# While there is no analog for suggests... (So call them recommends 
for now)
-print_deps(splitrsuggests,  "Recommends", spec_preamble_bottom, d)
+print_deps(splitrrecommends, "Recommends", spec_preamble_bottom, d)
+print_deps(splitrsuggests,  "Suggests", spec_preamble_bottom, d)
 print_deps(splitrprovides,  "Provides", spec_preamble_bottom, d)
 print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
 
@@ -560,10 +558,8 @@ python write_specfile () {
 if srcrpostrm:
 print_deps(srcrdepends, "Requires(postun)", spec_preamble_top, d)
 
-# Suggests in RPM are like recommends in OE-core!
-print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
-# While there is no analog for suggests... (So call them recommends for 
now)
-print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
+print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
+print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
 print_deps(srcrprovides, "Provides", spec_preamble_top, d)
 print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 21/44] rootfs_rpm.bbclass: migrate image creation to dnf

2017-03-10 Thread Alexander Kanavin
To properly look at this patch, you probably need a side-by-side diff viewing 
tool.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/rootfs_rpm.bbclass |   21 +-
 meta/lib/oe/package_manager.py  | 1192 ---
 meta/lib/oe/rootfs.py   |   18 +-
 meta/lib/oe/sdk.py  |7 +-
 4 files changed, 239 insertions(+), 999 deletions(-)

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index b8ff4cb7b6a..65881a60a7b 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -2,20 +2,23 @@
 # Creates a root filesystem out of rpm packages
 #
 
-ROOTFS_PKGMANAGE = "rpm smartpm"
+ROOTFS_PKGMANAGE = "rpm dnf"
 ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
 
-# Add 100Meg of extra space for Smart
-IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", 
"smartpm", " + 102400", "" ,d)}"
+# dnf is using our custom distutils, and so will fail without these
+export STAGING_INCDIR
+export STAGING_LIBDIR
 
-# Smart is python based, so be sure python-native is available to us.
+# Add 100Meg of extra space for dnf
+IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", 
"dnf", " + 102400", "" ,d)}"
+
+# Dnf is python based, so be sure python-native is available to us.
 EXTRANATIVEPATH += "python-native"
 
 # opkg is needed for update-alternatives
 RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
-rpmresolve-native:do_populate_sysroot \
-python-smartpm-native:do_populate_sysroot \
-createrepo-native:do_populate_sysroot \
+dnf-native:do_populate_sysroot \
+createrepo-c-native:do_populate_sysroot \
 opkg-native:do_populate_sysroot"
 
 do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
@@ -35,7 +38,3 @@ python () {
 d.setVar('RPM_POSTPROCESS_COMMANDS', '')
 
 }
-# Smart is python based, so be sure python-native is available to us.
-EXTRANATIVEPATH += "python-native"
-
-rpmlibdir = "/var/lib/rpm"
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 725997ce334..d51609189d0 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -102,109 +102,14 @@ class Indexer(object, metaclass=ABCMeta):
 
 
 class RpmIndexer(Indexer):
-def get_ml_prefix_and_os_list(self, arch_var=None, os_var=None):
-package_archs = collections.OrderedDict()
-target_os = collections.OrderedDict()
-
-if arch_var is not None and os_var is not None:
-package_archs['default'] = self.d.getVar(arch_var).split()
-package_archs['default'].reverse()
-target_os['default'] = self.d.getVar(os_var).strip()
-else:
-package_archs['default'] = self.d.getVar("PACKAGE_ARCHS").split()
-# arch order is reversed.  This ensures the -best- match is
-# listed first!
-package_archs['default'].reverse()
-target_os['default'] = self.d.getVar("TARGET_OS").strip()
-multilibs = self.d.getVar('MULTILIBS') or ""
-for ext in multilibs.split():
-eext = ext.split(':')
-if len(eext) > 1 and eext[0] == 'multilib':
-localdata = bb.data.createCopy(self.d)
-default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + 
eext[1]
-default_tune = localdata.getVar(default_tune_key, False)
-if default_tune is None:
-default_tune_key = "DEFAULTTUNE_ML_" + eext[1]
-default_tune = localdata.getVar(default_tune_key, 
False)
-if default_tune:
-localdata.setVar("DEFAULTTUNE", default_tune)
-package_archs[eext[1]] = 
localdata.getVar('PACKAGE_ARCHS').split()
-package_archs[eext[1]].reverse()
-target_os[eext[1]] = 
localdata.getVar("TARGET_OS").strip()
-
-ml_prefix_list = collections.OrderedDict()
-for mlib in package_archs:
-if mlib == 'default':
-ml_prefix_list[mlib] = package_archs[mlib]
-else:
-ml_prefix_list[mlib] = list()
-for arch in package_archs[mlib]:
-if arch in ['all', 'noarch', 'any']:
-ml_prefix_list[mlib].append(arch)
-else:
-ml_prefix_list[mlib].append(mlib + "_" + arch)
-
-return (ml_prefix_list, target_os)
-
 def write_index(self):
-sdk_pkg_archs = (self.d.getVar('SDK_PACKAGE_ARCHS') or 
"").replace('-', '_').split()
-all_mlb_pkg_archs = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or 
"").replace('-', '_').split()
-
-mlb_prefix_list = self.get_ml_prefix_and_os_list()[0]
-
-archs = set()
-for item in mlb_prefix_list:
-archs = archs.union(set(i.replace('-', '_') for i in 

[OE-core] [PATCH 20/44] nativesdk-packagegroup-sdk-host: replace smartpm with dnf

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb  | 2 +-
 meta/recipes-devtools/dnf/dnf_git.bb| 1 -
 meta/recipes-devtools/libcomps/libcomps_git.bb  | 2 +-
 meta/recipes-devtools/libdnf/libdnf_git.bb  | 2 +-
 meta/recipes-devtools/librepo/librepo_git.bb| 2 +-
 .../recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb | 2 +-
 meta/recipes-devtools/python/python-iniparse_0.4.bb | 2 +-
 meta/recipes-devtools/python/python-pygpgme_0.3.bb  | 2 +-
 meta/recipes-devtools/rpm/rpm_git.bb| 2 +-
 meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb  | 2 +-
 meta/recipes-support/gpgme/gpgme_1.8.0.bb   | 2 +-
 meta/recipes-support/libassuan/libassuan_2.4.3.bb   | 2 +-
 meta/recipes-support/libcheck/libcheck_0.10.0.bb| 1 +
 13 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb 
b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index 2c2abed33cd..3283e7370e8 100644
--- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -22,7 +22,7 @@ RDEPENDS_${PN} = "\
 nativesdk-automake \
 nativesdk-shadow \
 nativesdk-makedevs \
-nativesdk-smartpm \
+nativesdk-dnf \
 nativesdk-postinst-intercept \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', 
'', d)} \
 "
diff --git a/meta/recipes-devtools/dnf/dnf_git.bb 
b/meta/recipes-devtools/dnf/dnf_git.bb
index ff22d6f5f0d..018352a6c9b 100644
--- a/meta/recipes-devtools/dnf/dnf_git.bb
+++ b/meta/recipes-devtools/dnf/dnf_git.bb
@@ -28,7 +28,6 @@ DEPENDS += "python-backports-lzma"
 EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 
 BBCLASSEXTEND = "native nativesdk"
-
 RDEPENDS_${PN}_class-target += "python-core python-codecs python-netclient 
python-email python-threading python-distutils librepo python-shell 
python-subprocess libcomps libdnf python-sqlite3 python-compression 
python-pygpgme python-backports-lzma python-rpm python-iniparse python-json 
python-importlib python-curses python-argparse"
 
 # Direct dnf-native to read rpm configuration from our sysroot, not the one it 
was compiled in
diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb 
b/meta/recipes-devtools/libcomps/libcomps_git.bb
index 448ea62f67c..8ff13b26b62 100644
--- a/meta/recipes-devtools/libcomps/libcomps_git.bb
+++ b/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -19,5 +19,5 @@ DEPENDS = "libxml2 expat libcheck"
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 OECMAKE_SOURCEPATH = "${S}/libcomps"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/libdnf/libdnf_git.bb 
b/meta/recipes-devtools/libdnf/libdnf_git.bb
index 681c0029c5f..6e9cfcc8627 100644
--- a/meta/recipes-devtools/libdnf/libdnf_git.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_git.bb
@@ -36,5 +36,5 @@ EXTRA_OECMAKE = " 
-DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF
 EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/librepo/librepo_git.bb 
b/meta/recipes-devtools/librepo/librepo_git.bb
index 70e88c47b9e..3f3c5fbcf51 100644
--- a/meta/recipes-devtools/librepo/librepo_git.bb
+++ b/meta/recipes-devtools/librepo/librepo_git.bb
@@ -20,5 +20,5 @@ inherit cmake distutils-base pkgconfig
 
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git 
a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb 
b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
index 6d3b8d569de..93c6684be6c 100644
--- a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
+++ b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
@@ -18,4 +18,4 @@ DEPENDS_append = " xz"
 RDEPENDS_${PN} += "python-core python-io python-pkgutil"
 RDEPENDS_${PN}_class-native += "python-core"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-iniparse_0.4.bb 
b/meta/recipes-devtools/python/python-iniparse_0.4.bb
index f2515759b13..c6d98c2fdfc 100644
--- a/meta/recipes-devtools/python/python-iniparse_0.4.bb
+++ b/meta/recipes-devtools/python/python-iniparse_0.4.bb
@@ -12,6 +12,6 @@ inherit distutils
 
 RDEPENDS_${PN} += "python-core"
 
-BBCLASSEXTEND = "native"

[OE-core] [PATCH 18/44] package_manager.py: improve the API for insert_feed_uris()

2017-03-10 Thread Alexander Kanavin
No need to store the configuration as class members,
just pass it directly into the method.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/package_manager.py | 41 ++---
 meta/lib/oe/rootfs.py  |  5 -
 2 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 79f0a8b9f1b..725997ce334 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -513,9 +513,6 @@ class PackageManager(object, metaclass=ABCMeta):
 self.d = d
 self.deploy_dir = None
 self.deploy_lock = None
-self.feed_uris = self.d.getVar('PACKAGE_FEED_URIS') or ""
-self.feed_base_paths = self.d.getVar('PACKAGE_FEED_BASE_PATHS') or ""
-self.feed_archs = self.d.getVar('PACKAGE_FEED_ARCHS')
 
 """
 Update the package manager package database.
@@ -555,8 +552,14 @@ class PackageManager(object, metaclass=ABCMeta):
 def list_installed(self):
 pass
 
+"""
+Add remote package feeds into repository manager configuration. The 
parameters
+for the feeds are set by feed_uris, feed_base_paths and feed_archs.
+See 
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
+for their description.
+"""
 @abstractmethod
-def insert_feeds_uris(self):
+def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
 pass
 
 """
@@ -691,14 +694,14 @@ class RpmPM(PackageManager):
 
 self.ml_prefix_list, self.ml_os_list = 
self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
 
-def insert_feeds_uris(self):
-if self.feed_uris == "":
+def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+if feed_uris == "":
 return
 
 arch_list = []
-if self.feed_archs is not None:
+if feed_archs is not None:
 # User define feed architectures
-arch_list = self.feed_archs.split()
+arch_list = feed_archs.split()
 else:
 # List must be prefered to least preferred order
 default_platform_extra = list()
@@ -721,7 +724,7 @@ class RpmPM(PackageManager):
 continue
 arch_list.append(arch)
 
-feed_uris = self.construct_uris(self.feed_uris.split(), 
self.feed_base_paths.split())
+feed_uris = self.construct_uris(feed_uris.split(), 
feed_base_paths.split())
 
 uri_iterator = 0
 channel_priority = 10 + 5 * len(feed_uris) * (len(arch_list) if 
arch_list else 1)
@@ -1707,22 +1710,22 @@ class OpkgPM(OpkgDpkgPM):
 config_file.write("option info_dir %s\n" % 
os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
 config_file.write("option status_file  %s\n" % 
os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
 
-def insert_feeds_uris(self):
-if self.feed_uris == "":
+def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+if feed_uris == "":
 return
 
 rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf'
   % self.target_rootfs)
 
-feed_uris = self.construct_uris(self.feed_uris.split(), 
self.feed_base_paths.split())
-archs = self.pkg_archs.split() if self.feed_archs is None else 
self.feed_archs.split()
+feed_uris = self.construct_uris(feed_uris.split(), 
feed_base_paths.split())
+archs = self.pkg_archs.split() if feed_archs is None else 
feed_archs.split()
 
 with open(rootfs_config, "w+") as config_file:
 uri_iterator = 0
 for uri in feed_uris:
 if archs:
 for arch in archs:
-if (self.feed_archs is None) and (not 
os.path.exists(os.path.join(self.deploy_dir, arch))):
+if (feed_archs is None) and (not 
os.path.exists(os.path.join(self.deploy_dir, arch))):
 continue
 bb.note('Adding opkg feed url-%s-%d (%s)' %
 (arch, uri_iterator, uri))
@@ -2111,23 +2114,23 @@ class DpkgPM(OpkgDpkgPM):
 if result is not None:
 bb.fatal(result)
 
-def insert_feeds_uris(self):
-if self.feed_uris == "":
+def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+if feed_uris == "":
 return
 
 sources_conf = os.path.join("%s/etc/apt/sources.list"
 % self.target_rootfs)
 arch_list = []
 
-if self.feed_archs is None:
+if feed_archs is None:
 for arch in self.all_arch_list:
 if not os.path.exists(os.path.join(self.deploy_dir, arch)):
 continue
 arch_list.append(arch)
 else:
-arch_list = 

[OE-core] [PATCH 15/44] python-smartpm: remove the recipe

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 ...m_sys-use-md5sum-instead-of-mtime-as-the-.patch |  38 --
 ...art-add-deugging-when-targetpath-is-empty.patch |  47 ---
 .../smart-add-for-rpm-ignoresize-check.patch   |  35 --
 .../smart-already-installed-message.patch  |  54 ---
 .../python/python-smartpm/smart-attempt-fix.patch  | 158 -
 .../python/python-smartpm/smart-attempt.patch  | 185 --
 ...cache.py-getPackages-matches-name-version.patch |  43 ---
 .../python-smartpm/smart-channel-remove-all.patch  |  33 --
 .../python/python-smartpm/smart-channelsdir.patch  |  24 --
 .../python/python-smartpm/smart-locale.patch   |  27 --
 .../python/python-smartpm/smart-recommends.patch   | 381 -
 .../smart-rpm-transaction-failure-check.patch  |  57 ---
 .../smart-set-noprogress-for-pycurl.patch  |  20 --
 .../smartpm-rpm5-support-check-signatures.patch| 112 --
 meta/recipes-devtools/python/python-smartpm_git.bb | 141 
 15 files changed, 1355 deletions(-)
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-locale.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm_git.bb

diff --git 
a/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
 
b/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
deleted file mode 100644
index 2f14a124efc..000
--- 
a/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-channels/rpm_sys: use md5sum instead of mtime as the digest
-
-Use the internal getFileDigest() function (which defaults to md5) instead of
-mtime for getting the file digest. On some systems mtime proved to be
-unreliable because of delayed update. This caused smart to miss rpm db updates
-and thus get its understanding of installed packages out of sync.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen 

- smart/channels/rpm_sys.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/smart/channels/rpm_sys.py b/smart/channels/rpm_sys.py
-index b9fda27..6f1fe94 100644
 a/smart/channels/rpm_sys.py
-+++ b/smart/channels/rpm_sys.py
-@@ -22,6 +22,7 @@
- from smart.backends.rpm.header import RPMDBLoader
- from smart.backends.rpm.base import getTS, rpm_join_dbpath
- from smart.channel import PackageChannel
-+from smart.util.filetools import getFileDigest
- from smart import *
- import os
- 
-@@ -35,7 +36,7 @@ class RPMSysChannel(PackageChannel):
- dbdir = rpm_join_dbpath(sysconf.get("rpm-root", "/"),
- sysconf.get("rpm-dbpath", "var/lib/rpm"))
- path = os.path.join(dbdir, "Packages")
--digest = os.path.getmtime(path)
-+digest = getFileDigest(path)
- if digest == self._digest:
- return True
- self.removeLoaders()
--- 
-2.6.6
-
diff --git 
a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
 
b/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
deleted file mode 100644
index 5e80804bf42..000
--- 
a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 01e51afd03131947f8d74b9a23fdbc0078249499 Mon Sep 17 00:00:00 2001
-From: Mariano Lopez 
-Date: Wed, 3 Aug 2016 07:47:09 +
-Subject: [PATCH] fetcher.py: Add debugging when 

[OE-core] [PATCH 12/44] libcomps: add a recipe

2017-03-10 Thread Alexander Kanavin
libcomps is required by dnf.

Signed-off-by: Alexander Kanavin 
---
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 41 ++
 ...2-Set-library-installation-path-correctly.patch | 27 ++
 meta/recipes-devtools/libcomps/libcomps_git.bb | 23 
 3 files changed, 91 insertions(+)
 create mode 100644 
meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 
meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
 create mode 100644 meta/recipes-devtools/libcomps/libcomps_git.bb

diff --git 
a/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 
b/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 000..26e8b06f378
--- /dev/null
+++ 
b/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,41 @@
+From ff4aae4c8beaf17cb8e7a3431f6c541eccfae244 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:22:09 +0200
+Subject: [PATCH 1/2] Do not set PYTHON_INSTALL_DIR by running python.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ libcomps/src/python/src/python2/CMakeLists.txt | 2 +-
+ libcomps/src/python/src/python3/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libcomps/src/python/src/python2/CMakeLists.txt 
b/libcomps/src/python/src/python2/CMakeLists.txt
+index 3ad9e18..0e7dd4b 100644
+--- a/libcomps/src/python/src/python2/CMakeLists.txt
 b/libcomps/src/python/src/python2/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ find_package (PythonLibs 2.6)
+ find_package (PythonInterp 2.6 REQUIRED)
+ 
+-execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ 
+ include_directories(${PYTHON_INCLUDE_PATH})
+ include_directories(${LIBCOMPS_INCLUDE_PATH})
+diff --git a/libcomps/src/python/src/python3/CMakeLists.txt 
b/libcomps/src/python/src/python3/CMakeLists.txt
+index 7fafa9f..ed82d3d 100644
+--- a/libcomps/src/python/src/python3/CMakeLists.txt
 b/libcomps/src/python/src/python3/CMakeLists.txt
+@@ -2,7 +2,7 @@ find_package (PythonLibs 3.0)
+ find_package (PythonInterp 3.0)
+ #add_custom_target(py3-copy)
+ 
+-execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ 
+ include_directories(${PYTHON_INCLUDE_PATH})
+ include_directories(${LIBCOMPS_INCLUDE_PATH})
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
 
b/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
new file mode 100644
index 000..ec1fdc409bf
--- /dev/null
+++ 
b/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
@@ -0,0 +1,27 @@
+From b1f61296e2f16c2b9a39c5501e4538628ff01ab4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:26:00 +0200
+Subject: [PATCH 2/2] Set library installation path correctly
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ libcomps/src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcomps/src/CMakeLists.txt b/libcomps/src/CMakeLists.txt
+index e553d77..e2eef9c 100644
+--- a/libcomps/src/CMakeLists.txt
 b/libcomps/src/CMakeLists.txt
+@@ -52,7 +52,7 @@ add_dependencies(libcomps src-copy)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-set (LIB_INST_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
++set (LIB_INST_DIR ${CMAKE_INSTALL_LIBDIR})
+ 
+ 
+ install (FILES ${libcomps_HEADERS} DESTINATION include/libcomps)
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb 
b/meta/recipes-devtools/libcomps/libcomps_git.bb
new file mode 100644
index 000..448ea62f67c
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Libcomps is alternative for yum.comps library (which is for 
managing rpm package groups)."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = 

[OE-core] [PATCH 16/44] db: remove the 6.x recipe

2017-03-10 Thread Alexander Kanavin
Version 6.x of Berkeley DB has been rejected by open source community due to 
its hostile
AGPLv3 license; both Fedora and Debian are sticking with db 5.x - and by 
extension,
all the open source projects are still developed and tested with db 5.x

In oe-core the only thing that was requiring db 6.x was rpm 5.x, and so there's 
no reason
to continue carrying db 6.x in oe-core. If someone needs API features that are 
only available in
db 6.x, it can be re-added to meta-oe.

Signed-off-by: Alexander Kanavin 
---
 meta/conf/distro/include/default-versions.inc  |   3 -
 ...Makefile-let-libdb-6.0.la-depend-os_map.l.patch |  29 --
 ...akefile-let-libso_target-depend-on-bt_rec.patch |  30 --
 meta/recipes-support/db/db_5.3.28.bb   |   1 +
 meta/recipes-support/db/db_6.0.35.bb   | 111 -
 5 files changed, 1 insertion(+), 173 deletions(-)
 delete mode 100644 
meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
 delete mode 100644 
meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
 delete mode 100644 meta/recipes-support/db/db_6.0.35.bb

diff --git a/meta/conf/distro/include/default-versions.inc 
b/meta/conf/distro/include/default-versions.inc
index cc8c533d4c0..d976508ff51 100644
--- a/meta/conf/distro/include/default-versions.inc
+++ b/meta/conf/distro/include/default-versions.inc
@@ -5,6 +5,3 @@
 # Force the older version of liberation-fonts until we fix the fontforge issue
 PREFERRED_VERSION_liberation-fonts ?= "1.04"
 
-# Force db-native's version to keep sync with db while
-# 'AGPL-3.0' in ${INCOMPATIBLE_LICENSE} blacklist
-PREFERRED_VERSION_db-native = "${@incompatible_license_contains('AGPL-3.0', 
'5.%', '6.%', d)}"
diff --git 
a/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch 
b/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
deleted file mode 100644
index 68a213136b6..000
--- a/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 2902dda6e3f7b2cd5796a96af20deece610e2eb9 Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Mon, 16 Nov 2015 22:20:49 -0800
-Subject: [PATCH] build_unix/Makefile: let libdb-6.0.la depend os_map.lo
-
-Fixed parallel issue:
-libtool: link: `os_map.lo' is not a valid libtool object
-Makefile:867: recipe for target 'libdb-6.0.la' failed
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang 

- dist/Makefile.in |2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: db-6.0.30/dist/Makefile.in
-===
 db-6.0.30.orig/dist/Makefile.in
-+++ db-6.0.30/dist/Makefile.in
-@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
-   $(LN) -s $(libdb_version) $(libdb)
- 
- # Shared C library.
--$(libso_target): $(C_OBJS) bt_rec@o@
-+$(libso_target): $(C_OBJS) bt_rec@o@ os_map@o@
-   $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
-   $(LIBCSO_LIBS)
-   $(RM) $(libdb)
diff --git 
a/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch 
b/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
deleted file mode 100644
index 86804083472..000
--- 
a/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c640ff9340f358a00835816d0fea03d27a7be978 Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Tue, 31 Mar 2015 00:56:44 -0700
-Subject: [PATCH] Makefile: let libso_target depend on bt_rec
-
-Fixed parallel issue:
-libtool: link: `bt_rec.lo' is not a valid libtool object
-Makefile:867: recipe for target 'libdb-6.0.la' failed
-make: *** [libdb-6.0.la] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang 

- Makefile.in |2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: db-6.0.30/dist/Makefile.in
-===
 db-6.0.30.orig/dist/Makefile.in
-+++ db-6.0.30/dist/Makefile.in
-@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
-   $(LN) -s $(libdb_version) $(libdb)
- 
- # Shared C library.
--$(libso_target): $(C_OBJS)
-+$(libso_target): $(C_OBJS) bt_rec@o@
-   $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
-   $(LIBCSO_LIBS)
-   $(RM) $(libdb)
diff --git a/meta/recipes-support/db/db_5.3.28.bb 
b/meta/recipes-support/db/db_5.3.28.bb
index 0b51a1d4403..4f5aae60132 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -16,6 +16,7 @@ VIRTUAL_NAME ?= "virtual/db"
 RCONFLICTS_${PN} = "db3"
 
 PR = "r1"
+PE = "1"
 
 SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz;
 SRC_URI += "file://arm-thumb-mutex_db5.patch \
diff --git a/meta/recipes-support/db/db_6.0.35.bb 

[OE-core] [PATCH 14/44] dnf: add a recipe

2017-03-10 Thread Alexander Kanavin
This is replacing Smart package manager, which is unsupported upstream, and has 
a growing
amount of issues (lack of python 3.x support in particular). We identified dnf 
as
the only feasible replacement.

Signed-off-by: Alexander Kanavin 
---
 ...Corretly-install-tmpfiles.d-configuration.patch | 21 ++
 ...hardcode-etc-and-systemd-unit-directories.patch | 29 +
 ...0001-Do-not-prepend-installroot-to-logdir.patch | 31 ++
 .../dnf/dnf/0028-Use-backports.lzma-not-lzma.patch | 30 ++
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 27 
 .../dnf/0030-Run-python-scripts-using-env.patch| 48 ++
 meta/recipes-devtools/dnf/dnf_git.bb   | 45 
 7 files changed, 231 insertions(+)
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0028-Use-backports.lzma-not-lzma.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf_git.bb

diff --git 
a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
 
b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
new file mode 100644
index 000..c9df4589746
--- /dev/null
+++ 
b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
@@ -0,0 +1,21 @@
+From 8ce181714640315d2dd37ee794acbb22063cd669 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 26 Jan 2017 16:36:20 +0200
+Subject: [PATCH] Corretly install tmpfiles.d configuration
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ etc/tmpfiles.d/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/etc/tmpfiles.d/CMakeLists.txt b/etc/tmpfiles.d/CMakeLists.txt
+index f69c773e..3eb6d0e8 100644
+--- a/etc/tmpfiles.d/CMakeLists.txt
 b/etc/tmpfiles.d/CMakeLists.txt
+@@ -1 +1 @@
+-INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/)
++INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
 
b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
new file mode 100644
index 000..0f261e5c5d6
--- /dev/null
+++ 
b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
@@ -0,0 +1,29 @@
+From 4313ced1320594013795f11f6db00381e3f4cc45 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 26 Jan 2017 16:25:47 +0200
+Subject: [PATCH] Do not hardcode /etc and systemd unit directories
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6a319935..db20ccd4 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -7,8 +7,8 @@ if (NOT PYTHON_DESIRED)
+ set (PYTHON_DESIRED "2")
+ endif()
+ 
+-SET( SYSCONFDIR /etc)
+-SET( SYSTEMD_DIR /usr/lib/systemd/system)
++SET( SYSCONFDIR ${CMAKE_INSTALL_SYSCONFDIR})
++SET( SYSTEMD_DIR $ENV{systemd_system_unitdir})
+ 
+ if (${PYTHON_DESIRED} STREQUAL "2")
+   FIND_PACKAGE (PythonInterp REQUIRED)
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch 
b/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
new file mode 100644
index 000..a90e77cbf10
--- /dev/null
+++ 
b/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
@@ -0,0 +1,31 @@
+From 31653d324cf8c7b1f2f9e49d22676bd2ac546331 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Wed, 11 Jan 2017 15:10:13 +0200
+Subject: [PATCH] Do not prepend installroot to logdir.
+
+This would otherwise write the logs into rootfs/var/log
+(whereas we want them in $T),
+and will break installation of base-files rpm.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ dnf/cli/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
+index b764801a..893f4bda 100644
+--- a/dnf/cli/cli.py
 b/dnf/cli/cli.py
+@@ -881,7 +881,7 @@ class Cli(object):
+ subst = conf.substitutions
+ 

[OE-core] [PATCH 11/44] librepo: add a recipe

2017-03-10 Thread Alexander Kanavin
librepo is needed by dnf and libdnf.

Signed-off-by: Alexander Kanavin 
---
 ...ly-set-the-library-installation-directory.patch | 28 +++
 ...to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch | 41 ++
 ...-race-when-deleting-temporary-directories.patch | 41 ++
 ...ariables-with-pkg-config-not-with-cmake-m.patch | 29 +++
 meta/recipes-devtools/librepo/librepo_git.bb   | 24 +
 5 files changed, 163 insertions(+)
 create mode 100644 
meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
 create mode 100644 
meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
 create mode 100644 
meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
 create mode 100644 
meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo_git.bb

diff --git 
a/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
 
b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
new file mode 100644
index 000..01fea40467e
--- /dev/null
+++ 
b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
@@ -0,0 +1,28 @@
+From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:04:35 +0200
+Subject: [PATCH 1/4] Correctly set the library installation directory
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ librepo/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt
+index 2fe76d8..5026def 100644
+--- a/librepo/CMakeLists.txt
 b/librepo/CMakeLists.txt
+@@ -60,7 +60,8 @@ CONFIGURE_FILE("version.h.in" 
"${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+   SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+ 
+ INSTALL(FILES ${librepo_HEADERS} DESTINATION include/librepo)
+ INSTALL(TARGETS librepo LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
 
b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
new file mode 100644
index 000..7138dfce21d
--- /dev/null
+++ 
b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
@@ -0,0 +1,41 @@
+From 1570ad33dd7e5d83f3ee80bd104b114709ac1e34 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:05:36 +0200
+Subject: [PATCH 2/4] Do not try to obtain PYTHON_INSTALL_DIR by running
+ python.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ librepo/python/python2/CMakeLists.txt | 2 +-
+ librepo/python/python3/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/librepo/python/python2/CMakeLists.txt 
b/librepo/python/python2/CMakeLists.txt
+index 3615e17..cffa99f 100644
+--- a/librepo/python/python2/CMakeLists.txt
 b/librepo/python/python2/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ FIND_PACKAGE (PythonLibs 2 )
+ FIND_PACKAGE (PythonInterp 2 REQUIRED)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from 
distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+ 
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+diff --git a/librepo/python/python3/CMakeLists.txt 
b/librepo/python/python3/CMakeLists.txt
+index dfecac9..38bcc72 100644
+--- a/librepo/python/python3/CMakeLists.txt
 b/librepo/python/python3/CMakeLists.txt
+@@ -10,7 +10,7 @@ message("--- ${PYTHON_INCLUDE_DIR}")
+ 
+ FIND_PACKAGE(PythonLibs 3.0)
+ FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from 
distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 

[OE-core] [PATCH 13/44] libdnf: add a recipe

2017-03-10 Thread Alexander Kanavin
libdnf is required by dnf.

Signed-off-by: Alexander Kanavin 
---
 ...cmake-drop-the-requirement-for-GTKDOC_SCA.patch | 31 +
 ...ers-for-both-libsolv-and-libsolvext-libdn.patch | 28 +++
 ...-sysroot-path-to-introspection-tools-path.patch | 36 +++
 ...-library-installation-directory-correctly.patch | 29 
 ...-variables-with-pkg-config-cmake-s-own-mo.patch | 29 
 meta/recipes-devtools/libdnf/libdnf_git.bb | 40 ++
 6 files changed, 193 insertions(+)
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf_git.bb

diff --git 
a/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
 
b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
new file mode 100644
index 000..73acda6af8a
--- /dev/null
+++ 
b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
@@ -0,0 +1,31 @@
+From 9bb7630915c3e787732463a3e2064fe0e177101b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 24 Nov 2016 14:33:07 +0200
+Subject: [PATCH 1/4] FindGtkDoc.cmake: drop the requirement for
+ GTKDOC_SCANGOBJ_WRAPPER
+
+For some reason cmake is not able to find it when building in openembedded,
+and it's bundled with the source code anyway.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ cmake/modules/FindGtkDoc.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/FindGtkDoc.cmake b/cmake/modules/FindGtkDoc.cmake
+index 92b2cc7..39f34bd 100644
+--- a/cmake/modules/FindGtkDoc.cmake
 b/cmake/modules/FindGtkDoc.cmake
+@@ -52,7 +52,7 @@ find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml PATH 
"${GLIB_PREFIX}/bin")
+ find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref PATH "${GLIB_PREFIX}/bin")
+ 
+ find_package_handle_standard_args(GtkDoc
+-REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_SCANGOBJ_WRAPPER 
GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
++REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_MKDB_EXE 
GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
+ VERSION_VAR GtkDoc_VERSION)
+ 
+ # ::
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
 
b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
new file mode 100644
index 000..954add6e738
--- /dev/null
+++ 
b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -0,0 +1,28 @@
+From 5958b151a4dbb89114e90c971a34b74f873b7beb Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Tue, 7 Feb 2017 12:16:03 +0200
+Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is
+ using both)
+
+Upstream-Status: Pending [depends on whether 
https://github.com/openSUSE/libsolv/pull/177 is accepted]
+Signed-off-by: Alexander Kanavin 
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b531da1..e512da0 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -28,7 +28,7 @@ find_package (PkgConfig REQUIRED)
+ SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
+-PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
++PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
+ set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
+ pkg_check_modules (CHECK REQUIRED check)
+ pkg_check_modules (REPO REQUIRED librepo)
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
 
b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
new file mode 100644
index 000..3d772a5f8a3
--- /dev/null
+++ 
b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
@@ -0,0 +1,36 @@
+From c8211ad99ccaa4af4a75e0ba639527267fcfd69e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:17:19 +0200
+Subject: [PATCH 2/4] Prefix sysroot 

[OE-core] [PATCH 10/44] python-backports-lzma: add a recipe

2017-03-10 Thread Alexander Kanavin
It is needed by dnf, and only when using Python 2.x, so can
be dropped after moving dnf/rpm4 stack to Python 3.x.

Signed-off-by: Alexander Kanavin 
---
 ...-not-add-include-and-library-directories-.patch | 32 ++
 .../python-backports-lzma_git.bb   | 21 ++
 2 files changed, 53 insertions(+)
 create mode 100644 
meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
 create mode 100644 
meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb

diff --git 
a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
 
b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
new file mode 100644
index 000..0eb904a8a70
--- /dev/null
+++ 
b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
@@ -0,0 +1,32 @@
+From e5e3196cf69172b625c8c6ccca991c02fd18137c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:02:12 +0200
+Subject: [PATCH] setup.py: do not add include and library directories from the
+ host
+
+This avoids host contamination.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ setup.py | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 7886cf7..9a0356a 100644
+--- a/setup.py
 b/setup.py
+@@ -31,9 +31,7 @@ packages = ["backports", "backports.lzma"]
+ home = os.path.expanduser("~")
+ extens = [Extension('backports/lzma/_lzma',
+ ['backports/lzma/_lzmamodule.c'],
+-libraries = ['lzma'],
+-include_dirs = [os.path.join(home, 'include'), 
'/opt/local/include', '/usr/local/include'],
+-library_dirs = [os.path.join(home, 'lib'), 
'/opt/local/lib', '/usr/local/lib']
++libraries = ['lzma']
+ )]
+ 
+ descr = "Backport of Python 3.3's 'lzma' module for XZ/LZMA compressed files."
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb 
b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
new file mode 100644
index 000..6d3b8d569de
--- /dev/null
+++ b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
@@ -0,0 +1,21 @@
+HOMEPAGE = "https://github.com/peterjc/backports.lzma;
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=846e05e7e9e1c886b2637c230cfcd5dd"
+
+SRC_URI = "git://github.com/peterjc/backports.lzma.git \
+   
file://0001-setup.py-do-not-add-include-and-library-directories-.patch \
+   "
+
+PV = "0.0.6+git${SRCPV}"
+SRCREV = "718b3316ae7aee8e03c02e7e110108779ce3aec8"
+
+S = "${WORKDIR}/git"
+
+inherit distutils
+
+DEPENDS_append = " xz"
+
+RDEPENDS_${PN} += "python-core python-io python-pkgutil"
+RDEPENDS_${PN}_class-native += "python-core"
+
+BBCLASSEXTEND = "native"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 06/44] rpm: add a 4.x recipe

2017-03-10 Thread Alexander Kanavin
The dnf stack is written and tested against rpm 4.x. So if we want to use dnf 
for packaging,
we should also use rpm 4 - there's simply too much work involved in making rpm 
5 work with it due
to significant API differences, and supporting that going forward.

Signed-off-by: Alexander Kanavin 
---
 ...d-a-color-setting-for-mips64_n32-binaries.patch |  40 
 ...an-unsatisfiable-dependency-when-building.patch |  33 +++
 ...code-lib-rpm-as-the-installation-path-for.patch |  61 
 .../0001-Do-not-read-config-files-from-HOME.patch  |  38 
 ...t-the-PATH-environment-variable-before-ru.patch |  30 ++
 .../files/0001-Fix-build-with-musl-C-library.patch |  74 ++
 ...installing-execute-package-scriptlets-wit.patch |  37 +++
 ...alue-cannot-be-reset-issue-a-notice-inste.patch |  31 ++
 ...-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch |  72 ++
 meta/recipes-devtools/rpm/rpm_git.bb   | 108 +
 10 files changed, 524 insertions(+)
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
 create mode 100644 meta/recipes-devtools/rpm/rpm_git.bb

diff --git 
a/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
 
b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
new file mode 100644
index 000..ac6dcaf101d
--- /dev/null
+++ 
b/meta/recipes-devtools/rpm/files/0001-Add-a-color-setting-for-mips64_n32-binaries.patch
@@ -0,0 +1,40 @@
+From e3eff024826550aec4a6a5baef7210a29faf299d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 9 Mar 2017 18:54:02 +0200
+Subject: [PATCH] Add a color setting for mips64_n32 binaries
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ build/rpmfc.c | 1 +
+ rpmrc.in  | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/build/rpmfc.c b/build/rpmfc.c
+index d38a10916..c8e2f876a 100644
+--- a/build/rpmfc.c
 b/build/rpmfc.c
+@@ -622,6 +622,7 @@ exit:
+ static const struct rpmfcTokens_s rpmfcTokens[] = {
+   { "directory",  RPMFC_INCLUDE },
+ 
++  { "N32 MIPS64", RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
+   { "ELF 32-bit", RPMFC_ELF32|RPMFC_INCLUDE },
+   { "ELF 64-bit", RPMFC_ELF64|RPMFC_INCLUDE },
+ 
+diff --git a/rpmrc.in b/rpmrc.in
+index abc08fc31..f5bc820d8 100644
+--- a/rpmrc.in
 b/rpmrc.in
+@@ -133,6 +133,8 @@ archcolor: mipsr6el 1
+ archcolor: mips64r6 2
+ archcolor: mips64r6el 2
+ 
++archcolor: mips64_n32 4
++
+ archcolor: m68k 1
+ 
+ archcolor: m68kmint 1
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
 
b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
new file mode 100644
index 000..80e2f0fad70
--- /dev/null
+++ 
b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
@@ -0,0 +1,33 @@
+From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Mon, 9 Jan 2017 18:52:11 +0200
+Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
+ a short-circuited way.
+
+Upstream permits short-circuiting only for local testing; Yocto on the other
+hand produces rpms that way by design.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ build/pack.c | 4 
+ 1 file changed, 4 deletions(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index 1261cdbba..bb2d6f4f6 100644
+--- a/build/pack.c
 b/build/pack.c
+@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, 
int cheating)
+   headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
+   }
+ 
+-  if (cheating) {
+-  (void) rpmlibNeedsFeature(pkg, "ShortCircuited", 

[OE-core] [PATCH 09/44] python-iniparse: add a recipe

2017-03-10 Thread Alexander Kanavin
python-iniparse is required by dnf.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/python/python-iniparse_0.4.bb | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python-iniparse_0.4.bb

diff --git a/meta/recipes-devtools/python/python-iniparse_0.4.bb 
b/meta/recipes-devtools/python/python-iniparse_0.4.bb
new file mode 100644
index 000..f2515759b13
--- /dev/null
+++ b/meta/recipes-devtools/python/python-iniparse_0.4.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Accessing and Modifying INI files"
+HOMEPAGE = "https://pypi.python.org/pypi/iniparse/;
+LICENSE = "MIT & PSF"
+LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
+file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
+
+SRC_URI = 
"https://files.pythonhosted.org/packages/source/i/iniparse/iniparse-${PV}.tar.gz;
+SRC_URI[md5sum] = "5e573e9e9733d97623881ce9bbe5eca6"
+SRC_URI[sha256sum] = 
"abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054"
+
+inherit distutils
+
+RDEPENDS_${PN} += "python-core"
+
+BBCLASSEXTEND = "native"
+
+S = "${WORKDIR}/iniparse-${PV}"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 08/44] python-pygpgme: add a recipe

2017-03-10 Thread Alexander Kanavin
python-pygpgme is required by dnf.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/python/python-pygpgme_0.3.bb | 18 ++
 1 file changed, 18 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python-pygpgme_0.3.bb

diff --git a/meta/recipes-devtools/python/python-pygpgme_0.3.bb 
b/meta/recipes-devtools/python/python-pygpgme_0.3.bb
new file mode 100644
index 000..f7dd835eee9
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygpgme_0.3.bb
@@ -0,0 +1,18 @@
+SUMMARY = "A Python module for working with OpenPGP messages"
+HOMEPAGE = "https://launchpad.net/pygpgme;
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://README;md5=2dc15a76acf01e126188c8de634ae4b3"
+
+SRC_URI = 
"https://launchpad.net/pygpgme/trunk/${PV}/+download/pygpgme-${PV}.tar.gz;
+SRC_URI[md5sum] = "d38355af73f0352cde3d410b25f34fd0"
+SRC_URI[sha256sum] = 
"5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1"
+
+S = "${WORKDIR}/pygpgme-${PV}"
+
+inherit distutils
+
+DEPENDS = "gpgme python"
+
+RDEPENDS_${PN} += "python-core"
+
+BBCLASSEXTEND = "native"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 04/44] createrepo-c: add a recipe

2017-03-10 Thread Alexander Kanavin
This is the current C reimplementation/replacement of the original createrepo.
https://github.com/rpm-software-management/createrepo_c/wiki

Signed-off-by: Alexander Kanavin 
---
 ...0001-Correctly-install-the-shared-library.patch | 28 +++
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 27 +++
 .../createrepo-c/createrepo-c_git.bb   | 31 ++
 3 files changed, 86 insertions(+)
 create mode 100644 
meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
 create mode 100644 
meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c_git.bb

diff --git 
a/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
 
b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
new file mode 100644
index 000..01271246a22
--- /dev/null
+++ 
b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
@@ -0,0 +1,28 @@
+From fef835e1fdedc72c97d9c3e5704302e56e1bdef0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Mon, 2 Jan 2017 17:23:59 +0200
+Subject: [PATCH] Correctly install the shared library
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ src/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index f3635e8..46dc037 100644
+--- a/src/CMakeLists.txt
 b/src/CMakeLists.txt
+@@ -110,7 +110,8 @@ CONFIGURE_FILE("deltarpms.h.in" 
"${CMAKE_CURRENT_SOURCE_DIR}/deltarpms.h" @ONLY)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+ 
+ INSTALL(FILES ${headers} DESTINATION "include/createrepo_c")
+ INSTALL(FILES "createrepo_c.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 
b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 000..9531070937c
--- /dev/null
+++ 
b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,27 @@
+From bef487b5c2515062c5dd73c21082ce42f69aa717 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:31:02 +0200
+Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ src/python/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
+index 9f1ac64..eae0cbb 100644
+--- a/src/python/CMakeLists.txt
 b/src/python/CMakeLists.txt
+@@ -19,7 +19,7 @@ else()
+ FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+ endif()
+ 
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from 
distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+ 
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb 
b/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
new file mode 100644
index 000..1e69067eebf
--- /dev/null
+++ b/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "C implementation of createrepo."
+HOMEPAGE = "https://github.com/rpm-software-management/createrepo_c/wiki;
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
+   file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+   file://0001-Correctly-install-the-shared-library.patch \
+   "
+
+PV = "0.10.0+git${SRCPV}"
+SRCREV = "748891ff8ee524c2d37926c608cd2794f88013f3"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm"
+DEPENDS_append_class-native = " file-replacement-native"
+
+inherit cmake pkgconfig bash-completion distutils-base
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"

[OE-core] [PATCH 05/44] createrepo: remove the recipe

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 .../createrepo/createrepo/createrepo-dbpath.patch  |  61 
 .../createrepo/createrepo/createrepo-rpm549.patch  |  22 ---
 ...dumpMetadata-disable-signature-validation.patch |  31 
 .../createrepo/createrepo/fix-native-install.patch | 163 -
 .../createrepo/createrepo/fixstat.patch|  19 ---
 ...n-scripts-should-use-interpreter-from-env.patch |  47 --
 .../createrepo/createrepo/recommends.patch |  71 -
 .../createrepo/createrepo/rpm-createsolvedb.py |  64 
 .../createrepo/createrepo_0.4.11.bb|  51 ---
 9 files changed, 529 deletions(-)
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/fix-native-install.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/fixstat.patch
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/recommends.patch
 delete mode 100755 
meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
 delete mode 100644 meta/recipes-support/createrepo/createrepo_0.4.11.bb

diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch 
b/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
deleted file mode 100644
index 72755981a91..000
--- a/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-createrepo: Implement --dbpath command line option
-
---dbpath option allows to specify path to the directory
-with rpm database. By default createrepo uses or creates
-rpm database in /var/lib/rpm/
-
-Upstream-Status: Pending
-
-Signed-off-by: Ed Bartosh 
-
 createrepo-0.4.11.orig/genpkgmetadata.py 2015-03-30 22:18:19.90400 
+0300
-+++ createrepo-0.4.11/genpkgmetadata.py 2015-03-30 22:28:49.20800 +0300
-@@ -65,6 +65,7 @@
-  -p, --pretty = output xml files in pretty format.
-  --update = update existing metadata (if present)
-  -d, --database = generate the sqlite databases.
-+ --dbpath  = specify path to rpm db directory.
- """)
- 
- sys.exit(retval)
-@@ -72,10 +73,13 @@
- class MetaDataGenerator:
- def __init__(self, cmds):
- self.cmds = cmds
--self.ts = rpm.TransactionSet()
- self.pkgcount = 0
- self.files = []
- 
-+if self.cmds['dbpath']:
-+rpm.addMacro("_dbpath", self.cmds['dbpath'])
-+self.ts = rpm.TransactionSet()
-+
- def _os_path_walk(self, top, func, arg):
- """Directory tree walk with callback function.
-  copy of os.path.walk, fixes the link/stating problem
-@@ -435,6 +439,7 @@
- cmds['dir-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*']
- cmds['skip-symlinks'] = False
- cmds['pkglist'] = []
-+cmds['dbpath'] = None
- 
- try:
- gopts, argsleft = getopt.getopt(args, 'phqVvndg:s:x:u:c:o:CSi:', 
['help', 'exclude=',
-@@ -442,7 +447,7 @@
-   'baseurl=', 
'groupfile=', 'checksum=',
-   'version', 
'pretty', 'split', 'outputdir=',
-   'noepoch', 
'checkts', 'database', 'update',
--  
'skip-symlinks', 'pkglist='])
-+  
'skip-symlinks', 'pkglist=', 'dbpath='])
- except getopt.error, e:
- errorprint(_('Options Error: %s.') % e)
- usage()
-@@ -516,6 +521,8 @@
- cmds['skip-symlinks'] = True
- elif arg in ['-i', '--pkglist']:
- cmds['pkglist'] = a
-+elif arg == '--dbpath':
-+cmds['dbpath'] = os.path.realpath(a)
- 
- except ValueError, e:
- errorprint(_('Options Error: %s') % e)
diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch 
b/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
deleted file mode 100644
index bc7200d0722..000
--- a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-dumpMetadata.py: Fix for RPM5 - 5.4.9 integration
-
-RPM5 no longer has a switch to disable signature validation.  (Due to security
-validation concerns.)
-
-Upstream-Status: Inappropriate [other]
-  createrepo does not support RPM5 upstream
-
-Signed-off-by: Mark Hatle 
-
-diff -u 

[OE-core] [PATCH 03/44] rpmresolve: remove the recipe

2017-03-10 Thread Alexander Kanavin
The source code is incompatible with rpm4 API - let's use rpm
binary itself for now.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c | 426 --
 meta/recipes-devtools/rpm/rpmresolve_1.0.bb   |  29 --
 2 files changed, 455 deletions(-)
 delete mode 100644 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
 delete mode 100644 meta/recipes-devtools/rpm/rpmresolve_1.0.bb

diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c 
b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
deleted file mode 100644
index c0b4d567fb0..000
--- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/* OpenEmbedded RPM resolver utility
-
-  Written by: Paul Eggleton 
-
-  Copyright 2012 Intel Corporation
-
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License version 2 as
-  published by the Free Software Foundation.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License along
-  with this program; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-int debugmode;
-FILE *outf;
-
-int getPackageStr(rpmts ts, const char *NVRA, rpmTag tag, char **value)
-{
-int rc = -1;
-rpmmi mi = rpmmiInit(rpmtsGetRdb(ts), RPMTAG_NVRA, NVRA, 0);
-Header h;
-if ((h = rpmmiNext(mi)) != NULL) {
-HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
-he->tag = tag;
-rc = (headerGet(h, he, 0) != 1);
-if(rc==0)
-*value = strdup((char *)he->p.ptr);
-}
-(void)rpmmiFree(mi);
-return rc;
-}
-
-int loadTs(rpmts **ts, int *tsct, const char *dblistfn)
-{
-int count = 0;
-int sz = 5;
-int rc = 0;
-int listfile = 1;
-struct stat st_buf;
-
-rc = stat(dblistfn, _buf);
-if(rc != 0) {
-perror("stat");
-return 1;
-}
-if(S_ISDIR(st_buf.st_mode))
-listfile = 0;
-
-if(listfile) {
-if(debugmode)
-printf("DEBUG: reading database list file '%s'\n", dblistfn);
-*ts = malloc(sz * sizeof(rpmts));
-FILE *f = fopen(dblistfn, "r" );
-if(f) {
-char line[2048];
-while(fgets(line, sizeof(line), f)) {
-int len = strlen(line) - 1;
-if(len > 0)
-// Trim trailing whitespace
-while(len > 0 && isspace(line[len]))
-line[len--] = '\0';
-
-if(len > 0) {
-// Expand array if needed
-if(count == sz) {
-sz += 5;
-*ts = (rpmts *)realloc(*ts, sz);
-}
-
-if(debugmode)
-printf("DEBUG: opening database '%s'\n", line);
-char *dbpathm = malloc(strlen(line) + 10);
-sprintf(dbpathm, "_dbpath %s", line);
-rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE);
-free(dbpathm);
-
-rpmts tsi = rpmtsCreate();
-(*ts)[count] = tsi;
-rc = rpmtsOpenDB(tsi, O_RDONLY);
-if( rc ) {
-fprintf(stderr, "Failed to open database %s\n", line);
-rc = -1;
-break;
-}
-
-count++;
-}
-}
-fclose(f);
-*tsct = count;
-}
-else {
-perror(dblistfn);
-rc = -1;
-}
-}
-else {
-if(debugmode)
-printf("DEBUG: opening database '%s'\n", dblistfn);
-// Load from single database
-*ts = malloc(sizeof(rpmts));
-char *dbpathm = malloc(strlen(dblistfn) + 10);
-sprintf(dbpathm, "_dbpath %s", dblistfn);
-rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE);
-free(dbpathm);
-
-rpmts tsi = rpmtsCreate();
-(*ts)[0] = tsi;
-rc = rpmtsOpenDB(tsi, O_RDONLY);
-if( rc ) {
-fprintf(stderr, "Failed to open database %s\n", dblistfn);
-rc = -1;
-}
-*tsct = 1;
-}
-
-return rc;
-}
-
-int processPackages(rpmts *ts, int tscount, const char *packagelistfn, int 
ignoremissing)
-{
-int rc = 0;
-int count = 0;
-int sz = 100;
-int i = 0;
-

[OE-core] [PATCH 02/44] libsolv: enable rpm support

2017-03-10 Thread Alexander Kanavin
This is required by libdnf.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-extended/libsolv/libsolv_0.6.24.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/libsolv/libsolv_0.6.24.bb 
b/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
index 6de38b59157..3d8b581f851 100644
--- a/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
+++ b/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
@@ -5,7 +5,7 @@ SECTION = "devel"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
 
-DEPENDS = "expat zlib"
+DEPENDS = "expat zlib rpm"
 
 SRC_URI = "git://github.com/openSUSE/libsolv.git \
file://0001-Split-libsolvext-into-it-s-own-pkg-config-file.patch \
@@ -19,7 +19,7 @@ S = "${WORKDIR}/git"
 
 inherit cmake
 
-EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON"
+EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON 
-DENABLE_RPMDB=ON"
 
 PACKAGES =+ "${PN}-tools ${PN}ext"
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 01/44] package.bbclass: fix locations of debugedit and rpmdeps utilities

2017-03-10 Thread Alexander Kanavin
rpm4 installs them in different locations than rpm5. This also replaces
our custom rpmdeps-oecore with standard rpmdeps; I'm not seeing a
significant performance penalty.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 299ea120d9f..f4c2b5514c5 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -345,7 +345,7 @@ def splitdebuginfo(file, debugfile, debugsrcdir, 
sourcefile, d):
 
 dvar = d.getVar('PKGD')
 objcopy = d.getVar("OBJCOPY")
-debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
+debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/debugedit")
 
 # We ignore kernel modules, we don't generate debug info files.
 if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -1436,7 +1436,7 @@ if [ x"$D" = "x" ]; then
 fi
 }
 
-RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps-oecore --macros 
${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path 
${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt 
${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt"
+RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps --macros 
${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path 
${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt 
${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt"
 
 # Collect perfile run-time dependency metadata
 # Output:
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 00/44] Replace Smart package manager with DNF package manager

2017-03-10 Thread Alexander Kanavin
This patchset replaces the outdated, unsupported Smart package manager with
DNF package manager (Fedora's successor to yum). This is not a trivial change
and there are many consequences:

- DNF is API incompatible with rpm5; therefore rpm5 is replaced with rpm4.

- There are various non-default features that aren't yet supported or tested:
such as signing packages and repositories, RPM_PREFER_ELF_ARCH and possibly 
others

- db 6.x is removed from oe-core; db 5.x is replacing it

- Although I did my very best to test this patchset locally, 
the whole thing may break down in surprising ways. I would appreaciate all the 
help
you can provide here. The patchset touches many things in many places and has
more than the usual share of side effects.

Please see specific commits for further information and explanations. There is 
also
a longer email explaining user-visible changes and rationale behind them in
http://lists.openembedded.org/pipermail/openembedded-architecture/2017-February/000419.html
(note that section 6 in that email is no longer valid.

Changes in version 2 of the patchset:

- addressed review comments received for the first version of the pachset;
in particular the controversial pkg_postinst changes are removed (but they'll
be back as a separate change). Please check that I didn't forget anything.

- rpm package signing with gpg is now fixed, and should be working

Changes in version 3 of the patchset:

- a massive amount of fixes for issues that were found by Yocto autobuilder 
testing.
Particularly multilib support is now working properly. I believe that from the 
AB
perspective the patchset is ready for merging :)

The following changes since commit d454dc2fc17711d3efe6dbe5aca3c734f0ed158b:

  gcc-runtime: Fix QA issue (2017-03-08 11:52:57 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib akanavin/dnf-rpm4
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4

Alexander Kanavin (44):
  package.bbclass: fix locations of debugedit and rpmdeps utilities
  libsolv: enable rpm support
  rpmresolve: remove the recipe
  createrepo-c: add a recipe
  createrepo: remove the recipe
  rpm: add a 4.x recipe
  rpm: remove 5.x recipe
  python-pygpgme: add a recipe
  python-iniparse: add a recipe
  python-backports-lzma: add a recipe
  librepo: add a recipe
  libcomps: add a recipe
  libdnf: add a recipe
  dnf: add a recipe
  python-smartpm: remove the recipe
  db: remove the 6.x recipe
  package_rpm.bbclass: make architecture-independent .rpm packages
"noarch" instead of "all"
  package_manager.py: improve the API for insert_feed_uris()
  package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm
tags
  nativesdk-packagegroup-sdk-host: replace smartpm with dnf
  rootfs_rpm.bbclass: migrate image creation to dnf
  scripts/rpm2cpio.sh: replace 5.x version with 4.x version
  scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c
  package_rpm.bbclass: replace createrepo reference with createrepo_c
  package_rpm.bbclass: no need to specify the magic file location
  testimage.bbclass: fix runtime test for rpm, port smart tests to dnf
  package_rpm.bbclass: instruct rpm to not remove the buildroot
directory
  selftest: do not perform a full build in test_continue
  selftest: update output checks in incremental image test to match what
dnf prints
  byacc: remove the recipe
  gpg_sign.py: fix signing of rpm files using gpg
  oe-selftest: no need to parse gpg output to determine the name of the
signing key
  run-postinsts: simplify the logic of whether to install it to images
  package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
  security_flags.inc: update to reflect smart->dnf transition
  package_rpm.bbclass: do not set the OS dynamically when building rpms
  nspr: do not use shared library symbol resolution with musl
  package_rpm.bbclass: do not strip multilib prefixes from package
names, do not add multilib prefix to package arch
  package.bbclass: don't exclude package groups from runtime mapping
  glibc: do the multilib_header magic also for bits/long-double.h
  bash: package bashbug separately
  db: do the multilib_header processing for db.h
  base-files: do not write the current date into /etc/issue and
/etc/issue.net
  gpgme: fix python module build and installation

 .../recipes-test/images/oe-selftest-image.bb   |2 +-
 .../recipes-test/images/wic-image-minimal.bb   |2 +-
 meta/classes/image.bbclass |2 +-
 meta/classes/package.bbclass   |7 +-
 meta/classes/package_rpm.bbclass   |   86 +-
 meta/classes/rootfs_deb.bbclass|1 -
 meta/classes/rootfs_ipk.bbclass|1 -
 meta/classes/rootfs_rpm.bbclass|   22 +-
 meta/classes/sstate.bbclass|2 +-
 meta/classes/testimage.bbclass |   25 +-
 

[OE-core] [PATCH v2] gpgme: fix python module build and installation

2017-03-10 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 ...-Avoid-host-contamination-from-gpg-config.patch | 30 ++
 .../0001-Correctly-install-python-modules.patch| 26 +++
 meta/recipes-support/gpgme/gpgme_1.8.0.bb  |  2 ++
 3 files changed, 58 insertions(+)
 create mode 100644 
meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
 create mode 100644 
meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch

diff --git 
a/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
 
b/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
new file mode 100644
index 000..6ce58ba3f65
--- /dev/null
+++ 
b/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-contamination-from-gpg-config.patch
@@ -0,0 +1,30 @@
+From 96cfc76def123141d0cecaab857da3880396d5ef Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 9 Mar 2017 22:11:00 +0200
+Subject: [PATCH] Avoid host contamination from gpg-config
+
+getconfig is calling gpgme-config (from the source tree) and it
+gives -L{libdir} (i.e. -L/usr/lib) as the first item for linking.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ lang/python/setup.py.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
+index 213fe33..22629e2 100755
+--- a/lang/python/setup.py.in
 b/lang/python/setup.py.in
+@@ -86,7 +86,7 @@ subprocess.check_call([sys.executable, "gpgme-h-clean.py", 
gpg_error_h],
+   stdout=open("errors.i", "w"))
+ 
+ define_macros = []
+-libs = getconfig('libs')
++libs = getconfig('libs')[1:]
+ 
+ # Define extra_macros for both the SWIG and C code
+ for k, v in extra_macros.items():
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch 
b/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch
new file mode 100644
index 000..42655fbbe68
--- /dev/null
+++ 
b/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch
@@ -0,0 +1,26 @@
+From 4d714c097e497b63d2e8b22a834c671045e215e9 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 9 Mar 2017 21:34:55 +0200
+Subject: [PATCH] Correctly install python modules
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ lang/python/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index e32fd12..5ecf6fb 100644
+--- a/lang/python/Makefile.am
 b/lang/python/Makefile.am
+@@ -102,6 +102,7 @@ install-exec-local:
+   for PYTHON in $(PYTHONS); do \
+ $$PYTHON setup.py install \
+ --prefix $(DESTDIR)$(prefix) \
++  --install-lib=$(DESTDIR)${pythondir} \
+ --record files.txt \
+ --verbose ; \
+ cat files.txt >> install_files.txt ; \
+-- 
+2.11.0
+
diff --git a/meta/recipes-support/gpgme/gpgme_1.8.0.bb 
b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
index 86922f6fd98..d3e7880a47b 100644
--- a/meta/recipes-support/gpgme/gpgme_1.8.0.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
@@ -13,6 +13,8 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html;
 SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
file://pkgconfig.patch \
file://python-lang-config.patch \
+   file://0001-Correctly-install-python-modules.patch \
+   file://0001-Avoid-host-contamination-from-gpg-config.patch \
   "
 
 SRC_URI[md5sum] = "722a4153904b9b5dc15485a22d29263b"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/4] gpgme: fix python module build and installation

2017-03-10 Thread Alexander Kanavin

On 03/10/2017 12:51 PM, Burton, Ross wrote:


No upstream-status.


Will fix/resend.


Also, does the PATH mangling in master-next solve this?


I think not - python module build system calls gpgme-config to find out 
linking flags, and it gives -L${libdir} which is of course -L/usr/lib, 
so host contamination happens.


Alex

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/4] gpgme: fix python module build and installation

2017-03-10 Thread Burton, Ross
On 9 March 2017 at 20:23, Alexander Kanavin <
alexander.kana...@linux.intel.com> wrote:

> +++ b/meta/recipes-support/gpgme/gpgme/0001-Avoid-host-
> contamination-from-gpg-config.patch
> @@ -0,0 +1,28 @@
> +From 96cfc76def123141d0cecaab857da3880396d5ef Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin 
> +Date: Thu, 9 Mar 2017 22:11:00 +0200
> +Subject: [PATCH] Avoid host contamination from gpg-config
> +
> +gpg-config gives us -L/usr/lib as the first item for linking.
> +
> +Signed-off-by: Alexander Kanavin 
>

No upstream-status.

Also, does the PATH mangling in master-next solve this?

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] base-files: do not write the current date into /etc/issue and /etc/issue.net

2017-03-10 Thread Alexander Kanavin
This is causing a problem in multilib where base-files and lib64/32-base-files
clash because they may have different dates. Also, if the package is coming
from sstate it has an incorrect date anyway.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb 
b/meta/recipes-core/base-files/base-files_3.0.14.bb
index d1380053115..c7a9e803cb1 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -145,8 +145,9 @@ do_install_basefilesissue () {
printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
if [ -n "${DISTRO_VERSION}" ]; then
-   printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
-   printf "${DISTRO_VERSION} " >> 
${D}${sysconfdir}/issue.net
+   
distro_version_nodate=${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot').replace('${DATE}','')}
+   printf "%s " $distro_version_nodate >> 
${D}${sysconfdir}/issue
+   printf "%s " $distro_version_nodate >> 
${D}${sysconfdir}/issue.net
fi
printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
echo >> ${D}${sysconfdir}/issue
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] pkgconfig: Fix QA issue when upgrade rpm from 5.4.16 to 5.4.17

2017-03-10 Thread Burton, Ross
On 10 March 2017 at 03:55, Zheng Ruoqin  wrote:

> +RPROVIDES_${PN} += "pkgconfig(pkg-config) pkgconfig"
>

But PN is pkgconfig, so why is this required?

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] gcc: move cc1 binary file to package cpp.

2017-03-10 Thread Ismo Puustinen
The file /usr/libexec/gcc/.../cc1 has been installed in package gcc
instead of package cpp, because FILES statements for both packages match
the cc1 binary. Move the file to package cpp and add cpp to RDEPENDS_gcc
to fix the dependency.

Having the cc1 binary in cpp fixes errors such as: "cpp: error trying to
exec 'cc1': execvp: No such file or directory".

Signed-off-by: Ismo Puustinen 
---
 meta/recipes-devtools/gcc/gcc-target.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-target.inc 
b/meta/recipes-devtools/gcc/gcc-target.inc
index f436fa2..b245bdd 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -31,7 +31,7 @@ PACKAGES = "\
 FILES_${PN} = "\
 ${bindir}/${TARGET_PREFIX}gcc* \
 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2* \
-${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \
+${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
@@ -46,6 +46,7 @@ RRECOMMENDS_${PN} += "\
 libssp \
 libssp-dev \
 "
+RDEPENDS_${PN} += "cpp"
 
 FILES_${PN}-dev = "\
 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
-- 
2.9.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] curl: upgrade to 7.53.1

2017-03-10 Thread Fan Xin
Signed-off-by: Fan Xin 
---
 meta/recipes-support/curl/{curl_7.53.0.bb => curl_7.53.1.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/curl/{curl_7.53.0.bb => curl_7.53.1.bb} (94%)

diff --git a/meta/recipes-support/curl/curl_7.53.0.bb 
b/meta/recipes-support/curl/curl_7.53.1.bb
similarity index 94%
rename from meta/recipes-support/curl/curl_7.53.0.bb
rename to meta/recipes-support/curl/curl_7.53.1.bb
index a4cca15..bc78ffb 100644
--- a/meta/recipes-support/curl/curl_7.53.0.bb
+++ b/meta/recipes-support/curl/curl_7.53.1.bb
@@ -14,8 +14,8 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
 #
 SRC_URI += " file://configure_ac.patch"
 
-SRC_URI[md5sum] = "ede199c63b84df39f42da9da68de85c5"
-SRC_URI[sha256sum] = 
"b2345a8bef87b4c229dedf637cb203b5e21db05e20277c8e1094f0d4da180801"
+SRC_URI[md5sum] = "fb1f03a142236840c1a77c035fa4c542"
+SRC_URI[sha256sum] = 
"1c7207c06d75e9136a944a2e0528337ce76f15b9ec9ae4bb30d703b59bf530e8"
 
 CVE_PRODUCT = "libcurl"
 inherit autotools pkgconfig binconfig multilib_header
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] gcc: let cpp rrecommend gcc.

2017-03-10 Thread Puustinen, Ismo
On Thu, 2017-03-09 at 14:17 +, Khem Raj wrote:
> > The file /usr/libexec/gcc/.../cc1 has been installed in package
> > "gcc"
> > instead of package "cpp", because FILES statements for both
> > packages
> > match the cc1 binary. Remove the attempt to install the file in cpp
> > to
> > avoid confusion.
> 
> 
> Perhaps it's better to package it in cpp and remove from gcc package

Maybe you're right -- that's how my Fedora system appears to be doing
it. I'll prepare a new patch.

Ismo
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] rpm: 5.4.16 -> 5.4.17

2017-03-10 Thread Alexander Kanavin

On 03/10/2017 05:42 AM, Zheng Ruoqin wrote:

1) Upgrade rpm from 5.4.16 to 5.4.17


Apologies, but this is not anymore necessary. rpm5 will be replaced by 
rpm4 very soon - you are welcome to test it:


https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4

Alex

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core