[usbview] New upstream release 2.0

Hans de Goede jwrdegoede at fedoraproject.org
Sat Apr 6 18:24:39 UTC 2013


commit 1e4989902b546dc77d8783ef098b0ac0ca800a41
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sat Apr 6 20:28:08 2013 +0200

    New upstream release 2.0
    
    - Drop patches (all upstreamed)
    - Fix usbview not working with newer kernels due to debugfs permission changes
      by using pxexec. Ideally usbview would be rewritten to use the public parts
      of sysfs instead.

 org.fedoraproject.usbview.policy     |   37 ++
 sources                              |    1 -
 usbview-1.1-gtk3-port.patch          |  802 ----------------------------------
 usbview-1.1-no-more-procbususb.patch |   24 -
 usbview.spec                         |   37 ++-
 5 files changed, 65 insertions(+), 836 deletions(-)
---
diff --git a/org.fedoraproject.usbview.policy b/org.fedoraproject.usbview.policy
new file mode 100644
index 0000000..a40d9f0
--- /dev/null
+++ b/org.fedoraproject.usbview.policy
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>System Config Date</vendor>
+ <vendor_url>http://fedoraproject.org/</vendor_url>
+
+ <action id="org.fedoraproject.usbview.pkexec.run">
+    <description>Run USB topology and device viewer</description>
+    <message>Authentication is required to run usbview</message>
+    <message xml:lang="cs">Pro spuštění usbview je vyžadována autentizace</message>
+    <message xml:lang="da">Godkendelse er påkrævet for at køre usbview</message>
+    <message xml:lang="de">Man muss dazu berechtigt sein, usbview auszuführen</message>
+    <message xml:lang="es">Se necesita autenticación para poder ejecutar usbview</message>
+    <message xml:lang="fr">Une authentification est demandée pour exécuter usbview</message>
+    <message xml:lang="hu">Azonosítás szükséges a usbview futtatásához</message>
+    <message xml:lang="ia">Authentication es necessari pro exequer usbview</message>
+    <message xml:lang="ja">usbview を実行するには、認証が必要です</message>
+    <message xml:lang="nb">Autentisering kreves for å kjøre usbview</message>
+    <message xml:lang="nl">Voor het draaien van usbview is authenticatie vereist</message>
+    <message xml:lang="pl">Wymagane jest uwierzytelnienie, aby uruchomić System-Config-Date</message>
+    <message xml:lang="tr">usbview uygulamasını çalıştırmak için yetki gerekiyor</message>
+    <message xml:lang="uk">Щоб мати змогу працювати з usbview, вам слід пройти розпізнавання</message>
+    <message xml:lang="zh_CN">运行 usbview 需要认证</message>
+    <message xml:lang="zh_TW">執行 usbview 需要先通過驗證</message>
+    <icon_name>usbview</icon_name>
+    <defaults>
+     <allow_any>no</allow_any>
+     <allow_inactive>no</allow_inactive>
+     <allow_active>auth_admin</allow_active>
+    </defaults>
+    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/usbview.bin</annotate>
+    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff --git a/sources b/sources
index 96f571e..e69de29 100644
--- a/sources
+++ b/sources
@@ -1 +0,0 @@
-8bf5e66351156356f3ad07454123affa  usbview-1.1.tar.gz
diff --git a/usbview.spec b/usbview.spec
index 45504a7..426ea18 100644
--- a/usbview.spec
+++ b/usbview.spec
@@ -1,16 +1,15 @@
 Name:           usbview
-Version:        1.1
-Release:        10%{?dist}
+Version:        2.0
+Release:        1%{?dist}
 Summary:        USB topology and device viewer
 Group:          Applications/System
 License:        GPLv2
 URL:            http://www.kroah.com/linux-usb/
 Source0:        http://www.kroah.com/linux-usb/%{name}-%{version}.tar.gz
 Source1:        %{name}.desktop
-Patch0:         usbview-1.1-no-more-procbususb.patch
-Patch1:         usbview-1.1-gtk3-port.patch
+Source2:        org.fedoraproject.usbview.policy
 BuildRequires:  gtk3-devel automake desktop-file-utils
-Requires:       hicolor-icon-theme
+Requires:       hicolor-icon-theme polkit
 
 %description
 Display information about the topology of the devices connected to the USB bus
@@ -20,8 +19,7 @@ devices.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
+# For aarch64 support
 autoreconf -f -i
 # Convert to utf-8
 for file in ChangeLog; do
@@ -39,12 +37,25 @@ make %{?_smp_mflags}
 %install
 make install DESTDIR=$RPM_BUILD_ROOT
 
+#setup pkxexec
+mv $RPM_BUILD_ROOT%{_bindir}/usbview $RPM_BUILD_ROOT%{_bindir}/usbview.bin
+cat > $RPM_BUILD_ROOT%{_bindir}/usbview << EOF
+#!/bin/sh
+exec pkexec %{_bindir}/usbview.bin
+EOF
+chmod +x $RPM_BUILD_ROOT%{_bindir}/usbview
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions
+install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions
+
 #install desktop icon
 install -Dp -m 0644 usb_icon.xpm \
     $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.xpm
 
 #install desktop file
 desktop-file-install                                    \
+%if 0%{?fedora} && 0%{?fedora} < 19
+--vendor fedora                                         \
+%endif
 --add-category="System"                                 \
 --dir=$RPM_BUILD_ROOT%{_datadir}/applications           \
 %{SOURCE1}
@@ -65,13 +76,21 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 %files
 %doc ChangeLog COPYING* README TODO
-%{_bindir}/usbview
+%{_bindir}/usbview*
 %{_mandir}/man8/usbview*
+%{_datadir}/polkit-1/actions/org.fedoraproject.usbview.policy
 %{_datadir}/icons/hicolor/64x64/apps/%{name}.xpm
-%{_datadir}/applications/%{name}.desktop
+%{_datadir}/applications/*%{name}.desktop
 
 
 %changelog
+* Sat Apr  6 2013 Hans de Goede <hdegoede at redhat.com> - 2.0-1
+- New upstream release 2.0
+- Drop patches (all upstreamed)
+- Fix usbview not working with newer kernels due to debugfs permission changes
+  by using pxexec. Ideally usbview would be rewritten to use the public parts
+  of sysfs instead.
+
 * Sat Feb 09 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 1.1-10
 - Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077
 


More information about the scm-commits mailing list