Skip to content

Commit

Permalink
Remove support for beecrypt
Browse files Browse the repository at this point in the history
Beecrypt whose upstream is dead for more than ten years now, was deprecated
in rpm 4.16 (in commit 0910e6a).
  • Loading branch information
pmatilai committed May 28, 2020
1 parent d40b748 commit 1ef7b2e
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 559 deletions.
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ The source for the file utility + library is available from
ftp://ftp.astron.com/pub/file/

You will need a cryptographic library to support digests and signatures.
This library may be libgcrypt, Mozilla NSS, OpenSSL or beecrypt.
This library may be libgcrypt, Mozilla NSS or OpenSSL.
Which library to use can be specified with the
--with-crypto=[libgcrypt|beecrypt|nss|openssl] argument to configure,
--with-crypto=[libgcrypt|nss|openssl] argument to configure,
libgcrypt is the default.

libgcrypt library is available from https://www.gnupg.org/software/libgcrypt/
Expand Down
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/
AM_CPPFLAGS += -I$(top_srcdir)/build
AM_CPPFLAGS += -I$(top_srcdir)/lib
AM_CPPFLAGS += -I$(top_srcdir)/rpmio
AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@
AM_CPPFLAGS += @WITH_NSS_INCLUDE@
AM_CPPFLAGS += @WITH_OPENSSL_INCLUDE@
AM_CPPFLAGS += @WITH_POPT_INCLUDE@
Expand Down
1 change: 0 additions & 1 deletion build/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ AM_CFLAGS = @RPMCFLAGS@
AM_CFLAGS += @OPENMP_CFLAGS@

AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/
AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@
AM_CPPFLAGS += @WITH_NSS_INCLUDE@
AM_CPPFLAGS += @WITH_MAGIC_INCLUDE@
AM_CPPFLAGS += @WITH_POPT_INCLUDE@
Expand Down
31 changes: 1 addition & 30 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -254,39 +254,10 @@ AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes])
# Select crypto library
AC_ARG_WITH(crypto,
[AC_HELP_STRING([--with-crypto=CRYPTO_LIB],
[The cryptographic library to use (nss|beecrypt|openssl|libgcrypt). The default is libgcrypt. beecrypt and nss are DEPRECATED.])
[The cryptographic library to use (nss|openssl|libgcrypt). The default is libgcrypt. nss is DEPRECATED.])
],[],
[with_crypto=libgcrypt])

# Check for beecrypt library if requested.
AC_ARG_WITH(internal_beecrypt, [ --with-internal-beecrypt build with internal beecrypt library (DEPRECATED)],,[with_internal_beecrypt=no])
AM_CONDITIONAL([WITH_INTERNAL_BEECRYPT],[test "$with_internal_beecrypt" = yes])
if test "$with_internal_beecrypt" = yes ; then
with_crypto=beecrypt
fi
AM_CONDITIONAL([WITH_BEECRYPT],[test "$with_crypto" = beecrypt])

WITH_BEECRYPT_INCLUDE=
WITH_BEECRYPT_LIB=
if test "$with_crypto" = beecrypt ; then
AC_MSG_WARN([Using the beecrypt library with rpm is deprecated and support will be removed in a future release!])
AC_DEFINE(WITH_BEECRYPT, 1, [Build with beecrypt instead of nss3 support?])
if test "$with_internal_beecrypt" = yes ; then
WITH_BEECRYPT_INCLUDE="-I\$(top_srcdir)/beecrypt"
AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
else
AC_CHECK_LIB(beecrypt, mpfprintln, [
WITH_BEECRYPT_LIB="-lbeecrypt"
],[
AC_MSG_ERROR([missing required library 'beecrypt'])
])
AC_CHECK_HEADER([beecrypt/api.h], [AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
])
fi
fi
AC_SUBST(WITH_BEECRYPT_LIB)
AC_SUBST(WITH_BEECRYPT_INCLUDE)

#=================
# Check for OpenSSL library.
# We need evp.h from OpenSSL.
Expand Down
1 change: 0 additions & 1 deletion lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ include $(top_srcdir)/rpm.am
AM_CFLAGS = @RPMCFLAGS@

AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/
AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@
AM_CPPFLAGS += @WITH_NSS_INCLUDE@
AM_CPPFLAGS += @WITH_POPT_INCLUDE@
AM_CPPFLAGS += -I$(top_srcdir)/misc
Expand Down
2 changes: 1 addition & 1 deletion rpm.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Requires.private: @ZSTD_REQUIRES@
# Conflicts:
Cflags: -I${includedir}
Libs: -L${libdir} -lrpm -lrpmio
Libs.private: -lpopt -lrt -lpthread @WITH_LZMA_LIB@ @WITH_DB_LIB@ @WITH_BZ2_LIB@ @WITH_ZLIB_LIB@ @WITH_BEECRYPT_LIB@ @WITH_NSS_LIB@ @LUA_LIBS@
Libs.private: -lpopt -lrt -lpthread @WITH_LZMA_LIB@ @WITH_DB_LIB@ @WITH_BZ2_LIB@ @WITH_ZLIB_LIB@ @WITH_NSS_LIB@ @LUA_LIBS@
15 changes: 0 additions & 15 deletions rpmio/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ AM_CFLAGS = @RPMCFLAGS@

AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/
AM_CPPFLAGS += @WITH_NSS_INCLUDE@
AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@
AM_CPPFLAGS += @WITH_OPENSSL_INCLUDE@
AM_CPPFLAGS += @WITH_LIBGCRYPT_INCLUDE@
AM_CPPFLAGS += @WITH_POPT_INCLUDE@
Expand All @@ -24,9 +23,6 @@ librpmio_la_SOURCES = \
rpmstring.c rpmfileutil.c rpmglob.c \
rpmkeyring.c rpmstrpool.c rpmmacro_internal.h

if WITH_BEECRYPT
librpmio_la_SOURCES += digest_beecrypt.c
else
if WITH_OPENSSL
librpmio_la_SOURCES += digest_openssl.c
else
Expand All @@ -36,14 +32,12 @@ else
librpmio_la_SOURCES += digest_nss.c
endif
endif
endif


librpmio_la_LDFLAGS = -version-info $(rpm_version_info)
librpmio_la_LIBADD = \
../misc/libmisc.la \
@WITH_NSS_LIB@ \
@WITH_BEECRYPT_LIB@ \
@WITH_OPENSSL_LIB@ \
@WITH_LIBGCRYPT_LIB@ \
@WITH_BZ2_LIB@ \
Expand All @@ -53,15 +47,6 @@ librpmio_la_LIBADD = \
$(ZSTD_LIBS) \
-lpthread

if WITH_INTERNAL_BEECRYPT
librpmio_la_LIBADD += $(libbeecrypt_la)

libbeecrypt_la = $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la

$(top_builddir)/beecrypt/libbeecrypt_nolibdir.la: $(top_builddir)/beecrypt/libbeecrypt.la
sed -e 's/libdir=.*/libdir=/' < $(top_builddir)/beecrypt/libbeecrypt.la > $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la
endif

if WITH_LUA
AM_CPPFLAGS += -I$(top_srcdir)/luaext/
AM_CPPFLAGS += @LUA_CFLAGS@
Expand Down

0 comments on commit 1ef7b2e

Please sign in to comment.