From 14c267d5f5a5af5ec9b7fefb1661189237448b0d Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann Date: Sep 13 2019 14:29:36 +0000 Subject: restructure files to remain below github limit of 1000 entries --- diff --git a/alacarte-python3.patch b/alacarte-python3.patch new file mode 100644 index 0000000..094ac3c --- /dev/null +++ b/alacarte-python3.patch @@ -0,0 +1,75 @@ +From b2af67fd6bc6667343f3850ce981f51af0f5c155 Mon Sep 17 00:00:00 2001 +From: e < �h�U> +Date: Sat, 9 Sep 2017 19:59:06 -0500 +Subject: [PATCH] util.py and acinclude.m4: Support Python 3 + +--- + .gitignore | 2 ++ + Alacarte/util.py | 7 +++++++ + acinclude.m4 | 4 ++-- + 3 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/Alacarte/util.py b/Alacarte/util.py +index 0d98d56..3bbb943 100644 +--- a/Alacarte/util.py ++++ b/Alacarte/util.py +@@ -24,6 +24,13 @@ import gi + gi.require_version('Gtk', '3.0') + from gi.repository import Gtk, GdkPixbuf, GMenu, GLib + ++# Python 2/3 compatibility ++try: ++ basestring ++except NameError: ++ # Must be python3 ++ basestring = (str, bytes) ++ + DESKTOP_GROUP = GLib.KEY_FILE_DESKTOP_GROUP + KEY_FILE_FLAGS = GLib.KeyFileFlags.KEEP_COMMENTS | GLib.KeyFileFlags.KEEP_TRANSLATIONS + +diff --git a/acinclude.m4 b/acinclude.m4 +index 372e0b2..b6eaa4f 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -69,7 +69,7 @@ AC_DEFUN([AM_PATH_PYTHON_VERSION], + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], +- [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) ++ [am_cv_python_version=`$PYTHON -c "import sys; print(sys.version[[:3]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding +@@ -84,7 +84,7 @@ AC_DEFUN([AM_PATH_PYTHON_VERSION], + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], +- [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) ++ [am_cv_python_platform=`$PYTHON -c "import sys; print(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + +diff -urp alacarte-3.11.91.orig/configure.ac alacarte-3.11.91/configure.ac +--- alacarte-3.11.91.orig/configure.ac 2014-03-03 07:01:44.000000000 -0600 ++++ alacarte-3.11.91/configure.ac 2018-01-14 21:03:34.122761459 -0600 +@@ -18,7 +18,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GE + AM_GLIB_GNU_GETTEXT + IT_PROG_INTLTOOL([0.40.0]) + +-AM_PATH_PYTHON_VERSION(2.7, 2.7.0, 2.6, 2.6.0, 2.5, 2.5.0, 2.4, 2.4.0) ++AM_PATH_PYTHON_VERSION(3.7, 3.7.0, 3.6, 3.6.0, 2.7, 2.7.0, 2.6, 2.6.0, 2.5, 2.5.0, 2.4, 2.4.0) + + PKG_CHECK_MODULES(ALACARTE, libgnome-menu-3.0 >= 3.5.3 pygobject-3.0) + +diff -urp alacarte-3.11.91.orig/Alacarte/MainWindow.py alacarte-3.11.91/Alacarte/MainWindow.py +--- alacarte-3.11.91.orig/Alacarte/MainWindow.py 2014-02-27 18:30:39.000000000 -0600 ++++ alacarte-3.11.91/Alacarte/MainWindow.py 2018-01-15 13:01:45.176198435 -0600 +@@ -239,7 +239,7 @@ class MainWindow(object): + menu_tree.get_selection().select_path((0,)) + else: + parent = menus[iter][2] +- file_name = util.getUniqueFileId('alacarte-made', '.directory') ++ file_name = util.getUniqueFileId('alacarte-made', '.directory') + file_path = os.path.join(util.getUserDirectoryPath(), file_name) + + editor = DirectoryEditor(self.main_window, file_path) diff --git a/alacarte-trans.patch b/alacarte-trans.patch new file mode 100644 index 0000000..8a76e02 --- /dev/null +++ b/alacarte-trans.patch @@ -0,0 +1,34 @@ +Index: alacarte-3.11.91/Alacarte/ItemEditor.py +=================================================================== +--- alacarte-3.11.91.orig/Alacarte/ItemEditor.py ++++ alacarte-3.11.91/Alacarte/ItemEditor.py +@@ -22,6 +22,8 @@ import gi + gi.require_version('Gtk', '3.0') + from gi.repository import GLib, GObject, Gtk + from Alacarte import config, util ++gettext.bindtextdomain(config.GETTEXT_PACKAGE, config.localedir) ++gettext.textdomain(config.GETTEXT_PACKAGE) + + _ = gettext.gettext + +@@ -102,6 +104,7 @@ class ItemEditor(GObject.GObject): + def __init__(self, parent, item_path): + GObject.GObject.__init__(self) + self.builder = Gtk.Builder() ++ self.builder.set_translation_domain(config.GETTEXT_PACKAGE) + self.builder.add_from_file(os.path.join(config.pkgdatadir, self.ui_file)) + + self.dialog = self.builder.get_object('editor') +Index: alacarte-3.11.91/data/alacarte.ui +=================================================================== +--- alacarte-3.11.91.orig/data/alacarte.ui ++++ alacarte-3.11.91/data/alacarte.ui +@@ -70,7 +70,7 @@ + + + +- Restore System Configuration ++ Restore System Configuration + True + True + True diff --git a/alacarte.changes b/alacarte.changes new file mode 100644 index 0000000..5e4609d --- /dev/null +++ b/alacarte.changes @@ -0,0 +1,515 @@ +------------------------------------------------------------------- +Tue Jan 29 09:55:56 UTC 2019 - Dominique Leuenberger + +- Update alacarte-python3.patch: Add support for python 3.7. + +------------------------------------------------------------------- +Wed Feb 28 16:22:48 UTC 2018 - dimstar@opensuse.org + +- Modernize spec-file by calling spec-cleaner + +------------------------------------------------------------------- +Mon Jan 15 19:05:09 UTC 2018 - mgorse@suse.com + +- Migrate to python3 (bsc#1075771): + + Add alacarte-python3.patch: convert the code to be py3 + compatible. + + Update alacarte-trans.patch: Don't use tab for indentation. + + Add autoconf and automake BuildRequires and call autoreconf in + build section: needed, since above patches touch the build + system. + + Replace python BuildRequires with python3. + + Add python3-gobject-Gdk Requires: new dependency. + +------------------------------------------------------------------- +Thu Sep 14 06:33:45 UTC 2017 - qzheng@suse.com + +- Added fix-bad-command-validation.patch which fix bad command + validation, backported from commit hash 665b471 and ca7d05c + (bsc#1057908, bgo#728372). + +------------------------------------------------------------------- +Fri May 20 09:18:41 UTC 2016 - alarrosa@suse.com + +- Update to GNOME 3.20.2 (Fate#318572) + +------------------------------------------------------------------- +Tue May 3 21:34:53 UTC 2016 - dimstar@opensuse.org + +- Require python-gobject-Gdk: pygobject was further split in order + to be able to install it without X-dependencies. Alacarte imports + Gdk from gi.repository, thus also requires python-gobject-Gdk. + +------------------------------------------------------------------- +Thu Apr 14 19:55:03 UTC 2016 - mgorse@suse.com + +- Update to GNOME 3.20 Fate#318572 + +------------------------------------------------------------------- +Tue Nov 27 13:15:21 UTC 2015 - qzhao@suse.org + +- Updated alacarte-trans.patch to modify alacarte.ui: + use original text, translate all PO tranlation files. + Modified under Stanislav Brabec's review result. + (bnc#947793) + +------------------------------------------------------------------- +Tue Oct 13 17:30:21 UTC 2015 - qzhao@suse.org + +- Added alacarte-trans.patch which adds a gettext function + to ItemEditor.py to make alacarte translatable (bnc#947793) + +------------------------------------------------------------------- +Sun Oct 5 16:15:34 UTC 2014 - zaitor@opensuse.org + +- Move .desktopfile from X-GNOME-SystemSettings to + X-GNOME-PersonalSettings, since the only values one can change is + for active user. Having it under System gives the impression that + changes are systemwide. + +------------------------------------------------------------------- +Sat Aug 9 12:02:20 UTC 2014 - dimstar@opensuse.org + +- Add X-GNOME-SystemSettings to the .desktop categories: this adds + allacarte to the overview in gnome-control-center. + +------------------------------------------------------------------- +Mon Mar 3 14:55:56 UTC 2014 - zaitor@opensuse.org + +- Update to version 3.11.91: + + Drop Help button. + + Ensure items have valid Exec. + + Add a man page. + + Make Restore button work again. + + Fix creating menus. + + Fix creating items. + + Updated translations. +- Drop alacarte-nohelp.patch, fixed upstream. +- Add suse-xsl-stylesheets BuildRequires, needed to build manpages. + +------------------------------------------------------------------- +Thu Dec 12 21:44:56 UTC 2013 - dimstar@opensuse.org + +- Drop alacarte_system_edit_mode.patch: after almost 5 year needing + rebase, the feature can't possible be important enough. + +------------------------------------------------------------------- +Sat Sep 28 15:38:25 UTC 2013 - dimstar@opensuse.org + +- Correct alacarte-nohelp.patch: only remove the accelerator, + nothing else (bnc#842988). + +------------------------------------------------------------------- +Tue Sep 24 17:35:29 UTC 2013 - dimstar@opensuse.org + +- Update to version 3.10.0: + + Errors on launch. + + Updated translations. + +------------------------------------------------------------------- +Tue Sep 3 14:09:49 UTC 2013 - dimstar@opensuse.org + +- Update to version 3.9.91: + + Fix Unicode/binary screwups causing UnicodeDecodeErrors. + + Add python3 compatibility. + + Don't leave behind stale .desktop files. + + Actually quit when hitting the close button. + +------------------------------------------------------------------- +Thu Feb 28 08:13:45 UTC 2013 - dimstar@opensuse.org + +- Update to version 3.7.90: + + Remove dependency on gnome-panel by rewriting the menu/item + editor. + + Cleanups to the UI. + + Allow editing menus other than applications.menu. + + Updated translations. +- Drop alacarte-desktop.patch: fixed upstream. + +------------------------------------------------------------------- +Tue Jan 15 10:55:45 UTC 2013 - dimstar@opensuse.org + +- Update to version 3.7.3: + + Enforce the use of Gtk3 (bgo#691599) + + Allow specifying a menu basename other than applications.menu. + + Updated translations. +- Drop alacarte-force-Gtk3.patch: fixed upstream. +- Drop alacarte-support-exo-desktop-item-edit.patch: no longer + applicable, as an internal menu editor is now being used. +- Add alacarte-desktop.patch: fix a typo which avoided the + installation of the .desktop file. + +------------------------------------------------------------------- +Sun Jan 13 11:20:57 UTC 2013 - zaitor@opensuse.org + +- Update to version 3.7.2: + + Deal with the case of having no $XDG_MENU_PREFIX + + Fix some crashes when writing out unicode files. + + Misc cleanups + + Updated translations. +- Rebase alacarte-force-Gtk3.patch. + +------------------------------------------------------------------- +Sat Jan 12 12:37:14 UTC 2013 - dimstar@opensuse.org + +- Add alacarte-force-Gtk3.patch: Force the use of Gtk 3. Gtk2 was + not designed for use with introspection and some interfaces fail + (bnc#798181, bgo#691599). + +------------------------------------------------------------------- +Wed Oct 17 18:34:59 UTC 2012 - zaitor@opensuse.org + +- Update to version 3.6.1: + + Bugs Fixed: Respect $XDG_MENU_PREFIX. + + Updated translations. +- Drop alacarte-xdg-menu.patch, fixed upstream. +- Drop %if check for obsolete openSUSE version. + +------------------------------------------------------------------- +Thu Sep 6 20:45:18 UTC 2012 - dimstar@opensuse.org + +- Add alacarte-xdg-menu.patch: Use XDG_MENU_PREFIX when referencing + applications.menu (bnc#779098). + +------------------------------------------------------------------- +Thu Sep 6 19:41:01 UTC 2012 - dimstar@opensuse.org + +- Add alacarte-nohelp.patch: Do not show a help button or act on + F1 key: there is no help in alacarte at this moment (bnc#779062). + +------------------------------------------------------------------- +Tue Aug 7 10:06:02 UTC 2012 - dimstar@opensuse.org + +- Update to version 3.5.5: + + Fix the "Revert" button + + Updated translations. + +------------------------------------------------------------------- +Wed Jul 18 08:55:13 UTC 2012 - dimstar@opensuse.org + +- Update to version 3.5.4: + + Code cleanups + + Renamed the "Revert" button, hopefully to make it less + confusing + + Updated translations. + +------------------------------------------------------------------- +Wed Jun 27 18:59:01 UTC 2012 - dimstar@opensuse.org + +- Update to version 3.5.3: + + Bugs fixed: + - Code cleanups + - Don't fail when loading a non-existant icon + - Fix spurious crashes and asserts by removing the visible_tree + stuff + - Fix separator support (bgo#677343) + - Put back the top-level "Applications" section that was + accidentally removed (bgo#677420) + + Updated translations. +- Rebase alacarte-support-exo-desktop-item-edit.patch. + +------------------------------------------------------------------- +Wed Jun 6 19:27:53 UTC 2012 - dimstar@opensuse.org + +- Update to version 0.13.4: + + Remove old PyGTK+/PyGObject 2 version checks (bgo#676699) + + Crash on exit due to a NULL tree-view selection (bgo#676702) + + Avoid crashing if a .desktop file has no icon defined + (bgo#676700) + + Mark Alacarte as a Utility (bgo#658880) + + Unable to rearrange menu items (bgo#676987) + + Various code cleanups + + MainWindow: Don't select the destination folder after a drop + (bgo#551390) + + Don't fail when handed corrupt or invalid XML (bgo#654167) +- Changes from version 0.13.3: + + Port to GI introspection +- Update BuildRequires after port to GI Introspection: + + Removed: python-gtk, pkgconfig(libgnome-menu), + + Added: pkgconfig(libgnome-menu-3.0), pkgconfig(pygobject-3.0) +- Drop no longer needed Requires: python-gnome-menus, python-gtk: + after the port to GI Introspection, we are able to auto-detect + the needed requires. +- Add hicolor-icon-theme BuildRequires: was brought in implicit by + some other dependency before. We need it for %icon_theme_cache_* + macros. +- Add gobject-introspection BuildRequires: not a real dependency + for the build, but it brings in the typelib() dependency + generator. +- Drop alacarte-no-settings.menu.patch: fixed upstram. +- Rebase alacarte-support-exo-desktop-item-edit.patch. + +------------------------------------------------------------------- +Sat Nov 5 11:16:07 UTC 2011 - gber@opensuse.org + +- Added alacarte-support-exo-desktop-item-edit.patch in order to + support exo-desktop-item-edit as an alternative to + gnome-desktop-item-edit (bnc#728482) + +------------------------------------------------------------------- +Wed Oct 19 18:23:43 UTC 2011 - badshah400@gmail.com + +- Added desktop menu categories to make alacarte appear + categorised as "Accessories" rather than "Other" (bnc#714333) + +------------------------------------------------------------------- +Sat Sep 17 10:52:36 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile +- Use %_smp_mflags for parallel build + +------------------------------------------------------------------- +Thu Aug 18 17:12:48 UTC 2011 - dimstar@opensuse.org + +- Replace gnome-menus-devel BuildRequires with + pkgconfig(libgnome-menu) to help the build find the correct + version of gnome-menus. + +------------------------------------------------------------------- +Fri Jul 22 13:32:05 CEST 2011 - vuntz@opensuse.org + +- Add alacarte-no-settings.menu.patch: do not try to edit + settings.menu, as the file got removed in GNOME 3. + +------------------------------------------------------------------- +Sun Feb 13 13:48:03 CET 2011 - vuntz@opensuse.org + +- Call relevant macros in %post/%postun: + + %desktop_database_post/postun because the package ships at + least one desktop file. + + %icon_theme_cache_post/postun because the package ships themed + icons. +- Pass %{?no_lang_C} to %find_lang so that english documentation + can be packaged with the program, and not in the lang subpackage. +- Change Requires of lang subpackage to Recommends, since the + english documentation is not there anymore. + +------------------------------------------------------------------- +Wed Sep 15 17:19:11 CEST 2010 - vuntz@opensuse.org + +- Update to version 0.13.2: + + Build against python 2.7 + + Updated translatins. +- Drop alacarte-0.13.1-python27.patch: fixed upstream. + +------------------------------------------------------------------- +Mon Sep 6 14:43:19 UTC 2010 - coolo@novell.com + +- Add alacarte-0.13.1-python27.patch: support python 2.7. + +------------------------------------------------------------------- +Mon Mar 29 11:48:43 CEST 2010 - vuntz@opensuse.org + +- Update to version 0.13.1: + + bgo#596098, i18n initialization problem + + Updated translations. +- Remove en@shaw translations on 11.2 and earlier. + +------------------------------------------------------------------- +Wed Dec 2 11:26:04 CET 2009 - vuntz@opensuse.org + +- Update the way we remove the bem locale for old versions of + openSUSE. + +------------------------------------------------------------------- +Mon Sep 28 11:10:18 CEST 2009 - dimstar@opensuse.org + +- Update to version 0.12.4: + + Updated translations. + +------------------------------------------------------------------- +Wed Sep 9 03:39:15 CEST 2009 - vuntz@opensuse.org + +- Update to version 0.12.3: + + Set the translation domain to GtkBuilder +- Changes from version 0.12.2: + + Use the display name from X-GNOME-FullName when possible + +------------------------------------------------------------------- +Fri Aug 14 02:58:24 CEST 2009 - vuntz@novell.com + +- Fix packaging bug: icons are not directories. + +------------------------------------------------------------------- +Wed Aug 12 14:51:02 CEST 2009 - dominique-obs@leuenberger.net + +- Define new python macros on openSUSE <= 11.1. + +------------------------------------------------------------------- +Sun Aug 9 12:03:51 CEST 2009 - coolo@novell.com + +- use new python macros + +------------------------------------------------------------------- +Tue May 5 18:37:39 CEST 2009 - vuntz@novell.com + +- Update to version 0.12.1: + + Generate the ChangeLog from git-log + + Drop libglade dependency +- Remove gnome-common BuildRequires. + +------------------------------------------------------------------- +Tue Mar 17 17:55:26 CET 2009 - vuntz@novell.com + +- Update to version 0.11.10: + + Updated translations. +- Remove AutoReqProv: it's default now. + +------------------------------------------------------------------- +Mon Mar 16 14:46:15 CET 2009 - sbrabec@suse.cz + +- Added support for translation-update-upstream (FATE#301344). + +------------------------------------------------------------------- +Sun Feb 22 16:57:23 CET 2009 - vuntz@novell.com + +- Update to version 0.11.9: + + Remove libgnomeui dependency + + Updated translations +- Change BuildRequires/Requires on python-gnome to python-gtk. +- Disable alacarte_system_edit_mode.patch and mark it as needing a + rebase. + +------------------------------------------------------------------- +Tue Feb 3 08:24:58 EST 2009 - mboman@suse.de + +- Update to version 0.11.8: + + Work properly when pygobject is not installed in a default + directory + + Translation updates +- Disable alacarte_system_edit_mode.patch since it needs rebasing. +- Do not require python twice. + +------------------------------------------------------------------- +Tue Jan 27 20:07:44 WET 2009 - lmedinas@gmail.com + +- Update to version 0.11.7: + + Port to GIO + + Print better messages when checking for Python libraries + + Updated translations. + +------------------------------------------------------------------- +Sat Jan 17 19:17:58 CEST 2009 - sreeves@suse.de + +- Rebase and reapply alacarte_system_edit_mode patch + +------------------------------------------------------------------- +Fri Oct 24 16:09:23 CEST 2008 - vuntz@novell.com + +- Requires python-gnome-menus, so that it actually works. + +------------------------------------------------------------------- +Tue Sep 23 15:30:53 CDT 2008 - maw@suse.de + +- Update to version 0.11.6: + + Install theme icons in a more correct manner + + Deal with python 2.6 + + Updated translations. + +------------------------------------------------------------------- +Wed Sep 10 21:32:43 EDT 2008 - jpr@novell.com + +- Fix build for python 2.6 with alacarte-python-2.6.patch + +------------------------------------------------------------------- +Sun Apr 13 19:17:58 CEST 2008 - sreeves@suse.de + +- Add alacarte_system_edit_mode.patch - expand the individual user only + menu editing capability of alacarte to provide the system administrator + with system wide menu editing. + +------------------------------------------------------------------- +Tue Mar 11 18:22:00 CET 2008 - vuntz@suse.de + +- Update to version 0.11.5: + + Fix exception on first open of context menu. + + Updated translations. + +------------------------------------------------------------------- +Tue Mar 4 19:26:06 CET 2008 - maw@suse.de + +- Update to version 0.11.4: + + Lots of bugs fixed + + Updated translations. + +------------------------------------------------------------------- +Wed Aug 8 18:13:39 CEST 2007 - maw@suse.de + +- Use %fdupes +- Split off a -lang subpackage. + +------------------------------------------------------------------- +Wed May 9 18:21:11 CEST 2007 - pgajdos@suse.cz + +- removed gnome-icon-theme from Requires and BuildRequires + [#247450] + +------------------------------------------------------------------- +Thu Mar 8 12:42:35 CET 2007 - sbrabec@suse.cz + +- Removed obsolete hicolor icon symlink (#248676). + +------------------------------------------------------------------- +Tue Feb 27 13:31:48 CST 2007 - maw@suse.de + +- Update to version 0.11.3. + * Add back support for System menu + * remove preferences/administration editing + * fix goofy bugs + * respond to show/hide immediately + * use gnome-desktop-item-edit for all menu and item editing + +------------------------------------------------------------------- +Mon Jan 22 19:15:09 CET 2007 - sbrabec@suse.cz + +- Prefix changed to /usr. +- Spec file cleanup. + +------------------------------------------------------------------- +Mon Jan 8 17:16:12 CET 2007 - sreeves@suse.de + +- upgrade to 0.10.3. Upstream version now includes current patches. + This version is needed as part of the work on Fate#301648 for sp1. + +------------------------------------------------------------------- +Fri Nov 17 18:26:24 CET 2006 - sreeves@suse.de + +- Fix for 220300 - wrong gettext init breaks translations + remove invalid category entry + +------------------------------------------------------------------- +Wed Oct 4 18:02:37 CEST 2006 - jhargadon@suse.de + +- added gnome-menus, python-gnome, python-xml, and %py_requires + requires to the specfile for bug #207888 + +------------------------------------------------------------------- +Tue Oct 3 17:39:57 CEST 2006 - jhargadon@suse.de + +- update to version 0.10.1 +- lots of small fixes + +------------------------------------------------------------------- +Tue Sep 26 00:59:07 CEST 2006 - ro@suse.de + +- accept python-2.5 and move python files to /usr + +------------------------------------------------------------------- +Thu Sep 14 01:10:59 CEST 2006 - jhargadon@suse.de + +- update to version 0.10.0 +- fix crashed caused by new gnome-menus +- potentially fix crash on solaris +- make help button and F1 work +- translation updates. + +------------------------------------------------------------------- +Mon Sep 11 22:23:12 CEST 2006 - jhargadon@suse.de + +- added missing directory ownerships to the specfile + +------------------------------------------------------------------- +Thu Aug 31 14:45:51 CEST 2006 - rodrigo@suse.de + +- Initial package submitted. + diff --git a/alacarte.spec b/alacarte.spec new file mode 100644 index 0000000..ff3b530 --- /dev/null +++ b/alacarte.spec @@ -0,0 +1,99 @@ +# +# spec file for package alacarte +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: alacarte +Version: 3.11.91 +Release: 0 +Summary: Menu editor for GNOME +License: LGPL-2.1-or-later +Group: System/GUI/GNOME +URL: http://www.realistanew.com/projects/alacarte +Source: http://download.gnome.org/sources/alacarte/3.11/%{name}-%{version}.tar.xz +# PATCH-FIX-OPENSUSE alacarte-trans.patch bnc#947793 qzhao@suse.org -- Fix untranslated messages +Patch0: alacarte-trans.patch +# PATCH-FIX-UPSTREAM fix-bad-command-validation.patch bsc#1057908 bgo#728372 qzheng@suse.com -- Fix bad command validation +Patch1: fix-bad-command-validation.patch +# PATCH-FIX-UPSTREAM alacarte-python3.patch bsc#1075771 bgo#787490 mgorse@suse.com -- Support python 3. +Patch2: alacarte-python3.patch +# Needed for Patch2 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: fdupes +BuildRequires: glib2-devel +# Needed for the typelib() dependency parser +BuildRequires: gobject-introspection +# Needed for %%icon_theme_cache_* macros. +BuildRequires: hicolor-icon-theme +BuildRequires: intltool +BuildRequires: pkgconfig +BuildRequires: python3 +BuildRequires: suse-xsl-stylesheets +BuildRequires: translation-update-upstream +BuildRequires: update-desktop-files +BuildRequires: pkgconfig(libgnome-menu-3.0) >= 3.5.3 +BuildRequires: pkgconfig(pygobject-3.0) +Requires: python3-gobject-Gdk +Recommends: %{name}-lang + +%description +Alacarte is a simple freedesktop.org compliant menu editor for GNOME +that lets you change your menus, simply and quickly. Just click and +type to edit, add, and delete any menu entry. + +%lang_package + +%prep +%setup -q +translation-update-upstream +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%build +# needed for Patch2 +autoreconf -fi +%configure +make %{?_smp_mflags} + +%install +%make_install +%suse_update_desktop_file -r alacarte GNOME Utility DesktopUtility X-GNOME-PersonalSettings +%find_lang %{name} %{?no_lang_C} +%fdupes %{buildroot} + +%post +%desktop_database_post +%icon_theme_cache_post + +%postun +%desktop_database_postun +%icon_theme_cache_postun + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README +%{_bindir}/alacarte +%{_datadir}/alacarte +%{_datadir}/applications/alacarte.desktop +%{_datadir}/icons/hicolor/*/*/*.* +%{python3_sitelib}/Alacarte +%{_mandir}/man1/alacarte.1%{?ext_man} + +%files lang -f %{name}.lang + +%changelog diff --git a/fix-bad-command-validation.patch b/fix-bad-command-validation.patch new file mode 100644 index 0000000..97d8d4e --- /dev/null +++ b/fix-bad-command-validation.patch @@ -0,0 +1,29 @@ +diff --git a/Alacarte/ItemEditor.py b/Alacarte/ItemEditor.py +index 9fd9faa..c5de30c 100644 +--- a/Alacarte/ItemEditor.py ++++ b/Alacarte/ItemEditor.py +@@ -178,14 +178,22 @@ class LauncherEditor(ItemEditor): + self.builder.get_object('icon-image')) + + self.builder.get_object('exec-browse').connect('clicked', self.pick_exec) +- + self.builder.get_object('name-entry').connect('changed', self.resync_validity) + self.builder.get_object('exec-entry').connect('changed', self.resync_validity) + ++ def exec_line_is_valid(self, exec_text): ++ try: ++ success, parsed = GLib.shell_parse_argv(exec_text) ++ # Make sure program (first part of the command) is in the path ++ command = parsed[0] ++ return (GLib.find_program_in_path(command) is not None) ++ except GLib.GError: ++ return False ++ + def resync_validity(self, *args): + name_text = self.builder.get_object('name-entry').get_text() + exec_text = self.builder.get_object('exec-entry').get_text() +- valid = (name_text != "" and GLib.find_program_in_path(exec_text) is not None) ++ valid = (name_text != "" and self.exec_line_is_valid(exec_text)) + self.builder.get_object('ok').set_sensitive(valid) + + def load(self):