Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
packaging/{opensuse,fedora}: allow package build with testkeys included #3450
Merged
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7d0ade2
packaging/opensuse: allow building rpm with support for testkeys
7bb9c35
packaging/fedora: add support to allow builds with testkeys
193f36c
Merge remote-tracking branch 'origin/master' into f/rpm-build-with-te…
4890973
packaging/fedora: don't override GOFLAGS and drop superflous comments
1442350
packaging/opensuse: explain used go flags
5cfc197
Merge remote-tracking branch 'origin/master' into f/rpm-build-with-te…
1320943
Merge remote-tracking branch 'origin/master' into f/rpm-build-with-te…
Jump to file or symbol
Failed to load files and symbols.
| @@ -6,10 +6,15 @@ | ||
| %bcond_without vendorized | ||
| %endif | ||
| +# A switch to allow building the package with support for testkeys which | ||
| +# are used for the spread test suite of snapd. | ||
| +%bcond_with testkeys | ||
| + | ||
| %global with_devel 1 | ||
| %global with_debug 1 | ||
| %global with_check 0 | ||
| %global with_unit_test 0 | ||
| +%global with_test_keys 0 | ||
| # For the moment, we don't support all golang arches... | ||
| %global with_goarches 0 | ||
| @@ -20,6 +25,12 @@ | ||
| %global with_bundled 1 | ||
| %endif | ||
| +%if ! %{with testkeys} | ||
| +%global with_test_keys 0 | ||
| +%else | ||
| +%global with_test_keys 1 | ||
| +%endif | ||
| + | ||
| %if 0%{?with_debug} | ||
| %global _dwz_low_mem_die_limit 0 | ||
| %else | ||
| @@ -320,11 +331,19 @@ export GOPATH=$(pwd):%{gopath} | ||
| export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath} | ||
| %endif | ||
| -%gobuild -o bin/snap %{import_path}/cmd/snap | ||
| -%gobuild -o bin/snap-exec %{import_path}/cmd/snap-exec | ||
| -%gobuild -o bin/snapctl %{import_path}/cmd/snapctl | ||
| -%gobuild -o bin/snapd %{import_path}/cmd/snapd | ||
| -%gobuild -o bin/snap-update-ns %{import_path}/cmd/snap-update-ns | ||
| +GOFLAGS= | ||
morphis
Contributor
|
||
| +%if 0%{?with_test_keys} | ||
| +GOFLAGS="$GOFLAGS -tags withtestkeys" | ||
| +%endif | ||
| + | ||
| +# We have to build snapd first to prevent the build from | ||
| +# building various things from the tree without additional | ||
| +# set tags. | ||
| +%gobuild -o bin/snapd $GOFLAGS %{import_path}/cmd/snapd | ||
| +%gobuild -o bin/snap $GOFLAGS %{import_path}/cmd/snap | ||
| +%gobuild -o bin/snap-exec $GOFLAGS %{import_path}/cmd/snap-exec | ||
| +%gobuild -o bin/snapctl $GOFLAGS %{import_path}/cmd/snapctl | ||
| +%gobuild -o bin/snap-update-ns $GOFLAGS %{import_path}/cmd/snap-update-ns | ||
| # Build SELinux module | ||
| pushd ./data/selinux | ||
You're still erasing the GOFLAGS here... :(