Bug 2176206 - Review request: vimb - A fast and lightweight vim like web browser
Summary: Review request: vimb - A fast and lightweight vim like web browser
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gustavo Costa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-07 16:19 UTC by Benson Muite
Modified: 2023-04-08 08:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-08 08:00:15 UTC
Type: Bug
Embargoed:
xfgusta: fedora-review+


Attachments (Terms of Use)

Description Benson Muite 2023-03-07 16:19:31 UTC
spec: https://download.copr.fedorainfracloud.org/results/fed500/vimb/fedora-rawhide-x86_64/05603284-vimb/vimb.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/vimb/fedora-rawhide-x86_64/05603284-vimb/vimb-3.6.0-1.fc39.src.rpm

Description:
Vimb is a fast and lightweight vim like web browser based on the webkit
web browser engine and the GTK toolkit. Vimb is modal like the great vim
editor and also easily configurable during runtime. Vimb is mostly
keyboard driven and does not distract you from your daily work.

Fedora Account System Username: fed500

Comment 2 Gustavo Costa 2023-04-04 19:01:32 UTC
Hi Benson. There are a couple of things we can improve, I'll point them out and give suggestions.

# Source

> Source0:        https://github.com/fanglingsu/%{name}/archive/refs/tags/%{version}.tar.gz

I'd recommend using this URL: https://github.com/fanglingsu/vimb/archive/%{version}/%{name}-%{version}.tar.gz

This will give you a more meaningful tarball filename.

https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_git_tags

# BuildRequires

> webkit2gtk4.0-devel

You should use pkgconfig over -devel whenever possible. In this case it would be pkgconfig(webkit2gtk-4.0)

gtk+-3.0 is also a dependency. Add a pkgconfig(gtk+-3.0) BuildRequires.

https://docs.fedoraproject.org/en-US/packaging-guidelines/PkgConfigBuildRequires

# Build

> %make_build PREFIX=%{_prefix} \
>            BINPREFIX=%{_bindir} \
>            MANPREFIX=%{_mandir} \
>            DOTDESKTOPPREFIX=%{_datadir}/applications \
>            LIBDIR=%{_libdir} \
>            EXTENSIONDIR=%{_libdir}/vimb

I think %make_build EXTENSIONDIR=%{_libdir}/%{name} is enough. EXTENSIONDIR is used as a macro in the source code.

# Install

> mkdir -p %{buildroot}%{_bindir}
> install -m 755 src/%{name} %{buildroot}%{_bindir}
> mkdir -p %{buildroot}%{_libdir}/%{name}
> install -s -m 644 src/webextension/webext_main.so %{buildroot}%{_libdir}/%{name}
> mkdir -p %{buildroot}%{_mandir}/man1/
> install -m 644 doc/%{name}.* %{buildroot}%{_mandir}/man1/
> mkdir -p %{buildroot}%{_metainfodir}/
> install -m 644 %{SOURCE1} %{buildroot}%{_metainfodir}/
> mkdir -p %{buildroot}%{_datadir}/applications
> install -m 644 %{name}.desktop %{buildroot}%{_datadir}/applications

We can simplify all this by using %make_install and installing the metainfo file afterwards:

%make_install PREFIX=%{_prefix} \
              LIBDIR=%{buildroot}/%{_libdir}/%{name} \
              EXTENSIONDIR=%{buildroot}/%{_libdir}/%{name}
mkdir -p %{buildroot}/%{_metainfodir}
install -p -m 644 %{SOURCE1} %{buildroot}/%{_metainfodir}

The -p option in the install command is used to preserve the timestamps.

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

# Check

> desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
> appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml

I'd recommend using %{name} instead of wildcards.

Comment 3 Benson Muite 2023-04-05 07:39:37 UTC
Thanks for your review.

Made all suggested changes, apart from adding gtk3 which will be needed for the next release
that uses webkit2gtk4.1

spec: https://download.copr.fedorainfracloud.org/results/fed500/vimb/fedora-rawhide-x86_64/05744573-vimb/vimb.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/vimb/fedora-rawhide-x86_64/05744573-vimb/vimb-3.6.0-2.fc39.src.rpm

Comment 4 Benson Muite 2023-04-05 07:44:08 UTC
rpmlint does give a warning:

