Spec URL: http://slinabery.fedorapeople.org/paranoia/f17/rubygem-paranoia.spec SRPM URL: http://slinabery.fedorapeople.org/paranoia/SRPMS/rubygem-paranoia-1.1.0-1.fc15.src.rpm Description: rubygem substitute for acts_as_paranoid
Hi Steve, Could you please provide some better description? This is not really helpful to understand what is this gem about. Thank you.
Sure! From README.md: Paranoia is a re-implementation of acts_as_paranoid http://github.com/technoweenie/acts_as_paranoid for Rails 3, using much, much, much less code. You would use either plugin / gem if you wished that when you called `destroy` on an Active Record object that it didn't actually destroy it, but just "hid" the record. Paranoia does this by setting a `deleted_at` field to the current time when you `destroy` a record, and hides it by scoping all queries on your model to only include records which do not have a `deleted_at` field.
I can review this.
Please provide the Koji Build URL.
OK. I was just waiting for feedback on what I'd provided so far per the instructions at https://fedoraproject.org/wiki/Join_the_package_collection_maintainers but I'll go ahead and build it in koji. Thanks!
(In reply to comment #2) Steve, I apologize, may be I was not clear enough, but I'd like to see something similar as you sent here written in the spec file. Also the "Review Summary", i.e. the name of this bug should be adjusted accordingly. May be it would be also worth ask upstream to adjust their description. Thank you.
(In reply to comment #6) Vít, I pasted the README text into the %description in the spec, and also removed the unnecessary (but possibly accurate!) profanity from the Summary. I emailed upstream about making the description in paranoia.gemspec more descriptive. Editing BZ name next. Thanks, Steve
Koji scratch build against f17: http://koji.fedoraproject.org/koji/taskinfo?taskID=4026286
(In reply to comment #3) > I can review this. I can not be the reviewer because this is the first package from Contributor. https://fedoraproject.org/wiki/Package_Review_Process The Reviewer can be any Fedora account holder, who is a member of the packager group. There is one exception: If it is the first package of a Contributor, the Reviewer must be a Sponsor. You can check if a Contributor has already been sponsored by looking the e-mail address up in the packager group of the account system. However I will provide review input.
I can sponsor, but this package doesn't look like it follows the Ruby packaging guidelines http://fedoraproject.org/wiki/Packaging:Ruby at all and so it's probably out of my league.
A couple of MUSTs I feel need to be addressed ========================================================= From https://fedoraproject.org/wiki/Packaging:ReviewGuidelines not ok MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review. Although this rpmlint output may indicate a bug in rpmlint as I am pretty sure "it's" spell correctly however, as pointed out in Comment 6 this is clearly an indication it mayu be worth it to ask upstream to adjust there description. Please address the rpmlint warnings. % rpmlint rubygem-paranoia-1.1.0-1.fc15.src.rpm rubygem-paranoia.src: W: spelling-error Summary(en_US) cluster<BLEEP> -> cluster rubygem-paranoia.src: W: summary-not-capitalized C acts_as_paranoid, without the cluster<BLEEP> rubygem-paranoia.src: W: spelling-error %description -l en_US cluster<BLEEP> -> cluster 1 packages and 0 specfiles checked; 0 errors, 3 warnings. not ok MUST: The package must contain code, or permissable content. see rpmlint output above
Here is my review input for all the MUSTs: The MUSTs seem OK except for the ones raised in Comment 11. Tomorrow I will go through the SHOULDs and http://fedoraproject.org/wiki/Packaging:Ruby - - - ========================================================= From https://fedoraproject.org/wiki/Packaging:ReviewGuidelines not ok MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review. Although this rpmlint output may indicate a bug in rpmlint as I am pretty sure "it's" spell correctly however, as pointed out in Comment 6 this is clearly an indication it mayu be worth it to ask upstream to adjust there description. Please address the rpmlint warnings. % rpmlint rubygem-paranoia-1.1.0-1.fc15.src.rpm rubygem-paranoia.src: W: spelling-error Summary(en_US) cluster<BLEEP> -> cluster rubygem-paranoia.src: W: summary-not-capitalized C acts_as_paranoid, without the cluster<BLEEP> rubygem-paranoia.src: W: spelling-error %description -l en_US cluster<BLEEP> -> cluster 1 packages and 0 specfiles checked; 0 errors, 3 warnings. ok MUST: The package must be named according to the Package Naming Guidelines . ok MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption. ok MUST: The package must meet the Packaging Guidelines . ok/warn MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines . There does not appear to be license text in the source package. The packager should contact upstream and encourage them to correct this mistake. ok MUST: The License field in the package spec file must match the actual license. ok MUST: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package must be included in %doc. ok MUST: The spec file must be written in American English. ok MUST: The spec file for the package MUST be legible. ok MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this. % md5sum *.gem 679660584d32aff199dafcf2abc063b9 downstream_paranoia-1.1.0.gem 679660584d32aff199dafcf2abc063b9 upstream_paranoia-1.1.0.gem ok MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture. 4026489 build (f17, rubygem-paranoia-1.1.0-1.fc15.src.rpm) completed successfully http://koji.fedoraproject.org/koji/taskinfo?taskID=4026489 NA MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line. ok MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense. ok MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden. ok MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun. ok MUST: Packages must NOT bundle copies of system libraries. ok MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker. ok MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory. ok MUST: A Fedora package must not list a file more than once in the spec file's %files listings. (Notable exception: license texts in specific situations) ok MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. ok MUST: Each package must consistently use macros. not ok MUST: The package must contain code, or permissable content. see rpmlint output above http://fedoraproject.org/wiki/Packaging/Guidelines#FilePermissions ... Content should not be offensive, discriminatory, or derogatory. If you're not sure if a piece of content is one of these things, it probably is. ... ok MUST: Large documentation files must go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity). ok MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present. ok MUST: Static libraries must be in a -static package. ok MUST: Development files must be in a -devel package. ok MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name}%{?_isa} = %{version}-%{release} ok MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built. ok MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation. ok MUST: Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time. ok MUST: All filenames in rpm packages must be valid UTF-8.
(In reply to comment #7) Thank you. Also thank you for asking the upstream. Regarding this, I have another two nits: 1) The summary in spec file should be the same as the bug summary. 2) The description should be wrapped at 80 lines [1] And I have other comments to the spec file: * gem_dir and gem_instdir are not needed - These macros are provided by rubygems-devel package, so you don't have to declare them for Fedora. Please remove their re-definitions. * Use %{gem_libdir} instead of %{gem_instdir}/lib - It simplifies the spec file a bit. * BuildRequires: ruby(rubygems) is not required - Since rubygems-devel requires the rubygems package anyway, you don't have to BuildRequire it explicitly. * test suit - It would be nice if you could execute test suite of that gem. You can find some hints about test suite in guidelines [2] * Move README.md into the main package - Since this file mentions license of the package, it should be moved into the main package * Keep Gemfile* in -doc subpackage - There is no need to drop the Gemfiles IMO. You can keep them in the -doc subpackage. BTW "gem2rpm -t fedora-17-rawhide paranoia-1.1.0.gem" would help you to generate the stub of the package with correct macros. [1] https://fedoraproject.org/wiki/Packaging:Guidelines#Summary_and_description [2] https://fedoraproject.org/wiki/Packaging:Ruby#Running_test_suites
My review input for the SHOULDs ========================================================= From https://fedoraproject.org/wiki/Packaging:ReviewGuidelines FAIL SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. I don't see a license text file. I suggest the packager SHOULD query upstream to include one. WARN SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available. I believe Vit Ondruch's input in Comment 13 addresses this. OK SHOULD: The reviewer should test that the package builds in mock. OK SHOULD: The package should compile and build into binary rpms on all supported architectures. WARN SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example. I know very little about running ruby ... I tried running "rake test" with no luck. I assume this works NA SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity. OK SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency. NA SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb. NA SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself. OK SHOULD: your package should contain man pages for binaries/scripts. If it doesn't, work with upstream to add them where they make sense. README.md seems OK to me
Thank you for all the helpful advice! Revised spec: http://slinabery.fedorapeople.org/paranoia/f17/rubygem-paranoia.spec A patch which details the edits I made: http://slinabery.fedorapeople.org/paranoia/f17/0001-specfixes.patch A revised SRPM: http://slinabery.fedorapeople.org/paranoia/SRPMS/rubygem-paranoia-1.1.0-1.fc15.src.rpm (rpmlint passes cleanly on this) koji scratch build succeeds: http://koji.fedoraproject.org/koji/taskinfo?taskID=4029628 Additional comments: 1) I emailed a patch to upstream that adds COPYING file containing MIT License text[1] 2) I had already moved Gemfile* back into %files doc prior to comment #13 3) Note that I have patched out the use of profanity, and that upstream confirms it has been removed from the source for future releases[2]. In addition, the description attribute has been improved. 4) I removed the test subdirectory based on [3] ('Do not ship tests'). I did not add them to the %check section because they require use of rake. Thanks again, and please advise of any additional requirements. [1]http://fedoraproject.org/wiki/Licensing:MIT#Modern_Variants [2]https://github.com/radar/paranoia/commit/ab2b11802e9e2ddb6c110ce7e5484934fb538249 [3]http://fedoraproject.org/wiki/Packaging:Ruby#Running_test_suites
License added to upstream by dev: https://github.com/radar/paranoia/commit/fa4d9c9ba9a3c01a8d9537cb81de29848a881f3a Does this satisfy the SHOULD from comment #14 ?
Steve, Please always update the release number, even between reviews. It is easier to track the changes, since I have previous SRPM on my computer anyway. It also prevents some possible mistakes. (In reply to comment #16) > Does this satisfy the SHOULD from comment #14 ? This looks good, but it is just "SHOULD", so it should not be show-stopper in any case. It is just recommendation. Note that if the LICENSE field will be in the main package, you can again move the README.md back into -doc subpackage. Sorry for that, I was not aware that you will so promptly convince upstream to include the LICENSE file :) (In reply to comment #15) > 4) I removed the test subdirectory based on [3] ('Do not ship tests'). I did > not add them to the %check section because they require use of rake. No need to use Rake. Just add following BR: BuildRequires: rubygem(minitest) BuildRequires: rubygem(sqlite3) BuildRequires: rubygem(activerecord) And subsequently you can run the test suite in check section: $ RUBYOPT="-rfileutils" testrb test/* Note that the RUBYOPT="-rfileutils" shouldn't be needed and should be reported upstream as an error.
New koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4035740 Newly edited spec (for convenience): http://slinabery.fedorapeople.org/paranoia/f17/rubygem-paranoia.spec Patch showing edits to spec since last scratch build: http://slinabery.fedorapeople.org/paranoia/f17/0001-Add-in-test-suite-execution.patch comments: 1) Left README.md in main package files. LICENSE is in upstream but has not been released in a gem yet. Will move README.md into -doc when I eventually rebase to new upstream release. (reply to comment #17) 2) I remove the test subdirectory (and a subdirectory, 'tmp', that is left after running tests) in the newly-added %check section. Please advise if there is a better place to do that. 3) Editing BZ subject to match spec.
(In reply to comment #18) > 2) I remove the test subdirectory (and a subdirectory, 'tmp', that is left > after running tests) in the newly-added %check section. Please advise if there > is a better place to do that. Although that is correct, I suggest you to simplify the %check section a bit: %check pushd .%{gem_instdir} RUBYOPT="-rfileutils" testrb test/* popd In this case, the test suite is executed in %{builddir} and you don't have to take care about some leftovers. Otherwise I am fine with the package.
Latest koji scratch build addressing comment #19: http://koji.fedoraproject.org/koji/taskinfo?taskID=4036377 Revised spec: http://slinabery.fedorapeople.org/paranoia/f17/rubygem-paranoia.spec Changes: http://slinabery.fedorapeople.org/paranoia/f17/0001-fix-check.patch Thanks!
There are what may be a couple of issue. Please see the ones I have marked [NOT OK]. These my be easily explainable and simply because I am no ruby expert. Please reply with reasoning or address accordingly. Thanks. Joe == RUBY requirements == From: http://fedoraproject.org/wiki/Packaging:Ruby [ OK ] MUST: Packages that contain Ruby Gems must be called rubygem-%{gem_name}. [ OK ] MUST: The name of a ruby extension/library package must be of the form ruby-UPSTREAM [ NA ] MUST: A ruby extension/library package must indicate what it provides with a Provides: ruby(LIBRARY) = VERSION declaration in the spec file [ OK ] MUST: Pure Ruby packages must be built as noarch packages. [ NA ] MUST: The Ruby library files in a pure Ruby package must be placed into Config::CONFIG["sitelibdir"] . The specfile must get that path using %{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')} [ NA ] MUST: For packages with binary content, e.g., database drivers or any other Ruby bindings to C libraries, the package must be architecture specific. [ NA ] MUST: The binary files in a Ruby package with binary content must be placed into Config::CONFIG["sitearchdir"] [ OK ] MUST: Packages that contain Ruby Gems must be called rubygem-%{gemname} where gemname is the name from the Gem's specification. [ OK ] MUST: The Source of the package must be the full URL to the released Gem archive; the version of the package must be the Gem's version [ OK ] MUST: The package must have a Requires and a BuildRequires on rubygems [NOT OK] MUST: The package must provide rubygem(%{gemname}) where gemname is the name from the Gem's specification. For every dependency on a Gem named gemdep, the package must contain a Requires on rubygem(%{gemdep}) with the same version constraints as the Gem I'm no ruby expert but I don't see the rubygemrubygem(%{gemdep}). Am I simply missing something? [NOT OK] MUST: The Gem must be installed into %{gemdir} defined as "%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)" Again I'm no ruby expert but I don't see the gemdir... Am I simply missing something? [NOT OK] MUST: The package must own the following files and directories: %{gemdir}/gems/%{gemname}-%{version}/ %{gemdir}/cache/%{gemname}-%{version}.gem %{gemdir}/specifications/%{gemname}-%{version}.gemspec Again I'm no ruby expert but I don't see the gemdir... Am I simply missing something? [ OK ] MUST: Architecture-specific content must not be installed into %{gemdir} [ OK ] MUST: If the Gem only contains pure Ruby code, it must be marked as BuildArch: noarch. If the Gem contains binary content (e.g., for a database driver), it must be marked as architecture specific, and all architecture specific content must be moved from the %{gemdir} to the [#ruby_sitearch %{ruby_sitearch} directory] during %install
(In reply to comment #21) (snip) > [NOT OK] MUST: The package must provide rubygem(%{gemname}) where gemname is > the name from the Gem's specification. For every dependency on a Gem > named > gemdep, the package must contain a Requires on rubygem(%{gemdep}) with > the same > version constraints as the Gem > > I'm no ruby expert but I don't see the rubygemrubygem(%{gemdep}). > Am I simply missing something? > I think you are just missing something. For example: Requires: rubygem(activerecord) >= 3.0.0 > [NOT OK] MUST: The Gem must be installed into %{gemdir} defined as "%global > gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)" > > Again I'm no ruby expert but I don't see the gemdir... > Am I simply missing something? > See comment #13. I think this checklist is based on the <=f16 macro definitions. > [NOT OK] MUST: The package must own the following files and directories: > %{gemdir}/gems/%{gemname}-%{version}/ > %{gemdir}/cache/%{gemname}-%{version}.gem > %{gemdir}/specifications/%{gemname}-%{version}.gemspec > > Again I'm no ruby expert but I don't see the gemdir... > Am I simply missing something? > $ rpm -q --filesbypkg -p rubygem-paranoia-1.1.0-3.fc18.noarch.rpm rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0 rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/README.md rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/lib rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/lib/paranoia rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/lib/paranoia.rb rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/lib/paranoia/version.rb rubygem-paranoia /usr/share/gems/specifications/paranoia-1.1.0.gemspec It's all there except for cache. Not sure if that is no longer required.
(In reply to comment #22) > (In reply to comment #21) > (snip) > > [NOT OK] MUST: The package must provide rubygem(%{gemname}) where gemname is > > the name from the Gem's specification. For every dependency on a Gem > > named > > gemdep, the package must contain a Requires on rubygem(%{gemdep}) with > > the same > > version constraints as the Gem > > > > I'm no ruby expert but I don't see the rubygemrubygem(%{gemdep}). > > Am I simply missing something? > > > > I think you are just missing something. For example: > Requires: rubygem(activerecord) >= 3.0.0 Thanks for the clarification. I initially misinterpreted the requirement. Looks "OK" > > [NOT OK] MUST: The Gem must be installed into %{gemdir} defined as "%global > > gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)" > > > > Again I'm no ruby expert but I don't see the gemdir... > > Am I simply missing something? > > > > See comment #13. I think this checklist is based on the <=f16 macro > definitions. > > > [NOT OK] MUST: The package must own the following files and directories: > > %{gemdir}/gems/%{gemname}-%{version}/ > > %{gemdir}/cache/%{gemname}-%{version}.gem > > %{gemdir}/specifications/%{gemname}-%{version}.gemspec > > > > Again I'm no ruby expert but I don't see the gemdir... > > Am I simply missing something? > > > > $ rpm -q --filesbypkg -p rubygem-paranoia-1.1.0-3.fc18.noarch.rpm > rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0 > rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/README.md > rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/lib > rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/lib/paranoia > rubygem-paranoia /usr/share/gems/gems/paranoia-1.1.0/lib/paranoia.rb > rubygem-paranoia > /usr/share/gems/gems/paranoia-1.1.0/lib/paranoia/version.rb > rubygem-paranoia /usr/share/gems/specifications/paranoia-1.1.0.gemspec > > It's all there except for cache. Not sure if that is no longer required. Again. Thanks for the clarification. Seems Comment 13 addressed things accordingly. Looks OK to me. You've satisfactorily addressed my review input. Once you've addressed that of the other reviewers I'm OK with you pushing.
APPROVED Please follow http://fedoraproject.org/wiki/Package_SCM_admin_requests#New_Packages and import the package. Close this bug as RAWHIDE once it's been successfully imported and built.
New Package SCM Request ======================= Package Name: rubygem-paranoia Short Description: Cleaner re-implementation of acts_as_paranoid (ActiveRecord soft-delete plugin) Owners: slinabery Branches: f16 f17 InitialCC:
Git done (by process-git-requests).
Already exists.
rubygem-paranoia-1.1.0-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/rubygem-paranoia-1.1.0-1.fc16
rubygem-paranoia-1.1.0-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/rubygem-paranoia-1.1.0-3.fc17
rubygem-paranoia-1.1.0-1.fc16 has been pushed to the Fedora 16 stable repository.
rubygem-paranoia-1.1.0-3.fc17 has been pushed to the Fedora 17 stable repository.