All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] add 5 recipes and 1 bug fix
@ 2017-07-27  8:44 Hongxu Jia
  2017-07-27  8:44 ` [meta-oe][PATCH V2 1/6] glade: fix host contamination on centos7 Hongxu Jia
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Hongxu Jia @ 2017-07-27  8:44 UTC (permalink / raw)
  To: openembedded-devel

Changed in V2:

- s/fix contamination on centos7/fix host contamination on centos7/

//Hongxu

The following changes since commit a3a1ff1d411bcee88ed56caf4c9a7148c4a6e54a:

  usermode: add recipe 1.111 (2017-07-24 21:13:11 -0400)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib hongxu/add-recipe2
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/add-recipe2

Hongxu Jia (6):
  glade: fix host contamination on centos7
  tigervnc: add recipe 1.8.0
  libreport: add recipe 2.9.1
  libblockdev: add recipe 2.10
  python3-blivet: add recipe 2.2.0
  python3-blivetgui: add recipe 2.1.5

 meta-oe/recipes-devtools/glade/glade_3.20.0.bb     |   4 +-
 .../0001-fix-configure-and-compile-failures.patch  |  79 ++++
 .../files/0002-remove-python2-support.patch        |  30 ++
 ...emove-dmraid-while-compiling-with-with-dm.patch | 470 +++++++++++++++++++++
 ...ix-compile-failure-against-musl-C-library.patch |  50 +++
 .../libblockdev/libblockdev_2.10.bb                |  50 +++
 .../0001-Makefile.am-remove-doc-and-apidoc.patch   |  28 ++
 ...ac-remove-prog-test-of-xmlto-and-asciidoc.patch |  48 +++
 .../files/0003-without-build-plugins.patch         |  26 ++
 ...configure.ac-remove-prog-test-of-augparse.patch |  36 ++
 .../files/0005-remove-python2-support.patch        | 142 +++++++
 .../recipes-extended/libreport/libreport_2.9.1.bb  |  43 ++
 .../files/0001-tigervnc-remove-includedir.patch    |  50 +++
 .../0002-do-not-build-tests-sub-directory.patch    |  29 ++
 ...missing-dynamic-library-to-FLTK_LIBRARIES.patch |  28 ++
 ...tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch |  62 +++
 .../recipes-graphics/tigervnc/tigervnc_1.8.0.bb    | 131 ++++++
 .../python3-blivet/0001-comment-out-selinux.patch  |  70 +++
 .../0002-run_program-support-timeout.patch         | 102 +++++
 .../0003-support-infinit-timeout.patch             |  66 +++
 .../0004-Mount-var-volatile-during-install.patch   |  59 +++
 .../0005-update-fstab-by-appending.patch           |  32 ++
 ...0006-fix-new.roots-object-is-not-iterable.patch |  28 ++
 ...correct-timeout-while-system-time-changed.patch |  48 +++
 .../python3-blivet/0008-tweak-btrfs-packages.patch |  45 ++
 ...0009-invoking-mount-with-infinite-timeout.patch |  31 ++
 ...-use-oe-variable-to-replace-hardcoded-dir.patch |  34 ++
 .../0011-invoking-fsck-with-infinite-timeout.patch |  31 ++
 .../0012-invoking-mkfs-with-infinite-timeout.patch |  31 ++
 ...evert-Adapt-to-logging-module-name-change.patch |  30 ++
 .../python-blivet/python3-blivet_2.2.0.bb          |  46 ++
 .../python-blivet/python3-blivetgui_2.1.5.bb       |  27 ++
 32 files changed, 1983 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
 create mode 100644 meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
 create mode 100644 meta-oe/recipes-extended/libreport/files/0001-Makefile.am-remove-doc-and-apidoc.patch
 create mode 100644 meta-oe/recipes-extended/libreport/files/0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch
 create mode 100644 meta-oe/recipes-extended/libreport/files/0003-without-build-plugins.patch
 create mode 100644 meta-oe/recipes-extended/libreport/files/0004-configure.ac-remove-prog-test-of-augparse.patch
 create mode 100644 meta-oe/recipes-extended/libreport/files/0005-remove-python2-support.patch
 create mode 100644 meta-oe/recipes-extended/libreport/libreport_2.9.1.bb
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb

-- 
2.8.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH V2 1/6] glade: fix host contamination on centos7
  2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
@ 2017-07-27  8:44 ` Hongxu Jia
  2017-07-27  8:44 ` [meta-oe][PATCH 2/6] tigervnc: add recipe 1.8.0 Hongxu Jia
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Hongxu Jia @ 2017-07-27  8:44 UTC (permalink / raw)
  To: openembedded-devel

Since gobject-introspection convert to python3 in oe-core,
incorrectly assigning PYTHON_PN with python caused host python3
loaded.

On centos7, built with qemuarm failed:
...
arm-poky-linux-gnueabi-gcc: error: unrecognized argument in option
'-mtune=generic'
..
arm-poky-linux-gnueabi-gcc: error: unrecognized command line option
'-m64'
Traceback (most recent call last):
  File "/usr/lib64/python3.4/distutils/unixccompiler.py", line 126, in
_compile
...

The native python3 should be loaded.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta-oe/recipes-devtools/glade/glade_3.20.0.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta-oe/recipes-devtools/glade/glade_3.20.0.bb b/meta-oe/recipes-devtools/glade/glade_3.20.0.bb
index 8b35a9c..f33b6e3 100644
--- a/meta-oe/recipes-devtools/glade/glade_3.20.0.bb
+++ b/meta-oe/recipes-devtools/glade/glade_3.20.0.bb
@@ -9,7 +9,7 @@ DEPENDS = "gtk+ gtk+3 glib-2.0 libxml2 intltool-native \
 "
 
 
-inherit autotools pkgconfig pythonnative gnomebase gobject-introspection
+inherit autotools pkgconfig gnomebase gobject-introspection
 
 SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glade/3.20/glade-${PV}.tar.xz \
            file://remove-yelp-help-rules-var.patch \
@@ -23,5 +23,3 @@ FILES_${PN} += "${datadir}/* ${libdir}/glade/modules/libgladegtk.so"
 FILES_${PN}-dev += "${libdir}/glade/modules/libgladegtk.la"
 FILES_${PN}-dbg += "${libdir}/glade/modules/.debug/libgladegtk.so"
 
-PYTHON_PN = "python"
-
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 2/6] tigervnc: add recipe 1.8.0
  2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
  2017-07-27  8:44 ` [meta-oe][PATCH V2 1/6] glade: fix host contamination on centos7 Hongxu Jia
