| |
@@ -1,98 +1,94 @@
|
| |
- Summary: Support for using OpenSSL in Python 2 scripts
|
| |
- Name: m2crypto
|
| |
- Version: 0.30.1
|
| |
- Release: 4%{?dist}
|
| |
- Source0: https://files.pythonhosted.org/packages/41/50/7d85dc99b1c4f29eca83873d851ec29a8e484a66b31351e62e30be9db7d1/M2Crypto-0.30.1.tar.gz
|
| |
- Source1: https://files.pythonhosted.org/packages/41/50/7d85dc99b1c4f29eca83873d851ec29a8e484a66b31351e62e30be9db7d1/M2Crypto-0.30.1.tar.gz.asc
|
| |
- # This is only precautionary, it does fix anything - not sent upstream
|
| |
- Patch0: m2crypto-0.30.1-gcc_macros.patch
|
| |
- Requires: python2-typing
|
| |
-
|
| |
- License: MIT
|
| |
- URL: https://gitlab.com/m2crypto/m2crypto/
|
| |
- BuildRequires: gcc
|
| |
- BuildRequires: openssl, openssl-devel, python2-devel, python2-setuptools
|
| |
- BuildRequires: python3-devel, python3-setuptools
|
| |
- BuildRequires: perl-interpreter, pkgconfig, python2-typing, swig, which
|
| |
+ Name: m2crypto
|
| |
+ Version: 0.32.0
|
| |
+ Release: 1%{?dist}
|
| |
+ Summary: Support for using OpenSSL in Python scripts
|
| |
+
|
| |
+ License: MIT
|
| |
+ URL: https://gitlab.com/m2crypto/m2crypto/
|
| |
+ Source0: https://files.pythonhosted.org/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
|
| |
|
| |
- %filter_provides_in %{python2_sitearch}/M2Crypto/__m2crypto.so
|
| |
- %filter_setup
|
| |
+ # Backports from upstream
|
| |
+ ## Fix from upstream to fix compatibility with OpenSSL 1.1.0h by adding the patch
|
| |
+ ## From: https://gitlab.com/m2crypto/m2crypto/commit/0a5a3569346c58af69a12a9c91656bdc8da1b7b4
|
| |
+ Patch0001: 0001-tests-test_ssl-use-ciphercuites-for-TLS1.3-cipher-in.patch
|
| |
+
|
| |
+ BuildRequires: gcc
|
| |
+ BuildRequires: openssl
|
| |
+ BuildRequires: openssl-devel
|
| |
+ BuildRequires: perl-interpreter
|
| |
+ BuildRequires: pkgconfig
|
| |
+ BuildRequires: swig
|
| |
+ BuildRequires: which
|
| |
|
| |
%description
|
| |
+ This package allows you to call OpenSSL functions from Python scripts.
|
| |
+
|
| |
+ %package -n python2-m2crypto
|
| |
+ Summary: Support for using OpenSSL in Python 2 scripts
|
| |
+ %{?python_provide:%python_provide python2-m2crypto}
|
| |
+ BuildRequires: python2-devel
|
| |
+ BuildRequires: python2-setuptools
|
| |
+ BuildRequires: python2-typing
|
| |
+ Requires: python2-typing
|
| |
+ Obsoletes: m2crypto < 0.32.0
|
| |
+ Provides: m2crypto = %{version}-%{release}
|
| |
+
|
| |
+ %description -n python2-m2crypto
|
| |
This package allows you to call OpenSSL functions from Python 2 scripts.
|
| |
|
| |
%package -n python3-m2crypto
|
| |
- Summary: Support for using OpenSSL in Python 3 scripts
|
| |
+ Summary: Support for using OpenSSL in Python 3 scripts
|
| |
+ %{?python_provide:%python_provide python3-m2crypto}
|
| |
+ BuildRequires: python3-devel
|
| |
+ BuildRequires: python3-setuptools
|
| |
|
| |
%description -n python3-m2crypto
|
| |
This package allows you to call OpenSSL functions from Python 3 scripts.
|
| |
|
| |
%prep
|
| |
- %setup -q -T -c -a 0
|
| |
-
|
| |
- pushd M2Crypto-%{version}
|
| |
- %patch0 -p1 -b .gcc_macros
|
| |
-
|
| |
- # __REGISTER_PREFIX__ is defined to unquoted $ on some platforms; gcc handles
|
| |
- # this fine, but swig chokes on it.
|
| |
- # __GNUC__ really should be included in gcc_macros.h, but this currently breaks
|
| |
- # builds on ppc64: https://bugzilla.redhat.com/show_bug.cgi?id=1317553 .
|
| |
- # __STDC_HOSTED__ really should be included as well, but that causes
|
| |
- # /usr/lib/gcc/*/*/include/stdint.h to try to #include_next <stdint.h>, which
|
| |
- # is unsupported by swig. Without it, gcc uses its own definitions, which better
|
| |
- # be the same as the glibc ones.
|
| |
- gcc -E -dM - < /dev/null | grep -v '__\(STDC\|REGISTER_PREFIX\|GNUC\|STDC_HOSTED\)__' \
|
| |
- | sed 's/^\(#define \([^ ]*\) .*\)$/#undef \2\n\1/' > SWIG/gcc_macros.h
|
| |
- popd
|
| |
- cp -a M2Crypto-%{version} M2Crypto-python3
|
| |
+ %autosetup -n M2Crypto-%{version} -p1
|
| |
|
| |
%build
|
| |
- CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS
|
| |
+ %set_build_flags
|
| |
if pkg-config openssl ; then
|
| |
CFLAGS="$CFLAGS `pkg-config --cflags openssl`" ; export CFLAGS
|
| |
LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" ; export LDFLAGS
|
| |
fi
|
| |
|
| |
- pushd M2Crypto-%{version}
|
| |
- %{__python2} setup.py build
|
| |
- popd
|
| |
- pushd M2Crypto-python3
|
| |
+ %py2_build
|
| |
%py3_build
|
| |
- popd
|
| |
|
| |
%install
|
| |
- CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS
|
| |
+ %set_build_flags
|
| |
if pkg-config openssl ; then
|
| |
CFLAGS="$CFLAGS `pkg-config --cflags openssl`" ; export CFLAGS
|
| |
LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" ; export LDFLAGS
|
| |
fi
|
| |
|
| |
- pushd M2Crypto-%{version}
|
| |
- %{__python2} setup.py install --root=$RPM_BUILD_ROOT
|
| |
- popd
|
| |
- pushd M2Crypto-python3
|
| |
+ %py2_install
|
| |
%py3_install
|
| |
- popd
|
| |
|
| |
%check
|
| |
- pushd M2Crypto-%{version}
|
| |
%{__python2} setup.py test
|
| |
- popd
|
| |
- pushd M2Crypto-python3
|
| |
%{__python3} setup.py test
|
| |
- popd
|
| |
|
| |
- %files
|
| |
- %doc M2Crypto-%{version}/CHANGES M2Crypto-%{version}/LICENCE M2Crypto-%{version}/README.rst
|
| |
+ %files -n python2-m2crypto
|
| |
+ %doc CHANGES README.rst
|
| |
+ %license LICENCE
|
| |
%{python2_sitearch}/M2Crypto
|
| |
- %{python2_sitearch}/M2Crypto-*.egg-info
|
| |
+ %{python2_sitearch}/M2Crypto-*.egg-info/
|
| |
|
| |
%files -n python3-m2crypto
|
| |
- %doc M2Crypto-python3/CHANGES M2Crypto-python3/LICENCE M2Crypto-python3/README.rst
|
| |
+ %doc CHANGES README.rst
|
| |
+ %license LICENCE
|
| |
%{python3_sitearch}/M2Crypto
|
| |
- %{python3_sitearch}/M2Crypto-*.egg-info
|
| |
+ %{python3_sitearch}/M2Crypto-*.egg-info/
|
| |
|
| |
%changelog
|
| |
+ * Sat Mar 23 2019 Neal Gompa <ngompa13@gmail.com> - 0.32.0-1
|
| |
+ - Rebase to M2Crypto-0.32.0
|
| |
+ - Modernize spec and fix build for F29+ (RH#1606827)
|
| |
+
|
| |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.1-4
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
| |
|
| |
Why was the code that ensures swig, the OpenSSL binaries, and gcc, all use a consistent set of macros, removed?