kolide / launcher

Osquery launcher, autoupdater, and packager
https://kolide.com/launcher
Other
501 stars 99 forks source link

package-builder: add `--bin_root_dir` flag #1721

Closed tstromberg closed 1 month ago

tstromberg commented 1 month ago

This PR allows the Kolide Launcher to be deployed to Fedora SilverBlue, where /usr is read-only. To build for this platform, pass --bin_root_dir=/opt to ./build/package-builder.

Without this flag, Kolide fails to install on Silverblue with:

sudo rpm-ostree install zxkx_thomas-stromberg-0ac07b_kolide-launcher.rpm                                                         
...
Resolving dependencies... done
Relabeling... done
Checking out packages... done
error: Checkout launcher-kolide-k2-1.6.2-1.x86_64: opendir(local): No such file or directory

It turns out that on Silverblue, /usr/local is a symlink to ../var/usrlocal/, which makes rpm-ostree upset with life.

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

RebeccaMahany commented 1 month ago

Seems fine to me!

Setting the update_directory flag to an appropriate location (if /var/kolide-k2/<hostname>/updates isn't suitable) should solve the autoupdate issue as well.