diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9fbda4c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/0install-1.13.tar.bz2 diff --git a/0install-1.13-testDiag_explicit_cpu.patch b/0install-1.13-testDiag_explicit_cpu.patch new file mode 100644 index 0000000..ca649f0 --- /dev/null +++ b/0install-1.13-testDiag_explicit_cpu.patch @@ -0,0 +1,31 @@ +From afb51d4969fde294fcc9846548c2950cfabf2935 Mon Sep 17 00:00:00 2001 +From: Michel Alexandre Salim +Date: Mon, 19 Nov 2012 14:00:33 +0700 +Subject: [PATCH] testsolver/testDiagnostics: set required CPU explicitly + +One of the tests (line 415) assume the host CPU to be x86_64, and does +not explicitly override the CPU field of the Requirements object. This +causes an assertion error on other architectures, as the expected error +message is only displayed if the host CPU is x86_64. + +By manually setting r.cpu = 'x86_64', the test works even on other +archs. +--- + tests/testsolver.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/testsolver.py b/tests/testsolver.py +index 3c7f78d..ceee5ee 100755 +--- a/tests/testsolver.py ++++ b/tests/testsolver.py +@@ -440,6 +440,7 @@ class TestSolver(BaseTest): + impl = self.config.iface_cache.get_feed(diag_uri).implementations['diag-5'] + r = Requirements(top_uri) + r.os = 'Windows' ++ r.cpu = 'x86_64' + self.assertEqual("There is no possible selection using Diagnostics 5.\n" + "Can't find all required implementations:\n" + "- http://localhost/diagnostics.xml -> (problem)\n" +-- +1.8.0 + diff --git a/dead.package b/dead.package deleted file mode 100644 index 931b22b..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -obsoleted by 0install diff --git a/sources b/sources new file mode 100644 index 0000000..f65e17a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +d0332a8aab5e9f53769e1d4591df2a36 0install-1.13.tar.bz2 diff --git a/zeroinstall-injector.spec b/zeroinstall-injector.spec new file mode 100644 index 0000000..82c3180 --- /dev/null +++ b/zeroinstall-injector.spec @@ -0,0 +1,252 @@ +%global cache_dir /var/cache/0install.net +%global upstream_name 0install +#global prerel rc1 + +Name: zeroinstall-injector +Version: 1.13 +Release: 1%{?dist} +Summary: The Zero Install Injector (0launch) + +Group: Applications/System +License: LGPLv2 +URL: http://0install.net +Source0: http://downloads.sf.net/project/zero-install/%{upstream_name}/%{version}/%{upstream_name}-%{version}.tar.bz2 +# https://github.com/0install/0install/pull/7 +Patch0: %{upstream_name}-1.13-testDiag_explicit_cpu.patch + +BuildArch: noarch +BuildRequires: python-devel >= 2.6 +BuildRequires: desktop-file-utils +BuildRequires: gettext +# for-tests +BuildRequires: pygtk2 gnupg xdg-utils +BuildRequires: tar gzip bzip2 xz-lzma-compat +BuildRequires: python-coverage +# /for-tests +Requires: pygtk2 gnupg sudo xdg-utils +Requires: tar gzip bzip2 xz-lzma-compat +# for PackageKit support +Requires: dbus-python + +Requires(pre): shadow-utils + +# for icons +Requires: hicolor-icon-theme + +%description +The Zero Install Injector makes it easy for users to install software +without needing root privileges. It takes the URL of a program and +runs it (downloading it first if necessary). Any dependencies of the +program are fetched in the same way. The user controls which version +of the program and its dependencies to use. + +Zero Install is a decentralized installation system (there is no +central repository; all packages are identified by URLs), +loosely-coupled (if different programs require different versions of a +library then both versions are installed in parallel, without +conflicts), and has an emphasis on security (all package descriptions +are GPG-signed, and contain cryptographic hashes of the contents of +each version). Each version of each program is stored in its own +sub-directory within the Zero Install cache (nothing is installed to +directories outside of the cache, such as /usr/bin) and no code from +the package is run during install or uninstall. The system can +automatically check for updates when software is run. + +%prep +%setup -q -n %{upstream_name}-%{version} +%patch0 -p1 -b .testDiag_explicit_cpu + +%build +%{__python} setup.py build + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT +mv "$RPM_BUILD_ROOT/usr/man" "$RPM_BUILD_ROOT/%{_datadir}/man" +mkdir -p "$RPM_BUILD_ROOT%{cache_dir}/implementations" + +for i in add manage; do + desktop-file-install \ +%if 0%{!?fedora:1} + --vendor="" \ +%endif + --add-category="System" \ + --delete-original \ + --dir=$RPM_BUILD_ROOT%{_datadir}/applications \ + $RPM_BUILD_ROOT%{_datadir}/applications/zeroinstall-$i.desktop +done +%find_lang zero-install + +%check +export PYTHONPATH=`pwd` +cd tests +for t in download packagekit; do + mv test${t}.py{,.off} +done +./testall.py + +%clean +rm -rf $RPM_BUILD_ROOT + + +%pre +# Add the "zeroinst" user. +# This is not used by default, but is required if you want to +# set up sharing of downloads later. +getent group zeroinst >/dev/null || groupadd -r zeroinst +getent passwd zeroinst >/dev/null || \ +useradd -r -g zeroinst -d %{cache_dir} -s /sbin/nologin \ + -c "Zero Install shared cache" zeroinst +exit 0 + +%post +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%files -f zero-install.lang +%defattr(-,root,root,-) +%doc COPYING README.md +%{_bindir}/0* +%config(noreplace) %{_sysconfdir}/xdg/menus/applications-merged/zeroinstall.menu +%{_datadir}/applications/*.desktop +%{_datadir}/desktop-directories/zeroinstall.directory +%{_datadir}/icons/hicolor/*/apps/zeroinstall.png +%{_datadir}/icons/hicolor/scalable/apps/zeroinstall.svg +%{python_sitelib}/zeroinstall/ +%if 0%{!?el5:1} +%{python_sitelib}/*.egg-info +%endif +%{_mandir}/man1/0* +%dir %{cache_dir} +%attr(755,zeroinst,zeroinst) %{cache_dir}/implementations + +%changelog +* Mon Nov 19 2012 Michel Salim - 1.13-1 +- Update to 1.13 + +* Wed Sep 5 2012 Michel Salim - 1.11-1 +- Update to 1.11 + +* Fri Jun 29 2012 Michel Salim - 1.9-1 +- Update to 1.9 +- Remove redundant %%{python_sitelib} declaration + +* Wed May 23 2012 Michel Salim - 1.8-1 +- Update to 1.8 + +* Tue Apr 24 2012 Michel Salim - 1.7-1 +- Update to 1.7 + +* Thu Jan 26 2012 Michel Salim - 1.5-2 +- Prune dependencies + +* Thu Jan 26 2012 Michel Salim - 1.5-1 +- Update to 1.5 + +* Mon Jul 25 2011 Michel Salim - 1.2-1 +- Update to 1.2 + +* Sat Jul 2 2011 Michel Salim - 1.1-2 +- Further launcher script clean-up + +* Wed Jun 29 2011 Michel Salim - 1.1-1 +- Update to 1.1 +- Remove --versions option, obsoleted in favor of '0alias launcher' + +* Wed Jun 22 2011 Michel Salim - 1.0-3 +- Fix --versions handling of 0alias-generated launchers + +* Wed Jun 15 2011 Michel Salim - 1.0-2 +- Add main category "System" to desktop entries + +* Tue Jun 14 2011 Michel Salim - 1.0-1 +- Update to 1.0 + +* Tue May 3 2011 Michel Salim - 1.0-0.rc1.1 +- Update to 1.0rc1 + +* Thu Mar 17 2011 Michel Salim - 0.53-1 +- Update to 0.53 + +* Sun Mar 13 2011 Michel Salim - 0.52-1 +- Update to 0.52 + +* Thu Jul 22 2010 David Malcolm - 0.49-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Fri Jul 9 2010 Michel Salim - 0.49-2 +- Enable tests + +* Fri Jul 9 2010 Michel Salim - 0.49-1 +- Update to 0.49 + +* Mon Jul 27 2009 Fedora Release Engineering - 0.38-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat Feb 28 2009 Michel Salim - 0.38-2 +- Workaround for RHEL's desktop-file-utils +- Add missing dependency on xdg-utils + +* Fri Feb 27 2009 Michel Salim - 0.38-1 +- Update to 0.38 +- Upgrades now preserve the existing menu, if modified + +* Wed Feb 25 2009 Fedora Release Engineering - 0.34-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.34-2 +- Rebuild for Python 2.6 + +* Sun Aug 3 2008 Michel Alexandre Salim - 0.34-1 +- Update to 0.34 + +* Sat Apr 5 2008 Michel Salim - 0.32-1 +- Update to 0.32 +- Package .egg-info file on Fedora >= 9 + +* Fri Jan 18 2008 Michel Salim - 0.31-1 +- Update to 0.31 + +* Sat Sep 8 2007 Michel Salim 0.30-2 +- Update scriptlet that creates zeroinst user + +* Wed Sep 5 2007 Michel Salim 0.30-1 +- Update to 0.30 +- License is now versioned +- Incorporate changes from Thomas Leonard: + * create zeroinst user + * create shared cache + +* Mon Dec 18 2006 Michel Salim 0.24-3 +- Rebuild for development branch + +* Sat Nov 11 2006 Michel Salim 0.24-2 +- Allow installation of ix86 binaries on x86_64 + +* Sat Nov 4 2006 Michel Salim 0.24-1 +- Update to 0.24 +- Not ghosting .pyos any longer + +* Sun Oct 8 2006 Michel Salim 0.23-1 +- Update to 0.23 + +* Sun Mar 5 2006 Michel Salim 0.18-4 +- Removed left-behind pushd and popd + +* Sat Feb 25 2006 Michel Salim 0.18-3 +- Add Python-related requirements, BuildReq on gnupg to decrypt upstream source + +* Sat Feb 18 2006 Michel Salim 0.18-2 +- Use _mandir, discard CFLAGS and unused python_sitearch definition + +* Thu Feb 16 2006 Michel Salim 0.18-1 +- Initial Fedora Extras release, based on upstream spec contributed by Juan Carlos Jimenez Garcia