diff --git a/.gitignore b/.gitignore index 01a9b4f..5d96f0a 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,6 @@ /coreos-installer-0.18.0-vendor.tar.gz /coreos-installer-0.20.0.crate /coreos-installer-0.20.0-vendor.tar.gz +/coreos-installer-0.22.1.crate +/coreos-installer-0.22.1-vendor.tar.gz +/coreos-installer-dracut-7181733.tar.gz diff --git a/.packit.yaml b/.packit.yaml index a5d3775..6581cc2 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,13 +1,5 @@ # See the documentation for more information: # https://packit.dev/docs/configuration/ -actions: - changelog-entry: - - bash -c 'echo "- New upstream release"' - post-upstream-clone: - - "wget https://src.fedoraproject.org/rpms/rust-coreos-installer/raw/rawhide/f/rust-coreos-installer.spec -O rust-coreos-installer.spec" - -specfile_path: rust-coreos-installer.spec - upstream_tag_template: v{version} # add or remove files that should be synced @@ -17,24 +9,49 @@ files_to_sync: # name in upstream package repository or registry (e.g. in PyPI) upstream_package_name: coreos-installer -# downstream (Fedora) RPM package name -downstream_package_name: rust-coreos-installer + +packages: + coreos-installer-fedora: + specfile_path: rust-coreos-installer.spec + downstream_package_name: rust-coreos-installer + actions: + post-upstream-clone: + - wget https://src.fedoraproject.org/rpms/rust-coreos-installer/raw/rawhide/f/rust-coreos-installer.spec + changelog-entry: + - bash -c 'echo "- New upstream release"' + coreos-installer-centos: + pkg_tool: centpkg + specfile_path: rust-coreos-installer.spec + downstream_package_name: rust-coreos-installer + actions: + post-upstream-clone: + - wget https://gitlab.com/redhat/centos-stream/rpms/rust-coreos-installer/-/raw/c9s/rust-coreos-installer.spec + changelog-entry: + - bash -c 'echo "- New upstream release"' jobs: - job: propose_downstream trigger: release + packages: [coreos-installer-fedora] dist_git_branches: - fedora-rawhide - - fedora-stable - job: koji_build trigger: commit + packages: [coreos-installer-fedora] dist_git_branches: - - fedora-rawhide - - fedora-stable + - fedora-all - job: bodhi_update trigger: commit + packages: [coreos-installer-fedora] dist_git_branches: - - fedora-stable + - fedora-all + +- job: propose_downstream + trigger: release + packages: [coreos-installer-centos] + dist_git_branches: + - c9s + - c10s diff --git a/README.packit b/README.packit index 3aa26d6..8d4e245 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.87.1.post1.dev9+ge52a00d1. +The file was generated using packit 0.99.0.post1.dev18+g4850a935. diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..2771533 --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,3 @@ +--- +inspections: + annocheck: off diff --git a/rust-coreos-installer.spec b/rust-coreos-installer.spec index cce5fa4..0986fcf 100644 --- a/rust-coreos-installer.spec +++ b/rust-coreos-installer.spec @@ -1,36 +1,37 @@ -# Generated by rust2rpm 25 +# Originally generated by rust2rpm 16 +%define dracutlibdir %{_prefix}/lib/dracut %bcond_without check - +%global __cargo_skip_build 0 # The library is for internal code reuse and is not a public API %global __cargo_is_lib 0 -%global dracutlibdir %{_prefix}/lib/dracut -%global dracutcommit a4be31dde8cfb3e5d579c3c5cef9205a704d03b5 +%global dracutcommit 71817332483aad341ffc666ed69b7869a7a90652 %global dracutshortcommit %(c=%{dracutcommit}; echo ${c:0:7}) %global crate coreos-installer -Name: rust-coreos-installer -Version: 0.20.0 -Release: 5%{?dist} +Name: rust-%{crate} +Version: 0.22.1 +Release: 1%{?dist} Summary: Installer for Fedora CoreOS and RHEL CoreOS -License: Apache-2.0 +# Upstream license specification: Apache-2.0 +License: ASL 2.0 URL: https://crates.io/crates/coreos-installer -Source0: %{crates_source} +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # not used on Fedora Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz Source2: https://github.com/coreos/coreos-installer-dracut/archive/%{dracutcommit}/coreos-installer-dracut-%{dracutshortcommit}.tar.gz -%if 0%{?rhel} +ExclusiveArch: %{rust_arches} +%if 0%{?rhel} && !0%{?eln} BuildRequires: rust-toolset BuildRequires: openssl-devel # To ensure we're not bundling system libraries BuildRequires: xz-devel %else -BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: rust-packaging %endif - BuildRequires: systemd-rpm-macros BuildRequires: libzstd-devel # For tests @@ -38,34 +39,25 @@ BuildRequires: gnupg2 %global _description %{expand: coreos-installer installs Fedora CoreOS or RHEL CoreOS to bare-metal -machines (or, occasionally, to virtual machines).} +machines (or, occasionally, to virtual machines). +} %description %{_description} %package -n %{crate} Summary: %{summary} -# (Apache-2.0 OR MIT) AND BSD-3-Clause -# (MIT OR Apache-2.0) AND Unicode-DFS-2016 -# 0BSD OR MIT OR Apache-2.0 -# Apache-2.0 -# Apache-2.0 OR BSL-1.0 -# Apache-2.0 OR MIT -# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT -# BSD-3-Clause +# ASL 2.0 +# ASL 2.0 or Boost # MIT -# MIT OR Apache-2.0 -# MIT OR Apache-2.0 OR Zlib -# MIT OR Zlib OR Apache-2.0 -# Unlicense OR MIT -# Zlib OR Apache-2.0 OR MIT -License: Apache-2.0 AND BSD-3-Clause AND MIT AND Unicode-DFS-2016 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT) -# LICENSE.dependencies contains a full license breakdown +# MIT or ASL 2.0 +# Unlicense or MIT +# zlib +License: ASL 2.0 and MIT and zlib Requires: gnupg Requires: kpartx Requires: systemd-udev Requires: util-linux - %ifarch s390x # This should be spelled "s390utils-core" but some of the binaries are # still moving over from s390utils-base @@ -86,38 +78,55 @@ Obsoletes: coreos-installer-dracut < 0.0.1 %description -n %{crate} %{_description} -%files -n %{crate} -%license LICENSE -%license LICENSE.dependencies -%if 0%{?rhel} -%license cargo-vendor.txt +%prep +%autosetup -n %{crate}-%{version} -p1 -a 2 +%if 0%{?rhel} && !0%{?eln} +# Hackily enable rdcore manually on RHEL (RHEL macros do not take -f) +sed -i '/^\[features\]/a \ \ default = ["rdcore"]' Cargo.toml +tar xvf %{SOURCE1} +%cargo_prep -v vendor +%else +%cargo_prep +%endif + +%if !0%{?rhel} || 0%{?eln} +%generate_buildrequires +%cargo_generate_buildrequires -f rdcore +%endif + +%build +%if 0%{?rhel} && !0%{?eln} +%cargo_build +%else +%cargo_build -f rdcore +%endif + +%install +%if 0%{?rhel} && !0%{?eln} +%make_install RELEASE=1 +# 51coreos-installer for coreos-installer-dracut +%make_install -C coreos-installer-dracut-%{dracutcommit} +%else +%cargo_install -f rdcore +# Install binaries, dracut modules, units, targets, generators for running via systemd +install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore dracut/50rdcore/module-setup.sh +make install-scripts DESTDIR=%{buildroot} +make install-systemd DESTDIR=%{buildroot} +make install-man DESTDIR=%{buildroot} +make install-data DESTDIR=%{buildroot} +mv %{buildroot}%{_bindir}/rdcore %{buildroot}%{dracutlibdir}/modules.d/50rdcore/ %endif -%doc README.md -%{_bindir}/coreos-installer -%{_mandir}/man8/coreos-installer* -%dir %{_datadir}/coreos-installer -%{_datadir}/coreos-installer/example-config.yaml %package -n %{crate}-bootinfra Summary: %{crate} boot-time infrastructure for use on Fedora/RHEL CoreOS -# (Apache-2.0 OR MIT) AND BSD-3-Clause -# (MIT OR Apache-2.0) AND Unicode-DFS-2016 -# 0BSD OR MIT OR Apache-2.0 -# Apache-2.0 -# Apache-2.0 OR BSL-1.0 -# Apache-2.0 OR MIT -# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT -# BSD-3-Clause -# MIT -# MIT OR Apache-2.0 -# MIT OR Apache-2.0 OR Zlib -# MIT OR Zlib OR Apache-2.0 -# Unlicense OR MIT -# Zlib OR Apache-2.0 OR MIT -License: Apache-2.0 AND BSD-3-Clause AND MIT AND Unicode-DFS-2016 AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT) -# LICENSE.dependencies contains a full license breakdown - Requires: %{crate}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +# ASL 2.0 +# ASL 2.0 or Boost +# MIT +# MIT or ASL 2.0 +# Unlicense or MIT +# zlib +License: ASL 2.0 and MIT and zlib # Package was renamed from coreos-installer-systemd when rdcore was added Provides: %{crate}-systemd = %{version}-%{release} @@ -128,63 +137,45 @@ This subpackage contains boot-time infrastructure for Fedora CoreOS and RHEL CoreOS. It is not needed on other platforms. %files -n %{crate}-bootinfra -%{dracutlibdir}/modules.d/50rdcore/ -%{_libexecdir}/coreos-installer-* -%{_unitdir}/coreos-installer*.{service,target} -%{_systemdgeneratordir}/coreos-installer-generator +%{dracutlibdir}/modules.d/50rdcore +%{_libexecdir}/* +%{_unitdir}/* +%{_systemdgeneratordir}/* +%if 0%{?rhel} && !0%{?eln} %package -n %{crate}-dracut -Summary: Dracut module for running coreos-installer in the initrd in IoT/Edge +Summary: Dracut module for running coreos-installer in the initrd Requires: %{crate} = %{version}-%{release} %description -n %{crate}-dracut This subpackage contains files and configuration to run coreos-installer -from the initramfs in IoT/Edge and is supported by the community. +from the initramfs. %files -n %{crate}-dracut -%{dracutlibdir}/modules.d/51coreos-installer/ - -%prep -%autosetup -n %{crate}-%{version} -a 2 -p1 -%if 0%{?rhel} -tar xf %{SOURCE1} -%cargo_prep -v vendor -%else -%cargo_prep +%{dracutlibdir}/modules.d/51coreos-installer %endif -%if !0%{?rhel} -%generate_buildrequires -%cargo_generate_buildrequires -f rdcore -%endif - -%build -%cargo_build -f rdcore -%{cargo_license_summary -f rdcore} -%{cargo_license -f rdcore} > LICENSE.dependencies -%if 0%{?rhel} -%cargo_vendor_manifest -%endif - -%install -%cargo_install -f rdcore -# Install binaries, dracut modules, units, targets, generators for running via systemd -install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore dracut/50rdcore/module-setup.sh -make install-scripts DESTDIR=%{buildroot} -make install-systemd DESTDIR=%{buildroot} -make install-man DESTDIR=%{buildroot} -make install-data DESTDIR=%{buildroot} -mv %{buildroot}%{_bindir}/rdcore %{buildroot}%{dracutlibdir}/modules.d/50rdcore/ - -# 51coreos-installer for coreos-installer-dracut -%make_install -C coreos-installer-dracut-%{dracutcommit} +%files -n %{crate} +%license LICENSE +%doc README.md +%{_bindir}/coreos-installer +%{_mandir}/man8/* +%dir %{_datadir}/coreos-installer +%{_datadir}/coreos-installer/example-config.yaml %if %{with check} %check +%if 0%{?rhel} && !0%{?eln} +%cargo_test +%else %cargo_test -f rdcore %endif +%endif %changelog +* Fri Jul 26 2024 Packit - 0.22.1-1 +- New upstream release + * Mon Jun 24 2024 Troy Dawson - 0.20.0-5 - Bump release for June 2024 mass rebuild diff --git a/sources b/sources index 6319cee..243521a 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (coreos-installer-0.20.0.crate) = 8ad94b27e431b51222bd14c39ddd41c9577eb05d4b22855efb2741a9d1a71030070c370ac4477cd26fa7e9c96acf9146c1b3ec6f3c9a0e5055cf3c7ba7d625e5 -SHA512 (coreos-installer-0.20.0-vendor.tar.gz) = 4556679728b52579306fc54ef50de93a32c1708a8d5cf9f8c70eb9d6f0d7b3492ef65a4e22442251d105408f47f3508e1b7ae9c88d3485305b0799ca80ef8eb7 -SHA512 (coreos-installer-dracut-a4be31d.tar.gz) = 4466599020cba8119750e5793f69c9e0c5cddb79edd771d2ef1e4f5dc4956fb9a4389b25c31d2e85ee165682d402922195e1dd642986df29ebeadb17f36239eb +SHA512 (coreos-installer-0.22.1.crate) = c64d494399700dad7b724b34eb7d7564681a00a163b741e83fa316c246b006b9d903fffa495a31a5973d0eb0e2e196080d155a9f73de8a78be1a2cdfb6954956 +SHA512 (coreos-installer-0.22.1-vendor.tar.gz) = 63c7d5b1388339a6bfde1ad7185fb4a23739966384760f647edca3d644c53ce52a33501b9dd08e28b479374ed57558b0cb11fa0ee40a73d720608107bc1aded5 +SHA512 (coreos-installer-dracut-7181733.tar.gz) = a03e3e90f355690eda974335e2189c69837f7f0ceb456a449b2de6ce4b24ca098d3f0ea51ddcab35ab354a5070e4b0525188dfbbff8056cfc62bbcdded10647c diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..a0c8e36 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,10 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: . + run: "coreos-installer --help" +