@ 2017-07-27  8:44 ` Hongxu Jia
  2017-08-09  0:46   ` Khem Raj
  2017-07-27  8:44 ` [meta-oe][PATCH 3/6] libreport: add recipe 2.9.1 Hongxu Jia
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2017-07-27  8:44 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../files/0001-tigervnc-remove-includedir.patch    |  50 ++++++++
 .../0002-do-not-build-tests-sub-directory.patch    |  29 +++++
 ...missing-dynamic-library-to-FLTK_LIBRARIES.patch |  28 +++++
 ...tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch |  62 ++++++++++
 .../recipes-graphics/tigervnc/tigervnc_1.8.0.bb    | 131 +++++++++++++++++++++
 5 files changed, 300 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb

diff --git a/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch b/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
new file mode 100644
index 0000000..12c4376
--- /dev/null
+++ b/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
@@ -0,0 +1,50 @@
+From 4b423cd2e5e4296abca3be553bf64d8cc287180a Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 20 Jul 2017 17:09:05 +0800
+Subject: [PATCH 1/4] tigervnc: remove includedir
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+
+It fixes host contamination
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ unix/xserver/hw/vnc/Makefile.am | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am
+index 0d6a4ac..854f078 100644
+--- a/unix/xserver/hw/vnc/Makefile.am
++++ b/unix/xserver/hw/vnc/Makefile.am
+@@ -22,7 +22,7 @@ libvnccommon_la_SOURCES = $(HDRS) \
+ 
+ libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
+ 	-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_H \
+-	-I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) ${XSERVERLIBS_CFLAGS} -I$(includedir) \
++	-I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) ${XSERVERLIBS_CFLAGS} \
+ 	-I$(top_srcdir)/include
+ 
+ bin_PROGRAMS = Xvnc
+@@ -42,7 +42,7 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_MODULE_EXTS \
+ 	-UHAVE_CONFIG_H \
+ 	-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
+ 	-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common \
+-	-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir)
++	-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS}
+ 
+ Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
+ 	$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11
+@@ -62,7 +62,7 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_
+ 	-I$(top_srcdir)/hw/xfree86/os-support \
+ 	-I$(top_srcdir)/hw/xfree86/os-support/bus \
+ 	-I$(top_srcdir)/include \
+-	${XSERVERLIBS_CFLAGS} -I$(includedir)
++	${XSERVERLIBS_CFLAGS}
+ 
+ libvnc_la_LDFLAGS = -module -avoid-version -Wl,-z,now
+ 
+-- 
+2.7.4
+
diff --git a/meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch b/meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
new file mode 100644
index 0000000..4e875ba
--- /dev/null
+++ b/meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
@@ -0,0 +1,29 @@
+From c3460d63f0b6cd50b9a64265f420f0439e12a1d5 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 25 Apr 2017 01:36:44 -0400
+Subject: [PATCH 2/4] do not build tests sub directory
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ CMakeLists.txt | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 94ec2ef..fb72a00 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -300,9 +300,6 @@ if(BUILD_VIEWER)
+   add_subdirectory(media)
+ endif()
+ 
+-add_subdirectory(tests)
+-
+-
+ include(cmake/BuildPackages.cmake)
+ 
+ # uninstall
+-- 
+2.7.4
+
diff --git a/meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch b/meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
new file mode 100644
index 0000000..cfb84ac
--- /dev/null
+++ b/meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
@@ -0,0 +1,28 @@
+From 6369a5be2af2ed1fa443f40f48deaf318d22713e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 20 Jul 2017 05:06:00 -0400
+Subject: [PATCH 3/4] add missing dynamic library to FLTK_LIBRARIES
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fb72a00..5732dc8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -246,6 +246,8 @@ if(UNIX AND NOT APPLE)
+   endif()
+ endif()
+ 
++set(FLTK_LIBRARIES ${FLTK_LIBRARIES} -lm -ldl -lpng -ljpeg)
++
+ # Check for GNUTLS library
+ option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication" ON)
+ if(ENABLE_GNUTLS)
+-- 
+2.7.4
+
diff --git a/meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch b/meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
new file mode 100644
index 0000000..97b0a38
--- /dev/null
+++ b/meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
@@ -0,0 +1,62 @@
+From 9563b69640227da2220ee0c39077afb736cc96d1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 20 Jul 2017 17:12:17 +0800
+Subject: [PATCH 4/4] tigervnc: add fPIC option to COMPILE_FLAGS
+
+The static libraries in Xregion/network/rdr/rfb were linked by shared
+library libvnc.so, so we should add fPIC option to COMPILE_FLAGS to fix
+relocation issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ common/Xregion/CMakeLists.txt | 1 +
+ common/network/CMakeLists.txt | 1 +
+ common/rdr/CMakeLists.txt     | 1 +
+ common/rfb/CMakeLists.txt     | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/common/Xregion/CMakeLists.txt b/common/Xregion/CMakeLists.txt
+index 40ca97e..9411328 100644
+--- a/common/Xregion/CMakeLists.txt
++++ b/common/Xregion/CMakeLists.txt
+@@ -3,4 +3,5 @@ add_library(Xregion STATIC
+ 
+ if(UNIX)
+   libtool_create_control_file(Xregion)
++  set_target_properties(Xregion PROPERTIES COMPILE_FLAGS -fPIC)
+ endif()
+diff --git a/common/network/CMakeLists.txt b/common/network/CMakeLists.txt
+index b624c8e..6c06ec9 100644
+--- a/common/network/CMakeLists.txt
++++ b/common/network/CMakeLists.txt
+@@ -9,4 +9,5 @@ endif()
+ 
+ if(UNIX)
+   libtool_create_control_file(network)
++  set_target_properties(network PROPERTIES COMPILE_FLAGS -fPIC)
+ endif()
+diff --git a/common/rdr/CMakeLists.txt b/common/rdr/CMakeLists.txt
+index 989ba2f..20f6489 100644
+--- a/common/rdr/CMakeLists.txt
++++ b/common/rdr/CMakeLists.txt
+@@ -27,4 +27,5 @@ target_link_libraries(rdr ${RDR_LIBRARIES})
+ 
+ if(UNIX)
+   libtool_create_control_file(rdr)
++  set_target_properties(rdr PROPERTIES COMPILE_FLAGS -fPIC)
+ endif()
+diff --git a/common/rfb/CMakeLists.txt b/common/rfb/CMakeLists.txt
+index 5047e5e..88838ab 100644
+--- a/common/rfb/CMakeLists.txt
++++ b/common/rfb/CMakeLists.txt
+@@ -98,4 +98,5 @@ target_link_libraries(rfb ${RFB_LIBRARIES})
+ 
+ if(UNIX)
+   libtool_create_control_file(rfb)
++  set_target_properties(rfb PROPERTIES COMPILE_FLAGS -fPIC)
+ endif()
+-- 
+2.7.4
+
diff --git a/meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
new file mode 100644
index 0000000..d15bc9e
--- /dev/null
+++ b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
@@ -0,0 +1,131 @@
+DESCRIPTION = "TigerVNC remote display system"
+HOMEPAGE = "http://www.tigervnc.com/"
+LICENSE = "GPLv2+"
+SECTION = "x11/utils"
+DEPENDS = "xserver-xorg gnutls jpeg libxtst gettext-native fltk"
+RDEPENDS_${PN} = "chkconfig coreutils hicolor-icon-theme"
+
+LIC_FILES_CHKSUM = "file://LICENCE.TXT;md5=75b02c2872421380bbd47781d2bd75d3"
+
+S = "${WORKDIR}/git"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "x11"
+
+inherit autotools cmake
+B = "${S}"
+
+SRCREV = "4d6e1b8306a8cca8ad5e15ff8201f6ea24459cfd"
+
+SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.8-branch \
+           file://0001-tigervnc-remove-includedir.patch \
+           file://0002-do-not-build-tests-sub-directory.patch \
+           file://0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch \
+           file://0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch \
+"
+
+# Keep sync with xorg-server in oe-core
+XORG_PN ?= "xorg-server"
+XORG_PV ?= "1.19.3"
+SRC_URI += "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${XORG_PV}.tar.bz2;name=xorg"
+XORG_S = "${WORKDIR}/${XORG_PN}-${XORG_PV}"
+SRC_URI[xorg.md5sum] = "015d2fc4b9f2bfe7a626edb63a62c65e"
+SRC_URI[xorg.sha256sum] = "677a8166e03474719238dfe396ce673c4234735464d6dadf2959b600d20e5a98"
+
+# It is the directory containing the Xorg source for the
+# machine on which you are building TigerVNC.
+XSERVER_SOURCE_DIR="${S}/unix/xserver"
+
+do_patch[postfuncs] += "do_patch_xserver"
+do_patch_xserver () {
+    for subdir in Xext xkb GL hw/xquartz/bundle hw/xfree86/common; do
+        install -d ${XSERVER_SOURCE_DIR}/$subdir
+    done
+
+    for subdir in hw/dmx/doc man doc hw/dmx/doxygen; do
+        install -d ${XSERVER_SOURCE_DIR}/$subdir
+    done
+
+    sources="hw/xquartz/bundle/cpprules.in man/Xserver.man doc/smartsched \
+             hw/dmx/doxygen/doxygen.conf.in xserver.ent.in xkb/README.compiled \
+             hw/xfree86/xorgconf.cpp hw/xfree86/Xorg.sh.in"
+    for i in ${sources}; do
+        install -m 0644 ${XORG_S}/$i ${XSERVER_SOURCE_DIR}/$i;
+    done
+
+    cd ${XORG_S}
+    find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | \
+    xargs tar cf - | (cd ${XSERVER_SOURCE_DIR} && tar xf -)
+
+    cd ${XSERVER_SOURCE_DIR}
+    xserverpatch="${S}/unix/xserver119.patch"
+    echo "Apply $xserverpatch"
+    patch -p1 -b --suffix .vnc < $xserverpatch
+}
+
+EXTRA_OECONF = "--disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
+        --disable-xwin --disable-xephyr --disable-kdrive --with-pic \
+        --disable-static --disable-xinerama \
+        --with-xkb-output=${localstatedir}/lib/xkb \
+        --disable-glx --disable-dri --disable-dri2 \
+        --disable-config-hal \
+        --disable-config-udev \
+        --without-dtrace \
+        --disable-unit-tests \
+        --disable-devel-docs \
+        --disable-selective-werror \
+        --disable-xshmfence \
+        --disable-config-udev \
+        --disable-dri3 \
+        --disable-libunwind \
+        --without-xmlto \
+        --enable-systemd-logind=no \
+        --disable-xinerama \
+        --disable-xwayland \
+"
+
+do_configure_append () {
+    olddir=`pwd`
+    cd ${XSERVER_SOURCE_DIR}
+
+    rm -rf aclocal-copy/
+    rm -f aclocal.m4
+
+    export ACLOCALDIR="${XSERVER_SOURCE_DIR}/aclocal-copy"
+    mkdir -p ${ACLOCALDIR}/
+    if [ -d ${STAGING_DATADIR_NATIVE}/aclocal ]; then
+        cp-noerror ${STAGING_DATADIR_NATIVE}/aclocal/ ${ACLOCALDIR}/
+    fi
+    if [ -d ${STAGING_DATADIR}/aclocal -a "${STAGING_DATADIR_NATIVE}/aclocal" != "${STAGING_DATADIR}/aclocal" ]; then
+        cp-noerror ${STAGING_DATADIR}/aclocal/ ${ACLOCALDIR}/
+    fi
+    ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed."
+    chmod +x ./configure
+    ${CACHED_CONFIGUREVARS} ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+    cd $olddir
+}
+
+do_compile_append () {
+    olddir=`pwd`
+    cd ${XSERVER_SOURCE_DIR}
+
+    oe_runmake
+
+    cd $olddir
+}
+
+do_install_append() {
+    olddir=`pwd`
+    cd ${XSERVER_SOURCE_DIR}/hw/vnc
+
+    oe_runmake 'DESTDIR=${D}' install
+
+    cd $olddir
+}
+
+FILES_${PN} += " \
+    ${libdir}/xorg/modules/extensions \
+    ${datadir}/icons \
+"
+
+FILES_${PN}-dbg += "${libdir}/xorg/modules/extensions/.debug"
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 3/6] libreport: add recipe 2.9.1
  2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
  2017-07-27  8:44 ` [meta-oe][PATCH V2 1/6] glade: fix host contamination on centos7 Hongxu Jia
  2017-07-27  8:44 ` [meta-oe][PATCH 2/6] tigervnc: add recipe 1.8.0 Hongxu Jia
@ 2017-07-27  8:44 ` Hongxu Jia
  2017-07-27  8:44 ` [PATCH 4/6] libblockdev: add recipe 2.10 Hongxu Jia
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Hongxu Jia @ 2017-07-27  8:44 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../0001-Makefile.am-remove-doc-and-apidoc.patch   |  28 ++++
 ...ac-remove-prog-test-of-xmlto-and-asciidoc.patch |  48 +++++++
 .../files/0003-without-build-plugins.patch         |  26 ++++
 ...configure.ac-remove-prog-test-of-augparse.patch |  36 ++++++
 .../files/0005-remove-python2-support.patch        | 142 +++++++++++++++++++++
 .../recipes-extended/libreport/libreport_2.9.1.bb  |  43 +++++++
 6 files changed, 323 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libreport/files/0001-Makefile.am-remove-doc-and-apidoc.patch
 create mode 100644 meta-oe/recipes-extended/libreport/files/0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch
 create mode 100644 meta-oe/recipes-extended/libreport/files/0003-without-build-plugins.patch
 create mode 100644 meta-oe/recipes-extended/libreport/files/0004-configure.ac-remove-prog-test-of-augparse.patch
 create mode 100644 meta-oe/recipes-extended/libreport/files/0005-remove-python2-support.patch
 create mode 100644 meta-oe/recipes-extended/libreport/libreport_2.9.1.bb

diff --git a/meta-oe/recipes-extended/libreport/files/0001-Makefile.am-remove-doc-and-apidoc.patch b/meta-oe/recipes-extended/libreport/files/0001-Makefile.am-remove-doc-and-apidoc.patch
new file mode 100644
index 0000000..9b328a1
--- /dev/null
+++ b/meta-oe/recipes-extended/libreport/files/0001-Makefile.am-remove-doc-and-apidoc.patch
@@ -0,0 +1,28 @@
+From db32ba60ca75d288d3ac08b54256cb74d9e1581a Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 26 Apr 2017 03:47:58 -0400
+Subject: [PATCH 1/3] Makefile.am: remove doc and apidoc
+
+There was a failure at do_install time, so remove doc to workaround.
+
+Upstream-Status:  Inappropriate workaround
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index c6ab640..fb09fc1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,5 @@
+ ACLOCAL_AMFLAGS = -I m4
+-SUBDIRS = po src tests doc apidoc
++SUBDIRS = po src tests
+ 
+ EXTRA_DIST = \
+     libreport.pc.in \
+-- 
+2.8.1
+
diff --git a/meta-oe/recipes-extended/libreport/files/0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch b/meta-oe/recipes-extended/libreport/files/0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch
new file mode 100644
index 0000000..146510e
--- /dev/null
+++ b/meta-oe/recipes-extended/libreport/files/0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch
@@ -0,0 +1,48 @@
+From d8c49e6a15ab28f4ca94e03b2a53ed8df63346cd Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 26 Apr 2017 03:49:45 -0400
+Subject: [PATCH 2/3] configure.ac: remove prog test of xmlto and asciidoc
+
+The prog of xmlto and asciidoc were used to generate documents,
+and since the doc module has already been disabled, so we should
+remove the prog test.
+
+Upstream-Status:  Inappropriate workaround
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 18 ------------------
+ 1 file changed, 18 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ccefe50..ed48c88 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,24 +68,6 @@ if test -z "$PYTHON3"; then
+     exit 1
+ fi
+ 
+-AC_PATH_PROG([ASCIIDOC], [asciidoc], [no])
+-[if test "$ASCIIDOC" = "no"]
+-[then]
+-    [echo "The asciidoc program was not found in the search path. Please ensure"]
+-    [echo "that it is installed and its directory is included in the search path."]
+-    [echo "Then run configure again before attempting to build libreport."]
+-    [exit 1]
+-[fi]
+-
+-AC_PATH_PROG([XMLTO], [xmlto], [no])
+-[if test "$XMLTO" = "no"]
+-[then]
+-    [echo "The xmlto program was not found in the search path. Please ensure"]
+-    [echo "that it is installed and its directory is included in the search path."]
+-    [echo "Then run configure again before attempting to build libreport."]
+-    [exit 1]
+-[fi]
+-
+ AC_ARG_WITH(bugzilla,
+ AS_HELP_STRING([--with-bugzilla],[use Bugzilla plugin (default is YES)]),
+ LIBREPORT_PARSE_WITH([bugzilla]))
+-- 
+2.8.1
+
diff --git a/meta-oe/recipes-extended/libreport/files/0003-without-build-plugins.patch b/meta-oe/recipes-extended/libreport/files/0003-without-build-plugins.patch
new file mode 100644
index 0000000..3ad7774
--- /dev/null
+++ b/meta-oe/recipes-extended/libreport/files/0003-without-build-plugins.patch
@@ -0,0 +1,26 @@
+From 0e96d9f23b2b166e7444e7c8e0a6d4b83c2eccd7 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 26 Apr 2017 03:51:03 -0400
+Subject: [PATCH 3/3] without build plugins
+
+Upstream-Status:  Inappropriate workaround
+
+Rebase to 2.9.1
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index c15928c..bac02b1 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -8,4 +8,4 @@ if BUILD_NEWT
+ sub_dirs += report-newt
+ endif
+ 
+-SUBDIRS = include lib plugins report-python cli client-python workflows $(sub_dirs)
++SUBDIRS = include lib report-python cli client-python workflows $(sub_dirs)
+-- 
+2.8.1
+
diff --git a/meta-oe/recipes-extended/libreport/files/0004-configure.ac-remove-prog-test-of-augparse.patch b/meta-oe/recipes-extended/libreport/files/0004-configure.ac-remove-prog-test-of-augparse.patch
new file mode 100644
index 0000000..9839e5a
--- /dev/null
+++ b/meta-oe/recipes-extended/libreport/files/0004-configure.ac-remove-prog-test-of-augparse.patch
@@ -0,0 +1,36 @@
+From cf3b646facc19078ed29f828e36dd2e552283518 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 27 Apr 2017 02:15:02 -0400
+Subject: [PATCH] configure.ac: remove prog test of augparse
+
+The build time does not require it.
+
+Upstream-Status:  Inappropriate workaround
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c06af2d..b90f49e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -288,14 +288,6 @@ AC_ARG_WITH(augeaslenslibdir,
+                            [Directory for librepor lens (default: /usr/share/augeas/lenses)])],
+             [], [with_augeaslenslibdir="/usr/share/augeas/lenses"])
+ AC_SUBST([AUGEAS_LENS_LIB_DIR], [$with_augeaslenslibdir])
+-AC_PATH_PROG(AUGPARSE, augparse, no)
+-[if test "$AUGPARSE" = "no"]
+-[then]
+-    [echo "The augparse program was not found in the search path. Please ensure"]
+-    [echo "that it is installed and its directory is included in the search path."]
+-    [echo "Then run configure again before attempting to build libreport."]
+-    [exit 1]
+-[fi]
+ 
+ AC_ARG_WITH([defaultdumpdirmode],
+             AS_HELP_STRING([--with-defaultdumpdirmode=OCTAL-MODE],
+-- 
+2.8.1
+
diff --git a/meta-oe/recipes-extended/libreport/files/0005-remove-python2-support.patch b/meta-oe/recipes-extended/libreport/files/0005-remove-python2-support.patch
new file mode 100644
index 0000000..9770f07
--- /dev/null
+++ b/meta-oe/recipes-extended/libreport/files/0005-remove-python2-support.patch
@@ -0,0 +1,142 @@
+From 06710ab89fc7d7a82a378289aa3fcd92d33074f2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 27 Apr 2017 03:31:00 -0400
+Subject: [PATCH] remove python2 support
+
+We do not require python2, so remove it.
+
+Upstream-Status:  Inappropriate workaround
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac                               | 15 ---------------
+ src/client-python/reportclient/Makefile.am |  9 ---------
+ src/report-python/Makefile.am              | 19 -------------------
+ 3 files changed, 43 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index eb50382..826d0fe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -166,15 +166,6 @@ do
+ done
+ fi dnl end NO_MANTISBT
+ 
+-AC_PATH_PROG([PYTHON_CONFIG], [python-config], [no])
+-[if test "$PYTHON_CONFIG" = "no"]
+-[then]
+-    [echo "The python-config program was not found in the search path. Please ensure"]
+-    [echo "that it is installed and its directory is included in the search path."]
+-    [echo "Then run configure again before attempting to build libreport."]
+-    [exit 1]
+-[fi]
+-
+ AC_PATH_PROG([PYTHON3_CONFIG], [python3-config], [no])
+ [if test "$PYTHON3_CONFIG" = "no"]
+ [then]
+@@ -184,9 +175,6 @@ AC_PATH_PROG([PYTHON3_CONFIG], [python3-config], [no])
+     [exit 1]
+ [fi]
+ 
+-PYTHON_CFLAGS=`python-config --cflags 2> /dev/null`
+-PYTHON_LIBS=`python-config --libs 2> /dev/null`
+-
+ PYTHON3_CFLAGS=`python3-config --cflags 2> /dev/null`
+ PYTHON3_LIBS=`python3-config --libs 2> /dev/null`
+ 
+@@ -198,9 +186,6 @@ PYTHON3_DIR=`$PYTHON3 -c "import distutils.sysconfig; \
+ PYTHON3_EXECDIR=`$PYTHON3 -c "import distutils.sysconfig; \
+     print(distutils.sysconfig.get_python_lib(1,0,prefix='$PYTHON3_EXEC_PREFIX'))"`
+ 
+-AC_SUBST(PYTHON_CFLAGS)
+-AC_SUBST(PYTHON_LIBS)
+-
+ AC_SUBST(PYTHON3_CFLAGS)
+ AC_SUBST(PYTHON3_LIBS)
+ AC_SUBST(python3dir, $PYTHON3_DIR)
+diff --git a/src/client-python/reportclient/Makefile.am b/src/client-python/reportclient/Makefile.am
+index 46ac42f..fb5216a 100644
+--- a/src/client-python/reportclient/Makefile.am
++++ b/src/client-python/reportclient/Makefile.am
+@@ -4,13 +4,10 @@ PYFILES = \
+     dnfdebuginfo.py \
+     yumdebuginfo.py
+ 
+-py2clientdir = $(pyexecdir)/reportclient
+ py3clientdir = $(py3execdir)/reportclient
+ 
+-py2client_PYTHON = $(PYFILES)
+ py3client_PYTHON = $(PYFILES)
+ 
+-py2client_LTLIBRARIES = _reportclient.la
+ py3client_LTLIBRARIES = _reportclient3.la
+ 
+ PYEXTFILES = \
+@@ -33,12 +30,6 @@ PYEXTLDFLAGS = \
+     -avoid-version \
+     -Wl,-z,relro -Wl,-z,now
+ 
+-_reportclient_la_SOURCES = $(PYEXTFILES)
+-_reportclient_la_CPPFLAGS = $(PYEXTCPPFLAGS) $(PYTHON_CFLAGS)
+-_reportclient_la_LDFLAGS = $(PYEXTLDFLAGS) \
+-    -export-symbols-regex init_reportclient
+-_reportclient_la_LIBADD = ../../lib/libreport.la
+-
+ _reportclient3_la_SOURCES = $(PYEXTFILES)
+ _reportclient3_la_CPPFLAGS = $(PYEXTCPPFLAGS) $(PYTHON3_CFLAGS)
+ _reportclient3_la_LDFLAGS = $(PYEXTLDFLAGS) \
+diff --git a/src/report-python/Makefile.am b/src/report-python/Makefile.am
+index 793cebd..241dcb7 100644
+--- a/src/report-python/Makefile.am
++++ b/src/report-python/Makefile.am
+@@ -1,12 +1,9 @@
+ PYFILES = __init__.py accountmanager.py
+ 
+-pyreportexecdir = $(pyexecdir)/report
+ py3reportexecdir = $(py3execdir)/report
+ 
+-pyreportexec_PYTHON = $(PYFILES)
+ py3reportexec_PYTHON = $(PYFILES)
+ 
+-pyreportexec_LTLIBRARIES = _pyreport.la
+ py3reportexec_LTLIBRARIES = _py3report.la
+ 
+ PYEXTFILES = \
+@@ -34,20 +31,6 @@ PYEXTLDFLAGS = \
+     -avoid-version \
+     -Wl,-z,relro -Wl,-z,now
+ 
+-_pyreport_la_SOURCES = $(PYEXTFILES)
+-
+-_pyreport_la_CPPFLAGS = \
+-    $(PYEXTCPPFLAGS) \
+-    $(PYTHON_CFLAGS)
+-
+-_pyreport_la_LDFLAGS = \
+-   $(PYEXTLDFLAGS) \
+-   -export-symbols-regex init_pyreport
+-
+-_pyreport_la_LIBADD = \
+-    ../lib/libreport.la \
+-    $(PYTHON2_LIBS)
+-
+ _py3report_la_SOURCES = $(PYEXTFILES)
+ 
+ _py3report_la_CPPFLAGS = \
+@@ -64,7 +47,6 @@ _py3report_la_LIBADD = \
+ 
+ # report compat:
+ 
+-pyreportioexecdir = $(pyexecdir)/report/io
+ py3reportioexecdir = $(py3execdir)/report/io
+ 
+ PYIOFILES = \
+@@ -73,5 +55,4 @@ PYIOFILES = \
+     io/NewtIO.py \
+     io/TextIO.py
+ 
+-pyreportioexec_PYTHON = $(PYIOFILES)
+ py3reportioexec_PYTHON = $(PYIOFILES)
+-- 
+2.8.1
+
diff --git a/meta-oe/recipes-extended/libreport/libreport_2.9.1.bb b/meta-oe/recipes-extended/libreport/libreport_2.9.1.bb
new file mode 100644
index 0000000..459f0f2
--- /dev/null
+++ b/meta-oe/recipes-extended/libreport/libreport_2.9.1.bb
@@ -0,0 +1,43 @@
+DESCRIPTION = "Libraries providing API for reporting different problems in applications \
+to different bug targets like Bugzilla, ftp, trac, etc..."
+SUMMARY = "Generic library for reporting various problems"
+HOMEPAGE = "https://abrt.readthedocs.org/"
+LICENSE = "GPLv2+"
+DEPENDS = "xmlrpc-c xmlrpc-c-native intltool-native \
+        json-c libtar libnewt libproxy rpm \
+        augeas satyr systemd gtk+3 \
+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+
+SRC_URI = "https://github.com/abrt/${BPN}/archive/${PV}/${BPN}}-%{PV}.tar.gz"
+SRC_URI += "file://0001-Makefile.am-remove-doc-and-apidoc.patch \
+            file://0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch \
+            file://0003-without-build-plugins.patch \
+            file://0004-configure.ac-remove-prog-test-of-augparse.patch \
+            file://0005-remove-python2-support.patch \
+"
+
+SRC_URI[md5sum] = "f732a63dcc68cf96f0df02bcfc5fccc7"
+SRC_URI[sha256sum] = "484e15759a079730608b708ea9ae74a045ebe74f35dbfe9c9c16834c4462bcd4"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+inherit gettext autotools python3native pkgconfig
+
+RDEPENDS_${PN}-python3 += "${PN}"
+
+do_patch[prefuncs] += "do_gen_version"
+do_gen_version() {
+    cd ${S}
+    ./gen-version
+}
+
+PACKAGES += "python3-${PN}"
+
+FILES_${PN} += "${datadir}/*"
+FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/*/.debug"
+FILES_python3-${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
+
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/6] libblockdev: add recipe 2.10
  2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
                   ` (2 preceding siblings ...)
  2017-07-27  8:44 ` [meta-oe][PATCH 3/6] libreport: add recipe 2.9.1 Hongxu Jia
@ 2017-07-27  8:44 ` Hongxu Jia
  2017-08-09  0:51   ` Khem Raj
  2017-07-27  8:44 ` [PATCH 5/6] python3-blivet: add recipe 2.2.0 Hongxu Jia
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2017-07-27  8:44 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../0001-fix-configure-and-compile-failures.patch  |  79 ++++
 .../files/0002-remove-python2-support.patch        |  30 ++
 ...emove-dmraid-while-compiling-with-with-dm.patch | 470 +++++++++++++++++++++
 ...ix-compile-failure-against-musl-C-library.patch |  50 +++
 .../libblockdev/libblockdev_2.10.bb                |  50 +++
 5 files changed, 679 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
 create mode 100644 meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb

diff --git a/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch b/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
new file mode 100644
index 0000000..914ee99
--- /dev/null
+++ b/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
@@ -0,0 +1,79 @@
+From 86686ccbf43c5d9e8c8dc97c66ba09e522050e5e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 27 Jul 2017 10:06:24 +0800
+Subject: [PATCH 1/3] fix configure and compile failures
+
+1. Fix do_configure failure
+---------------------------
+|Checking header volume_key/libvolume_key.h existence and usability.
+../tmp/6tvtK.c:1:38: fatal error: volume_key/libvolume_key.h:
+No such file or directory
+| #include <volume_key/libvolume_key.h>
+|Checking header dmraid/dmraid.h existence and usability.../tmp/
+ktVJ6.c:1:27: fatal error: dmraid/dmraid.h: No such file or directory
+| #include <dmraid/dmraid.h>
+---------------------------
+We explictly add volume_key and dmraid to DEPENDS, do not need
+configure to test.
+
+2. Fix config.h not found
+Add it to configure.ac
+
+3. Correct AC_DEFINE
+...
+autoheader: warning: missing template: LIBMOUNT_NEW_ERR_API
+autoheader: Use AC_DEFINE([LIBMOUNT_NEW_ERR_API], [], [Description])
+...
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0270c99..b7c7368 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,6 +9,8 @@ AC_DISABLE_STATIC
+ AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-syntax -Wno-portability])
+ AC_CONFIG_MACRO_DIR([m4])
+ 
++AC_CONFIG_HEADERS([config.h])
++
+ AM_PATH_PYTHON
+ 
+ AM_PROG_AR
+@@ -129,7 +131,6 @@ LIBBLOCKDEV_PKG_CHECK_MODULES([UDEV], [libudev >= 216])
+ AS_IF([test "x$with_crypto" != "xno"],
+       [LIBBLOCKDEV_PKG_CHECK_MODULES([CRYPTSETUP], [libcryptsetup >= 1.6.7])
+        LIBBLOCKDEV_PKG_CHECK_MODULES([NSS], [nss >= 3.18.0])
+-       LIBBLOCKDEV_CHECK_HEADER([volume_key/libvolume_key.h], [$GLIB_CFLAGS $NSS_CFLAGS], [libvolume_key.h not available])
+       ],
+       [])
+ 
+@@ -137,10 +138,6 @@ AS_IF([test "x$with_dm" != "xno" -o "x$with_lvm" != "xno" -o "x$with_lvm_dbus" !
+       [LIBBLOCKDEV_PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= 1.02.93])],
+       [])
+ 
+-AS_IF([test "x$with_dm" != "xno"],
+-      [LIBBLOCKDEV_CHECK_HEADER([dmraid/dmraid.h], [], [dmraid.h not available])],
+-      [])
+-
+ AS_IF([test "x$with_kbd" != "xno"],
+       [LIBBLOCKDEV_PKG_CHECK_MODULES([KMOD], [libkmod >= 19])],
+       [])
+@@ -154,7 +151,8 @@ AS_IF([test "x$with_fs" != "xno"],
+       [LIBBLOCKDEV_PKG_CHECK_MODULES([MOUNT], [mount >= 2.23.0])
+        # new versions of libmount has some new functions we can use
+        AS_IF([$PKG_CONFIG --atleast-version=2.30.0 mount],
+-             [AC_DEFINE([LIBMOUNT_NEW_ERR_API])], [])
++             [AC_DEFINE([LIBMOUNT_NEW_ERR_API], [1], [new versions of libmount has some new functions we can use])],
++             [])
+ 
+        LIBBLOCKDEV_PKG_CHECK_MODULES([BLKID], [blkid >= 2.23.0])
+        # older versions of libblkid don't support BLKID_SUBLKS_BADCSUM so let's just
+-- 
+1.8.3.1
+
diff --git a/meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch b/meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
new file mode 100644
index 0000000..0719759
--- /dev/null
+++ b/meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
@@ -0,0 +1,30 @@
+From 40dae7ea6450cb30f066da8443eabf063b5b0ad7 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 02:05:40 -0400
+Subject: [PATCH 2/3] remove python2 support
+
+Only python3 is required.
+
+Upstream-Status: Inappropriate [wr-installer specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/python/gi/overrides/Makefile.am | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/python/gi/overrides/Makefile.am b/src/python/gi/overrides/Makefile.am
+index a2927ac..6385502 100644
+--- a/src/python/gi/overrides/Makefile.am
++++ b/src/python/gi/overrides/Makefile.am
+@@ -1,8 +1,3 @@
+-pylibdir = $(shell python -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,prefix='${exec_prefix}'))")
+-
+-overridesdir = $(pylibdir)/gi/overrides
+-dist_overrides_DATA = BlockDev.py
+-
+ if WITH_PYTHON3
+ py3libdir = $(shell python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,prefix='${exec_prefix}'))")
+ py3overridesdir = $(py3libdir)/gi/overrides
+-- 
+1.8.3.1
+
diff --git a/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch b/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
new file mode 100644
index 0000000..3d9cb6d
--- /dev/null
+++ b/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
@@ -0,0 +1,470 @@
+From bda7c937ba544182a5cae2a9cf0c173e0ba268c9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 27 Jul 2017 09:47:23 +0800
+Subject: [PATCH 3/3] remove dmraid while compiling with --with-dm
+
+Fix the following failure:
+
+...
+Perhaps you should add the directory containing `dmraid.pc'
+to the PKG_CONFIG_PATH environment variable
+No package 'dmraid' found
+...
+
+...
+../../../git/src/plugins/dm.c:24:10: fatal error: dmraid/dmraid.h: No
+such file or directory
+ #include <dmraid/dmraid.h>
+          ^~~~~~~~~~~~~~~~~
+...
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/lib/plugin_apis/dm.api          |  41 -----
+ src/plugins/Makefile.am             |   2 +-
+ src/plugins/dm.c                    | 318 ------------------------------------
+ src/plugins/dm.h                    |   5 -
+ src/python/gi/overrides/BlockDev.py |   6 -
+ 5 files changed, 1 insertion(+), 371 deletions(-)
+
+diff --git a/src/lib/plugin_apis/dm.api b/src/lib/plugin_apis/dm.api
+index a885bba..ec86b80 100644
+--- a/src/lib/plugin_apis/dm.api
++++ b/src/lib/plugin_apis/dm.api
+@@ -68,44 +68,3 @@ gchar* bd_dm_node_from_name (const gchar *map_name, GError **error);
+  */
+ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error);
+ 
+-/**
+- * bd_dm_get_member_raid_sets:
+- * @name: (allow-none): name of the member
+- * @uuid: (allow-none): uuid of the member
+- * @major: major number of the device or -1 if not specified
+- * @minor: minor number of the device or -1 if not specified
+- * @error: (out): variable to store error (if any)
+- *
+- * Returns: (transfer full) (array zero-terminated=1): list of names of the RAID sets related to
+- * the member or %NULL in case of error
+- *
+- * One of @name, @uuid or @major:@minor has to be given.
+- */
+-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error);
+-
+-/**
+- * bd_dm_activate_raid_set:
+- * @name: name of the DM RAID set to activate
+- * @error: (out): variable to store error (if any)
+- *
+- * Returns: whether the RAID set @name was successfully activate or not
+- */
+-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error);
+-
+-/**
+- * bd_dm_deactivate_raid_set:
+- * @name: name of the DM RAID set to deactivate
+- * @error: (out): variable to store error (if any)
+- *
+- * Returns: whether the RAID set @name was successfully deactivate or not
+- */
+-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error);
+-
+-/**
+- * bd_dm_get_raid_set_type:
+- * @name: name of the DM RAID set to get the type of
+- * @error: (out): variable to store error (if any)
+- *
+- * Returns: string representation of the @name RAID set's type
+- */
+-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error);
+diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
+index 6c4038f..59dc5e3 100644
+--- a/src/plugins/Makefile.am
++++ b/src/plugins/Makefile.am
+@@ -76,7 +76,7 @@ endif
+ 
+ if WITH_DM
+ libbd_dm_la_CFLAGS = $(GLIB_CFLAGS) $(DEVMAPPER_CFLAGS) $(UDEV_CFLAGS) -Wall -Wextra -Werror
+-libbd_dm_la_LIBADD = $(GLIB_LIBS) $(DEVMAPPER_LIBS) $(UDEV_LIBS) -ldmraid ${builddir}/../utils/libbd_utils.la
++libbd_dm_la_LIBADD = $(GLIB_LIBS) $(DEVMAPPER_LIBS) $(UDEV_LIBS) ${builddir}/../utils/libbd_utils.la
+ libbd_dm_la_LDFLAGS = -L${srcdir}/../utils/ -version-info 2:0:0 -Wl,--no-undefined
+ # Dear author of libdmdraid, VERSION really is not a good name for an enum member!
+ libbd_dm_la_CPPFLAGS = -I${builddir}/../../include/ -UVERSION
+diff --git a/src/plugins/dm.c b/src/plugins/dm.c
+index 9cee742..fd7c7ba 100644
+--- a/src/plugins/dm.c
++++ b/src/plugins/dm.c
+@@ -21,16 +21,10 @@
+ #include <unistd.h>
+ #include <blockdev/utils.h>
+ #include <libdevmapper.h>
+-#include <dmraid/dmraid.h>
+ #include <libudev.h>
+ 
+ #include "dm.h"
+ 
+-/* macros taken from the pyblock/dmraid.h file plus one more*/
+-#define for_each_raidset(_c, _n) list_for_each_entry(_n, LC_RS(_c), list)
+-#define for_each_subset(_rs, _n) list_for_each_entry(_n, &(_rs)->sets, list)
+-#define for_each_device(_rs, _d) list_for_each_entry(_d, &(_rs)->devs, devs)
+-
+ /**
+  * SECTION: dm
+  * @short_description: plugin for basic operations with device mapper
+@@ -286,315 +280,3 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
+     return ret;
+ }
+ 
+-/**
+- * init_dmraid_stack: (skip)
+- *
+- * Initializes the dmraid stack by creating the library context, discovering
+- * devices, raid sets, etc.
+- */
+-static struct lib_context* init_dmraid_stack (GError **error) {
+-    gint rc = 0;
+-    gchar *argv[] = {"blockdev.dmraid", NULL};
+-    struct lib_context *lc;
+-
+-    /* the code for this function was cherry-picked from the pyblock code */
+-    /* XXX: do this all just once, store global lc and provide a reinit
+-     *      function? */
+-
+-    /* initialize dmraid library context */
+-    lc = libdmraid_init (1, (gchar **)argv);
+-
+-    rc = discover_devices (lc, NULL);
+-    if (!rc) {
+-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_FAIL,
+-                     "Failed to discover devices");
+-        libdmraid_exit (lc);
+-        return NULL;
+-    }
+-    discover_raid_devices (lc, NULL);
+-
+-    if (!count_devices (lc, RAID)) {
+-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_NO_DEVS,
+-                     "No RAIDs discovered");
+-        libdmraid_exit (lc);
+-        return NULL;
+-    }
+-
+-    argv[0] = NULL;
+-    if (!group_set (lc, argv)) {
+-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_FAIL,
+-                     "Failed to group_set");
+-        libdmraid_exit (lc);
+-        return NULL;
+-    }
+-
+-    return lc;
+-}
+-
+-/**
+- * raid_dev_matches_spec: (skip)
+- *
+- * Returns: whether the device specified by @sysname matches the spec given by @name,
+- *          @uuid, @major and @minor
+- */
+-static gboolean raid_dev_matches_spec (struct raid_dev *raid_dev, const gchar *name, const gchar *uuid, gint major, gint minor) {
+-    gchar const *dev_name = NULL;
+-    gchar const *dev_uuid;
+-    gchar const *major_str;
+-    gchar const *minor_str;
+-    struct udev *context;
+-    struct udev_device *device;
+-    gboolean ret = TRUE;
+-
+-    /* find the second '/' to get name (the rest of the string) */
+-    dev_name = strchr (raid_dev->di->path, '/');
+-    if (dev_name && strlen (dev_name) > 1) {
+-        dev_name++;
+-        dev_name = strchr (dev_name, '/');
+-    }
+-    if (dev_name && strlen (dev_name) > 1) {
+-        dev_name++;
+-    }
+-    else
+-        dev_name = NULL;
+-
+-    /* if we don't have the name, we cannot check any match */
+-    g_return_val_if_fail (dev_name, FALSE);
+-
+-    if (name && strcmp (dev_name, name) != 0) {
+-        return FALSE;
+-    }
+-
+-    context = udev_new ();
+-    device = udev_device_new_from_subsystem_sysname (context, "block", dev_name);
+-    dev_uuid = udev_device_get_property_value (device, "UUID");
+-    major_str = udev_device_get_property_value (device, "MAJOR");
+-    minor_str = udev_device_get_property_value (device, "MINOR");
+-
+-    if (uuid && (g_strcmp0 (uuid, "") != 0) && (g_strcmp0 (uuid, dev_uuid) != 0))
+-        ret = FALSE;
+-
+-    if (major >= 0 && (atoi (major_str) != major))
+-        ret = FALSE;
+-
+-    if (minor >= 0 && (atoi (minor_str) != minor))
+-        ret = FALSE;
+-
+-    udev_device_unref (device);
+-    udev_unref (context);
+-
+-    return ret;
+-}
+-
+-/**
+- * find_raid_sets_for_dev: (skip)
+- */
+-static void find_raid_sets_for_dev (const gchar *name, const gchar *uuid, gint major, gint minor, struct lib_context *lc, struct raid_set *rs, GPtrArray *ret_sets) {
+-    struct raid_set *subset;
+-    struct raid_dev *dev;
+-
+-    if (T_GROUP(rs) || !list_empty(&(rs->sets))) {
+-        for_each_subset (rs, subset)
+-            find_raid_sets_for_dev (name, uuid, major, minor, lc, subset, ret_sets);
+-    } else {
+-        for_each_device (rs, dev) {
+-            if (raid_dev_matches_spec (dev, name, uuid, major, minor))
+-                g_ptr_array_add (ret_sets, g_strdup (rs->name));
+-        }
+-    }
+-}
+-
+-/**
+- * bd_dm_get_member_raid_sets:
+- * @name: (allow-none): name of the member
+- * @uuid: (allow-none): uuid of the member
+- * @major: major number of the device or -1 if not specified
+- * @minor: minor number of the device or -1 if not specified
+- * @error: (out): variable to store error (if any)
+- *
+- * Returns: (transfer full) (array zero-terminated=1): list of names of the RAID sets related to
+- * the member or %NULL in case of error
+- *
+- * One of @name, @uuid or @major:@minor has to be given.
+- */
+-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error) {
+-    guint64 i = 0;
+-    struct lib_context *lc = NULL;
+-    struct raid_set *rs = NULL;
+-    GPtrArray *ret_sets = g_ptr_array_new ();
+-    gchar **ret = NULL;
+-
+-    lc = init_dmraid_stack (error);
+-    if (!lc)
+-        /* error is already populated */
+-        return NULL;
+-
+-    for_each_raidset (lc, rs) {
+-        find_raid_sets_for_dev (name, uuid, major, minor, lc, rs, ret_sets);
+-    }
+-
+-    /* now create the return value -- NULL-terminated array of strings */
+-    ret = g_new0 (gchar*, ret_sets->len + 1);
+-    for (i=0; i < ret_sets->len; i++)
+-        ret[i] = (gchar*) g_ptr_array_index (ret_sets, i);
+-    ret[i] = NULL;
+-
+-    g_ptr_array_free (ret_sets, FALSE);
+-
+-    libdmraid_exit (lc);
+-    return ret;
+-}
+-
+-/**
+- * find_in_raid_sets: (skip)
+- *
+- * Runs @eval_fn with @data on each set (traversing recursively) and returns the
+- * first RAID set that @eval_fn returns. Thus the @eval_fn should return %NULL
+- * on all RAID sets that don't fulfill the search criteria.
+- */
+-static struct raid_set* find_in_raid_sets (struct raid_set *rs, RSEvalFunc eval_fn, gpointer data) {
+-    struct raid_set *subset = NULL;
+-    struct raid_set *ret = NULL;
+-
+-    ret = eval_fn (rs, data);
+-    if (ret)
+-        return ret;
+-
+-    if (T_GROUP(rs) || !list_empty(&(rs->sets))) {
+-        for_each_subset (rs, subset) {
+-            ret = find_in_raid_sets (subset, eval_fn, data);
+-            if (ret)
+-                return ret;
+-        }
+-    }
+-
+-    return ret;
+-}
+-
+-static struct raid_set* rs_matches_name (struct raid_set *rs, gpointer *name_data) {
+-    gchar *name = (gchar*) name_data;
+-
+-    if (g_strcmp0 (rs->name, name) == 0)
+-        return rs;
+-    else
+-        return NULL;
+-}
+-
+-static gboolean change_set_by_name (const gchar *name, enum activate_type action, GError **error) {
+-    gint rc = 0;
+-    struct lib_context *lc;
+-    struct raid_set *iter_rs;
+-    struct raid_set *match_rs = NULL;
+-
+-    lc = init_dmraid_stack (error);
+-    if (!lc)
+-        /* error is already populated */
+-        return FALSE;
+-
+-    for_each_raidset (lc, iter_rs) {
+-        match_rs = find_in_raid_sets (iter_rs, (RSEvalFunc)rs_matches_name, (gchar *)name);
+-        if (match_rs)
+-            break;
+-    }
+-
+-    if (!match_rs) {
+-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_NO_EXIST,
+-                     "RAID set %s doesn't exist", name);
+-        libdmraid_exit (lc);
+-        return FALSE;
+-    }
+-
+-    rc = change_set (lc, action, match_rs);
+-    if (!rc) {
+-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_FAIL,
+-                     "Failed to activate the RAID set '%s'", name);
+-        libdmraid_exit (lc);
+-        return FALSE;
+-    }
+-
+-    libdmraid_exit (lc);
+-    return TRUE;
+-}
+-
+-/**
+- * bd_dm_activate_raid_set:
+- * @name: name of the DM RAID set to activate
+- * @error: (out): variable to store error (if any)
+- *
+- * Returns: whether the RAID set @name was successfully activate or not
+- */
+-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error) {
+-    guint64 progress_id = 0;
+-    gchar *msg = NULL;
+-    gboolean ret = FALSE;
+-
+-    msg = g_strdup_printf ("Activating DM RAID set '%s'", name);
+-    progress_id = bd_utils_report_started (msg);
+-    g_free (msg);
+-    ret = change_set_by_name (name, A_ACTIVATE, error);
+-    bd_utils_report_finished (progress_id, "Completed");
+-    return ret;
+-}
+-
+-/**
+- * bd_dm_deactivate_raid_set:
+- * @name: name of the DM RAID set to deactivate
+- * @error: (out): variable to store error (if any)
+- *
+- * Returns: whether the RAID set @name was successfully deactivate or not
+- */
+-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error) {
+-    guint64 progress_id = 0;
+-    gchar *msg = NULL;
+-    gboolean ret = FALSE;
+-
+-    msg = g_strdup_printf ("Deactivating DM RAID set '%s'", name);
+-    progress_id = bd_utils_report_started (msg);
+-    g_free (msg);
+-    ret = change_set_by_name (name, A_DEACTIVATE, error);
+-    bd_utils_report_finished (progress_id, "Completed");
+-    return ret;
+-}
+-
+-/**
+- * bd_dm_get_raid_set_type:
+- * @name: name of the DM RAID set to get the type of
+- * @error: (out): variable to store error (if any)
+- *
+- * Returns: string representation of the @name RAID set's type
+- */
+-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error) {
+-    struct lib_context *lc;
+-    struct raid_set *iter_rs;
+-    struct raid_set *match_rs = NULL;
+-    const gchar *type = NULL;
+-
+-    lc = init_dmraid_stack (error);
+-    if (!lc)
+-        /* error is already populated */
+-        return NULL;
+-
+-    for_each_raidset (lc, iter_rs) {
+-        match_rs = find_in_raid_sets (iter_rs, (RSEvalFunc)rs_matches_name, (gchar *)name);
+-        if (match_rs)
+-            break;
+-    }
+-
+-    if (!match_rs) {
+-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_NO_EXIST,
+-                     "RAID set %s doesn't exist", name);
+-        libdmraid_exit (lc);
+-        return NULL;
+-    }
+-
+-    type = get_set_type (lc, match_rs);
+-    if (!type) {
+-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_FAIL,
+-                     "Failed to get RAID set's type");
+-        libdmraid_exit (lc);
+-        return NULL;
+-    }
+-
+-    libdmraid_exit (lc);
+-    return g_strdup (type);
+-}
+diff --git a/src/plugins/dm.h b/src/plugins/dm.h
+index 859fb80..80acd49 100644
+--- a/src/plugins/dm.h
++++ b/src/plugins/dm.h
+@@ -1,5 +1,4 @@
+ #include <glib.h>
+-#include <dmraid/dmraid.h>
+ 
+ #ifndef BD_DM
+ #define BD_DM
+@@ -35,9 +34,5 @@ gboolean bd_dm_remove (const gchar *map_name, GError **error);
+ gchar* bd_dm_name_from_node (const gchar *dm_node, GError **error);
+ gchar* bd_dm_node_from_name (const gchar *map_name, GError **error);
+ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error);
+-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error);
+-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error);
+-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error);
+-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error);
+ 
+ #endif  /* BD_DM */
+diff --git a/src/python/gi/overrides/BlockDev.py b/src/python/gi/overrides/BlockDev.py
+index fb3ffb4..eed0a38 100644
+--- a/src/python/gi/overrides/BlockDev.py
++++ b/src/python/gi/overrides/BlockDev.py
+@@ -233,12 +233,6 @@ def dm_create_linear(map_name, device, length, uuid=None):
+     return _dm_create_linear(map_name, device, length, uuid)
+ __all__.append("dm_create_linear")
+ 
+-_dm_get_member_raid_sets = BlockDev.dm_get_member_raid_sets
+-@override(BlockDev.dm_get_member_raid_sets)
+-def dm_get_member_raid_sets(name=None, uuid=None, major=-1, minor=-1):
+-    return _dm_get_member_raid_sets(name, uuid, major, minor)
+-__all__.append("dm_get_member_raid_sets")
+-
+ 
+ _loop_setup = BlockDev.loop_setup
+ @override(BlockDev.loop_setup)
+-- 
+1.8.3.1
+
diff --git a/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch b/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
new file mode 100644
index 0000000..f18b569
--- /dev/null
+++ b/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
@@ -0,0 +1,50 @@
+From 59fbd57acd1df25b1972a131dc6a77a4fe147729 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 27 Jul 2017 10:45:02 +0800
+Subject: [PATCH] fix compile failure against musl C library
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/plugins/crypto.c | 2 +-
+ src/plugins/part.c   | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
+index 8fbce4f..66e11e5 100644
+--- a/src/plugins/crypto.c
++++ b/src/plugins/crypto.c
+@@ -22,7 +22,7 @@
+ #include <libcryptsetup.h>
+ #include <nss.h>
+ #include <volume_key/libvolume_key.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <linux/random.h>
+ #include <locale.h>
+diff --git a/src/plugins/part.c b/src/plugins/part.c
+index 12d2ef7..3afe297 100644
+--- a/src/plugins/part.c
++++ b/src/plugins/part.c
+@@ -25,6 +25,7 @@
+ #include <inttypes.h>
+ #include <unistd.h>
+ #include <sys/file.h>
++#include <fcntl.h>
+ #include <blockdev/utils.h>
+ #include <part_err.h>
+ 
+@@ -1224,7 +1225,7 @@ static gboolean set_gpt_flags (const gchar *device, int part_num, guint64 flags,
+         real_flags |= 0x4000000000000000; /* 1 << 62 */
+     if (flags & BD_PART_FLAG_GPT_NO_AUTOMOUNT)
+         real_flags |= 0x8000000000000000; /* 1 << 63 */
+-    mask_str = g_strdup_printf ("%.16"__PRI64_PREFIX"x", real_flags);
++    mask_str = g_strdup_printf ("%.16"__PRI64"x", real_flags);
+ 
+     args[2] = g_strdup_printf ("%d:=:%s", part_num, mask_str);
+     g_free (mask_str);
+-- 
+1.8.3.1
+
diff --git a/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb b/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
new file mode 100644
index 0000000..4806dcd
--- /dev/null
+++ b/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
@@ -0,0 +1,50 @@
+DESCRIPTION = "libblockdev is a C library supporting GObject introspection for manipulation of \
+block devices. It has a plugin-based architecture where each technology (like \
+LVM, Btrfs, MD RAID, Swap,...) is implemented in a separate plugin, possibly \
+with multiple implementations (e.g. using LVM CLI or the new LVM DBus API)."
+HOMEPAGE = "http://rhinstaller.github.io/libblockdev/"
+LICENSE = "LGPLv2+"
+SECTION = "devel/lib"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+SRCREV = "c1dda45001542edd7d7f1ffc6451c5a74623f805"
+SRC_URI = "git://github.com/rhinstaller/libblockdev;branch=master \
+           file://0001-fix-configure-and-compile-failures.patch \
+           file://0002-remove-python2-support.patch \
+           file://0003-remove-dmraid-while-compiling-with-with-dm.patch \
+"
+SRC_URI_append_libc-musl = " \
+           file://0004-fix-compile-failure-against-musl-C-library.patch \
+"
+
+inherit autotools python3native gobject-introspection
+
+DEPENDS += " \
+    cryptsetup \
+    nss \
+    volume-key \
+    libbytesize \
+    btrfs-tools \
+"
+RDEPENDS_${PN} += " \
+    lvm2 \
+"
+
+FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}"
+
+PACKAGECONFIG ??= "python3 lvm dm kmod parted fs"
+PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3"
+PACKAGECONFIG[lvm] = "--with-lvm, --without-lvm, multipath-tools"
+PACKAGECONFIG[dm] = "--with-dm, --without-dm"
+PACKAGECONFIG[kmod] = "--with-kbd, --without-kbd, kmod"
+PACKAGECONFIG[parted] = "--with-part, --without-part, parted"
+PACKAGECONFIG[fs] = "--with-fs, --without-fs, util-linux"
+PACKAGECONFIG[doc] = "--with-gtk-doc, --without-gtk-doc, gtk-doc-native"
+
+export STAGING_INCDIR
+export GIR_EXTRA_LIBS_PATH="${B}/src/utils/.libs"
+
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/6] python3-blivet: add recipe 2.2.0
  2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
                   ` (3 preceding siblings ...)
  2017-07-27  8:44 ` [PATCH 4/6] libblockdev: add recipe 2.10 Hongxu Jia
