The pkg_version explorer will fail to properly detect if a package
is installed when a package's name is present in the description of
a package (as returned by pkg_info).
Currently, trying to install libtool fails due to incorrect parsing:
$ pkg_info | grep libtool
libltdl-2.4.2p1 GNU libtool system independent dlopen wrapper
Additionally, trying to install nagios results in the following output:
$ pkg_info | grep nagios
nagios-4.0.8p3-chroot host and service monitor
nagios-web-4.0.8p2-chroot cgis and webpages for nagios
This commit fixes detection by properly parsing pkg_info's output.
Specifically, descriptions are ignored and package names are properly
extracted.
In 6.1, OpenBSD introduced installurl(5), which contains
the URL the sets where installed from during install or upgrade.
The content of this file is used by pkg_add(1) if PKG_PATH is
not defined.
This commit changes the behavior of __package_pkg_openbsd to omit
setting PKG_PATH to a hard-coded value if --pkg_path is not provided.
This, in turn, makes pkg_add(1) use installurl(5).
Warning: apt-key output should not be parsed (stdout is not a terminal)
on stderr. Redirect stderr of apt-key to /dev/null to prevent output in
cdist run.
getent(1) is a utility available where Name Service Switch (NSS)
is available. Many modern operating systems support it, but that
may not be the case of all (e.g. embedded systems).
This commit modifies the __user type explorers to check the
traditional files instead of relying solely on the availability
of getent(1).
- Makes the group explorer use /etc/group
- Makes the passwd explorer use /etc/passwd
- Makes the shadow explorer use /etc/shadow
Implementation note
"getent shadow" does not support querying an entry using a uid
since it does not store that information. Since the shadow explorer
uses __object_id, the passwd explorer does not check if __object_id
matches an entry by uid. This behavior ensures consistent, transparent
behavior of the type. The group explorer, on the other hand, handles
group names and uids; like always.