From 1d70343858e92171ec550a505fe34fdce0765d89184700dd3b6f619353539e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Fri, 17 Jan 2020 10:28:50 +0000 Subject: [PATCH] - Use libgcrypt as crypto library instead of beecrypt OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=521 --- beecrypt-4.1.2-build.diff | 41 ------------------------------ beecrypt-4.1.2.diff | 52 --------------------------------------- beecrypt-4.1.2.tar.bz2 | 3 --- python-rpm.spec | 3 ++- rpm.changes | 7 ++++++ rpm.spec | 20 +++------------ 6 files changed, 12 insertions(+), 114 deletions(-) delete mode 100644 beecrypt-4.1.2-build.diff delete mode 100644 beecrypt-4.1.2.diff delete mode 100644 beecrypt-4.1.2.tar.bz2 diff --git a/beecrypt-4.1.2-build.diff b/beecrypt-4.1.2-build.diff deleted file mode 100644 index fd276e8..0000000 --- a/beecrypt-4.1.2-build.diff +++ /dev/null @@ -1,41 +0,0 @@ ---- - acinclude.m4 | 4 ++-- - configure.ac | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -Index: beecrypt-4.1.2/configure.ac -=================================================================== ---- beecrypt-4.1.2.orig/configure.ac -+++ beecrypt-4.1.2/configure.ac -@@ -1,8 +1,8 @@ - # Process this file with autoconf to produce a configure script. - - AC_INIT([beecrypt],[4.1.2],[bob.deblier@telenet.be]) --AM_INIT_AUTOMAKE - AC_CANONICAL_TARGET -+AM_INIT_AUTOMAKE - AC_CONFIG_SRCDIR(beecrypt.h) - AC_CONFIG_HEADERS([config.h]) - -Index: beecrypt-4.1.2/acinclude.m4 -=================================================================== ---- beecrypt-4.1.2.orig/acinclude.m4 -+++ beecrypt-4.1.2/acinclude.m4 -@@ -459,7 +459,7 @@ AC_DEFUN([BEECRYPT_GNU_CC],[ - CFLAGS="$CFLAGS -Wall -pedantic" - else - # Generic optimizations, including cpu tuning -- BEECRYPT_CFLAGS_REM([-g]) -+ #BEECRYPT_CFLAGS_REM([-g]) - CFLAGS="$CFLAGS -DNDEBUG -fomit-frame-pointer" - if test "$bc_cv_c_aggressive_opt" = yes; then - case $bc_target_cpu in -@@ -571,7 +571,7 @@ AC_DEFUN([BEECRYPT_GNU_CXX],[ - CXXFLAGS="$CXXFLAGS -Wall -pedantic" - else - # Generic optimizations, including cpu tuning -- BEECRYPT_CXXFLAGS_REM([-g]) -+ #BEECRYPT_CXXFLAGS_REM([-g]) - CXXFLAGS="$CXXFLAGS -DNDEBUG" - if test "$bc_cv_c_aggressive_opt" = yes; then - case $bc_target_cpu in diff --git a/beecrypt-4.1.2.diff b/beecrypt-4.1.2.diff deleted file mode 100644 index e14e9bf..0000000 --- a/beecrypt-4.1.2.diff +++ /dev/null @@ -1,52 +0,0 @@ -Index: beecrypt-4.1.2/Makefile.am -=================================================================== ---- beecrypt-4.1.2/Makefile.am.orig -+++ beecrypt-4.1.2/Makefile.am -@@ -49,7 +49,7 @@ libaltdir=$(prefix)/lib@LIBALT@ - - libalt_LTLIBRARIES = libbeecrypt.la - --libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhaes.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha256.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c rsa.c rsakp.c rsapk.c sha1.c sha256.c sha384.c sha512.c sha_k.c timestamp.c cppglue.cxx -+libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhaes.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha256.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c rsa.c rsakp.c rsapk.c sha1.c sha256.c sha384.c sha512.c sha_k.c timestamp.c - libbeecrypt_la_DEPENDENCIES = $(BEECRYPT_OBJECTS) - libbeecrypt_la_LIBADD = aesopt.lo blowfishopt.lo mpopt.lo sha1opt.lo - libbeecrypt_la_LDFLAGS = -no-undefined -version-info $(LIBBEECRYPT_LT_CURRENT):$(LIBBEECRYPT_LT_REVISION):$(LIBBEECRYPT_LT_AGE) -@@ -62,5 +62,11 @@ EXTRA_DIST = BENCHMARKS BUGS CONTRIBUTOR - - DISTCLEANFILES = mpopt.s aesopt.s blowfishopt.s sha1opt.s - -+BUILT_SOURCES = listobjs -+ -+.PHONY: listobjs -+listobjs: -+ @echo $(libbeecrypt_la_OBJECTS) $(libbeecrypt_la_LIBADD) > $@ -+ - bench: - (cd tests && $(MAKE) $(AM_MAKEFLAGS) bench) -Index: beecrypt-4.1.2/base64.c -=================================================================== ---- beecrypt-4.1.2/base64.c.orig -+++ beecrypt-4.1.2/base64.c -@@ -253,7 +253,6 @@ char* b64encode(const void* data, size_t - unsigned c; - - if (s == NULL) return NULL; -- if (*s == '\0') return calloc(1, sizeof(*t)); - - if (ns == 0) ns = strlen((const char*) s); - nt = ((ns + 2) / 3) * 4; -Index: beecrypt-4.1.2/c++/io/DataOutputStream.cxx -=================================================================== ---- beecrypt-4.1.2/c++/io/DataOutputStream.cxx.orig -+++ beecrypt-4.1.2/c++/io/DataOutputStream.cxx -@@ -126,8 +126,8 @@ void DataOutputStream::writeLong(javalon - void DataOutputStream::writeChar(javaint v) throw (IOException) - { - _lock.lock(); -- out.write((v >> 8) && 0xff); -- out.write((v ) && 0xff); -+ out.write((v >> 8) & 0xff); -+ out.write((v ) & 0xff); - written += 2; - _lock.unlock(); - } diff --git a/beecrypt-4.1.2.tar.bz2 b/beecrypt-4.1.2.tar.bz2 deleted file mode 100644 index e67e3c2..0000000 --- a/beecrypt-4.1.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67ef64715912e978b426ad514567e189039016b9f04d52783865a2dafb27b578 -size 563414 diff --git a/python-rpm.spec b/python-rpm.spec index c4f8c79..5046317 100644 --- a/python-rpm.spec +++ b/python-rpm.spec @@ -1,7 +1,7 @@ # # spec file for package python-rpm # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 Neal Gompa . # # All modifications and additions to the file contributed by third parties @@ -34,6 +34,7 @@ BuildRequires: libacl-devel BuildRequires: libbz2-devel BuildRequires: libcap-devel BuildRequires: libelf-devel +BuildRequires: libgcrypt-devel BuildRequires: libselinux-devel BuildRequires: libsemanage-devel BuildRequires: libtool diff --git a/rpm.changes b/rpm.changes index 0ac009d..e59470b 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jan 17 11:27:17 CET 2020 - mls@suse.de + +- Use libgcrypt as crypto library instead of beecrypt + * dropped patch: beecrypt-4.1.2-build.diff + * dropped patch: beecrypt-4.1.2.diff + ------------------------------------------------------------------- Fri Dec 6 15:30:48 CET 2019 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index d91f4b6..131119d 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rpm # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -35,6 +35,7 @@ BuildRequires: libbz2-devel BuildRequires: libcap-devel BuildRequires: libdw-devel BuildRequires: libelf-devel +BuildRequires: libgcrypt-devel BuildRequires: libselinux-devel BuildRequires: libsemanage-devel BuildRequires: libtool @@ -66,14 +67,11 @@ Source1: RPM-HOWTO.tar.bz2 Source5: rpmsort Source8: rpmconfigcheck Source9: sysconfig.services-rpm -Source10: beecrypt-4.1.2.tar.bz2 Source11: db-4.8.30.tar.bz2 Source12: baselibs.conf Source13: rpmconfigcheck.service -Patch1: beecrypt-4.1.2.diff Patch2: db.diff Patch3: rpm-4.12.0.1-fix-bashisms.patch -Patch4: beecrypt-4.1.2-build.diff Patch5: usr-lib-sysimage-rpm.patch # quilt patches start here Patch11: debugedit.diff @@ -212,19 +210,15 @@ and requires some packages that are usually required. %prep %setup -q -n rpm-%{version} rm -rf sqlite -rm -rf beecrypt tar xjf %{SOURCE10} tar xjf %{SOURCE11} ln -s db-4.8.30 db cd db %patch2 -p1 cd .. -ln -s beecrypt-4.1.2 beecrypt chmod -R u+w db/* rm -f rpmdb/db.h -%patch -P 1 %patch3 -p1 -%patch -P 4 %patch5 -p1 %patch -P 11 -P 12 -P 13 -P 15 -P 16 -P 18 %patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 29 @@ -243,7 +237,6 @@ rm -f rpmdb/db.h %endif cp config.guess config.sub db/dist/ -cp config.guess config.sub beecrypt/ tar -xjvf %{SOURCE1} rm -f m4/libtool.m4 rm -f m4/lt*.m4 @@ -261,13 +254,6 @@ BUILDTARGET="--build=%{_target_cpu}-suse-linux-gnueabi" BUILDTARGET="--build=%{_target_cpu}-suse-linux" %endif -#cp -p /usr/share/gettext/config.rpath . -cp autogen.sh beecrypt -pushd beecrypt -./autogen.sh --disable-dependency-tracking --with-pic --without-python $BUILDTARGET -make %{?_smp_mflags} -popd - autoreconf -fi ./configure --disable-dependency-tracking --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib \ @@ -276,7 +262,7 @@ autoreconf -fi --with-rundir=/run \ --without-archive \ --with-selinux \ ---with-internal-beecrypt \ +--with-crypto=libgcrypt \ --with-acl \ --with-cap \ --enable-zstd \