@ 2017-07-27  8:44 ` Hongxu Jia
  2017-08-12  9:08   ` Martin Jansa
  2017-07-27  8:44 ` [PATCH 6/6] python3-blivetgui: add recipe 2.1.5 Hongxu Jia
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2017-07-27  8:44 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../python3-blivet/0001-comment-out-selinux.patch  |  70 ++++++++++++++
 .../0002-run_program-support-timeout.patch         | 102 +++++++++++++++++++++
 .../0003-support-infinit-timeout.patch             |  66 +++++++++++++
 .../0004-Mount-var-volatile-during-install.patch   |  59 ++++++++++++
 .../0005-update-fstab-by-appending.patch           |  32 +++++++
 ...0006-fix-new.roots-object-is-not-iterable.patch |  28 ++++++
 ...correct-timeout-while-system-time-changed.patch |  48 ++++++++++
 .../python3-blivet/0008-tweak-btrfs-packages.patch |  45 +++++++++
 ...0009-invoking-mount-with-infinite-timeout.patch |  31 +++++++
 ...-use-oe-variable-to-replace-hardcoded-dir.patch |  34 +++++++
 .../0011-invoking-fsck-with-infinite-timeout.patch |  31 +++++++
 .../0012-invoking-mkfs-with-infinite-timeout.patch |  31 +++++++
 ...evert-Adapt-to-logging-module-name-change.patch |  30 ++++++
 .../python-blivet/python3-blivet_2.2.0.bb          |  46 ++++++++++
 14 files changed, 653 insertions(+)
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb

diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
new file mode 100644
index 0000000..0ee3205
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
@@ -0,0 +1,70 @@
+From 7d483c27ac0a23ca3bba7f320918afc40013bd8e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 14:25:52 +0800
+Subject: [PATCH 01/13] comment out selinux
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/flags.py | 5 +++--
+ blivet/util.py  | 6 +++++-
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/blivet/flags.py b/blivet/flags.py
+index 06822db..b55a93f 100644
+--- a/blivet/flags.py
++++ b/blivet/flags.py
+@@ -20,7 +20,7 @@
+ #
+ 
+ import shlex
+-import selinux
++#import selinux
+ 
+ 
+ class Flags(object):
+@@ -49,7 +49,8 @@ class Flags(object):
+         #
+         # enable/disable functionality
+         #
+-        self.selinux = selinux.is_selinux_enabled()
++        #self.selinux = selinux.is_selinux_enabled()
++        self.selinux = False
+         self.multipath = True
+         self.dmraid = True
+         self.ibft = True
+diff --git a/blivet/util.py b/blivet/util.py
+index e3e71ce..0cf5188 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -4,7 +4,7 @@ import glob
+ import itertools
+ import os
+ import shutil
+-import selinux
++#import selinux
+ import subprocess
+ import re
+ import sys
+@@ -431,6 +431,8 @@ def get_cow_sysfs_path(dev_path, dev_sysfsPath):
+ def match_path_context(path):
+     """ Return the default SELinux context for the given path. """
+     context = None
++    return context
++
+     try:
+         context = selinux.matchpathcon(os.path.normpath(path), 0)[1]
+     except OSError as e:
+@@ -455,6 +457,8 @@ def set_file_context(path, context, root=None):
+ 
+             True if successful, False if not.
+     """
++    return False
++
+     if root is None:
+         root = '/'
+ 
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
new file mode 100644
index 0000000..01e71be
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
@@ -0,0 +1,102 @@
+From 86744d408b91acdcb086a03d7779fcda152f2ac3 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 14:39:56 +0800
+Subject: [PATCH 02/13] run_program support timeout
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/util.py | 68 +++++++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 39 insertions(+), 29 deletions(-)
+
+diff --git a/blivet/util.py b/blivet/util.py
+index 0cf5188..d4bd9bb 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -158,6 +158,30 @@ class Path(str):
+     def __hash__(self):
+         return self._path.__hash__()
+ 
++def timeout_command(argv, timeout, *args, **kwargs):
++    """call shell-command and either return its output or kill it
++    if it doesn't normally exit within timeout seconds and return None"""
++    import subprocess, datetime, os, time, signal
++    start = datetime.datetime.now()
++
++    try:
++        proc = subprocess.Popen(argv, *args, **kwargs)
++        while proc.poll() is None:
++            time.sleep(0.1)
++            now = datetime.datetime.now()
++            if (now - start).seconds> timeout:
++                os.kill(proc.pid, signal.SIGKILL)
++                os.waitpid(-1, os.WNOHANG)
++                program_log.debug("%d seconds timeout" % timeout)
++                return (-1, None)
++
++
++    except OSError as e:
++        program_log.error("Error running %s: %s", argv[0], e.strerror)
++        raise
++
++    program_log.debug("Return code: %d", proc.returncode)
++    return (proc.returncode, proc.stdout.read())
+ 
+ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False):
+     if env_prune is None:
+@@ -180,36 +204,22 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
+             stderr_dir = subprocess.STDOUT
+         else:
+             stderr_dir = subprocess.PIPE
+-        try:
+-            proc = subprocess.Popen(argv,
+-                                    stdin=stdin,
+-                                    stdout=subprocess.PIPE,
+-                                    stderr=stderr_dir,
+-                                    close_fds=True,
+-                                    preexec_fn=chroot, cwd=root, env=env)
+-
+-            out, err = proc.communicate()
+-            if not binary_output and six.PY3:
+-                out = out.decode("utf-8")
+-            if out:
+-                if not stderr_to_stdout:
+-                    program_log.info("stdout:")
+-                for line in out.splitlines():
+-                    program_log.info("%s", line)
+-
+-            if not stderr_to_stdout and err:
+-                program_log.info("stderr:")
+-                for line in err.splitlines():
+-                    program_log.info("%s", line)
+-
+-        except OSError as e:
+-            program_log.error("Error running %s: %s", argv[0], e.strerror)
+-            raise
+-
+-        program_log.debug("Return code: %d", proc.returncode)
+-
+-    return (proc.returncode, out)
+ 
++        res, out = timeout_command(argv, 10,
++                                   stdin=stdin,
++                                   stdout=subprocess.PIPE,
++                                   stderr=stderr_dir,
++                                   close_fds=True,
++                                   preexec_fn=chroot, cwd=root, env=env)
++        if not binary_output and six.PY3:
++            out = out.decode("utf-8")
++        if out:
++            if not stderr_to_stdout:
++                program_log.info("stdout:")
++            for line in out.splitlines():
++                program_log.info("%s", line)
++
++    return (res, out)
+ 
+ def run_program(*args, **kwargs):
+     return _run_program(*args, **kwargs)[0]
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
new file mode 100644
index 0000000..489fb56
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
@@ -0,0 +1,66 @@
+From 923265e04df5920fc99393aa05f584032aa1b383 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 16:18:02 +0800
+Subject: [PATCH 03/13] support infinit timeout
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/util.py | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/blivet/util.py b/blivet/util.py
+index d4bd9bb..44a2da5 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -158,6 +158,7 @@ class Path(str):
+     def __hash__(self):
+         return self._path.__hash__()
+ 
++# timeout = -1 means infinite timeout, always wait.
+ def timeout_command(argv, timeout, *args, **kwargs):
+     """call shell-command and either return its output or kill it
+     if it doesn't normally exit within timeout seconds and return None"""
+@@ -169,7 +170,7 @@ def timeout_command(argv, timeout, *args, **kwargs):
+         while proc.poll() is None:
+             time.sleep(0.1)
+             now = datetime.datetime.now()
+-            if (now - start).seconds> timeout:
++            if timeout != -1 and (now - start).seconds> timeout:
+                 os.kill(proc.pid, signal.SIGKILL)
+                 os.waitpid(-1, os.WNOHANG)
+                 program_log.debug("%d seconds timeout" % timeout)
+@@ -183,7 +184,7 @@ def timeout_command(argv, timeout, *args, **kwargs):
+     program_log.debug("Return code: %d", proc.returncode)
+     return (proc.returncode, proc.stdout.read())
+ 
+-def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False):
++def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False, timeout=10):
+     if env_prune is None:
+         env_prune = []
+ 
+@@ -192,7 +193,10 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
+             os.chroot(root)
+ 
+     with program_log_lock:  # pylint: disable=not-context-manager
+-        program_log.info("Running... %s", " ".join(argv))
++        if timeout != -1:
++            program_log.info("Running... %s", " ".join(argv))
++        else:
++            program_log.info("Running... %s ...infinite timeout", " ".join(argv))
+ 
+         env = os.environ.copy()
+         env.update({"LC_ALL": "C",
+@@ -205,7 +209,7 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
+         else:
+             stderr_dir = subprocess.PIPE
+ 
+-        res, out = timeout_command(argv, 10,
++        res, out = timeout_command(argv, timeout,
+                                    stdin=stdin,
+                                    stdout=subprocess.PIPE,
+                                    stderr=stderr_dir,
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
new file mode 100644
index 0000000..cb837e2
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
@@ -0,0 +1,59 @@
+From c3959bd00665e24a955bbdbea1ef555e76372f12 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 16:25:16 +0800
+Subject: [PATCH 04/13] Mount /var/volatile during install
+
+The installed system needs /var/volatile clean, otherwise it
+caused systemd's journalctl failed to record boot log.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/osinstall.py | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/blivet/osinstall.py b/blivet/osinstall.py
+index a4f9535..61819c2 100644
+--- a/blivet/osinstall.py
++++ b/blivet/osinstall.py
+@@ -294,6 +294,7 @@ class FSSet(object):
+         self._sysfs = None
+         self._proc = None
+         self._devshm = None
++        self._volatile = None
+         self._usb = None
+         self._selinux = None
+         self._run = None
+@@ -335,6 +336,12 @@ class FSSet(object):
+         return self._devshm
+ 
+     @property
++    def volatile(self):
++        if not self._volatile:
++            self._volatile = NoDevice(fmt=get_format("tmpfs", device="tmpfs", mountpoint="/var/volatile"))
++        return self._volatile
++
++    @property
+     def usb(self):
+         if not self._usb:
+             self._usb = NoDevice(fmt=get_format("usbfs", device="usbfs", mountpoint="/proc/bus/usb"))
+@@ -591,6 +598,7 @@ class FSSet(object):
+ 
+         devices = list(self.mountpoints.values()) + self.swap_devices
+         devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
++                        self.volatile,
+                         self.proc, self.selinux, self.usb, self.run])
+         if isinstance(_platform, EFI):
+             devices.append(self.efivars)
+@@ -650,6 +658,7 @@ class FSSet(object):
+         """ unmount filesystems, except swap if swapoff == False """
+         devices = list(self.mountpoints.values()) + self.swap_devices
+         devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
++                        self.volatile,
+                         self.proc, self.usb, self.selinux, self.run])
+         if isinstance(_platform, EFI):
+             devices.append(self.efivars)
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
new file mode 100644
index 0000000..4f343b7
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
@@ -0,0 +1,32 @@
+From 386ff899763f8473eb93a7a1578fb7cc4f86f66d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 16:28:12 +0800
+Subject: [PATCH 05/13] update fstab by appending
+
+The 'storage.write()' has updated fstab by overwriting
+the original one, we should update fstab by appending
+to keep original tmpfs partitions.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/osinstall.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/osinstall.py b/blivet/osinstall.py
+index 61819c2..afa82db 100644
+--- a/blivet/osinstall.py
++++ b/blivet/osinstall.py
+@@ -728,7 +728,7 @@ class FSSet(object):
+         # /etc/fstab
+         fstab_path = os.path.normpath("%s/etc/fstab" % get_sysroot())
+         fstab = self.fstab()
+-        open(fstab_path, "w").write(fstab)
++        open(fstab_path, "a").write(fstab)
+ 
+         # /etc/crypttab
+         crypttab_path = os.path.normpath("%s/etc/crypttab" % get_sysroot())
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
new file mode 100644
index 0000000..f5ff754
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
@@ -0,0 +1,28 @@
+From cd92eea8fab37ba6b0c7f03daa5255343dc75716 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 16:30:20 +0800
+Subject: [PATCH 06/13] fix new.roots object is not iterable
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/blivet.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/blivet.py b/blivet/blivet.py
+index 6a33e9c..79ae91a 100644
+--- a/blivet/blivet.py
++++ b/blivet/blivet.py
+@@ -1761,7 +1761,7 @@ class Blivet(object):
+             p = partition.disk.format.parted_disk.getPartitionByPath(partition.path)
+             partition.parted_partition = p
+ 
+-        for root in new.roots:
++        for root in new.roots or []:
+             root.swaps = [new.devicetree.get_device_by_id(d.id, hidden=True) for d in root.swaps]
+             root.swaps = [s for s in root.swaps if s]
+ 
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
new file mode 100644
index 0000000..6512d86
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
@@ -0,0 +1,48 @@
+From 78ee2b9090f9400ccc4f730e674f5ae972740ccb Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 26 Aug 2016 02:02:49 -0400
+Subject: [PATCH 07/13] fix incorrect timeout while system time changed
+
+While system time changed by NTP, invoking timeout_command
+breaks with incorrect timeout.
+--------
+|05:40:55,872 INFO program: Running... mount -t ext2 -o
+  defaults,ro /dev/sda2 /mnt/sysimage
+|01:40:55,086 DEBUG program: 10 seconds timeout
+--------
+
+Use numbert count to replace current time count could workaround
+the issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/util.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/blivet/util.py b/blivet/util.py
+index 44a2da5..b3c45ac 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -163,14 +163,14 @@ def timeout_command(argv, timeout, *args, **kwargs):
+     """call shell-command and either return its output or kill it
+     if it doesn't normally exit within timeout seconds and return None"""
+     import subprocess, datetime, os, time, signal
+-    start = datetime.datetime.now()
++    count = 0
+ 
+     try:
+         proc = subprocess.Popen(argv, *args, **kwargs)
+         while proc.poll() is None:
+             time.sleep(0.1)
+-            now = datetime.datetime.now()
+-            if timeout != -1 and (now - start).seconds> timeout:
++            count += 1
++            if timeout != -1 and count > timeout*10:
+                 os.kill(proc.pid, signal.SIGKILL)
+                 os.waitpid(-1, os.WNOHANG)
+                 program_log.debug("%d seconds timeout" % timeout)
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
new file mode 100644
index 0000000..121336e
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
@@ -0,0 +1,45 @@
+From 6f661a511eea096c073888c7adb836a9a880b476 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 16:33:15 +0800
+Subject: [PATCH 08/13] tweak btrfs packages
+
+In oe-cre/yocto, we name btrfs package with btrfs-tools,
+rather than btrfs-progs.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/devices/btrfs.py | 2 +-
+ blivet/formats/fs.py    | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
+index c5cb21f..9d417b2 100644
+--- a/blivet/devices/btrfs.py
++++ b/blivet/devices/btrfs.py
+@@ -55,7 +55,7 @@ class BTRFSDevice(StorageDevice):
+ 
+     """ Base class for BTRFS volume and sub-volume devices. """
+     _type = "btrfs"
+-    _packages = ["btrfs-progs"]
++    _packages = ["btrfs-tools"]
+     _external_dependencies = [availability.BLOCKDEV_BTRFS_PLUGIN]
+ 
+     def __init__(self, *args, **kwargs):
+diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
+index a49826f..e8f216d 100644
+--- a/blivet/formats/fs.py
++++ b/blivet/formats/fs.py
+@@ -918,7 +918,7 @@ class BTRFS(FS):
+     _formattable = True
+     _linux_native = True
+     _supported = True
+-    _packages = ["btrfs-progs"]
++    _packages = ["btrfs-tools"]
+     _min_size = Size("256 MiB")
+     _max_size = Size("16 EiB")
+     _mkfs_class = fsmkfs.BTRFSMkfs
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
new file mode 100644
index 0000000..fc084b1
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From a6ac2157ee6793302e23ddbc5e3b249fa7da5b7e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Aug 2016 21:30:32 -0400
+Subject: [PATCH 09/13] invoking mount with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/util.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/util.py b/blivet/util.py
+index b3c45ac..9f02b18 100644
+--- a/blivet/util.py
++++ b/blivet/util.py
+@@ -257,7 +257,7 @@ def mount(device, mountpoint, fstype, options=None):
+ 
+     argv = ["mount", "-t", fstype, "-o", options, device, mountpoint]
+     try:
+-        rc = run_program(argv)
++        rc = run_program(argv, timeout=-1)
+     except OSError:
+         raise
+ 
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
new file mode 100644
index 0000000..45d8fab
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
@@ -0,0 +1,34 @@
+From e07133dbcf3c52e1ddd2f12797dcd16145269273 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 8 May 2017 03:54:12 -0400
+Subject: [PATCH 10/13] use oe variable to replace hardcoded dir
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ setup.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 4d06a33..a994d06 100644
+--- a/setup.py
++++ b/setup.py
+@@ -61,10 +61,10 @@ class blivet_sdist(sdist):
+ 
+ 
+ data_files = [
+-    ('/etc/dbus-1/system.d', ['dbus/blivet.conf']),
+-    ('/usr/share/dbus-1/system-services', ['dbus/com.redhat.Blivet1.service']),
+-    ('/usr/libexec', ['dbus/blivetd']),
+-    ('/usr/lib/systemd/system', ['dbus/blivet.service'])
++    (os.environ.get('sysconfdir')+'/dbus-1/system.d', ['dbus/blivet.conf']),
++    (os.environ.get('datadir')+'/dbus-1/system-services', ['dbus/com.redhat.Blivet1.service']),
++    (os.environ.get('libexecdir'), ['dbus/blivetd']),
++    (os.environ.get('systemd_system_unitdir'), ['dbus/blivet.service'])
+ ]
+ 
+ 
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
new file mode 100644
index 0000000..c61fe01
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From e9ab4376a18cc1bd413c000b036320833eec80d7 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Jun 2017 16:05:27 +0800
+Subject: [PATCH 11/13] invoking fsck with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/tasks/fsck.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/tasks/fsck.py b/blivet/tasks/fsck.py
+index c4214dc..e13ac6b 100644
+--- a/blivet/tasks/fsck.py
++++ b/blivet/tasks/fsck.py
+@@ -77,7 +77,7 @@ class FSCK(task.BasicApplication, fstask.FSTask):
+             raise FSError("\n".join(error_msgs))
+ 
+         try:
+-            rc = util.run_program(self._fsck_command)
++            rc = util.run_program(self._fsck_command, timeout=-1)
+         except OSError as e:
+             raise FSError("filesystem check failed: %s" % e)
+ 
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
new file mode 100644
index 0000000..33bdbe8
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
@@ -0,0 +1,31 @@
+From 9f5a048181cf29d241d96814e736b8235b3d42b1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 16 Jun 2017 15:43:00 +0800
+Subject: [PATCH 12/13] invoking mkfs with infinite timeout
+
+This large timeout is needed when running on machines with
+lots of disks, or with slow disks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/tasks/fsmkfs.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/tasks/fsmkfs.py b/blivet/tasks/fsmkfs.py
+index ad166aa..7bf5075 100644
+--- a/blivet/tasks/fsmkfs.py
++++ b/blivet/tasks/fsmkfs.py
+@@ -170,7 +170,7 @@ class FSMkfs(task.BasicApplication, FSMkfsTask):
+         options = options or []
+         cmd = self._mkfs_command(options, label, set_uuid)
+         try:
+-            ret = util.run_program(cmd)
++            ret = util.run_program(cmd, timeout=-1)
+         except OSError as e:
+             raise FSError(e)
+ 
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
new file mode 100644
index 0000000..6bdf4ce
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
@@ -0,0 +1,30 @@
+From bfdaf79a2109ac6aed408f0c94f69766991e60e2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 27 Jul 2017 14:34:30 +0800
+Subject: [PATCH 13/13] Revert "Adapt to logging module name change"
+
+Upstream-Status: Inappropriate [oe specific, sync with anaconda f26-release]
+
+This reverts commit c367d62a516e541ad28636c8259321f1c53417ce.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ blivet/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/blivet/__init__.py b/blivet/__init__.py
+index 49277cb..a01e487 100644
+--- a/blivet/__init__.py
++++ b/blivet/__init__.py
+@@ -124,7 +124,7 @@ def enable_installer_mode():
+         from pyanaconda.constants import ROOT_PATH  # pylint: disable=redefined-outer-name,no-name-in-module
+         _storage_root = _sysroot = ROOT_PATH
+ 
+-    from pyanaconda.anaconda_logging import program_log_lock
++    from pyanaconda.anaconda_log import program_log_lock
+     util.program_log_lock = program_log_lock
+ 
+     flags.installer_mode = True
+-- 
+2.7.4
+
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
new file mode 100644
index 0000000..8b9448c
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
@@ -0,0 +1,46 @@
+DESCRIPTION = "A python module for system storage configuration"
+HOMEPAGE = "http://fedoraproject.org/wiki/blivet"
+LICENSE = "LGPLv2+"
+SECTION = "devel/python"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+SRCREV = "39db82f20d8d4904c0c4dc8912e595177c59e091"
+SRC_URI = "git://github.com/rhinstaller/blivet;branch=2.2-devel \
+           file://0001-comment-out-selinux.patch \
+           file://0002-run_program-support-timeout.patch\
+           file://0003-support-infinit-timeout.patch \
+           file://0004-Mount-var-volatile-during-install.patch \
+           file://0005-update-fstab-by-appending.patch \
+           file://0006-fix-new.roots-object-is-not-iterable.patch \
+           file://0007-fix-incorrect-timeout-while-system-time-changed.patch \
+           file://0008-tweak-btrfs-packages.patch \
+           file://0009-invoking-mount-with-infinite-timeout.patch \
+           file://0010-use-oe-variable-to-replace-hardcoded-dir.patch \
+           file://0011-invoking-fsck-with-infinite-timeout.patch \
+           file://0012-invoking-mkfs-with-infinite-timeout.patch \
+           file://0013-Revert-Adapt-to-logging-module-name-change.patch \
+"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+inherit setuptools3 python3native
+
+RDEPENDS_${PN} = "pykickstart python3-pyudev \
+                  parted python3-pyparted multipath-tools \
+                  lsof cryptsetup libblockdev \
+                  libbytesize \
+"
+
+FILES_${PN} += " \
+    ${datadir}/dbus-1/system-services \
+"
+
+inherit systemd
+
+SYSTEMD_AUTO_ENABLE = "disable"
+SYSTEMD_SERVICE_${PN} = "blivet.service"
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 6/6] python3-blivetgui: add recipe 2.1.5
  2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
                   ` (4 preceding siblings ...)
  2017-07-27  8:44 ` [PATCH 5/6] python3-blivet: add recipe 2.2.0 Hongxu Jia
@ 2017-07-27  8:44 ` Hongxu Jia
  2017-07-27  8:51 ` [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
  2017-07-27 13:46 ` Khem Raj
  7 siblings, 0 replies; 15+ messages in thread
