From 53583158c0d54b32eacbdf5289b99da6e054e0d0 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 15 Oct 2020 07:06:54 -0700 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/rust-afterburn#1bd8d3c01cfa1284a8eba25157d3edacc16f0f98 --- .gitignore | 12 ++ ...shkeys-activate-service-on-OpenStack.patch | 29 +++ README.md | 3 + afterburn-fix-metadata.diff | 20 ++ rust-afterburn.spec | 203 ++++++++++++++++++ sources | 1 + 6 files changed, 268 insertions(+) create mode 100644 0001-sshkeys-activate-service-on-OpenStack.patch create mode 100644 README.md create mode 100644 afterburn-fix-metadata.diff create mode 100644 rust-afterburn.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..ab86eef 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,12 @@ +/afterburn-4.1.0.crate +/afterburn-4.1.1.crate +/afterburn-4.1.2.crate +/afterburn-4.1.3.crate +/afterburn-4.2.0.crate +/afterburn-4.3.1.crate +/afterburn-4.3.2.crate +/afterburn-4.3.3.crate +/afterburn-4.4.0.crate +/afterburn-4.4.2.crate +/afterburn-4.5.0.crate +/afterburn-4.5.1.crate diff --git a/0001-sshkeys-activate-service-on-OpenStack.patch b/0001-sshkeys-activate-service-on-OpenStack.patch new file mode 100644 index 0000000..916e49f --- /dev/null +++ b/0001-sshkeys-activate-service-on-OpenStack.patch @@ -0,0 +1,29 @@ +From b6f82c63b26bc0e9447b7f58829ddf9cce9e21ca Mon Sep 17 00:00:00 2001 +From: Luca BRUNO +Date: Mon, 28 Sep 2020 16:11:31 +0000 +Subject: [PATCH] sshkeys: activate service on OpenStack + +This adds triggering condition to SSH-keys service units on OpenStack. +--- + systemd/afterburn-sshkeys@.service.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/systemd/afterburn-sshkeys@.service.in b/systemd/afterburn-sshkeys@.service.in +index 741ca25..bee9b4a 100644 +--- a/systemd/afterburn-sshkeys@.service.in ++++ b/systemd/afterburn-sshkeys@.service.in +@@ -11,9 +11,10 @@ ConditionKernelCommandLine=|ignition.platform.id=azure + ConditionKernelCommandLine=|ignition.platform.id=digitalocean + ConditionKernelCommandLine=|ignition.platform.id=exoscale + ConditionKernelCommandLine=|ignition.platform.id=gcp ++ConditionKernelCommandLine=|ignition.platform.id=ibmcloud ++ConditionKernelCommandLine=|ignition.platform.id=openstack + ConditionKernelCommandLine=|ignition.platform.id=packet + ConditionKernelCommandLine=|ignition.platform.id=vultr +-ConditionKernelCommandLine=|ignition.platform.id=ibmcloud + + [Service] + Type=oneshot +-- +2.28.0 + diff --git a/README.md b/README.md new file mode 100644 index 0000000..f70705f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# rust-afterburn + +The rust-afterburn package \ No newline at end of file diff --git a/afterburn-fix-metadata.diff b/afterburn-fix-metadata.diff new file mode 100644 index 0000000..a032729 --- /dev/null +++ b/afterburn-fix-metadata.diff @@ -0,0 +1,20 @@ +--- afterburn-4.5.1/Cargo.toml 2020-09-02T15:13:41+00:00 ++++ afterburn-4.5.1/Cargo.toml 2020-09-03T21:56:58.741161+00:00 +@@ -58,7 +58,7 @@ + version = "^0.2.1" + + [dependencies.mailparse] +-version = "^0.13" ++version = "^0.12" + + [dependencies.maplit] + version = "^1.0" +@@ -67,7 +67,7 @@ + version = "^0.3" + + [dependencies.nix] +-version = "^0.18" ++version = "^0.17" + + [dependencies.openssh-keys] + version = "^0.4" diff --git a/rust-afterburn.spec b/rust-afterburn.spec new file mode 100644 index 0000000..cdac27f --- /dev/null +++ b/rust-afterburn.spec @@ -0,0 +1,203 @@ +# Generated by rust2rpm 15 +%bcond_without check +%global __cargo_skip_build 0 + +%global dracutmodulesdir %(pkg-config --variable=dracutmodulesdir dracut || echo '/usr/lib/dracut/modules.d') + +%global crate afterburn + +Name: rust-%{crate} +Version: 4.5.1 +Release: 3%{?dist} +Summary: Simple cloud provider agent + +# Upstream license specification: Apache-2.0 +License: ASL 2.0 +URL: https://crates.io/crates/afterburn +Source: %{crates_source} +# Initial patched metadata +Patch0: afterburn-fix-metadata.diff +# https://github.com/coreos/afterburn/pull/493 +Patch1: 0001-sshkeys-activate-service-on-OpenStack.patch + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: systemd + +%global _description %{expand: +Simple cloud provider agent.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +# ASL 2.0 +# ASL 2.0 or Boost +# BSD +# MIT +# MIT or ASL 2.0 +# MPLv2.0 or MIT or ASL 2.0 +# Unlicense or MIT +# zlib +License: ASL 2.0 and MIT and BSD and zlib +%{?systemd_requires} + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%doc README.md +%{_bindir}/afterburn +%{_unitdir}/afterburn.service +%{_unitdir}/afterburn-checkin.service +%{_unitdir}/afterburn-firstboot-checkin.service +%{_unitdir}/afterburn-sshkeys@.service +%{_unitdir}/afterburn-sshkeys.target + +%post -n %{crate} +%systemd_post afterburn.service +%systemd_post afterburn-checkin.service +%systemd_post afterburn-firstboot-checkin.service +%systemd_post afterburn-sshkeys@.service + +%preun -n %{crate} +%systemd_preun afterburn.service +%systemd_preun afterburn-checkin.service +%systemd_preun afterburn-firstboot-checkin.service +%systemd_preun afterburn-sshkeys@.service + +%postun -n %{crate} +%systemd_postun afterburn.service +%systemd_postun afterburn-checkin.service +%systemd_postun afterburn-firstboot-checkin.service +%systemd_postun afterburn-sshkeys@.service + +%package -n %{crate}-dracut +Summary: Dracut modules for afterburn +BuildRequires: pkgconfig(dracut) +Requires: %{crate}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: dracut +Requires: dracut-network + +%description -n %{crate}-dracut +Dracut module that enables afterburn and corresponding services +to run in the initramfs on boot. + +%files -n %{crate}-dracut +%{dracutmodulesdir}/30afterburn/ + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +# afterburn-sshkeys@.service is by default enabled for the 'core' user in +# Fedora CoreOS. +# Based on https://github.com/coreos/afterburn/blob/master/Makefile. +sed -e 's,@DEFAULT_INSTANCE@,core,' < \ + systemd/afterburn-sshkeys@.service.in > \ + systemd/afterburn-sshkeys@.service +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install +install -Dpm0644 -t %{buildroot}%{_unitdir} \ + systemd/*.service systemd/*.target +mkdir -p %{buildroot}%{dracutmodulesdir} +cp -a dracut/* %{buildroot}%{dracutmodulesdir} + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Wed Oct 14 2020 Dusty Mabe - 4.5.1-3 +- Backport patch to get afterburn sshkeys working on openstack. + - https://github.com/coreos/afterburn/pull/493 + +* Wed Sep 30 2020 Fabio Valentini - 4.5.1-2 +- Un-downgrade mockito to 0.27. + +* Thu Sep 03 2020 Dusty Mabe - 4.5.1-1 +- Update to 4.5.1 + +* Sun Aug 16 15:01:11 GMT 2020 Igor Raits - 4.5.0-2 +- Rebuild + +* Thu Aug 13 2020 Dusty Mabe - 4.5.0-1 +- Update to 4.5.0 + +* Wed Jul 29 2020 Fedora Release Engineering - 4.4.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 24 2020 Dusty Mabe - 4.4.2-1 +- Update to 4.4.2 + +* Sat May 23 11:27:14 CEST 2020 Igor Raits - 4.4.0-1 +- Update to 4.4.0 + +* Fri May 22 11:30:58 CEST 2020 Igor Raits - 4.3.3-4 +- Update users to 0.10 + +* Mon May 18 12:54:25 CEST 2020 Igor Raits - 4.3.3-3 +- Update mockito to 0.25 + +* Sun May 17 13:37:32 CEST 2020 Igor Raits - 4.3.3-2 +- Update few dependencies + +* Fri May 01 2020 Robert Fairley - 4.3.3-1 +- Update to 4.3.3 + +* Fri Feb 28 21:23:17 CET 2020 Igor Raits - 4.3.2-1 +- Update to 4.3.2 + +* Fri Feb 21 2020 Josh Stone - 4.3.1-3 +- Bump nix to 0.17 and mockito 0.23 + +* Tue Feb 11 15:24:47 CET 2020 Igor Raits - 4.3.1-2 +- Update deps + +* Fri Feb 07 2020 Robert Fairley - 4.3.1-1 +- Update to 4.3.1 + +* Thu Jan 30 2020 Fedora Release Engineering - 4.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jan 09 2020 Josh Stone - 4.2.0-2 +- Bump to nix 0.16, mockito 0.22 + +* Tue Oct 15 2019 Robert Fairley - 4.2.0-1 +- Update to 4.2.0 + +* Sat Sep 21 13:11:54 CEST 2019 Igor Gnatenko - 4.1.3-1 +- Update to 4.1.3 + +* Fri Jul 26 2019 Fedora Release Engineering - 4.1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 23 2019 Robert Fairley - 4.1.2-1 +- Update to 4.1.2 + +* Sat Jun 22 11:59:02 CEST 2019 Igor Gnatenko - 4.1.1-3 +- Rename dracut subpackage + +* Sat Jun 22 11:06:19 CEST 2019 Igor Gnatenko - 4.1.1-2 +- Add dracut modules + +* Fri Jun 21 2019 Robert Fairley - 4.1.1-1 +- Update to 4.1.1 +- Regenerate specfile using rust2rpm 10 with DynamicBuildRequires + +* Wed Jun 05 2019 Josh Stone - 4.1.0-3 +- Bump nix to 0.14 + +* Wed May 22 17:17:00 CEST 2019 Robert Fairley - 4.1.0-2 +- Add afterburn-sshkeys@.service patches to enable the unit on supported platfoms only + +* Sat Apr 27 09:55:54 CEST 2019 Igor Gnatenko - 4.1.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..525a0e9 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (afterburn-4.5.1.crate) = 6aa685c0365dc1b0261f9963ebc707e1848182401221533a3118200d400cc6656c43bd8aa11e1659d8e1f7fd447a4d430bbf9667834aa555722c8e73a6f19584