Compare commits

...

10 Commits

Author SHA1 Message Date
Benjamin Gilbert 2652cd2aa9 spec: new upstream version 5.4.1
Resolves: rhbz#2167018
2023-02-06 21:18:16 -05:00
Steven Presti 286775ac63 rust-afterburn.spec: update summary and description
Resolves: rhbz#2087439. Due to afterburn being packaged in RHEL 9,
a more explicit summary and description are necessary to indicate
that its only used for RHEL CoreOS only.
2023-01-09 16:53:39 -05:00
Sohan Kunkerkar 2260f54fcb Resolves: rhbz#2081063
New afterburn release
2022-05-02 12:45:04 -04:00
Timothée Ravier d4845a3ba0 Remove Windows binaries from vendor tarball
Resolves: rhbz#2062215
2022-03-09 17:18:18 +01:00
Timothée Ravier db10b62391 Add initial gating test
Only add an initial basic functionnal test as this package is tested in
upstream and downstream CI.

Resolves: rhbz#2038284
2022-02-23 13:11:45 +01:00
Timothée Ravier 6e7561e90a Update to 5.2.0-1 (from Fedora 35)
Resolves: rhbz#2038284
2022-01-19 12:00:29 +01:00
DistroBaker 520daf056c Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rust-afterburn.git#5dd64399156457648e1121dcc7af51b85d17dc01
2020-12-28 13:54:29 +00:00
DistroBaker cbb982700a Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rust-afterburn.git#ef9b67811504e9d7c3a7aca5ba37d953d51f002d
2020-12-17 14:33:03 +01:00
DistroBaker 6e0ff84084 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rust-afterburn.git#ef9b67811504e9d7c3a7aca5ba37d953d51f002d
2020-12-17 11:37:51 +00:00
DistroBaker f3b3b3b726 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rust-afterburn.git#0044c8e4f06e6cbb982a71af4acd5f8478a2e135
2020-12-15 16:51:44 +01:00
7 changed files with 131 additions and 38 deletions

8
.gitignore vendored
View File

@ -11,3 +11,11 @@
/afterburn-4.5.0.crate
/afterburn-4.5.1.crate
/afterburn-4.5.3.crate
/afterburn-4.6.0.crate
/afterburn-5.1.0.crate
/afterburn-5.2.0.crate
/afterburn-5.2.0-vendor.tar.gz
/afterburn-5.3.0.crate
/afterburn-5.3.0-vendor.tar.gz
/afterburn-5.4.1.crate
/afterburn-5.4.1-vendor.tar.gz

View File

@ -1,29 +0,0 @@
--- afterburn-4.5.3/Cargo.toml 2020-10-22T01:47:33+00:00
+++ afterburn-4.5.3/Cargo.toml 2020-10-22T19:48:06.040912+00:00
@@ -33,7 +33,7 @@
name = "afterburn"
path = "src/main.rs"
[dependencies.base64]
-version = "0.13"
+version = "0.12"
[dependencies.byteorder]
version = "1.3"
@@ -67,7 +67,7 @@
version = "0.3"
[dependencies.nix]
-version = "0.19"
+version = "0.18"
[dependencies.openssh-keys]
version = "0.4"
@@ -122,7 +122,7 @@
optional = true
[dependencies.users]
-version = "0.11"
+version = "0.10"
[dependencies.vmw_backdoor]
version = "0.2"

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} # this is the testcase identifier, which OSCI pipeline uses

20
legacy-providers.patch Normal file
View File