From: Hongxu Jia @ 2017-07-27  8:44 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../python-blivet/python3-blivetgui_2.1.5.bb       | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb

diff --git a/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb b/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb
new file mode 100644
index 0000000..ac507ca
--- /dev/null
+++ b/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "GUI tool for storage configuration using blivet library"
+HOMEPAGE = "https://github.com/rhinstaller/blivet-gui"
+LICENSE = "GPLv2+"
+SECTION = "devel/python"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+SRCREV = "52ae8c000843c05abd1d8749f44bbe2e5d891d3d"
+SRC_URI = "git://github.com/rhinstaller/blivet-gui;branch=master \
+"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+inherit setuptools3 python3native
+
+RDEPENDS_${PN} = "python3-pygobject python3 \
+                  python3-blivet gtk+3  \
+                  python3-pid libreport \
+"
+
+FILES_${PN} += " \
+    ${datadir}/* \
+    "
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/6] add 5 recipes and 1 bug fix
  2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
                   ` (5 preceding siblings ...)
  2017-07-27  8:44 ` [PATCH 6/6] python3-blivetgui: add recipe 2.1.5 Hongxu Jia
@ 2017-07-27  8:51 ` Hongxu Jia
  2017-07-27 13:46 ` Khem Raj
  7 siblings, 0 replies; 15+ messages in thread
From: Hongxu Jia @ 2017-07-27  8:51 UTC (permalink / raw)
  To: openembedded-devel

Sorry for missing sublayer prefix in 4~6:

   [meta-oe] libblockdev: add recipe 2.10
   [meta-python] python3-blivet: add recipe 2.2.0
   [meta-python] python3-blivetgui: add recipe 2.1.5

