Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package parsec for openSUSE:Factory checked 
in at 2021-05-01 00:46:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/parsec (Old)
 and      /work/SRC/openSUSE:Factory/.parsec.new.1947 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "parsec"

Sat May  1 00:46:54 2021 rev:5 rq:889538 version:0.7.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/parsec/parsec.changes    2021-04-26 
16:39:20.370048436 +0200
+++ /work/SRC/openSUSE:Factory/.parsec.new.1947/parsec.changes  2021-05-01 
00:46:58.223379387 +0200
@@ -1,0 +2,6 @@
+Fri Apr 30 11:36:56 UTC 2021 - Guillaume GARDET <guillaume.gar...@opensuse.org>
+
+- Fix build with old rust used in Leap 15.3/SLE15-SP3.
+  * parsec-fix-old-rust.patch
+
+-------------------------------------------------------------------

New:
----
  parsec-fix-old-rust.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ parsec.spec ++++++
--- /var/tmp/diff_new_pack.FKX0JU/_old  2021-05-01 00:46:58.843376626 +0200
+++ /var/tmp/diff_new_pack.FKX0JU/_new  2021-05-01 00:46:58.847376607 +0200
@@ -35,6 +35,8 @@
 Source4:        config.toml
 Source5:        parsec.conf
 Source6:        system-user-parsec.conf
+# Fix build with old rust used in Leap 15.3/SLE15-SP3 - 
https://github.com/parallaxsecond/parsec/issues/409
+Patch1:         parsec-fix-old-rust.patch
 BuildRequires:  cargo
 BuildRequires:  clang-devel
 BuildRequires:  cmake

++++++ parsec-fix-old-rust.patch ++++++
>From f9688c44319c1733586d6fbc3b3c24a403deaed8 Mon Sep 17 00:00:00 2001
From: Hugues de Valon <hugues.deva...@arm.com>
Date: Fri, 30 Apr 2021 10:48:37 +0100
Subject: [PATCH] Make it compile for Rust 1.43.1

The From trait was not implemented for that version of Rust. Uses the
to_vec method which achieves the same thing.

Signed-off-by: Hugues de Valon <hugues.deva...@arm.com>
---
 src/providers/pkcs11/key_management.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/providers/pkcs11/key_management.rs 
b/src/providers/pkcs11/key_management.rs
index 6bc5e06..73ce607 100644
--- a/src/providers/pkcs11/key_management.rs
+++ b/src/providers/pkcs11/key_management.rs
@@ -27,7 +27,7 @@ impl Provider {
         key_id: u32,
         key_type: KeyPairType,
     ) -> Result<ObjectHandle> {
-        let mut template = vec![Attribute::Id(key_id.to_be_bytes().into())];
+        let mut template = vec![Attribute::Id(key_id.to_be_bytes().to_vec())];
 
         match key_type {
             KeyPairType::PublicKey => 
template.push(Attribute::Class(ObjectClass::PUBLIC_KEY)),
@@ -103,7 +103,7 @@ impl Provider {
         let key_id = self.create_key_id();
 
         let mut pub_template = vec![
-            Attribute::Id(key_id.to_be_bytes().into()),
+            Attribute::Id(key_id.to_be_bytes().to_vec()),
             Attribute::Token(true.into()),
             Attribute::AllowedMechanisms(vec![Mechanism::try_from(
                 key_attributes.policy.permitted_algorithms,
@@ -122,7 +122,7 @@ impl Provider {
         let mech = match key_attributes.key_type {
             Type::RsaKeyPair => {
                 pub_template.push(Attribute::Private(false.into()));
-                
pub_template.push(Attribute::PublicExponent(utils::PUBLIC_EXPONENT.into()));
+                
pub_template.push(Attribute::PublicExponent(utils::PUBLIC_EXPONENT.to_vec()));
                 pub_template.push(Attribute::ModulusBits(
                     
key_attributes.bits.try_into().map_err(to_response_status)?,
                 ));
@@ -225,7 +225,7 @@ impl Provider {
         template.push(Attribute::PublicExponent(exponent_object.into()));
         template.push(Attribute::Verify(true.into()));
         template.push(Attribute::Encrypt(true.into()));
-        template.push(Attribute::Id(key_id.to_be_bytes().into()));
+        template.push(Attribute::Id(key_id.to_be_bytes().to_vec()));
         template.push(Attribute::Private(false.into()));
         
template.push(Attribute::AllowedMechanisms(vec![MechanismType::RSA_PKCS]));
 

Reply via email to