diff --git a/.gitignore b/.gitignore index 120947b..25b6e9f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .project /rabbitvcs-0.15.0.5.tar.bz2 /v0.16.tar.gz +/rabbitvcs-e8214e6-python3.tar.gz diff --git a/rabbitvcs-ignore-post-install.patch b/rabbitvcs-ignore-post-install.patch new file mode 100644 index 0000000..0970e1f --- /dev/null +++ b/rabbitvcs-ignore-post-install.patch @@ -0,0 +1,20 @@ +--- rabbitvcs-e8214e6e84e3b9e13fb551939e2fa8d27ceb7357/setup.py.old 2016-02-02 14:37:35.082167796 +0100 ++++ rabbitvcs-e8214e6e84e3b9e13fb551939e2fa8d27ceb7357/setup.py 2016-02-02 14:37:41.431235156 +0100 +@@ -152,17 +152,3 @@ + data_files=translations + icons + documentation + config_spec + ) + +-# +-# Post installation +-# +- +-# Make sure the icon cache is deleted and recreated +-if sys.argv[1] == "install": +- +- if os.uname()[0] != 'Darwin': +- print("Running gtk-update-icon-cache-3.0") +- +- subprocess.Popen( +- ["gtk-update-icon-cache-3.0", icon_theme_directory], +- stdout=subprocess.PIPE +- ).communicate()[0] diff --git a/rabbitvcs-log-prevent-guess-crashes-rhbz1141530.patch b/rabbitvcs-log-prevent-guess-crashes-rhbz1141530.patch new file mode 100644 index 0000000..9e41f2f --- /dev/null +++ b/rabbitvcs-log-prevent-guess-crashes-rhbz1141530.patch @@ -0,0 +1,19 @@ +--- rabbitvcs-e8214e6e84e3b9e13fb551939e2fa8d27ceb7357/rabbitvcs/ui/log.py.old 2016-02-01 23:32:49.977770035 +0100 ++++ rabbitvcs-e8214e6e84e3b9e13fb551939e2fa8d27ceb7357/rabbitvcs/ui/log.py 2016-02-01 23:32:54.664821439 +0100 +@@ -1643,9 +1643,16 @@ + } + + def log_factory(path, vcs): ++ # vcs option is allowed for URL only ++ if os.path.exists(path): ++ vcs = None ++ + if not vcs: + guess = rabbitvcs.vcs.guess(path) + vcs = guess["vcs"] ++ if not classes_map.has_key(vcs): ++ from rabbitvcs.ui import VCS_OPT_ERROR ++ raise SystemExit(VCS_OPT_ERROR) + + return classes_map[vcs](path) + diff --git a/rabbitvcs.spec b/rabbitvcs.spec index a78f579..0c85a11 100644 --- a/rabbitvcs.spec +++ b/rabbitvcs.spec @@ -1,134 +1,168 @@ -# This package installs extensions to directory which is arch-specified, -# in order to prevent useless debuginfo package generated, we should ignore -# this step. And that's why we split out the -core subpackage. -%global debug_package %{nil} - -Name: rabbitvcs -Version: 0.16 -Release: 4%{?dist} -Summary: Graphical user interface to version control systems +%global commit0 e8214e6e84e3b9e13fb551939e2fa8d27ceb7357 +%global date0 20160108 + +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) + +%global sum Graphical user interface to version control systems + +# python_provide needs srcname to be defined +%global srcname rabbitvcs + +Name: %{srcname} +# upcoming version 0.16.1 mentioned in rabbitvcs/__init__.py +Version: 0.16.1 +Release: 0.1.%{date0}git%{shortcommit0}%{?dist} +Summary: %{sum} License: GPLv2+ -URL: http://www.rabbitvcs.org/ -Source0: https://github.com/rabbitvcs/rabbitvcs/archive/v%{version}.tar.gz +URL: http://www.%{name}.org +#Source0: https://github.com/%{name}/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz +# we use a custom tarball with applied python-modernize and additional manual fixes for python3 compatibility +# https://github.com/rabbitvcs/rabbitvcs/pull/134/commits +Source0: %{name}-%{shortcommit0}-python3.tar.gz + +Patch0: %{name}-ignore-post-install.patch +# rhbz#1141530: rabbitvcs log crashes, https://github.com/rabbitvcs/rabbitvcs/pull/133 +Patch1: %{name}-log-prevent-guess-crashes-rhbz1141530.patch + +BuildArch: noarch + BuildRequires: pygtk2-devel BuildRequires: python2-devel +BuildRequires: python3-gobject +BuildRequires: python3-devel + %description RabbitVCS is a set of graphical tools written to provide simple and straightforward access to the version control systems you use. %package core -Summary: Core package of RabbitVCS -BuildArch: noarch -Requires: dbus-python -#FIXME, should we add them? -#Requires: git -#Requires: mercurial +Summary: Common package of RabbitVCS Requires: meld -Requires: pygtk2 -Requires: pygtk2-libglade -Requires: pysvn -Requires: python-configobj -Requires: python-dulwich +Requires: git +Requires: mercurial Requires: subversion -Obsoletes: rabbitvcs <= 0.13.1 -Obsoletes: rabbitvcs-git -Obsoletes: rabbitvcs-svn %description core -Contains packages shared between the RabbitVCS extensions. +Contains files shared between the RabbitVCS extensions. + +%package -n python2-%{name} +Summary: %{sum} +%{?python_provide:%python_provide python2-%{srcname}} +Requires: %{name}-core = %{version}-%{release} +Requires: python2-configobj +Requires: python-dulwich +Requires: python-simplejson +Requires: pygtk2-libglade +Requires: pysvn + +%description -n python2-%{name} +RabbitVCS is a set of graphical tools written to provide simple +and straightforward access to the version control systems you use. + +%package -n python3-%{name} +Summary: %{sum} +%{?python_provide:%python_provide python3-%{srcname}} +Requires: %{name}-core = %{version}-%{release} +Requires: python3-configobj +Requires: python3-dulwich +Requires: python3-simplejson +Requires: python3-gobject +Requires: python3-pysvn + +%description -n python3-%{name} +RabbitVCS is a set of graphical tools written to provide simple +and straightforward access to the version control systems you use. %package cli Summary: CLI extension for RabbitVCS BuildArch: noarch -Requires: rabbitvcs-core = %{version}-%{release} +Requires: %{name}-core = %{version}-%{release} %description cli -RabbitVCS is a set of graphical tools written to provide simple and -straightforward access to the version control systems you use. This is the -extension for command line interface. - -#I can't figure out how to get it work with caja, so I temporarily disable it. -#%package caja -#Summary: Caja extension for RabbitVCS -#Requires: rabbitvcs-core = %{version}-%{release} -#Requires: caja -#Requires: python-caja -#Requires: dbus-python - -#%description caja -#An extension for Caja to allow better integration with the -#Subversion source control system. +A command line command to use RabbitVCS + +%package caja +Summary: Caja extension for RabbitVCS +# caja needs python2 for plugins +Requires: python2-%{name} = %{version}-%{release} +Requires: caja +Requires: python-caja +Requires: dbus-python + +%description caja +An extension for Caja to allow better integration with the +source control system. %package nautilus Summary: Nautilus extension for RabbitVCS -Requires: rabbitvcs-core = %{version}-%{release} +# nautilus needs python2 for plugins +Requires: python2-%{name} = %{version}-%{release} Requires: nautilus Requires: nautilus-python Requires: dbus-python -Obsoletes: nautilussvn < 0.13 %description nautilus -RabbitVCS is a set of graphical tools written to provide simple and -straightforward access to the version control systems you use. This is the -extension for the Nautilus file manager. +An extension for Nautilus to allow better integration with the +source control system. + +%package nemo +Summary: Nemo extension for RabbitVCS +# nemo needs python2 for plugins +Requires: python2-%{name} = %{version}-%{release} +Requires: nemo +Requires: nemo-python +Requires: dbus-python + +%description nemo +An extension for Nemo to allow better integration with the +source control system. %package thunar Summary: Thunar extension for RabbitVCS -Requires: rabbitvcs-core = %{version}-%{release} +# thunar needs python2 for plugins +Requires: python2-%{name} = %{version}-%{release} Requires: thunar Requires: thunarx-python Requires: dbus-python %description thunar An extension for Thunar to allow better integration with the -Subversion source control system. +source control system. %package gedit Summary: Gedit extension for RabbitVCS -Requires: rabbitvcs-core = %{version}-%{release} +# gedit needs python3 for plugins +Requires: python3-%{name} = %{version}-%{release} Requires: gedit %description gedit -RabbitVCS is a set of graphical tools written to provide simple and -straightforward access to the version control systems you use. This is the -extension for gedit text editor +An extension for Gedit to allow better integration with the +source control system. + %prep -%setup -q +%setup -qn%{name}-%{commit0} +%patch0 -p1 +%patch1 -p1 %build -%{__python2} setup.py build +%py2_build +%py3_build %install -%{__python2} setup.py install --skip-build --root %{buildroot} - -# Installing Nautilus extension -mkdir -p %{buildroot}%{_datadir}/nautilus-python/extensions/ -install -pm644 clients/nautilus-3.0/RabbitVCS.py %{buildroot}%{_datadir}/nautilus-python/extensions/ - -# Installing Thunar Extension -mkdir -p %{buildroot}%{_libdir}/thunarx-2/python/ -install -pm644 clients/thunar/RabbitVCS.py %{buildroot}%{_libdir}/thunarx-2/python/ - -# Installing Gedit Extension -mkdir -p %{buildroot}%{_libdir}/gedit/plugins/ -install -pm644 clients/gedit/%{name}-plugin.py %{buildroot}%{_libdir}/gedit/plugins/ -install -pm644 clients/gedit/%{name}-gedit3.plugin %{buildroot}%{_libdir}/gedit/plugins/%{name}.plugin - -# Installing Caja extension -#mkdir -p %{buildroot}%{_libdir}/caja/extensions-2.0/python/ -#install -pm644 clients/caja/RabbitVCS.py %{buildroot}%{_libdir}/caja/extensions-2.0/python/ - -# Installing CLI Extension -mkdir -p %{buildroot}%{_bindir} -install -pm755 clients/cli/%{name} %{buildroot}%{_bindir}/ - -# Use %%doc macro to handle documents. -rm -frv %{buildroot}%{_defaultdocdir}/%{name} - +%py2_install +%py3_install +install -p -m0755 clients/cli/%{name} -D %{buildroot}%{_bindir}/%{name} +install -p -m0644 clients/gedit/%{name}-plugin.py -D %{buildroot}%{_datadir}/gedit/plugins/%{name}-plugin.py +install -p -m0644 clients/gedit/%{name}-gedit3.plugin -D %{buildroot}%{_datadir}/gedit/plugins/%{name}.plugin +install -p -m0644 clients/caja/RabbitVCS.py -D %{buildroot}%{_datadir}/caja-python/extensions/RabbitVCS.py +install -p -m0644 clients/nautilus-3.0/RabbitVCS.py -D %{buildroot}%{_datadir}/nautilus-python/extensions/RabbitVCS.py +install -p -m0644 clients/nemo/RabbitVCS.py -D %{buildroot}%{_datadir}/nemo-python/extensions/RabbitVCS.py +install -p -m0644 clients/thunar/RabbitVCS.py -D %{buildroot}%{_datadir}/thunarx-python/extensions/RabbitVCS.py %find_lang RabbitVCS + %post core touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -141,31 +175,56 @@ fi %posttrans core gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + %files -f RabbitVCS.lang core -%doc AUTHORS COPYING MAINTAINERS +%license COPYING +%{_pkgdocdir}/ %{_datadir}/%{name}/ %{_datadir}/icons/hicolor/16x16/actions/rabbitvcs-push.png %{_datadir}/icons/hicolor/scalable/*/*.svg -%{python2_sitelib}/%{name}/ -%{python2_sitelib}/%{name}-%{version}*-py%{python2_version}.egg-info -#%files caja -#%{_libdir}/caja/extensions-2.0/python/RabbitVCS.py* +%files -n python2-%{name} +%{python2_sitelib}/* + +%files -n python3-%{name} +%{python3_sitelib}/* %files cli %{_bindir}/%{name} %files gedit -%{_libdir}/gedit/plugins/%{name}-plugin.py* -%{_libdir}/gedit/plugins/%{name}.plugin +%{_datadir}/gedit/plugins/*.py* +%{_datadir}/gedit/plugins/*.plugin + +%files caja +%{_datadir}/caja-python/extensions/*.py* %files nautilus -%{_datadir}/nautilus-python/extensions/RabbitVCS.py* +%{_datadir}/nautilus-python/extensions/*.py* + +%files nemo +%{_datadir}/nemo-python/extensions/*.py* %files thunar -%{_libdir}/thunarx-2/python/RabbitVCS.py* +%{_datadir}/thunarx-python/extensions/*.py* +# we own global folders to prevent a bug in thunarx-python package +%dir %{_datadir}/thunarx-python +%dir %{_datadir}/thunarx-python/extensions + %changelog +* Sat Jan 30 2016 Raphael Groner - 0.16.1-0.1.20160108gite8214e6 +- new upstream snapshot as pre-release +- port to python3 +- mark all as noarch and adjust plugins pathes +- enable debuginfo +- add git and mercurial as dependencies +- fix some crashes with log command, rhbz#1141530 +- fix vcs status features, rhbz#1083043 +- enable caja plugin, rhbz#1096162 +- make gedit plugin work, rhbz#1226816 +- add nemo plugin + * Thu Jun 18 2015 Fedora Release Engineering - 0.16-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 425e2dc..5816f95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -25376cff136ad2fac901ff88e07893ef v0.16.tar.gz +9f35407c19eedd43fd7f5ce5cfbab6e3 rabbitvcs-e8214e6-python3.tar.gz