[arch-commits] Commit in osquery/trunk (PKGBUILD nolvm2app.patch)
Anatol Pomozov
anatolik at archlinux.org
Mon Mar 8 02:07:26 UTC 2021
Date: Monday, March 8, 2021 @ 02:07:25
Author: anatolik
Revision: 886876
upgpkg: osquery 4.5.1-8: FS#69873 disable LVM2 that started sefaulting since recent lvm2 rebuild
Added:
osquery/trunk/nolvm2app.patch
Modified:
osquery/trunk/PKGBUILD
-----------------+
PKGBUILD | 19 +++++++++----------
nolvm2app.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-03-08 01:33:13 UTC (rev 886875)
+++ PKGBUILD 2021-03-08 02:07:25 UTC (rev 886876)
@@ -2,7 +2,7 @@
pkgname=osquery
pkgver=4.5.1
-pkgrel=7
+pkgrel=8
pkgdesc='SQL powered operating system instrumentation, monitoring, and analytics'
arch=(x86_64)
url='https://osquery.io'
@@ -9,6 +9,7 @@
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)
+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=f54b2ca8b18dee86077521789788f9e29c8db317
@@ -16,25 +17,23 @@
_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)
+ devendorize.patch::https://github.com/anatol/osquery/compare/$pkgver...$_patched_osquery_commit.patch
+ tls_crash.patch::https://github.com/osquery/osquery/commit/d69380cb7713dd5f7f48849a028a7723e7a619bf.patch
+ nolvm2app.patch)
sha256sums=('568af4bd2562e5321bbac68177b377b3ad386942e227511867981876cbce3e26'
'191848bf04ca6fe14a9634bdcff6f6e851aa59526f1f3fb168ad7c8c6d9b1d00'
- '7480738df33f5912c1e473c9138ebabf42169c3d1c54fe92bcc443cbe2e2511c'
'fbcfb24caa3786a37d371cd8e2e45fdc3095d6e526e97c0d403bba8be2683d0f'
- 'f0c4e7f8b71986ea9c9a5f2e2f4c13979cffb84ddd67c199b2071cd4c359b139')
+ 'ec6378a531866320b6086c7ee90f333ec35598669a39f4621eed0beb252408ba'
+ 'fa0e81fb9104a08d802420c56fe3484501c213a909966fe036a64fd6a0552d50')
prepare() {
cd osquery-$pkgver
patch -p1 < ../devendorize.patch
- patch -p1 -R < ../devendorize-lvm2.patch
+ patch -p1 < ../nolvm2app.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
-
- rm -rf libraries/cmake/source/libdevmapper/src
- ln -sf `pwd`/../lvm2-$_lvm2_version libraries/cmake/source/libdevmapper/src
}
build() {
Added: nolvm2app.patch
===================================================================
--- nolvm2app.patch (rev 0)
+++ nolvm2app.patch 2021-03-08 02:07:25 UTC (rev 886876)
@@ -0,0 +1,52 @@
+diff --git a/libraries/cmake/system/modules/Findlibdevmapper.cmake b/libraries/cmake/system/modules/Findlibdevmapper.cmake
+index 47b5f56..c464f5c 100644
+--- a/libraries/cmake/system/modules/Findlibdevmapper.cmake
++++ b/libraries/cmake/system/modules/Findlibdevmapper.cmake
+@@ -11,5 +11,5 @@ locateSystemLibrary(
+ NAME libdevmapper
+ REQUIRED ${libdevmapper_REQUIRED}
+ MAIN_HEADER "libdevmapper.h"
+- LIBRARIES "devmapper" "lvm2app"
++ LIBRARIES "devmapper"
+ )
+diff --git a/osquery/tables/system/linux/block_devices.cpp b/osquery/tables/system/linux/block_devices.cpp
+index 2eab290..01a4bf3 100644
+--- a/osquery/tables/system/linux/block_devices.cpp
++++ b/osquery/tables/system/linux/block_devices.cpp
+@@ -20,13 +20,13 @@
+ #include <osquery/logger/logger.h>
+
+ extern "C" {
+-#include <lvm2app.h>
+ #include <sys/sysmacros.h>
+ }
+
+ namespace osquery {
+ namespace tables {
+
++#if 0
+ void populatePVChildren(lvm_t lvm,
+ const std::string& devname,
+ const std::string& pvid,
+@@ -61,6 +61,7 @@ void populatePVChildren(lvm_t lvm,
+ }
+ lvm_vg_close(vg);
+ }
++#endif
+
+ static void getBlockDevice(struct udev_device* dev,
+ QueryData& results,
+@@ -125,11 +126,13 @@ static void getBlockDevice(struct udev_device* dev,
+ r["label"] = blk_value;
+ }
+ if (boost::algorithm::starts_with(r["type"], "LVM")) {
++#if 0
+ lvm_t lvm = lvm_init(nullptr);
+ if (lvm != nullptr) {
+ populatePVChildren(lvm, name, r["uuid"], lvm_lv2pv);
+ lvm_quit(lvm);
+ }
++#endif
+ }
+ }
+ blkid_free_probe(pr);
More information about the arch-commits
mailing list