msi: record full build environment in MSI installer

For proper compliance with the GPL and other licenses we need to be
clear about exactly what toolchain and dependent packages we used in
order to build the MSI installer we distribute.

Historically we've done this by including a "deps.txt" file which
provides a list of all the mingw{32,64}-* RPMs on the host system.

This is not sufficient information, however, because the build system
will in fact use various native packages too from the toolchain too,
notably including any program run by "configure" which covers various
shell utilities, and pkg-config, and then of course make & msitools
itself.

Rather than try to figure out which subset of host RPMs are used,
just list every single host RPM that is installed.

A key implication of this is that formal release builds should always
be done in a pristine build root populated with the minimal content
required for the build.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2019-02-15 10:38:41 +00:00
parent 5daeea567c
commit 7bea22aece
2 changed files with 7 additions and 7 deletions

View File

@ -36,10 +36,10 @@ else
HaveGtkVnc = False
endif
deps.txt:
$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
buildenv.txt:
$(AM_V_GEN)rpm -qa | sort | unix2dos > $@
virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs deps.txt
virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs buildenv.txt
$(AM_V_GEN)DESTDIR=`mktemp -d` && \
make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null && \
find $$DESTDIR | wixl-heat -p $$DESTDIR$(prefix)/ \
@ -59,7 +59,7 @@ virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs deps.txt
msi: virt-viewer-$(WIXL_ARCH)-$(VERSION).msi
CLEANFILES += \
deps.txt \
buildenv.txt \
virt-viewer-$(WIXL_ARCH)-$(VERSION).msi \
$(NULL)

View File

@ -68,8 +68,8 @@
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.ArchProgramFilesFolder)">
<Directory Id="INSTALLDIR" Name="VirtViewer v@VERSION@@BUILDID@">
<Component Id="CDepsFile" Guid="*">
<File Id="filA1E799D196006E6DF67DACE15B8C6193" KeyPath="yes" Source="deps.txt"/>
<Component Id="CBuildEnvFile" Guid="*">
<File Id="filA1E799D196006E6DF67DACE15B8C6193" KeyPath="yes" Source="buildenv.txt"/>
</Component>
</Directory>
</Directory>
@ -117,7 +117,7 @@
<?endif?>
<ComponentGroupRef Id="CG.libxml2"/>
<ComponentGroupRef Id="CG.virt-viewer"/>
<ComponentRef Id="CDepsFile"/>
<ComponentRef Id="CBuildEnvFile"/>
<ComponentRef Id="CShortcut"/>
<ComponentRef Id="CProgIds"/>
<ComponentRef Id="CHwdataUSB"/>