[arch-commits] Commit in osquery/repos (3 files)
Christian Hesse
eworm at archlinux.org
Mon Feb 8 12:54:36 UTC 2021
Date: Monday, February 8, 2021 @ 12:54:36
Author: eworm
Revision: 849003
archrelease: copy trunk to community-staging-x86_64
Added:
osquery/repos/community-staging-x86_64/
osquery/repos/community-staging-x86_64/PKGBUILD
(from rev 849002, osquery/trunk/PKGBUILD)
osquery/repos/community-staging-x86_64/devendorize-lvm2.patch
(from rev 849002, osquery/trunk/devendorize-lvm2.patch)
------------------------+
PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++
devendorize-lvm2.patch | 18 +++++++++++++++
2 files changed, 71 insertions(+)
Copied: osquery/repos/community-staging-x86_64/PKGBUILD (from rev 849002, osquery/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2021-02-08 12:54:36 UTC (rev 849003)
@@ -0,0 +1,53 @@
+# Maintainer: Anatol Pomozov
+
+pkgname=osquery
+pkgver=4.5.1
+pkgrel=6
+pkgdesc='SQL powered operating system instrumentation, monitoring, and analytics'
+arch=(x86_64)
+url='https://osquery.io'
+license=(Apache GPL2)
+depends=(augeas boost-libs gflags google-glog aws-sdk-cpp librdkafka rocksdb gtest device-mapper rpm-tools dpkg pacman lvm2 libelfin lldpd rapidjson sleuthkit ssdeep thrift yara lmdb iptables)
+makedepends=(cmake python boost linenoise-ng)
+# patched version of smartools that we need to build statically to avoid collision with the upstream version
+_smartmontools_commit=6afcf545d2ab86d13a3ecb9f656aa81622031f2a
+_patched_osquery_commit=f54b2ca8b18dee86077521789788f9e29c8db317
+# lvm2 2.03.x does no longer support lvm2app, so linking statically
+_lvm2_version=2_02_173
+source=(osquery-$pkgver.zip::https://github.com/osquery/osquery/archive/$pkgver.zip
+ smartmontools-$_smartmontools_commit.zip::https://github.com/osquery/third-party-smartmontools/archive/$_smartmontools_commit.zip
+ lvm2-$_lvm2_version.tar.gz::https://github.com/lvmteam/lvm2/archive/v$_lvm2_version.tar.gz
+ devendorize.patch::https://github.com/anatol/osquery/compare/$pkgver...$_patched_osquery_commit.patch
+ devendorize-lvm2.patch)
+sha256sums=('568af4bd2562e5321bbac68177b377b3ad386942e227511867981876cbce3e26'
+ '191848bf04ca6fe14a9634bdcff6f6e851aa59526f1f3fb168ad7c8c6d9b1d00'
+ '7480738df33f5912c1e473c9138ebabf42169c3d1c54fe92bcc443cbe2e2511c'
+ 'fbcfb24caa3786a37d371cd8e2e45fdc3095d6e526e97c0d403bba8be2683d0f'
+ 'f0c4e7f8b71986ea9c9a5f2e2f4c13979cffb84ddd67c199b2071cd4c359b139')
+
+prepare() {
+ cd osquery-$pkgver
+ patch -p1 < ../devendorize.patch
+ patch -p1 -R < ../devendorize-lvm2.patch
+
+ rm -rf libraries/cmake/source/smartmontools/src
+ ln -sf `pwd`/../third-party-smartmontools-$_smartmontools_commit libraries/cmake/source/smartmontools/src
+
+ rm -rf libraries/cmake/source/libdevmapper/src
+ ln -sf `pwd`/../lvm2-$_lvm2_version libraries/cmake/source/libdevmapper/src
+}
+
+build() {
+ cd osquery-$pkgver
+
+ cmake -DCMAKE_BUILD_TYPE=Release -DOSQUERY_STATIC_BUILD=OFF -DCMAKE_INSTALL_PREFIX=/usr -DOSQUERY_VERSION=$pkgver -S . -B build
+ cmake --build build
+}
+
+package() {
+ cd osquery-$pkgver
+
+ cmake --build build --target install -- DESTDIR="$pkgdir"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ rm -r "$pkgdir/etc/init.d/"
+}
Copied: osquery/repos/community-staging-x86_64/devendorize-lvm2.patch (from rev 849002, osquery/trunk/devendorize-lvm2.patch)
===================================================================
--- community-staging-x86_64/devendorize-lvm2.patch (rev 0)
+++ community-staging-x86_64/devendorize-lvm2.patch 2021-02-08 12:54:36 UTC (rev 849003)
@@ -0,0 +1,18 @@
+diff --git a/libraries/cmake/system/modules/Findlibdevmapper.cmake b/libraries/cmake/system/modules/Findlibdevmapper.cmake
+index 34eb119959..47b5f566a2 100644
+--- a/libraries/cmake/system/modules/Findlibdevmapper.cmake
++++ b/libraries/cmake/system/modules/Findlibdevmapper.cmake
+@@ -4,4 +4,12 @@
+ # This source code is licensed in accordance with the terms specified in
+ # the LICENSE file found in the root directory of this source tree.
+
+-include("${CMAKE_SOURCE_DIR}/libraries/cmake/source/modules/Findlibdevmapper.cmake")
++cmake_minimum_required(VERSION 3.15)
++include("${CMAKE_CURRENT_LIST_DIR}/api.cmake")
++
++locateSystemLibrary(
++ NAME libdevmapper
++ REQUIRED ${libdevmapper_REQUIRED}
++ MAIN_HEADER "libdevmapper.h"
++ LIBRARIES "devmapper" "lvm2app"
++)
More information about the arch-commits
mailing list