]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
win32: Backport signing procedures to 11.0
authorEric Bollengier <eric@baculasystems.com>
Wed, 3 Feb 2021 17:03:23 +0000 (18:03 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 4 Feb 2021 14:58:59 +0000 (15:58 +0100)
bacula/src/win32/Makefile
bacula/src/win32/Makefile.full
bacula/src/win32/Makefile.rules
bacula/src/win32/build-depkgs-mingw-w64
bacula/src/win32/filed/plugins/Makefile
bacula/src/win32/lib/Makefile
bacula/src/win32/win32_installer/Makefile
bacula/src/win32/win64_installer/Makefile

index 198254e4ef2a126c90302efe3b15d69acb48f6b3..1bbbf21422c53d5c4eb63ff8dcf0d60f11d8c70b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2020 Kern Sibbald
+# Copyright (C) 2000-2021 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
 #
 #  Makefile for Win32/Win64 Bacula File daemon
@@ -58,6 +58,7 @@ release32/bat.exe: is_depkgs_set
        ( cd ../qt-console; ./make-win32 "32" )
        test -f release32/bat.exe
        test -f release32/bacula-tray-monitor.exe
+       ./sign-binaries release32/bat.exe release32/bacula-tray-monitor.exe release32/Qt*dll release32/q*.dll
 
 bat32: release32/bat.exe release32/bacula-tray-monitor.exe
 
@@ -65,6 +66,7 @@ release64/bat.exe: is_depkgs_set
        ( cd ../qt-console; ./make-win32 "64" )
        test -f release64/bat.exe
        test -f release64/bacula-tray-monitor.exe
+       ./sign-binaries release64/bat.exe release64/bacula-tray-monitor.exe release64/Qt*dll release64/q*.dll
 
 bat64: release64/bat.exe release64/bacula-tray-monitor.exe
 
index 6ab0cd1806163c56a86b78097c9f53cf891b7958..649c3ce3a0bd2133e08f54fac9bc52b878fcd05f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2020 Kern Sibbald
+# Copyright (C) 2000-2021 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
 
 ECHO_CMD=@
index 915c0a2728d965ebeab41d4ab3f677c814aa5f97..f035205c747905a22575de9076a18cb21608b905 100644 (file)
@@ -4,7 +4,7 @@
 #
 #
 # Author: Robert Nelson
-# Copyright (C) 2000-2020 Kern Sibbald
+# Copyright (C) 2000-2021 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
 #
 #  Written by Robert Nelson, June 2006
@@ -36,12 +36,14 @@ define link_conapp
        @echo "Linking $@"
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(CFLAGS) $(LDFLAGS) -mconsole $^ $(1) -o $@
+        $(BUILDDIR)/sign-binaries $@
 endef
 
 define link_winapp
        @echo "Linking $@"
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(CFLAGS) $(LDFLAGS) -mwindows $^ $(1) -o $@
+        $(BUILDDIR)/sign-binaries $@
 endef
 
 define makedbg
index 4f2a184396e563ad81c34a2d4e826461fa19e68a..febd80e1698a923ba3ff0dc0af11f5e853e93457 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2000-2020 Kern Sibbald
+# Copyright (C) 2000-2021 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
 #
 #  This file may help you build the dependency packages that
index 800a3a6cf7300e279662b674b85e0c3d77dacf26..f9536a33e322fe9f532446aa34bc8019b95f7c69 100644 (file)
@@ -94,6 +94,7 @@ $(BINDIR)/cdp-fd.dll: $(CDP_OBJS) $(LIBS_BACULA)
        @echo "Linking $@"
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/cdp-fd.a $^ $(LIBS_DLL) -o $@
+       $(BUILDDIR)/sign-binaries $@
 
 #$(LIBDIR)/libexchange-fd.a: DLL_DEFINE=USING_DLL
 
@@ -109,6 +110,7 @@ $(BINDIR)/exchange-fd.dll: $(EXCHANGE_OBJS) exchange-fd.def
        @echo "Linking $@"
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/exchange-fd.a $^ $(LIBS_DLL) -o $@
+       $(BUILDDIR)/sign-binaries $@
 
 $(BINDIR)/bpipe-fd.dll: DLL_DEFINE=BUILDING_DLL
 
@@ -116,6 +118,7 @@ $(BINDIR)/bpipe-fd.dll: $(BPIPE_OBJS) bpipe-fd.def $(LIBS_BACULA)
        @echo "Linking $@"
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(CFLAGS) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/bpipe-fd.a $^ $(LIBS_DLL) -o $@
+       $(BUILDDIR)/sign-binaries $@
 
 $(BINDIR)/alldrives-fd.dll: DLL_DEFINE=BUILDING_DLL
 
@@ -123,6 +126,7 @@ $(BINDIR)/alldrives-fd.dll: $(OBJDIR)/alldrives-fd.o $(LIBS_BACULA)
        @echo "Linking $@"
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(CFLAGS) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/alldrives-fd.a $^ $(LIBS_DLL) -o $@
+       $(BUILDDIR)/sign-binaries $@
 
 include $(BUILDDIR)/Makefile.rules
 
index ffe1df5a1cf0e9f5801ce06e87c4b6b7bcf1f4a4..212a9e9fdb4b390d57eab079a6af4587a28b96c9 100644 (file)
@@ -174,6 +174,7 @@ $(BINDIR)/bacula.dll: $(DLL_OBJS) bacula$(WIN_VERSION).def
        @echo "Linking $@"
        $(call checkdir,$@)
        $(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/bacula.a $^ $(LIBS_DLL) -o $@
+       $(BUILDDIR)/sign-binaries $@
 
 bacula$(WIN_VERSION).def: $(DLL_OBJS)
        ./make_def$(WIN_VERSION) $(DLL_OBJS) >bacula$(WIN_VERSION).def.new && \
index 528eea1f92540c5eef893c005d8e2469f7527639..0af13e14f703c7d240e85afc782c132f3aed806d 100644 (file)
@@ -11,6 +11,8 @@
 
 include ../Makefile.inc
 
+PWD   := $(shell pwd)
+
 VERSION := $(shell sed -ne 's/^.define[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../version.h)
 RELEASE ?= $(shell awk '/define RELEASE [0-9]+/ { print $$3 }' ../../version.h)
 
@@ -121,11 +123,13 @@ release32/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
        $(ECHO_CMD)cp -f $$^ $$@ ; \
        $(STAB2CV) $$@
+       $(BUILDDIR)/sign-binaries release32/$$(notdir $(1))
 endef
 
 define Copy_Binary
 release32/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
+       $(BUILDDIR)/sign-binaries $$^
        $(ECHO_CMD)cp -f $$^ $$@
 endef
 
@@ -166,5 +170,6 @@ $(foreach file,$(addprefix $(MAINDIR)/, $(LICENSE_FILES)),$(eval $(call Copy_Lic
 $(INSTALL_EXE): winbacula.nsi $(addprefix release32/,$(BACULA_BINARIES) $(SCRIPT_FILES) $(CAT_FILES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(MINGW_BINARIES) $(SSL_FILES) $(DIRD_FILES) $(LICENSE_FILES) )
        echo "makensis -V3 $(DEFINES) winbacula.nsi"
        makensis -V3 $(DEFINES) winbacula.nsi
+       ../sign-binaries ../release32/bacula-*$(VERSION).exe 
 
 include $(BUILDDIR)/Makefile.rules
index 7f7b89a946b271d994fb86876e424c7f8440bbb5..22861cb27b2d10ac84d16c7c49ac201378a8b0a2 100644 (file)
@@ -8,6 +8,8 @@
 
 include ../Makefile.inc
 
+PWD   := $(shell pwd)
+
 VERSION := $(shell sed -ne 's/^.define[ \t]VERSION[ \t][ \t]*"\(.*\)"/\1/p' < ../../version.h)
 RELEASE ?= $(shell awk '/define RELEASE [0-9]+/ { print $$3 }' ../../version.h)
 
@@ -150,12 +152,14 @@ help:
 define Convert_Binary
 release64/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
+       $(BUILDDIR)/sign-binaries $$^
        $(ECHO_CMD)cp -f $$^ $$@
 endef
 
 define Copy_Binary
 release64/$$(notdir $(1)): $(1)
        $$(call checkdir,$$@)
+       $(BUILDDIR)/sign-binaries $$^
        $(ECHO_CMD)cp -f $$^ $$@
 endef
 
@@ -195,6 +199,7 @@ $(foreach file,$(addprefix $(MAINDIR)/, $(LICENSE_FILES)),$(eval $(call Copy_Lic
 
 $(INSTALL_EXE): winbacula.nsi $(addprefix release64/,$(BACULA_BINARIES) $(DEPKGS_BINARIES) $(SSL_FILES) $(LICENSE_FILES))
        makensis -V3 $(DEFINES) winbacula.nsi
+       ../sign-binaries ../release64/bacula-*$(VERSION).exe
        echo " "
 
 include $(BUILDDIR)/Makefile.rules