[arch-commits] Commit in osquery/repos (2 files)

Anatol Pomozov anatolik at archlinux.org
Thu May 20 18:09:44 UTC 2021


    Date: Thursday, May 20, 2021 @ 18:09:43
  Author: anatolik
Revision: 939546

archrelease: copy trunk to community-staging-x86_64

Added:
  osquery/repos/community-staging-x86_64/
  osquery/repos/community-staging-x86_64/PKGBUILD
    (from rev 939545, osquery/trunk/PKGBUILD)

----------+
 PKGBUILD |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

Copied: osquery/repos/community-staging-x86_64/PKGBUILD (from rev 939545, osquery/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-05-20 18:09:43 UTC (rev 939546)
@@ -0,0 +1,51 @@
+# Maintainer: Anatol Pomozov
+
+pkgname=osquery
+pkgver=4.6.0
+pkgrel=2
+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 libelfin lldpd rapidjson sleuthkit ssdeep thrift yara lmdb iptables)
+makedepends=(cmake python boost linenoise-ng ninja)
+options=(!strip)
+# patched version of smartools that we need to build statically to avoid collision with the upstream version
+_smartmontools_commit=6afcf545d2ab86d13a3ecb9f656aa81622031f2a
+_patched_osquery_commit=4.6.0-archlinux-1
+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
+	devendorize.patch::https://github.com/anatol/osquery/compare/$pkgver...$_patched_osquery_commit.patch
+	tls_crash.patch::https://github.com/osquery/osquery/commit/d69380cb7713dd5f7f48849a028a7723e7a619bf.patch)
+sha256sums=('59dc5fce0f09133e17b8e4a5d2497ef3efd6c01243abf32564cf9ba1caa7fc44'
+            '191848bf04ca6fe14a9634bdcff6f6e851aa59526f1f3fb168ad7c8c6d9b1d00'
+            'fb4ba54777c50e846edc82581085add9674732ca148d108f289329ebc1acb09b'
+            'ec6378a531866320b6086c7ee90f333ec35598669a39f4621eed0beb252408ba')
+
+prepare() {
+  cd osquery-$pkgver
+  patch -p1 < ../devendorize.patch
+  patch -p1 < ../tls_crash.patch
+
+  rm -rf libraries/cmake/source/smartmontools/src
+  ln -sf `pwd`/../third-party-smartmontools-$_smartmontools_commit libraries/cmake/source/smartmontools/src
+}
+
+build() {
+  cd osquery-$pkgver
+
+  # disable ebpfpub dependency as https://github.com/trailofbits/ebpfpub is not in community repo yet
+  cmake -DCMAKE_BUILD_TYPE=Release -DOSQUERY_STATIC_BUILD=OFF -DCMAKE_INSTALL_PREFIX=/usr -DOSQUERY_VERSION=$pkgver \
+      -DOSQUERY_IGNORE_CMAKE_MAX_VERSION_CHECK=TRUE \
+      -DOSQUERY_BUILD_BPF=OFF \
+      -G Ninja -S . -B build
+  ninja -C build
+}
+
+package() {
+  cd osquery-$pkgver
+
+  DESTDIR="${pkgdir}" ninja -C build install
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  rm -r "$pkgdir/etc/init.d/"
+}



More information about the arch-commits mailing list