Accepting request 571492 from security

fix endianess problems

OBS-URL: https://build.opensuse.org/request/show/571492
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sha1collisiondetection?expand=0&rev=5
This commit is contained in:
Dominique Leuenberger 2018-02-05 09:50:10 +00:00 committed by Git OBS Bridge
commit 0303791373
3 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,10 @@
--- lib/sha1.c
+++ lib/sha1.c
@@ -9,6 +9,7 @@
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
+#include <endian.h>
#include "sha1.h"
#include "ubc_check.h"

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Jan 31 17:48:45 CET 2018 - ro@suse.de
- cleaner solution for the endian detection issue:
include the proper header file
-------------------------------------------------------------------
Wed Jan 31 17:33:48 CET 2018 - ro@suse.de
- add sha1collisiondetection-endian_detection.patch
fix detection of endianness at compile time
-------------------------------------------------------------------
Fri Aug 4 15:18:33 CEST 2017 - tiwai@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package sha1collisiondetection
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 Andreas Stieger <astieger@suse.com>
#
# All modifications and additions to the file contributed by third parties
@ -26,6 +26,7 @@ Group: Productivity/Security
Url: https://github.com/cr-marcstevens/sha1collisiondetection
Source: https://github.com/cr-marcstevens/sha1collisiondetection/archive/stable-v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: sha1collisiondetection-1.0.3-io-fixes.patch
Patch1: sha1collisiondetection-endian_detection.patch
BuildRequires: libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -59,6 +60,7 @@ It is very fast and takes less than twice the amount of time as regular SHA-1.
%prep
%setup -q -n %{name}-stable-v%{version}
%patch0 -p1
%patch1
%build
export TARGETCFLAGS="%{optflags}"