{"action":"created","issue":{"url":"https://api.github.com/repos/jordansissel/fpm/issues/900","labels_url":"https://api.github.com/repos/jordansissel/fpm/issues/900/labels{/name}","comments_url":"https://api.github.com/repos/jordansissel/fpm/issues/900/comments","events_url":"https://api.github.com/repos/jordansissel/fpm/issues/900/events","html_url":"https://github.com/jordansissel/fpm/issues/900","id":69039792,"number":900,"title":"--exclude doesn't seem to work","user":{"login":"FlorinAndrei","id":901867,"avatar_url":"https://avatars.githubusercontent.com/u/901867?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorinAndrei","html_url":"https://github.com/FlorinAndrei","followers_url":"https://api.github.com/users/FlorinAndrei/followers","following_url":"https://api.github.com/users/FlorinAndrei/following{/other_user}","gists_url":"https://api.github.com/users/FlorinAndrei/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorinAndrei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorinAndrei/subscriptions","organizations_url":"https://api.github.com/users/FlorinAndrei/orgs","repos_url":"https://api.github.com/users/FlorinAndrei/repos","events_url":"https://api.github.com/users/FlorinAndrei/events{/privacy}","received_events_url":"https://api.github.com/users/FlorinAndrei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-17T01:02:58Z","updated_at":"2015-07-16T17:56:38Z","closed_at":null,"body":"CentOS 7, minimal install. Make sure the ruby packages are NOT installed. Enable the Sensu repo following these instructions: http://sensuapp.org/docs/latest/install-repositories\r\n\r\nRun \"yum install sensu\". Enable the path to the embedded Ruby in Sensu:\r\n\r\n```\r\n$ export PATH=/opt/sensu/embedded/bin:$PATH\r\n$ which gem\r\n/opt/sensu/embedded/bin/gem\r\n```\r\n\r\nTry and build the sys-filesystem gem:\r\n\r\n```\r\nfpm -s gem -t rpm --iteration 1.el7 --epoch 1 \\\r\n    --depends sensu \\\r\n    --provides \"rubygem(ffi)\" \\\r\n    --license GPL --maintainer \"A <a@b.com>\" \\\r\n    --vendor tech@b.com --url \"https://github.com/djberg96/sys-filesystem\" \\\r\n    --description \"A Ruby library for getting filesystem information\" \\\r\n    sys-filesystem\r\n```\r\n\r\n(the --provides line is technically wrong, but ffi is provided by the embedded Ruby in Sensu, and this gem depends on Sensu and will always be installed with Sensu, so it's not a huge crime)\r\n\r\nIf $PATH is set correctly, the package will be built for the embedded Ruby in Sensu.\r\n\r\nWhen you install the generated package, it will conflict with Sensu:\r\n\r\n```\r\n# rpm -ivh rubygem-sys-filesystem-1.1.4-1.el7.noarch.rpm \r\nPreparing...                          ################################# [100%]\r\n\tfile /opt/sensu/embedded/lib/ruby/gems/2.0.0/build_info from install of rubygem-sys-filesystem-1:1.1.4-1.el7.noarch conflicts with file from package sensu-1:0.17.2-1.x86_64\r\n\tfile /opt/sensu/embedded/lib/ruby/gems/2.0.0/doc from install of rubygem-sys-filesystem-1:1.1.4-1.el7.noarch conflicts with file from package sensu-1:0.17.2-1.x86_64\r\n```\r\n\r\nSo rebuild the gem to exclude those paths:\r\n\r\n```\r\nfpm -s gem -t rpm --iteration 1.el7 --epoch 1 \\\r\n    --depends sensu \\\r\n    --exclude /opt/sensu/embedded/lib/ruby/gems/2.0.0/build_info \\\r\n    --exclude /opt/sensu/embedded/lib/ruby/gems/2.0.0/doc \\\r\n    --provides \"rubygem(ffi)\" \\\r\n    --license GPL --maintainer \"A <a@b.com>\" \\\r\n    --vendor tech@b.com --url \"https://github.com/djberg96/sys-filesystem\" \\\r\n    --description \"A Ruby library for getting filesystem information\" \\\r\n    sys-filesystem\r\n```\r\n\r\nBut if you look at the package, it still contains those paths:\r\n\r\n```\r\n$ rpm -qpl rubygem-sys-filesystem-1.1.4-1.el7.noarch.rpm \r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/build_info\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/cache/sys-filesystem-1.1.4.gem\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/doc\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/CHANGES\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/MANIFEST\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/README\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/Rakefile\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/examples/example_stat.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/sys/filesystem.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/unix/sys/filesystem.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/unix/sys/filesystem/constants.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/unix/sys/filesystem/functions.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/unix/sys/filesystem/structs.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/windows/sys/filesystem.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/windows/sys/filesystem/constants.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/windows/sys/filesystem/functions.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/lib/windows/sys/filesystem/helper.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/sys-filesystem.gemspec\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/test/test_sys_filesystem.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/test/test_sys_filesystem_unix.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sys-filesystem-1.1.4/test/test_sys_filesystem_windows.rb\r\n/opt/sensu/embedded/lib/ruby/gems/2.0.0/specifications/sys-filesystem-1.1.4.gemspec\r\n```\r\n\r\nIs there a way to exclude those files, other than using --edit?"},"comment":{"url":"https://api.github.com/repos/jordansissel/fpm/issues/comments/122035436","html_url":"https://github.com/jordansissel/fpm/issues/900#issuecomment-122035436","issue_url":"https://api.github.com/repos/jordansissel/fpm/issues/900","id":122035436,"user":{"login":"joshuabaird","id":6271918,"avatar_url":"https://avatars.githubusercontent.com/u/6271918?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuabaird","html_url":"https://github.com/joshuabaird","followers_url":"https://api.github.com/users/joshuabaird/followers","following_url":"https://api.github.com/users/joshuabaird/following{/other_user}","gists_url":"https://api.github.com/users/joshuabaird/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuabaird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuabaird/subscriptions","organizations_url":"https://api.github.com/users/joshuabaird/orgs","repos_url":"https://api.github.com/users/joshuabaird/repos","events_url":"https://api.github.com/users/joshuabaird/events{/privacy}","received_events_url":"https://api.github.com/users/joshuabaird/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T17:56:38Z","updated_at":"2015-07-16T17:56:38Z","body":"I am having the same problem..  '-x' is not excluding anything.  fpm-1.3.3 here."}}