Title
#core
t

timb

12/04/2019, 4:10 AM
it looks the 4.1.1 RPM no longer includes a post-install script; is this intentional?
4:13 AM
4.0.2 did, fwiw
4:26 AM
if i had to guess i'd say 4.0.2 was built w/ the FPM based stuff (tools/deployment/make_linux_package.sh) which does include the --post-install flag, but it looks like packaging.cmake needs something along the lines of set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/tools/deployment/linux_postinstall.sh")
theopolis

theopolis

12/04/2019, 4:36 AM
good catch
t

timb

12/04/2019, 7:40 AM
i'll definitely test this out. i didn't check debs yet, thanks for that! BTW, i think you want CPACK_RPM_PACKAGE_RELEASE instead of CPACK_RPM_PACKAGE_RELEASE_DIST? i think cpack is actually ignoring this, because if you bump OSQUERY_RELEASE_VERSION the RPM will keep the same release; changing CPACK_RPM_PACKAGE_RELEASE_DIST to CPACK_RPM_PACKAGE_RELEASE fixes it
8:22 AM
so it looks like this works for RPMs! but it looks like debs are already fine (i am not a deb expert by any means, but
dpkg -e osquery_4.1.1_1.linux.amd64.deb
seems to show the postinst). i think the lines you're adding on 180 and 181 are already present on 128 and 129:https://github.com/osquery/osquery/blob/master/cmake/packaging.cmake#L128
8:23 AM
tbq i don't know why it works without
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/package/linux/postinst")
but i assume cpack is figuring that out on its own currently?