From b27a19d40e2dcade3a0c4b99d81f720bd2637529 Mon Sep 17 00:00:00 2001 From: Evgeny Kolesnikov Date: Mon, 8 Nov 2021 18:44:35 +0100 Subject: [PATCH] Fix appdata, .desktop and icons in accordance with the Freedesktop specs Resolves: rhbz#2021212 --- scap-workbench-1.2.2-fix-appdata-pr-288.diff | 73 +++++++++++++++++ scap-workbench-1.2.2-fix-appdata-pr-295.patch | 81 +++++++++++++++++++ scap-workbench.spec | 13 ++- 3 files changed, 163 insertions(+), 4 deletions(-) create mode 100644 scap-workbench-1.2.2-fix-appdata-pr-288.diff create mode 100644 scap-workbench-1.2.2-fix-appdata-pr-295.patch diff --git a/scap-workbench-1.2.2-fix-appdata-pr-288.diff b/scap-workbench-1.2.2-fix-appdata-pr-288.diff new file mode 100644 index 0000000..42784c8 --- /dev/null +++ b/scap-workbench-1.2.2-fix-appdata-pr-288.diff @@ -0,0 +1,73 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 77bb3ae9..5c42e733 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -263,14 +263,14 @@ install(FILES "man/scap-workbench.8" + + install(DIRECTORY "share/scap-workbench" + DESTINATION "${CMAKE_INSTALL_DATADIR}") +-install(FILES "scap-workbench.desktop" ++install(FILES "scap_workbench.desktop" + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications") + install(FILES "share/pixmaps/scap-workbench.png" + DESTINATION "${CMAKE_INSTALL_DATADIR}/pixmaps") + install(FILES "share/pixmaps/scap-workbench.svg" + DESTINATION "${CMAKE_INSTALL_DATADIR}/pixmaps") +-install(FILES "scap-workbench.appdata.xml" +- DESTINATION "${CMAKE_INSTALL_DATADIR}/appdata") ++install(FILES "org.open-scap.scap-workbench.appdata.xml" ++ DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo") + + if (ASCIIDOC_EXECUTABLE) + file(GLOB USER_MANUAL_SCREENSHOTS "${CMAKE_CURRENT_SOURCE_DIR}/doc/user_manual/*.png") +diff --git a/scap-workbench.appdata.xml b/org.open-scap.scap-workbench.appdata.xml +similarity index 65% +rename from scap-workbench.appdata.xml +rename to org.open-scap.scap-workbench.appdata.xml +index d4288f3d..bed9b05c 100644 +--- a/scap-workbench.appdata.xml ++++ b/org.open-scap.scap-workbench.appdata.xml +@@ -1,6 +1,6 @@ + +- +- scap-workbench.desktop ++ ++ org.openscap.scap_workbench.desktop + CC0-1.0 + GPL-3.0+ + SCAP Workbench +@@ -23,10 +23,16 @@ + + + +- https://github.com/OpenSCAP/scap-workbench/raw/v1-1/doc/user_manual/default_content_opened.png +- https://github.com/OpenSCAP/scap-workbench/raw/v1-1/doc/user_manual/intro_screenshot.png +- https://github.com/OpenSCAP/scap-workbench/raw/v1-1/doc/user_manual/tailoring_undo_history.png ++ ++ https://github.com/OpenSCAP/scap-workbench/raw/v1-1/doc/user_manual/default_content_opened.png ++ ++ ++ https://github.com/OpenSCAP/scap-workbench/raw/v1-1/doc/user_manual/intro_screenshot.png ++ ++ ++ https://github.com/OpenSCAP/scap-workbench/raw/v1-1/doc/user_manual/tailoring_undo_history.png ++ + + https://www.open-scap.org/tools/scap-workbench +- open-scap-list@redhat.com +- ++ open-scap-list@redhat.com ++ +diff --git a/scap-workbench.desktop b/scap_workbench.desktop +similarity index 95% +rename from scap-workbench.desktop +rename to scap_workbench.desktop +index 60b67e49..5b4bb899 100644 +--- a/scap-workbench.desktop ++++ b/scap_workbench.desktop +@@ -7,4 +7,5 @@ TryExec=scap-workbench + Exec=scap-workbench + Icon=scap-workbench + Categories=System; ++Keywords=scap; + X-Desktop-File-Install-Version=0.3 diff --git a/scap-workbench-1.2.2-fix-appdata-pr-295.patch b/scap-workbench-1.2.2-fix-appdata-pr-295.patch new file mode 100644 index 0000000..3a1cabe --- /dev/null +++ b/scap-workbench-1.2.2-fix-appdata-pr-295.patch @@ -0,0 +1,81 @@ +From 408019f129027c120b71db3c029d5291e3275ea2 Mon Sep 17 00:00:00 2001 +From: Evgeny Kolesnikov +Date: Tue, 16 Nov 2021 00:08:32 +0100 +Subject: [PATCH] Fix appdata, desktop and icons for Linux (Freedesktop) + +Satisfy: +https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#install_icons +https://freedesktop.org/software/appstream/docs/chap-Quickstart.html +--- + CMakeLists.txt | 6 +++--- + ...ppdata.xml => org.open_scap.scap_workbench.appdata.xml | 5 +++-- + ...kbench.desktop => org.open_scap.scap_workbench.desktop | 8 ++++---- + 3 files changed, 10 insertions(+), 9 deletions(-) + rename org.open-scap.scap-workbench.appdata.xml => org.open_scap.scap_workbench.appdata.xml (92%) + rename scap_workbench.desktop => org.open_scap.scap_workbench.desktop (67%) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5c42e733..55eed972 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -263,13 +263,13 @@ install(FILES "man/scap-workbench.8" + + install(DIRECTORY "share/scap-workbench" + DESTINATION "${CMAKE_INSTALL_DATADIR}") +-install(FILES "scap_workbench.desktop" ++install(FILES "org.open_scap.scap_workbench.desktop" + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications") + install(FILES "share/pixmaps/scap-workbench.png" + DESTINATION "${CMAKE_INSTALL_DATADIR}/pixmaps") + install(FILES "share/pixmaps/scap-workbench.svg" +- DESTINATION "${CMAKE_INSTALL_DATADIR}/pixmaps") +-install(FILES "org.open-scap.scap-workbench.appdata.xml" ++ DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps") ++install(FILES "org.open_scap.scap_workbench.appdata.xml" + DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo") + + if (ASCIIDOC_EXECUTABLE) +diff --git a/org.open-scap.scap-workbench.appdata.xml b/org.open_scap.scap_workbench.appdata.xml +similarity index 92% +rename from org.open-scap.scap-workbench.appdata.xml +rename to org.open_scap.scap_workbench.appdata.xml +index bed9b05c..191796b2 100644 +--- a/org.open-scap.scap-workbench.appdata.xml ++++ b/org.open_scap.scap_workbench.appdata.xml +@@ -1,10 +1,11 @@ + +- +- org.openscap.scap_workbench.desktop ++ ++ org.open_scap.scap_workbench + CC0-1.0 + GPL-3.0+ + SCAP Workbench + A GUI tool that serves as an SCAP scanner and provides tailoring functionality for SCAP content ++ org.open_scap.scap_workbench.desktop + +

