Bug 1802177 - Review Request: elementary-tweaks - Tweak settings for Pantheon DE
Summary: Review Request: elementary-tweaks - Tweak settings for Pantheon DE
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2020-02-12 14:19 UTC by harshjain075
Modified: 2022-04-16 06:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-21 15:16:29 UTC
Type: ---
harshjain075: needinfo-
harshjain075: needinfo-


Attachments (Terms of Use)

Description harshjain075 2020-02-12 14:19:45 UTC
Spec URL:https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/master/Packages/tweaks/elementary-tweaks.spec

SRPM URL: https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/master/Packages/tweaks/elementary-tweaks-5.0.3-1.fc31.src.rpm

Description: Elementary-tweak tool lets you customize the pantheon desktop's appearance environment easily and safely  
Fedora Account System Username:amerepeasant

Comment 1 harshjain075 2020-02-12 14:34:00 UTC
Sorry I forgot to mention this in the description, This is my first package and I'm looking for someone to sponsor me into the packagers group . 
Thanks

Comment 2 harshjain075 2020-02-19 15:59:08 UTC
here is a successful koji build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=41655269

Comment 3 Fabio Valentini 2020-02-20 14:44:07 UTC
Hi!

A few hints for a first-time packager (with line numbers, so you can see that I mean directly).

0) Use "raw" links when hosting files on GitHub for a package review. The `fedora-review` tool will try to fetch the .spec and .src.rpm files from the URLs listed, and the URLs you entered will return GitHub's UI instead of the raw files. There's a "Raw" button on the right, which gives you the direct download link to for the files.

1) You don't need to define srcname if your setting it to the package name anyway, just use %{name} instead, it's defined by the "Name: foo" line.
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L2

2) There's a typo in the package summary. Also, it's good form to not repeat the package name in the Summary, but be more descriptive ("Tweak settings for the Pantheon DE", or something like that).
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L5

3) The .spec is missing a URL that points to the upstream project. Add one like this, just above the Source0 line:
URL:         https://correct.url.here/elementary-tweaks

4) The Source0 is an unqualified tarball that does not reference the package version. This will lead to problems.
Does the project offer downloads for specific versions? If so, use those URLs instead (and use the %{version} macro), which will help make some things easier later (including automatic release monitoring by fedora infrastructure).
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L10

5) You don't need to add both switchboard-devel and pkgconfig(switchboard-2.0) as build dependencies. These resolve to the same package (switchboard-devel).
Remove the switchboard-devel BuildRequires and leave the pkgconfig(switchboard-2.0) dependency.
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L10
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L24

6) The "Provides: elementary-tweaks = %{version}-%{release}" is redundant and is automatically added by RPM. Remove the line.
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L31

7) This looks like a spare space at the beginning of second line of the description:
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L36

8) Adjust the autosetup argument once you have a version-qualified source tarball:
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L39

9) %clean has not been used in fedora for ages and must not be used in .spec files anymore. Remove the %clean section.
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L50

10) You can't just own %{_libdir} and %{_datadir} as a whole. List only the directories / files that are created by this package directly, and not common filesystem paths (there are some exceptions to this rule, but none should apply here).
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L57

11) At the bottom, add a %changelog section. It's missing right now.
https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/d0f5ef5/Packages/tweaks/elementary-tweaks.spec#L58

Comment 4 Fabio Valentini 2020-02-20 14:45:04 UTC
Forgot one thing:

12) Make the summary in the bug title match the actual package Summary from the .spec file.

Comment 5 harshjain075 2020-02-21 10:13:52 UTC
Updated spec and rpm 

Spec URL: https://raw.githubusercontent.com/a-mere-peasant/elementary-tweaks-fedora/master/elementary-tweaks.spec
SRPM URL: https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/master/elementary-tweaks-1.0.1-1.fc31.src.rpm?raw=true

Description: elementary tweaks is a system panel settings you lets that easily and safely customize your desktop's appearance
Fedora Account System Username:amerepeasant

Successful koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=41730777

Comment 6 Fabio Valentini 2020-02-21 20:16:42 UTC
This is much better, but there are still some mistakes:

1) The %changelog section is empty.

If you want to have an automatically generated changelog entry for version 1.0.1, then I suggest setting Release to "0%{?dist}" and running
$ rpmdev-bumpspec elementary-tweaks.spec --comment="Initial package for fedora."

2) The description is too long.
Please wrap the description text to fit into 80 (or better, 72) columns, and end it with a full stop (it's a sentence, after all).

3) for %setup and %autosetup, %{name}-%{version} is the default if you don't specify any argument for "-n".
Just drop "-n %{name}-%{version}", since that's redundant.

