forked from pool/argon2
Accepting request 562784 from home:lnussel:branches:security
- Update to version 0.0+git20171227.670229c: * Added ABI version number * AVX2/AVX-512F optimizations of BLAMKA * Set Argon2 version number from the command line * New bindings * Minor bug and warning fixes (no security issue) - use _service file OBS-URL: https://build.opensuse.org/request/show/562784 OBS-URL: https://build.opensuse.org/package/show/security/argon2?expand=0&rev=11
This commit is contained in:
parent
3dd9489fbc
commit
3dc46037d9
17
_service
Normal file
17
_service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="disabled">
|
||||||
|
<param name="filename">argon2</param>
|
||||||
|
<param name="version">0.0</param>
|
||||||
|
<param name="versionformat">0.0+git%cd.%h</param>
|
||||||
|
<param name="url">https://github.com/P-H-C/phc-winner-argon2.git</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="changesgenerate">enable</param>
|
||||||
|
<!-- from https://github.com/P-H-C/phc-winner-argon2/releases/latest -->
|
||||||
|
<param name="revision">20171227</param>
|
||||||
|
</service>
|
||||||
|
<service name="recompress" mode="disabled">
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="disabled"/>
|
||||||
|
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<servicedata>
|
||||||
|
<service name="tar_scm">
|
||||||
|
<param name="url">https://github.com/P-H-C/phc-winner-argon2.git</param>
|
||||||
|
<param name="changesrevision">670229c849b9fe882583688b74eb7dfdc846f9f6</param></service></servicedata>
|
3
argon2-0.0+git20171227.670229c.tar.xz
Normal file
3
argon2-0.0+git20171227.670229c.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:412899b064fa8c444eb4cf7516f90812dc194414516145c72aede6a73989342e
|
||||||
|
size 1339200
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 09 08:10:20 UTC 2018 - lnussel@suse.de
|
||||||
|
|
||||||
|
- Update to version 0.0+git20171227.670229c:
|
||||||
|
* Added ABI version number
|
||||||
|
* AVX2/AVX-512F optimizations of BLAMKA
|
||||||
|
* Set Argon2 version number from the command line
|
||||||
|
* New bindings
|
||||||
|
* Minor bug and warning fixes (no security issue)
|
||||||
|
- use _service file
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 18 14:01:09 UTC 2017 - meissner@suse.com
|
Tue Apr 18 14:01:09 UTC 2017 - meissner@suse.com
|
||||||
|
|
||||||
|
41
argon2.spec
41
argon2.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package argon2
|
# spec file for package argon2
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,20 +16,26 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define lname libargon2-0
|
%ifarch i686 x86_64
|
||||||
%define _version 20161029
|
%define no_optimize 0
|
||||||
|
%else
|
||||||
|
%define no_optimize 1
|
||||||
|
%endif
|
||||||
|
# for convenience
|
||||||
|
%define make %__make OPTFLAGS="%{optflags}" OPTTEST=%no_optimize LIB_ST= LIBRARY_REL=%_lib
|
||||||
|
|
||||||
|
%define lname libargon2-1
|
||||||
Name: argon2
|
Name: argon2
|
||||||
Version: 0.0+%{_version}
|
Version: 0.0+git20171227.670229c
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: The reference C implementation of Argon2
|
Summary: The reference C implementation of Argon2
|
||||||
License: CC0-1.0 or Apache-2.0
|
License: CC0-1.0 or Apache-2.0
|
||||||
Group: Productivity/Networking/Security
|
Group: Productivity/Networking/Security
|
||||||
Url: https://github.com/P-H-C/phc-winner-argon2
|
Url: https://github.com/P-H-C/phc-winner-argon2
|
||||||
Source: https://github.com/P-H-C/phc-winner-argon2/archive/%{_version}.tar.gz#/phc-winner-argon2-%{_version}.tar.gz
|
Source: %{name}-%{version}.tar.xz
|
||||||
Patch1: optflags.patch
|
Patch1: optflags.patch
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: sed
|
BuildRequires: sed
|
||||||
ExclusiveArch: i686 x86_64
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -67,34 +73,29 @@ Headers for argon2, the reference C implementation of Argon2, the
|
|||||||
password-hashing function that won the Password Hashing Competition (PHC).
|
password-hashing function that won the Password Hashing Competition (PHC).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n phc-winner-argon2-%{_version}
|
%autosetup
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
sed -i s,"LIBRARY_REL = lib","LIBRARY_REL = %{_lib}", Makefile
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CFLAGS="-pthread %{optflags} -Iinclude -Isrc"
|
%make %{?_smp_mflags}
|
||||||
|
# fix pkgconfig file
|
||||||
|
sed -e 's:lib/@HOST_MULTIARCH@:%{_lib}:;s/@UPSTREAM_VER@/%{version}/' -i libargon2.pc
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
%make DESTDIR=%{buildroot} install
|
||||||
|
|
||||||
chmod -x %{buildroot}%{_includedir}/argon2.h
|
|
||||||
|
|
||||||
mv %{buildroot}%{_libdir}/libargon2.so %{buildroot}%{_libdir}/libargon2.so.0
|
|
||||||
ln -s %{_libdir}/libargon2.so.0 %{buildroot}%{_libdir}/libargon2.so
|
|
||||||
|
|
||||||
install -D -m 644 man/argon2.1 %{buildroot}%{_mandir}/man1/argon2.1
|
install -D -m 644 man/argon2.1 %{buildroot}%{_mandir}/man1/argon2.1
|
||||||
install -D -m 644 libargon2.pc %{buildroot}/%{_libdir}/pkgconfig/libargon2.pc
|
install -D -m 644 libargon2.pc %{buildroot}/%{_libdir}/pkgconfig/libargon2.pc
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make CFLAGS="-pthread %{optflags} -Iinclude -Isrc" test
|
%make test
|
||||||
|
|
||||||
%post -n %{lname} -p /sbin/ldconfig
|
%post -n %{lname} -p /sbin/ldconfig
|
||||||
%postun -n %{lname} -p /sbin/ldconfig
|
%postun -n %{lname} -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc LICENSE CHANGELOG.md README.md
|
%license LICENSE
|
||||||
|
%doc CHANGELOG.md README.md
|
||||||
%{_bindir}/argon2
|
%{_bindir}/argon2
|
||||||
%{_mandir}/man1/argon2.1%{ext_man}
|
%{_mandir}/man1/argon2.1%{ext_man}
|
||||||
|
|
||||||
@ -104,7 +105,7 @@ make CFLAGS="-pthread %{optflags} -Iinclude -Isrc" test
|
|||||||
|
|
||||||
%files -n %{lname}
|
%files -n %{lname}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/libargon2.so.0
|
%{_libdir}/libargon2.so.1
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
@ -1,66 +1,31 @@
|
|||||||
Index: phc-winner-argon2-20161029/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
===================================================================
|
index 1e1129f..33fe491 100644
|
||||||
--- phc-winner-argon2-20161029.orig/Makefile
|
--- a/Makefile
|
||||||
+++ phc-winner-argon2-20161029/Makefile
|
+++ b/Makefile
|
||||||
@@ -21,28 +21,14 @@ GENKAT = genkat
|
@@ -30,7 +30,7 @@ SRC_BENCH = src/bench.c
|
||||||
|
|
||||||
DIST = phc-winner-argon2
|
|
||||||
|
|
||||||
-SRC = src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c
|
|
||||||
+SRC = src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/opt.c
|
|
||||||
SRC_RUN = src/run.c
|
|
||||||
SRC_BENCH = src/bench.c
|
|
||||||
SRC_GENKAT = src/genkat.c
|
SRC_GENKAT = src/genkat.c
|
||||||
OBJ = $(SRC:.c=.o)
|
OBJ = $(SRC:.c=.o)
|
||||||
|
|
||||||
-CFLAGS += -std=c89 -pthread -O3 -Wall -g -Iinclude -Isrc
|
-CFLAGS += -std=c89 -O3 -Wall -g -Iinclude -Isrc
|
||||||
-CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
|
+CFLAGS += $(OPTFLAGS) -Iinclude -Isrc
|
||||||
- -Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
|
|
||||||
-
|
ifeq ($(NO_THREADS), 1)
|
||||||
|
CFLAGS += -DARGON2_NO_THREADS
|
||||||
|
@@ -41,16 +41,12 @@ endif
|
||||||
|
CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
|
||||||
|
-Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
|
||||||
|
|
||||||
-OPTTARGET ?= native
|
-OPTTARGET ?= native
|
||||||
OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
|
-OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
|
||||||
-o /dev/null 2>/dev/null; echo $$?)
|
- -o /dev/null 2>/dev/null; echo $$?)
|
||||||
-# Detect compatible platform
|
# Detect compatible platform
|
||||||
-ifneq ($(OPTTEST), 0)
|
ifneq ($(OPTTEST), 0)
|
||||||
-$(info Building without optimizations)
|
$(info Building without optimizations)
|
||||||
- SRC += src/ref.c
|
SRC += src/ref.c
|
||||||
-else
|
else
|
||||||
-$(info Building with optimizations for $(OPTTARGET))
|
-$(info Building with optimizations for $(OPTTARGET))
|
||||||
- CFLAGS += -march=$(OPTTARGET)
|
- CFLAGS += -march=$(OPTTARGET)
|
||||||
- SRC += src/opt.c
|
+$(info Building with optimizations)
|
||||||
-endif
|
SRC += src/opt.c
|
||||||
|
endif
|
||||||
|
|
||||||
BUILD_PATH := $(shell pwd)
|
|
||||||
KERNEL_NAME := $(shell uname -s)
|
|
||||||
@@ -88,7 +74,7 @@ endif
|
|
||||||
|
|
||||||
LIB_SH := lib$(LIB_NAME).$(LIB_EXT)
|
|
||||||
LIB_ST := lib$(LIB_NAME).a
|
|
||||||
-LIBRARIES = $(LIB_SH) $(LIB_ST)
|
|
||||||
+LIBRARIES = $(LIB_SH)
|
|
||||||
HEADERS = include/argon2.h
|
|
||||||
|
|
||||||
INSTALL = install
|
|
||||||
@@ -105,11 +91,11 @@ INST_BINARY = $(DESTDIR)$(PREFIX)/$(BINA
|
|
||||||
|
|
||||||
.PHONY: clean dist format $(GENKAT) all install
|
|
||||||
|
|
||||||
-all: clean $(RUN) libs
|
|
||||||
+all: $(RUN) libs
|
|
||||||
libs: $(LIBRARIES)
|
|
||||||
|
|
||||||
$(RUN): $(SRC) $(SRC_RUN)
|
|
||||||
- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
|
|
||||||
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
|
||||||
|
|
||||||
$(BENCH): $(SRC) $(SRC_BENCH)
|
|
||||||
$(CC) $(CFLAGS) $^ -o $@
|
|
||||||
@@ -118,7 +104,7 @@ $(GENKAT): $(SRC) $(SRC_GENKAT)
|
|
||||||
$(CC) $(CFLAGS) $^ -o $@ -DGENKAT
|
|
||||||
|
|
||||||
$(LIB_SH): $(SRC)
|
|
||||||
- $(CC) $(CFLAGS) $(LIB_CFLAGS) $(LDFLAGS) $(SO_LDFLAGS) $^ -o $@
|
|
||||||
+ $(CC) $(CFLAGS) $(LIB_CFLAGS) $(SO_LDFLAGS) $^ -o $@ $(LDFLAGS)
|
|
||||||
|
|
||||||
$(LIB_ST): $(OBJ)
|
|
||||||
ar rcs $@ $^
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:fe0049728b946b58b94cc6db89b34e2d050c62325d16316a534d2bedd78cd5e7
|
|
||||||
size 1506864
|
|
Loading…
x
Reference in New Issue
Block a user