# Maintainer: Anatol Pomozov pkgname=osquery pkgver=4.6.0 pkgrel=1 pkgdesc='SQL powered operating system instrumentation, monitoring, and analytics' arch=(x86_64) url='https://osquery.io' license=(Apache GPL2) depends=(libc++ libunwind) options=(!strip) makedepends=(clang cmake python git ninja) # For now we compile osquery with all its dependencies from sources, like upstream recommends. # It also uses libc++ as it is the only libc implementation supported by osquery. # # Though it would be much better if osquery would be able to compile with system libraries and avoid # hardcoded dependency to libc++ implementation. # https://github.com/osquery/osquery/issues/6286 # https://github.com/anatol/osquery/tree/archlinux source=(git+https://github.com/osquery/osquery#tag=$pkgver fix_compile_errors.patch git+https://github.com/osquery/third-party-bzip2 git+https://github.com/libarchive/libarchive git+https://github.com/file/file git+https://github.com/systemd/systemd git+https://github.com/GNOME/libxml2 git+https://github.com/arangodb/linenoise-ng git+https://github.com/xz-mirror/xz git+https://github.com/Tencent/rapidjson git+https://github.com/facebook/rocksdb git+https://github.com/sleuthkit/sleuthkit git+https://github.com/osquery/third-party-sqlite git+https://github.com/ssdeep-project/ssdeep git+https://github.com/apache/thrift git+https://git.kernel.org/pub/scm/utils/util-linux/util-linux git+https://github.com/VirusTotal/yara git+https://github.com/madler/zlib git+https://github.com/facebook/zstd git+https://github.com/hercules-team/augeas git+https://github.com/osquery/third-party-smartmontools git+https://github.com/osquery/third-party-berkeley-db git+https://github.com/rpm-software-management/rpm git+https://github.com/osquery/third-party-popt git+https://github.com/osquery/third-party-libdpkg git+https://github.com/linux-audit/audit-userspace git+https://github.com/aclements/libelfin git+https://github.com/osquery/third-party-libgcrypt.git git+https://github.com/osquery/third-party-libgpg-error.git git+https://gitlab.com/cryptsetup/cryptsetup.git git+https://github.com/lvmteam/lvm2 git+https://github.com/osquery/third-party-iptables git+https://github.com/edenhill/librdkafka git+https://github.com/vincentbernat/lldpd git+https://github.com/google/googletest git+https://github.com/google/glog git+https://github.com/gflags/gflags git+https://github.com/awslabs/aws-c-common git+https://github.com/awslabs/aws-c-event-stream git+https://github.com/awslabs/aws-checksums git+https://github.com/aws/aws-sdk-cpp git+https://github.com/boostorg/boost git+https://github.com/unicode-org/icu git+https://github.com/osquery/third-party-gnulib git+https://github.com/trailofbits/ebpfpub git+https://gitlab.freedesktop.org/dbus/dbus.git git+https://github.com/libexpat/libexpat git+https://kernel.googlesource.com/pub/scm/libs/libcap/libcap.git # submodules for boost git+https://github.com/boostorg/system.git git+https://github.com/boostorg/multi_array.git git+https://github.com/boostorg/math.git git+https://github.com/boostorg/smart_ptr.git git+https://github.com/boostorg/parameter.git git+https://github.com/boostorg/algorithm.git git+https://github.com/boostorg/any.git git+https://github.com/boostorg/concept_check.git git+https://github.com/boostorg/python.git git+https://github.com/boostorg/tti.git git+https://github.com/boostorg/functional.git git+https://github.com/boostorg/config.git git+https://github.com/boostorg/log.git git+https://github.com/boostorg/interprocess.git git+https://github.com/boostorg/exception.git git+https://github.com/boostorg/foreach.git git+https://github.com/boostorg/spirit.git git+https://github.com/boostorg/io.git git+https://github.com/boostorg/disjoint_sets.git git+https://github.com/boostorg/units.git git+https://github.com/boostorg/preprocessor.git git+https://github.com/boostorg/format.git git+https://github.com/boostorg/xpressive.git git+https://github.com/boostorg/integer.git git+https://github.com/boostorg/thread.git git+https://github.com/boostorg/tokenizer.git git+https://github.com/boostorg/timer.git git+https://github.com/boostorg/inspect.git git+https://github.com/boostorg/boostbook.git git+https://github.com/boostorg/regex.git git+https://github.com/boostorg/crc.git git+https://github.com/boostorg/random.git git+https://github.com/boostorg/serialization.git git+https://github.com/boostorg/test.git git+https://github.com/boostorg/date_time.git git+https://github.com/boostorg/logic.git git+https://github.com/boostorg/graph.git git+https://github.com/boostorg/numeric_conversion.git git+https://github.com/boostorg/lambda.git git+https://github.com/boostorg/mpl.git git+https://github.com/boostorg/typeof.git git+https://github.com/boostorg/tuple.git git+https://github.com/boostorg/utility.git git+https://github.com/boostorg/dynamic_bitset.git git+https://github.com/boostorg/assign.git git+https://github.com/boostorg/filesystem.git git+https://github.com/boostorg/function.git git+https://github.com/boostorg/conversion.git git+https://github.com/boostorg/optional.git git+https://github.com/boostorg/property_tree.git git+https://github.com/boostorg/bimap.git git+https://github.com/boostorg/variant.git git+https://github.com/boostorg/array.git git+https://github.com/boostorg/iostreams.git git+https://github.com/boostorg/multi_index.git git+https://github.com/boostorg/bcp.git git+https://github.com/boostorg/ptr_container.git git+https://github.com/boostorg/statechart.git git+https://github.com/boostorg/static_assert.git git+https://github.com/boostorg/range.git git+https://github.com/boostorg/rational.git git+https://github.com/boostorg/iterator.git git+https://github.com/boostorg/build.git git+https://github.com/boostorg/quickbook.git git+https://github.com/boostorg/graph_parallel.git git+https://github.com/boostorg/property_map.git git+https://github.com/boostorg/program_options.git git+https://github.com/boostorg/detail.git git+https://github.com/boostorg/interval.git git+https://github.com/boostorg/ublas.git git+https://github.com/boostorg/wave.git git+https://github.com/boostorg/type_traits.git git+https://github.com/boostorg/compatibility.git git+https://github.com/boostorg/bind.git git+https://github.com/boostorg/pool.git git+https://github.com/boostorg/proto.git git+https://github.com/boostorg/fusion.git git+https://github.com/boostorg/function_types.git git+https://github.com/boostorg/gil.git git+https://github.com/boostorg/intrusive.git git+https://github.com/boostorg/asio.git git+https://github.com/boostorg/uuid.git git+https://github.com/boostorg/litre.git git+https://github.com/boostorg/circular_buffer.git git+https://github.com/boostorg/mpi.git git+https://github.com/boostorg/unordered.git git+https://github.com/boostorg/signals2.git git+https://github.com/boostorg/accumulators.git git+https://github.com/boostorg/atomic.git git+https://github.com/boostorg/scope_exit.git git+https://github.com/boostorg/flyweight.git git+https://github.com/boostorg/icl.git git+https://github.com/boostorg/predef.git git+https://github.com/boostorg/chrono.git git+https://github.com/boostorg/polygon.git git+https://github.com/boostorg/msm.git git+https://github.com/boostorg/heap.git git+https://github.com/boostorg/coroutine.git git+https://github.com/boostorg/coroutine2.git git+https://github.com/boostorg/ratio.git git+https://github.com/boostorg/odeint.git git+https://github.com/boostorg/geometry.git git+https://github.com/boostorg/phoenix.git git+https://github.com/boostorg/move.git git+https://github.com/boostorg/locale.git git+https://github.com/boostorg/auto_index.git git+https://github.com/boostorg/container.git git+https://github.com/boostorg/local_function.git git+https://github.com/boostorg/context.git git+https://github.com/boostorg/type_erasure.git git+https://github.com/boostorg/multiprecision.git git+https://github.com/boostorg/lockfree.git git+https://github.com/boostorg/assert.git git+https://github.com/boostorg/align.git git+https://github.com/boostorg/type_index.git git+https://github.com/boostorg/core.git git+https://github.com/boostorg/throw_exception.git git+https://github.com/boostorg/winapi.git git+https://github.com/boostorg/boostdep.git git+https://github.com/boostorg/lexical_cast.git git+https://github.com/boostorg/sort.git git+https://github.com/boostorg/convert.git git+https://github.com/boostorg/endian.git git+https://github.com/boostorg/vmd.git git+https://github.com/boostorg/dll.git git+https://github.com/boostorg/compute.git git+https://github.com/boostorg/hana.git git+https://github.com/boostorg/metaparse.git git+https://github.com/boostorg/qvm.git git+https://github.com/boostorg/fiber.git git+https://github.com/boostorg/process.git git+https://github.com/boostorg/stacktrace.git git+https://github.com/boostorg/poly_collection.git git+https://github.com/boostorg/beast.git git+https://github.com/boostorg/mp11.git git+https://github.com/boostorg/callable_traits.git git+https://github.com/boostorg/contract.git git+https://github.com/boostorg/check_build.git git+https://github.com/boostorg/container_hash.git git+https://github.com/boostorg/hof.git git+https://github.com/boostorg/yap.git git+https://github.com/boostorg/safe_numerics.git git+https://github.com/boostorg/parameter_python.git git+https://github.com/boostorg/headers.git git+https://github.com/boostorg/boost_install.git git+https://github.com/boostorg/outcome.git git+https://github.com/boostorg/histogram.git # ebpf submodules # git+https://github.com/trailofbits/ebpf-common # lldpd submodules git+https://github.com/libevent/libevent.git ) sha256sums=('SKIP' '27395d7e65bdc83f18f8fe536bb0a1bfd83e9879c17588ce29930c5aa5b08c9b' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') prepare() { cd "$srcdir/osquery" git submodule init git config -f .gitmodules 'submodule.libraries/cmake/source/bzip2/src.url' "$srcdir/third-party-bzip2" git config -f .gitmodules 'submodule.libraries/cmake/source/libarchive/src.url' "$srcdir/libarchive" git config -f .gitmodules 'submodule.libraries/cmake/source/libmagic/src.url' "$srcdir/file" git config -f .gitmodules 'submodule.libraries/cmake/source/libudev/src.url' "$srcdir/systemd" git config -f .gitmodules 'submodule.libraries/cmake/source/libxml2/src.url' "$srcdir/libxml2" git config -f .gitmodules 'submodule.libraries/cmake/source/linenoise-ng/src.url' "$srcdir/linenoise-ng" git config -f .gitmodules 'submodule.libraries/cmake/source/lzma/src.url' "$srcdir/xz" git config -f .gitmodules 'submodule.libraries/cmake/source/rapidjson/src.url' "$srcdir/rapidjson" git config -f .gitmodules 'submodule.libraries/cmake/source/rocksdb/src.url' "$srcdir/rocksdb" git config -f .gitmodules 'submodule.libraries/cmake/source/sleuthkit/src.url' "$srcdir/sleuthkit" git config -f .gitmodules 'submodule.libraries/cmake/source/sqlite/src.url' "$srcdir/third-party-sqlite" git config -f .gitmodules 'submodule.libraries/cmake/source/ssdeep-cpp/src.url' "$srcdir/ssdeep" git config -f .gitmodules 'submodule.libraries/cmake/source/thrift/src.url' "$srcdir/thrift" git config -f .gitmodules 'submodule.libraries/cmake/source/util-linux/src.url' "$srcdir/util-linux" git config -f .gitmodules 'submodule.libraries/cmake/source/yara/src.url' "$srcdir/yara" git config -f .gitmodules 'submodule.libraries/cmake/source/zlib/src.url' "$srcdir/zlib" git config -f .gitmodules 'submodule.libraries/cmake/source/zstd/src.url' "$srcdir/zstd" git config -f .gitmodules 'submodule.libraries/cmake/source/augeas/src.url' "$srcdir/augeas" git config -f .gitmodules 'submodule.libraries/cmake/source/smartmontools/src.url' "$srcdir/third-party-smartmontools" git config -f .gitmodules 'submodule.libraries/cmake/source/berkeley-db/src.url' "$srcdir/third-party-berkeley-db" git config -f .gitmodules 'submodule.libraries/cmake/source/librpm/src.url' "$srcdir/rpm" git config -f .gitmodules 'submodule.libraries/cmake/source/popt/src.url' "$srcdir/third-party-popt" git config -f .gitmodules 'submodule.libraries/cmake/source/libdpkg/src.url' "$srcdir/third-party-libdpkg" git config -f .gitmodules 'submodule.libraries/cmake/source/libaudit/src.url' "$srcdir/audit-userspace" git config -f .gitmodules 'submodule.libraries/cmake/source/libelfin/src.url' "$srcdir/libelfin" git config -f .gitmodules 'submodule.libraries/cmake/source/libgcrypt/src.url' "$srcdir/third-party-libgcrypt" git config -f .gitmodules 'submodule.libraries/cmake/source/libgpg-error/src.url' "$srcdir/third-party-libgpg-error" git config -f .gitmodules 'submodule.libraries/cmake/source/libcryptsetup/src.url' "$srcdir/cryptsetup" git config -f .gitmodules 'submodule.libraries/cmake/source/libdevmapper/src.url' "$srcdir/lvm2" git config -f .gitmodules 'submodule.libraries/cmake/source/libiptables/src.url' "$srcdir/third-party-iptables" git config -f .gitmodules 'submodule.libraries/cmake/source/librdkafka/src.url' "$srcdir/librdkafka" git config -f .gitmodules 'submodule.libraries/cmake/source/lldpd/src.url' "$srcdir/lldpd" git config -f .gitmodules 'submodule.libraries/cmake/source/googletest/src.url' "$srcdir/googletest" git config -f .gitmodules 'submodule.libraries/cmake/source/glog/src.url' "$srcdir/glog" git config -f .gitmodules 'submodule.libraries/cmake/source/gflags/src.url' "$srcdir/gflags" git config -f .gitmodules 'submodule.libraries/cmake/source/aws-sdk-cpp/aws-c-common_src.url' "$srcdir/aws-c-common" git config -f .gitmodules 'submodule.libraries/cmake/source/aws-sdk-cpp/aws-c-event-stream_src.url' "$srcdir/aws-c-event-stream" git config -f .gitmodules 'submodule.libraries/cmake/source/aws-sdk-cpp/aws-checksums_src.url' "$srcdir/aws-checksums" git config -f .gitmodules 'submodule.libraries/cmake/source/aws-sdk-cpp/aws-sdk-cpp_src.url' "$srcdir/aws-sdk-cpp" git config -f .gitmodules 'submodule.libraries/cmake/source/boost/src.url' "$srcdir/boost" git config -f .gitmodules 'submodule.libraries/cmake/source/icu/src.url' "$srcdir/icu" git config -f .gitmodules 'submodule.libraries/cmake/source/augeas/gnulib/src.url' "$srcdir/third-party-gnulib" git config -f .gitmodules 'submodule.libraries/cmake/source/ebpfpub/src.url' "$srcdir/ebpfpub" git config -f .gitmodules 'submodule.libraries/cmake/source/dbus/src.url' "$srcdir/dbus" git config -f .gitmodules 'submodule.libraries/cmake/source/expat/src.url' "$srcdir/libexpat" git config -f .gitmodules 'submodule.libraries/cmake/source/libcap/src.url' "$srcdir/libcap" git submodule sync git submodule update cd "$srcdir/osquery/libraries/cmake/source/boost/src" git submodule init git config -f .gitmodules 'submodule.system.url' "$srcdir/system" git config -f .gitmodules 'submodule.multi_array.url' "$srcdir/multi_array" git config -f .gitmodules 'submodule.math.url' "$srcdir/math" git config -f .gitmodules 'submodule.smart_ptr.url' "$srcdir/smart_ptr" git config -f .gitmodules 'submodule.parameter.url' "$srcdir/parameter" git config -f .gitmodules 'submodule.algorithm.url' "$srcdir/algorithm" git config -f .gitmodules 'submodule.any.url' "$srcdir/any" git config -f .gitmodules 'submodule.concept_check.url' "$srcdir/concept_check" git config -f .gitmodules 'submodule.python.url' "$srcdir/python" git config -f .gitmodules 'submodule.tti.url' "$srcdir/tti" git config -f .gitmodules 'submodule.functional.url' "$srcdir/functional" git config -f .gitmodules 'submodule.config.url' "$srcdir/config" git config -f .gitmodules 'submodule.log.url' "$srcdir/log" git config -f .gitmodules 'submodule.interprocess.url' "$srcdir/interprocess" git config -f .gitmodules 'submodule.exception.url' "$srcdir/exception" git config -f .gitmodules 'submodule.foreach.url' "$srcdir/foreach" git config -f .gitmodules 'submodule.spirit.url' "$srcdir/spirit" git config -f .gitmodules 'submodule.io.url' "$srcdir/io" git config -f .gitmodules 'submodule.disjoint_sets.url' "$srcdir/disjoint_sets" git config -f .gitmodules 'submodule.units.url' "$srcdir/units" git config -f .gitmodules 'submodule.preprocessor.url' "$srcdir/preprocessor" git config -f .gitmodules 'submodule.format.url' "$srcdir/format" git config -f .gitmodules 'submodule.xpressive.url' "$srcdir/xpressive" git config -f .gitmodules 'submodule.integer.url' "$srcdir/integer" git config -f .gitmodules 'submodule.thread.url' "$srcdir/thread" git config -f .gitmodules 'submodule.tokenizer.url' "$srcdir/tokenizer" git config -f .gitmodules 'submodule.timer.url' "$srcdir/timer" git config -f .gitmodules 'submodule.inspect.url' "$srcdir/inspect" git config -f .gitmodules 'submodule.boostbook.url' "$srcdir/boostbook" git config -f .gitmodules 'submodule.regex.url' "$srcdir/regex" git config -f .gitmodules 'submodule.crc.url' "$srcdir/crc" git config -f .gitmodules 'submodule.random.url' "$srcdir/random" git config -f .gitmodules 'submodule.serialization.url' "$srcdir/serialization" git config -f .gitmodules 'submodule.test.url' "$srcdir/test" git config -f .gitmodules 'submodule.date_time.url' "$srcdir/date_time" git config -f .gitmodules 'submodule.logic.url' "$srcdir/logic" git config -f .gitmodules 'submodule.graph.url' "$srcdir/graph" git config -f .gitmodules 'submodule.numeric_conversion.url' "$srcdir/numeric_conversion" git config -f .gitmodules 'submodule.lambda.url' "$srcdir/lambda" git config -f .gitmodules 'submodule.mpl.url' "$srcdir/mpl" git config -f .gitmodules 'submodule.typeof.url' "$srcdir/typeof" git config -f .gitmodules 'submodule.tuple.url' "$srcdir/tuple" git config -f .gitmodules 'submodule.utility.url' "$srcdir/utility" git config -f .gitmodules 'submodule.dynamic_bitset.url' "$srcdir/dynamic_bitset" git config -f .gitmodules 'submodule.assign.url' "$srcdir/assign" git config -f .gitmodules 'submodule.filesystem.url' "$srcdir/filesystem" git config -f .gitmodules 'submodule.function.url' "$srcdir/function" git config -f .gitmodules 'submodule.conversion.url' "$srcdir/conversion" git config -f .gitmodules 'submodule.optional.url' "$srcdir/optional" git config -f .gitmodules 'submodule.property_tree.url' "$srcdir/property_tree" git config -f .gitmodules 'submodule.bimap.url' "$srcdir/bimap" git config -f .gitmodules 'submodule.variant.url' "$srcdir/variant" git config -f .gitmodules 'submodule.array.url' "$srcdir/array" git config -f .gitmodules 'submodule.iostreams.url' "$srcdir/iostreams" git config -f .gitmodules 'submodule.multi_index.url' "$srcdir/multi_index" git config -f .gitmodules 'submodule.bcp.url' "$srcdir/bcp" git config -f .gitmodules 'submodule.ptr_container.url' "$srcdir/ptr_container" git config -f .gitmodules 'submodule.statechart.url' "$srcdir/statechart" git config -f .gitmodules 'submodule.static_assert.url' "$srcdir/static_assert" git config -f .gitmodules 'submodule.range.url' "$srcdir/range" git config -f .gitmodules 'submodule.rational.url' "$srcdir/rational" git config -f .gitmodules 'submodule.iterator.url' "$srcdir/iterator" git config -f .gitmodules 'submodule.build.url' "$srcdir/build" git config -f .gitmodules 'submodule.quickbook.url' "$srcdir/quickbook" git config -f .gitmodules 'submodule.graph_parallel.url' "$srcdir/graph_parallel" git config -f .gitmodules 'submodule.property_map.url' "$srcdir/property_map" git config -f .gitmodules 'submodule.program_options.url' "$srcdir/program_options" git config -f .gitmodules 'submodule.detail.url' "$srcdir/detail" git config -f .gitmodules 'submodule.interval.url' "$srcdir/interval" git config -f .gitmodules 'submodule.ublas.url' "$srcdir/ublas" git config -f .gitmodules 'submodule.wave.url' "$srcdir/wave" git config -f .gitmodules 'submodule.type_traits.url' "$srcdir/type_traits" git config -f .gitmodules 'submodule.compatibility.url' "$srcdir/compatibility" git config -f .gitmodules 'submodule.bind.url' "$srcdir/bind" git config -f .gitmodules 'submodule.pool.url' "$srcdir/pool" git config -f .gitmodules 'submodule.proto.url' "$srcdir/proto" git config -f .gitmodules 'submodule.fusion.url' "$srcdir/fusion" git config -f .gitmodules 'submodule.function_types.url' "$srcdir/function_types" git config -f .gitmodules 'submodule.gil.url' "$srcdir/gil" git config -f .gitmodules 'submodule.intrusive.url' "$srcdir/intrusive" git config -f .gitmodules 'submodule.asio.url' "$srcdir/asio" git config -f .gitmodules 'submodule.uuid.url' "$srcdir/uuid" git config -f .gitmodules 'submodule.litre.url' "$srcdir/litre" git config -f .gitmodules 'submodule.circular_buffer.url' "$srcdir/circular_buffer" git config -f .gitmodules 'submodule.mpi.url' "$srcdir/mpi" git config -f .gitmodules 'submodule.unordered.url' "$srcdir/unordered" git config -f .gitmodules 'submodule.signals2.url' "$srcdir/signals2" git config -f .gitmodules 'submodule.accumulators.url' "$srcdir/accumulators" git config -f .gitmodules 'submodule.atomic.url' "$srcdir/atomic" git config -f .gitmodules 'submodule.scope_exit.url' "$srcdir/scope_exit" git config -f .gitmodules 'submodule.flyweight.url' "$srcdir/flyweight" git config -f .gitmodules 'submodule.icl.url' "$srcdir/icl" git config -f .gitmodules 'submodule.predef.url' "$srcdir/predef" git config -f .gitmodules 'submodule.chrono.url' "$srcdir/chrono" git config -f .gitmodules 'submodule.polygon.url' "$srcdir/polygon" git config -f .gitmodules 'submodule.msm.url' "$srcdir/msm" git config -f .gitmodules 'submodule.heap.url' "$srcdir/heap" git config -f .gitmodules 'submodule.coroutine.url' "$srcdir/coroutine" git config -f .gitmodules 'submodule.coroutine2.url' "$srcdir/coroutine2" git config -f .gitmodules 'submodule.ratio.url' "$srcdir/ratio" git config -f .gitmodules 'submodule.odeint.url' "$srcdir/odeint" git config -f .gitmodules 'submodule.geometry.url' "$srcdir/geometry" git config -f .gitmodules 'submodule.phoenix.url' "$srcdir/phoenix" git config -f .gitmodules 'submodule.move.url' "$srcdir/move" git config -f .gitmodules 'submodule.locale.url' "$srcdir/locale" git config -f .gitmodules 'submodule.auto_index.url' "$srcdir/auto_index" git config -f .gitmodules 'submodule.container.url' "$srcdir/container" git config -f .gitmodules 'submodule.local_function.url' "$srcdir/local_function" git config -f .gitmodules 'submodule.context.url' "$srcdir/context" git config -f .gitmodules 'submodule.type_erasure.url' "$srcdir/type_erasure" git config -f .gitmodules 'submodule.multiprecision.url' "$srcdir/multiprecision" git config -f .gitmodules 'submodule.lockfree.url' "$srcdir/lockfree" git config -f .gitmodules 'submodule.assert.url' "$srcdir/assert" git config -f .gitmodules 'submodule.align.url' "$srcdir/align" git config -f .gitmodules 'submodule.type_index.url' "$srcdir/type_index" git config -f .gitmodules 'submodule.core.url' "$srcdir/core" git config -f .gitmodules 'submodule.throw_exception.url' "$srcdir/throw_exception" git config -f .gitmodules 'submodule.winapi.url' "$srcdir/winapi" git config -f .gitmodules 'submodule.boostdep.url' "$srcdir/boostdep" git config -f .gitmodules 'submodule.lexical_cast.url' "$srcdir/lexical_cast" git config -f .gitmodules 'submodule.sort.url' "$srcdir/sort" git config -f .gitmodules 'submodule.convert.url' "$srcdir/convert" git config -f .gitmodules 'submodule.endian.url' "$srcdir/endian" git config -f .gitmodules 'submodule.vmd.url' "$srcdir/vmd" git config -f .gitmodules 'submodule.dll.url' "$srcdir/dll" git config -f .gitmodules 'submodule.compute.url' "$srcdir/compute" git config -f .gitmodules 'submodule.hana.url' "$srcdir/hana" git config -f .gitmodules 'submodule.metaparse.url' "$srcdir/metaparse" git config -f .gitmodules 'submodule.qvm.url' "$srcdir/qvm" git config -f .gitmodules 'submodule.fiber.url' "$srcdir/fiber" git config -f .gitmodules 'submodule.process.url' "$srcdir/process" git config -f .gitmodules 'submodule.stacktrace.url' "$srcdir/stacktrace" git config -f .gitmodules 'submodule.poly_collection.url' "$srcdir/poly_collection" git config -f .gitmodules 'submodule.beast.url' "$srcdir/beast" git config -f .gitmodules 'submodule.mp11.url' "$srcdir/mp11" git config -f .gitmodules 'submodule.callable_traits.url' "$srcdir/callable_traits" git config -f .gitmodules 'submodule.contract.url' "$srcdir/contract" git config -f .gitmodules 'submodule.check_build.url' "$srcdir/check_build" git config -f .gitmodules 'submodule.container_hash.url' "$srcdir/container_hash" git config -f .gitmodules 'submodule.hof.url' "$srcdir/hof" git config -f .gitmodules 'submodule.yap.url' "$srcdir/yap" git config -f .gitmodules 'submodule.safe_numerics.url' "$srcdir/safe_numerics" git config -f .gitmodules 'submodule.parameter_python.url' "$srcdir/parameter_python" git config -f .gitmodules 'submodule.headers.url' "$srcdir/headers" git config -f .gitmodules 'submodule.boost_install.url' "$srcdir/boost_install" git config -f .gitmodules 'submodule.outcome.url' "$srcdir/outcome" git config -f .gitmodules 'submodule.histogram.url' "$srcdir/histogram" git submodule sync git submodule update cd "$srcdir/osquery/libraries/cmake/source/lldpd/src" git submodule init git config -f .gitmodules 'submodule.libevent.url' "$srcdir/libevent" git submodule sync git submodule update cd "$srcdir/osquery" patch -p1 < ../fix_compile_errors.patch } build() { cd osquery # disable BPF feature as it requires custom prebuilt toolchain with LLVMebpf libraries linked against libc++ CC=clang CXX=clang++ cmake \ -DCMAKE_BUILD_TYPE=Release -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 DESTDIR="${pkgdir}" ninja -C build install install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" rm -r "$pkgdir/etc/init.d/" }