Spec URL: http://ekohl.nl/rubygem-scanf.spec SRPM URL: http://ekohl.nl/rubygem-scanf-1.0.0-1.fc37.src.rpm Description: Packaging of https://rubygems.org/gems/scanf which is needed for Puppet. Initial packaging was done using gem2rpm, then modified as needed. The gem does not contain any tests nor any documentation. To solve the former I did a trivial require in %check, but the latter does result in a lint warning. Fedora Account System Username: ekohl
I know it's not super of a big deal, but there are diffs between the spec file inside the SRPM and the one in the URL. See below. Also, we need a LICENSE file. Other than that will be fine. --- spec/rubygem-scanf.spec 2022-04-20 12:54:53.000000000 -0400 +++ srpm/rubygem-scanf.spec 2022-04-20 12:52:12.000000000 -0400 @@ -1,3 +1,12 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.2.5) +%define autorelease(e:s:pb:) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} +## END: Set by rpmautospec + %global gem_name scanf Name: rubygem-%{gem_name} @@ -57,4 +66,5 @@ %changelog -%autochangelog +* Wed Apr 20 2022 Ewoud Kohl van Wijngaarden <ewoud> 1.0.0-1 +- Initial package
(In reply to Breno from comment #1) > I know it's not super of a big deal, but there are diffs between the spec > file inside the SRPM and the one in the URL. See below. I believe that is the result of the %autorelease and %autochangelog macros. Per https://fedoraproject.org/wiki/Changes/rpmautospec I believe this is the recommended approach. > Also, we need a LICENSE file. Should I for now copy the LICENSE file from upstream and open an issue/PR to include it in a future release? Perhaps that's also a place to ask about the test files and README.
One note, when gems do not ship with a test suite, it is often required to add the tests manually from the project's git, to run them during a build. See for example rubygem-cucumber-wire: https://src.fedoraproject.org/rpms/rubygem-cucumber-wire/blob/rawhide/f/rubygem-cucumber-wire.spec#_13
Hey Ewoud, Yes, you can add the license manually You will be adding it to the repo, once we have one. As per the rpmautospec, that's news to me. Weird that fedora-review is not up-to-date accordingly. And for the tests, if the upstream provides tests from their repo, i think it's worth using them when building the package, like Jarked proposed.
(In reply to Breno from comment #4) > Yes, you can add the license manually You will be adding it to the repo, > once we have one. Ok, will do. > As per the rpmautospec, that's news to me. Weird that fedora-review is not > up-to-date accordingly. https://bugzilla.redhat.com/show_bug.cgi?id=1985462 > And for the tests, if the upstream provides tests from their repo, i think > it's worth using them when building the package, like Jarked proposed. I'll investigate.
To include the other files I opened https://github.com/ruby/scanf/pull/11, but I don't think it's likely it'll be merged and released soon enough (given I already broke Puppet in Rawhide) so I'll proceed with copying files for now.
Updated with LICENSE and tests: Spec URL: http://ekohl.nl/rubygem-scanf-with-files.spec SRPM URL: http://ekohl.nl/rubygem-scanf-1.0.0-2.fc37.src.rpm I wasn't sure about README so I left that out for now. Since it was just 4 files I opted to include the test files in the SRPM rather than a separate tarball like Jarek's example. Let me know if you prefer something else.
LGTM, good work brother.
Oh, btw, feel free to add me as a co-maintainer if you feel like it.
Ok, will do. I created https://pagure.io/releng/fedora-scm-requests/issue/43834 so I'll wait until that's processed.
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/rubygem-scanf
I uploaded the package and created the first build.