From 5a93bafda0a257cb6790a18935fb97e6a8ee5c5b Mon Sep 17 00:00:00 2001 From: Andrew Jeddeloh Date: Thu, 19 Dec 2019 14:31:54 -0800 Subject: [PATCH 1/5] spec: add ignition-validate-nonlinux subpackage This will be used to create official release binaries to include on the upstream project's releases page. Also update to v0.34.0 --- .gitignore | 1 + ignition.spec | 58 +++++++++++++++++++++++++++++++++++++++++++-------- sources | 2 +- 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 6b92fb6..1f47016 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /ignition-f59a653.tar.gz /ignition-dracut-0d09097.tar.gz /ignition-dracut-73ec3fc.tar.gz +/ignition-92f874c.tar.gz diff --git a/ignition.spec b/ignition.spec index dd7afda..1b49a64 100644 --- a/ignition.spec +++ b/ignition.spec @@ -49,7 +49,7 @@ # https://github.com/coreos/ignition %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit f59a653629be8b1825ed4ff2f9e3d21aa87bd85a +%global commit 92f874c194d75ea32a4e63e531db3be4689b4850 %global shortcommit %(c=%{commit}; echo ${c:0:7}) # define ldflags, buildflags, testflags here. The ldflags were # taken from ./build. We will need to periodically check these @@ -70,19 +70,15 @@ %global dracutcommit 73ec3fcbc6b3bc3265586480e2d0ad76a0febb5f %global dracutshortcommit %(c=%{dracutcommit}; echo ${c:0:7}) - Name: ignition -Version: 0.31.0 -Release: 7.git%{shortcommit}%{?dist} +Version: 0.34.0 +Release: 1.git%{shortcommit}%{?dist} Summary: First boot installer and configuration tool License: ASL 2.0 and BSD URL: https://%{provider_prefix} Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz Source1: https://%{dracutprovider_prefix}/archive/%{dracutcommit}/%{dracutrepo}-%{dracutshortcommit}.tar.gz -Patch0: 0001-support-coreos.config.-and-ignition.config.patch -Patch1: 0001-stages-files-Also-relabel-subuid-subgid-files.patch - # For RHEL7 we'll want to specify gopath and list of arches since there is no # gopath or go_arches macro. We'll also want to make sure we pull in golang # 1.10 require golang >= 1.10 @@ -332,13 +328,26 @@ and applies the configuration. This package contains a tool for validating Ignition configurations. +%ifarch x86_64 +############## validate-nonlinux subpackage ############## +%package validate-nonlinux + +Summary: Validation tool for Ignition configs for MacOS and Windows. +License: ASL 2.0 + +Conflicts: ignition < 0.31.0-3 + +%description validate-nonlinux +This package is used to build the MacOS and windows ignition-validate binaries +through cross-compilation and should not be installed. It is only used for +building binaries to sign by Fedora release engineering and include on the +Ignition project's Github releases page. +%endif %prep # setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html # unpack source0 and apply patches %setup -T -b 0 -q -n %{repo}-%{commit} -%patch0 -p1 -%patch1 -p1 # unpack source1 (dracut modules) %setup -T -D -a 1 -q -n %{repo}-%{commit} @@ -369,6 +378,18 @@ echo "Building ignition..." echo "Building ignition-validate..." %gobuild -o ./ignition-validate %{import_path}/validate +%ifarch x86_64 +echo "Building MacOS ignition-validate" +export GOOS=darwin +%gobuild -o ./ignition-validate-darwin %{import_path}/validate + +echo "Building Windows ignition-validate" +export GOOS=windows +%gobuild -o ./ignition-validate-windows %{import_path}/validate + +# Set this back, just in case +export GOOS=linux +%endif %install # ignition-dracut @@ -385,6 +406,12 @@ popd >/dev/null # ignition install -d -p %{buildroot}%{_bindir} install -p -m 0755 ./ignition-validate %{buildroot}%{_bindir} + +%ifarch x86_64 +install -p -m 0755 ./ignition-validate-darwin %{buildroot}%{_bindir} +install -p -m 0755 ./ignition-validate-windows %{buildroot}%{_bindir} +%endif + # The ignition binary is only for dracut, and is dangerous to run from # the command line. Install directly into the dracut module dir. install -p -m 0755 ./ignition %{buildroot}/%{dracutlibdir}/modules.d/30ignition @@ -483,6 +510,13 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %license LICENSE %{_bindir}/%{name}-validate +%ifarch x86_64 +%files validate-nonlinux +%license LICENSE +%{_bindir}/%{name}-validate-darwin +%{_bindir}/%{name}-validate-windows +%endif + %if 0%{?with_devel} %files devel -f devel.file-list %license LICENSE @@ -497,6 +531,12 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %endif %changelog +* Thu Dec 19 2019 Andrew Jeddeloh +- Update to v0.34.0. +- Add ignition-validate-nonlinux subpackage. This should not be installed. It + is only used for building binaries to sign by Fedora release engineering and + include on the Ignition project's Github releases page. + * Fri Mar 22 2019 Dusty Mabe - 0.31.0-7.gitf59a653 - ignition-dracut: Pull in latest from spec2x branch * grub: support overriding network kcmdline args diff --git a/sources b/sources index 541fe83..7d7c5f5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (ignition-f59a653.tar.gz) = fd198a24536c037c27ab99546e94027b08c3634724324b972828ee48f8ab9e1ba4ec1bd49d6aba6337381754cb30025c5311ab85da17c645eb7503b62e9529ff +SHA512 (ignition-92f874c.tar.gz) = 5c2819f6859f909bb59464957f310cc4c479bee48ccac3b5da73e405f1dd515f55c041e1e7b0314dcd0fa45c65f5e57207672e5b2d792851f660df690e2cf836 SHA512 (ignition-dracut-73ec3fc.tar.gz) = 8583f9de45607c57dded4ece4b395e09a39b74b00da573e5915889025e577998239c16935159eb4651f5cbbeb42ae2e3562e826fef501cf9d8199e1faec212f0 From caf399ef5b2523f8a0389c681927710095c46df8 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Wed, 22 Jan 2020 13:25:49 -0500 Subject: [PATCH 2/5] Update to v0.35.0 and ignition-dracut d5d5663 --- .gitignore | 2 ++ ignition.spec | 16 +++++++++++----- sources | 4 ++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 1f47016..9a583c1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ /ignition-dracut-0d09097.tar.gz /ignition-dracut-73ec3fc.tar.gz /ignition-92f874c.tar.gz +/ignition-7afbeba.tar.gz +/ignition-dracut-d5d5663.tar.gz diff --git a/ignition.spec b/ignition.spec index 1b49a64..6bd9704 100644 --- a/ignition.spec +++ b/ignition.spec @@ -2,7 +2,7 @@ # gofed repo2spec --detect github.com/coreos/ignition --commit f7079129b8651ac51dba14c3af65692bb413c1dd --with-extra --with-build -f # With: # gofed/gofed:v1.0.1 docker image -# Modified by hand for 0.31.0 +# Modified by hand for 0.35.0 # If any of the following macros should be set otherwise, # you can wrap any of them with the following conditions: @@ -49,7 +49,7 @@ # https://github.com/coreos/ignition %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} -%global commit 92f874c194d75ea32a4e63e531db3be4689b4850 +%global commit 7afbeba044a8bf5762609fbb5f352291eeb7ad9a %global shortcommit %(c=%{commit}; echo ${c:0:7}) # define ldflags, buildflags, testflags here. The ldflags were # taken from ./build. We will need to periodically check these @@ -67,11 +67,11 @@ # https://github.com/coreos/ignition-dracut spec2x branch %global dracutprovider_prefix %{dracutprovider}.%{dracutprovider_tld}/%{dracutproject}/%{dracutrepo} %global dracutimport_path %{dracutprovider_prefix} -%global dracutcommit 73ec3fcbc6b3bc3265586480e2d0ad76a0febb5f +%global dracutcommit d5d5663bf7676d070bfd0c3b6f9f78c0a49b68e4 %global dracutshortcommit %(c=%{dracutcommit}; echo ${c:0:7}) Name: ignition -Version: 0.34.0 +Version: 0.35.0 Release: 1.git%{shortcommit}%{?dist} Summary: First boot installer and configuration tool License: ASL 2.0 and BSD @@ -501,6 +501,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %license LICENSE LICENSE.dracut %doc README.md doc/ %{dracutlibdir}/modules.d/30ignition +%{dracutlibdir}/modules.d/99emergency-timeout %{dracutlibdir}/modules.d/99journald-conf %{_sysconfdir}/grub.d/* %{_prefix}/lib/systemd/system/*.service @@ -531,7 +532,12 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %endif %changelog -* Thu Dec 19 2019 Andrew Jeddeloh +* Wed Jan 22 2020 Benjamin Gilbert - 0.35.0-1.git7afbeba +- Update to v0.35.0 +- Update to ignition-dracut d5d5663 +- Add 99emergency-timeout Dracut module + +* Thu Dec 19 2019 Andrew Jeddeloh - 0.34.0-1.git92f874c - Update to v0.34.0. - Add ignition-validate-nonlinux subpackage. This should not be installed. It is only used for building binaries to sign by Fedora release engineering and diff --git a/sources b/sources index 7d7c5f5..139da2d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (ignition-92f874c.tar.gz) = 5c2819f6859f909bb59464957f310cc4c479bee48ccac3b5da73e405f1dd515f55c041e1e7b0314dcd0fa45c65f5e57207672e5b2d792851f660df690e2cf836 -SHA512 (ignition-dracut-73ec3fc.tar.gz) = 8583f9de45607c57dded4ece4b395e09a39b74b00da573e5915889025e577998239c16935159eb4651f5cbbeb42ae2e3562e826fef501cf9d8199e1faec212f0 +SHA512 (ignition-7afbeba.tar.gz) = be0e5d57e866068169fe12e87ec549964f92339225bc448908cc11b4bf9c2aef88adfbb1bb54f36c581f79f793b8c7679a08daa63cb88f5cf362e3f882233aef +SHA512 (ignition-dracut-d5d5663.tar.gz) = 210591892d2cd8969b08bdcdc73252133f36317438ad38391994eb96c6b7ccc4ca5d84538e827147d547845781959165f69039818ee7925fb901f5f1ed44d7c7 From 709e1e66b3283ad8f9a5e3acca26654ee4c69e13 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Tue, 4 Feb 2020 13:55:25 -0500 Subject: [PATCH 3/5] Improve -validate-nonlinux descriptive text --- ignition.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ignition.spec b/ignition.spec index 6bd9704..b3de0a5 100644 --- a/ignition.spec +++ b/ignition.spec @@ -72,7 +72,7 @@ Name: ignition Version: 0.35.0 -Release: 1.git%{shortcommit}%{?dist} +Release: 2.git%{shortcommit}%{?dist} Summary: First boot installer and configuration tool License: ASL 2.0 and BSD URL: https://%{provider_prefix} @@ -332,14 +332,14 @@ This package contains a tool for validating Ignition configurations. ############## validate-nonlinux subpackage ############## %package validate-nonlinux -Summary: Validation tool for Ignition configs for MacOS and Windows. +Summary: Validation tool for Ignition configs for macOS and Windows License: ASL 2.0 Conflicts: ignition < 0.31.0-3 %description validate-nonlinux -This package is used to build the MacOS and windows ignition-validate binaries -through cross-compilation and should not be installed. It is only used for +This package contains macOS and Windows ignition-validate binaries built +through cross-compilation. Do not install it. It is only used for building binaries to sign by Fedora release engineering and include on the Ignition project's Github releases page. %endif @@ -379,7 +379,7 @@ echo "Building ignition-validate..." %gobuild -o ./ignition-validate %{import_path}/validate %ifarch x86_64 -echo "Building MacOS ignition-validate" +echo "Building macOS ignition-validate" export GOOS=darwin %gobuild -o ./ignition-validate-darwin %{import_path}/validate @@ -532,6 +532,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %endif %changelog +* Tue Feb 04 2020 Benjamin Gilbert - 0.35.0-2.git7afbeba +- Improve -validate-nonlinux descriptive text + * Wed Jan 22 2020 Benjamin Gilbert - 0.35.0-1.git7afbeba - Update to v0.35.0 - Update to ignition-dracut d5d5663 From d945c630bc2daaeae8af4e4f912c7cc37db21587 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Tue, 4 Feb 2020 14:14:25 -0500 Subject: [PATCH 4/5] Switch -validate-nonlinux to noarch; move files to /usr/share/ignition We shouldn't put non-Linux binaries in /usr/bin. They're opaque data as far as Linux is concerned, and we can build them on any arch. Switch the subpackage to noarch, move the binaries to /usr/share/ignition, and make them non-executable. Rename files to include architecture triples, and in the Windows case, the necessary .exe suffix. These names match the ones used for FCCT binaries. For macOS the name now matches the actual name used on the GitHub releases page; for Windows this is a change. --- ignition.spec | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/ignition.spec b/ignition.spec index b3de0a5..68b3e12 100644 --- a/ignition.spec +++ b/ignition.spec @@ -328,12 +328,12 @@ and applies the configuration. This package contains a tool for validating Ignition configurations. -%ifarch x86_64 ############## validate-nonlinux subpackage ############## %package validate-nonlinux -Summary: Validation tool for Ignition configs for macOS and Windows -License: ASL 2.0 +Summary: Validation tool for Ignition configs for macOS and Windows +License: ASL 2.0 +BuildArch: noarch Conflicts: ignition < 0.31.0-3 @@ -342,7 +342,6 @@ This package contains macOS and Windows ignition-validate binaries built through cross-compilation. Do not install it. It is only used for building binaries to sign by Fedora release engineering and include on the Ignition project's Github releases page. -%endif %prep # setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html @@ -378,18 +377,19 @@ echo "Building ignition..." echo "Building ignition-validate..." %gobuild -o ./ignition-validate %{import_path}/validate -%ifarch x86_64 echo "Building macOS ignition-validate" +export GOARCH=amd64 export GOOS=darwin -%gobuild -o ./ignition-validate-darwin %{import_path}/validate +%gobuild -o ./ignition-validate-x86_64-apple-darwin %{import_path}/validate echo "Building Windows ignition-validate" +export GOARCH=amd64 export GOOS=windows -%gobuild -o ./ignition-validate-windows %{import_path}/validate +%gobuild -o ./ignition-validate-x86_64-pc-windows-gnu.exe %{import_path}/validate # Set this back, just in case +export GOARCH= export GOOS=linux -%endif %install # ignition-dracut @@ -407,10 +407,9 @@ popd >/dev/null install -d -p %{buildroot}%{_bindir} install -p -m 0755 ./ignition-validate %{buildroot}%{_bindir} -%ifarch x86_64 -install -p -m 0755 ./ignition-validate-darwin %{buildroot}%{_bindir} -install -p -m 0755 ./ignition-validate-windows %{buildroot}%{_bindir} -%endif +install -d -p %{buildroot}%{_datadir}/ignition +install -p -m 0644 ./ignition-validate-x86_64-apple-darwin %{buildroot}%{_datadir}/ignition +install -p -m 0644 ./ignition-validate-x86_64-pc-windows-gnu.exe %{buildroot}%{_datadir}/ignition # The ignition binary is only for dracut, and is dangerous to run from # the command line. Install directly into the dracut module dir. @@ -511,12 +510,11 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %license LICENSE %{_bindir}/%{name}-validate -%ifarch x86_64 %files validate-nonlinux %license LICENSE -%{_bindir}/%{name}-validate-darwin -%{_bindir}/%{name}-validate-windows -%endif +%dir %{_datadir}/ignition +%{_datadir}/ignition/ignition-validate-x86_64-apple-darwin +%{_datadir}/ignition/ignition-validate-x86_64-pc-windows-gnu.exe %if 0%{?with_devel} %files devel -f devel.file-list @@ -533,6 +531,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %changelog * Tue Feb 04 2020 Benjamin Gilbert - 0.35.0-2.git7afbeba +- Switch -validate-nonlinux to noarch; move files to /usr/share/ignition - Improve -validate-nonlinux descriptive text * Wed Jan 22 2020 Benjamin Gilbert - 0.35.0-1.git7afbeba From d396379e71d63d482a15b0031b3c7607fa19eb7c Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Thu, 19 May 2022 15:03:56 -0400 Subject: [PATCH 5/5] Retired in EPEL 7 --- .gitignore | 22 - ...les-Also-relabel-subuid-subgid-files.patch | 29 - ...t-coreos.config.-and-ignition.config.patch | 93 --- README.md | 3 - dead.package | 1 + download-ignition-dracut.sh | 3 - download-ignition.sh | 3 - ignition.spec | 687 ------------------ ignition.spec.orig | 348 --------- notes.txt | 61 -- parsedeps.go | 47 -- sources | 2 - tests/tests.yml | 21 - 13 files changed, 1 insertion(+), 1319 deletions(-) delete mode 100644 .gitignore delete mode 100644 0001-stages-files-Also-relabel-subuid-subgid-files.patch delete mode 100644 0001-support-coreos.config.-and-ignition.config.patch delete mode 100644 README.md create mode 100644 dead.package delete mode 100755 download-ignition-dracut.sh delete mode 100755 download-ignition.sh delete mode 100644 ignition.spec delete mode 100644 ignition.spec.orig delete mode 100644 notes.txt delete mode 100644 parsedeps.go delete mode 100644 sources delete mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 9a583c1..0000000 --- a/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -/ignition-7610725.tar.gz -/ignition-dracut-d664657.tar.gz -/ignition-cc7ebe0.tar.gz -/ignition-dracut-56aa514.tar.gz -/ignition-f707912.tar.gz -/ignition-dracut-d056287.tar.gz -/ignition-dracut-8c85eb3.tar.gz -/ignition-dracut-c09ce6f.tar.gz -/ignition-dracut-4bdfb34.tar.gz -/ignition-dracut-7ee64ca.tar.gz -/ignition-dracut-decf63f.tar.gz -/ignition-dracut-7b83454.tar.gz -/ignition-b1ab0b2.tar.gz -/ignition-308d7a0.tar.gz -/ignition-dracut-fa7131b.tar.gz -/ignition-dracut-2c69925.tar.gz -/ignition-f59a653.tar.gz -/ignition-dracut-0d09097.tar.gz -/ignition-dracut-73ec3fc.tar.gz -/ignition-92f874c.tar.gz -/ignition-7afbeba.tar.gz -/ignition-dracut-d5d5663.tar.gz diff --git a/0001-stages-files-Also-relabel-subuid-subgid-files.patch b/0001-stages-files-Also-relabel-subuid-subgid-files.patch deleted file mode 100644 index 6e62173..0000000 --- a/0001-stages-files-Also-relabel-subuid-subgid-files.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6e7a0683788906bb7ae21a708d5519481d6d058f Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Wed, 20 Mar 2019 16:14:29 -0400 -Subject: [PATCH] stages/files: Also relabel subuid/subgid files - -Those get touched by `useradd` and so we need relabeling if we added any -users or groups. - -Closes: #762 ---- - internal/exec/stages/files/passwd.go | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/internal/exec/stages/files/passwd.go b/internal/exec/stages/files/passwd.go -index 1ae0f02..58fde2e 100644 ---- a/internal/exec/stages/files/passwd.go -+++ b/internal/exec/stages/files/passwd.go -@@ -38,6 +38,8 @@ func (s *stage) createPasswd(config types.Config) error { - "/etc/group*", - "/etc/shadow*", - "/etc/gshadow*", -+ "/etc/subuid*", -+ "/etc/subgid*", - "/etc/.pwd.lock", - "/home", - "/root", --- -2.20.1 - diff --git a/0001-support-coreos.config.-and-ignition.config.patch b/0001-support-coreos.config.-and-ignition.config.patch deleted file mode 100644 index 99b09f6..0000000 --- a/0001-support-coreos.config.-and-ignition.config.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 41faa514b2598386c3a0c8a90ebd207e282cd1d5 Mon Sep 17 00:00:00 2001 -From: Michael Nguyen -Date: Fri, 1 Mar 2019 12:10:47 -0500 -Subject: [PATCH] support coreos.config.* and ignition.config.* - -This is backwards compatibility work for spec2x following the changes -made in #663 to make options more distribution neutral. - -ref: https://github.com/coreos/ignition/pull/663 ---- - internal/providers/cmdline/cmdline.go | 13 ++++++------- - internal/providers/vmware/vmware_amd64.go | 20 ++++++++++++++++---- - 2 files changed, 22 insertions(+), 11 deletions(-) - -diff --git a/internal/providers/cmdline/cmdline.go b/internal/providers/cmdline/cmdline.go -index 0bdba2d..1a393fb 100644 ---- a/internal/providers/cmdline/cmdline.go -+++ b/internal/providers/cmdline/cmdline.go -@@ -32,7 +32,8 @@ import ( - ) - - const ( -- cmdlineUrlFlag = "coreos.config.url" -+ cmdlineUrlFlagLegacy = "coreos.config.url" -+ cmdlineUrlFlag = "ignition.config.url" - ) - - func FetchConfig(f resource.Fetcher) (types.Config, report.Report, error) { -@@ -83,12 +84,10 @@ func parseCmdline(cmdline []byte) (url string) { - parts := strings.SplitN(strings.TrimSpace(arg), "=", 2) - key := parts[0] - -- if key != cmdlineUrlFlag { -- continue -- } -- -- if len(parts) == 2 { -- url = parts[1] -+ if key == cmdlineUrlFlagLegacy || key == cmdlineUrlFlag { -+ if len(parts) == 2 { -+ url = parts[1] -+ } - } - } - -diff --git a/internal/providers/vmware/vmware_amd64.go b/internal/providers/vmware/vmware_amd64.go -index e26baf0..9c0ffc7 100644 ---- a/internal/providers/vmware/vmware_amd64.go -+++ b/internal/providers/vmware/vmware_amd64.go -@@ -54,6 +54,8 @@ func fetchRawConfig(f resource.Fetcher) (config, error) { - - var ovfData string - var ovfEncoding string -+ var ovfDataKey string -+ var ovfEncodingKey string - - ovfEnv, err := info.String("ovfenv", "") - if err != nil { -@@ -65,17 +67,27 @@ func fetchRawConfig(f resource.Fetcher) (config, error) { - f.Logger.Warning("failed to parse OVF environment: %v. Continuing...", err) - } - -- ovfData = env.Properties["guestinfo.coreos.config.data"] -- ovfEncoding = env.Properties["guestinfo.coreos.config.data.encoding"] -+ if _, ok := env.Properties["guestinfo.coreos.config.data"]; ok { -+ ovfDataKey = "guestinfo.coreos.config.data" -+ ovfEncodingKey = "guestinfo.coreos.config.data.encoding" -+ } else if _, ok := env.Properties["guestinfo.ignition.config.data"]; ok { -+ ovfDataKey = "guestinfo.ignition.config.data" -+ ovfEncodingKey = "guestinfo.ignition.config.data.encoding" -+ } else { -+ f.Logger.Debug("failed to find guestinfo ignition properties") -+ } -+ -+ ovfData = env.Properties[ovfDataKey] -+ ovfEncoding = env.Properties[ovfEncodingKey] - } - -- data, err := info.String("coreos.config.data", ovfData) -+ data, err := info.String(ovfDataKey[len("guestinfo."):], ovfData) - if err != nil { - f.Logger.Debug("failed to fetch config: %v", err) - return config{}, err - } - -- encoding, err := info.String("coreos.config.data.encoding", ovfEncoding) -+ encoding, err := info.String(ovfEncodingKey[len("guestinfo."):], ovfEncoding) - if err != nil { - f.Logger.Debug("failed to fetch config encoding: %v", err) - return config{}, err --- -2.19.1 - diff --git a/README.md b/README.md deleted file mode 100644 index 603e19f..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# ignition - -The ignition package \ No newline at end of file diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..520a80a --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Retired in EPEL 7 diff --git a/download-ignition-dracut.sh b/download-ignition-dracut.sh deleted file mode 100755 index 38c76af..0000000 --- a/download-ignition-dracut.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -xeuo pipefail -rpmspec -P ignition.spec | grep 'Source1:' | tr -s ' ' | cut -d ' ' -f 2 | xargs wget diff --git a/download-ignition.sh b/download-ignition.sh deleted file mode 100755 index 02ff383..0000000 --- a/download-ignition.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -xeuo pipefail -rpmspec -P ignition.spec | grep 'Source0:' | tr -s ' ' | cut -d ' ' -f 2 | xargs wget diff --git a/ignition.spec b/ignition.spec deleted file mode 100644 index 68b3e12..0000000 --- a/ignition.spec +++ /dev/null @@ -1,687 +0,0 @@ -# Original spec file for 0.28.0 as generated by: -# gofed repo2spec --detect github.com/coreos/ignition --commit f7079129b8651ac51dba14c3af65692bb413c1dd --with-extra --with-build -f -# With: -# gofed/gofed:v1.0.1 docker image -# Modified by hand for 0.35.0 - -# If any of the following macros should be set otherwise, -# you can wrap any of them with the following conditions: -# - %%if 0%%{centos} == 7 -# - %%if 0%%{?rhel} == 7 -# - %%if 0%%{?fedora} == 23 -# Or just test for particular distribution: -# - %%if 0%%{centos} -# - %%if 0%%{?rhel} -# - %%if 0%%{?fedora} -# -# Be aware, on centos, both %%rhel and %%centos are set. If you want to test -# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition. -# (Don't forget to replace double percentage symbol with single one in order to apply a condition) - -# Not all devel deps exist in Fedora so you can't install the devel rpm -# so we need to build without devel for now -# Generate devel rpm -%global with_devel 0 -# Build project from bundled dependencies -%global with_bundled 1 -# Build with debug info rpm -%global with_debug 1 -# Run tests in check section -%global with_check 1 -# Generate unit-test rpm -%global with_unit_test 1 - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%if ! 0%{?gobuild:1} -%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; -%endif - -# macros for Ignition -%global provider github -%global provider_tld com -%global project coreos -%global repo ignition -# https://github.com/coreos/ignition -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit 7afbeba044a8bf5762609fbb5f352291eeb7ad9a -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -# define ldflags, buildflags, testflags here. The ldflags were -# taken from ./build. We will need to periodically check these -# for consistency -%global ldflags ' -X github.com/coreos/ignition/internal/version.Raw=%{version} ' -%global buildflags %nil -%global testflags %nil - -# macros for ignition-dracut -%global dracutlibdir %{_prefix}/lib/dracut -%global dracutprovider github -%global dracutprovider_tld com -%global dracutproject coreos -%global dracutrepo ignition-dracut -# https://github.com/coreos/ignition-dracut spec2x branch -%global dracutprovider_prefix %{dracutprovider}.%{dracutprovider_tld}/%{dracutproject}/%{dracutrepo} -%global dracutimport_path %{dracutprovider_prefix} -%global dracutcommit d5d5663bf7676d070bfd0c3b6f9f78c0a49b68e4 -%global dracutshortcommit %(c=%{dracutcommit}; echo ${c:0:7}) - -Name: ignition -Version: 0.35.0 -Release: 2.git%{shortcommit}%{?dist} -Summary: First boot installer and configuration tool -License: ASL 2.0 and BSD -URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz -Source1: https://%{dracutprovider_prefix}/archive/%{dracutcommit}/%{dracutrepo}-%{dracutshortcommit}.tar.gz - -# For RHEL7 we'll want to specify gopath and list of arches since there is no -# gopath or go_arches macro. We'll also want to make sure we pull in golang -# 1.10 require golang >= 1.10 -%if 0%{?rhel} <= 7 && 0%{?centos} == 0 -%define gopath %{_datadir}/gocode -ExclusiveArch: x86_64 ppc64le aarch64 s390x -BuildRequires: golang >= 1.10 -%else -# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required -ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}} -# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} -%endif - -# add non golang BuildRequires that weren't detected -BuildRequires: libblkid-devel - -# Requires for 'disks' stage -%if 0%{?fedora} -Requires: btrfs-progs -%endif -Requires: dosfstools -Requires: gdisk -Requires: dracut -Requires: dracut-network - -Obsoletes: ignition-dracut < 0.31.0-3 - -# Main rpm package BuildRequires -%if ! 0%{?with_bundled} -# Remaining dependencies not included in main packages (sorted) -BuildRequires: golang(github.com/ajeddeloh/go-json) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/awserr) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session) -BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3) -BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager) -BuildRequires: golang(github.com/coreos/go-semver/semver) -BuildRequires: golang(github.com/coreos/go-systemd/dbus) -BuildRequires: golang(github.com/coreos/go-systemd/unit) -BuildRequires: golang(github.com/pborman/uuid) -BuildRequires: golang(github.com/pin/tftp) -BuildRequires: golang(github.com/sigma/vmw-guestinfo/rpcvmx) -BuildRequires: golang(github.com/sigma/vmw-guestinfo/vmcheck) -BuildRequires: golang(github.com/vincent-petithory/dataurl) -BuildRequires: golang(github.com/vmware/vmw-ovflib) -%endif - -# Main package Provides (generated with parsedeps.go | sort) -%if 0%{?with_bundled} -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awserr)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awsutil)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client/metadata)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/corehandlers)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/endpointcreds)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/stscreds)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/defaults)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/ec2metadata)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/endpoints)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/request)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/session)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/signer/v4)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/aws)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/shareddefaults)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query/queryutil)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/rest)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/restxml)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3iface)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3manager)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sts)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0 -Provides: bundled(golang(github.com/coreos/go-semver/semver)) = %{version}-294930c1e79c64e7dbe360054274fdad492c8cf5 -Provides: bundled(golang(github.com/coreos/go-systemd/dbus)) = %{version}-9002847aa1425fb6ac49077c0a630b3b67e0fbfd -Provides: bundled(golang(github.com/coreos/go-systemd/unit)) = %{version}-9002847aa1425fb6ac49077c0a630b3b67e0fbfd -Provides: bundled(golang(github.com/pin/tftp/netascii)) = %{version}-9ea92f6b1029bc1bf3072bba195c84bb9b0370e3 -Provides: bundled(golang(github.com/sigma/vmw-guestinfo/rpcvmx)) = %{version}-95dd4126d6e8b4ef1970b3f3fe2e8cdd470d2903 -Provides: bundled(golang(github.com/sigma/vmw-guestinfo/vmcheck)) = %{version}-95dd4126d6e8b4ef1970b3f3fe2e8cdd470d2903 -Provides: bundled(golang(github.com/vmware/vmw-guestinfo/bdoor)) = %{version}-25eff159a728be87e103a0b8045e08273f4dbec4 -Provides: bundled(golang(github.com/vmware/vmw-guestinfo/message)) = %{version}-25eff159a728be87e103a0b8045e08273f4dbec4 -Provides: bundled(golang(github.com/vmware/vmw-guestinfo/rpcout)) = %{version}-25eff159a728be87e103a0b8045e08273f4dbec4 -Provides: bundled(golang(go4.org/errorutil)) = %{version}-03efcb870d84809319ea509714dd6d19a1498483 -%endif - - -%description -Ignition is a utility used to manipulate systems during the initramfs. -This includes partitioning disks, formatting partitions, writing files -(regular files, systemd units, networkd units, etc.), and configuring -users. On first boot, Ignition reads its configuration from a source -of truth (remote URL, network metadata service, hypervisor bridge, etc.) -and applies the configuration. - -############## devel subpackage ############## - -%if 0%{?with_devel} -%package devel -Summary: %{summary} -BuildArch: noarch -License: ASL 2.0 - -# devel subpackage BuildRequires -%if 0%{?with_check} && ! 0%{?with_bundled} -# These buildrequires are only for our tests (check) (sorted) -BuildRequires: golang(github.com/ajeddeloh/go-json) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/awserr) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session) -BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3) -BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager) -BuildRequires: golang(github.com/coreos/go-semver/semver) -BuildRequires: golang(github.com/coreos/go-systemd/dbus) -BuildRequires: golang(github.com/coreos/go-systemd/unit) -BuildRequires: golang(github.com/pborman/uuid) -BuildRequires: golang(github.com/pin/tftp) -BuildRequires: golang(github.com/sigma/vmw-guestinfo/rpcvmx) -BuildRequires: golang(github.com/sigma/vmw-guestinfo/vmcheck) -BuildRequires: golang(github.com/vincent-petithory/dataurl) -BuildRequires: golang(github.com/vmware/vmw-ovflib) -%endif - -# devel subpackage Requires. This is basically the source code from -# all of the libraries that ignition imports during build. (sorted) -Requires: golang(github.com/ajeddeloh/go-json) -Requires: golang(github.com/aws/aws-sdk-go/aws) -Requires: golang(github.com/aws/aws-sdk-go/aws/awserr) -Requires: golang(github.com/aws/aws-sdk-go/aws/credentials) -Requires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds) -Requires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata) -Requires: golang(github.com/aws/aws-sdk-go/aws/session) -Requires: golang(github.com/aws/aws-sdk-go/service/s3) -Requires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager) -Requires: golang(github.com/coreos/go-semver/semver) -Requires: golang(github.com/coreos/go-systemd/dbus) -Requires: golang(github.com/coreos/go-systemd/unit) -Requires: golang(github.com/pborman/uuid) -Requires: golang(github.com/pin/tftp) -Requires: golang(github.com/sigma/vmw-guestinfo/rpcvmx) -Requires: golang(github.com/sigma/vmw-guestinfo/vmcheck) -Requires: golang(github.com/vincent-petithory/dataurl) -Requires: golang(github.com/vmware/vmw-ovflib) - -# devel subpackage Provides (sorted) -Provides: golang(%{import_path}/config/shared/errors) = %{version}-%{release} -Provides: golang(%{import_path}/config/shared/validations) = %{version}-%{release} -Provides: golang(%{import_path}/config/shared) = %{version}-%{release} -Provides: golang(%{import_path}/config/util) = %{version}-%{release} -Provides: golang(%{import_path}/config/v1/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v1) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_0/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_0) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_1/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_1) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_2/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_2) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_3_experimental/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_3_experimental) = %{version}-%{release} -Provides: golang(%{import_path}/config/validate/astjson) = %{version}-%{release} -Provides: golang(%{import_path}/config/validate/astnode) = %{version}-%{release} -Provides: golang(%{import_path}/config/validate/report) = %{version}-%{release} -Provides: golang(%{import_path}/config/validate) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/files) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/filesystems) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/general) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/networkd) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/partitions) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/regression) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/security) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/timeouts) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/files) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/filesystems) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/general) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/networkd) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/oem) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/partitions) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/passwd) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/regression) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/security) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/systemd) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/timeouts) = %{version}-%{release} -Provides: golang(%{import_path}/tests/register) = %{version}-%{release} -Provides: golang(%{import_path}/tests/registry) = %{version}-%{release} -Provides: golang(%{import_path}/tests/types) = %{version}-%{release} -Provides: golang(%{import_path}/tests) = %{version}-%{release} - -%description devel -%{summary} - -This package contains library source intended for -building other packages which use import path with -%{import_path} prefix. -%endif - -############## unit-test-devel subpackage ############## -%if 0%{?with_unit_test} && 0%{?with_devel} -%package unit-test-devel -Summary: Unit tests for %{name} package -License: ASL 2.0 -%if 0%{?with_check} -#Here comes all BuildRequires: PACKAGE the unit tests -#in %%check section need for running -%endif - -# test subpackage tests code from devel subpackage -Requires: %{name}-devel = %{version}-%{release} - -%if 0%{?with_check} && ! 0%{?with_bundled} -BuildRequires: golang(github.com/stretchr/testify/assert) -%endif - -Requires: golang(github.com/stretchr/testify/assert) - -%description unit-test-devel -%{summary} - -This package contains unit tests for project -providing packages with %{import_path} prefix. -%endif - - -############## validate subpackage ############## -%package validate - -Summary: Validation tool for Ignition configs -License: ASL 2.0 - -Conflicts: ignition < 0.31.0-3 - -%description validate -Ignition is a utility used to manipulate systems during the initramfs. -This includes partitioning disks, formatting partitions, writing files -(regular files, systemd units, networkd units, etc.), and configuring -users. On first boot, Ignition reads its configuration from a source -of truth (remote URL, network metadata service, hypervisor bridge, etc.) -and applies the configuration. - -This package contains a tool for validating Ignition configurations. - -############## validate-nonlinux subpackage ############## -%package validate-nonlinux - -Summary: Validation tool for Ignition configs for macOS and Windows -License: ASL 2.0 -BuildArch: noarch - -Conflicts: ignition < 0.31.0-3 - -%description validate-nonlinux -This package contains macOS and Windows ignition-validate binaries built -through cross-compilation. Do not install it. It is only used for -building binaries to sign by Fedora release engineering and include on the -Ignition project's Github releases page. - -%prep -# setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html -# unpack source0 and apply patches -%setup -T -b 0 -q -n %{repo}-%{commit} - -# unpack source1 (dracut modules) -%setup -T -D -a 1 -q -n %{repo}-%{commit} -cd %{dracutrepo}-%{dracutcommit} -mv LICENSE ../LICENSE.dracut - -%build -# Set up PWD as a proper import path for go -mkdir -p src/%{provider}.%{provider_tld}/%{project} -ln -s ../../../ src/%{import_path} - -%if ! 0%{?with_bundled} -export GOPATH=$(pwd):%{gopath} -%else -# No dependency directories so far -export GOPATH=$(pwd):%{gopath} -%endif - -export LDFLAGS=%{ldflags} -# Tell ignition where to find chroot binary -export LDFLAGS+=' -X github.com/coreos/ignition/internal/distro.chrootCmd=%{_sbindir}/chroot ' -# Enable SELinux relabeling -export LDFLAGS+=' -X github.com/coreos/ignition/internal/distro.selinuxRelabel=true ' - -echo "Building ignition..." -%gobuild -o ./ignition %{import_path}/internal - -echo "Building ignition-validate..." -%gobuild -o ./ignition-validate %{import_path}/validate - -echo "Building macOS ignition-validate" -export GOARCH=amd64 -export GOOS=darwin -%gobuild -o ./ignition-validate-x86_64-apple-darwin %{import_path}/validate - -echo "Building Windows ignition-validate" -export GOARCH=amd64 -export GOOS=windows -%gobuild -o ./ignition-validate-x86_64-pc-windows-gnu.exe %{import_path}/validate - -# Set this back, just in case -export GOARCH= -export GOOS=linux - -%install -# ignition-dracut -install -d -p %{buildroot}/%{dracutlibdir}/modules.d -install -d -p %{buildroot}/%{_prefix}/lib/systemd/system -install -d -p %{buildroot}/%{_sysconfdir}/grub.d -pushd %{dracutrepo}-%{dracutcommit} >/dev/null -rm dracut/README.txt -cp -r dracut/* %{buildroot}/%{dracutlibdir}/modules.d/ -install -m 0644 -t %{buildroot}/%{_prefix}/lib/systemd/system/ systemd/* -install -m 0755 -t %{buildroot}/%{_sysconfdir}/grub.d/ grub/* -popd >/dev/null - -# ignition -install -d -p %{buildroot}%{_bindir} -install -p -m 0755 ./ignition-validate %{buildroot}%{_bindir} - -install -d -p %{buildroot}%{_datadir}/ignition -install -p -m 0644 ./ignition-validate-x86_64-apple-darwin %{buildroot}%{_datadir}/ignition -install -p -m 0644 ./ignition-validate-x86_64-pc-windows-gnu.exe %{buildroot}%{_datadir}/ignition - -# The ignition binary is only for dracut, and is dangerous to run from -# the command line. Install directly into the dracut module dir. -install -p -m 0755 ./ignition %{buildroot}/%{dracutlibdir}/modules.d/30ignition - -# source codes for building projects -%if 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list -# find all *.go but no *_test.go files and generate devel.file-list -for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname "*_test.go" | grep -v "vendor") ; do - dirprefix=$(dirname $file) - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list - - while [ "$dirprefix" != "." ]; do - echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >> devel.file-list - dirprefix=$(dirname $dirprefix) - done -done -%endif - -# testing files for this project -%if 0%{?with_unit_test} && 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -# find all *_test.go files and generate unit-test-devel.file-list -for file in $(find . -iname "*_test.go" | grep -v "vendor") ; do - dirprefix=$(dirname $file) - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test-devel.file-list - - while [ "$dirprefix" != "." ]; do - echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >> devel.file-list - dirprefix=$(dirname $dirprefix) - done -done -%endif - -%if 0%{?with_devel} -sort -u -o devel.file-list devel.file-list -%endif - -%check -%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} -%if ! 0%{?with_bundled} -export GOPATH=%{buildroot}/%{gopath}:%{gopath} -%else -# Since we aren't packaging up the vendor directory we need to link -# back to it somehow. Hack it up so that we can add the vendor -# directory from BUILD dir as a gopath to be searched when executing -# tests from the BUILDROOT dir. -ln -s ./ ./vendor/src # ./vendor/src -> ./vendor - -export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} -%endif - -%if ! 0%{?gotest:1} -%global gotest go test -%endif - -%gotest %{import_path}/config/v1 -%gotest %{import_path}/config/v1/types -%gotest %{import_path}/config/v2_0 -%gotest %{import_path}/config/v2_0/types -%gotest %{import_path}/config/v2_1 -%gotest %{import_path}/config/v2_1/types -%gotest %{import_path}/config/v2_2 -%gotest %{import_path}/config/v2_2/types -%gotest %{import_path}/config/v2_3 -%gotest %{import_path}/config/v2_3/types -%gotest %{import_path}/config/v2_4_experimental -%gotest %{import_path}/config/v2_4_experimental/types -%gotest %{import_path}/config/validate -%gotest %{import_path}/internal/config -%gotest %{import_path}/internal/exec/stages/files -%gotest %{import_path}/internal/exec/util -%gotest %{import_path}/internal/registry -%gotest %{import_path}/internal/util -%gotest %{import_path}/tests -%endif - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%license LICENSE LICENSE.dracut -%doc README.md doc/ -%{dracutlibdir}/modules.d/30ignition -%{dracutlibdir}/modules.d/99emergency-timeout -%{dracutlibdir}/modules.d/99journald-conf -%{_sysconfdir}/grub.d/* -%{_prefix}/lib/systemd/system/*.service - -%files validate -%doc README.md -%license LICENSE -%{_bindir}/%{name}-validate - -%files validate-nonlinux -%license LICENSE -%dir %{_datadir}/ignition -%{_datadir}/ignition/ignition-validate-x86_64-apple-darwin -%{_datadir}/ignition/ignition-validate-x86_64-pc-windows-gnu.exe - -%if 0%{?with_devel} -%files devel -f devel.file-list -%license LICENSE -%doc README.md code-of-conduct.md CONTRIBUTING.md -%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} -%endif - -%if 0%{?with_unit_test} && 0%{?with_devel} -%files unit-test-devel -f unit-test-devel.file-list -%license LICENSE -%doc README.md code-of-conduct.md CONTRIBUTING.md -%endif - -%changelog -* Tue Feb 04 2020 Benjamin Gilbert - 0.35.0-2.git7afbeba -- Switch -validate-nonlinux to noarch; move files to /usr/share/ignition -- Improve -validate-nonlinux descriptive text - -* Wed Jan 22 2020 Benjamin Gilbert - 0.35.0-1.git7afbeba -- Update to v0.35.0 -- Update to ignition-dracut d5d5663 -- Add 99emergency-timeout Dracut module - -* Thu Dec 19 2019 Andrew Jeddeloh - 0.34.0-1.git92f874c -- Update to v0.34.0. -- Add ignition-validate-nonlinux subpackage. This should not be installed. It - is only used for building binaries to sign by Fedora release engineering and - include on the Ignition project's Github releases page. - -* Fri Mar 22 2019 Dusty Mabe - 0.31.0-7.gitf59a653 -- ignition-dracut: Pull in latest from spec2x branch - * grub: support overriding network kcmdline args -- ignition: pull in subuid/subgid files patch from spec2x branch - * stages/files: Also relabel subuid/subgid files - -* Wed Mar 20 2019 Michael Nguyen - 0.31.0-6.gitf59a653 -- Backport patch for supporting guestinfo.ignition.config.data - -* Mon Mar 18 2019 Dusty Mabe - 0.31.0-5.gitf59a653 -- Use the spec2x branch of ignition-dracut upstream -- * Since ignition-dracut master has moved to supporting ignition - spec 3.x we are applying 2.x related fixes to the spec2x - branch in the ignition-dracut repo. - * Summary of backports: https://github.com/coreos/ignition-dracut/pull/58 - -* Mon Mar 18 2019 Benjamin Gilbert - 0.31.0-4.gitf59a653 -- Move dracut modules into main ignition package -- Move ignition binary out of the PATH -- Move ignition-validate into a subpackage -- Include ignition-dracut license file -- Drop developer docs from base package - -* Mon Mar 18 2019 Colin Walters - 0.31.0-3.gitf59a653 -- Backport patch for networking - -* Mon Mar 04 2019 Dusty Mabe - 0.31.0-2.gitf59a653 -- ignition-dracut: backport patch for finding ignition.firstboot file on UEFI systems - https://github.com/coreos/ignition-dracut/pull/52 - -* Wed Feb 20 2019 Andrew Jeddeloh - 0.31.0-1.gitf59a653 -- New release 0.31.0 - -* Fri Feb 15 2019 Dusty Mabe - 0.30.0-4.git308d7a0 -- Bump to ignition-dracut 2c69925 -- * support platform configs and user configs in /boot - ^ https://github.com/coreos/ignition-dracut/pull/43 - * Add ability to parse config.ign file on boot - ^ https://github.com/coreos/ignition-dracut/pull/42 - -* Fri Feb 01 2019 Fedora Release Engineering - 0.30.0-3.git308d7a0 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 28 2019 Dusty Mabe - 0.30.0-2.git308d7a0 -- Bump to ignition-dracut fa7131b -- * 7579b92 journal: add clarifying comment for context - * a6551f1 Remount /sysroot rw (#38) - * ignition-firstboot-complete.service: Remount /boot rw - -* Sat Dec 15 2018 Benjamin Gilbert - 0.30.0-1.git308d7a0 -- New release 0.30.0 - -* Fri Dec 14 2018 Michael Nguyen - 0.29.1-3.gitb1ab0b2 -- define gopath for RHEL7 - -* Tue Dec 11 2018 Dusty Mabe - 0.29.1-2.gitb1ab0b2 -- require golang >= 1.10 and specify architecture list for RHEL7 - -* Tue Dec 11 2018 Andrew Jeddeloh - 0.29.1-1.gitb1ab0b2 -- New release 0.29.1 - -* Wed Nov 21 2018 Igor Gnatenko - 0.28.0-12.gitf707912 -- Rebuild for protobuf 3.6 in rawhide (f30) - -* Tue Nov 20 2018 Jonathan Lebon - 0.28.0-11.git7b83454 -- Bump to ignition-dracut 7b83454 - -* Thu Oct 25 2018 Dusty Mabe - 0.28.0-10.gitf707912 -- Bump to ignition-dracut decf63f -- * 03d8438 30ignition: only instmods if module available - -* Thu Oct 25 2018 Dusty Mabe - 0.28.0-9.gitf707912 -- Bump to ignition-dracut 7ee64ca -- * 3ec0b39 remove ignition-remount-sysroot.service files - * 66335f2 ignition: run files stage at original CL ordering - * 0301a03 ignition-disks.service: drop Requires=network.target - * a0bc135 ignition-ask-var-mount.service: use RemainAfterExit=yes - * ecf5779 module-setup.sh: explicitly install qemu_fw_cfg - -* Mon Oct 15 2018 Dusty Mabe - 0.28.0-8.gitf707912 -- Bump to ignition-dracut 4bdfb34 -- * 6d0763a module-setup: Make mkfs.btrfs optional - -* Wed Oct 10 2018 Jonathan Lebon - 0.28.0-7.gitf707912 -- Backport patch for handling sysctl files correctly - https://github.com/coreos/coreos-assembler/pull/128 - https://github.com/openshift/machine-config-operator/pull/123 - -* Wed Sep 26 2018 Dusty Mabe - 0.28.0-6.gitf707912 -- Bump to ignition-dracut c09ce6f -- * ce9f648 30ignition: add support for ignition-disks - -* Mon Sep 24 2018 Dusty Mabe - 0.28.0-5.gitf707912 -- Remove requires for btrfs on !fedora -- Bump to ignition-dracut 8c85eb3 -- * 26f2396 journal: Don't log to console AND kmsg - -* Mon Sep 17 2018 Jonathan Lebon - 0.28.0-4.gitf707912 -- Backport patch for relabeling /var/home on FCOS - https://github.com/coreos/fedora-coreos-config/issues/2 - -* Thu Sep 06 2018 Luca Bruno - 0.28.0-3.gitf707912 -- Add requires for disks stage - -* Thu Aug 30 2018 Dusty Mabe - 0.28.0-2.gitf707912 -- Bump to ignition-dracut d056287 -- * 3f41219 dracut/ignition: remove CL-legacy udev references -- * 92ef9dd coreos-firstboot-complete: RemainAfterExit=yes - -* Thu Aug 30 2018 Andrew Jeddeloh - 0.28.0-1.gitf707912 -- New release 0.28.0 - -* Fri Aug 17 2018 Dusty Mabe - 0.27.0-3.gitcc7ebe0 -- Bump to ignition-dracut 56aa514 - -* Wed Aug 15 2018 Jonathan Lebon - 0.27.0-2.gitcc7ebe0 -- Backport patch for /root relabeling - https://github.com/coreos/ignition/pull/613 - -* Fri Aug 10 2018 Jonathan Lebon - 0.27.0-1.gitcc7ebe0 -- New release 0.27.0 - -* Sat Jul 21 2018 Dusty Mabe - 0.26.0-0.6.git7610725 -- Bump to ignition-dracut d664657 - -* Fri Jul 13 2018 Fedora Release Engineering - 0.26.0-0.5.git7610725 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Jun 29 2018 Dusty Mabe - 0.26.0-0.4.git7610725 -- Fix building on el7 (install -D not working) - -* Fri Jun 29 2018 Dusty Mabe - 0.26.0-0.3.git7610725 -- Bump to ignition-dracut 17a201b - -* Tue Jun 26 2018 Dusty Mabe - 0.26.0-0.2.git7610725 -- Rename dustymabe/bootengine upstrem to dustymabe/ignition-dracut - -* Thu Jun 21 2018 Dusty Mabe - 0.26.0-0.1.git7610725 -- First package for Fedora - diff --git a/ignition.spec.orig b/ignition.spec.orig deleted file mode 100644 index aced5ef..0000000 --- a/ignition.spec.orig +++ /dev/null @@ -1,348 +0,0 @@ -# Original spec file as generated by: -# gofed repo2spec --detect github.com/coreos/ignition --commit f7079129b8651ac51dba14c3af65692bb413c1dd --with-extra --with-build -f -# With: -# gofed/gofed:v1.0.1 docker image - - -# If any of the following macros should be set otherwise, -# you can wrap any of them with the following conditions: -# - %%if 0%%{centos} == 7 -# - %%if 0%%{?rhel} == 7 -# - %%if 0%%{?fedora} == 23 -# Or just test for particular distribution: -# - %%if 0%%{centos} -# - %%if 0%%{?rhel} -# - %%if 0%%{?fedora} -# -# Be aware, on centos, both %%rhel and %%centos are set. If you want to test -# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition. -# (Don't forget to replace double percentage symbol with single one in order to apply a condition) - -# Generate devel rpm -%global with_devel 1 -# Build project from bundled dependencies -%global with_bundled 0 -# Build with debug info rpm -%global with_debug 1 -# Run tests in check section -%global with_check 1 -# Generate unit-test rpm -%global with_unit_test 1 - -%if 0%{?with_debug} -%global _dwz_low_mem_die_limit 0 -%else -%global debug_package %{nil} -%endif - -%if ! 0%{?gobuild:1} -%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; -%endif - -%global provider github -%global provider_tld com -%global project coreos -%global repo ignition -# https://github.com/coreos/ignition -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} -%global commit f7079129b8651ac51dba14c3af65692bb413c1dd -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - -Name: golang-%{provider}-%{project}-%{repo} -Version: 0 -Release: 0.1.git%{shortcommit}%{?dist} -Summary: !!!!FILL!!!! -# Detected licences -# - Unknown at 'LICENSE' -License: !!!!FILL!!!! -URL: https://%{provider_prefix} -Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz - -# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required -ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}} -# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} - -%if ! 0%{?with_bundled} -# validate/main.go -BuildRequires: golang(github.com/spf13/cobra) - -# Remaining dependencies not included in main packages -BuildRequires: golang(github.com/vmware/vmw-ovflib) -BuildRequires: golang(github.com/coreos/go-systemd/unit) -BuildRequires: golang(github.com/coreos/go-semver/semver) -BuildRequires: golang(github.com/sigma/vmw-guestinfo/vmcheck) -BuildRequires: golang(github.com/pin/tftp) -BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager) -BuildRequires: golang(github.com/sigma/vmw-guestinfo/rpcvmx) -BuildRequires: golang(github.com/coreos/go-systemd/dbus) -BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session) -BuildRequires: golang(github.com/vincent-petithory/dataurl) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/awserr) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds) -BuildRequires: golang(github.com/ajeddeloh/go-json) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata) -BuildRequires: golang(github.com/pborman/uuid) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws) -%endif - -%description -%{summary} - -%if 0%{?with_devel} -%package devel -Summary: %{summary} -BuildArch: noarch - -%if 0%{?with_check} && ! 0%{?with_bundled} -BuildRequires: golang(github.com/ajeddeloh/go-json) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/awserr) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata) -BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session) -BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3) -BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager) -BuildRequires: golang(github.com/coreos/go-semver/semver) -BuildRequires: golang(github.com/coreos/go-systemd/dbus) -BuildRequires: golang(github.com/coreos/go-systemd/unit) -BuildRequires: golang(github.com/pborman/uuid) -BuildRequires: golang(github.com/pin/tftp) -BuildRequires: golang(github.com/sigma/vmw-guestinfo/rpcvmx) -BuildRequires: golang(github.com/sigma/vmw-guestinfo/vmcheck) -BuildRequires: golang(github.com/vincent-petithory/dataurl) -BuildRequires: golang(github.com/vmware/vmw-ovflib) -%endif - -Requires: golang(github.com/ajeddeloh/go-json) -Requires: golang(github.com/aws/aws-sdk-go/aws) -Requires: golang(github.com/aws/aws-sdk-go/aws/awserr) -Requires: golang(github.com/aws/aws-sdk-go/aws/credentials) -Requires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds) -Requires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata) -Requires: golang(github.com/aws/aws-sdk-go/aws/session) -Requires: golang(github.com/aws/aws-sdk-go/service/s3) -Requires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager) -Requires: golang(github.com/coreos/go-semver/semver) -Requires: golang(github.com/coreos/go-systemd/dbus) -Requires: golang(github.com/coreos/go-systemd/unit) -Requires: golang(github.com/pborman/uuid) -Requires: golang(github.com/pin/tftp) -Requires: golang(github.com/sigma/vmw-guestinfo/rpcvmx) -Requires: golang(github.com/sigma/vmw-guestinfo/vmcheck) -Requires: golang(github.com/vincent-petithory/dataurl) -Requires: golang(github.com/vmware/vmw-ovflib) - -Provides: golang(%{import_path}/config/shared) = %{version}-%{release} -Provides: golang(%{import_path}/config/shared/errors) = %{version}-%{release} -Provides: golang(%{import_path}/config/shared/validations) = %{version}-%{release} -Provides: golang(%{import_path}/config/util) = %{version}-%{release} -Provides: golang(%{import_path}/config/v1) = %{version}-%{release} -Provides: golang(%{import_path}/config/v1/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_0) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_0/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_1) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_1/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_2) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_2/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_3_experimental) = %{version}-%{release} -Provides: golang(%{import_path}/config/v2_3_experimental/types) = %{version}-%{release} -Provides: golang(%{import_path}/config/validate) = %{version}-%{release} -Provides: golang(%{import_path}/config/validate/astjson) = %{version}-%{release} -Provides: golang(%{import_path}/config/validate/astnode) = %{version}-%{release} -Provides: golang(%{import_path}/config/validate/report) = %{version}-%{release} -Provides: golang(%{import_path}/tests) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/files) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/filesystems) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/general) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/networkd) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/partitions) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/regression) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/security) = %{version}-%{release} -Provides: golang(%{import_path}/tests/negative/timeouts) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/files) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/filesystems) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/general) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/networkd) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/oem) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/partitions) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/passwd) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/regression) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/security) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/systemd) = %{version}-%{release} -Provides: golang(%{import_path}/tests/positive/timeouts) = %{version}-%{release} -Provides: golang(%{import_path}/tests/register) = %{version}-%{release} -Provides: golang(%{import_path}/tests/registry) = %{version}-%{release} -Provides: golang(%{import_path}/tests/types) = %{version}-%{release} - -%description devel -%{summary} - -This package contains library source intended for -building other packages which use import path with -%{import_path} prefix. -%endif - -%if 0%{?with_unit_test} && 0%{?with_devel} -%package unit-test-devel -Summary: Unit tests for %{name} package -%if 0%{?with_check} -#Here comes all BuildRequires: PACKAGE the unit tests -#in %%check section need for running -%endif - -# test subpackage tests code from devel subpackage -Requires: %{name}-devel = %{version}-%{release} - -%if 0%{?with_check} && ! 0%{?with_bundled} -BuildRequires: golang(github.com/stretchr/testify/assert) -%endif - -Requires: golang(github.com/stretchr/testify/assert) - -%description unit-test-devel -%{summary} - -This package contains unit tests for project -providing packages with %{import_path} prefix. -%endif - -%prep -%setup -q -n %{repo}-%{commit} - -%build -mkdir -p src/%{provider}.%{provider_tld}/%{project} -ln -s ../../../ src/%{import_path} - -%if ! 0%{?with_bundled} -export GOPATH=$(pwd):%{gopath} -%else -# No dependency directories so far -export GOPATH=$(pwd):%{gopath} -%endif - -#%gobuild -o bin/internal %{import_path}/internal -#%gobuild -o bin/internal/util/tools/docs %{import_path}/internal/util/tools/docs -#%gobuild -o bin/tests/stubs/id-stub %{import_path}/tests/stubs/id-stub -#%gobuild -o bin/tests/stubs/useradd-stub %{import_path}/tests/stubs/useradd-stub -#%gobuild -o bin/tests/stubs/usermod-stub %{import_path}/tests/stubs/usermod-stub -#%gobuild -o bin/validate %{import_path}/validate - -%install -install -d -p %{buildroot}%{_bindir} -#install -p -m 0755 bin/internal %{buildroot}%{_bindir} -#install -p -m 0755 bin/internal/util/tools/docs %{buildroot}%{_bindir} -#install -p -m 0755 bin/tests/stubs/id-stub %{buildroot}%{_bindir} -#install -p -m 0755 bin/tests/stubs/useradd-stub %{buildroot}%{_bindir} -#install -p -m 0755 bin/tests/stubs/usermod-stub %{buildroot}%{_bindir} -#install -p -m 0755 bin/validate %{buildroot}%{_bindir} - -# source codes for building projects -%if 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list -# find all *.go but no *_test.go files and generate devel.file-list -for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname "*_test.go" | grep -v "vendor") ; do - dirprefix=$(dirname $file) - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list - - while [ "$dirprefix" != "." ]; do - echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >> devel.file-list - dirprefix=$(dirname $dirprefix) - done -done -%endif - -# testing files for this project -%if 0%{?with_unit_test} && 0%{?with_devel} -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -# find all *_test.go files and generate unit-test-devel.file-list -for file in $(find . -iname "*_test.go" | grep -v "vendor") ; do - dirprefix=$(dirname $file) - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test-devel.file-list - - while [ "$dirprefix" != "." ]; do - echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >> devel.file-list - dirprefix=$(dirname $dirprefix) - done -done -%endif - -%if 0%{?with_devel} -sort -u -o devel.file-list devel.file-list -%endif - -%check -%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} -%if ! 0%{?with_bundled} -export GOPATH=%{buildroot}/%{gopath}:%{gopath} -%else -# Since we aren't packaging up the vendor directory we need to link -# back to it somehow. Hack it up so that we can add the vendor -# directory from BUILD dir as a gopath to be searched when executing -# tests from the BUILDROOT dir. -ln -s ./ ./vendor/src # ./vendor/src -> ./vendor - -export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} -%endif - -%if ! 0%{?gotest:1} -%global gotest go test -%endif - -%gotest %{import_path}/config/v1 -%gotest %{import_path}/config/v1/types -%gotest %{import_path}/config/v2_0 -%gotest %{import_path}/config/v2_0/types -%gotest %{import_path}/config/v2_1 -%gotest %{import_path}/config/v2_1/types -%gotest %{import_path}/config/v2_2 -%gotest %{import_path}/config/v2_2/types -%gotest %{import_path}/config/v2_3_experimental -%gotest %{import_path}/config/v2_3_experimental/types -%gotest %{import_path}/config/validate -%gotest %{import_path}/internal/config -%gotest %{import_path}/internal/exec/stages/files -%gotest %{import_path}/internal/exec/util -%gotest %{import_path}/internal/registry -%gotest %{import_path}/internal/util -%gotest %{import_path}/tests -%endif - -#define license tag if not already defined -%{!?_licensedir:%global license %doc} - -%files -%license LICENSE -%doc README.md code-of-conduct.md CONTRIBUTING.md -#%{_bindir}/internal -#%{_bindir}/internal/util/tools/docs -#%{_bindir}/tests/stubs/id-stub -#%{_bindir}/tests/stubs/useradd-stub -#%{_bindir}/tests/stubs/usermod-stub -#%{_bindir}/validate - -%if 0%{?with_devel} -%files devel -f devel.file-list -%license LICENSE -%doc README.md code-of-conduct.md CONTRIBUTING.md -%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} -%endif - -%if 0%{?with_unit_test} && 0%{?with_devel} -%files unit-test-devel -f unit-test-devel.file-list -%license LICENSE -%doc README.md code-of-conduct.md CONTRIBUTING.md -%endif - -%changelog* Thu Aug 30 2018 root - 0-0.1.gitf707912 -- First package for Fedora - diff --git a/notes.txt b/notes.txt deleted file mode 100644 index 0786721..0000000 --- a/notes.txt +++ /dev/null @@ -1,61 +0,0 @@ -#grab gofed from https://github.com/gofed/gofed -#follow instructions for install - -#choose which version of the repo you want to build. For ignition it was 0.2.6 and the commit was 76107251acd117c6d3e5b4dae2b47f82f944984b - -[vagrant@vanilla-f28 ~]$ gofed repo2spec --detect github.com/coreos/ignition --commit 76107251acd117c6d3e5b4dae2b47f82f944984b --with-extra --with-build -f -Repo URL: github.com/coreos/ignition -Commit: 76107251acd117c6d3e5b4dae2b47f82f944984b -Name: golang-github-coreos-ignition - -(1/4) Checking if the package already exists in PkgDB -(2/4) Collecting data -(3/4) Generating spec file -(4/4) Discovering golang dependencies -Discovering package dependencies - Class: github.com/ajeddeloh/go-json (golang-github-ajeddeloh-go-json) PkgDB=False - Class: github.com/aws/aws-sdk-go (golang-github-aws-aws-sdk-go) PkgDB=True - Class: github.com/coreos/go-semver (golang-github-coreos-go-semver) PkgDB=True - Class: github.com/coreos/go-systemd (golang-github-coreos-go-systemd) PkgDB=True - Class: github.com/pin/tftp (golang-github-pin-tftp) PkgDB=False - Class: github.com/sigma/vmw-guestinfo (golang-github-sigma-vmw-guestinfo) PkgDB=False - Class: github.com/vincent-petithory/dataurl (golang-github-vincent-petithory-dataurl) PkgDB=False - Class: github.com/vmware/vmw-ovflib (golang-github-vmware-vmw-ovflib) PkgDB=False - -Discovering test dependencies - Class: github.com/stretchr/testify (golang-github-stretchr-testify) PkgDB=True - -Spec file golang-github-coreos-ignition.spec at /home/vagrant/golang-github-coreos-ignition - -# spec file now at /home/vagrant/golang-github-coreos-ignition/golang-github-coreos-ignition.spec - -# go through and fix things up - see diff - -# generate bundled provides by copying/using parsedeps.go to the ignition -# source folder and then running `go run parsedeps.go`. copy into spec file -# should be done by gofed at some point - https://github.com/gofed/gofed/issues/42 - -# grab source tarball -# rpmspec -P ignition.spec | grep Source0 -# pushd $HOME/rpmbuild/SOURCES/ -# curl -L -O $URL -# popd - - -# build RPM -$ rpmbuild -ba ignition.spec - -# find a srpm in `$HOME/rpmbuild/SRPMS` -# find a RPM in `$HOME/rpmbuild/RPM/arch/` -# see if the dependencies are proper - -$ rpm -qpR $HOME/rpmbuild/RPMS/x86_64/ignition-0.26.0-0.1.git7610725.fc28.x86_64.rpm - - -# setup to run koji, ref: https://fedoraproject.org/wiki/Using_the_Koji_build_system -$ fedora-packager-setup -$ kinit @FEDORAPROJECT.ORG - - -# to build it on koji run: -$ koji build --scratch rawhide /path/to/srpm/ignition-0.26.0-0.1.git7610725.fc28.src.rpm diff --git a/parsedeps.go b/parsedeps.go deleted file mode 100644 index ead0537..0000000 --- a/parsedeps.go +++ /dev/null @@ -1,47 +0,0 @@ -// Helper for parsing glide.lock file and spitting out -// bundled provides statements for an rpm spec file. -package main - -import ( - "fmt" - "io/ioutil" - "log" - "path" - - yaml "gopkg.in/yaml.v2" -) - -type Import struct { - Name string - Version string - Subpackages []string -} - -type Glide struct { - Hash string - Updated string - Imports []Import - TestImports []Import -} - -func main() { - yamlFile, err := ioutil.ReadFile("glide.lock") - if err != nil { - log.Fatal(err) - } - - var glide Glide - err = yaml.Unmarshal(yamlFile, &glide) - if err != nil { - log.Fatal(err) - } - - for _, imp := range glide.Imports { - // we need format like this: - // Provides: bundled(golang(github.com/coreos/go-oidc/oauth2)) = %{version}-5cf2aa52da8c574d3aa4458f471ad6ae2240fe6b - for _, subp := range imp.Subpackages { - name := path.Join(imp.Name, subp) - fmt.Printf("Provides: bundled(golang(%s)) = %s-%s\n", name, "%{version}", imp.Version) - } - } -} diff --git a/sources b/sources deleted file mode 100644 index 139da2d..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -SHA512 (ignition-7afbeba.tar.gz) = be0e5d57e866068169fe12e87ec549964f92339225bc448908cc11b4bf9c2aef88adfbb1bb54f36c581f79f793b8c7679a08daa63cb88f5cf362e3f882233aef -SHA512 (ignition-dracut-d5d5663.tar.gz) = 210591892d2cd8969b08bdcdc73252133f36317438ad38391994eb96c6b7ccc4ca5d84538e827147d547845781959165f69039818ee7925fb901f5f1ed44d7c7 diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 7239cf6..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,21 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required-packages: - - ignition - - ignition-validate - tests: - - ignition-run-version: - dir: ./ - run: /usr/lib/dracut/modules.d/30ignition/ignition --version - - ignition-validate-run-version: - dir: ./ - run: /usr/bin/ignition-validate --version - - ignition-rpm-installed: - dir: ./ - run: /usr/bin/rpm -q ignition - - ignition-validate-rpm-installed: - dir: ./ - run: /usr/bin/rpm -q ignition-validate