Bug 1859207 - Review Request: sane-airscan - SANE backend for eSCL and WSD protocols
Summary: Review Request: sane-airscan - SANE backend for eSCL and WSD protocols
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Artur Frenszek-Iwicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-21 12:55 UTC by Zdenek Dohnal
Modified: 2020-08-22 01:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-22 01:42:57 UTC
Type: ---
Embargoed:
fedora: fedora-review+
fedora: needinfo-


Attachments (Terms of Use)

Description Zdenek Dohnal 2020-07-21 12:55:02 UTC
Spec URL: https://zdohnal.fedorapeople.org/sane-airscan/sane-airscan.spec
SRPM URL: https://zdohnal.fedorapeople.org/sane-airscan/sane-airscan-0.99.10-1.fc32.src.rpm

Description: This package contains a tool for discovering scanning devices in cases when automatic discovery fails - airscan-discover - and a SANE backend for MFP and document scanners that implements either eSCL (AirScan/AirPrint scanning) or WSD "driverless" scanning protocol.

Fedora Account System Username: zdohnal

Comment 1 Artur Frenszek-Iwicki 2020-07-21 14:03:13 UTC
>Source:         https://github.com/alexpevzner/%{name}/archive/%{version}.tar.gz
1. You can use %{URL} here to make the line shorter.
2. GitHub allows you to do "archive/%{version}/%{name}-%{version}.tar.gz" - you can get a file containing the repo name, not just the version.

>%autosetup -n %{name}-%{version} -S git
The "-S git" part is not needed. Package builds fine without it and the resulting executables/libraries are the same.

>%make_build CFLAGS="%{optflags}" CPPFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}"
You can call the %set_build_flags macro before %make_build, that should setup up CFLAGS/LDFLAGS.

>%{_mandir}/man1/airscan-discover.1.gz
>%{_mandir}/man5/sane-airscan.5.gz
Do not assume that man pages will be gzipped. Use a wildcard that can match any compression method (including no compression at all).
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages

Comment 2 Zdenek Dohnal 2020-07-22 06:29:49 UTC
(In reply to Artur Iwicki from comment #1)
> >Source:         https://github.com/alexpevzner/%{name}/archive/%{version}.tar.gz
> 1. You can use %{URL} here to make the line shorter.

Fixed for convenience.

> 2. GitHub allows you to do "archive/%{version}/%{name}-%{version}.tar.gz" -
> you can get a file containing the repo name, not just the version.

I'm not upstream maintainer, upstream's using just git tags, so I don't have this option - IIRC it isn't mandatory and can be worked around by '-n' during autosetup.

> 
> >%autosetup -n %{name}-%{version} -S git
> The "-S git" part is not needed. Package builds fine without it and the
> resulting executables/libraries are the same.

IMO maintainer's experience is better - I'm kind of tired of typing 'git init && git add .' every time I go to source directory for applying a patch (sometimes git is more friendly than backuping a file+modify+gendiff for applying patches). '-S git' creates git repo in source dir by default.

> 
> >%make_build CFLAGS="%{optflags}" CPPFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}"
> You can call the %set_build_flags macro before %make_build, that should
> setup up CFLAGS/LDFLAGS.

Thanks for the tip! I use %set_build_flags now, hardening flags (checked via annocheck) didn't change.

> 
> >%{_mandir}/man1/airscan-discover.1.gz
> >%{_mandir}/man5/sane-airscan.5.gz
> Do not assume that man pages will be gzipped. Use a wildcard that can match
> any compression method (including no compression at all).
> https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages

Ok, I'm not fond of using wildcards in %files, because it can lead into unexpected shipped files, but if FPG demands, I'll change it.


The links were updated accordingly.

Comment 3 Artur Frenszek-Iwicki 2020-07-22 07:51:46 UTC
>> 2. GitHub allows you to do "archive/%{version}/%{name}-%{version}.tar.gz" - you can get a file containing the repo name, not just the version.
>I'm not upstream maintainer, upstream's using just git tags, so I don't have this option - IIRC it isn't mandatory and can be worked around by '-n' during autosetup.
This isn't anyhow related to being a maintainer or not. /archive/ on GitHub allows you to fetch whatever commit or tag you want. /archive/something.tgz and /archive/something/filename.tgz are just two ways to get the same auto-generated archive (with a different name) containing the repo at a given commit/tag.

