Index: head/sysutils/osquery/Makefile =================================================================== --- head/sysutils/osquery/Makefile (revision 386685) +++ head/sysutils/osquery/Makefile (revision 386686) @@ -1,81 +1,81 @@ # Created by: Ryan Steinmetz # $FreeBSD$ PORTNAME= osquery PORTVERSION= 1.4.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= GH:ghc \ https://codeload.github.com/${PORTNAME}/third-party/tar.gz/${PORTVERSION}?dummy=/:gh DISTFILES= ${DISTNAME}.tar.gz:ghc \ third-party-${PORTVERSION}.tar.gz:gh MAINTAINER= zi@FreeBSD.org COMMENT= SQL powered OS instrumentation, monitoring, and analytics LICENSE= BSD3CLAUSE BUILD_DEPENDS= snappy>0:${PORTSDIR}/archivers/snappy \ rocksdb>0:${PORTSDIR}/databases/rocksdb \ thrift>0:${PORTSDIR}/devel/thrift \ thrift-cpp>0:${PORTSDIR}/devel/thrift-cpp \ bash>0:${PORTSDIR}/shells/bash \ yara>0:${PORTSDIR}/security/yara \ doxygen:${PORTSDIR}/devel/doxygen \ ${PYTHON_PKGNAMEPREFIX}MarkupSafe>0:${PORTSDIR}/textproc/py-MarkupSafe \ ${PYTHON_PKGNAMEPREFIX}psutil>0:${PORTSDIR}/sysutils/py-psutil \ ${PYTHON_PKGNAMEPREFIX}argparse>0:${PORTSDIR}/devel/py-argparse \ ${PYTHON_PKGNAMEPREFIX}pexpect>0:${PORTSDIR}/misc/py-pexpect \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:${PORTSDIR}/devel/py-Jinja2 \ ${PYTHON_PKGNAMEPREFIX}thrift>0:${PORTSDIR}/devel/py-thrift \ ${PYTHON_PKGNAMEPREFIX}pip>0:${PORTSDIR}/devel/py-pip LIB_DEPENDS= libboost_regex.so:${PORTSDIR}/devel/boost-libs \ libgflags.so:${PORTSDIR}/devel/gflags \ libicuuc.so:${PORTSDIR}/devel/icu USES= cmake:outsource gmake libtool python:build compiler:c++11-lib CMAKE_ENV+= OSQUERY_BUILD_VERSION="${PORTVERSION}" HOME="${WRKDIR}" SKIP_TESTS="yes" CMAKE_ARGS+= -DFREEBSD=awesome -DCMAKE_SYSTEM_NAME="FreeBSD" BLDDIR= ${WRKDIR}/.build/${PORTNAME} USE_RC_SUBR= ${PORTNAME}d USE_GITHUB= yes GH_ACCOUNT= facebook MAKE_JOBS_UNSAFE= yes .include .if ${OSVERSION} <= 1000000 CFLAGS+= -D_GLIBCXX_USE_C99 .endif post-extract: ${RMDIR} ${WRKSRC}/third-party ${LN} -sf ${WRKDIR}/third-party-${PORTVERSION} ${WRKSRC}/third-party post-patch: ${REINPLACE_CMD} -e 's|/var/osquery|/var/db/osquery|g' \ ${WRKSRC}/osquery/core/init.cpp ${REINPLACE_CMD} -e 's|/var/osquery/osquery.em|/var/run/osquery.em|g' \ -e 's|/etc/osquery/extensions.load|${PREFIX}/etc/osquery.extensions|g' \ -e 's|/etc/osquery/modules.load|${PREFIX}/etc/osquery.modules|g' \ ${WRKSRC}/osquery/extensions/extensions.cpp ${REINPLACE_CMD} -e 's|/var/osquery/osquery.conf|${PREFIX}/etc/osquery.conf|g' \ ${WRKSRC}/osquery/config/plugins/filesystem.cpp ${REINPLACE_CMD} -e 's|/var/osquery/|/var/db/osquery/|g' \ ${WRKSRC}/tools/deployment/osquery.example.conf ${REINPLACE_CMD} -e 's|python |${PYTHON_CMD} |g' \ ${WRKSRC}/CMake/CMakeLibs.cmake \ ${WRKSRC}/CMakeLists.txt do-install: ${INSTALL_PROGRAM} ${BLDDIR}/osqueryi ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${BLDDIR}/osqueryd ${STAGEDIR}${PREFIX}/sbin ${INSTALL_DATA} ${BLDDIR}/libosquery.a ${STAGEDIR}${PREFIX}/lib (cd ${WRKSRC}/include && ${COPYTREE_SHARE} ${PORTNAME} ${STAGEDIR}${PREFIX}/include) ${INSTALL_DATA} ${WRKSRC}/tools/deployment/osquery.example.conf \ ${STAGEDIR}${PREFIX}/etc/osquery.conf.sample post-stage: ${MKDIR} ${STAGEDIR}/var/db/osquery .include Index: head/sysutils/osquery/files/patch-osquery_tables_specs_blacklist =================================================================== --- head/sysutils/osquery/files/patch-osquery_tables_specs_blacklist (revision 386685) +++ head/sysutils/osquery/files/patch-osquery_tables_specs_blacklist (revision 386686) @@ -1,40 +1,40 @@ --- osquery/tables/specs/blacklist.orig 2015-05-05 00:16:41 UTC +++ osquery/tables/specs/blacklist @@ -1,4 +1,36 @@ # osquery/tables/specs/blacklist # Usage: add table spec names to this list to prevent table generation # Example: add tables that are not yet ready for release - +# Example: add a platform:table_name, which is not yet ready +freebsd:acpi_tables +freebsd:arp_cache +freebsd:block_devices +freebsd:chrome_extensions +freebsd:disk_encryption +freebsd:file_events +freebsd:firefox_addons +#freebsd:groups +freebsd:hardware_events +#freebsd:interface_addresses +#freebsd:interface_details +freebsd:kernel_info +freebsd:last +#freebsd:listening_ports -+freebsd:mounts ++#freebsd:mounts +freebsd:opera_extensions +freebsd:os_version +freebsd:passwd_changes +freebsd:pci_devices +freebsd:process_envs +freebsd:process_memory_map +freebsd:process_open_files +freebsd:process_open_sockets +freebsd:processes +freebsd:routes +freebsd:system_controls +freebsd:usb_devices +#freebsd:users +freebsd:yara_events +freebsd:yara +freebsd:system_controls +freebsd:smbios_tables Index: head/sysutils/osquery/files/patch-osquery_tables_system_freebsd_mounts.cpp =================================================================== --- head/sysutils/osquery/files/patch-osquery_tables_system_freebsd_mounts.cpp (nonexistent) +++ head/sysutils/osquery/files/patch-osquery_tables_system_freebsd_mounts.cpp (revision 386686) @@ -0,0 +1,57 @@ +--- osquery/tables/system/freebsd/mounts.cpp.orig 2015-05-18 14:14:18 UTC ++++ osquery/tables/system/freebsd/mounts.cpp +@@ -0,0 +1,54 @@ ++/* ++ * Copyright (c) 2014, Facebook, Inc. ++ * All rights reserved. ++ * ++ * This source code is licensed under the BSD-style license found in the ++ * LICENSE file in the root directory of this source tree. An additional grant ++ * of patent rights can be found in the PATENTS file in the same directory. ++ * ++ */ ++ ++#include ++#include ++ ++#include ++ ++namespace osquery { ++namespace tables { ++ ++QueryData genMounts(QueryContext& context) { ++ QueryData results; ++ ++ struct statfs *mnt; ++ int mnts = 0; ++ int i; ++ char real_path[PATH_MAX]; ++ ++ mnts = getmntinfo(&mnt, MNT_WAIT); ++ if (mnts == 0) { ++ // Failed to get mount information. ++ return results; ++ } ++ ++ for (i = 0; i < mnts; i++) { ++ Row r; ++ r["path"] = TEXT(mnt[i].f_mntonname); ++ r["device"] = TEXT(mnt[i].f_mntfromname); ++ r["device_alias"] = std::string(realpath(mnt[i].f_mntfromname, real_path) ++ ? real_path ++ : mnt[i].f_mntfromname); ++ r["type"] = TEXT(mnt[i].f_fstypename); ++ r["flags"] = INTEGER(mnt[i].f_flags); ++ r["blocks"] = BIGINT(mnt[i].f_blocks); ++ r["blocks_free"] = BIGINT(mnt[i].f_bfree); ++ r["blocks_available"] = BIGINT(mnt[i].f_bavail); ++ r["blocks_size"] = BIGINT(mnt[i].f_bsize); ++ r["inodes"] = BIGINT(mnt[i].f_files); ++ r["inodes_free"] = BIGINT(mnt[i].f_ffree); ++ r["owner"] = INTEGER(mnt[i].f_owner); ++ results.push_back(r); ++ } ++ return results; ++} ++} ++} Property changes on: head/sysutils/osquery/files/patch-osquery_tables_system_freebsd_mounts.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property