Accepting request 590296 from GNOME:Next

- Update to version 1.0.1+git.20180321:
  * ZYpp AsHelper: install AS data into system cache: new python
    helper to be a bit smarter (part of boo#996896).

OBS-URL: https://build.opensuse.org/request/show/590296
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libzypp-plugin-appdata?expand=0&rev=40
This commit is contained in:
Dominique Leuenberger 2018-03-23 14:03:52 +00:00 committed by Git OBS Bridge
parent eaacfb67b6
commit c97c6480ab
7 changed files with 23 additions and 71 deletions

View File

@ -1,62 +0,0 @@
#!/bin/bash
# Copyright (c) 2014 Dominique Leuenberger, Amsterdam, The Netherlands
# Copyright (c) 2016 Raymond Wooninck, Vienna, Austria
# 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 /var/cache/app-info/xmls/*.xml.gz 2> /dev/null); 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)
if appstream-util validate-relax --nonet "$6$RPMMD/"*appdata.xml.gz 2>&1 > /dev/null; then
appstream-util install-origin "$2" "$6$RPMMD/"*appdata.xml.gz "$6$RPMMD/"*app-icons.tar.gz 2>&1 > /dev/null
fi
;;
yast2)
# We do not validate an appdata.xml.gz in a yast2 repo: those are created by appstream-builder, and we can trust them
#if appstream-util validate-relax --nonet "$6$YAST2/appdata.xml.gz" 2>&1 > /dev/null; then
# get the real appdata.xml.gz file name out of content
APPDATA=$(awk '/appdata.*xml.gz/ && !/failed|ignore/ {print $4}' "$6/content")
appstream-util install-origin "$2" "$6$YAST2/${APPDATA}" "$6$YAST2/"appdata-icons*.tar.gz 2>&1 > /dev/null
#fi
;;
*)
echo "unknown repo type - Appstream data not considered"
esac
shift 6
done
# Fixup icon that might have uncompressed with odd permissions
chmod 755 /var/cache/app-info/icons/*
# (Re)create the Xapian database required by the KDE tools
appstreamcli refresh-cache

View File

@ -2,6 +2,7 @@
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/DimStar77/openSUSE-appstream.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
<param name="versionformat">1.0.1+git.%cd</param>
</service>
<service name="recompress" mode="disabled">

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/DimStar77/openSUSE-appstream.git</param>
<param name="changesrevision">58e1e4e128dfe67484342418afcc61efe6e592bf</param></service></servicedata>

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Mar 21 19:15:14 UTC 2018 - dimstar@opensuse.org
- Update to version 1.0.1+git.20180321:
* ZYpp AsHelper: install AS data into system cache: new python
helper to be a bit smarter (part of boo#996896).
-------------------------------------------------------------------
Wed Feb 28 16:36:57 UTC 2018 - dimstar@opensuse.org

View File

@ -17,22 +17,22 @@
Name: libzypp-plugin-appdata
Version: 1.0.1+git.20170629
Version: 1.0.1+git.20180321
Release: 0
Summary: Extend libzypp to handle AppStream metadata
License: MIT AND CC0-1.0
Group: System/Libraries
URL: https://wiki.gnome.org/Design/Apps/Software
Source0: openSUSE-appstream-%{version}.tar.xz
Source2: InstallAppdata.sh
# appstreamcli is provided by the AppStream package
Requires: AppStream
# appstream-glib >= 0.3.6 is the first to correctly to appstream-util uninstall in /var/cache
Requires: appstream-glib >= 0.3.6
# The script uses awk to find the right filename for the appdata.xml.gz file
Requires: awk
# appdata hook was introduced in libzypp 14.29.4
Requires: libzypp >= 14.29.4
Requires: python3-cmdln
# AsHelper is a python program with few dependencies
Requires: python3-createrepo_c
# This is one way of providing valid appstream metadata to applications (currently the only implemented one)
Provides: appstream-provider
BuildArch: noarch
@ -60,8 +60,9 @@ This package contains extra appstream metadata to be used by appstream-builder
install -m 0755 -d %{buildroot}%{_datadir}/appdata-extra
cp appdata-extra/*/* %{buildroot}%{_datadir}/appdata-extra/
# Install AppData zypp plugin - temporarily disabled in favor of static AppStream metadata
install -Dm 0755 %{SOURCE2} %{buildroot}%{_prefix}/lib/zypp/plugins/appdata/$(basename %{SOURCE2})
# Install AppData zypp plugin
install -Dm 0755 InstallAppdata.sh %{buildroot}%{_prefix}/lib/zypp/plugins/appdata/InstallAppdata.sh
install -Dm 0755 AsHelper.py %{buildroot}%{_libexecdir}/AsHelper
%files
# zypp plugin triggering AppData update on repo refresh
@ -69,6 +70,7 @@ install -Dm 0755 %{SOURCE2} %{buildroot}%{_prefix}/lib/zypp/plugins/appdata/$(ba
%dir %{_prefix}/lib/zypp/plugins
%dir %{_prefix}/lib/zypp/plugins/appdata/
%{_prefix}/lib/zypp/plugins/appdata/InstallAppdata.sh
%{_libexecdir}/AsHelper
%files -n openSUSE-appdata-extra
%{_datadir}/appdata-extra/

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:096322515588a52dfb6b382889ca28bc8127bc3b2cdf1abee67f27573d5fdf0e
size 89260

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d4a955125b1b5462902b5a50a31203e749c866c4160e42052166f8b91dd77c8
size 90984