//Hongxu


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/6] add 5 recipes and 1 bug fix
  2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
                   ` (6 preceding siblings ...)
  2017-07-27  8:51 ` [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
@ 2017-07-27 13:46 ` Khem Raj
  2017-07-28  2:02   ` Hongxu Jia
  7 siblings, 1 reply; 15+ messages in thread
From: Khem Raj @ 2017-07-27 13:46 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: openembeded-devel

On Thu, Jul 27, 2017 at 1:44 AM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> Changed in V2:
>
> - s/fix contamination on centos7/fix host contamination on centos7/
>
> //Hongxu
>
> The following changes since commit a3a1ff1d411bcee88ed56caf4c9a7148c4a6e54a:
>
>   usermode: add recipe 1.111 (2017-07-24 21:13:11 -0400)
>
> are available in the git repository at:
>
>   git://git.openembedded.org/openembedded-core-contrib hongxu/add-recipe2
>   http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/add-recipe2
>
> Hongxu Jia (6):
>   glade: fix host contamination on centos7
>   tigervnc: add recipe 1.8.0
>   libreport: add recipe 2.9.1
>   libblockdev: add recipe 2.10
>   python3-blivet: add recipe 2.2.0
>   python3-blivetgui: add recipe 2.1.5see if

can you see if they build with musl too?

>
>  meta-oe/recipes-devtools/glade/glade_3.20.0.bb     |   4 +-
>  .../0001-fix-configure-and-compile-failures.patch  |  79 ++++
>  .../files/0002-remove-python2-support.patch        |  30 ++
>  ...emove-dmraid-while-compiling-with-with-dm.patch | 470 +++++++++++++++++++++
>  ...ix-compile-failure-against-musl-C-library.patch |  50 +++
>  .../libblockdev/libblockdev_2.10.bb                |  50 +++
>  .../0001-Makefile.am-remove-doc-and-apidoc.patch   |  28 ++
>  ...ac-remove-prog-test-of-xmlto-and-asciidoc.patch |  48 +++
>  .../files/0003-without-build-plugins.patch         |  26 ++
>  ...configure.ac-remove-prog-test-of-augparse.patch |  36 ++
>  .../files/0005-remove-python2-support.patch        | 142 +++++++
>  .../recipes-extended/libreport/libreport_2.9.1.bb  |  43 ++
>  .../files/0001-tigervnc-remove-includedir.patch    |  50 +++
>  .../0002-do-not-build-tests-sub-directory.patch    |  29 ++
>  ...missing-dynamic-library-to-FLTK_LIBRARIES.patch |  28 ++
>  ...tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch |  62 +++
>  .../recipes-graphics/tigervnc/tigervnc_1.8.0.bb    | 131 ++++++
>  .../python3-blivet/0001-comment-out-selinux.patch  |  70 +++
>  .../0002-run_program-support-timeout.patch         | 102 +++++
>  .../0003-support-infinit-timeout.patch             |  66 +++
>  .../0004-Mount-var-volatile-during-install.patch   |  59 +++
>  .../0005-update-fstab-by-appending.patch           |  32 ++
>  ...0006-fix-new.roots-object-is-not-iterable.patch |  28 ++
>  ...correct-timeout-while-system-time-changed.patch |  48 +++
>  .../python3-blivet/0008-tweak-btrfs-packages.patch |  45 ++
>  ...0009-invoking-mount-with-infinite-timeout.patch |  31 ++
>  ...-use-oe-variable-to-replace-hardcoded-dir.patch |  34 ++
>  .../0011-invoking-fsck-with-infinite-timeout.patch |  31 ++
>  .../0012-invoking-mkfs-with-infinite-timeout.patch |  31 ++
>  ...evert-Adapt-to-logging-module-name-change.patch |  30 ++
>  .../python-blivet/python3-blivet_2.2.0.bb          |  46 ++
>  .../python-blivet/python3-blivetgui_2.1.5.bb       |  27 ++
>  32 files changed, 1983 insertions(+), 3 deletions(-)
>  create mode 100644 meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
>  create mode 100644 meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
>  create mode 100644 meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
>  create mode 100644 meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
>  create mode 100644 meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
>  create mode 100644 meta-oe/recipes-extended/libreport/files/0001-Makefile.am-remove-doc-and-apidoc.patch
>  create mode 100644 meta-oe/recipes-extended/libreport/files/0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch
>  create mode 100644 meta-oe/recipes-extended/libreport/files/0003-without-build-plugins.patch
>  create mode 100644 meta-oe/recipes-extended/libreport/files/0004-configure.ac-remove-prog-test-of-augparse.patch
>  create mode 100644 meta-oe/recipes-extended/libreport/files/0005-remove-python2-support.patch
>  create mode 100644 meta-oe/recipes-extended/libreport/libreport_2.9.1.bb
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb
>
> --
> 2.8.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/6] add 5 recipes and 1 bug fix
  2017-07-27 13:46 ` Khem Raj
@ 2017-07-28  2:02   ` Hongxu Jia
  2017-07-28  2:46     ` Khem Raj
  0 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2017-07-28  2:02 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

On 2017年07月27日 21:46, Khem Raj wrote:
> On Thu, Jul 27, 2017 at 1:44 AM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>> Changed in V2:
>>
>> - s/fix contamination on centos7/fix host contamination on centos7/
>>
>> //Hongxu
>>
>> The following changes since commit a3a1ff1d411bcee88ed56caf4c9a7148c4a6e54a:
>>
>>    usermode: add recipe 1.111 (2017-07-24 21:13:11 -0400)
>>
>> are available in the git repository at:
>>
>>    git://git.openembedded.org/openembedded-core-contrib hongxu/add-recipe2
>>    http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/add-recipe2
>>
>> Hongxu Jia (6):
>>    glade: fix host contamination on centos7
>>    tigervnc: add recipe 1.8.0
>>    libreport: add recipe 2.9.1
>>    libblockdev: add recipe 2.10
>>    python3-blivet: add recipe 2.2.0
>>    python3-blivetgui: add recipe 2.1.5see if
> can you see if they build with musl too?

Already done, and 1 fix on libblockdev in this RR.

Build targetvnc and glade success with musl.

The libreport, pyton3-blivet and python3-blivetgui is systemd specific
which musl does not support.

//Hongxu

>
>>   meta-oe/recipes-devtools/glade/glade_3.20.0.bb     |   4 +-
>>   .../0001-fix-configure-and-compile-failures.patch  |  79 ++++
>>   .../files/0002-remove-python2-support.patch        |  30 ++
>>   ...emove-dmraid-while-compiling-with-with-dm.patch | 470 +++++++++++++++++++++
>>   ...ix-compile-failure-against-musl-C-library.patch |  50 +++
>>   .../libblockdev/libblockdev_2.10.bb                |  50 +++
>>   .../0001-Makefile.am-remove-doc-and-apidoc.patch   |  28 ++
>>   ...ac-remove-prog-test-of-xmlto-and-asciidoc.patch |  48 +++
>>   .../files/0003-without-build-plugins.patch         |  26 ++
>>   ...configure.ac-remove-prog-test-of-augparse.patch |  36 ++
>>   .../files/0005-remove-python2-support.patch        | 142 +++++++
>>   .../recipes-extended/libreport/libreport_2.9.1.bb  |  43 ++
>>   .../files/0001-tigervnc-remove-includedir.patch    |  50 +++
>>   .../0002-do-not-build-tests-sub-directory.patch    |  29 ++
>>   ...missing-dynamic-library-to-FLTK_LIBRARIES.patch |  28 ++
>>   ...tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch |  62 +++
>>   .../recipes-graphics/tigervnc/tigervnc_1.8.0.bb    | 131 ++++++
>>   .../python3-blivet/0001-comment-out-selinux.patch  |  70 +++
>>   .../0002-run_program-support-timeout.patch         | 102 +++++
>>   .../0003-support-infinit-timeout.patch             |  66 +++
>>   .../0004-Mount-var-volatile-during-install.patch   |  59 +++
>>   .../0005-update-fstab-by-appending.patch           |  32 ++
>>   ...0006-fix-new.roots-object-is-not-iterable.patch |  28 ++
>>   ...correct-timeout-while-system-time-changed.patch |  48 +++
>>   .../python3-blivet/0008-tweak-btrfs-packages.patch |  45 ++
>>   ...0009-invoking-mount-with-infinite-timeout.patch |  31 ++
>>   ...-use-oe-variable-to-replace-hardcoded-dir.patch |  34 ++
>>   .../0011-invoking-fsck-with-infinite-timeout.patch |  31 ++
>>   .../0012-invoking-mkfs-with-infinite-timeout.patch |  31 ++
>>   ...evert-Adapt-to-logging-module-name-change.patch |  30 ++
>>   .../python-blivet/python3-blivet_2.2.0.bb          |  46 ++
>>   .../python-blivet/python3-blivetgui_2.1.5.bb       |  27 ++
>>   32 files changed, 1983 insertions(+), 3 deletions(-)
>>   create mode 100644 meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
>>   create mode 100644 meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
>>   create mode 100644 meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
>>   create mode 100644 meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
>>   create mode 100644 meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
>>   create mode 100644 meta-oe/recipes-extended/libreport/files/0001-Makefile.am-remove-doc-and-apidoc.patch
>>   create mode 100644 meta-oe/recipes-extended/libreport/files/0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch
>>   create mode 100644 meta-oe/recipes-extended/libreport/files/0003-without-build-plugins.patch
>>   create mode 100644 meta-oe/recipes-extended/libreport/files/0004-configure.ac-remove-prog-test-of-augparse.patch
>>   create mode 100644 meta-oe/recipes-extended/libreport/files/0005-remove-python2-support.patch
>>   create mode 100644 meta-oe/recipes-extended/libreport/libreport_2.9.1.bb
>>   create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
>>   create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
>>   create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
>>   create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
>>   create mode 100644 meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
>>   create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb
>>
>> --
>> 2.8.1
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/6] add 5 recipes and 1 bug fix
  2017-07-28  2:02   ` Hongxu Jia
@ 2017-07-28  2:46     ` Khem Raj
  0 siblings, 0 replies; 15+ messages in thread
From: Khem Raj @ 2017-07-28  2:46 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: openembeded-devel

On Thu, Jul 27, 2017 at 7:02 PM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> On 2017年07月27日 21:46, Khem Raj wrote:
>>
>> On Thu, Jul 27, 2017 at 1:44 AM, Hongxu Jia <hongxu.jia@windriver.com>
>> wrote:
>>>
>>> Changed in V2:
>>>
>>> - s/fix contamination on centos7/fix host contamination on centos7/
>>>
>>> //Hongxu
>>>
>>> The following changes since commit
>>> a3a1ff1d411bcee88ed56caf4c9a7148c4a6e54a:
>>>
>>>    usermode: add recipe 1.111 (2017-07-24 21:13:11 -0400)
>>>
>>> are available in the git repository at:
>>>
>>>    git://git.openembedded.org/openembedded-core-contrib
>>> hongxu/add-recipe2
>>>
>>> http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/add-recipe2
>>>
>>> Hongxu Jia (6):
>>>    glade: fix host contamination on centos7
>>>    tigervnc: add recipe 1.8.0
>>>    libreport: add recipe 2.9.1
>>>    libblockdev: add recipe 2.10
>>>    python3-blivet: add recipe 2.2.0
>>>    python3-blivetgui: add recipe 2.1.5see if
>>
>> can you see if they build with musl too?
>
>
> Already done, and 1 fix on libblockdev in this RR.
>
> Build targetvnc and glade success with musl.
>
> The libreport, pyton3-blivet and python3-blivetgui is systemd specific
> which musl does not support.
>

Thanks for confirming.

> //Hongxu
>
>
>>
>>>   meta-oe/recipes-devtools/glade/glade_3.20.0.bb     |   4 +-
>>>   .../0001-fix-configure-and-compile-failures.patch  |  79 ++++
>>>   .../files/0002-remove-python2-support.patch        |  30 ++
>>>   ...emove-dmraid-while-compiling-with-with-dm.patch | 470
>>> +++++++++++++++++++++
>>>   ...ix-compile-failure-against-musl-C-library.patch |  50 +++
>>>   .../libblockdev/libblockdev_2.10.bb                |  50 +++
>>>   .../0001-Makefile.am-remove-doc-and-apidoc.patch   |  28 ++
>>>   ...ac-remove-prog-test-of-xmlto-and-asciidoc.patch |  48 +++
>>>   .../files/0003-without-build-plugins.patch         |  26 ++
>>>   ...configure.ac-remove-prog-test-of-augparse.patch |  36 ++
>>>   .../files/0005-remove-python2-support.patch        | 142 +++++++
>>>   .../recipes-extended/libreport/libreport_2.9.1.bb  |  43 ++
>>>   .../files/0001-tigervnc-remove-includedir.patch    |  50 +++
>>>   .../0002-do-not-build-tests-sub-directory.patch    |  29 ++
>>>   ...missing-dynamic-library-to-FLTK_LIBRARIES.patch |  28 ++
>>>   ...tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch |  62 +++
>>>   .../recipes-graphics/tigervnc/tigervnc_1.8.0.bb    | 131 ++++++
>>>   .../python3-blivet/0001-comment-out-selinux.patch  |  70 +++
>>>   .../0002-run_program-support-timeout.patch         | 102 +++++
>>>   .../0003-support-infinit-timeout.patch             |  66 +++
>>>   .../0004-Mount-var-volatile-during-install.patch   |  59 +++
>>>   .../0005-update-fstab-by-appending.patch           |  32 ++
>>>   ...0006-fix-new.roots-object-is-not-iterable.patch |  28 ++
>>>   ...correct-timeout-while-system-time-changed.patch |  48 +++
>>>   .../python3-blivet/0008-tweak-btrfs-packages.patch |  45 ++
>>>   ...0009-invoking-mount-with-infinite-timeout.patch |  31 ++
>>>   ...-use-oe-variable-to-replace-hardcoded-dir.patch |  34 ++
>>>   .../0011-invoking-fsck-with-infinite-timeout.patch |  31 ++
>>>   .../0012-invoking-mkfs-with-infinite-timeout.patch |  31 ++
>>>   ...evert-Adapt-to-logging-module-name-change.patch |  30 ++
>>>   .../python-blivet/python3-blivet_2.2.0.bb          |  46 ++
>>>   .../python-blivet/python3-blivetgui_2.1.5.bb       |  27 ++
>>>   32 files changed, 1983 insertions(+), 3 deletions(-)
>>>   create mode 100644
>>> meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
>>>   create mode 100644
>>> meta-oe/recipes-extended/libreport/files/0001-Makefile.am-remove-doc-and-apidoc.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libreport/files/0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libreport/files/0003-without-build-plugins.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libreport/files/0004-configure.ac-remove-prog-test-of-augparse.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libreport/files/0005-remove-python2-support.patch
>>>   create mode 100644
>>> meta-oe/recipes-extended/libreport/libreport_2.9.1.bb
>>>   create mode 100644
>>> meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
>>>   create mode 100644
>>> meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
>>>   create mode 100644
>>> meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
>>>   create mode 100644
>>> meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
>>>   create mode 100644 meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
>>>   create mode 100644
>>> meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.5.bb
>>>
>>> --
>>> 2.8.1
>>>
>>> --
>>> _______________________________________________
>>> Openembedded-devel mailing list
>>> Openembedded-devel@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>
>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [meta-oe][PATCH 2/6] tigervnc: add recipe 1.8.0
  2017-07-27  8:44 ` [meta-oe][PATCH 2/6] tigervnc: add recipe 1.8.0 Hongxu Jia
@ 2017-08-09  0:46   ` Khem Raj
  0 siblings, 0 replies; 15+ messages in thread
From: Khem Raj @ 2017-08-09  0:46 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: openembeded-devel

This fails to build with clang, can you backport fixes from

https://github.com/TigerVNC/tigervnc/issues/352


On Thu, Jul 27, 2017 at 1:44 AM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  .../files/0001-tigervnc-remove-includedir.patch    |  50 ++++++++
>  .../0002-do-not-build-tests-sub-directory.patch    |  29 +++++
>  ...missing-dynamic-library-to-FLTK_LIBRARIES.patch |  28 +++++
>  ...tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch |  62 ++++++++++
>  .../recipes-graphics/tigervnc/tigervnc_1.8.0.bb    | 131 +++++++++++++++++++++
>  5 files changed, 300 insertions(+)
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
>  create mode 100644 meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
>
> diff --git a/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch b/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
> new file mode 100644
> index 0000000..12c4376
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/tigervnc/files/0001-tigervnc-remove-includedir.patch
> @@ -0,0 +1,50 @@
> +From 4b423cd2e5e4296abca3be553bf64d8cc287180a Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Thu, 20 Jul 2017 17:09:05 +0800
> +Subject: [PATCH 1/4] tigervnc: remove includedir
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
> +
> +It fixes host contamination
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + unix/xserver/hw/vnc/Makefile.am | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am
> +index 0d6a4ac..854f078 100644
> +--- a/unix/xserver/hw/vnc/Makefile.am
> ++++ b/unix/xserver/hw/vnc/Makefile.am
> +@@ -22,7 +22,7 @@ libvnccommon_la_SOURCES = $(HDRS) \
> +
> + libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
> +       -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_H \
> +-      -I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) ${XSERVERLIBS_CFLAGS} -I$(includedir) \
> ++      -I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) ${XSERVERLIBS_CFLAGS} \
> +       -I$(top_srcdir)/include
> +
> + bin_PROGRAMS = Xvnc
> +@@ -42,7 +42,7 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_MODULE_EXTS \
> +       -UHAVE_CONFIG_H \
> +       -DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
> +       -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common \
> +-      -I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir)
> ++      -I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS}
> +
> + Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
> +       $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11
> +@@ -62,7 +62,7 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_
> +       -I$(top_srcdir)/hw/xfree86/os-support \
> +       -I$(top_srcdir)/hw/xfree86/os-support/bus \
> +       -I$(top_srcdir)/include \
> +-      ${XSERVERLIBS_CFLAGS} -I$(includedir)
> ++      ${XSERVERLIBS_CFLAGS}
> +
> + libvnc_la_LDFLAGS = -module -avoid-version -Wl,-z,now
> +
> +--
> +2.7.4
> +
> diff --git a/meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch b/meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
> new file mode 100644
> index 0000000..4e875ba
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/tigervnc/files/0002-do-not-build-tests-sub-directory.patch
> @@ -0,0 +1,29 @@
> +From c3460d63f0b6cd50b9a64265f420f0439e12a1d5 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Tue, 25 Apr 2017 01:36:44 -0400
> +Subject: [PATCH 2/4] do not build tests sub directory
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + CMakeLists.txt | 3 ---
> + 1 file changed, 3 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 94ec2ef..fb72a00 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -300,9 +300,6 @@ if(BUILD_VIEWER)
> +   add_subdirectory(media)
> + endif()
> +
> +-add_subdirectory(tests)
> +-
> +-
> + include(cmake/BuildPackages.cmake)
> +
> + # uninstall
> +--
> +2.7.4
> +
> diff --git a/meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch b/meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
> new file mode 100644
> index 0000000..cfb84ac
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/tigervnc/files/0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch
> @@ -0,0 +1,28 @@
> +From 6369a5be2af2ed1fa443f40f48deaf318d22713e Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Thu, 20 Jul 2017 05:06:00 -0400
> +Subject: [PATCH 3/4] add missing dynamic library to FLTK_LIBRARIES
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + CMakeLists.txt | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index fb72a00..5732dc8 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -246,6 +246,8 @@ if(UNIX AND NOT APPLE)
> +   endif()
> + endif()
> +
> ++set(FLTK_LIBRARIES ${FLTK_LIBRARIES} -lm -ldl -lpng -ljpeg)
> ++
> + # Check for GNUTLS library
> + option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication" ON)
> + if(ENABLE_GNUTLS)
> +--
> +2.7.4
> +
> diff --git a/meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch b/meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
> new file mode 100644
> index 0000000..97b0a38
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
> @@ -0,0 +1,62 @@
> +From 9563b69640227da2220ee0c39077afb736cc96d1 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Thu, 20 Jul 2017 17:12:17 +0800
> +Subject: [PATCH 4/4] tigervnc: add fPIC option to COMPILE_FLAGS
> +
> +The static libraries in Xregion/network/rdr/rfb were linked by shared
> +library libvnc.so, so we should add fPIC option to COMPILE_FLAGS to fix
> +relocation issue.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + common/Xregion/CMakeLists.txt | 1 +
> + common/network/CMakeLists.txt | 1 +
> + common/rdr/CMakeLists.txt     | 1 +
> + common/rfb/CMakeLists.txt     | 1 +
> + 4 files changed, 4 insertions(+)
> +
> +diff --git a/common/Xregion/CMakeLists.txt b/common/Xregion/CMakeLists.txt
> +index 40ca97e..9411328 100644
> +--- a/common/Xregion/CMakeLists.txt
> ++++ b/common/Xregion/CMakeLists.txt
> +@@ -3,4 +3,5 @@ add_library(Xregion STATIC
> +
> + if(UNIX)
> +   libtool_create_control_file(Xregion)
> ++  set_target_properties(Xregion PROPERTIES COMPILE_FLAGS -fPIC)
> + endif()
> +diff --git a/common/network/CMakeLists.txt b/common/network/CMakeLists.txt
> +index b624c8e..6c06ec9 100644
> +--- a/common/network/CMakeLists.txt
> ++++ b/common/network/CMakeLists.txt
> +@@ -9,4 +9,5 @@ endif()
> +
> + if(UNIX)
> +   libtool_create_control_file(network)
> ++  set_target_properties(network PROPERTIES COMPILE_FLAGS -fPIC)
> + endif()
> +diff --git a/common/rdr/CMakeLists.txt b/common/rdr/CMakeLists.txt
> +index 989ba2f..20f6489 100644
> +--- a/common/rdr/CMakeLists.txt
> ++++ b/common/rdr/CMakeLists.txt
> +@@ -27,4 +27,5 @@ target_link_libraries(rdr ${RDR_LIBRARIES})
> +
> + if(UNIX)
> +   libtool_create_control_file(rdr)
> ++  set_target_properties(rdr PROPERTIES COMPILE_FLAGS -fPIC)
> + endif()
> +diff --git a/common/rfb/CMakeLists.txt b/common/rfb/CMakeLists.txt
> +index 5047e5e..88838ab 100644
> +--- a/common/rfb/CMakeLists.txt
> ++++ b/common/rfb/CMakeLists.txt
> +@@ -98,4 +98,5 @@ target_link_libraries(rfb ${RFB_LIBRARIES})
> +
> + if(UNIX)
> +   libtool_create_control_file(rfb)
> ++  set_target_properties(rfb PROPERTIES COMPILE_FLAGS -fPIC)
> + endif()
> +--
> +2.7.4
> +
> diff --git a/meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
> new file mode 100644
> index 0000000..d15bc9e
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.8.0.bb
> @@ -0,0 +1,131 @@
> +DESCRIPTION = "TigerVNC remote display system"
> +HOMEPAGE = "http://www.tigervnc.com/"
> +LICENSE = "GPLv2+"
> +SECTION = "x11/utils"
> +DEPENDS = "xserver-xorg gnutls jpeg libxtst gettext-native fltk"
> +RDEPENDS_${PN} = "chkconfig coreutils hicolor-icon-theme"
> +
> +LIC_FILES_CHKSUM = "file://LICENCE.TXT;md5=75b02c2872421380bbd47781d2bd75d3"
> +
> +S = "${WORKDIR}/git"
> +
> +inherit distro_features_check
> +REQUIRED_DISTRO_FEATURES = "x11"
> +
> +inherit autotools cmake
> +B = "${S}"
> +
> +SRCREV = "4d6e1b8306a8cca8ad5e15ff8201f6ea24459cfd"
> +
> +SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.8-branch \
> +           file://0001-tigervnc-remove-includedir.patch \
> +           file://0002-do-not-build-tests-sub-directory.patch \
> +           file://0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch \
> +           file://0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch \
> +"
> +
> +# Keep sync with xorg-server in oe-core
> +XORG_PN ?= "xorg-server"
> +XORG_PV ?= "1.19.3"
> +SRC_URI += "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${XORG_PV}.tar.bz2;name=xorg"
> +XORG_S = "${WORKDIR}/${XORG_PN}-${XORG_PV}"
> +SRC_URI[xorg.md5sum] = "015d2fc4b9f2bfe7a626edb63a62c65e"
> +SRC_URI[xorg.sha256sum] = "677a8166e03474719238dfe396ce673c4234735464d6dadf2959b600d20e5a98"
> +
> +# It is the directory containing the Xorg source for the
> +# machine on which you are building TigerVNC.
> +XSERVER_SOURCE_DIR="${S}/unix/xserver"
> +
> +do_patch[postfuncs] += "do_patch_xserver"
> +do_patch_xserver () {
> +    for subdir in Xext xkb GL hw/xquartz/bundle hw/xfree86/common; do
> +        install -d ${XSERVER_SOURCE_DIR}/$subdir
> +    done
> +
> +    for subdir in hw/dmx/doc man doc hw/dmx/doxygen; do
> +        install -d ${XSERVER_SOURCE_DIR}/$subdir
> +    done
> +
> +    sources="hw/xquartz/bundle/cpprules.in man/Xserver.man doc/smartsched \
> +             hw/dmx/doxygen/doxygen.conf.in xserver.ent.in xkb/README.compiled \
> +             hw/xfree86/xorgconf.cpp hw/xfree86/Xorg.sh.in"
> +    for i in ${sources}; do
> +        install -m 0644 ${XORG_S}/$i ${XSERVER_SOURCE_DIR}/$i;
> +    done
> +
> +    cd ${XORG_S}
> +    find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | \
> +    xargs tar cf - | (cd ${XSERVER_SOURCE_DIR} && tar xf -)
> +
> +    cd ${XSERVER_SOURCE_DIR}
> +    xserverpatch="${S}/unix/xserver119.patch"
> +    echo "Apply $xserverpatch"
> +    patch -p1 -b --suffix .vnc < $xserverpatch
> +}
> +
> +EXTRA_OECONF = "--disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
> +        --disable-xwin --disable-xephyr --disable-kdrive --with-pic \
> +        --disable-static --disable-xinerama \
> +        --with-xkb-output=${localstatedir}/lib/xkb \
> +        --disable-glx --disable-dri --disable-dri2 \
> +        --disable-config-hal \
> +        --disable-config-udev \
> +        --without-dtrace \
> +        --disable-unit-tests \
> +        --disable-devel-docs \
> +        --disable-selective-werror \
> +        --disable-xshmfence \
> +        --disable-config-udev \
> +        --disable-dri3 \
> +        --disable-libunwind \
> +        --without-xmlto \
> +        --enable-systemd-logind=no \
> +        --disable-xinerama \
> +        --disable-xwayland \
> +"
> +
> +do_configure_append () {
> +    olddir=`pwd`
> +    cd ${XSERVER_SOURCE_DIR}
> +
> +    rm -rf aclocal-copy/
> +    rm -f aclocal.m4
> +
> +    export ACLOCALDIR="${XSERVER_SOURCE_DIR}/aclocal-copy"
> +    mkdir -p ${ACLOCALDIR}/
> +    if [ -d ${STAGING_DATADIR_NATIVE}/aclocal ]; then
> +        cp-noerror ${STAGING_DATADIR_NATIVE}/aclocal/ ${ACLOCALDIR}/
> +    fi
> +    if [ -d ${STAGING_DATADIR}/aclocal -a "${STAGING_DATADIR_NATIVE}/aclocal" != "${STAGING_DATADIR}/aclocal" ]; then
> +        cp-noerror ${STAGING_DATADIR}/aclocal/ ${ACLOCALDIR}/
> +    fi
> +    ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed."
> +    chmod +x ./configure
> +    ${CACHED_CONFIGUREVARS} ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
> +    cd $olddir
> +}
> +
> +do_compile_append () {
> +    olddir=`pwd`
> +    cd ${XSERVER_SOURCE_DIR}
> +
> +    oe_runmake
> +
> +    cd $olddir
> +}
> +
> +do_install_append() {
> +    olddir=`pwd`
> +    cd ${XSERVER_SOURCE_DIR}/hw/vnc
> +
> +    oe_runmake 'DESTDIR=${D}' install
> +
> +    cd $olddir
> +}
> +
> +FILES_${PN} += " \
> +    ${libdir}/xorg/modules/extensions \
> +    ${datadir}/icons \
> +"
> +
> +FILES_${PN}-dbg += "${libdir}/xorg/modules/extensions/.debug"
> --
> 2.8.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/6] libblockdev: add recipe 2.10
  2017-07-27  8:44 ` [PATCH 4/6] libblockdev: add recipe 2.10 Hongxu Jia