4) The package still owns too many directories. You should do something like this (I didn't check the actual filenames):
%{_datadir}/icons/hicolor/*/apps/elementary-tweaks.svg

And for the locale files, there's a %find_lang macro that must be used at the end of %install. There's documentation for that here:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_handling_locale_files

5) You don't need to maintain a fork to package this for fedora. You can instead use a git snapshot of the current upstream development status.

Documentation for packaging git snapshots is available here:
https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_git_hosting_services

Documentation for how to deal with pre-release snapshots is available here:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots

Hope that helps.
If you have any questions about how to apply those rules to your package, just ask.

Comment 7 Jerry James 2020-02-21 22:27:36 UTC
(In reply to Fabio Valentini from comment #6)
> 4) The package still owns too many directories. You should do something like
> this (I didn't check the actual filenames):
> %{_datadir}/icons/hicolor/*/apps/elementary-tweaks.svg

This is weird.  SVG files usually go in %{_datadir}/icons/hicolor/scalable/; the "S" in "SVG" stands for scalable after all!  Why are svg files being installed into the 24x24 and 32x32 directories in the first place?  This is upstream's doing: see icon/meson.build.  I also see explicit "height" and "width" tags in those SVG files, which is why I used the word "weird" to start this off. :-)

Comment 8 Fabio Valentini 2020-02-21 22:32:04 UTC
(In reply to Jerry James from comment #7)

> This is weird.  SVG files usually go in %{_datadir}/icons/hicolor/scalable/;
> the "S" in "SVG" stands for scalable after all!  Why are svg files being
> installed into the 24x24 and 32x32 directories in the first place?  This is
> upstream's doing: see icon/meson.build.  I also see explicit "height" and
> "width" tags in those SVG files, which is why I used the word "weird" to
> start this off. :-)

Maybe unusual / new, but not really weird.
I know of several projects which provide hand-tuned vector graphics even for "sized" icons instead of rendered png files.

Comment 9 harshjain075 2020-02-26 02:51:32 UTC
Updated spec and rpm 

Spec URL: https://raw.githubusercontent.com/a-mere-peasant/elementary-tweaks-fedora/master/elementary-tweaks.spec
SRPM URL: https://github.com/a-mere-peasant/elementary-tweaks-fedora/blob/master/elementary-tweaks-0.0.1-0.20200120.git5e2e0e1.fc31.1.src.rpm?raw=true

Description: A tool to easily and safely customize your desktop's appearance.

Fedora Account System Username:amerepeasant

Successful koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=41892949

Comment 10 Robert-André Mauchin 🐧 2020-03-20 20:25:15 UTC
* Tue Feb 25 2020 a-mere-peasant - 0.0.1-0.20200120.git5e2e0e1.1

You need to put you name and your email here

* Tue Feb 25 2020 Harsh Jain <harshjain075> - 0.0.1-0.20200120.git5e2e0e1.1

 - Why is there a minorbump number in the release field? It should be:

Release:        0.1.%{commitdate}git%{shortcommit}%{?dist}


Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

C/C++:
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD 2-clause "Simplified" License",
     "GPL (v3 or later)". 236 files have unknown license. Detailed output
     of licensecheck in /home/bob/packaging/review/elementary-
     tweaks/review-elementary-tweaks/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/locale/mo,
     /usr/share/locale/mo/LC_MESSAGES
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: The spec file handles locales properly.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: 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 is included in %license.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Fully versioned dependency in subpackages if applicable.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: elementary-tweaks-0.0.1-0.20200120.git5e2e0e1.fc33.1.x86_64.rpm
          elementary-tweaks-debuginfo-0.0.1-0.20200120.git5e2e0e1.fc33.1.x86_64.rpm
          elementary-tweaks-debugsource-0.0.1-0.20200120.git5e2e0e1.fc33.1.x86_64.rpm
          elementary-tweaks-0.0.1-0.20200120.git5e2e0e1.fc33.1.src.rpm
elementary-tweaks.x86_64: E: invalid-lc-messages-dir /usr/share/locale/bh/LC_MESSAGES/elementary-tweaks-plug.mo
elementary-tweaks.x86_64: E: invalid-lc-messages-dir /usr/share/locale/mo/LC_MESSAGES/elementary-tweaks-plug.mo
4 packages and 0 specfiles checked; 2 errors, 0 warnings.

Comment 11 Ben Cotton 2020-11-03 17:07:58 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.