{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/3496","labels_url":"https://api.github.com/repos/chef/chef/issues/3496/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/3496/comments","events_url":"https://api.github.com/repos/chef/chef/issues/3496/events","html_url":"https://github.com/chef/chef/issues/3496","id":85655716,"number":3496,"title":"rpm_package silently fails on packages with a `~` character in the version","user":{"login":"irvingpop","id":1616328,"avatar_url":"https://avatars.githubusercontent.com/u/1616328?v=3","gravatar_id":"","url":"https://api.github.com/users/irvingpop","html_url":"https://github.com/irvingpop","followers_url":"https://api.github.com/users/irvingpop/followers","following_url":"https://api.github.com/users/irvingpop/following{/other_user}","gists_url":"https://api.github.com/users/irvingpop/gists{/gist_id}","starred_url":"https://api.github.com/users/irvingpop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irvingpop/subscriptions","organizations_url":"https://api.github.com/users/irvingpop/orgs","repos_url":"https://api.github.com/users/irvingpop/repos","events_url":"https://api.github.com/users/irvingpop/events{/privacy}","received_events_url":"https://api.github.com/users/irvingpop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-05T23:23:48Z","updated_at":"2015-06-08T17:00:05Z","closed_at":null,"body":"Recent packages created by Chef CI have a tilde character in the version, like so:  `supermarket-1.10.1~alpha.0-1.el5.x86_64.rpm`  - and installation of these is silently failing on Chef 12.3.0\r\n(note: I'm not 100% sure it is the tilde, but this is my best guess)\r\n\r\nGiven the following cookbook code:\r\n\r\n```ruby\r\ncase node['platform_family']\r\nwhen 'rhel'\r\n  package = 'https://web-dl.packagecloud.io/chef/stable/packages/el/5/supermarket-1.10.1~alpha.0-1.el5.x86_64.rpm'\r\nwhen 'debian'\r\n  package = 'https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/precise/supermarket_1.10.1~alpha.0-1_amd64.deb'\r\nend\r\n\r\npkgname = ::File.basename(package)\r\ncache_path = ::File.join(Chef::Config[:file_cache_path], pkgname)\r\n\r\nremote_file cache_path do\r\n  source package\r\n  mode '0644'\r\nend\r\n\r\nif node['platform_family'] == 'rhel'\r\n  rpm_package cache_path\r\n  execute 'rpm -qi supermarket'\r\nelsif node['platform_family'] == 'debian'\r\n  dpkg_package cache_path\r\n  execute 'dpkg -L supermarket'\r\nend\r\n```\r\n\r\nIt works correctly on Ubuntu, but on RHEL (tested on CentOS 5.11 and 6.6) the following happens:\r\n```\r\n           * rpm_package[supermarket] action install[2015-06-05T23:20:53+00:00] INFO: Processing rpm_package[supermarket] action install (/tmp/kitchen/cache/cookbooks/chef-server-ingredient/libraries/chef_server_ingredients_provider.rb line 62)\r\n       [2015-06-05T23:20:53+00:00] DEBUG: providers for generic rpm_package resource enabled on node include: [Chef::Provider::Package::Rpm]\r\n       [2015-06-05T23:20:53+00:00] DEBUG: providers that refused resource rpm_package[supermarket] were: []\r\n       [2015-06-05T23:20:53+00:00] DEBUG: providers that support resource rpm_package[supermarket] include: [Chef::Provider::Package::Rpm]\r\n       [2015-06-05T23:20:53+00:00] DEBUG: providers that survived replacement include: [Chef::Provider::Package::Rpm]\r\n       [2015-06-05T23:20:53+00:00] DEBUG: rpm_package[supermarket] checking rpm status\r\n       supermarket 1.10.1~alpha.0-1.el5\r\n       [2015-06-05T23:20:53+00:00] DEBUG: rpm_package[supermarket] checking install state\r\n       package supermarket is not installed\r\n       [2015-06-05T23:20:53+00:00] DEBUG: rpm_package[supermarket] supermarket not installed, installing \r\n       [2015-06-05T23:20:53+00:00] DEBUG: rpm_package[supermarket] is already installed - nothing to do\r\n        (up to date)\r\n            (up to date)\r\n```\r\n\r\n\r\nI can install the package manually and that works just fine:\r\n\r\n```\r\n[root@default-centos-511 cache]# rpm -ivh supermarket-1.10.1~alpha.0-1.el5.x86_64.rpm \r\nPreparing...                ########################################### [100%]\r\n   1:supermarket            ########################################### [100%]\r\n\r\nThank you for installing Supermarket!\r\n\r\nThe next step in the process is to run:\r\n\r\nsupermarket-ctl reconfigure\r\n\r\n[root@default-centos-511 cache]# \r\n[root@default-centos-511 cache]# rpm -qi supermarket\r\nName        : supermarket                  Relocations: / \r\nVersion     : 1.10.1~alpha.0                    Vendor: Omnibus <omnibus@getchef.com>\r\nRelease     : 1.el5                         Build Date: Mon 18 May 2015 08:04:01 PM UTC\r\nInstall Date: Fri 05 Jun 2015 09:05:47 PM UTC      Build Host: ip-10-194-12-70.us-west-2.compute.internal\r\nGroup       : default                       Source RPM: supermarket-1.10.1~alpha.0-1.el5.src.rpm\r\nSize        : 1141070737                       License: unknown\r\nSignature   : (none)\r\nPackager    : Chef Supermarket Team <supermarket@getchef.com>\r\nURL         : https://supermarket.getchef.com\r\nSummary     : The full stack of supermarket\r\nDescription :\r\nThe full stack of supermarket\r\n```"},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/110073335","html_url":"https://github.com/chef/chef/issues/3496#issuecomment-110073335","issue_url":"https://api.github.com/repos/chef/chef/issues/3496","id":110073335,"user":{"login":"irvingpop","id":1616328,"avatar_url":"https://avatars.githubusercontent.com/u/1616328?v=3","gravatar_id":"","url":"https://api.github.com/users/irvingpop","html_url":"https://github.com/irvingpop","followers_url":"https://api.github.com/users/irvingpop/followers","following_url":"https://api.github.com/users/irvingpop/following{/other_user}","gists_url":"https://api.github.com/users/irvingpop/gists{/gist_id}","starred_url":"https://api.github.com/users/irvingpop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irvingpop/subscriptions","organizations_url":"https://api.github.com/users/irvingpop/orgs","repos_url":"https://api.github.com/users/irvingpop/repos","events_url":"https://api.github.com/users/irvingpop/events{/privacy}","received_events_url":"https://api.github.com/users/irvingpop/received_events","type":"User","site_admin":false},"created_at":"2015-06-08T17:00:04Z","updated_at":"2015-06-08T17:00:04Z","body":"hey @schisamo totally agree with you.  I've worked up a fix here: https://github.com/chef/chef/pull/3503  and would appreciate if you could help me validate it"}}