vimb.x86_64: W: unstripped-binary-or-object /usr/lib64/vimb/webext_main.so
 3 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.4 s 

checking this.

Comment 5 Gustavo Costa 2023-04-05 17:33:40 UTC
> Made all suggested changes, apart from adding gtk3 which will be needed for the next release
> that uses webkit2gtk4.1

This version (3.6.0) uses gtk+-3.0 and webkit2gtk-4.0. Although installing webkit2gtk-4.0 also installs gtk+-3.0, you must add BuildRequires: pkgconfig(gtk+-3.0) to the spec file.

See https://github.com/fanglingsu/vimb/blob/3.6.0/config.mk#L19-L20

> vimb.x86_64: W: unstripped-binary-or-object /usr/lib64/vimb/webext_main.so

I think it's okay to leave this warning. I won't complain about it.

Comment 7 Gustavo Costa 2023-04-05 19:06:38 UTC
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.
[-]: 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.
[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", "*No copyright* GNU General Public
     License, Version 3", "GNU General Public License v3.0 or later". 28
     files have unknown license. Detailed output of licensecheck in
     /home/xfgusta/Downloads/review-vimb/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.
[-]: 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.
[-]: 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 20480 bytes in 2 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 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]: Package contains desktop file if it is a GUI application.
[x]: Package installs a %{name}.desktop using desktop-file-install or
     desktop-file-validate if there is such a file.
[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]: 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:
[x]: 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).
[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.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %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: vimb-3.6.0-2.fc39.x86_64.rpm
          vimb-debuginfo-3.6.0-2.fc39.x86_64.rpm
          vimb-debugsource-3.6.0-2.fc39.x86_64.rpm
          vimb-3.6.0-2.fc39.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpgp7jhh4h')]
checks: 31, packages: 4

vimb.x86_64: W: unstripped-binary-or-object /usr/lib64/vimb/webext_main.so
 4 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.5 s 




Rpmlint (debuginfo)
-------------------
Checking: vimb-debuginfo-3.6.0-2.fc39.x86_64.rpm
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmphz2wydns')]
checks: 31, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.2 s 





Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 3

vimb.x86_64: W: unstripped-binary-or-object /usr/lib64/vimb/webext_main.so
 3 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.7 s 



Unversioned so-files
--------------------
vimb: /usr/lib64/vimb/webext_main.so

Source checksums
----------------
https://github.com/fanglingsu/vimb/archive/3.6.0/vimb-3.6.0.tar.gz :
  CHECKSUM(SHA256) this package     : a8db68df98841f07cbf9b2aa026e5105aab83f809da1d1663defff81250d921e
  CHECKSUM(SHA256) upstream package : a8db68df98841f07cbf9b2aa026e5105aab83f809da1d1663defff81250d921e


Requires
--------
vimb (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libgdk-3.so.0()(64bit)
    libgio-2.0.so.0()(64bit)
    libglib-2.0.so.0()(64bit)
    libgobject-2.0.so.0()(64bit)
    libgtk-3.so.0()(64bit)
    libjavascriptcoregtk-4.0.so.18()(64bit)
    libsoup-2.4.so.1()(64bit)
    libwebkit2gtk-4.0.so.37()(64bit)
    rtld(GNU_HASH)

vimb-debuginfo (rpmlib, GLIBC filtered):

vimb-debugsource (rpmlib, GLIBC filtered):



Provides
--------
vimb:
    application()
    application(vimb.desktop)
    metainfo()
    metainfo(vimb.metainfo.xml)
    mimehandler(application/xhtml+xml)
    mimehandler(text/html)
    mimehandler(x-scheme-handler/http)
    mimehandler(x-scheme-handler/https)
    vimb
    vimb(x86-64)

vimb-debuginfo:
    debuginfo(build-id)
    vimb-debuginfo
    vimb-debuginfo(x86-64)

vimb-debugsource:
    vimb-debugsource
    vimb-debugsource(x86-64)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -n vimb
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: Ocaml, PHP, Perl, SugarActivity, Java, Python, Haskell, fonts, R
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 8 Gustavo Costa 2023-04-05 19:07:05 UTC
Package approved!

Comment 10 Fedora Admin user for bugzilla script actions 2023-04-08 07:16:43 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/vimb


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