#4 Update to 0.36.0
Closed 2 years ago by ngompa. Opened 3 years ago by xavierb.
rpms/ xavierb/m2crypto master  into  rawhide

file modified
+1
@@ -21,3 +21,4 @@ 

  /M2Crypto-0.32.0.tar.gz

  /M2Crypto-0.33.0.tar.gz

  /M2Crypto-0.35.2.tar.gz

+ /M2Crypto-0.36.0.tar.gz

@@ -1,49 +0,0 @@ 

- From 7f98fca157b50708dd2c4848886e18a198e258c3 Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>

- Date: Mon, 9 Mar 2020 13:16:53 +0100

- Subject: [PATCH] base64.decodestring() was finally removed in Python 3.8.

- 

- ---

-  tests/test_x509.py | 12 +++++++++---

-  1 file changed, 9 insertions(+), 3 deletions(-)

- 

- diff --git a/tests/test_x509.py b/tests/test_x509.py

- index 057d7da..138af27 100644

- --- a/tests/test_x509.py

- +++ b/tests/test_x509.py

- @@ -15,7 +15,7 @@ import os

-  import time

-  import warnings

-  

- -from M2Crypto import ASN1, BIO, EVP, RSA, Rand, X509, m2  # noqa

- +from M2Crypto import ASN1, BIO, EVP, RSA, Rand, X509, m2, six  # noqa

-  from tests import unittest

-  

-  log = logging.getLogger(__name__)

- @@ -592,7 +592,10 @@ class X509StackTestCase(unittest.TestCase):

-  

-          with warnings.catch_warnings():

-              warnings.simplefilter('ignore', DeprecationWarning)

- -            seq = base64.decodestring(b64)

- +            if six.PY3:

- +                seq = base64.decodebytes(b64)

- +            else:

- +                seq = base64.decodestring(b64)

-  

-          stack = X509.new_stack_from_der(seq)

-          cert = stack.pop()

- @@ -612,7 +615,10 @@ class X509StackTestCase(unittest.TestCase):

-  

-          with warnings.catch_warnings():

-              warnings.simplefilter('ignore', DeprecationWarning)

- -            seq = base64.decodestring(b64)

- +            if six.PY3:

- +                seq = base64.decodebytes(b64)

- +            else:

- +                seq = base64.decodestring(b64)

-  

-          stack = X509.new_stack_from_der(seq)

-          num = len(stack)

- -- 

- 2.26.2

- 

@@ -1,47 +0,0 @@ 

- From d3a43ffe1bfe4c128d6ab7c390419dee68f4ca5a Mon Sep 17 00:00:00 2001

- From: lethliel <mstrigl@suse.de>

- Date: Wed, 19 Feb 2020 11:53:05 +0100

- Subject: [PATCH] wrap SocketIO in io.Buffered* for makefile

- 

- In python3.8 the fp is wrapped in a Buffer.

- SSL.Connection.makefile returns a socketIO which is no buffer.

- 

- SocketIO in 'r' mode:

- use io.BufferedReader

- 

- SocketIO in 'rw' mode:

- use io.BufferedRWPair

- ---

-  M2Crypto/SSL/Connection.py | 8 ++++++--

-  1 file changed, 6 insertions(+), 2 deletions(-)

- 

- diff --git a/M2Crypto/SSL/Connection.py b/M2Crypto/SSL/Connection.py

- index 7053aa6..01bb61c 100644

- --- a/M2Crypto/SSL/Connection.py

- +++ b/M2Crypto/SSL/Connection.py

- @@ -12,6 +12,7 @@ Copyright 2008 Heikki Toivonen. All rights reserved.

-  

-  import logging

-  import socket

- +import io

-  

-  from M2Crypto import BIO, Err, X509, m2, py27plus, six, util  # noqa

-  from M2Crypto.SSL import Checker, Context, timeout  # noqa

- @@ -582,9 +583,12 @@ class Connection(object):

-          return m2.ssl_set_cipher_list(self.ssl, cipher_list)

-  

-      def makefile(self, mode='rb', bufsize=-1):

- -        # type: (AnyStr, int) -> socket._fileobject