@ -0,0 +1,20 @@
diff --git a/src/metadata.rs b/src/metadata.rs
index ececef15e11e..36f556789159 100644
--- a/src/metadata.rs
+++ b/src/metadata.rs
@@ -49,6 +49,7 @@ pub fn fetch_metadata(provider: &str) -> Result<Box<dyn providers::MetadataProvi
match provider {
"aliyun" => box_result!(AliyunProvider::try_new()?),
"aws" => box_result!(AwsProvider::try_new()?),
+ "ec2" => box_result!(AwsProvider::try_new()?),
"azure" => box_result!(Azure::try_new()?),
"azurestack" => box_result!(AzureStack::try_new()?),
"cloudstack-metadata" => box_result!(CloudstackNetwork::try_new()?),
@@ -56,6 +57,7 @@ pub fn fetch_metadata(provider: &str) -> Result<Box<dyn providers::MetadataProvi
"digitalocean" => box_result!(DigitalOceanProvider::try_new()?),
"exoscale" => box_result!(ExoscaleProvider::try_new()?),
"gcp" => box_result!(GcpProvider::try_new()?),
+ "gce" => box_result!(GcpProvider::try_new()?),
// IBM Cloud - VPC Generation 2.
"ibmcloud" => box_result!(IBMGen2Provider::try_new()?),
// IBM Cloud - Classic infrastructure.

View File

@ -7,24 +7,39 @@
%global crate afterburn
Name: rust-%{crate}
Version: 4.5.3
Version: 5.4.1
Release: 1%{?dist}
Summary: Simple cloud provider agent
Summary: Simple cloud provider agent (RHEL CoreOS only)
# 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
Source0: %{crates_source}
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
# Re-add support for "ec2" and "gce" providers, since RHCOS nodes installed
# from OCP 4.1 and 4.2 bootimages still call them by those names
Patch0: legacy-providers.patch
ExclusiveArch: %{rust_arches}
%if 0%{?rhel} && !0%{?eln}
BuildRequires: rust-toolset
BuildRequires: openssl-devel
# This is needed because the cc crate, which is
# used for linking final build results of crates,
# does not work without it.
BuildRequires: glibc-devel
%else
BuildRequires: rust-packaging
%endif
BuildRequires: systemd
%global _description %{expand:
Simple cloud provider agent.}
This software is currently only supported on RHEL CoreOS.
Afterburn is a one-shot agent for cloud-like platforms which interacts with
provider-specific metadata endpoints. It is typically used in conjunction
with Ignition.
}
%description %{_description}
@ -87,24 +102,42 @@ to run in the initramfs on boot.
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%if 0%{?rhel} && !0%{?eln}
tar xvf %{SOURCE1}
mkdir -p .cargo
cat >.cargo/config << EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
%else
%cargo_prep
%endif
# 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
%if !0%{?rhel} || 0%{?eln}
%generate_buildrequires
%cargo_generate_buildrequires
%endif
%build
%cargo_build
%install
%if 0%{?rhel} && !0%{?eln}
%make_install INSTALL="install -p -c"
%else
%cargo_install
install -Dpm0644 -t %{buildroot}%{_unitdir} \
systemd/*.service systemd/*.target
%endif
mkdir -p %{buildroot}%{dracutmodulesdir}
cp -a dracut/* %{buildroot}%{dracutmodulesdir}
@ -114,6 +147,51 @@ cp -a dracut/* %{buildroot}%{dracutmodulesdir}
%endif
%changelog
* Mon Feb 06 2023 Benjamin Gilbert <bgilbert@redhat.com> - 5.4.1-1
- New release
- Re-add support for "ec2" and "gce" providers (removed in 5.0.0)
* Mon Jan 9 2023 Steven Presti <spresti@redhat.com> - 5.3.0-2
- Update description and summary to indicate this package is
only supported on RHEL CoreOS.
* Mon May 2 2022 Sohan Kunkerkar <skunkerk@redhat.com> - 5.3.0-1
- Update to 5.3.0
* Wed Mar 09 2022 Timothée Ravier <tim@siosm.fr> - 5.2.0-2
- Remove Windows binaries from vendor tarball
* Fri Jan 14 2022 Benjamin Gilbert <bgilbert@redhat.com> - 5.2.0-1
- Update to 5.2.0
* Fri Sep 24 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 5.1.0-3
- Vendor rust dependencies on el9
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 5.1.0-2
- Rebuilt with OpenSSL 3.0.0
* Tue Aug 10 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 5.1.0-1
- Update to 5.1.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Apr 09 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 5.0.0-1
- Update to 5.0.0
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Dec 28 13:26:51 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.6.0-3
- Rebuild
* Mon Dec 14 2020 Sohan Kunkerkar <skunkerk@redhat.com> - 4.6.0-2
- Rebuild because of Fedora infra issues last week to see if a new build fixes some
problems we are seeing.
* Wed Dec 09 2020 Sohan Kunkerkar <skunkerk@redhat.com> - 4.6.0-1
- Update to 4.6.0
* Thu Oct 22 2020 Dusty Mabe <dusty@dustymabe.com> - 4.5.3-1
- Update to 4.5.3

View File

@ -1 +1,2 @@
SHA512 (afterburn-4.5.3.crate) = 902948fef187fb4a283ef993ac94a3450ed4115a7c70abfd07ac9b7b5ee6b4771018d55c5236962caaa1b170f24679c45fa5959261c2a144d01a7bade1d04014
SHA512 (afterburn-5.4.1.crate) = 614800bbfd784263fe2ac5c3e20904956d646965d468c8f97d00039eef92898395153099feadb1106b29e21a296ccff6b5513ff1be10a6206c4d50c127d7ea9f
SHA512 (afterburn-5.4.1-vendor.tar.gz) = 84a4a7fd480cb36105609a3f4d6984849253ed38c2b2f08f8c44498fba8ebc7e3e8cac9b3b4ff8f1508c5e4bd92831751dba7d8ee81d422ab36054c6e5ecdb87

9
tests/tests.yml Normal file
View File

@ -0,0 +1,9 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: .
run: "afterburn --help"