sensu / sensu-omnibus

Build full-stack platform-specific Sensu packages
12 stars 16 forks source link

Fixes for Sensu Go packaging conflicts #291

Closed jspaleta closed 5 years ago

jspaleta commented 5 years ago

closes #290

Included in this branch

Test procedure for rpm conflicts:

  1. vagrant up centos
  2. vagrant ssh centos
  3. bundle install --binstubs --path vendor/bundle
  4. bundle exec omnibus build sensu
  5. get coffee
  6. install built rpm by omnibus in centos box
  7. install sensu-go-* packages in centos box
jspaleta commented 5 years ago

Note, rpmrebuild is a really handy tool to inspect binary rpm to see what file permissions are used for each file in the manifest. ex: rpmrebuild -pe sensu-1.6.2-3000.el7.x86_64.rpm

Will drop you into an editor view of the re-constructed rpm spec file. You can see which permissions are set for each included file. I used this to inpect the sensu core package and sensu-go packages to verify the directory permission differences that were conflicting.

amdprophet commented 5 years ago

Where did you copy the filesystem_list file from? We have been using our own in the sensu branch of https://github.com/sensu/omnibus.

jspaleta commented 5 years ago

I pulled it from upstream omnibus and added a few additional directories that sensu package should not own.

Specifically added /etc/default /etc/logrotate.d /etc/tmpfiles.d /lib/systemd /lib/systemd/system

sensu shouldnt be tracking the ownership/permission of these directories as they are used/owned by other packages provided by OS build trying to have them in the Sensu package manifest recipe for future build conflict.

I can remove the file from this PR and open up a PR against sensu/omnibus instead.

jspaleta commented 5 years ago

@amdprophet my file only has additive changes. 5 new directories to treat as owned by filesystem package.

diff -u omnibus/resources/rpm/filesystem_list sensu-omnibus/resources/sensu/rpm/filesystem_list --- omnibus/resources/rpm/filesystem_list 2019-01-28 11:51:00.965969629 -0900 +++ sensu-omnibus/resources/sensu/rpm/filesystem_list 2018-12-22 03:17:04.265538779 -0900 @@ -6,6 +6,8 @@ /boot /dev /etc +/etc/default +/etc/logrotate.d /etc/opt /etc/pki /etc/pm @@ -19,9 +21,12 @@ /etc/X11/fontpath.d /etc/xdg /etc/xdg/autostart +/etc/tmpfiles.d /etc/xinetd.d /home /lib +/lib/systemd +/lib/systemd/system /lib64 /lib64/tls /lib/modules