Jim Meyering
2008-Sep-04  10:01 UTC
[Ovirt-devel] (new?) build-all -a failure, plus temporary work-around
"build-all -a" worked fine when I ran it, yesterday, but today
it failed with this:
    cannot create directory
`.../ovirt/wui/rpm-build/BUILDROOT/ovirt-wui-0.93-1.1.200809040929git825a783.fc10.x86_64':
No such file or directory
--------------------
    $ sudo ./build-all.sh -a
    ...
    + cd ovirt-wui-0.93
    + /bin/chmod -Rf a+rX,u+w,g-w,o-w .
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.TD3EpF
    + umask 022
    + cd /home/meyering/w/co/ovirt/wui/rpm-build
    + cd ovirt-wui-0.93
    + LANG=C
    + export LANG
    + unset DISPLAY
    + exit 0
    Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.IE9Pl1
    + umask 022
    + cd /home/meyering/w/co/ovirt/wui/rpm-build
    + cd ovirt-wui-0.93
    + LANG=C
    + export LANG
    + unset DISPLAY
    + test
x/home/meyering/w/co/ovirt/wui/rpm-build/BUILDROOT/ovirt-wui-0.93-1.1.200809040929git825a783.fc10.x86_64
'!=' x
    + rm -rf
/home/meyering/w/co/ovirt/wui/rpm-build/BUILDROOT/ovirt-wui-0.93-1.1.200809040929git825a783.fc10.x86_64
    + mkdir
/home/meyering/w/co/ovirt/wui/rpm-build/BUILDROOT/ovirt-wui-0.93-1.1.200809040929git825a783.fc10.x86_64
    mkdir: cannot create directory
`/home/meyering/w/co/ovirt/wui/rpm-build/BUILDROOT/ovirt-wui-0.93-1.1.200809040929git825a783.fc10.x86_64':
No such file or directory
    error: Bad exit status from /var/tmp/rpm-tmp.IE9Pl1 (%install)
    RPM build errors:
	Bad exit status from /var/tmp/rpm-tmp.IE9Pl1 (%install)
    make: *** [rpms] Error 1
    [Exit 2]
Note that BUILDROOT doesn't exist yet:
    $ ls wui/rpm-build/
    ovirt-wui-0.93/  ovirt-wui-0.93.tar.gz  version
The code that prepares that particular rpm-build directory
is in wui/Makefile, but there are at least two other spots
with identical sequences of commands (down to unnecessary
trialing slash):
  $ g grep cp.version
  ovirt-host-creator/Makefile:    cp version rpm-build/
  ovirt-managed-node/Makefile:    cp version rpm-build/
  wui/Makefile:   cp version rpm-build/
This patch fixes the immediate problem, however, ...
diff --git a/wui/Makefile b/wui/Makefile
index 0819cfe..c58f279 100644
--- a/wui/Makefile
+++ b/wui/Makefile
@@ -21,6 +21,7 @@ tar: clean
 	mkdir -p rpm-build
 	tar zcvf rpm-build/$(NV).tar.gz $(NV)
 	cp version rpm-build/
+	mkdir rpm-build/BUILDROOT
 	rm -rf $(NV)
 # convience method to simulate make install, not for production use
The following one makes the same change to the other two rules:
(this isn't really a patch proposal, since I'll first have to
see if we can factor out the duplication).  Will report back soon.
diff --git a/ovirt-host-creator/Makefile b/ovirt-host-creator/Makefile
index d1dbfc2..fe20373 100644
--- a/ovirt-host-creator/Makefile
+++ b/ovirt-host-creator/Makefile
@@ -26,6 +26,7 @@ tar: clean ovirt.iso
 	mkdir -p rpm-build
 	tar zcvf rpm-build/$(NV).tar $(NV)
 	cp version rpm-build/
+	mkdir rpm-build/BUILDROOT
 	rm -rf $(NV)
 .PHONY: all clean tar distclean
diff --git a/ovirt-managed-node/Makefile b/ovirt-managed-node/Makefile
index bf42e39..7ea8cb8 100644
--- a/ovirt-managed-node/Makefile
+++ b/ovirt-managed-node/Makefile
@@ -34,6 +34,7 @@ tar: clean
 	mkdir -p rpm-build
 	tar zcvf rpm-build/$(NV).tar.gz $(NV)
 	cp version rpm-build/
+	mkdir rpm-build/BUILDROOT
 	rm -rf $(NV)
 .PHONY: all clean tar
diff --git a/wui/Makefile b/wui/Makefile
index 0819cfe..c58f279 100644
--- a/wui/Makefile
+++ b/wui/Makefile
@@ -21,6 +21,7 @@ tar: clean
 	mkdir -p rpm-build
 	tar zcvf rpm-build/$(NV).tar.gz $(NV)
 	cp version rpm-build/
+	mkdir rpm-build/BUILDROOT
 	rm -rf $(NV)
 # convience method to simulate make install, not for production use
Jim Meyering
2008-Sep-04  10:07 UTC
[Ovirt-devel] (new?) build-all -a failure, plus temporary work-around
Jim Meyering <jim at meyering.net> wrote:> "build-all -a" worked fine when I ran it, yesterday, but today > it failed with this:Alan Pevec asked the right question: "you're using rawhide, right?" I answered "Yep, and just upgraded it last night.". So this may well be due to a new version of rpm.