deps: Use librpm 4.14.1 without beecrypt (#4073)

This commit is contained in:
Teddy Reed 2018-01-21 01:56:11 -05:00 committed by GitHub
parent 483fbbb594
commit 967910c6bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 71 deletions

View File

@ -74,7 +74,7 @@ if(LINUX)
ADD_OSQUERY_LINK_ADDITIONAL("ip4tc")
ADD_OSQUERY_LINK_ADDITIONAL("dpkg lzma bz2")
ADD_OSQUERY_LINK_ADDITIONAL("rpm rpmio beecrypt popt db")
ADD_OSQUERY_LINK_ADDITIONAL("rpm rpmio popt db")
endif()
if(POSIX)

View File

@ -117,7 +117,6 @@ function platform_darwin_main() {
function platform_posix_main() {
# Library secondary dependencies.
brew_dependency osquery/osquery-local/popt
brew_dependency osquery/osquery-local/beecrypt
brew_dependency osquery/osquery-local/berkeley-db
# libarchive for file carving

View File

@ -1,61 +0,0 @@
require File.expand_path("../Abstract/abstract-osquery-formula", __FILE__)
class Beecrypt < AbstractOsqueryFormula
desc "C/C++ cryptography library"
homepage "http://beecrypt.sourceforge.net"
license "LGPL-2.1+"
url "https://downloads.sourceforge.net/project/beecrypt/beecrypt/4.2.1/beecrypt-4.2.1.tar.gz"
sha256 "286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d"
revision 200
bottle do
root_url "https://osquery-packages.s3.amazonaws.com/bottles"
cellar :any_skip_relocation
sha256 "6ac5803d7e38b93223d09fb55dc56b6db16a873e8afaa98c71aa9f696eb7e372" => :sierra
sha256 "68d10e7f9e4141cf1610788cb3e8fee4f87ee83685f7eca78f527b7f5f2813a2" => :x86_64_linux
end
depends_on "libtool" => :build
# Allow us to set architecture and environment flags.
patch :DATA
def install
args = [
"--disable-dependency-tracking",
"--disable-openmp",
"--without-java",
"--without-python",
"--without-cplusplus",
"--with-arch=x86_64",
"--disable-shared",
"--enable-static"
]
system "./autogen.sh"
system "autoreconf", "--force", "--install" if OS.mac?
system "./configure", "--prefix=#{prefix}", *args
system "make"
system "make", "check"
system "make", "install"
end
end
__END__
diff --git a/configure.ac b/configure.ac
index 2eec209..1db6184 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,12 +13,7 @@ AC_PROG_AWK
AC_ARG_ENABLE(expert-mode, [ --enable-expert-mode follow user-defined CFLAGS settings [[default=no]]],[
ac_enable_expert_mode=yes
],[
- if test "X$CFLAGS" != "X"; then
- echo "enabling expert mode"
- ac_enable_expert_mode=yes
- else
- ac_enable_expert_mode=no
- fi
+ ac_enable_expert_mode=no
])
AC_ARG_ENABLE(debug, [ --enable-debug creates debugging code [[default=no]]],[

View File

@ -4,24 +4,24 @@ class Librpm < AbstractOsqueryFormula
desc "The RPM Package Manager (RPM) development libraries"
homepage "http://rpm.org/"
license "LGPL-3.0+"
url "http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.0.tar.bz2"
sha256 "06a0ad54600d3c42e42e02701697a8857dc4b639f6476edefffa714d9f496314"
url "http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.1.tar.bz2"
sha256 "43f40e2ccc3ca65bd3238f8c9f8399d4957be0878c2e83cba2746d2d0d96793b"
revision 200
bottle do
root_url "https://osquery-packages.s3.amazonaws.com/bottles"
cellar :any_skip_relocation
sha256 "5e86f4dbf455327fc87151297c1d66d5f5924b1888fbbb2478f54298a8c544f4" => :sierra
sha256 "cb8690bb4d1b08e63022ca3593886413ca8d6da07740928f1fa10149e436f875" => :x86_64_linux
sha256 "c07a5aaec73e509b5b2365d1eb223cf5bff456b4bc1a90700776fbb23660d532" => :sierra
sha256 "ae19662378c5129af2dc34f6f89189a746ee68151ced438c03aa272a62049421" => :x86_64_linux
end
depends_on "berkeley-db"
depends_on "beecrypt"
depends_on "popt"
patch :DATA
def install
ENV.append "CFLAGS", "-I#{HOMEBREW_PREFIX}/include/beecrypt"
ENV.append "LDFLAGS", "-lz -liconv" if OS.mac?
ENV.append "LDFLAGS", "-lz -liconv -llzma" if OS.mac?
args = [
"--disable-dependency-tracking",
@ -38,7 +38,7 @@ class Librpm < AbstractOsqueryFormula
"--disable-python",
"--enable-static",
"--enable-zstd=no",
"--with-crypto=beecrypt",
"--with-crypto=openssl",
]
inreplace "Makefile.in", "rpm2cpio.$(OBJEXT)", "rpm2cpio.$(OBJEXT) lib/poptALL.$(OBJEXT) lib/poptQV.$(OBJEXT)" if OS.mac?
@ -49,3 +49,31 @@ class Librpm < AbstractOsqueryFormula
system "make", "install"
end
end
__END__
diff --git a/rpmio/digest_openssl.c b/rpmio/digest_openssl.c
index 18e52a7..07647f2 100644
--- a/rpmio/digest_openssl.c
+++ b/rpmio/digest_openssl.c
@@ -175,9 +175,6 @@ static const EVP_MD *getEVPMD(int hashalgo)
case PGPHASHALGO_RIPEMD160:
return EVP_ripemd160();
- case PGPHASHALGO_MD2:
- return EVP_md2();
-
case PGPHASHALGO_SHA256:
return EVP_sha256();
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
index c7cbc32..425d982 100644
--- a/rpmio/rpmio.c
+++ b/rpmio/rpmio.c
@@ -725,7 +725,6 @@ static const FDIO_t bzdio = &bzdio_s ;
#include <lzma.h>
/* Multithreading support in stable API since xz 5.2.0 */
#if LZMA_VERSION >= 50020002
-#define HAVE_LZMA_MT
#endif
#define kBufferSize (1 << 15)

View File

@ -14,6 +14,7 @@ class Xz < AbstractOsqueryFormula
bottle do
root_url "https://osquery-packages.s3.amazonaws.com/bottles"
cellar :any_skip_relocation
sha256 "95db3776f168bbd5eadf047e47f860dc308d96ae80940ce41fe400562b02d96e" => :sierra
sha256 "7dd32d61f232f05359ceb52ccb0594c64c1c6d6a8f2532b4627625f4567026d6" => :x86_64_linux
end