@ 2017-08-09  0:51   ` Khem Raj
  0 siblings, 0 replies; 15+ messages in thread
From: Khem Raj @ 2017-08-09  0:51 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: openembeded-devel

This fails to compile with clang

| ../../../git/src/utils/exec.c:357:25: error: missing field 'events'
initializer [-Werror,-Wmissing-field-initializers]
|     GPollFD fds[2] = {{0}, {0}};
|                         ^
| ../../../git/src/utils/exec.c:357:30: error: missing field 'events'
initializer [-Werror,-Wmissing-field-initializers]
|     GPollFD fds[2] = {{0}, {0}};
|                              ^
| 2 errors generated.


it does not like the old c90 like initializer

On Thu, Jul 27, 2017 at 1:44 AM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  .../0001-fix-configure-and-compile-failures.patch  |  79 ++++
>  .../files/0002-remove-python2-support.patch        |  30 ++
>  ...emove-dmraid-while-compiling-with-with-dm.patch | 470 +++++++++++++++++++++
>  ...ix-compile-failure-against-musl-C-library.patch |  50 +++
>  .../libblockdev/libblockdev_2.10.bb                |  50 +++
>  5 files changed, 679 insertions(+)
>  create mode 100644 meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
>  create mode 100644 meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
>  create mode 100644 meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
>  create mode 100644 meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
>  create mode 100644 meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
>
> diff --git a/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch b/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
> new file mode 100644
> index 0000000..914ee99
> --- /dev/null
> +++ b/meta-oe/recipes-extended/libblockdev/files/0001-fix-configure-and-compile-failures.patch
> @@ -0,0 +1,79 @@
> +From 86686ccbf43c5d9e8c8dc97c66ba09e522050e5e Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Thu, 27 Jul 2017 10:06:24 +0800
> +Subject: [PATCH 1/3] fix configure and compile failures
> +
> +1. Fix do_configure failure
> +---------------------------
> +|Checking header volume_key/libvolume_key.h existence and usability.
> +../tmp/6tvtK.c:1:38: fatal error: volume_key/libvolume_key.h:
> +No such file or directory
> +| #include <volume_key/libvolume_key.h>
> +|Checking header dmraid/dmraid.h existence and usability.../tmp/
> +ktVJ6.c:1:27: fatal error: dmraid/dmraid.h: No such file or directory
> +| #include <dmraid/dmraid.h>
> +---------------------------
> +We explictly add volume_key and dmraid to DEPENDS, do not need
> +configure to test.
> +
> +2. Fix config.h not found
> +Add it to configure.ac
> +
> +3. Correct AC_DEFINE
> +...
> +autoheader: warning: missing template: LIBMOUNT_NEW_ERR_API
> +autoheader: Use AC_DEFINE([LIBMOUNT_NEW_ERR_API], [], [Description])
> +...
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + configure.ac | 10 ++++------
> + 1 file changed, 4 insertions(+), 6 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 0270c99..b7c7368 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -9,6 +9,8 @@ AC_DISABLE_STATIC
> + AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-syntax -Wno-portability])
> + AC_CONFIG_MACRO_DIR([m4])
> +
> ++AC_CONFIG_HEADERS([config.h])
> ++
> + AM_PATH_PYTHON
> +
> + AM_PROG_AR
> +@@ -129,7 +131,6 @@ LIBBLOCKDEV_PKG_CHECK_MODULES([UDEV], [libudev >= 216])
> + AS_IF([test "x$with_crypto" != "xno"],
> +       [LIBBLOCKDEV_PKG_CHECK_MODULES([CRYPTSETUP], [libcryptsetup >= 1.6.7])
> +        LIBBLOCKDEV_PKG_CHECK_MODULES([NSS], [nss >= 3.18.0])
> +-       LIBBLOCKDEV_CHECK_HEADER([volume_key/libvolume_key.h], [$GLIB_CFLAGS $NSS_CFLAGS], [libvolume_key.h not available])
> +       ],
> +       [])
> +
> +@@ -137,10 +138,6 @@ AS_IF([test "x$with_dm" != "xno" -o "x$with_lvm" != "xno" -o "x$with_lvm_dbus" !
> +       [LIBBLOCKDEV_PKG_CHECK_MODULES([DEVMAPPER], [devmapper >= 1.02.93])],
> +       [])
> +
> +-AS_IF([test "x$with_dm" != "xno"],
> +-      [LIBBLOCKDEV_CHECK_HEADER([dmraid/dmraid.h], [], [dmraid.h not available])],
> +-      [])
> +-
> + AS_IF([test "x$with_kbd" != "xno"],
> +       [LIBBLOCKDEV_PKG_CHECK_MODULES([KMOD], [libkmod >= 19])],
> +       [])
> +@@ -154,7 +151,8 @@ AS_IF([test "x$with_fs" != "xno"],
> +       [LIBBLOCKDEV_PKG_CHECK_MODULES([MOUNT], [mount >= 2.23.0])
> +        # new versions of libmount has some new functions we can use
> +        AS_IF([$PKG_CONFIG --atleast-version=2.30.0 mount],
> +-             [AC_DEFINE([LIBMOUNT_NEW_ERR_API])], [])
> ++             [AC_DEFINE([LIBMOUNT_NEW_ERR_API], [1], [new versions of libmount has some new functions we can use])],
> ++             [])
> +
> +        LIBBLOCKDEV_PKG_CHECK_MODULES([BLKID], [blkid >= 2.23.0])
> +        # older versions of libblkid don't support BLKID_SUBLKS_BADCSUM so let's just
> +--
> +1.8.3.1
> +
> diff --git a/meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch b/meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
> new file mode 100644
> index 0000000..0719759
> --- /dev/null
> +++ b/meta-oe/recipes-extended/libblockdev/files/0002-remove-python2-support.patch
> @@ -0,0 +1,30 @@
> +From 40dae7ea6450cb30f066da8443eabf063b5b0ad7 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 02:05:40 -0400
> +Subject: [PATCH 2/3] remove python2 support
> +
> +Only python3 is required.
> +
> +Upstream-Status: Inappropriate [wr-installer specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + src/python/gi/overrides/Makefile.am | 5 -----
> + 1 file changed, 5 deletions(-)
> +
> +diff --git a/src/python/gi/overrides/Makefile.am b/src/python/gi/overrides/Makefile.am
> +index a2927ac..6385502 100644
> +--- a/src/python/gi/overrides/Makefile.am
> ++++ b/src/python/gi/overrides/Makefile.am
> +@@ -1,8 +1,3 @@
> +-pylibdir = $(shell python -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,prefix='${exec_prefix}'))")
> +-
> +-overridesdir = $(pylibdir)/gi/overrides
> +-dist_overrides_DATA = BlockDev.py
> +-
> + if WITH_PYTHON3
> + py3libdir = $(shell python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(1,0,prefix='${exec_prefix}'))")
> + py3overridesdir = $(py3libdir)/gi/overrides
> +--
> +1.8.3.1
> +
> diff --git a/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch b/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
> new file mode 100644
> index 0000000..3d9cb6d
> --- /dev/null
> +++ b/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
> @@ -0,0 +1,470 @@
> +From bda7c937ba544182a5cae2a9cf0c173e0ba268c9 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Thu, 27 Jul 2017 09:47:23 +0800
> +Subject: [PATCH 3/3] remove dmraid while compiling with --with-dm
> +
> +Fix the following failure:
> +
> +...
> +Perhaps you should add the directory containing `dmraid.pc'
> +to the PKG_CONFIG_PATH environment variable
> +No package 'dmraid' found
> +...
> +
> +...
> +../../../git/src/plugins/dm.c:24:10: fatal error: dmraid/dmraid.h: No
> +such file or directory
> + #include <dmraid/dmraid.h>
> +          ^~~~~~~~~~~~~~~~~
> +...
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + src/lib/plugin_apis/dm.api          |  41 -----
> + src/plugins/Makefile.am             |   2 +-
> + src/plugins/dm.c                    | 318 ------------------------------------
> + src/plugins/dm.h                    |   5 -
> + src/python/gi/overrides/BlockDev.py |   6 -
> + 5 files changed, 1 insertion(+), 371 deletions(-)
> +
> +diff --git a/src/lib/plugin_apis/dm.api b/src/lib/plugin_apis/dm.api
> +index a885bba..ec86b80 100644
> +--- a/src/lib/plugin_apis/dm.api
> ++++ b/src/lib/plugin_apis/dm.api
> +@@ -68,44 +68,3 @@ gchar* bd_dm_node_from_name (const gchar *map_name, GError **error);
> +  */
> + gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error);
> +
> +-/**
> +- * bd_dm_get_member_raid_sets:
> +- * @name: (allow-none): name of the member
> +- * @uuid: (allow-none): uuid of the member
> +- * @major: major number of the device or -1 if not specified
> +- * @minor: minor number of the device or -1 if not specified
> +- * @error: (out): variable to store error (if any)
> +- *
> +- * Returns: (transfer full) (array zero-terminated=1): list of names of the RAID sets related to
> +- * the member or %NULL in case of error
> +- *
> +- * One of @name, @uuid or @major:@minor has to be given.
> +- */
> +-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error);
> +-
> +-/**
> +- * bd_dm_activate_raid_set:
> +- * @name: name of the DM RAID set to activate
> +- * @error: (out): variable to store error (if any)
> +- *
> +- * Returns: whether the RAID set @name was successfully activate or not
> +- */
> +-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error);
> +-
> +-/**
> +- * bd_dm_deactivate_raid_set:
> +- * @name: name of the DM RAID set to deactivate
> +- * @error: (out): variable to store error (if any)
> +- *
> +- * Returns: whether the RAID set @name was successfully deactivate or not
> +- */
> +-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error);
> +-
> +-/**
> +- * bd_dm_get_raid_set_type:
> +- * @name: name of the DM RAID set to get the type of
> +- * @error: (out): variable to store error (if any)
> +- *
> +- * Returns: string representation of the @name RAID set's type
> +- */
> +-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error);
> +diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
> +index 6c4038f..59dc5e3 100644
> +--- a/src/plugins/Makefile.am
> ++++ b/src/plugins/Makefile.am
> +@@ -76,7 +76,7 @@ endif
> +
> + if WITH_DM
> + libbd_dm_la_CFLAGS = $(GLIB_CFLAGS) $(DEVMAPPER_CFLAGS) $(UDEV_CFLAGS) -Wall -Wextra -Werror
> +-libbd_dm_la_LIBADD = $(GLIB_LIBS) $(DEVMAPPER_LIBS) $(UDEV_LIBS) -ldmraid ${builddir}/../utils/libbd_utils.la
> ++libbd_dm_la_LIBADD = $(GLIB_LIBS) $(DEVMAPPER_LIBS) $(UDEV_LIBS) ${builddir}/../utils/libbd_utils.la
> + libbd_dm_la_LDFLAGS = -L${srcdir}/../utils/ -version-info 2:0:0 -Wl,--no-undefined
> + # Dear author of libdmdraid, VERSION really is not a good name for an enum member!
> + libbd_dm_la_CPPFLAGS = -I${builddir}/../../include/ -UVERSION
> +diff --git a/src/plugins/dm.c b/src/plugins/dm.c
> +index 9cee742..fd7c7ba 100644
> +--- a/src/plugins/dm.c
> ++++ b/src/plugins/dm.c
> +@@ -21,16 +21,10 @@
> + #include <unistd.h>
> + #include <blockdev/utils.h>
> + #include <libdevmapper.h>
> +-#include <dmraid/dmraid.h>
> + #include <libudev.h>
> +
> + #include "dm.h"
> +
> +-/* macros taken from the pyblock/dmraid.h file plus one more*/
> +-#define for_each_raidset(_c, _n) list_for_each_entry(_n, LC_RS(_c), list)
> +-#define for_each_subset(_rs, _n) list_for_each_entry(_n, &(_rs)->sets, list)
> +-#define for_each_device(_rs, _d) list_for_each_entry(_d, &(_rs)->devs, devs)
> +-
> + /**
> +  * SECTION: dm
> +  * @short_description: plugin for basic operations with device mapper
> +@@ -286,315 +280,3 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
> +     return ret;
> + }
> +
> +-/**
> +- * init_dmraid_stack: (skip)
> +- *
> +- * Initializes the dmraid stack by creating the library context, discovering
> +- * devices, raid sets, etc.
> +- */
> +-static struct lib_context* init_dmraid_stack (GError **error) {
> +-    gint rc = 0;
> +-    gchar *argv[] = {"blockdev.dmraid", NULL};
> +-    struct lib_context *lc;
> +-
> +-    /* the code for this function was cherry-picked from the pyblock code */
> +-    /* XXX: do this all just once, store global lc and provide a reinit
> +-     *      function? */
> +-
> +-    /* initialize dmraid library context */
> +-    lc = libdmraid_init (1, (gchar **)argv);
> +-
> +-    rc = discover_devices (lc, NULL);
> +-    if (!rc) {
> +-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_FAIL,
> +-                     "Failed to discover devices");
> +-        libdmraid_exit (lc);
> +-        return NULL;
> +-    }
> +-    discover_raid_devices (lc, NULL);
> +-
> +-    if (!count_devices (lc, RAID)) {
> +-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_NO_DEVS,
> +-                     "No RAIDs discovered");
> +-        libdmraid_exit (lc);
> +-        return NULL;
> +-    }
> +-
> +-    argv[0] = NULL;
> +-    if (!group_set (lc, argv)) {
> +-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_FAIL,
> +-                     "Failed to group_set");
> +-        libdmraid_exit (lc);
> +-        return NULL;
> +-    }
> +-
> +-    return lc;
> +-}
> +-
> +-/**
> +- * raid_dev_matches_spec: (skip)
> +- *
> +- * Returns: whether the device specified by @sysname matches the spec given by @name,
> +- *          @uuid, @major and @minor
> +- */
> +-static gboolean raid_dev_matches_spec (struct raid_dev *raid_dev, const gchar *name, const gchar *uuid, gint major, gint minor) {
> +-    gchar const *dev_name = NULL;
> +-    gchar const *dev_uuid;
> +-    gchar const *major_str;
> +-    gchar const *minor_str;
> +-    struct udev *context;
> +-    struct udev_device *device;
> +-    gboolean ret = TRUE;
> +-
> +-    /* find the second '/' to get name (the rest of the string) */
> +-    dev_name = strchr (raid_dev->di->path, '/');
> +-    if (dev_name && strlen (dev_name) > 1) {
> +-        dev_name++;
> +-        dev_name = strchr (dev_name, '/');
> +-    }
> +-    if (dev_name && strlen (dev_name) > 1) {
> +-        dev_name++;
> +-    }
> +-    else
> +-        dev_name = NULL;
> +-
> +-    /* if we don't have the name, we cannot check any match */
> +-    g_return_val_if_fail (dev_name, FALSE);
> +-
> +-    if (name && strcmp (dev_name, name) != 0) {
> +-        return FALSE;
> +-    }
> +-
> +-    context = udev_new ();
> +-    device = udev_device_new_from_subsystem_sysname (context, "block", dev_name);
> +-    dev_uuid = udev_device_get_property_value (device, "UUID");
> +-    major_str = udev_device_get_property_value (device, "MAJOR");
> +-    minor_str = udev_device_get_property_value (device, "MINOR");
> +-
> +-    if (uuid && (g_strcmp0 (uuid, "") != 0) && (g_strcmp0 (uuid, dev_uuid) != 0))
> +-        ret = FALSE;
> +-
> +-    if (major >= 0 && (atoi (major_str) != major))
> +-        ret = FALSE;
> +-
> +-    if (minor >= 0 && (atoi (minor_str) != minor))
> +-        ret = FALSE;
> +-
> +-    udev_device_unref (device);
> +-    udev_unref (context);
> +-
> +-    return ret;
> +-}
> +-
> +-/**
> +- * find_raid_sets_for_dev: (skip)
> +- */
> +-static void find_raid_sets_for_dev (const gchar *name, const gchar *uuid, gint major, gint minor, struct lib_context *lc, struct raid_set *rs, GPtrArray *ret_sets) {
> +-    struct raid_set *subset;
> +-    struct raid_dev *dev;
> +-
> +-    if (T_GROUP(rs) || !list_empty(&(rs->sets))) {
> +-        for_each_subset (rs, subset)
> +-            find_raid_sets_for_dev (name, uuid, major, minor, lc, subset, ret_sets);
> +-    } else {
> +-        for_each_device (rs, dev) {
> +-            if (raid_dev_matches_spec (dev, name, uuid, major, minor))
> +-                g_ptr_array_add (ret_sets, g_strdup (rs->name));
> +-        }
> +-    }
> +-}
> +-
> +-/**
> +- * bd_dm_get_member_raid_sets:
> +- * @name: (allow-none): name of the member
> +- * @uuid: (allow-none): uuid of the member
> +- * @major: major number of the device or -1 if not specified
> +- * @minor: minor number of the device or -1 if not specified
> +- * @error: (out): variable to store error (if any)
> +- *
> +- * Returns: (transfer full) (array zero-terminated=1): list of names of the RAID sets related to
> +- * the member or %NULL in case of error
> +- *
> +- * One of @name, @uuid or @major:@minor has to be given.
> +- */
> +-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error) {
> +-    guint64 i = 0;
> +-    struct lib_context *lc = NULL;
> +-    struct raid_set *rs = NULL;
> +-    GPtrArray *ret_sets = g_ptr_array_new ();
> +-    gchar **ret = NULL;
> +-
> +-    lc = init_dmraid_stack (error);
> +-    if (!lc)
> +-        /* error is already populated */
> +-        return NULL;
> +-
> +-    for_each_raidset (lc, rs) {
> +-        find_raid_sets_for_dev (name, uuid, major, minor, lc, rs, ret_sets);
> +-    }
> +-
> +-    /* now create the return value -- NULL-terminated array of strings */
> +-    ret = g_new0 (gchar*, ret_sets->len + 1);
> +-    for (i=0; i < ret_sets->len; i++)
> +-        ret[i] = (gchar*) g_ptr_array_index (ret_sets, i);
> +-    ret[i] = NULL;
> +-
> +-    g_ptr_array_free (ret_sets, FALSE);
> +-
> +-    libdmraid_exit (lc);
> +-    return ret;
> +-}
> +-
> +-/**
> +- * find_in_raid_sets: (skip)
> +- *
> +- * Runs @eval_fn with @data on each set (traversing recursively) and returns the
> +- * first RAID set that @eval_fn returns. Thus the @eval_fn should return %NULL
> +- * on all RAID sets that don't fulfill the search criteria.
> +- */
> +-static struct raid_set* find_in_raid_sets (struct raid_set *rs, RSEvalFunc eval_fn, gpointer data) {
> +-    struct raid_set *subset = NULL;
> +-    struct raid_set *ret = NULL;
> +-
> +-    ret = eval_fn (rs, data);
> +-    if (ret)
> +-        return ret;
> +-
> +-    if (T_GROUP(rs) || !list_empty(&(rs->sets))) {
> +-        for_each_subset (rs, subset) {
> +-            ret = find_in_raid_sets (subset, eval_fn, data);
> +-            if (ret)
> +-                return ret;
> +-        }
> +-    }
> +-
> +-    return ret;
> +-}
> +-
> +-static struct raid_set* rs_matches_name (struct raid_set *rs, gpointer *name_data) {
> +-    gchar *name = (gchar*) name_data;
> +-
> +-    if (g_strcmp0 (rs->name, name) == 0)
> +-        return rs;
> +-    else
> +-        return NULL;
> +-}
> +-
> +-static gboolean change_set_by_name (const gchar *name, enum activate_type action, GError **error) {
> +-    gint rc = 0;
> +-    struct lib_context *lc;
> +-    struct raid_set *iter_rs;
> +-    struct raid_set *match_rs = NULL;
> +-
> +-    lc = init_dmraid_stack (error);
> +-    if (!lc)
> +-        /* error is already populated */
> +-        return FALSE;
> +-
> +-    for_each_raidset (lc, iter_rs) {
> +-        match_rs = find_in_raid_sets (iter_rs, (RSEvalFunc)rs_matches_name, (gchar *)name);
> +-        if (match_rs)
> +-            break;
> +-    }
> +-
> +-    if (!match_rs) {
> +-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_NO_EXIST,
> +-                     "RAID set %s doesn't exist", name);
> +-        libdmraid_exit (lc);
> +-        return FALSE;
> +-    }
> +-
> +-    rc = change_set (lc, action, match_rs);
> +-    if (!rc) {
> +-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_FAIL,
> +-                     "Failed to activate the RAID set '%s'", name);
> +-        libdmraid_exit (lc);
> +-        return FALSE;
> +-    }
> +-
> +-    libdmraid_exit (lc);
> +-    return TRUE;
> +-}
> +-
> +-/**
> +- * bd_dm_activate_raid_set:
> +- * @name: name of the DM RAID set to activate
> +- * @error: (out): variable to store error (if any)
> +- *
> +- * Returns: whether the RAID set @name was successfully activate or not
> +- */
> +-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error) {
> +-    guint64 progress_id = 0;
> +-    gchar *msg = NULL;
> +-    gboolean ret = FALSE;
> +-
> +-    msg = g_strdup_printf ("Activating DM RAID set '%s'", name);
> +-    progress_id = bd_utils_report_started (msg);
> +-    g_free (msg);
> +-    ret = change_set_by_name (name, A_ACTIVATE, error);
> +-    bd_utils_report_finished (progress_id, "Completed");
> +-    return ret;
> +-}
> +-
> +-/**
> +- * bd_dm_deactivate_raid_set:
> +- * @name: name of the DM RAID set to deactivate
> +- * @error: (out): variable to store error (if any)
> +- *
> +- * Returns: whether the RAID set @name was successfully deactivate or not
> +- */
> +-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error) {
> +-    guint64 progress_id = 0;
> +-    gchar *msg = NULL;
> +-    gboolean ret = FALSE;
> +-
> +-    msg = g_strdup_printf ("Deactivating DM RAID set '%s'", name);
> +-    progress_id = bd_utils_report_started (msg);
> +-    g_free (msg);
> +-    ret = change_set_by_name (name, A_DEACTIVATE, error);
> +-    bd_utils_report_finished (progress_id, "Completed");
> +-    return ret;
> +-}
> +-
> +-/**
> +- * bd_dm_get_raid_set_type:
> +- * @name: name of the DM RAID set to get the type of
> +- * @error: (out): variable to store error (if any)
> +- *
> +- * Returns: string representation of the @name RAID set's type
> +- */
> +-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error) {
> +-    struct lib_context *lc;
> +-    struct raid_set *iter_rs;
> +-    struct raid_set *match_rs = NULL;
> +-    const gchar *type = NULL;
> +-
> +-    lc = init_dmraid_stack (error);
> +-    if (!lc)
> +-        /* error is already populated */
> +-        return NULL;
> +-
> +-    for_each_raidset (lc, iter_rs) {
> +-        match_rs = find_in_raid_sets (iter_rs, (RSEvalFunc)rs_matches_name, (gchar *)name);
> +-        if (match_rs)
> +-            break;
> +-    }
> +-
> +-    if (!match_rs) {
> +-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_NO_EXIST,
> +-                     "RAID set %s doesn't exist", name);
> +-        libdmraid_exit (lc);
> +-        return NULL;
> +-    }
> +-
> +-    type = get_set_type (lc, match_rs);
> +-    if (!type) {
> +-        g_set_error (error, BD_DM_ERROR, BD_DM_ERROR_RAID_FAIL,
> +-                     "Failed to get RAID set's type");
> +-        libdmraid_exit (lc);
> +-        return NULL;
> +-    }
> +-
> +-    libdmraid_exit (lc);
> +-    return g_strdup (type);
> +-}
> +diff --git a/src/plugins/dm.h b/src/plugins/dm.h
> +index 859fb80..80acd49 100644
> +--- a/src/plugins/dm.h
> ++++ b/src/plugins/dm.h
> +@@ -1,5 +1,4 @@
> + #include <glib.h>
> +-#include <dmraid/dmraid.h>
> +
> + #ifndef BD_DM
> + #define BD_DM
> +@@ -35,9 +34,5 @@ gboolean bd_dm_remove (const gchar *map_name, GError **error);
> + gchar* bd_dm_name_from_node (const gchar *dm_node, GError **error);
> + gchar* bd_dm_node_from_name (const gchar *map_name, GError **error);
> + gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error);
> +-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error);
> +-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error);
> +-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error);
> +-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error);
> +
> + #endif  /* BD_DM */
> +diff --git a/src/python/gi/overrides/BlockDev.py b/src/python/gi/overrides/BlockDev.py
> +index fb3ffb4..eed0a38 100644
> +--- a/src/python/gi/overrides/BlockDev.py
> ++++ b/src/python/gi/overrides/BlockDev.py
> +@@ -233,12 +233,6 @@ def dm_create_linear(map_name, device, length, uuid=None):
> +     return _dm_create_linear(map_name, device, length, uuid)
> + __all__.append("dm_create_linear")
> +
> +-_dm_get_member_raid_sets = BlockDev.dm_get_member_raid_sets
> +-@override(BlockDev.dm_get_member_raid_sets)
> +-def dm_get_member_raid_sets(name=None, uuid=None, major=-1, minor=-1):
> +-    return _dm_get_member_raid_sets(name, uuid, major, minor)
> +-__all__.append("dm_get_member_raid_sets")
> +-
> +
> + _loop_setup = BlockDev.loop_setup
> + @override(BlockDev.loop_setup)
> +--
> +1.8.3.1
> +
> diff --git a/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch b/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
> new file mode 100644
> index 0000000..f18b569
> --- /dev/null
> +++ b/meta-oe/recipes-extended/libblockdev/files/0004-fix-compile-failure-against-musl-C-library.patch
> @@ -0,0 +1,50 @@
> +From 59fbd57acd1df25b1972a131dc6a77a4fe147729 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Thu, 27 Jul 2017 10:45:02 +0800
> +Subject: [PATCH] fix compile failure against musl C library
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + src/plugins/crypto.c | 2 +-
> + src/plugins/part.c   | 3 ++-
> + 2 files changed, 3 insertions(+), 2 deletions(-)
> +
> +diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
> +index 8fbce4f..66e11e5 100644
> +--- a/src/plugins/crypto.c
> ++++ b/src/plugins/crypto.c
> +@@ -22,7 +22,7 @@
> + #include <libcryptsetup.h>
> + #include <nss.h>
> + #include <volume_key/libvolume_key.h>
> +-#include <sys/fcntl.h>
> ++#include <fcntl.h>
> + #include <sys/ioctl.h>
> + #include <linux/random.h>
> + #include <locale.h>
> +diff --git a/src/plugins/part.c b/src/plugins/part.c
> +index 12d2ef7..3afe297 100644
> +--- a/src/plugins/part.c
> ++++ b/src/plugins/part.c
> +@@ -25,6 +25,7 @@
> + #include <inttypes.h>
> + #include <unistd.h>
> + #include <sys/file.h>
> ++#include <fcntl.h>
> + #include <blockdev/utils.h>
> + #include <part_err.h>
> +
> +@@ -1224,7 +1225,7 @@ static gboolean set_gpt_flags (const gchar *device, int part_num, guint64 flags,
> +         real_flags |= 0x4000000000000000; /* 1 << 62 */
> +     if (flags & BD_PART_FLAG_GPT_NO_AUTOMOUNT)
> +         real_flags |= 0x8000000000000000; /* 1 << 63 */
> +-    mask_str = g_strdup_printf ("%.16"__PRI64_PREFIX"x", real_flags);
> ++    mask_str = g_strdup_printf ("%.16"__PRI64"x", real_flags);
> +
> +     args[2] = g_strdup_printf ("%d:=:%s", part_num, mask_str);
> +     g_free (mask_str);
> +--
> +1.8.3.1
> +
> diff --git a/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb b/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
> new file mode 100644
> index 0000000..4806dcd
> --- /dev/null
> +++ b/meta-oe/recipes-extended/libblockdev/libblockdev_2.10.bb
> @@ -0,0 +1,50 @@
> +DESCRIPTION = "libblockdev is a C library supporting GObject introspection for manipulation of \
> +block devices. It has a plugin-based architecture where each technology (like \
> +LVM, Btrfs, MD RAID, Swap,...) is implemented in a separate plugin, possibly \
> +with multiple implementations (e.g. using LVM CLI or the new LVM DBus API)."
> +HOMEPAGE = "http://rhinstaller.github.io/libblockdev/"
> +LICENSE = "LGPLv2+"
> +SECTION = "devel/lib"
> +
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c"
> +
> +S = "${WORKDIR}/git"
> +B = "${S}"
> +
> +SRCREV = "c1dda45001542edd7d7f1ffc6451c5a74623f805"
> +SRC_URI = "git://github.com/rhinstaller/libblockdev;branch=master \
> +           file://0001-fix-configure-and-compile-failures.patch \
> +           file://0002-remove-python2-support.patch \
> +           file://0003-remove-dmraid-while-compiling-with-with-dm.patch \
> +"
> +SRC_URI_append_libc-musl = " \
> +           file://0004-fix-compile-failure-against-musl-C-library.patch \
> +"
> +
> +inherit autotools python3native gobject-introspection
> +
> +DEPENDS += " \
> +    cryptsetup \
> +    nss \
> +    volume-key \
> +    libbytesize \
> +    btrfs-tools \
> +"
> +RDEPENDS_${PN} += " \
> +    lvm2 \
> +"
> +
> +FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}"
> +
> +PACKAGECONFIG ??= "python3 lvm dm kmod parted fs"
> +PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3"
> +PACKAGECONFIG[lvm] = "--with-lvm, --without-lvm, multipath-tools"
> +PACKAGECONFIG[dm] = "--with-dm, --without-dm"
> +PACKAGECONFIG[kmod] = "--with-kbd, --without-kbd, kmod"
> +PACKAGECONFIG[parted] = "--with-part, --without-part, parted"
> +PACKAGECONFIG[fs] = "--with-fs, --without-fs, util-linux"
> +PACKAGECONFIG[doc] = "--with-gtk-doc, --without-gtk-doc, gtk-doc-native"
> +
> +export STAGING_INCDIR
> +export GIR_EXTRA_LIBS_PATH="${B}/src/utils/.libs"
> +
> --
> 2.8.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 5/6] python3-blivet: add recipe 2.2.0
  2017-07-27  8:44 ` [PATCH 5/6] python3-blivet: add recipe 2.2.0 Hongxu Jia
@ 2017-08-12  9:08   ` Martin Jansa
  2017-08-14  1:24     ` Hongxu Jia
  0 siblings, 1 reply; 15+ messages in thread
From: Martin Jansa @ 2017-08-12  9:08 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 33581 bytes --]

On Thu, Jul 27, 2017 at 04:44:25AM -0400, Hongxu Jia wrote:
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  .../python3-blivet/0001-comment-out-selinux.patch  |  70 ++++++++++++++
>  .../0002-run_program-support-timeout.patch         | 102 +++++++++++++++++++++
>  .../0003-support-infinit-timeout.patch             |  66 +++++++++++++
>  .../0004-Mount-var-volatile-during-install.patch   |  59 ++++++++++++
>  .../0005-update-fstab-by-appending.patch           |  32 +++++++
>  ...0006-fix-new.roots-object-is-not-iterable.patch |  28 ++++++
>  ...correct-timeout-while-system-time-changed.patch |  48 ++++++++++
>  .../python3-blivet/0008-tweak-btrfs-packages.patch |  45 +++++++++
>  ...0009-invoking-mount-with-infinite-timeout.patch |  31 +++++++
>  ...-use-oe-variable-to-replace-hardcoded-dir.patch |  34 +++++++
>  .../0011-invoking-fsck-with-infinite-timeout.patch |  31 +++++++
>  .../0012-invoking-mkfs-with-infinite-timeout.patch |  31 +++++++
>  ...evert-Adapt-to-logging-module-name-change.patch |  30 ++++++
>  .../python-blivet/python3-blivet_2.2.0.bb          |  46 ++++++++++
>  14 files changed, 653 insertions(+)
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
>  create mode 100644 meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
> 
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
> new file mode 100644
> index 0000000..0ee3205
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0001-comment-out-selinux.patch
> @@ -0,0 +1,70 @@
> +From 7d483c27ac0a23ca3bba7f320918afc40013bd8e Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 14:25:52 +0800
> +Subject: [PATCH 01/13] comment out selinux
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/flags.py | 5 +++--
> + blivet/util.py  | 6 +++++-
> + 2 files changed, 8 insertions(+), 3 deletions(-)
> +
> +diff --git a/blivet/flags.py b/blivet/flags.py
> +index 06822db..b55a93f 100644
> +--- a/blivet/flags.py
> ++++ b/blivet/flags.py
> +@@ -20,7 +20,7 @@
> + #
> + 
> + import shlex
> +-import selinux
> ++#import selinux
> + 
> + 
> + class Flags(object):
> +@@ -49,7 +49,8 @@ class Flags(object):
> +         #
> +         # enable/disable functionality
> +         #
> +-        self.selinux = selinux.is_selinux_enabled()
> ++        #self.selinux = selinux.is_selinux_enabled()
> ++        self.selinux = False
> +         self.multipath = True
> +         self.dmraid = True
> +         self.ibft = True
> +diff --git a/blivet/util.py b/blivet/util.py
> +index e3e71ce..0cf5188 100644
> +--- a/blivet/util.py
> ++++ b/blivet/util.py
> +@@ -4,7 +4,7 @@ import glob
> + import itertools
> + import os
> + import shutil
> +-import selinux
> ++#import selinux
> + import subprocess
> + import re
> + import sys
> +@@ -431,6 +431,8 @@ def get_cow_sysfs_path(dev_path, dev_sysfsPath):
> + def match_path_context(path):
> +     """ Return the default SELinux context for the given path. """
> +     context = None
> ++    return context
> ++
> +     try:
> +         context = selinux.matchpathcon(os.path.normpath(path), 0)[1]
> +     except OSError as e:
> +@@ -455,6 +457,8 @@ def set_file_context(path, context, root=None):
> + 
> +             True if successful, False if not.
> +     """
> ++    return False
> ++
> +     if root is None:
> +         root = '/'
> + 
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
> new file mode 100644
> index 0000000..01e71be
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch
> @@ -0,0 +1,102 @@
> +From 86744d408b91acdcb086a03d7779fcda152f2ac3 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 14:39:56 +0800
> +Subject: [PATCH 02/13] run_program support timeout
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/util.py | 68 +++++++++++++++++++++++++++++++++-------------------------
> + 1 file changed, 39 insertions(+), 29 deletions(-)
> +
> +diff --git a/blivet/util.py b/blivet/util.py
> +index 0cf5188..d4bd9bb 100644
> +--- a/blivet/util.py
> ++++ b/blivet/util.py
> +@@ -158,6 +158,30 @@ class Path(str):
> +     def __hash__(self):
> +         return self._path.__hash__()
> + 
> ++def timeout_command(argv, timeout, *args, **kwargs):
> ++    """call shell-command and either return its output or kill it
> ++    if it doesn't normally exit within timeout seconds and return None"""
> ++    import subprocess, datetime, os, time, signal
> ++    start = datetime.datetime.now()
> ++
> ++    try:
> ++        proc = subprocess.Popen(argv, *args, **kwargs)
> ++        while proc.poll() is None:
> ++            time.sleep(0.1)
> ++            now = datetime.datetime.now()
> ++            if (now - start).seconds> timeout:
> ++                os.kill(proc.pid, signal.SIGKILL)
> ++                os.waitpid(-1, os.WNOHANG)
> ++                program_log.debug("%d seconds timeout" % timeout)
> ++                return (-1, None)
> ++
> ++
> ++    except OSError as e:
> ++        program_log.error("Error running %s: %s", argv[0], e.strerror)
> ++        raise
> ++
> ++    program_log.debug("Return code: %d", proc.returncode)
> ++    return (proc.returncode, proc.stdout.read())
> + 
> + def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False):
> +     if env_prune is None:
> +@@ -180,36 +204,22 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
> +             stderr_dir = subprocess.STDOUT
> +         else:
> +             stderr_dir = subprocess.PIPE
> +-        try:
> +-            proc = subprocess.Popen(argv,
> +-                                    stdin=stdin,
> +-                                    stdout=subprocess.PIPE,
> +-                                    stderr=stderr_dir,
> +-                                    close_fds=True,
> +-                                    preexec_fn=chroot, cwd=root, env=env)
> +-
> +-            out, err = proc.communicate()
> +-            if not binary_output and six.PY3:
> +-                out = out.decode("utf-8")
> +-            if out:
> +-                if not stderr_to_stdout:
> +-                    program_log.info("stdout:")
> +-                for line in out.splitlines():
> +-                    program_log.info("%s", line)
> +-
> +-            if not stderr_to_stdout and err:
> +-                program_log.info("stderr:")
> +-                for line in err.splitlines():
> +-                    program_log.info("%s", line)
> +-
> +-        except OSError as e:
> +-            program_log.error("Error running %s: %s", argv[0], e.strerror)
> +-            raise
> +-
> +-        program_log.debug("Return code: %d", proc.returncode)
> +-
> +-    return (proc.returncode, out)
> + 
> ++        res, out = timeout_command(argv, 10,
> ++                                   stdin=stdin,
> ++                                   stdout=subprocess.PIPE,
> ++                                   stderr=stderr_dir,
> ++                                   close_fds=True,
> ++                                   preexec_fn=chroot, cwd=root, env=env)
> ++        if not binary_output and six.PY3:
> ++            out = out.decode("utf-8")
> ++        if out:
> ++            if not stderr_to_stdout:
> ++                program_log.info("stdout:")
> ++            for line in out.splitlines():
> ++                program_log.info("%s", line)
> ++
> ++    return (res, out)
> + 
> + def run_program(*args, **kwargs):
> +     return _run_program(*args, **kwargs)[0]
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
> new file mode 100644
> index 0000000..489fb56
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0003-support-infinit-timeout.patch
> @@ -0,0 +1,66 @@
> +From 923265e04df5920fc99393aa05f584032aa1b383 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 16:18:02 +0800
> +Subject: [PATCH 03/13] support infinit timeout
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/util.py | 12 ++++++++----
> + 1 file changed, 8 insertions(+), 4 deletions(-)
> +
> +diff --git a/blivet/util.py b/blivet/util.py
> +index d4bd9bb..44a2da5 100644
> +--- a/blivet/util.py
> ++++ b/blivet/util.py
> +@@ -158,6 +158,7 @@ class Path(str):
> +     def __hash__(self):
> +         return self._path.__hash__()
> + 
> ++# timeout = -1 means infinite timeout, always wait.
> + def timeout_command(argv, timeout, *args, **kwargs):
> +     """call shell-command and either return its output or kill it
> +     if it doesn't normally exit within timeout seconds and return None"""
> +@@ -169,7 +170,7 @@ def timeout_command(argv, timeout, *args, **kwargs):
> +         while proc.poll() is None:
> +             time.sleep(0.1)
> +             now = datetime.datetime.now()
> +-            if (now - start).seconds> timeout:
> ++            if timeout != -1 and (now - start).seconds> timeout:
> +                 os.kill(proc.pid, signal.SIGKILL)
> +                 os.waitpid(-1, os.WNOHANG)
> +                 program_log.debug("%d seconds timeout" % timeout)
> +@@ -183,7 +184,7 @@ def timeout_command(argv, timeout, *args, **kwargs):
> +     program_log.debug("Return code: %d", proc.returncode)
> +     return (proc.returncode, proc.stdout.read())
> + 
> +-def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False):
> ++def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False, timeout=10):
> +     if env_prune is None:
> +         env_prune = []
> + 
> +@@ -192,7 +193,10 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
> +             os.chroot(root)
> + 
> +     with program_log_lock:  # pylint: disable=not-context-manager
> +-        program_log.info("Running... %s", " ".join(argv))
> ++        if timeout != -1:
> ++            program_log.info("Running... %s", " ".join(argv))
> ++        else:
> ++            program_log.info("Running... %s ...infinite timeout", " ".join(argv))
> + 
> +         env = os.environ.copy()
> +         env.update({"LC_ALL": "C",
> +@@ -205,7 +209,7 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
> +         else:
> +             stderr_dir = subprocess.PIPE
> + 
> +-        res, out = timeout_command(argv, 10,
> ++        res, out = timeout_command(argv, timeout,
> +                                    stdin=stdin,
> +                                    stdout=subprocess.PIPE,
> +                                    stderr=stderr_dir,
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
> new file mode 100644
> index 0000000..cb837e2
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0004-Mount-var-volatile-during-install.patch
> @@ -0,0 +1,59 @@
> +From c3959bd00665e24a955bbdbea1ef555e76372f12 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 16:25:16 +0800
> +Subject: [PATCH 04/13] Mount /var/volatile during install
> +
> +The installed system needs /var/volatile clean, otherwise it
> +caused systemd's journalctl failed to record boot log.
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/osinstall.py | 9 +++++++++
> + 1 file changed, 9 insertions(+)
> +
> +diff --git a/blivet/osinstall.py b/blivet/osinstall.py
> +index a4f9535..61819c2 100644
> +--- a/blivet/osinstall.py
> ++++ b/blivet/osinstall.py
> +@@ -294,6 +294,7 @@ class FSSet(object):
> +         self._sysfs = None
> +         self._proc = None
> +         self._devshm = None
> ++        self._volatile = None
> +         self._usb = None
> +         self._selinux = None
> +         self._run = None
> +@@ -335,6 +336,12 @@ class FSSet(object):
> +         return self._devshm
> + 
> +     @property
> ++    def volatile(self):
> ++        if not self._volatile:
> ++            self._volatile = NoDevice(fmt=get_format("tmpfs", device="tmpfs", mountpoint="/var/volatile"))
> ++        return self._volatile
> ++
> ++    @property
> +     def usb(self):
> +         if not self._usb:
> +             self._usb = NoDevice(fmt=get_format("usbfs", device="usbfs", mountpoint="/proc/bus/usb"))
> +@@ -591,6 +598,7 @@ class FSSet(object):
> + 
> +         devices = list(self.mountpoints.values()) + self.swap_devices
> +         devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
> ++                        self.volatile,
> +                         self.proc, self.selinux, self.usb, self.run])
> +         if isinstance(_platform, EFI):
> +             devices.append(self.efivars)
> +@@ -650,6 +658,7 @@ class FSSet(object):
> +         """ unmount filesystems, except swap if swapoff == False """
> +         devices = list(self.mountpoints.values()) + self.swap_devices
> +         devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
> ++                        self.volatile,
> +                         self.proc, self.usb, self.selinux, self.run])
> +         if isinstance(_platform, EFI):
> +             devices.append(self.efivars)
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
> new file mode 100644
> index 0000000..4f343b7
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0005-update-fstab-by-appending.patch
> @@ -0,0 +1,32 @@
> +From 386ff899763f8473eb93a7a1578fb7cc4f86f66d Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 16:28:12 +0800
> +Subject: [PATCH 05/13] update fstab by appending
> +
> +The 'storage.write()' has updated fstab by overwriting
> +the original one, we should update fstab by appending
> +to keep original tmpfs partitions.
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/osinstall.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/blivet/osinstall.py b/blivet/osinstall.py
> +index 61819c2..afa82db 100644
> +--- a/blivet/osinstall.py
> ++++ b/blivet/osinstall.py
> +@@ -728,7 +728,7 @@ class FSSet(object):
> +         # /etc/fstab
> +         fstab_path = os.path.normpath("%s/etc/fstab" % get_sysroot())
> +         fstab = self.fstab()
> +-        open(fstab_path, "w").write(fstab)
> ++        open(fstab_path, "a").write(fstab)
> + 
> +         # /etc/crypttab
> +         crypttab_path = os.path.normpath("%s/etc/crypttab" % get_sysroot())
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
> new file mode 100644
> index 0000000..f5ff754
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0006-fix-new.roots-object-is-not-iterable.patch
> @@ -0,0 +1,28 @@
> +From cd92eea8fab37ba6b0c7f03daa5255343dc75716 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 16:30:20 +0800
> +Subject: [PATCH 06/13] fix new.roots object is not iterable
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/blivet.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/blivet/blivet.py b/blivet/blivet.py
> +index 6a33e9c..79ae91a 100644
> +--- a/blivet/blivet.py
> ++++ b/blivet/blivet.py
> +@@ -1761,7 +1761,7 @@ class Blivet(object):
> +             p = partition.disk.format.parted_disk.getPartitionByPath(partition.path)
> +             partition.parted_partition = p
> + 
> +-        for root in new.roots:
> ++        for root in new.roots or []:
> +             root.swaps = [new.devicetree.get_device_by_id(d.id, hidden=True) for d in root.swaps]
> +             root.swaps = [s for s in root.swaps if s]
> + 
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
> new file mode 100644
> index 0000000..6512d86
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch
> @@ -0,0 +1,48 @@
> +From 78ee2b9090f9400ccc4f730e674f5ae972740ccb Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Fri, 26 Aug 2016 02:02:49 -0400
> +Subject: [PATCH 07/13] fix incorrect timeout while system time changed
> +
> +While system time changed by NTP, invoking timeout_command
> +breaks with incorrect timeout.
> +--------
> +|05:40:55,872 INFO program: Running... mount -t ext2 -o
> +  defaults,ro /dev/sda2 /mnt/sysimage
> +|01:40:55,086 DEBUG program: 10 seconds timeout
> +--------
> +
> +Use numbert count to replace current time count could workaround
> +the issue.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/util.py | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/blivet/util.py b/blivet/util.py
> +index 44a2da5..b3c45ac 100644
> +--- a/blivet/util.py
> ++++ b/blivet/util.py
> +@@ -163,14 +163,14 @@ def timeout_command(argv, timeout, *args, **kwargs):
> +     """call shell-command and either return its output or kill it
> +     if it doesn't normally exit within timeout seconds and return None"""
> +     import subprocess, datetime, os, time, signal
> +-    start = datetime.datetime.now()
> ++    count = 0
> + 
> +     try:
> +         proc = subprocess.Popen(argv, *args, **kwargs)
> +         while proc.poll() is None:
> +             time.sleep(0.1)
> +-            now = datetime.datetime.now()
> +-            if timeout != -1 and (now - start).seconds> timeout:
> ++            count += 1
> ++            if timeout != -1 and count > timeout*10:
> +                 os.kill(proc.pid, signal.SIGKILL)
> +                 os.waitpid(-1, os.WNOHANG)
> +                 program_log.debug("%d seconds timeout" % timeout)
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
> new file mode 100644
> index 0000000..121336e
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0008-tweak-btrfs-packages.patch
> @@ -0,0 +1,45 @@
> +From 6f661a511eea096c073888c7adb836a9a880b476 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 16:33:15 +0800
> +Subject: [PATCH 08/13] tweak btrfs packages
> +
> +In oe-cre/yocto, we name btrfs package with btrfs-tools,
> +rather than btrfs-progs.
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/devices/btrfs.py | 2 +-
> + blivet/formats/fs.py    | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
> +index c5cb21f..9d417b2 100644
> +--- a/blivet/devices/btrfs.py
> ++++ b/blivet/devices/btrfs.py
> +@@ -55,7 +55,7 @@ class BTRFSDevice(StorageDevice):
> + 
> +     """ Base class for BTRFS volume and sub-volume devices. """
> +     _type = "btrfs"
> +-    _packages = ["btrfs-progs"]
> ++    _packages = ["btrfs-tools"]
> +     _external_dependencies = [availability.BLOCKDEV_BTRFS_PLUGIN]
> + 
> +     def __init__(self, *args, **kwargs):
> +diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
> +index a49826f..e8f216d 100644
> +--- a/blivet/formats/fs.py
> ++++ b/blivet/formats/fs.py
> +@@ -918,7 +918,7 @@ class BTRFS(FS):
> +     _formattable = True
> +     _linux_native = True
> +     _supported = True
> +-    _packages = ["btrfs-progs"]
> ++    _packages = ["btrfs-tools"]
> +     _min_size = Size("256 MiB")
> +     _max_size = Size("16 EiB")
> +     _mkfs_class = fsmkfs.BTRFSMkfs
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
> new file mode 100644
> index 0000000..fc084b1
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0009-invoking-mount-with-infinite-timeout.patch
> @@ -0,0 +1,31 @@
> +From a6ac2157ee6793302e23ddbc5e3b249fa7da5b7e Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Wed, 31 Aug 2016 21:30:32 -0400
> +Subject: [PATCH 09/13] invoking mount with infinite timeout
> +
> +This large timeout is needed when running on machines with
> +lots of disks, or with slow disks.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/util.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/blivet/util.py b/blivet/util.py
> +index b3c45ac..9f02b18 100644
> +--- a/blivet/util.py
> ++++ b/blivet/util.py
> +@@ -257,7 +257,7 @@ def mount(device, mountpoint, fstype, options=None):
> + 
> +     argv = ["mount", "-t", fstype, "-o", options, device, mountpoint]
> +     try:
> +-        rc = run_program(argv)
> ++        rc = run_program(argv, timeout=-1)
> +     except OSError:
> +         raise
> + 
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
> new file mode 100644
> index 0000000..45d8fab
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0010-use-oe-variable-to-replace-hardcoded-dir.patch
> @@ -0,0 +1,34 @@
> +From e07133dbcf3c52e1ddd2f12797dcd16145269273 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Mon, 8 May 2017 03:54:12 -0400
> +Subject: [PATCH 10/13] use oe variable to replace hardcoded dir
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + setup.py | 8 ++++----
> + 1 file changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/setup.py b/setup.py
> +index 4d06a33..a994d06 100644
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -61,10 +61,10 @@ class blivet_sdist(sdist):
> + 
> + 
> + data_files = [
> +-    ('/etc/dbus-1/system.d', ['dbus/blivet.conf']),
> +-    ('/usr/share/dbus-1/system-services', ['dbus/com.redhat.Blivet1.service']),
> +-    ('/usr/libexec', ['dbus/blivetd']),
> +-    ('/usr/lib/systemd/system', ['dbus/blivet.service'])
> ++    (os.environ.get('sysconfdir')+'/dbus-1/system.d', ['dbus/blivet.conf']),
> ++    (os.environ.get('datadir')+'/dbus-1/system-services', ['dbus/com.redhat.Blivet1.service']),
> ++    (os.environ.get('libexecdir'), ['dbus/blivetd']),
> ++    (os.environ.get('systemd_system_unitdir'), ['dbus/blivet.service'])
> + ]
> + 
> + 
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
> new file mode 100644
> index 0000000..c61fe01
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0011-invoking-fsck-with-infinite-timeout.patch
> @@ -0,0 +1,31 @@
> +From e9ab4376a18cc1bd413c000b036320833eec80d7 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Thu, 1 Jun 2017 16:05:27 +0800
> +Subject: [PATCH 11/13] invoking fsck with infinite timeout
> +
> +This large timeout is needed when running on machines with
> +lots of disks, or with slow disks.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/tasks/fsck.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/blivet/tasks/fsck.py b/blivet/tasks/fsck.py
> +index c4214dc..e13ac6b 100644
> +--- a/blivet/tasks/fsck.py
> ++++ b/blivet/tasks/fsck.py
> +@@ -77,7 +77,7 @@ class FSCK(task.BasicApplication, fstask.FSTask):
> +             raise FSError("\n".join(error_msgs))
> + 
> +         try:
> +-            rc = util.run_program(self._fsck_command)
> ++            rc = util.run_program(self._fsck_command, timeout=-1)
> +         except OSError as e:
> +             raise FSError("filesystem check failed: %s" % e)
> + 
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
> new file mode 100644
> index 0000000..33bdbe8
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0012-invoking-mkfs-with-infinite-timeout.patch
> @@ -0,0 +1,31 @@
> +From 9f5a048181cf29d241d96814e736b8235b3d42b1 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Fri, 16 Jun 2017 15:43:00 +0800
> +Subject: [PATCH 12/13] invoking mkfs with infinite timeout
> +
> +This large timeout is needed when running on machines with
> +lots of disks, or with slow disks.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/tasks/fsmkfs.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/blivet/tasks/fsmkfs.py b/blivet/tasks/fsmkfs.py
> +index ad166aa..7bf5075 100644
> +--- a/blivet/tasks/fsmkfs.py
> ++++ b/blivet/tasks/fsmkfs.py
> +@@ -170,7 +170,7 @@ class FSMkfs(task.BasicApplication, FSMkfsTask):
> +         options = options or []
> +         cmd = self._mkfs_command(options, label, set_uuid)
> +         try:
> +-            ret = util.run_program(cmd)
> ++            ret = util.run_program(cmd, timeout=-1)
> +         except OSError as e:
> +             raise FSError(e)
> + 
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
> new file mode 100644
> index 0000000..6bdf4ce
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0013-Revert-Adapt-to-logging-module-name-change.patch
> @@ -0,0 +1,30 @@
> +From bfdaf79a2109ac6aed408f0c94f69766991e60e2 Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Thu, 27 Jul 2017 14:34:30 +0800
> +Subject: [PATCH 13/13] Revert "Adapt to logging module name change"
> +
> +Upstream-Status: Inappropriate [oe specific, sync with anaconda f26-release]
> +
> +This reverts commit c367d62a516e541ad28636c8259321f1c53417ce.
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + blivet/__init__.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/blivet/__init__.py b/blivet/__init__.py
> +index 49277cb..a01e487 100644
> +--- a/blivet/__init__.py
> ++++ b/blivet/__init__.py
> +@@ -124,7 +124,7 @@ def enable_installer_mode():
> +         from pyanaconda.constants import ROOT_PATH  # pylint: disable=redefined-outer-name,no-name-in-module
> +         _storage_root = _sysroot = ROOT_PATH
> + 
> +-    from pyanaconda.anaconda_logging import program_log_lock
> ++    from pyanaconda.anaconda_log import program_log_lock
> +     util.program_log_lock = program_log_lock
> + 
> +     flags.installer_mode = True
> +-- 
> +2.7.4
> +
> diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
> new file mode 100644
> index 0000000..8b9448c
> --- /dev/null
> +++ b/meta-python/recipes-extended/python-blivet/python3-blivet_2.2.0.bb
> @@ -0,0 +1,46 @@
> +DESCRIPTION = "A python module for system storage configuration"
> +HOMEPAGE = "http://fedoraproject.org/wiki/blivet"
> +LICENSE = "LGPLv2+"
> +SECTION = "devel/python"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> +
> +S = "${WORKDIR}/git"
> +B = "${S}"
> +
> +SRCREV = "39db82f20d8d4904c0c4dc8912e595177c59e091"
> +SRC_URI = "git://github.com/rhinstaller/blivet;branch=2.2-devel \
> +           file://0001-comment-out-selinux.patch \
> +           file://0002-run_program-support-timeout.patch\
> +           file://0003-support-infinit-timeout.patch \
> +           file://0004-Mount-var-volatile-during-install.patch \
> +           file://0005-update-fstab-by-appending.patch \
> +           file://0006-fix-new.roots-object-is-not-iterable.patch \
> +           file://0007-fix-incorrect-timeout-while-system-time-changed.patch \
> +           file://0008-tweak-btrfs-packages.patch \
> +           file://0009-invoking-mount-with-infinite-timeout.patch \
> +           file://0010-use-oe-variable-to-replace-hardcoded-dir.patch \
> +           file://0011-invoking-fsck-with-infinite-timeout.patch \
> +           file://0012-invoking-mkfs-with-infinite-timeout.patch \
> +           file://0013-Revert-Adapt-to-logging-module-name-change.patch \
> +"
> +
> +inherit distro_features_check
> +REQUIRED_DISTRO_FEATURES = "systemd"
> +
> +inherit setuptools3 python3native
> +
> +RDEPENDS_${PN} = "pykickstart python3-pyudev \

Should it rdepend on pykickstart or python3-pykickstart?

There is
PROVIDES = "pykickstart"
RPROVIDES_${PN} = "pykickstart"

in python3-pykickstart recipe so this works, but I don't understand why
not rdepend on python3-pykickstart directly like for most other python
packages.

> +                  parted python3-pyparted multipath-tools \
> +                  lsof cryptsetup libblockdev \
> +                  libbytesize \
> +"
> +
> +FILES_${PN} += " \
> +    ${datadir}/dbus-1/system-services \
> +"
> +
> +inherit systemd
> +
> +SYSTEMD_AUTO_ENABLE = "disable"
> +SYSTEMD_SERVICE_${PN} = "blivet.service"
> -- 
> 2.8.1
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 5/6] python3-blivet: add recipe 2.2.0
  2017-08-12  9:08   ` Martin Jansa