- +        # type: (AnyStr, int) -> Union[io.BufferedRWPair,io.BufferedReader]

-          if six.PY3:

- -            return socket.SocketIO(self, mode)

- +            raw = socket.SocketIO(self, mode)

- +            if 'rw' in mode:

- +                return io.BufferedRWPair(raw, raw)

- +            return io.BufferedReader(raw, io.DEFAULT_BUFFER_SIZE)

-          else:

-              return socket._fileobject(self, mode, bufsize)

-  

- -- 

- 2.26.1

- 

file modified
+9 -12
@@ -2,20 +2,14 @@ 

  %{?python_enable_dependency_generator}

  

  Name:           m2crypto

- Version:        0.35.2

- Release:        9%{?dist}

+ Version:        0.36.0

+ Release:        1%{?dist}

  Summary:        Support for using OpenSSL in Python scripts

  

  License:        MIT

  URL:            https://gitlab.com/m2crypto/m2crypto/

  Source0:        %{pypi_source M2Crypto}

  

- # Backport from upstream

- ## From: https://gitlab.com/m2crypto/m2crypto/-/commit/d3a43ffe1bfe4c128d6ab7c390419dee68f4ca5a

- Patch0001:      0001-wrap-SocketIO-in-io.Buffered-for-makefile.patch

- ## From: https://gitlab.com/m2crypto/m2crypto/-/commit/7f98fca157b50708dd2c4848886e18a198e258c3

- Patch0002:      0001-base64.decodestring-was-finally-removed-in-Python-3..patch

- 

  BuildRequires:  gcc

  BuildRequires:  openssl

  BuildRequires:  openssl-devel
@@ -42,8 +36,8 @@ 

  %build

  %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

+   CFLAGS="$CFLAGS `pkg-config --cflags openssl`" ; export CFLAGS

+   LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" ; export LDFLAGS

  fi

  

  %py3_build
@@ -51,8 +45,8 @@ 

  %install

  %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

+   CFLAGS="$CFLAGS `pkg-config --cflags openssl`" ; export CFLAGS

+   LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" ; export LDFLAGS

  fi

  

  %py3_install
@@ -67,6 +61,9 @@ 

  %{python3_sitearch}/M2Crypto-*.egg-info/

  

  %changelog

+ * Thu Nov 26 2020 Xavier Bachelot <xavier@bachelot.org> - 0.36.0-1

+ - Update to 0.36.0

+ 

  * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.35.2-9

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (M2Crypto-0.35.2.tar.gz) = 3608b29a8e7d0732a2359e35fcaae191447aa7c0211ca3d057eed6cee7f0819f5c1121e7d41caca8cdea3c7911f8c447ee475b1b3d125e8dc3adde2718a59f36

+ SHA512 (M2Crypto-0.36.0.tar.gz) = 5b7d6d10c943ff0e09e0e9748d5578e7e0f7659a73de4ba49481152bca05871aef2bfbb869e1636a7cebcf2dd8b9f67fb0d299a833d1d4ebd538031c35d7bca1

Also fix mixed use of tabs and spaces.

the source is not updated

1 new commit added

  • Update sources and .gitignore
3 years ago

I've never updated sources and .gitignore outside of running fedpkg new-sources.
.gitignore is quite straight forward and I've manually updated sources by crafting the line after running sh512sum on the tarball, hopefully this is the proper way to do it.
Won't that get in the way if these 2 files are updated before actually running fedpkg new-sources ?
If that's ok, I'll squash the specfile and sources/.git ignore commits into one.

You can run fedpkg new-source yourself, couldn't you?

Either way, if the hash matches, it won't get in the way.

no, I can't run fedpkg new-sources because I don't have right to push to the lookaside cache for this package and my local sources and .gitignore files are not updated, thus I have to craft the files manually.

hmm, actually I can push to the lookaside cache and my local files are updated. I was not expecting to be able to do that, as I have absolutely no rights on this package.
Actually, thinking twice about this, there's no way for new-sources to be able to decide which files are legit or not and access to lookaside cache is not per package/git repo. Sorry for the noise :-(

rebased onto 0de312e

3 years ago

Pull-Request has been closed by ngompa

2 years ago