[Bug 2244124] Review Request: crow-translate - A simple and lightweight translator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2244124



--- Comment #16 from Robert-André Mauchin 🐧 <zebob.m@xxxxxxxxx> ---
 - Release: 1%{?dist}

Use %autorelease

- # The entire source code is GPL-3.0-only except bundled libs:
# GPL-3.0-or-later: qonlinetranslator
# BSD-3-Clause:     qhotkey
#                   qtaskbarcontrol
#                   singleapplication
# MIT:              singleapplication
License: GPL-3.0-only

You should add them all to the license tag then. We don't simplify the tag
anymore in the latest guidelines.


[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/icons/hicolor/310x310/apps,
     /usr/share/icons/hicolor/44x44, /usr/share/icons/hicolor/150x150,
     /usr/share/icons/hicolor/150x150/apps,
     /usr/share/icons/hicolor/310x310, /usr/share/icons/hicolor/44x44/apps


These directory are uncommon and are not owned by hicolor-icon-theme. Own them
in your SPEC.

[!]: Package contains no bundled libraries without FPC exception.

Seek a FPC exception for bundling 3rd party libraries, or package them. Nothing
prevents you from doing it but you'all to modify the CMakelists. For example:

diff -up crow-translate-2.11.1/CMakeLists.txt.orig
crow-translate-2.11.1/CMakeLists.txt
--- crow-translate-2.11.1/CMakeLists.txt.orig   2024-01-04 10:54:43.000000000
+0100
+++ crow-translate-2.11.1/CMakeLists.txt        2024-05-22 14:47:34.771176980
+0200
@@ -59,6 +59,7 @@ endif()

 option(WITH_PORTABLE_MODE "Enable portable functionality" OFF)
 option(WITH_KWAYLAND "Use KWayland for better Wayland integration" ON)
+option(USE_EXTERNAL_SINGLEAPPLICATION "Use external QtSingleApplication
library" OFF)

 find_package(ECM REQUIRED NO_MODULE)
 list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/cmake)
@@ -66,7 +67,15 @@ list(APPEND CMAKE_MODULE_PATH ${ECM_MODU
 set(QAPPLICATION_CLASS QApplication)
 option(QHOTKEY_INSTALL OFF)

-add_subdirectory(src/third-party/singleapplication)
+if(USE_EXTERNAL_SINGLEAPPLICATION)
+  set(qtsingleapplication_libs libQt5Solutions_SingleApplication-2.6
Qt5Solutions_SingleApplication-2.6)
+  find_library(QTSINGLEAPPLICATION_LIBRARY NAMES ${qtsingleapplication_libs})
+  add_compile_definitions(USE_EXTERNAL_SINGLEAPPLICATION=1)
+  message(STATUS "Using external SingleApplication library")
+else()
+  add_subdirectory(src/third-party/singleapplication)
+  set(QTSINGLEAPPLICATION_LIBRARY SingleApplication::SingleApplication)
+endif()
 add_subdirectory(src/third-party/qhotkey)
 add_subdirectory(src/third-party/qtaskbarcontrol)
 add_subdirectory(src/qonlinetranslator)
@@ -225,7 +234,7 @@ target_include_directories(${PROJECT_NAM
 set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME
${EXECUTABLE_NAME})

 target_link_libraries(${PROJECT_NAME} PRIVATE
-    SingleApplication::SingleApplication
+    ${QTSINGLEAPPLICATION_LIBRARY}
     QHotkey::QHotkey
     QTaskbarControl::QTaskbarControl
     QOnlineTranslator::QOnlineTranslator
diff -up crow-translate-2.11.1/src/main.cpp.orig
crow-translate-2.11.1/src/main.cpp
--- crow-translate-2.11.1/src/main.cpp.orig     2024-05-22 14:35:02.492746107
+0200
+++ crow-translate-2.11.1/src/main.cpp  2024-05-22 14:52:49.852842075 +0200
@@ -20,7 +20,11 @@
 #include "cli.h"
 #include "cmake.h"
 #include "mainwindow.h"
+#ifndef USE_EXTERNAL_SINGLEAPPLICATION
 #include "singleapplication.h"
+#else
+#include "QtSolutions/qtsingleapplication.h"
+#endif

 #ifdef Q_OS_UNIX
 #include "ocr/ocr.h"
@@ -61,7 +65,11 @@ int launchGui(int argc, char *argv[])
     QIcon::setThemeName("hicolor");
 #endif

+#ifndef USE_EXTERNAL_SINGLEAPPLICATION
     SingleApplication app(argc, argv);
+#else
+    QtSingleApplication app(argc, argv);
+#endif

     AppSettings().setupLocalization();

diff -up crow-translate-2.11.1/src/mainwindow.cpp.orig
crow-translate-2.11.1/src/mainwindow.cpp
--- crow-translate-2.11.1/src/mainwindow.cpp.orig       2024-05-22
14:35:08.224703786 +0200
+++ crow-translate-2.11.1/src/mainwindow.cpp    2024-05-22 14:50:50.833724064
+0200
@@ -25,7 +25,11 @@
 #include "qtaskbarcontrol.h"
 #include "screenwatcher.h"
 #include "selection.h"
+#ifndef USE_EXTERNAL_SINGLEAPPLICATION
 #include "singleapplication.h"
+#else
+#include "QtSolutions/qtsingleapplication.h"
+#endif
 #include "trayicon.h"
 #include "ocr/ocr.h"
 #include "ocr/screengrabbers/abstractscreengrabber.h"
@@ -87,7 +91,11 @@ MainWindow::MainWindow(QWidget *parent)
     connect(m_orientationWatcher, &ScreenWatcher::screenOrientationChanged,
this, &MainWindow::setOrientation);

     // Show the main window if a secondary instance has been started
+#ifndef USE_EXTERNAL_SINGLEAPPLICATION
     connect(qobject_cast<SingleApplication *>(QCoreApplication::instance()),
&SingleApplication::instanceStarted, this, &MainWindow::open);
+#else
+    connect(qobject_cast<QtSingleApplication *>(QCoreApplication::instance()),
&QtSingleApplication::instanceStarted, this, &MainWindow::open);
+#endif

     // Selection requests
     connect(&Selection::instance(), &Selection::requestedSelectionAvailable,
ui->sourceEdit, &SourceTextEdit::replaceText);



Although they use a fork of QtSingleApplication
(https://github.com/itay-grudev/SingleApplication/tree/aede311d28d20179216c5419b581087be2a8409f
) so this patch can't apply as is, but you get the gist of it.


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

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



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

C/C++:
[x]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[x]: Package does not contain kernel modules.
[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]: Package contains no static executables.
[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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "GNU General Public License v3.0 or
     later", "BSD 3-Clause License", "MIT License", "*No copyright* MIT
     License". 8168 files have unknown license. Detailed output of
     licensecheck in /home/bob/packaging/review/crow-translate/review-crow-
     translate/licensecheck.txt
[X]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/icons/hicolor/310x310/apps,
     /usr/share/icons/hicolor/44x44, /usr/share/icons/hicolor/150x150,
     /usr/share/icons/hicolor/150x150/apps,
     /usr/share/icons/hicolor/310x310, /usr/share/icons/hicolor/44x44/apps
[X]: %build honors applicable compiler flags or justifies otherwise.
[!]: 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).
[-]: 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.
[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 14278 bytes in 1 files.
[!]: 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]: The License field must be a valid SPDX expression.
[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 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.
[?]: 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:
[!]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 3399680 bytes in /usr/share
[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]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: crow-translate-2.11.1-1.fc41.x86_64.rpm
          crow-translate-debuginfo-2.11.1-1.fc41.x86_64.rpm
          crow-translate-debugsource-2.11.1-1.fc41.x86_64.rpm
          crow-translate-2.11.1-1.fc41.src.rpm
==============================================================================================================
rpmlint session starts
==============================================================================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/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/tmpj5mcbii0')]
checks: 32, packages: 4

crow-translate.spec:38: W: unversioned-explicit-provides
bundled(qonlinetranslator)
crow-translate.spec:39: W: unversioned-explicit-provides bundled(qhotkey)
crow-translate.spec:40: W: unversioned-explicit-provides
bundled(qtaskbarcontrol)
crow-translate.spec:41: W: unversioned-explicit-provides
bundled(singleapplication)
crow-translate.x86_64: W: no-manual-page-for-binary crow
======================================================================== 4
packages and 0 specfiles checked; 0 errors, 5 warnings, 16 filtered, 0 badness;
has taken 0.8 s
=========================================================================


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2244124

Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202244124%23c16
--
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux