Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hammer plugin cherry-picks #11790

Merged
merged 4 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@

Summary: Foreman admin commands for Hammer CLI
Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 1.2.0
Version: 1.2.1
Release: 1%{?foremandist}%{?dist}
Group: Applications/System
License: GPLv3
URL: https://github.com/theforeman/hammer-cli-foreman-admin
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem

# start specfile generated dependencies
Requires: ruby
BuildRequires: ruby
Requires: ruby >= 2.7
Requires: ruby < 4
BuildRequires: ruby >= 2.7
BuildRequires: ruby < 4
BuildRequires: rubygems-devel
BuildArch: noarch
Provides: hammer-cli-plugin-%{plugin_name} = %{version}
# end specfile generated dependencies

%description
Expand Down Expand Up @@ -67,6 +70,9 @@ cp -pa .%{gem_dir}/* %{buildroot}%{gem_dir}/
%doc %{gem_instdir}/README.md
%changelog
* Sun Feb 23 2025 Foreman Packaging Automation <[email protected]> - 1.2.1-1
- Update to 1.2.1
* Mon Jan 08 2024 Foreman Packaging Automation <[email protected]> - 1.2.0-1
- Update to 1.2.0
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@
%global hammer_confdir %{_sysconfdir}/hammer

Name: rubygem-%{gem_name}
Version: 0.2.1
Version: 0.2.2
Release: 1%{?foremandist}%{?dist}
Summary: Foreman OpenSCAP commands for Hammer
License: GPLv3
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem

# start specfile generated dependencies
Requires: ruby
BuildRequires: ruby
Requires: ruby >= 2.7
Requires: ruby < 4
BuildRequires: ruby >= 2.7
BuildRequires: ruby < 4
BuildRequires: rubygems-devel
BuildArch: noarch
Provides: hammer-cli-plugin-%{plugin_name} = %{version}
# end specfile generated dependencies

%description
Expand Down Expand Up @@ -66,6 +69,9 @@ install -m 0644 .%{gem_instdir}/config/%{plugin_name}.yml \
%{gem_instdir}/test

%changelog
* Sun Feb 23 2025 Foreman Packaging Automation <[email protected]> - 0.2.2-1
- Update to 0.2.2

* Mon Jan 08 2024 Foreman Packaging Automation <[email protected]> - 0.2.1-1
- Update to 0.2.1

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,64 +1,49 @@
# template: hammer_plugin
%{?scl:%scl_package rubygem-%{gem_name}}
%{!?scl:%global pkg_name %{name}}

%global gem_name hammer_cli_foreman_remote_execution
%global plugin_name foreman_remote_execution

%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}
%global hammer_confdir %{_root_sysconfdir}/hammer
%global hammer_confdir %{_sysconfdir}/hammer

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 0.3.0
Name: rubygem-%{gem_name}
Version: 0.3.2
Release: 1%{?foremandist}%{?dist}
Summary: CLI for the Foreman remote execution plugin
Group: Development/Languages
License: GPLv3+
URL: https://github.com/theforeman/hammer_cli_foreman_remote_execution
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem

# start specfile generated dependencies
Requires: ruby
BuildRequires: ruby
Requires: ruby >= 2.7
Requires: ruby < 4
BuildRequires: ruby >= 2.7
BuildRequires: ruby < 4
BuildRequires: rubygems-devel
BuildArch: noarch
Provides: hammer-cli-plugin-%{plugin_name} = %{version}
# end specfile generated dependencies

%description
CLI for the Foreman remote execution plugin.
This gem provides CLI support for the Foreman remote execution plugin.


%package doc
Summary: Documentation for %{pkg_name}
Group: Documentation
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{pkg_name}.
Documentation for %{name}.

%prep
%{?scl:scl enable %{scl} - << \EOF}
gem unpack %{SOURCE0}
%{?scl:EOF}

%setup -q -D -T -n %{gem_name}-%{version}

%{?scl:scl enable %{scl} - << \EOF}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%{?scl:EOF}
%setup -q -n %{gem_name}-%{version}

%build
# Create the gem as gem install only works on a gem file
%{?scl:scl enable %{scl} - << \EOF}
gem build %{gem_name}.gemspec
%{?scl:EOF}
gem build ../%{gem_name}-%{version}.gemspec

# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%{?scl:scl enable %{scl} - << \EOF}
%gem_install
%{?scl:EOF}

%install
mkdir -p %{buildroot}%{gem_dir}
Expand All @@ -71,27 +56,23 @@ install -m 0644 .%{gem_instdir}/config/%{plugin_name}.yml \

%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.gitignore
%exclude %{gem_instdir}/.rubocop.yml
%exclude %{gem_instdir}/.travis.yml
%exclude %{gem_instdir}/.tx
%license %{gem_instdir}/LICENSE
%{gem_libdir}
%{gem_instdir}/locale
%exclude %{gem_cache}
%{gem_spec}
%config %{hammer_confdir}/cli.modules.d/%{plugin_name}.yml
%config(noreplace) %{hammer_confdir}/cli.modules.d/%{plugin_name}.yml

%files doc
%doc %{gem_docdir}
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/config
%{gem_instdir}/hammer_cli_foreman_remote_execution.gemspec
%{gem_instdir}/test

%changelog
* Tue Feb 25 2025 Foreman Packaging Automation <[email protected]> - 0.3.2-1
- Update to 0.3.2

* Tue Jan 09 2024 Foreman Packaging Automation <[email protected]> - 0.3.0-1
- Update to 0.3.0

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%global hammer_confdir %{_sysconfdir}/hammer

Name: rubygem-%{gem_name}
Version: 0.0.21
Version: 0.0.22
Release: 1%{?foremandist}%{?dist}
Summary: Foreman CLI plugin for showing tasks information for resoruces and users
License: GPLv3
Expand Down Expand Up @@ -68,6 +68,9 @@ install -m 0644 .%{gem_instdir}/config/%{plugin_name}.yml \
%doc %{gem_instdir}/config

%changelog
* Sun Feb 23 2025 Foreman Packaging Automation <[email protected]> - 0.0.22-1
- Update to 0.0.22

* Tue Apr 16 2024 Adam Ruzicka <[email protected]> - 0.0.21-1
- Update to 0.0.21

Expand Down