Bug 1550740 - Review request: webextension-token-signing - Firefox extension for signing with your eID on the web
Summary: Review request: webextension-token-signing - Firefox extension for signing wi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1552371
Blocks: 1550743
TreeView+ depends on / blocked
 
Reported: 2018-03-01 23:32 UTC by Germano Massullo
Modified: 2018-03-30 13:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-22 16:59:57 UTC
Type: Bug
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Comment 1 Robert-André Mauchin 🐧 2018-03-02 14:13:30 UTC
 - Don't do that:

# following line solves errors on debugsources
%global debug_package %{nil}


  Instead make sure qmake use Fedora build flags:

%prep
%setup -q -n %{upstream_name}-%{version}

sed -i "s|qmake|/usr/lib64/qt5/bin/qmake \
  QMAKE_CFLAGS_DEBUG=\"${CFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection }\" \
  QMAKE_CFLAGS_RELEASE=\"${CFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection }\" \
  QMAKE_CXXFLAGS_DEBUG=\"${CXXFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection }\" \
  QMAKE_CXXFLAGS_RELEASE=\"${CXXFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection }\" \
  QMAKE_LFLAGS_DEBUG=\"${LDFLAGS:--Wl,-z,relro  -specs=/usr/lib/rpm/redhat/redhat-hardened-ld}\" \
  QMAKE_LFLAGS_RELEASE=\"${LDFLAGS:--Wl,-z,relro  -specs=/usr/lib/rpm/redhat/redhat-hardened-ld}\" \
  QMAKE_STRIP=|" host-linux/GNUmakefile

%build
make %{?_smp_mflags}

 - mixed-use-of-spaces-and-tabs (spaces: line 19, tab: line 10)

Either use tabs or spacs, but not both.

 - Use either %{buildroot} or $RPM_BUILD_ROOT, not both.




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

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


Issues:
=======
- Package uses either %{buildroot} or $RPM_BUILD_ROOT
  Note: Using both %{buildroot} and $RPM_BUILD_ROOT
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#macros


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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[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: "LGPL (v2.1 or later)", "Unknown or generated", "*No copyright*
     LGPL (v2.1 or later)". 47 files have unknown license. Detailed output
     of licensecheck in /home/bob/packaging/review/webextension-token-
     signing/review-webextension-token-signing/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by:
     /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384
     }(firefox-nightly, firefox)