@ 2017-08-14  1:24     ` Hongxu Jia
  0 siblings, 0 replies; 15+ messages in thread
From: Hongxu Jia @ 2017-08-14  1:24 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

On 2017年08月12日 17:08, Martin Jansa wrote:
>> +inherit distro_features_check
>> +REQUIRED_DISTRO_FEATURES = "systemd"
>> +
>> +inherit setuptools3 python3native
>> +
>> +RDEPENDS_${PN} = "pykickstart python3-pyudev \
> Should it rdepend on pykickstart or python3-pykickstart?
>
> There is
> PROVIDES = "pykickstart"
> RPROVIDES_${PN} = "pykickstart"
>
> in python3-pykickstart recipe so this works, but I don't understand why
> not rdepend on python3-pykickstart directly like for most other python
> packages.
>

Oh, the `pykickstart' is used by upstream blivet at very begging.
And this recipe kept it since then.

https://github.com/storaged-project/blivet/commit/9a6acef77255e2454822fbf758d65e92145fe32a

I keep it in python3-pykickstart just to backward compatibility, and
in the newly added python3-blivet, rdepends python3-pykickstart
like other python packages is better.

//Hongxu




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-08-14  1:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27  8:44 [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
2017-07-27  8:44 ` [meta-oe][PATCH V2 1/6] glade: fix host contamination on centos7 Hongxu Jia
2017-07-27  8:44 ` [meta-oe][PATCH 2/6] tigervnc: add recipe 1.8.0 Hongxu Jia
2017-08-09  0:46   ` Khem Raj
2017-07-27  8:44 ` [meta-oe][PATCH 3/6] libreport: add recipe 2.9.1 Hongxu Jia
2017-07-27  8:44 ` [PATCH 4/6] libblockdev: add recipe 2.10 Hongxu Jia
2017-08-09  0:51   ` Khem Raj
2017-07-27  8:44 ` [PATCH 5/6] python3-blivet: add recipe 2.2.0 Hongxu Jia
2017-08-12  9:08   ` Martin Jansa
2017-08-14  1:24     ` Hongxu Jia
2017-07-27  8:44 ` [PATCH 6/6] python3-blivetgui: add recipe 2.1.5 Hongxu Jia
2017-07-27  8:51 ` [PATCH 0/6] add 5 recipes and 1 bug fix Hongxu Jia
2017-07-27 13:46 ` Khem Raj
2017-07-28  2:02   ` Hongxu Jia
2017-07-28  2:46     ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.