15
0

Accepting request 692232 from devel:languages:python

- Rename reproducible.patch to respect-cflags.patch and really make
  sure we respect all the cflags

- Add reproducible.patch to make package build reproducible (boo#1100677)
  and to not use SSE4.1 instructions

OBS-URL: https://build.opensuse.org/request/show/692232
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-autobahn?expand=0&rev=5
This commit is contained in:
2019-05-06 11:21:23 +00:00
committed by Git OBS Bridge
3 changed files with 40 additions and 0 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Apr 8 08:41:35 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Rename reproducible.patch to respect-cflags.patch and really make
sure we respect all the cflags
-------------------------------------------------------------------
Mon Apr 8 07:32:05 UTC 2019 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to make package build reproducible (boo#1100677)
and to not use SSE4.1 instructions
-------------------------------------------------------------------
Fri Apr 5 08:12:36 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -25,6 +25,7 @@ License: MIT
Group: Development/Languages/Python
URL: https://github.com/crossbario/autobahn-python
Source: https://files.pythonhosted.org/packages/source/a/autobahn/autobahn-%{version}.tar.gz
Patch0: respect-cflags.patch
BuildRequires: %{python_module PyNaCl >= 1.0.1}
BuildRequires: %{python_module PyQRCode >= 1.1}
BuildRequires: %{python_module Twisted >= 12.1.0}
@@ -87,9 +88,11 @@ asynchronous Remote Procedure Calls and Publish & Subscribe on top of WebSocket.
%prep
%setup -q -n autobahn-%{version}
%patch0 -p1
%build
export AUTOBAHN_USE_NVX=true
export CFLAGS="%{optflags}"
%python_build
%install
@@ -100,6 +103,7 @@ export AUTOBAHN_USE_NVX=true
%check
export USE_ASYNCIO=true
export AUTOBAHN_USE_NVX=true
export PYTHONDONTWRITEBYTECODE=1
%pytest_arch %{buildroot}%{$python_sitearch}/autobahn/
%files %{python_files}

24
respect-cflags.patch Normal file
View File

@@ -0,0 +1,24 @@
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Date: 2019-04-08
This bug was found while working on reproducible builds for openSUSE.
Without this patch, binaries would use SSE4.1 instructions if the build
machine's CPU had it available.
This could cause 'invalid instruction' faults on older user machines.
https://bugzilla.opensuse.org/show_bug.cgi?id=1100677
Index: autobahn-19.3.3/autobahn/nvx/_utf8validator.py
===================================================================
--- autobahn-19.3.3.orig/autobahn/nvx/_utf8validator.py
+++ autobahn-19.3.3/autobahn/nvx/_utf8validator.py
@@ -52,7 +52,7 @@ with open(os.path.join(os.path.dirname(_
"_nvx_utf8validator",
c_source,
libraries=[],
- extra_compile_args=['-std=c99', '-Wall', '-Wno-strict-prototypes', '-O3', '-march=native']
+ extra_compile_args=['-std=c99', '-Wall', '-Wno-strict-prototypes']
)