-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
210 lines (184 loc) · 5.94 KB
/
Makefile.am
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
INST_KEYRINGS =
INST_KEYS =
dist_noinst_DATA =
MASTER_KEYRING = eos-master-keyring.gpg
MASTER_KEYS = \
keys/master/MK1.pub \
keys/master/MK2.pub \
$(NULL)
$(MASTER_KEYRING): $(MASTER_KEYS)
INST_KEYRINGS += $(MASTER_KEYRING)
INST_KEYS += $(MASTER_KEYS)
OSTREE_KEYRING = eos-ostree-keyring.gpg
OSTREE_KEYS = \
keys/signing/EOSK1.pub \
$(NULL)
$(OSTREE_KEYRING): $(OSTREE_KEYS)
INST_KEYRINGS += $(OSTREE_KEYRING)
INST_KEYS += $(OSTREE_KEYS)
FLATPAK_KEYRING = eos-flatpak-keyring.gpg
FLATPAK_KEYS = \
keys/signing/EFSK1.pub \
$(NULL)
$(FLATPAK_KEYRING): $(FLATPAK_KEYS)
INST_KEYRINGS += $(FLATPAK_KEYRING)
INST_KEYS += $(FLATPAK_KEYS)
IMAGE_KEYRING = eos-image-keyring.gpg
IMAGE_KEYS = \
keys/signing/EIS1.pub \
$(NULL)
$(IMAGE_KEYRING): $(IMAGE_KEYS)
INST_KEYRINGS += $(IMAGE_KEYRING)
INST_KEYS += $(IMAGE_KEYS)
ARCHIVE_KEYRING = eos-archive-keyring.gpg
ARCHIVE_KEYS = \
keys/signing/EASK1.pub \
$(NULL)
$(ARCHIVE_KEYRING): $(ARCHIVE_KEYS)
INST_KEYRINGS += $(ARCHIVE_KEYRING)
INST_KEYS += $(ARCHIVE_KEYS)
CODECS_KEYRING = eos-codecs-keyring.gpg
CODECS_KEYS = \
keys/codecs/ECAK1.pub \
keys/codecs/ECFAK1.pub \
keys/codecs/ECHKAK1.pub \
keys/codecs/ECHNDAK1.pub \
keys/codecs/ECIAK1.pub \
keys/codecs/ECMK1.pub \
keys/codecs/ECOAK1.pub \
keys/codecs/ECSOLAK1.pub \
keys/codecs/ECUAK1.pub \
$(NULL)
$(CODECS_KEYRING): $(CODECS_KEYS)
INST_KEYRINGS += $(CODECS_KEYRING)
INST_KEYS += $(CODECS_KEYS)
# Debian archive keyring for Endless infrastructure packages
# http://obs-master.endlessm-sf.com:82/shared/infra/
INFRA_KEYRING = eos-infra-archive-keyring.gpg
INFRA_KEYS = \
keys/signing/EIASK1.pub \
$(NULL)
$(INFRA_KEYRING): $(INFRA_KEYS)
INST_KEYRINGS += $(INFRA_KEYRING)
INST_KEYS += $(INFRA_KEYS)
# Endless public archive keyring for https://sources.endlessm.com/debian/
PUBARCHIVE_KEYRING = eos-pub-archive-keyring.gpg
PUBARCHIVE_KEYS = \
keys/signing/EPASK1.pub \
$(NULL)
$(PUBARCHIVE_KEYRING): $(PUBARCHIVE_KEYS)
INST_KEYRINGS += $(PUBARCHIVE_KEYRING)
INST_KEYS += $(PUBARCHIVE_KEYS)
# GPG keyring just for testing
NOINST_KEYRING = noinst-keyring.gpg
NOINST_KEYS = \
keys/signing/ESBASK1.pub \
$(NULL)
$(NOINST_KEYRING): $(NOINST_KEYS)
noinst_DATA = $(NOINST_KEYRING)
ALL_KEYRINGS = $(INST_KEYRINGS) $(NOINST_KEYRING)
ALL_KEYS = $(INST_KEYS) $(NOINST_KEYS)
EXTRA_DIST = $(ALL_KEYS)
keyringdir = $(datadir)/keyrings
keyring_DATA = $(INST_KEYRINGS)
ostree_keyringdir = $(datadir)/ostree/trusted.gpg.d
ostree_keyring_DATA = $(OSTREE_KEYRING) $(FLATPAK_KEYRING)
archive_keyringdir = $(sysconfdir)/apt/trusted.gpg.d
archive_keyring_DATA = \
$(ARCHIVE_KEYRING) \
$(INFRA_KEYRING) \
$(PUBARCHIVE_KEYRING) \
$(NULL)
$(ALL_KEYRINGS):
$(AM_V_GEN)GPG='$(GPG)' $(srcdir)/build-keyring $@ $^
# X.509 certificates
ALL_X509_CERTS =
# Endless CA certificate for internal services
# https://phabricator.endlessm.com/w/sysadmin/ssl-ca/
#
# Install a copy in both $(pkgdatadir) and $(datadir)/ca-certificates.
# It would be nice if the one in ca-certificates could be a symlink, but
# ca-certificates doesn't support that.
#
# The intermediate CA certificate is only included for expiration
# testing.
ENDLESS_CA_CERT = keys/tls/endless-ca.crt
ENDLESS_INT_CA_CERT = keys/tls/endless-intermediate-ca.crt
ALL_X509_CERTS += $(ENDLESS_CA_CERT) $(ENDLESS_INT_CA_CERT)
cacertsdir = $(datadir)/ca-certificates/endless
dist_pkgdata_DATA = $(ENDLESS_CA_CERT)
dist_cacerts_DATA = $(ENDLESS_CA_CERT)
dist_bin_SCRIPTS = \
scripts/endless-ca-trust-system \
scripts/endless-ca-trust-user \
$(NULL)
profiledir = $(sysconfdir)/profile.d
dist_profile_DATA = profile/endless-ca-trust-user.sh
dist_noinst_DATA += $(ENDLESS_INT_CA_CERT)
# Endless UEFI secure boot certificates
# https://phabricator.endlessm.com/w/software/secure_boot/
ENDLESS_EFI_CERTS = \
keys/efi/Endless-Secure-Boot-CA.crt \
keys/efi/EOS-Driver-Signing-2022.crt \
keys/efi/EOS-PAYG-KEK-CA-2019.crt \
keys/efi/EOS-PAYG-UEFI-CA-2019.crt \
keys/efi/EOS-PAYG-UEFI-Signing-2019.crt \
keys/efi/EOS-UEFI-Signing-2022.crt \
$(NULL)
ENDLESS_INACTIVE_EFI_CERTS = \
keys/efi/inactive/Endless-Secure-Boot-CA-2016.crt \
keys/efi/inactive/Endless-Secure-Boot-Signer-2016-08-01.crt \
keys/efi/inactive/Endless-Secure-Boot-Signer-2017-12-01.crt \
keys/efi/inactive/EOS-Driver-Signing-2020.crt \
keys/efi/inactive/EOS-UEFI-Signing-2019.crt \
keys/efi/inactive/EOS-UEFI-Signing-2020.crt \
$(NULL)
ALL_X509_CERTS += $(ENDLESS_EFI_CERTS)
dist_noinst_DATA += $(ENDLESS_EFI_CERTS) $(ENDLESS_INACTIVE_EFI_CERTS)
# GlobalSign EV code signing certificate
CODE_SIGNING_CERT = keys/code-signing/code-ev-2024.crt
CODE_SIGNING_EXTRA = \
keys/code-signing/code-ev-2024.csr \
keys/code-signing/globalsign-cs-r45.crt \
keys/code-signing/globalsign-ev-cs-r45.crt \
keys/code-signing/globalsign-root-r3.crt \
keys/code-signing/README.md \
$(NULL)
ALL_X509_CERTS += $(CODE_SIGNING_CERT)
dist_noinst_DATA += $(CODE_SIGNING_CERT) $(CODE_SIGNING_EXTRA)
# Configuration for test scripts
TEST_CONFIG = test-config.sh
check_DATA = $(TEST_CONFIG)
dist_noinst_DATA += $(TEST_CONFIG).in
subst_test_config = sed \
-e 's,%srcdir%,$(srcdir),' \
-e 's,%abs_srcdir%,$(abs_srcdir),' \
-e 's,%builddir%,$(builddir),' \
-e 's,%abs_builddir%,$(abs_builddir),' \
-e 's,%GPG%,$(GPG),' \
-e 's,%OPENSSL%,$(OPENSSL),' \
-e 's,%ALL_KEYRINGS%,$(ALL_KEYRINGS),' \
-e 's,%ALL_KEYS%,$(ALL_KEYS),' \
-e 's,%ALL_X509_CERTS%,$(ALL_X509_CERTS),' \
$(NULL)
$(TEST_CONFIG): $(TEST_CONFIG).in Makefile
$(AM_V_GEN)$(subst_test_config) $< > [email protected] && mv -f [email protected] $@
CLEANFILES = $(ALL_KEYRINGS) $(TEST_CONFIG)
clean-local:
rm -f *.gpg~ *.gpg.tmp *.gpg.tmp~ $(TEST_CONFIG).tmp
rm -rf gnupg
# Build scripts
dist_noinst_SCRIPTS = \
build-keyring \
$(NULL)
# Test scripts
dist_check_SCRIPTS = \
test-expiration \
test-import \
test-x509-expiration \
$(NULL)
TESTS = $(dist_check_SCRIPTS)
# Set path to test-config.sh so test scripts can find it
AM_TESTS_ENVIRONMENT = TEST_CONFIG='$(abs_builddir)/$(TEST_CONFIG)'
# Configure tests to use TAP protocol
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh