5
0
mirror of git://git.proxmox.com/git/novnc-pve.git synced 2025-01-03 05:17:56 +03:00

buildsys: generate build-directory atomically

Use an intermediate directory and only rename it to the actual build
directory if preparation succeeded, this way some odd
failure/interrupt cannot result in a bad build, which could be,
unlikely but not impossible, broken in subtle ways.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-11-12 15:11:41 +01:00
parent ba0b621756
commit f2d36e2f3e

View File

@ -15,10 +15,11 @@ all:
$(SRCDIR)/vnc.html: submodule
$(BUILDDIR): $(SRCDIR)/vnc.html
rm -rf $(BUILDDIR)
cp -rpa $(SRCDIR) $(BUILDDIR)
cp -a debian $(BUILDDIR)
echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
rm -rf $@ $@.tmp
cp -rpa $(SRCDIR) $@.tmp
cp -a debian $@.tmp/
echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
mv $@.tmp $@
.PHONY: deb
deb: $(DEB)