aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-02-18 10:13:18 +0100
committerWerner Koch <wk@gnupg.org>2021-02-18 13:25:33 +0100
commit919a969354d4021f2e64a948b4c224cd37323713 (patch)
treee0e4e1c3460d5723bba774cf4a23e10ee6322c22
parentab7dc4b524c3e2ad5153acfdbfa879a9e62d2dbe (diff)
downloadgnupg-919a969354d4021f2e64a948b4c224cd37323713.tar.gz
speedo: Update w32 stuff from 2.2
* build-aux/speedo.mk: Update from 2.2. Add target w32-msi-release. * build-aux/speedo/w32/inst.nsi: Fix location of doc files. * build-aux/speedo/w32/wixlib.wxs: Add gpg-card and fix a wrong name. * Makefile.am (release): Support a WITH_MSI variable. (wixlibfile): Improve copying to archive. (release): Use AMTAR instead of TAR. -- Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--Makefile.am24
-rw-r--r--build-aux/speedo.mk69
-rw-r--r--build-aux/speedo/w32/inst.nsi16
-rw-r--r--build-aux/speedo/w32/wixlib.wxs5
-rw-r--r--configure.ac4
5 files changed, 81 insertions, 37 deletions
diff --git a/Makefile.am b/Makefile.am
index 9daeccc6f..4e80102a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,6 +18,9 @@
## Process this file with automake to produce Makefile.in
+# To include the wixlibs for building an MSI installer in a release use
+# make release WITH_MSI=1
+
# Location of the released tarball archives. This is prefixed by
# the variable RELEASE_ARCHIVE in ~/.gnupg-autogen.rc. For example:
# RELEASE_ARCHIVE=user@host:archive/tarballs
@@ -115,7 +118,7 @@ dist-hook: gen-ChangeLog
distcheck-hook:
set -e; ( \
- pref="#+macro: gnupg22_" ;\
+ pref="#+macro: gnupg24_" ;\
reldate="$$(date -u +%Y-%m-%d)" ;\
echo "$${pref}ver $(PACKAGE_VERSION)" ;\
echo "$${pref}date $${reldate}" ;\
@@ -184,16 +187,19 @@ release:
exit 2;\
fi ;\
echo "/* Build started at $$(date -uIseconds) */" ;\
+ [ -n "$(WITH_MSI)" ] && echo "/* (with MSI build support) */" ;\
cd $(top_srcdir); \
./autogen.sh --force; \
cd $(abs_top_builddir); \
rm -rf dist; mkdir dist ; cd dist ; \
$(abs_top_srcdir)/configure --enable-maintainer-mode; \
$(MAKE) distcheck TESTFLAGS=--parallel; \
- $(TAR) xjf $(RELEASE_NAME).tar.bz2 ;\
- $(MAKE) -f $(RELEASE_NAME)/build-aux/speedo.mk w32-release ;\
+ $(AMTAR) xjf $(RELEASE_NAME).tar.bz2 ;\
+ target=w32-release ;\
+ [ -n "$(WITH_MSI)" ] && target=w32-msi-release ;\
+ $(MAKE) -f $(RELEASE_NAME)/build-aux/speedo.mk $${target} ;\
echo "/* Build finished at $$(date -uIseconds) */" ;\
- echo "/*" ;\
+ echo "/*" ;\
echo " * Please run the final step interactively:" ;\
echo " * make sign-release" ;\
echo " */" ;\
@@ -224,6 +230,7 @@ sign-release:
$${release_w32_name}.tar.xz.sig \
$${release_w32_name}.exe.sig \
$${release_w32_name}.exe.swdb" ;\
+ wixlibfile="$${release_w32_name}.wixlib";\
$(MAKE) -f $(RELEASE_NAME)/build-aux/speedo.mk w32-sign-installer ;\
echo "/* Signing the source tarball ..." ;\
gpg -sbu $$mysignkey $(RELEASE_NAME).tar.bz2 ;\
@@ -232,14 +239,19 @@ sign-release:
echo "/* Signing the W32 installer ..." ;\
gpg -sbu $$mysignkey $${release_w32_name}.exe ;\
cat $(RELEASE_NAME).swdb >swdb.snippet;\
- echo '#+macro: gnupg22_branch STABLE-BRANCH-2-2' >>swdb.snippet;\
+ echo '#+macro: gnupg24_branch STABLE-BRANCH-2-4' >>swdb.snippet;\
cat $${release_w32_name}.exe.swdb >>swdb.snippet;\
echo >>swdb.snippet ;\
sha1sum $${files1} >>swdb.snippet ;\
cat "../$(RELEASE_NAME).buildlog" swdb.snippet \
| gzip >$(RELEASE_NAME).buildlog ;\
echo "Release created - copying it to the archive ..." ;\
- scp -p $${files1} $${files2} $$myarchive/ || true;\
+ scp -p $${files1} $${files2} $$myarchive/ \
+ || echo "/* Error copying files to the archive - ignored */" ;\
+ if [ -e $${wixlibfile} ]; then\
+ scp -p $${wixlibfile} $$myarchive/ \
+ || echo "/* Error copying wixlib to the archive - ignored. */" ;\
+ fi ;\
echo '/*' ;\
echo ' * All done; for checksums see dist/swdb.snippet' ;\
echo ' */' ;\
diff --git a/build-aux/speedo.mk b/build-aux/speedo.mk
index e61f8f40d..1c5e268a1 100644
--- a/build-aux/speedo.mk
+++ b/build-aux/speedo.mk
@@ -41,7 +41,7 @@
#
# Lists packages and versions.
#
-# The information reyured to sign the tarballs and binaries
+# The information required to sign the tarballs and binaries
# are expected in the developer specific file ~/.gnupg-autogen.rc".
# Here is an example:
#--8<---------------cut here---------------start------------->8---
@@ -110,6 +110,28 @@ help:
@echo 'Use CUSTOM_SWDB=1 for an already downloaded swdb.lst.'
@echo 'Use WIXPREFIX to provide the WIX binaries for the MSI package.'
@echo ' Using WIX also requires wine with installed wine mono.'
+ @echo ' See help-wixlib for more information'
+
+help-wixlib:
+ @echo 'The buildsystem can create a wixlib to build MSI packages.'
+ @echo ''
+ @echo 'On debian install the packages "wine"'
+ @echo ' apt-get install wine'
+ @echo ''
+ @echo 'Download the wine-mono msi:'
+ @echo ' https://dl.winehq.org/wine/wine-mono/'
+ @echo ''
+ @echo 'Install it:'
+ @echo ' wine msiexec /i ~/Downloads/wine-mono-4.9.4.msi'
+ @echo ''
+ @echo 'Download the wix toolset binary zip from:'
+ @echo ' https://github.com/wixtoolset/wix3/releases'
+ @echo 'The default folder searches for ~/w32root/wixtools'
+ @echo 'Alternative locations can be passed by WIXPREFIX variable'
+ @echo ' unzip -d ~/w32root/wixtools ~/Downloads/wix311-binaries.zip'
+ @echo ''
+ @echo 'Afterwards w32-msi-release will also build a wixlib.'
+
SPEEDOMAKE := $(MAKE) -f $(SPEEDO_MK) UPD_SWDB=1
@@ -164,6 +186,10 @@ w32-release: check-tools
$(SPEEDOMAKE) TARGETOS=w32 WHAT=release WITH_GUI=0 SELFCHECK=0 \
installer-from-source
+w32-msi-release: check-tools
+ $(SPEEDOMAKE) TARGETOS=w32 WHAT=release WITH_GUI=0 SELFCHECK=0 \
+ WITH_WIXLIB=1 installer-from-source
+
w32-sign-installer: check-tools
$(SPEEDOMAKE) TARGETOS=w32 WHAT=release WITH_GUI=0 SELFCHECK=0 \
sign-installer
@@ -211,7 +237,7 @@ INST_NAME=gnupg-w32
INSTALL_PREFIX=none
# Set this to the location of wixtools
-WIXPREFIX=
+WIXPREFIX=$(shell readlink -f ~/w32root/wixtools)
# Read signing information from ~/.gnupg-autogen.rc
define READ_AUTOGEN_template
@@ -588,8 +614,7 @@ speedo_pkg_ntbtls_configure = --disable-shared
ifeq ($(TARGETOS),w32)
speedo_pkg_gnupg_configure = \
- --disable-g13 --enable-ntbtls \
- --enable-build-timestamp
+ --disable-g13 --enable-ntbtls
else
speedo_pkg_gnupg_configure = --disable-g13 --enable-wks-tools
endif
@@ -1259,7 +1284,7 @@ dist-source: installer
--transform='s,^,$(INST_NAME)-$(INST_VERSION)/,' \
PLAY/stamps/stamp-*-00-unpack PLAY/src swdb.lst swdb.lst.sig ;\
[ -f "$$tarname".xz ] && rm "$$tarname".xz;\
- xz "$$tarname" ;\
+ xz -T0 "$$tarname" ;\
)
@@ -1317,9 +1342,8 @@ installer: all w32_insthelpers $(w32src)/inst-options.ini $(bdir)/README.txt
done; \
fi \
)
- (nsis3_args=$$(makensis -version | grep -q "^v3" && \
- echo "-INPUTCHARSET CP1252"); \
- $(MAKENSIS) -V2 $$nsis3_args \
+ $(MAKENSIS) -V2 $$($(MAKENSIS) -version \
+ | grep -q ^v3 && echo "-INPUTCHARSET CP1252 ") \
-DINST_DIR=$(idir) \
-DINST6_DIR=$(idir6) \
-DBUILD_DIR=$(bdir) \
@@ -1330,17 +1354,19 @@ installer: all w32_insthelpers $(w32src)/inst-options.ini $(bdir)/README.txt
-DNAME=$(INST_NAME) \
-DVERSION=$(INST_VERSION) \
-DPROD_VERSION=$(INST_PROD_VERSION) \
- $(extra_installer_options) $(w32src)/inst.nsi)
+ $(extra_installer_options) $(w32src)/inst.nsi
@echo "Ready: $(idir)/$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).exe"
# We use the installer target to ensure everything is done and signed
wixlib: installer $(bdir)/README.txt $(w32src)/wixlib.wxs
if [ -z "$$(which $(WINE))" ]; then \
echo "ERROR: For the w32-wixlib wine needs to be installed."; \
+ echo "ERROR: see 'help-w32-wixlib'"; \
exit 1; \
fi;
- if [ -z "$(WIXPREFIX)" ]; then \
+ if [ ! -d "$(WIXPREFIX)" ]; then \
echo "ERROR: You must set WIXPREFIX to an installation of wixtools."; \
+ echo "ERROR: see 'help-w32-wixlib'"; \
exit 1; \
fi;
(if [ -z "$$WINEPREFIX" ]; then \
@@ -1388,7 +1414,7 @@ wixlib: installer $(bdir)/README.txt $(w32src)/wixlib.wxs
)
define MKSWDB_commands
- ( pref="#+macro: gnupg24_w32_" ;\
+ ( pref="#+macro: gnupg24_w32_$(3)" ;\
echo "$${pref}ver $(INST_VERSION)_$(BUILD_DATESTR)" ;\
echo "$${pref}date $(2)" ;\
echo "$${pref}size $$(wc -c <$(1)|awk '{print int($$1/1024)}')k";\
@@ -1409,13 +1435,15 @@ define AUTHENTICODE_sign
/fd sha256 /du https://gnupg.org a.exe ;\
scp "$(AUTHENTICODE_SIGNHOST):a.exe" $(2);\
echo "speedo: signed file is '$(2)'" ;\
- else \
+ elif [ -e "$(AUTHENTICODE_KEY)" ]; then \
echo "speedo: Signing using key $(AUTHENTICODE_KEY)";\
osslsigncode sign -certs $(AUTHENTICODE_CERTS) \
-pkcs12 $(AUTHENTICODE_KEY) -askpass \
-ts "http://timestamp.globalsign.com/scripts/timstamp.dll" \
-h sha256 -n GnuPG -i https://gnupg.org \
-in $(1) -out $(2) ;\
+ else \
+ echo "speedo: WARNING: Binaries are not signed"; \
fi
endef
@@ -1428,9 +1456,8 @@ installer-from-source: dist-source
cd PLAY-release; \
tar xJf "../$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).tar.xz";\
cd $(INST_NAME)-$(INST_VERSION); \
- $(MAKE) -f build-aux/speedo.mk this-w32-installer SELFCHECK=0;\
- if [ -n "$(WIXPREFIX)" ]; then \
- cd $(INST_NAME)-$(INST_VERSION); \
+ $(MAKE) -f build-aux/speedo.mk this-w32-installer SELFCHECK=0;\
+ if [ -d "$(WIXPREFIX)" -a x"$(WITH_WIXLIB)" = x1 ]; then \
$(MAKE) -f build-aux/speedo.mk this-w32-wixlib SELFCHECK=0;\
fi; \
reldate="$$(date -u +%Y-%m-%d)" ;\
@@ -1439,10 +1466,10 @@ installer-from-source: dist-source
exefile="../../$$exefile" ;\
$(call MKSWDB_commands,$${exefile},$${reldate}); \
msifile="$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).wixlib"; \
- if [ -e "$${msifile}" ]; then \
+ if [ -e "PLAY/inst/$${msifile}" ]; then \
cp "PLAY/inst/$$msifile" ../..; \
msifile="../../$$msifile" ; \
- $(call MKSWDB_commands,$${msifile},$${reldate}); \
+ $(call MKSWDB_commands,$${msifile},$${reldate},"wixlib_"); \
fi \
)
@@ -1455,7 +1482,7 @@ sign-installer:
cd $(INST_NAME)-$(INST_VERSION); \
reldate="$$(date -u +%Y-%m-%d)" ;\
exefile="$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).exe" ;\
- msifile="$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).wixlib ;\
+ msifile="$(INST_NAME)-$(INST_VERSION)_$(BUILD_DATESTR).wixlib" ;\
echo "speedo: /*" ;\
echo "speedo: * Signing installer" ;\
echo "speedo: */" ;\
@@ -1463,8 +1490,8 @@ sign-installer:
exefile="../../$$exefile" ;\
msifile="../../$$msifile" ;\
$(call MKSWDB_commands,$${exefile},$${reldate}); \
- if [ -e "$${msifile}" ]; then \
- $(call MKSWDB_commands,$${msifile},$${reldate}); \
+ if [ -f "$${msifile}" ]; then \
+ $(call MKSWDB_commands,$${msifile},$${reldate},"wixlib_"); \
fi; \
echo "speedo: /*" ;\
echo "speedo: * Verification result" ;\
@@ -1479,7 +1506,7 @@ endif
#
-# Check availability of standard tools
+# Check availibility of standard tools
#
check-tools:
diff --git a/build-aux/speedo/w32/inst.nsi b/build-aux/speedo/w32/inst.nsi
index 9ccc0e188..2c6c9be78 100644
--- a/build-aux/speedo/w32/inst.nsi
+++ b/build-aux/speedo/w32/inst.nsi
@@ -659,10 +659,10 @@ Section "GnuPG" SEC_gnupg
File "share/gnupg/distsigkey.gpg"
File "share/gnupg/sks-keyservers.netCA.pem"
- SetOutPath "$INSTDIR\share\gnupg\examples"
- File "share/gnupg/examples/VS-NfD.prf"
- File "share/gnupg/examples/Automatic.prf"
- File "share/gnupg/examples/pwpattern.txt"
+ SetOutPath "$INSTDIR\share\doc\gnupg\examples"
+ File "share/doc/gnupg/examples/VS-NfD.prf"
+ File "share/doc/gnupg/examples/Automatic.prf"
+ File "share/doc/gnupg/examples/pwpattern.list"
SetOutPath "$INSTDIR\share\locale\ca\LC_MESSAGES"
File share/locale/ca/LC_MESSAGES/gnupg2.mo
@@ -1326,10 +1326,10 @@ Section "-un.gnupg"
Delete "$INSTDIR\bin\gpg-check-pattern.exe"
Delete "$INSTDIR\bin\gpg-wks-client.exe"
- Delete "$INSTDIR\share\gnupg\examples\VS-NfD.prf"
- Delete "$INSTDIR\share\gnupg\examples\Automatic.prf"
- Delete "$INSTDIR\share\gnupg\examples\pwpattern.txt"
- RMDir "$INSTDIR\share\gnupg\examples"
+ Delete "$INSTDIR\share\doc\gnupg\examples\VS-NfD.prf"
+ Delete "$INSTDIR\share\doc\gnupg\examples\Automatic.prf"
+ Delete "$INSTDIR\share\doc\gnupg\examples\pwpattern.list"
+ RMDir "$INSTDIR\share\doc\gnupg\examples"
Delete "$INSTDIR\share\gnupg\sks-keyservers.netCA.pem"
Delete "$INSTDIR\share\gnupg\dirmngr-conf.skel"
diff --git a/build-aux/speedo/w32/wixlib.wxs b/build-aux/speedo/w32/wixlib.wxs
index b751c4306..f851e96b9 100644
--- a/build-aux/speedo/w32/wixlib.wxs
+++ b/build-aux/speedo/w32/wixlib.wxs
@@ -61,6 +61,9 @@ and then manually edited:
<Component Id="cmp74961776CCC7B203F500FE261DC12F92" Directory="dirAA72FFDDFA224FB221D53750596B0142" Guid="FBA2569C-554D-4C06-88FC-0FD6541B5B4B">
<File Id="filB82A767EB9971018C006215A9FDE77EF" KeyPath="yes" Source="$(var.SourceDir)\bin\gpg-connect-agent.exe"/>
</Component>
+ <Component Id="cmp74961776CCC7B203F500FE261DC12F94" Directory="dirAA72FFDDFA224FB221D53750596B0144" Guid="FBA2569C-554D-4C06-88FC-0FD6541B5B4C">
+ <File Id="filB82A767EB9971018C006215A9FDE77F1" KeyPath="yes" Source="$(var.SourceDir)\bin\gpg-card.exe"/>
+ </Component>
<Component Id="cmp6C1FB70721B208E33DB24296B93AB93F" Directory="dirAA72FFDDFA224FB221D53750596B0142" Guid="FE29D2AA-3151-4421-B8C0-355F69F267A1">
<File Id="fil563D2C0464DCE7ECADE6E15C0FC65821" KeyPath="yes" Source="$(var.SourceDir)\libexec\gpg-preset-passphrase.exe"/>
</Component>
@@ -164,7 +167,7 @@ and then manually edited:
<File Id="fil322067E40CE41C36574A7CC520D75877" KeyPath="yes" Source="$(var.SourceDir)\share\doc\gnupg\examples\Automatic.prf" Name="Automatic.prf"/>
</Component>
<Component Id="cmp909B0412FDFCFD5092D93932AF982A74" Directory="dirC2E6BF1CC65903EA3A1AD83349586122" Guid="D30E7138-0D1C-48F4-8F53-E1EC6333F612">
- <File Id="fil322067E40CE41C36574A7CC520D75878" KeyPath="yes" Source="$(var.SourceDir)\share\doc\gnupg\examples\pwpatter.txt" Name="pwpattern.txt"/>
+ <File Id="fil322067E40CE41C36574A7CC520D75878" KeyPath="yes" Source="$(var.SourceDir)\share\doc\gnupg\examples\pwpattern.list" Name="pwpattern.list"/>
</Component>
<Component Id="cmp59D652F2B6BBFD90563BF58D6CE6BE7B" Directory="dirF4B1502A83344E3C92AB58989653B465" Guid="1C51D4AF-B308-40A3-B8D8-CEDA5AB2A383">
<File Id="filCB1BD20C87EE88A17D7502E26268DA65" KeyPath="yes" Source="$(var.SourceDir)\share\gnupg\distsigkey.gpg"/>
diff --git a/configure.ac b/configure.ac
index dad73ce91..07c2cbc8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1599,7 +1599,6 @@ if test "$GCC" = yes; then
if test x"$_gcc_wopt" = xyes ; then
mycflags="$mycflags -W -Wno-sign-compare -Wno-format-zero-length"
mycflags="$mycflags -Wno-missing-field-initializers"
- mycflags="$mycflags -Wno-format-zero-length"
fi
AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
@@ -1628,6 +1627,9 @@ if test "$GCC" = yes; then
else
mycflags="$mycflags -Wall"
+ if test x"$_gcc_silent_wno" = xyes ; then
+ mycflags="$mycflags -Wno-format-zero-length"
+ fi
fi
if test x"$_gcc_silent_wno" = xyes ; then