From 40320020038090fbbb92839c0defd649a029a896 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Mar 21 2019 14:00:44 +0000 Subject: Use Python3 for code generation Signed-off-by: Peter Lemenkov --- diff --git a/rabbitmq-amqp1.0-common-0001-force-python3.patch b/rabbitmq-amqp1.0-common-0001-force-python3.patch new file mode 100644 index 0000000..dcf4e82 --- /dev/null +++ b/rabbitmq-amqp1.0-common-0001-force-python3.patch @@ -0,0 +1,29 @@ +From: Lon Hohberger +Date: Tue, 29 Jan 2019 11:36:11 -0500 +Subject: [PATCH] force python3 + +Signed-off-by: Lon Hohberger + +diff --git a/codegen.py b/codegen.py +index dc4480a..cf93227 100755 +--- a/codegen.py ++++ b/codegen.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + from __future__ import print_function + +diff --git a/development.post.mk b/development.post.mk +index 3f8301a..b7f960a 100644 +--- a/development.post.mk ++++ b/development.post.mk +@@ -2,7 +2,7 @@ + # Framing sources generation. + # -------------------------------------------------------------------- + +-PYTHON ?= python ++PYTHON ?= python3 + CODEGEN = $(CURDIR)/codegen.py + CODEGEN_DIR ?= $(DEPS_DIR)/rabbitmq_codegen + CODEGEN_AMQP = $(CODEGEN_DIR)/amqp_codegen.py diff --git a/rabbitmq-aws-0001-Rename-some-types-to-make-it-build-on-21.3.patch b/rabbitmq-aws-0001-Rename-some-types-to-make-it-build-on-21.3.patch new file mode 100644 index 0000000..23c18c1 --- /dev/null +++ b/rabbitmq-aws-0001-Rename-some-types-to-make-it-build-on-21.3.patch @@ -0,0 +1,39 @@ +From: Daniil Fedotov +Date: Mon, 18 Mar 2019 18:29:08 -0400 +Subject: [PATCH] Rename some types to make it build on 21.3. + +ssl_api.hrl does not contain types starting from 21.3. +Use non-existent types instead. This will dyalize, but there is no type +I know of, to fit both old and new types. + +diff --git a/include/rabbitmq_aws.hrl b/include/rabbitmq_aws.hrl +index f6fffd8..a3e906e 100644 +--- a/include/rabbitmq_aws.hrl ++++ b/include/rabbitmq_aws.hrl +@@ -8,8 +8,6 @@ + %% @end + %% ==================================================================== + +--include_lib("ssl/src/ssl_api.hrl"). +- + -define(MIME_AWS_JSON, "application/x-amz-json-1.0"). + -define(SCHEME, https). + +@@ -27,7 +25,7 @@ + -type expiration() :: calendar:datetime() | undefined. + -type security_token() :: nonempty_string() | undefined. + -type region() :: nonempty_string() | undefined. +- ++-type path() :: ssl:path(). + + -type sc_ok() :: {ok, access_key(), secret_access_key(), expiration(), security_token()}. + -type sc_error() :: {error, Reason :: atom()}. +@@ -72,7 +70,7 @@ + -type headers() :: [header()]. + -type body() :: string() | binary(). + +--type ssl_options() :: [ssl_option()]. ++-type ssl_options() :: [ssl:ssl_option()]. + + -type http_option() :: {timeout, timeout()} | + {connect_timeout, timeout()} | diff --git a/rabbitmq-common-0002-force-python3.patch b/rabbitmq-common-0002-force-python3.patch new file mode 100644 index 0000000..bceecdf --- /dev/null +++ b/rabbitmq-common-0002-force-python3.patch @@ -0,0 +1,29 @@ +From: Lon Hohberger +Date: Tue, 29 Jan 2019 11:36:11 -0500 +Subject: [PATCH] force python3 + +Signed-off-by: Lon Hohberger + +diff --git a/codegen.py b/codegen.py +index a0300ed..b0484ee 100755 +--- a/codegen.py ++++ b/codegen.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ## The contents of this file are subject to the Mozilla Public License + ## Version 1.1 (the "License"); you may not use this file except in +diff --git a/development.post.mk b/development.post.mk +index 65708db..ec905a4 100644 +--- a/development.post.mk ++++ b/development.post.mk +@@ -2,7 +2,7 @@ + # Framing sources generation. + # -------------------------------------------------------------------- + +-PYTHON ?= python ++PYTHON ?= python3 + CODEGEN = $(CURDIR)/codegen.py + CODEGEN_DIR ?= $(DEPS_DIR)/rabbitmq_codegen + CODEGEN_AMQP = $(CODEGEN_DIR)/amqp_codegen.py diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index a896a25..b3b9028 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -5,7 +5,7 @@ Name: rabbitmq-server Version: 3.7.13 -Release: 1%{?dist} +Release: 2%{?dist} License: MPLv1.1 Source0: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/%{name}_%{version}.orig.tar.xz Source1: https://github.com/rabbitmq/rabbitmq-server/releases/download/v%{version}/%{name}_%{version}.orig.tar.xz.asc @@ -18,16 +18,18 @@ Patch2: rabbitmq-server-0002-Add-systemd-notification-support.patch Patch3: rabbitmq-server-0003-Allow-guest-login-from-non-loopback-connections.patch Patch4: rabbitmq-server-0004-rabbit_prelaunch-must-use-RABBITMQ_SERVER_ERL_ARGS.patch Patch101: rabbitmq-common-0001-Use-proto_dist-from-command-line.patch +Patch102: rabbitmq-common-0002-force-python3.patch Patch201: rabbitmq-server-release-0001-Don-t-use-templates.patch +Patch301: rabbitmq-amqp1.0-common-0001-force-python3.patch +Patch401: rabbitmq-aws-0001-Rename-some-types-to-make-it-build-on-21.3.patch URL: https://www.rabbitmq.com/ BuildArch: noarch BuildRequires: elixir BuildRequires: erlang >= %{erlang_minver} BuildRequires: libxslt -BuildRequires: python-unversioned-command -BuildRequires: python2 -BuildRequires: python2-simplejson +BuildRequires: python3 +BuildRequires: python3-simplejson BuildRequires: rsync BuildRequires: systemd BuildRequires: xmlto @@ -69,10 +71,19 @@ cd ../.. cd deps/rabbit_common %patch101 -p1 +%patch102 -p1 cd ../.. %patch201 -p1 +cd deps/amqp10_common +%patch301 -p1 +cd ../.. + +cd deps/rabbitmq_aws +%patch401 -p1 +cd ../.. + # We have to remove it until common_test subpackage lands RHOS rm -f \ deps/amqp_client/src/rabbit_ct_client_helpers.erl \ @@ -189,6 +200,9 @@ done %changelog +* Thu Mar 21 2019 Peter Lemenkov - 3.7.13-2 +- Force Python3 + * Mon Mar 11 2019 Peter Lemenkov - 3.7.13-1 - Ver. 3.7.13 diff --git a/rabbitmq-server_3.7.12.orig.tar.xz.asc b/rabbitmq-server_3.7.12.orig.tar.xz.asc deleted file mode 100644 index 20b93e7..0000000 --- a/rabbitmq-server_3.7.12.orig.tar.xz.asc +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQIcBAABAgAGBQJcZnw+AAoJEGtzo25gJt/KiogP/AxWaZmmw4pOQbs/tv0nrIct -nq+eIrlc8rmTfQi5TgbipC3kEqeDvxW8jhTPkWZt2vHdC6KOYudY3oT2DJr297Ng -SFe39iOT8t/WcKUwVHlBamRsGbn7KH/1S0k6vKGDR8wtce7kuqDqCAwqV4eSq2HS -zAOV3yzEfrUYbF+i5jFaHCisSEzpx1U4gbJhS4vZrVR+TBc8GIehsnc7/Y9HV4eu -LebMKVVhpNVq0gB6t1fxFLRuOc+PKEl99KypTlK1RLYk7nEHlXuNZYjjgBdALitN -LH9gyeA49oktCEhDl0XlgJp04BZIA2Jj08zscjpVqF1WRG17KUhozTlqYngEDEpr -CPyEN7j8NWWeBu87X09h2BC47/Nol7CcZk9bhQ+5EaVlmiHZg8IT0/bLqWdmKgC7 -TEv3hx25XdEP8OYRwrhEbyt55igVQeevO3pW94UYwGSwukvJEHfigD2aem0Feb70 -enBxZ/huipID9a43z2SEXkxUkldPv+QKespl+NlBZmfoiDkKOSFQAypsboY/okNU -I5YGb/k8jAUr7jlnDhRiqvXNlsWVJniivNmWRI4/XEbDrouVy8zXBG+h0RecTjJb -p9JvWJuftuvS6DhRO00mbZE8O1vZemhaEXeeg6YQTqjf34uevqArhOKnFXeGSQvw -zHtvFPC0kJwGJNeO8EzE -=RIcO ------END PGP SIGNATURE-----