From 1efcf42181e6c0557d76f9e6825bff6066363bb0183fa007229cdc7b3cacf5d3 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 2 Oct 2014 15:40:07 +0000 Subject: [PATCH 1/6] Accepting request 253655 from GNOME:Next - Drop PackageKit-branding-upstream Requires: PK 1.0.0 got a major rework and dropped the DesktopFile database. So the 'openSUSE' branded package is good enough. - Add InstallAppdata.sh: the script is executed by libzypp whenever some repos are refreshed. The script extracts the appstream data from the repo metadata and installs it into the 'well known' location on the file system (/usr/share/app-info). OBS-URL: https://build.opensuse.org/request/show/253655 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-software?expand=0&rev=27 --- InstallAppdata.sh | 48 ++++++++++++++++++++++++++++++++++++++++++ gnome-software.changes | 11 ++++++++++ gnome-software.spec | 10 +++++++-- 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 InstallAppdata.sh diff --git a/InstallAppdata.sh b/InstallAppdata.sh new file mode 100644 index 0000000..4f93f4f --- /dev/null +++ b/InstallAppdata.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Copyright (c) 2014 Dominique Leuenberger, Amsterdam, The Netherlands + +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: + +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +RPMMD=/repodata/ +YAST2=/suse/setup/descr + +# Cleanup existing appdata found on the system +for list in $(find /usr/share/app-info/xmls/*.xml.gz); do + appdata=$(basename ${list} .xml.gz) + appstream-util uninstall "${appdata}" 2>&1 > /dev/null +done + +# Install new appdata files +while ([ "$1" = "-R" ]); do + case $4 in + rpm-md) + appstream-util install-origin "$2" $6$RPMMD/*appdata.xml.gz $6$RPMMD/*app-icons.tar.gz 2>&1 > /dev/null + ;; + yast2) + appstream-util install-origin "$2" "$6$YAST2/appdata.xml.gz" "$6$YAST2/app-icons.tar.gz" 2>&1 > /dev/null + ;; + *) + echo "unknown repo type - Appstream data not considered" + esac + shift 6 +done + diff --git a/gnome-software.changes b/gnome-software.changes index ad40660..d740008 100644 --- a/gnome-software.changes +++ b/gnome-software.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Oct 2 14:37:21 UTC 2014 - dimstar@opensuse.org + +- Drop PackageKit-branding-upstream Requires: PK 1.0.0 got a major + rework and dropped the DesktopFile database. So the 'openSUSE' + branded package is good enough. +- Add InstallAppdata.sh: the script is executed by libzypp whenever + some repos are refreshed. The script extracts the appstream data + from the repo metadata and installs it into the 'well known' + location on the file system (/usr/share/app-info). + ------------------------------------------------------------------- Tue Sep 23 10:01:30 UTC 2014 - dimstar@opensuse.org diff --git a/gnome-software.spec b/gnome-software.spec index f5cc5af..069d889 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -25,6 +25,7 @@ License: GPL-2.0+ Group: System/GUI/GNOME Url: https://wiki.gnome.org/Design/Apps/Software Source: http://download.gnome.org/sources/gnome-software/3.14/%{name}-%{version}.tar.xz +Source1: InstallAppdata.sh # PATCH-FEATURE-OPENSUSE gnome-software-PK-updates.patch dimstar@opensuse.org -- Switch to PackageKit Update provider instead of systemd offline updates. Patch0: gnome-software-PK-updates.patch BuildRequires: intltool >= 0.35.0 @@ -39,8 +40,6 @@ BuildRequires: pkgconfig(libsoup-2.4) BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(packagekit-glib2) >= 1.0.0 BuildRequires: pkgconfig(sqlite3) -# gnome-software requires ScanDesktopFiles=true in PK.conf, which openSUSE explicitly disables for performance reason. Users that want to test gnome-software (technical preview) will have to take this performance hit. -Requires: PackageKit-branding-upstream BuildRoot: %{_tmppath}/%{name}-%{version}-build %glib2_gsettings_schema_requires @@ -61,6 +60,8 @@ make %{?_smp_mflags} %install %make_install find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print +# Install AppData zypp plugin +install -Dm 0755 %{S:1} %{buildroot}%{_prefix}/lib/zypp/plugins/appdata/$(basename %{S:1}) #suse_update_desktop_file gnome-software %find_lang %{name} @@ -97,6 +98,11 @@ find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print #{_libexecdir}/gnome-software-service %{_mandir}/man1/%{name}.1%{?ext_man} %{_sysconfdir}/xdg/autostart/gnome-software-service.desktop +# zypp plugin triggering AppData update on repo refresh +%dir %{_prefix}/lib/zypp +%dir %{_prefix}/lib/zypp/plugins +%dir %{_prefix}/lib/zypp/plugins/appdata/ +%{_prefix}/lib/zypp/plugins/appdata/InstallAppdata.sh %files lang -f %{name}.lang From 0deb09462c40fa26525ee4e7802307fe5b4e1c4d0fd825b595bee7e8f2efc89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Sat, 4 Oct 2014 11:19:15 +0000 Subject: [PATCH 2/6] Accepting request 253902 from GNOME:Next - Split InstallAppdata.sh in an own package libzypp-plugin-appdata: other software centers might have to rely on this as well in the future. - Add appstream-glib Requires and minimum version for libzypp to libzypp-plugin-appdata. OBS-URL: https://build.opensuse.org/request/show/253902 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-software?expand=0&rev=28 --- gnome-software.changes | 9 +++++++++ gnome-software.spec | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/gnome-software.changes b/gnome-software.changes index d740008..0c36b24 100644 --- a/gnome-software.changes +++ b/gnome-software.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sat Oct 4 11:09:19 UTC 2014 - dimstar@opensuse.org + +- Split InstallAppdata.sh in an own package libzypp-plugin-appdata: + other software centers might have to rely on this as well in the + future. +- Add appstream-glib Requires and minimum version for libzypp to + libzypp-plugin-appdata. + ------------------------------------------------------------------- Thu Oct 2 14:37:21 UTC 2014 - dimstar@opensuse.org diff --git a/gnome-software.spec b/gnome-software.spec index 069d889..72ab61b 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -41,11 +41,28 @@ BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(packagekit-glib2) >= 1.0.0 BuildRequires: pkgconfig(sqlite3) BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires: libzypp-plugin-appdata %glib2_gsettings_schema_requires %description AppStore like management of Applications for your GNOME Desktop. +%package -n libzypp-plugin-appdata +Version: 1.0 +Release: 0 +Summary: Extend libzypp to handle AppStream metadata +Group: System/Libraries +Requires: appstream-glib >= 0.2.4 +# appdata hook was introduced in libzypp 14.29.4 +Requires: libzypp >= 14.29.4 + +%description -n libzypp-plugin-appdata +This plugin extends libzypp to install AppStream metadata, as extracted from the +repository metadata, onto the file system in order to be picked up by +software centers. + +At this moment, gnome-software is the only known implementation making use of it. + %lang_package %prep %setup -q @@ -102,6 +119,9 @@ install -Dm 0755 %{S:1} %{buildroot}%{_prefix}/lib/zypp/plugins/appdata/$(basena %dir %{_prefix}/lib/zypp %dir %{_prefix}/lib/zypp/plugins %dir %{_prefix}/lib/zypp/plugins/appdata/ + +%files -n libzypp-plugin-appdata +%defattr(-,root,root) %{_prefix}/lib/zypp/plugins/appdata/InstallAppdata.sh %files lang -f %{name}.lang From 1233ee6ea3893612ea86ee072ceb4f2c75cba1fdb457f01e8a844d1bb5577d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Sat, 4 Oct 2014 14:43:58 +0000 Subject: [PATCH 3/6] Accepting request 253908 from GNOME:Next - Move %lang_package before the definition of zypp-plugin-appstream to not confuse RPM with the redefined version of the subpackage. OBS-URL: https://build.opensuse.org/request/show/253908 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-software?expand=0&rev=29 --- gnome-software.changes | 7 +++++++ gnome-software.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gnome-software.changes b/gnome-software.changes index 0c36b24..297140c 100644 --- a/gnome-software.changes +++ b/gnome-software.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Oct 4 14:16:53 UTC 2014 - dimstar@opensuse.org + +- Move %lang_package before the definition of + zypp-plugin-appstream to not confuse RPM with the redefined + version of the subpackage. + ------------------------------------------------------------------- Sat Oct 4 11:09:19 UTC 2014 - dimstar@opensuse.org diff --git a/gnome-software.spec b/gnome-software.spec index 72ab61b..18bf394 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -47,6 +47,7 @@ Requires: libzypp-plugin-appdata %description AppStore like management of Applications for your GNOME Desktop. +%lang_package %package -n libzypp-plugin-appdata Version: 1.0 Release: 0 @@ -63,7 +64,6 @@ software centers. At this moment, gnome-software is the only known implementation making use of it. -%lang_package %prep %setup -q # Disables - let's try the systemd offline updater From 4c05666f3065ba32162f00ca45221deaa9ba549a1e27b0be5fcbd8f4e8f31052 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 4 Oct 2014 18:42:29 +0000 Subject: [PATCH 4/6] Accepting request 253937 from home:badshah400:branches:GNOME:Factory Add patch to set-up a YaST app-folder by default (patched build tested to be successful by zaitor) OBS-URL: https://build.opensuse.org/request/show/253937 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-software?expand=0&rev=30 --- ...-software-add-default-yast-appfolder.patch | 40 +++++++++++++++++++ gnome-software.changes | 7 ++++ gnome-software.spec | 3 ++ 3 files changed, 50 insertions(+) create mode 100644 gnome-software-add-default-yast-appfolder.patch diff --git a/gnome-software-add-default-yast-appfolder.patch b/gnome-software-add-default-yast-appfolder.patch new file mode 100644 index 0000000..12cdcf5 --- /dev/null +++ b/gnome-software-add-default-yast-appfolder.patch @@ -0,0 +1,40 @@ +Index: gnome-software-3.14.0/src/gs-folders.c +=================================================================== +--- gnome-software-3.14.0.orig/src/gs-folders.c ++++ gnome-software-3.14.0/src/gs-folders.c +@@ -559,6 +559,7 @@ gs_folders_convert (void) + const gchar * const children[] = { + "Utilities", + "Sundry", ++ "YaST", + NULL + }; + const gchar * const utilities_categories[] = { +@@ -627,6 +628,11 @@ gs_folders_convert (void) + "vino-preferences.desktop", + NULL + }; ++ const gchar * const yast_categories[] = { ++ "X-SuSE-YaST", ++ NULL ++ }; ++ + gchar *path; + gchar *child_path; + GSettings *child; +@@ -653,6 +659,15 @@ gs_folders_convert (void) + + g_object_unref (child); + g_free (child_path); ++ ++ child_path = g_strconcat (path, "folders/YaST/", NULL); ++ child = g_settings_new_with_path (APP_FOLDER_CHILD_SCHEMA, child_path); ++ g_settings_set_string (child, "name", "suse-yast.directory"); ++ g_settings_set_boolean (child, "translate", TRUE); ++ g_settings_set_strv (child, "categories", yast_categories); ++ ++ g_object_unref (child); ++ g_free (child_path); + + } + diff --git a/gnome-software.changes b/gnome-software.changes index 297140c..d2db3bd 100644 --- a/gnome-software.changes +++ b/gnome-software.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Oct 4 18:10:23 UTC 2014 - badshah400@gmail.com + +- Add gnome-software-add-default-yast-appfolder.patch to add a + YaST app-folder by default, in addition to existing app-folders + Sundry and Utilities; fixes boo#897713. + ------------------------------------------------------------------- Sat Oct 4 14:16:53 UTC 2014 - dimstar@opensuse.org diff --git a/gnome-software.spec b/gnome-software.spec index 18bf394..f4849e0 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -28,6 +28,8 @@ Source: http://download.gnome.org/sources/gnome-software/3.14/%{name}-%{ Source1: InstallAppdata.sh # PATCH-FEATURE-OPENSUSE gnome-software-PK-updates.patch dimstar@opensuse.org -- Switch to PackageKit Update provider instead of systemd offline updates. Patch0: gnome-software-PK-updates.patch +# PATCH-FEATURE-OPENSUSE gnome-software-add-default-yast-appfolder.patch boo#897713 badshah400@gmail.com -- Adds a YaST app-folder by default, in addition to existing app-folders Sundry and Utilities +Patch1: gnome-software-add-default-yast-appfolder.patch BuildRequires: intltool >= 0.35.0 BuildRequires: suse-xsl-stylesheets BuildRequires: update-desktop-files @@ -68,6 +70,7 @@ At this moment, gnome-software is the only known implementation making use of it %setup -q # Disables - let's try the systemd offline updater #patch0 -p1 +%patch1 -p1 %build %configure \ From 5fa1999b262e6f2573bc60ff1896526d4278f336757ad1e25973c2a497e4e67b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 4 Oct 2014 23:02:25 +0000 Subject: [PATCH 5/6] Accepting request 253969 from home:badshah400:branches:GNOME:Factory - Add gnome-software-linux32-in-utilities-appfolder.patch to group linux32.desktop inside the Utilties appfolder; partial workaround for boo#841070. OBS-URL: https://build.opensuse.org/request/show/253969 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-software?expand=0&rev=31 --- gnome-software-linux32-in-utilities-appfolder.patch | 12 ++++++++++++ gnome-software.changes | 7 +++++++ gnome-software.spec | 3 +++ 3 files changed, 22 insertions(+) create mode 100644 gnome-software-linux32-in-utilities-appfolder.patch diff --git a/gnome-software-linux32-in-utilities-appfolder.patch b/gnome-software-linux32-in-utilities-appfolder.patch new file mode 100644 index 0000000..5a8e9df --- /dev/null +++ b/gnome-software-linux32-in-utilities-appfolder.patch @@ -0,0 +1,12 @@ +Index: gnome-software-3.14.0/src/gs-folders.c +=================================================================== +--- gnome-software-3.14.0.orig/src/gs-folders.c ++++ gnome-software-3.14.0/src/gs-folders.c +@@ -571,6 +571,7 @@ gs_folders_convert (void) + "deja-dup-preferences.desktop", + "eog.desktop", + "evince.desktop", ++ "linux32.desktop", + "org.gnome.FileRoller.desktop", + "gnome-calculator.desktop", + "gnome-dictionary.desktop", diff --git a/gnome-software.changes b/gnome-software.changes index d2db3bd..67c74b2 100644 --- a/gnome-software.changes +++ b/gnome-software.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Oct 4 22:54:44 UTC 2014 - badshah400@gmail.com + +- Add gnome-software-linux32-in-utilities-appfolder.patch to group + linux32.desktop inside the Utilties appfolder; partial + workaround for boo#841070. + ------------------------------------------------------------------- Sat Oct 4 18:10:23 UTC 2014 - badshah400@gmail.com diff --git a/gnome-software.spec b/gnome-software.spec index f4849e0..3d55f14 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -30,6 +30,8 @@ Source1: InstallAppdata.sh Patch0: gnome-software-PK-updates.patch # PATCH-FEATURE-OPENSUSE gnome-software-add-default-yast-appfolder.patch boo#897713 badshah400@gmail.com -- Adds a YaST app-folder by default, in addition to existing app-folders Sundry and Utilities Patch1: gnome-software-add-default-yast-appfolder.patch +# PATCH-FEATURE-OPENSUSE gnome-software-linux32-in-utilities-appfolder.patch boo#841070 badshah400@gmail.com -- Group linux32.desktop inside the Utilties appfolder +Patch2: gnome-software-linux32-in-utilities-appfolder.patch BuildRequires: intltool >= 0.35.0 BuildRequires: suse-xsl-stylesheets BuildRequires: update-desktop-files @@ -71,6 +73,7 @@ At this moment, gnome-software is the only known implementation making use of it # Disables - let's try the systemd offline updater #patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %configure \ From b098c3b96dff05c91f0e12f79d0cbad604384f546fa36628350c5551964b2576 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 5 Oct 2014 17:24:35 +0000 Subject: [PATCH 6/6] Accepting request 254037 from GNOME:Factory Revert linux32-in-utilities OBS-URL: https://build.opensuse.org/request/show/254037 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-software?expand=0&rev=32 --- gnome-software-linux32-in-utilities-appfolder.patch | 12 ------------ gnome-software.changes | 7 ------- gnome-software.spec | 3 --- 3 files changed, 22 deletions(-) delete mode 100644 gnome-software-linux32-in-utilities-appfolder.patch diff --git a/gnome-software-linux32-in-utilities-appfolder.patch b/gnome-software-linux32-in-utilities-appfolder.patch deleted file mode 100644 index 5a8e9df..0000000 --- a/gnome-software-linux32-in-utilities-appfolder.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: gnome-software-3.14.0/src/gs-folders.c -=================================================================== ---- gnome-software-3.14.0.orig/src/gs-folders.c -+++ gnome-software-3.14.0/src/gs-folders.c -@@ -571,6 +571,7 @@ gs_folders_convert (void) - "deja-dup-preferences.desktop", - "eog.desktop", - "evince.desktop", -+ "linux32.desktop", - "org.gnome.FileRoller.desktop", - "gnome-calculator.desktop", - "gnome-dictionary.desktop", diff --git a/gnome-software.changes b/gnome-software.changes index 67c74b2..d2db3bd 100644 --- a/gnome-software.changes +++ b/gnome-software.changes @@ -1,10 +1,3 @@ -------------------------------------------------------------------- -Sat Oct 4 22:54:44 UTC 2014 - badshah400@gmail.com - -- Add gnome-software-linux32-in-utilities-appfolder.patch to group - linux32.desktop inside the Utilties appfolder; partial - workaround for boo#841070. - ------------------------------------------------------------------- Sat Oct 4 18:10:23 UTC 2014 - badshah400@gmail.com diff --git a/gnome-software.spec b/gnome-software.spec index 3d55f14..f4849e0 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -30,8 +30,6 @@ Source1: InstallAppdata.sh Patch0: gnome-software-PK-updates.patch # PATCH-FEATURE-OPENSUSE gnome-software-add-default-yast-appfolder.patch boo#897713 badshah400@gmail.com -- Adds a YaST app-folder by default, in addition to existing app-folders Sundry and Utilities Patch1: gnome-software-add-default-yast-appfolder.patch -# PATCH-FEATURE-OPENSUSE gnome-software-linux32-in-utilities-appfolder.patch boo#841070 badshah400@gmail.com -- Group linux32.desktop inside the Utilties appfolder -Patch2: gnome-software-linux32-in-utilities-appfolder.patch BuildRequires: intltool >= 0.35.0 BuildRequires: suse-xsl-stylesheets BuildRequires: update-desktop-files @@ -73,7 +71,6 @@ At this moment, gnome-software is the only known implementation making use of it # Disables - let's try the systemd offline updater #patch0 -p1 %patch1 -p1 -%patch2 -p1 %build %configure \