Search
SailfishOS Open Build Service
>
Projects
>
home:nodevel
:
python3-pandas
>
python3-buildservice-tweak
> Changes
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 3
[-]
[+]
Added
python3-buildservice-tweak.spec
@@ -0,0 +1,70 @@ +# +# spec file for package python3-buildservice-tweak +# +# Copyright (c) 2015 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 http://bugs.opensuse.org/ +# + +%{?!py3_ver: %global py3_ver 3.4} +%{?!python3_sitearch: %global python3_sitearch /usr/lib/python%{py3_ver}/site-packages/} +%{?!python3_sitelib: %global python3_sitelib /usr/lib/python%{py3_ver}/site-packages/} + +Name: python3-buildservice-tweak +Version: 1.0 +Release: 4.2 +Summary: OpenBuildService tweak for building packages depending on Python 3 +License: Python-2.0 or ZPL-2.0 +Group: Development/Languages/Python +Url: https://build.opensuse.org/package/show/devel:languages:python3/python3-buildservice-tweak +Source1: python3-buildservice.sh +Source2: sitecustomize.py +# only for macro definitions: +BuildRequires: python3-base +Requires: python3-base +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +This package sets a fixed hash seed for Python's hash randomization, +and monkey-patches the os.urandom() method to return all zeroes instead +of actually querying /dev/urandom. + +THIS PACKAGE IS DANGEROUS. +Do not install it on your system!! + +The purpose of this is a) to provide reproducible builds with fixed seeds, +and b) to work around the issue with blocking on insufficient entropy +in buildservice VMs. + +%prep +# nothing + +%build +# nothing + +%install +install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/python3-buildservice.sh +install -D -m 644 %{SOURCE2} %{buildroot}/%{python3_sitearch}/sitecustomize.py + +%files +%defattr(-,root,root,-) +%{_sysconfdir}/profile.d/python3-buildservice.sh +%{python3_sitearch}/sitecustomize.py + +%changelog +* Tue Oct 20 2015 jmatejek@suse.com +- add Requires: this-is-only-for-build-envs + to prevent installation outside of buildservice +- add warning message to every os.urandom call, to find problems + more easily +* Fri Oct 16 2015 jmatejek@suse.com +- initial version