[!]: %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.
[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 3 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 requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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]: 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.
[-]: 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]: Uses parallel make %{?_smp_mflags} macro.
[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: webextension-token-signing-1.0.6-1.fc29.x86_64.rpm
          webextension-token-signing-debuginfo-1.0.6-1.fc29.x86_64.rpm
          webextension-token-signing-debugsource-1.0.6-1.fc29.x86_64.rpm
          webextension-token-signing-1.0.6-1.fc29.src.rpm
webextension-token-signing.x86_64: W: spelling-error Summary(en_US) eID -> ID, CID, e ID
webextension-token-signing.x86_64: W: spelling-error %description -l en_US eID -> ID, CID, e ID
webextension-token-signing.x86_64: W: only-non-binary-in-usr-lib
webextension-token-signing.x86_64: W: no-manual-page-for-binary chrome-token-signing
webextension-token-signing-debugsource.x86_64: W: no-documentation
webextension-token-signing.src: W: spelling-error Summary(en_US) eID -> ID, CID, e ID
webextension-token-signing.src: W: spelling-error %description -l en_US eID -> ID, CID, e ID
webextension-token-signing.src:19: W: mixed-use-of-spaces-and-tabs (spaces: line 19, tab: line 10)
4 packages and 0 specfiles checked; 0 errors, 8 warnings.

Comment 2 Germano Massullo 2018-03-02 14:47:56 UTC
https://germano.fedorapeople.org/package_reviews/webextension-token-signing/webextension-token-signing.spec

https://germano.fedorapeople.org/package_reviews/webextension-token-signing/webextension-token-signing-1.0.6-1.fc27.src.rpm


Done everything

(In reply to Robert-André Mauchin from comment #1)
> [...]
> %build
> make %{?_smp_mflags}

in the spec file I have

%build
export PATH=$PATH:%{_qt5_bindir}
make %{?_smp_mflags}

should I remove also line
export PATH=$PATH:%{_qt5_bindir}
?

Comment 3 Robert-André Mauchin 🐧 2018-03-02 15:21:47 UTC
(In reply to Germano Massullo from comment #2)
> https://germano.fedorapeople.org/package_reviews/webextension-token-signing/
> webextension-token-signing.spec
> 
> https://germano.fedorapeople.org/package_reviews/webextension-token-signing/
> webextension-token-signing-1.0.6-1.fc27.src.rpm
> 
> 
> Done everything
> 
> (In reply to Robert-André Mauchin from comment #1)
> > [...]
> > %build
> > make %{?_smp_mflags}
> 
> in the spec file I have
> 
> %build
> export PATH=$PATH:%{_qt5_bindir}
> make %{?_smp_mflags}
> 
> should I remove also line
> export PATH=$PATH:%{_qt5_bindir}
> ?

Not needed since we're linking to the bin directly.

Comment 4 Germano Massullo 2018-03-02 15:22:35 UTC
Okay thank you

Comment 5 Germano Massullo 2018-03-02 18:09:00 UTC
IMHO if there is not anything else to correct, we could proceed

Comment 6 Robert-André Mauchin 🐧 2018-03-02 18:49:23 UTC
Package approved.

Comment 7 Gwyn Ciesla 2018-03-02 19:13:47 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/webextension-token-signing

Comment 8 Germano Massullo 2018-03-02 22:14:54 UTC
Hi Robert-André, it looks like we have some problems on non x86_64 architectures
https://koji.fedoraproject.org/koji/taskinfo?taskID=25424160

Comment 9 Robert-André Mauchin 🐧 2018-03-03 16:36:25 UTC
My bad, I used hardcoded flags. Replace the sed line with:

sed -i "s|qmake|/usr/lib64/qt5/bin/qmake \
  QMAKE_CFLAGS_DEBUG=\"%optflags\" \
  QMAKE_CFLAGS_RELEASE=\"%optflags\" \
  QMAKE_CXXFLAGS_DEBUG=\"%optflags\" \
  QMAKE_CXXFLAGS_RELEASE=\"%optflags\" \
  QMAKE_LFLAGS_DEBUG=\"%{?__global_ldflags}\" \
  QMAKE_LFLAGS_RELEASE=\"%{?__global_ldflags}\" \
  QMAKE_STRIP=|" host-linux/GNUmakefile

Comment 10 Germano Massullo 2018-03-06 17:00:43 UTC
Build failed
https://koji.fedoraproject.org/koji/taskinfo?taskID=25522720

(In reply to Robert-André Mauchin from comment #9)
> My bad, I used hardcoded flags. Replace the sed line with:
> 
> sed -i "s|qmake|/usr/lib64/qt5/bin/qmake \
>   QMAKE_CFLAGS_DEBUG=\"%optflags\" \
>   QMAKE_CFLAGS_RELEASE=\"%optflags\" \
>   QMAKE_CXXFLAGS_DEBUG=\"%optflags\" \
>   QMAKE_CXXFLAGS_RELEASE=\"%optflags\" \
>   QMAKE_LFLAGS_DEBUG=\"%{?__global_ldflags}\" \
>   QMAKE_LFLAGS_RELEASE=\"%{?__global_ldflags}\" \
>   QMAKE_STRIP=|" host-linux/GNUmakefile

Comment 11 Robert-André Mauchin 🐧 2018-03-06 17:18:29 UTC
Here's my fixed SPEC:


# original upstream name: chrome-token-signing
# it is a native messaging solution for firefox/chrome signing support
# chrome and firefox dropped legacy npapi support form browsers
# https://developer.chrome.com/apps/nativeMessaging
# and Estonia ID card software now use native messaging to talk with smartcards
# over javascript to create digital signatures.
# Information source user zomps from #esteid Freenode IRC channel
%global upstream_name chrome-token-signing

Name:		webextension-token-signing
Version:	1.0.6
Release:	1%{?dist}
Summary:	Firefox extension for signing with your eID on the web
License:    LGPLv2+
URL:	https://github.com/open-eid/chrome-token-signing
Source0:	%{url}/archive/v%{version}.tar.gz#/%{upstream_name}-%{version}.tar.gz


BuildRequires:  qt5-qtbase-devel
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(libpcsclite)
Requires:       esteidcerts
Requires:       opensc%{?_isa}
Requires:       pcsc-lite%{?_isa}
Requires:       pcsc-lite-ccid%{?_isa}
# mozilla-filesystem is required to install files into
# %%_prefix/lib/mozilla and
# %%{_datadir}/mozilla/extensions/
Requires:       mozilla-filesystem

%description
Firefox extension for signing with your eID on the web 


%prep
%setup -q -n %{upstream_name}-%{version}

sed -i "s|qmake|%{_qt5_bindir}/qmake \
  QMAKE_CFLAGS_DEBUG=\"%optflags\" \
  QMAKE_CFLAGS_RELEASE=\"%optflags\" \
  QMAKE_CXXFLAGS_DEBUG=\"%optflags\" \
  QMAKE_CXXFLAGS_RELEASE=\"%optflags\" \
  QMAKE_LFLAGS_DEBUG=\"%{?__global_ldflags}\" \
  QMAKE_LFLAGS_RELEASE=\"%{?__global_ldflags}\" \
  QMAKE_STRIP=|" host-linux/GNUmakefile

%build
make %{?_smp_mflags}

%install
# make -C host-linux install DESTDIR=%%{buildroot}
make -C host-linux install INSTALL_ROOT=%{buildroot}

# Firefox is the browser installed by default on Fedora
# Chrome is not available in Fedora repository, so
# the following Chrome files will be removed

rm -f $RPM_BUILD_ROOT/opt/google/chrome/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json
rm -f $RPM_BUILD_ROOT/etc/opt/google/chrome/native-messaging-hosts/ee.ria.esteid.json
rm -f $RPM_BUILD_ROOT/opt/chrome/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json
rm -f $RPM_BUILD_ROOT/etc/opt/chrome/native-messaging-hosts/ee.ria.esteid.json


%files
%{_bindir}/chrome-token-signing
# %%{_datadir} is a macro for /usr/share
%{_datadir}/mozilla/extensions/*
# %% dir creates a directory under a specific path
%dir %_prefix/lib/mozilla/native-messaging-hosts/
# %%_prefix is a macro for /usr directory
%_prefix/lib/mozilla/native-messaging-hosts/ee.ria.esteid.json


%doc README.md AUTHORS RELEASE-NOTES.md

%license LICENSE.LGPL

%changelog
* Thu Feb 22 2018 Germano Massullo <germano.massullo> - 1.0.6-1
- first release




It builds in Koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=25522841

Comment 12 Germano Massullo 2018-03-06 22:18:26 UTC
My fault, I replaced %_prefix/lib/ with %{_libdir}

Comment 13 Germano Massullo 2018-03-07 00:46:48 UTC
I need to add the QMAKE equivalent of cmake flag
-DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}

Comment 14 Robert-André Mauchin 🐧 2018-03-07 14:35:57 UTC
(In reply to Germano Massullo from comment #13)
> I need to add the QMAKE equivalent of cmake flag
> -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}

Why? This is not needed at all.

Comment 15 Germano Massullo 2018-03-08 12:45:48 UTC
Because on 64bit systems the package tries to install files under
/usr/lib/...
instead of
/usr/lib64/...
This can happen only for noarch packages, and this is not a noarch package.

Comment 16 Germano Massullo 2018-03-10 14:39:49 UTC
Proof that the package needs the QMAKE equivalent of cmake flag
-DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}
https://github.com/open-eid/chrome-token-signing/issues/80#issuecomment-372034703

Comment 18 Fedora Update System 2018-03-21 10:10:38 UTC
webextension-token-signing-1.0.6-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-6dcee533d9

Comment 19 Fedora Update System 2018-03-21 10:11:42 UTC
webextension-token-signing-1.0.6-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1608d21400

Comment 20 Fedora Update System 2018-03-21 14:14:46 UTC
webextension-token-signing-1.0.6-4.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1608d21400

Comment 21 Fedora Update System 2018-03-21 15:57:56 UTC
webextension-token-signing-1.0.6-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-6dcee533d9

Comment 22 Fedora Update System 2018-03-22 16:59:57 UTC
webextension-token-signing-1.0.6-4.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2018-03-30 13:11:47 UTC
webextension-token-signing-1.0.6-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, 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.