Ubuntu Pastebin

Paste from Mario at Thu, 7 Apr 2016 21:30:56 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
fwupdate:

diff --git a/debian/control b/debian/control
index 8a4bd3f..72e28ce 100644
--- a/debian/control
+++ b/debian/control
@@ -26,6 +26,7 @@ Section: admin
 Architecture: amd64 i386 armhf arm64 armel
 Multi-Arch: foreign
 Depends: ${shlibs:Depends}, ${misc:Depends}, libfwup0 (= ${binary:Version}), efibootmgr
+Provides: fwupdate-${fwupdate:efihash}
 Description: Tools to manage UEFI firmware updates
  fwupdate provides functionality to update system firmware. It has been 
  initially designed to update firmware using UEFI capsule updates, but 
diff --git a/debian/rules b/debian/rules
index 1cd009f..c9666c5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -53,6 +53,9 @@ ifneq (,$(SB_PACKAGE))
                rm -rf debian/fwupdate-images
 endif
 
+override_dh_gencontrol:
+       dh_gencontrol -- -Vfwupdate:efihash=$(shell sha256sum efi/fwup*.efi | sed 's, .*,,')
+
 override_dh_builddeb:
        dh_builddeb -- -Zxz
 ifneq (,$(SB_PACKAGE))

fwupdate-signed:
diff --git a/debian/control.in b/debian/control.in
index 8fcccf1..6305b72 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -2,13 +2,19 @@ Source: fwupdate-signed
 Section: utils
 Priority: optional
 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
-Build-Depends: debhelper (>= 9), python3, python3-apt, fwupdate (>= 0.5-2ubuntu4)
+Build-Depends: debhelper (>= 9),
+               python3,
+               python3-apt,
+               fwupdate-#AMD64_HASH# [amd64],
+               fwupdate-#I386_HASH# [i386],
+               fwupdate-#ARMHF_HASH# [armhf],
+               fwupdate-#ARM64_HASH# [arm64]
 Standards-Version: 3.9.6
 
 Package: fwupdate-signed
 Architecture: amd64 i386 armhf arm64
 Multi-Arch: foreign
-Depends: ${misc:Depends}, fwupdate (= ${fwupdate:Version})
+Depends: ${misc:Depends}, fwupdate-${fwupdate:Version})
 Recommends: secureboot-db
 Built-Using: fwupdate (= ${fwupdate:Version})
 Breaks: fwupdate-amd64-signed (<<1.9), fwupdate-i386-signed (<<1.9), fwupdate-arm64-signed (<<1.9), fwupdate-armhf-signed (<<1.9)
diff --git a/debian/rules b/debian/rules
index 8df0f8b..ecd1598 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,7 @@
 #! /usr/bin/make -f
 
 include /usr/share/dpkg/default.mk
+include debian/hashes.mk
 
 EFIDIR ?= $(shell dpkg-vendor --query vendor | awk '{ print tolower($$0) }')
 
@@ -17,11 +18,19 @@ override_dh_installchangelogs:
        ln $(docdir)/changelog $(docdir)/changelog.Debian
 
 override_dh_gencontrol:
-       dh_gencontrol -- -v$(DEB_VERSION)+$(shell cat version) \
-               -Vfwupdate:Version=$(shell cat version)
+       dh_gencontrol -- -v$(DEB_VERSION)+$($(DEB_HOST_ARCH)_hash) \
+               -Vfwupdate:Version=$($(DEB_HOST_ARCH)_hash)
 
 override_dh_auto_install:
        sed 's,#EFIDIR#,$(EFIDIR),' \
                debian/fwupdate-signed.postrm.in > debian/fwupdate-signed.postrm
        dh_auto_install --destdir=$(destdir)
 
+
+override_dh_clean:
+       sed    "s,#AMD64_HASH#,$(amd64_hash),;  \
+               s,#I386_HASH#,$(i386_hash),;  \
+               s,#ARMHF_HASH#,$(armhf_hash),;  \
+               s,#ARM64_HASH#,$(arm64_hash),;" \
+               debian/control.in > debian/control
+       dh_clean
Download as text