Skip to contentSkip to conversation

lxc: fixup VPATH builds

PATCH In review Mark Asselstine 2 participants 3 messages May 7, 2014 – May 8, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lxc: fixup VPATH builds

Poky commit 69b6eaca3d9b635e8a61a0fdbd814b558e91901d [autotools:
Enable separate builddir by default] enforced separate build directories, which is supported by automake. Unfortunately lxc had a few make directives which didn't take into account VPATH builds so fixing them up here to allow the lxc build to complete successfully.

---
 ...tomake-ensure-VPATH-builds-work-correctly.patch | 45 ++++++++++++++++++++++
 recipes-containers/lxc/lxc_1.0.1.bb                |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 recipes-containers/lxc/files/automake-ensure-VPATH-builds-work-correctly.patch
recipes-containers/lxc/files/automake-ensure-VPATH-builds-work-correctly.patch new file +45 -0
new file mode 100644
index 0000000..2a91951
@@ -0,0 +1,45 @@
+From 08ccd79319e66b3f0b51fd5f5b539e652a16dfc0 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Wed, 30 Apr 2014 11:06:12 -0400
+Subject: [PATCH] automake: ensure VPATH builds work correctly
+
+There were a few non-VPATH friendly directives in some Makefile.am files, fix
+these up to allow VPATH builds to work.
+
+Signed-off-by: Mark Asselstine <[email protected]>
+---
+ config/etc/Makefile.am | 4 ++--
+ src/tests/Makefile.am  | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/config/etc/Makefile.am b/config/etc/Makefile.am
+index 81d7709..dca001e 100644
+--- a/config/etc/Makefile.am
++++ b/config/etc/Makefile.am
+@@ -4,8 +4,8 @@ distroconf = @LXC_DISTRO_CONF@
+ 
+ EXTRA_DIST = default.conf.ubuntu default.conf.libvirt default.conf.unknown
+ 
+-default.conf:
+-	cp $(distroconf) $@
++default.conf: $(distroconf)
++	cp $? $@
+ 
+ clean-local:
+ 	@$(RM) -f default.conf
+diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
+index 7f6645b..641e207 100644
+--- a/src/tests/Makefile.am
++++ b/src/tests/Makefile.am
+@@ -64,7 +64,7 @@ buildtest-TESTS: $(TESTS)
+ install-ptest:
+ 	install -d $(TEST_DIR)
+ 	install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so
+-	install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver
++	install -D $(top_srcdir)/config/test-driver $(TEST_DIR)/../../config/test-driver
+ 	cp Makefile $(TEST_DIR)
+ 	@(for file in $(TESTS); do install $$file $(TEST_DIR);  done;)
+ 	sed -i 's|^Makefile:|_Makefile:|' $(TEST_DIR)/Makefile
+-- 
+1.8.3.2
+
recipes-containers/lxc/lxc_1.0.1.bb +1 -0
index b366116..4ef80d6 100644
@@ -29,6 +29,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
 	file://network.c-Add-missing-LXC_NET_NONE-option-refactor.patch \
 	file://runtest.patch \
 	file://run-ptest \
+	file://automake-ensure-VPATH-builds-work-correctly.patch \
 	"
 SRC_URI[md5sum] = "3c7379891e45713817ec873a167070b0"
 SRC_URI[sha256sum] = "17d8e5b575207b4fb57da0b8ba2d13f3e5ee20ce8ccd1259d6eae4bd5ca575b1"
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 2/2 libvirt: allow separated src and build dirs

Poky commit 69b6eaca3d9b635e8a61a0fdbd814b558e91901d [autotools:
Enable separate builddir by default] enforced separate build directories, which is supported by automake. Make some minor updates to the recipes and upstream source to allow builds to work with separated src and build directories.

---
 recipes-extended/libvirt/libvirt-python.inc        |  4 +-
 .../tests-allow-separated-src-and-build-dirs.patch | 57 ++++++++++++++++++++++
 recipes-extended/libvirt/libvirt_1.2.2.bb          |  1 +
 3 files changed, 60 insertions(+), 2 deletions(-)
 create mode 100644 recipes-extended/libvirt/libvirt/tests-allow-separated-src-and-build-dirs.patch
recipes-extended/libvirt/libvirt-python.inc +2 -2
index 195a9de..181e9d3 100644
@@ -23,8 +23,8 @@ SRC_URI[libvirt_python.sha256sum] = "94d79d662b6010f6c688b8856b2d95077736d48ffa3
 
 export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
 export LIBVIRT_CFLAGS = "-I${S}/include"
-export LIBVIRT_LIBS = "-L${S}/src/.libs -lvirt -ldl"
-export LDFLAGS="-L${S}/src/.libs"
+export LIBVIRT_LIBS = "-L${B}/src/.libs -lvirt -ldl"
+export LDFLAGS="-L${B}/src/.libs"
 
 LIBVIRT_INSTALL_ARGS = "--root=${D} \
     --prefix=${prefix} \
recipes-extended/libvirt/libvirt/tests-allow-separated-src-and-build-dirs.patch new file +57 -0

57 lines not on this page · raw message

recipes-extended/libvirt/libvirt_1.2.2.bb +1 -0
index a66a6ad..22ae2c7 100644
@@ -29,6 +29,7 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz;name=libvirt \
            file://libvirtd.conf \
            file://runptest.patch \
            file://run-ptest \
+           file://tests-allow-separated-src-and-build-dirs.patch \
           "
 
 SRC_URI[libvirt.md5sum] = "592958ad1ddce7574d8cb0a31e635acd"
Signature · 1 line
1.8.3.2
#2 lore raw
In reply to Mark Asselstine
Quoted 5 lines · Mark Asselstine

Poky commit 69b6eaca3d9b635e8a61a0fdbd814b558e91901d [autotools:
Enable separate builddir by default] enforced separate build directories, which is supported by automake. Unfortunately lxc had a few make directives which didn't take into account VPATH builds so fixing them up here to allow the lxc build to complete successfully.

Both look fine to me.

Merged and pushed to master.

Bruce

Quoted 72 lines
---
  ...tomake-ensure-VPATH-builds-work-correctly.patch | 45 ++++++++++++++++++++++
  recipes-containers/lxc/lxc_1.0.1.bb                |  1 +
  2 files changed, 46 insertions(+)

create mode 100644 recipes-containers/lxc/files/automake-ensure-VPATH-builds-work-correctly.patch

recipes-containers/lxc/files/automake-ensure-VPATH-builds-work-correctly.patch new file +45 -0
new file mode 100644
index 0000000..2a91951
@@ -0,0 +1,45 @@
+From 08ccd79319e66b3f0b51fd5f5b539e652a16dfc0 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Wed, 30 Apr 2014 11:06:12 -0400
+Subject: [PATCH] automake: ensure VPATH builds work correctly
+
+There were a few non-VPATH friendly directives in some Makefile.am files, fix
+these up to allow VPATH builds to work.
+
+Signed-off-by: Mark Asselstine <[email protected]>
+---
+ config/etc/Makefile.am | 4 ++--
+ src/tests/Makefile.am  | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/config/etc/Makefile.am b/config/etc/Makefile.am
+index 81d7709..dca001e 100644
+--- a/config/etc/Makefile.am
++++ b/config/etc/Makefile.am
+@@ -4,8 +4,8 @@ distroconf = @LXC_DISTRO_CONF@
+
+ EXTRA_DIST = default.conf.ubuntu default.conf.libvirt default.conf.unknown
+
+-default.conf:
+-	cp $(distroconf) $@
++default.conf: $(distroconf)
++	cp $? $@
+
+ clean-local:
+ 	@$(RM) -f default.conf
+diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
+index 7f6645b..641e207 100644
+--- a/src/tests/Makefile.am
++++ b/src/tests/Makefile.am
+@@ -64,7 +64,7 @@ buildtest-TESTS: $(TESTS)
+ install-ptest:
+ 	install -d $(TEST_DIR)
+ 	install -D ../lxc/liblxc.so $(TEST_DIR)/../lxc/liblxc.so
+-	install -D ../../config/test-driver $(TEST_DIR)/../../config/test-driver
++	install -D $(top_srcdir)/config/test-driver $(TEST_DIR)/../../config/test-driver
+ 	cp Makefile $(TEST_DIR)
+ 	@(for file in $(TESTS); do install $$file $(TEST_DIR);  done;)
+ 	sed -i 's|^Makefile:|_Makefile:|' $(TEST_DIR)/Makefile
+--
+1.8.3.2
+
recipes-containers/lxc/lxc_1.0.1.bb +1 -0
index b366116..4ef80d6 100644
@@ -29,6 +29,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
  	file://network.c-Add-missing-LXC_NET_NONE-option-refactor.patch \
  	file://runtest.patch \
  	file://run-ptest \
+	file://automake-ensure-VPATH-builds-work-correctly.patch \
  	"
  SRC_URI[md5sum] = "3c7379891e45713817ec873a167070b0"
  SRC_URI[sha256sum] = "17d8e5b575207b4fb57da0b8ba2d13f3e5ee20ce8ccd1259d6eae4bd5ca575b1"