+ The main goal of this application is to lower the initial barrier of using SCAP. +diff --git a/scap_workbench.desktop b/org.open_scap.scap_workbench.desktop +similarity index 67% +rename from scap_workbench.desktop +rename to org.open_scap.scap_workbench.desktop +index 5b4bb899..0d568b1d 100644 +--- a/scap_workbench.desktop ++++ b/org.open_scap.scap_workbench.desktop +@@ -1,11 +1,11 @@ + [Desktop Entry] ++Version=1.0 + Type=Application + Name=SCAP Workbench + GenericName=SCAP Scanner and Profile Editor +-Comment=GUI tool that allows scanning both local and remote computers using SCAP content of your choice. ++Comment=GUI tool that allows scanning both local and remote computers using SCAP content of your choice + TryExec=scap-workbench + Exec=scap-workbench + Icon=scap-workbench +-Categories=System; +-Keywords=scap; +-X-Desktop-File-Install-Version=0.3 ++Categories=System;Security; ++Keywords=SCAP; diff --git a/scap-workbench.spec b/scap-workbench.spec index c27687f..3001df3 100644 --- a/scap-workbench.spec +++ b/scap-workbench.spec @@ -2,7 +2,7 @@ Name: scap-workbench Version: 1.2.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Scanning, tailoring, editing and validation tool for SCAP content License: GPLv3+ @@ -12,6 +12,8 @@ Patch1: scap-workbench-1.2.2-fix-qt-deprecated-pr-259.patch Patch2: scap-workbench-1.2.2-replace-obsolete-Qstring-SkipEmptyParts-pr-266.patch Patch3: %{name}-gcc11.patch Patch4: scap-workbench-1.2.2-no-rpath-pr-285.patch +Patch5: scap-workbench-1.2.2-fix-appdata-pr-288.diff +Patch6: scap-workbench-1.2.2-fix-appdata-pr-295.patch BuildRequires: cmake >= 2.6 BuildRequires: qt5-qtbase-devel >= 5.0.0 @@ -52,7 +54,7 @@ content. The tool is based on OpenSCAP library. %files %{_bindir}/scap-workbench -%{_datadir}/applications/scap-workbench.desktop +%{_datadir}/applications/org.open_scap.scap_workbench.desktop %{_datadir}/scap-workbench/*.png %{_datadir}/scap-workbench/translations/* %{_libexecdir}/scap-workbench-oscap.sh @@ -60,14 +62,17 @@ content. The tool is based on OpenSCAP library. %{_libexecdir}/scap-workbench-rpm-extract.sh %{_datadir}/polkit-1/actions/scap-workbench-oscap.policy %{_datadir}/pixmaps/scap-workbench.png -%{_datadir}/pixmaps/scap-workbench.svg -%{_datadir}/appdata/scap-workbench.appdata.xml +%{_datadir}/icons/hicolor/scalable/apps/scap-workbench.svg +%{_datadir}/metainfo/org.open_scap.scap_workbench.appdata.xml %doc %{_mandir}/man8/scap-workbench.8.gz %doc %{_pkgdocdir}/user_manual.html %doc %{_pkgdocdir}/COPYING %doc %{_pkgdocdir}/README.md %changelog +* Mon Nov 08 2021 Evgenii Kolesnikov - 1.2.1-12 +- Fix appdata (rhbz#2021212) + * Tue Aug 10 2021 Mohan Boddu - 1.2.1-11 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688