Comment 4 Zdenek Dohnal 2020-07-22 08:15:55 UTC
(In reply to Artur Iwicki from comment #3)
> This isn't anyhow related to being a maintainer or not. /archive/ on GitHub
> allows you to fetch whatever commit or tag you want. /archive/something.tgz
> and /archive/something/filename.tgz are just two ways to get the same
> auto-generated archive (with a different name) containing the repo at a
> given commit/tag.

Hmm, interesting. It works now. I had a problem with this source url unless upstream had an explicit link (meaning he uploaded a tarball manually too, instead of just marking the new release with git tag) in github releases in the past (aprox 3 years ago), so I used the trick which fixed it at that time.

So either I was doing something wrong or github made it work.

Either way, thanks! Uploaded the fixed spec.

Are you planning to take the review? I would like to know if I should offer the review e.g. on the mailing list.

Comment 5 Artur Frenszek-Iwicki 2020-07-22 09:34:13 UTC
Sure, I can take the review.

You're missing a BuildRequires for "annobin". fedora-review fails to rebuild the package. Have you tried doing a scratch build in koji?

Comment 6 Zdenek Dohnal 2020-07-22 10:15:05 UTC
If you are willing to do a review, please take the bug as assignee. 

IMO it is an error in fedora-review - the scratch build for F32 passed https://koji.fedoraproject.org/koji/taskinfo?taskID=47622097

Comment 7 Artur Frenszek-Iwicki 2020-07-29 11:21:10 UTC
[!]: Package consistently uses macros (instead of hard-coded directory names).
In %files, you have:
	%dir /etc/sane.d
	%config(noreplace) /etc/sane.d/airscan.conf
Use "%{_sysconfdir}" instead of hard-coding "/etc".


[!]: Latest version is packaged.
The SRPM contained the latest version at the time it was submitted,
but a few days ago a new version, 0.99.11, has been released.


[x]: Packages should try to preserve timestamps of original installed files.
The upstream Makefile does not use the "-p" flag when installing man pages.
I don't think you need to patch this, though it'd be nice to file an issue
or submit a pull request.



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

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



===== 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: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[x]: License file installed when any subpackage combination is installed.
[ ]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /etc/sane.d(sane-backends),
     /etc/sane.d/dll.d(sane-backends), /usr/lib64/sane(sane-backends)
[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.
[!]: 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.
[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 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[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).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in libsane-
     airscan
[x]: Package functions as described.
[!]: 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]: 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:
[!]: Spec file according to URL is the same as in SRPM.
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: sane-airscan-0.99.10-1.fc33.x86_64.rpm
          libsane-airscan-0.99.10-1.fc33.x86_64.rpm
          sane-airscan-debuginfo-0.99.10-1.fc33.x86_64.rpm
          sane-airscan-debugsource-0.99.10-1.fc33.x86_64.rpm
          sane-airscan-0.99.10-1.fc33.src.rpm
sane-airscan.x86_64: W: spelling-error Summary(en_US) eSCL -> es Cl, encl, eccl
sane-airscan.x86_64: W: incoherent-version-in-changelog 0.99.8-1 ['0.99.10-1.fc33', '0.99.10-1']
libsane-airscan.x86_64: W: spelling-error Summary(en_US) eSCL -> es Cl, encl, eccl
libsane-airscan.x86_64: W: spelling-error %description -l en_US eSCL -> es Cl, encl, eccl
libsane-airscan.x86_64: W: spelling-error %description -l en_US driverless -> driver less, driver-less, riderless
sane-airscan.src: W: spelling-error Summary(en_US) eSCL -> es Cl, encl, eccl
5 packages and 0 specfiles checked; 0 errors, 6 warnings.




Rpmlint (debuginfo)
-------------------
Checking: sane-airscan-debuginfo-0.99.10-1.fc33.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
(none): E: no installed packages by name libsane-airscan
(none): E: no installed packages by name sane-airscan-debuginfo
(none): E: no installed packages by name sane-airscan-debugsource
(none): E: no installed packages by name sane-airscan
0 packages and 0 specfiles checked; 0 errors, 0 warnings.



Source checksums
----------------
https://github.com/alexpevzner/sane-airscan/archive/0.99.10/sane-airscan-0.99.10.tar.gz :
  CHECKSUM(SHA256) this package     : e32034edaf3f3d8f6a1ba99e66de9f25d60fc036931cf6ca9cc5744575d11135
  CHECKSUM(SHA256) upstream package : e32034edaf3f3d8f6a1ba99e66de9f25d60fc036931cf6ca9cc5744575d11135


Requires
--------
sane-airscan (rpmlib, GLIBC filtered):
    libavahi-client.so.3()(64bit)
    libavahi-common.so.3()(64bit)
    libavahi-glib.so.1()(64bit)
    libc.so.6()(64bit)
    libglib-2.0.so.0()(64bit)
    libgobject-2.0.so.0()(64bit)
    libm.so.6()(64bit)
    libpthread.so.0()(64bit)
    libsane-airscan(x86-64)
    libsoup-2.4.so.1()(64bit)
    libxml2.so.2()(64bit)
    libxml2.so.2(LIBXML2_2.4.30)(64bit)
    rtld(GNU_HASH)

libsane-airscan (rpmlib, GLIBC filtered):
    config(libsane-airscan)
    libavahi-client.so.3()(64bit)
    libavahi-common.so.3()(64bit)
    libavahi-glib.so.1()(64bit)
    libc.so.6()(64bit)
    libglib-2.0.so.0()(64bit)
    libgobject-2.0.so.0()(64bit)
    libjpeg.so.62()(64bit)
    libjpeg.so.62(LIBJPEGTURBO_6.2)(64bit)
    libjpeg.so.62(LIBJPEG_6.2)(64bit)
    libm.so.6()(64bit)
    libpng16.so.16()(64bit)
    libpng16.so.16(PNG16_0)(64bit)
    libsoup-2.4.so.1()(64bit)
    libxml2.so.2()(64bit)
    libxml2.so.2(LIBXML2_2.4.30)(64bit)
    rtld(GNU_HASH)

sane-airscan-debuginfo (rpmlib, GLIBC filtered):

sane-airscan-debugsource (rpmlib, GLIBC filtered):



Provides
--------
sane-airscan:
    sane-airscan
    sane-airscan(x86-64)

libsane-airscan:
    config(libsane-airscan)
    libsane-airscan
    libsane-airscan(x86-64)
    libsane-airscan.so.1()(64bit)

sane-airscan-debuginfo:
    debuginfo(build-id)
    sane-airscan-debuginfo
    sane-airscan-debuginfo(x86-64)

sane-airscan-debugsource:
    sane-airscan-debugsource
    sane-airscan-debugsource(x86-64)



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

Comment 8 Zdenek Dohnal 2020-07-29 11:57:03 UTC
(In reply to Artur Iwicki from comment #7)
> [!]: Package consistently uses macros (instead of hard-coded directory
> names).
> In %files, you have:
> 	%dir /etc/sane.d
> 	%config(noreplace) /etc/sane.d/airscan.conf
> Use "%{_sysconfdir}" instead of hard-coding "/etc".

Ok, I'll fix it.

> 
> 
> [!]: Latest version is packaged.
> The SRPM contained the latest version at the time it was submitted,
> but a few days ago a new version, 0.99.11, has been released.
> 

Ok, I'll rebase to the newest version, but I would like to ask you to don't consider this as a blocker. sane-airscan is under rapid development and there can be a new release per week.

I usually update my package to the newest version regularly.

> 
> [x]: Packages should try to preserve timestamps of original installed files.
> The upstream Makefile does not use the "-p" flag when installing man pages.
> I don't think you need to patch this, though it'd be nice to file an issue
> or submit a pull request.
> 

If I understand FPG [1] correctly, it is applied only on copying commands used in SPEC file (not in 'make install' itself), or if you download sources.
So I would let it be as it is now.

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_timestamps

> [ ]: Package does not own files or directories owned by other packages.
>      Note: Dirs in package are owned also by: /etc/sane.d(sane-backends),
>      /etc/sane.d/dll.d(sane-backends), /usr/lib64/sane(sane-backends)

Those directories are owned by sane-backends, but sane-airscan doesn't need sane-backends to work.

> ===== EXTRA items =====
> 
> Generic:
> [!]: Spec file according to URL is the same as in SRPM.

I'm not sure what does it mean - I uploaded the srpm which is created by 'fedpkg --release f32 local'. Is it really different?


And please assign yourself

Comment 10 Artur Frenszek-Iwicki 2020-07-30 10:41:24 UTC
>> ===== EXTRA items =====
>> 
>> Generic:
>> [!]: Spec file according to URL is the same as in SRPM.
>
>I'm not sure what does it mean - I uploaded the srpm which is created by 'fedpkg --release f32 local'. Is it really different?
Oh, sorry, I missed that. I had to re-build the package locally with "BuildRequires: annobin" and I passed that SRPM to fedora-review. The provided spec name is ok.

The latest spec and SRPM look fine to me. Approved.

Comment 11 Gwyn Ciesla 2020-07-30 13:14:42 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/sane-airscan

Comment 12 Fedora Update System 2020-08-03 06:44:47 UTC
FEDORA-2020-841f4ce8df has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

Comment 13 Fedora Update System 2020-08-03 09:27:57 UTC
FEDORA-2020-841f4ce8df has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

Comment 14 Fedora Update System 2020-08-04 01:06:43 UTC
FEDORA-2020-841f4ce8df has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-841f4ce8df`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2020-08-06 08:35:06 UTC
FEDORA-2020-841f4ce8df has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

Comment 16 Fedora Update System 2020-08-07 01:03:21 UTC
FEDORA-2020-841f4ce8df has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-841f4ce8df`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2020-08-10 10:06:55 UTC
FEDORA-2020-841f4ce8df has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

Comment 18 Fedora Update System 2020-08-11 14:28:02 UTC
FEDORA-2020-841f4ce8df has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-841f4ce8df`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2020-08-13 12:05:42 UTC
FEDORA-2020-841f4ce8df has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

Comment 20 Fedora Update System 2020-08-14 02:43:45 UTC
FEDORA-2020-841f4ce8df has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-841f4ce8df`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-841f4ce8df

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2020-08-22 01:42:57 UTC
FEDORA-2020-841f4ce8df has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.


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