Bug 1813915 - Review Request: stubby - Application that act as a local DNS Privacy stub resolver
Summary: Review Request: stubby - Application that act as a local DNS Privacy stub res...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pavel Zhukov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-16 13:24 UTC by aegorenk
Modified: 2020-03-19 09:11 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-19 09:11:56 UTC
Type: ---
Embargoed:
pzhukov: fedora-review+


Attachments (Terms of Use)

Description aegorenk 2020-03-16 13:24:13 UTC
Spec URL: https://landgraf.fedorapeople.org/aegorenk/stubby.spec
SRPM URL: https://landgraf.fedorapeople.org/aegorenk/stubby-0.3.1-0.1.29785b.fc31.src.rpm
Description: Stubby is a local DNS Privacy stub resolver (using DNS-over-TLS).
Stubby encrypts DNS queries sent from a client machine to a 
DNS Privacy resolver increasing end user privacy.
Fedora Account System Username: aegorenk

Comment 1 aegorenk 2020-03-16 13:32:20 UTC
This is my first package and I need a sponsor.
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=42532845

Comment 2 Pavel Zhukov 2020-03-16 13:54:01 UTC
I'll review it

Comment 3 Pavel Zhukov 2020-03-16 15:34:48 UTC
Issues:
=======
- 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.
  Note: License file COPYING is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text
- Please work with getdns maintainer to unbundle stubby there to prevent double ownership of files/directories. Make sure Obsoletes: flag is used to prevent conflicts.
     Note: Dirs in package are owned also by: /etc/stubby(getdns-stubby)
- Please enable systemd support by including service file: https://src.fedoraproject.org/rpms/getdns/blob/master/f/stubby.service
- Consider including https://src.fedoraproject.org/rpms/getdns/blob/master/f/stubby-1.4.2-dnssec-ta.patch if the patch
- The package has autogenerated dependency and depends on libsystemd.so.0()(64bit). Please either filter autogenerated dependency of remove explicit one from spec file https://docs.fedoraproject.org/en-US/packaging-guidelines/#_explicit_requires


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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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 3-clause "New" or "Revised"
     License", "BSD 4-clause "Original" or "Old" License". 37 files have
     unknown license. Detailed output of licensecheck in
     /root/stubby/review-stubby/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[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]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[!]: 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.
[!]: 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 30720 bytes in 4 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: No rpmlint messages.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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]: %config files are marked noreplace or the reason is justified.
[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 must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: No %config files under /usr.
[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.
[!]: Final provides and requires are sane (see attachments).
[x]: 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.




Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -n stubby
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, C/C++, Shell-api
Disabled plugins: Java, Ocaml, SugarActivity, Perl, fonts, Python, PHP, R, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 4 aegorenk 2020-03-18 08:57:19 UTC
I think I fixed all pointed Issues.
I've contacted getdns maintainer. He told that he will handle getdns part once review pass for all issues but shared files.

Updated links:
Spec URL: https://aegorenk.fedorapeople.org/packages/stubby/stubby.spec
SRPM URL: https://aegorenk.fedorapeople.org/packages/stubby/stubby-0.3.1-0.1.29785b.fc31.src.rpm
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=42532845

Comment 5 Pavel Zhukov 2020-03-18 09:19:34 UTC
> BuildRequires:  systemd
> BuildRequires:  systemd-devel

Are redundant in you case and should not be used. Use 
> BuildRequires: systemd-rpm-macros
instead: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd

Do not forget to bump release and add changelog once you publish your rpm/spec to avoid confusion!

Comment 6 Jaroslav Škarvada 2020-03-18 09:51:55 UTC
You should version the snapshots according to the versioning guidelines:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots

E.g. some examples.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_examples

TLDR: the following at least:
Release: 0.1.YYYYMMDD

But my favorite (and one of the suggested formats is):
Release: 0.1.YYYYMMDDgitSHORTHASH

Comment 7 Jaroslav Škarvada 2020-03-18 10:01:18 UTC
Also I am looking at the Obsoletes/Provides tags.

What's the last getdns-stubby release you are going to replace? Is it getdns-stubby-1.6.0-1?

If the 1.6.0-1 was the last relase, you should use:
Obsoletes:      getdns-stubby < 1.6.0-2

Why?

Because you may need to rebuild getdns-stubby in older release for some reason. In such case you can just bump it to e.g.:
getdns-stubby-1.6.0-1.1

and the upgrade (obsolote) path will be not broken.

Comment 8 Jaroslav Škarvada 2020-03-18 10:04:00 UTC
One more thing I noted, you should use 'install' command with the '-p' flag to preserve timestamps, i.e.:
install -pm 0644 systemd/stubby.service %{buildroot}%{_unitdir}/stubby.service

Comment 9 Jaroslav Škarvada 2020-03-18 10:08:36 UTC
Also one minor thing, you can define the global 'revision' macro at the beginning of the spec file and calculate the shorthash by another macro, e.g.:

%global git_commit 7939e9652acb120d43d37db2eb0dea986f29785b
%global git_date 20200318

%global git_short_commit %(echo %{git_commit} | cut -c -8)
%global git_suffix %{git_date}git%{git_short_commit}

...
Release:          0.1.%{git_suffix}%{?dist}

I also noted there is spurious whitespace after the git HASH (before the new line), please remove it.

Comment 11 Pavel Zhukov 2020-03-18 12:03:57 UTC
LGTM. 
Approved.

Comment 12 Gwyn Ciesla 2020-03-18 16:01:07 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/stubby


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