{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/23746","labels_url":"https://api.github.com/repos/saltstack/salt/issues/23746/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/23746/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/23746/events","html_url":"https://github.com/saltstack/salt/issues/23746","id":76498406,"number":23746,"title":"pkg.install is failing in FreeBSD 10.1","user":{"login":"amontalban","id":941928,"avatar_url":"https://avatars.githubusercontent.com/u/941928?v=3","gravatar_id":"","url":"https://api.github.com/users/amontalban","html_url":"https://github.com/amontalban","followers_url":"https://api.github.com/users/amontalban/followers","following_url":"https://api.github.com/users/amontalban/following{/other_user}","gists_url":"https://api.github.com/users/amontalban/gists{/gist_id}","starred_url":"https://api.github.com/users/amontalban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amontalban/subscriptions","organizations_url":"https://api.github.com/users/amontalban/orgs","repos_url":"https://api.github.com/users/amontalban/repos","events_url":"https://api.github.com/users/amontalban/events{/privacy}","received_events_url":"https://api.github.com/users/amontalban/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-14T21:37:09Z","updated_at":"2015-05-15T14:08:49Z","closed_at":null,"body":"Hey guys,\r\n\r\nI'm moving our states from ports to packages so we can improve run time when deploying new servers, so I do something like this:\r\n\r\n  {% if grains['os'] == 'FreeBSD' %}\r\n    {% set p5_crypt_des_pkg = 'p5-crypt-des' %}\r\n  {% elif grains['os'] == 'Ubuntu' %}\r\n    {% set p5_crypt_des_pkg = 'libcrypt-des-perl' %}\r\n  {% endif %}\r\n \r\n  p5-Crypt-DES:\r\n    pkg.installed:\r\n      - name: {{ p5_crypt_des_pkg }}\r\n\r\nBut this generates the following log:\r\n\r\n[DEBUG   ] Refreshing modules...\r\n[INFO    ] Loading fresh modules for state activity\r\n[INFO    ] Executing command '/sbin/zfs help' in directory '/root'\r\n[INFO    ] Completed state [p5-crypt-cbc] at time 21:01:40.573509\r\n[INFO    ] Running state [p5-crypt-des] at time 21:01:40.574377\r\n[INFO    ] Executing state pkg.installed for p5-crypt-des\r\n[INFO    ] Executing command 'pkg install  -y p5-crypt-des' in directory '/root'\r\n[INFO    ] Executing command 'pkg info -ao' in directory '/root'\r\n[ERROR   ] Installed Packages:\r\np5-Crypt-DES changed from absent to 2.07_1\r\n\r\nAnd therefore the whole highstate is full of ERRORs.\r\n\r\nHere is my versions report:\r\n\r\nroot@freebsd-10:~ # salt-call --versions-report\r\n           Salt: 2014.7.5\r\n         Python: 2.7.9 (default, Apr  8 2015, 15:12:41)\r\n         Jinja2: 2.7.3\r\n       M2Crypto: 0.22\r\n msgpack-python: 0.4.2\r\n   msgpack-pure: Not Installed\r\n       pycrypto: 2.6.1\r\n        libnacl: Not Installed\r\n         PyYAML: 3.11\r\n          ioflo: Not Installed\r\n          PyZMQ: 14.5.0\r\n           RAET: Not Installed\r\n            ZMQ: 4.0.5\r\n           Mako: Not Installed\r\n\r\nFreeBSD freebsd-10.1-amd64 10.1-RELEASE-p10 FreeBSD 10.1-RELEASE-p10 #0: Wed May 13 06:54:13 UTC 2015     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64\r\n\r\nI have Googled around and another user reported this in #1966 but that's a super old ticket.\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/102409321","html_url":"https://github.com/saltstack/salt/issues/23746#issuecomment-102409321","issue_url":"https://api.github.com/repos/saltstack/salt/issues/23746","id":102409321,"user":{"login":"amontalban","id":941928,"avatar_url":"https://avatars.githubusercontent.com/u/941928?v=3","gravatar_id":"","url":"https://api.github.com/users/amontalban","html_url":"https://github.com/amontalban","followers_url":"https://api.github.com/users/amontalban/followers","following_url":"https://api.github.com/users/amontalban/following{/other_user}","gists_url":"https://api.github.com/users/amontalban/gists{/gist_id}","starred_url":"https://api.github.com/users/amontalban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amontalban/subscriptions","organizations_url":"https://api.github.com/users/amontalban/orgs","repos_url":"https://api.github.com/users/amontalban/repos","events_url":"https://api.github.com/users/amontalban/events{/privacy}","received_events_url":"https://api.github.com/users/amontalban/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T14:08:49Z","updated_at":"2015-05-15T14:08:49Z","body":"I think I found what's the problem and it's related on how Saltstack manage packages with capital letters.\r\n\r\nFor instance:\r\n```\r\n{% if grains['os'] == 'FreeBSD' %}\r\n  {% set p5_crypt_des_pkg = 'p5-crypt-des' %}\r\n{% elif grains['os'] == 'Ubuntu' %}\r\n  {% set p5_crypt_des_pkg = 'libcrypt-des-perl' %}\r\n{% endif %}\r\np5-Crypt-DES:\r\n  pkg.installed:\r\n    - name: {{ p5_crypt_des_pkg }}\r\n```\r\nThat installs package **p5-Crypt-DES** but output an error, however this code works ok:\r\n```\r\n{% if grains['os'] == 'FreeBSD' %}\r\n  {% set p5_crypt_des_pkg = 'p5-Crypt-DES' %}\r\n{% elif grains['os'] == 'Ubuntu' %}\r\n  {% set p5_crypt_des_pkg = 'libcrypt-des-perl' %}\r\n{% endif %}\r\np5-Crypt-DES:\r\n  pkg.installed:\r\n    - name: {{ p5_crypt_des_pkg }}\r\n```\r\nSo I think Saltstack implementation of pkg is looking for exact match and not case insensitive, because FBSD pkg works with both cases.\r\n\r\n@cedwards what do you think? I'm respecting FreeBSD guidelines by using low case package names or should I use the exact case match?\r\n\r\nThanks!"}}