Skip to content

Instantly share code, notes, and snippets.

@pvalena
Created January 24, 2024 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvalena/6b79344123696a356b5f2d08242b3583 to your computer and use it in GitHub Desktop.
Save pvalena/6b79344123696a356b5f2d08242b3583 to your computer and use it in GitHub Desktop.
--> Please check the gem compare output bellow: !
grep: warning: stray \ before :
WARNING: Unsupported version specification: , skipping.
ERROR: Only one version specified. Specify at lease two versions.
commit 8d627fd0e9c328e7b1c905f5cfa4fafafc8c86ed
Author: Pavel Valena <pvalena@redhat.com>
Date: Fri Jun 23 17:10:30 2023 +0200
Initial commit.
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c07a15a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+chef-utils-*.gem
diff --git a/rubygem-chef-utils.spec b/rubygem-chef-utils.spec
new file mode 100644
index 0000000..f614b4a
--- /dev/null
+++ b/rubygem-chef-utils.spec
@@ -0,0 +1,65 @@
+# Generated from chef-utils-18.2.7.gem by gem2rpm -*- rpm-spec -*-
+%global gem_name chef-utils
+
+Name: rubygem-%{gem_name}
+Version: 18.2.7
+Release: 1%{?dist}
+Summary: Basic utility functions for Core Chef Infra development
+License: Apache-2.0
+URL: https://github.com/chef/chef/tree/main/chef-utils
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: ruby >= 2.6
+BuildArch: noarch
+
+%description
+Basic utility functions for Core Chef Infra development.
+
+
+%package doc
+Summary: Documentation for %{name}
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}.
+
+%prep
+%setup -q -n %{gem_name}-%{version}
+
+%build
+# Create the gem as gem install only works on a gem file
+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
+%gem_install
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
+
+
+%check
+pushd .%{gem_instdir}
+# Run the test suite.
+popd
+
+%files
+%dir %{gem_instdir}
+%license %{gem_instdir}/LICENSE
+%{gem_libdir}
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+%{gem_instdir}/Rakefile
+%{gem_instdir}/chef-utils.gemspec
+%{gem_instdir}/spec
+
+%changelog
+* Fri Jun 23 2023 Pavel Valena <pvalena@redhat.com> - 18.2.7-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..d870209
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (chef-utils-18.2.7.gem) = d042d79a7761971c4c354824c58e96de66d19392e9b4327eb03a3cfa354ca88dcc5a692959281a7d47902f77ff73edbb274fe320082b1eec77c92d42f4bfdf04
On branch fedora-distgit
nothing to commit (use -u to show untracked files)
No such repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
--> Could not push to: pvalena/rebase!
fatal: ambiguous argument 'pvalena/rebase': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
> Run copr build.
+ scripts/pkgs/cr-build.sh -c -t 30m rubygems
Created builds: 6946850
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment