chore: packages-check.sh: implement installed pkg detection in rhel/suse, use proper pkg names

This commit is contained in:
Stéphane Lesimple 2021-12-28 11:07:38 +00:00 committed by Stéphane Lesimple
parent 6694518ab5
commit da5cb3c232

View file

@ -73,12 +73,14 @@ elif echo "$DISTRO_LIKE" | grep -q -w rhel; then
sudo fping xz sqlite binutils acl gnupg2 rsync perl-DateTime \
perl-JSON-XS inotify-tools lsof curl perl-Term-ReadLine-Gnu \
perl-libwww-perl perl-Digest perl-Net-Server cryptsetup mosh \
expect openssh-server nc bash perl-CGI perl(Test::More) passwd \
expect openssh-server netcat bash perl-CGI perl-Test-Simple passwd \
cracklib-dicts perl-Time-Piece perl-Time-HiRes diffutils \
perl-Sys-Syslog pamtester google-authenticator qrencode-libs \
util-linux-user perl-LWP-Protocol-https findutils tar"
perl-LWP-Protocol-https findutils tar"
if [ "$DISTRO_VERSION_MAJOR" = 7 ]; then
wanted_list="$wanted_list fortune-mod coreutils"
wanted_list="$wanted_list fortune-mod coreutils util-linux"
else
wanted_list="$wanted_list util-linux-user"
fi
[ "$opt_syslogng" = 1 ] && wanted_list="$wanted_list syslog-ng"
[ "$opt_ttyrec" = 1 ] && wanted_list="$wanted_list ovh-ttyrec"
@ -109,19 +111,19 @@ elif echo "$DISTRO_LIKE" | grep -q -w rhel; then
exit 0
fi
installed="FIXME"
installed=$(rpm -qa --queryformat '%{NAME}\n')
install_cmd="yum install"
elif echo "$DISTRO_LIKE" | grep -q -w suse; then
wanted_list="perl-common-sense perl-JSON perl-Net-Netmask perl-Net-IP \
perl-Net-DNS perl-DBD-SQLite perl-TermReadKey perl-DateTime \
fortune sudo fping \
xz sqlite binutils acl gpg2 rsync \
perl-Net-DNS perl-DBD-SQLite perl-Term-ReadKey perl-DateTime \
fortune sudo fping perl perl-base \
xz sqlite3 binutils acl gpg2 rsync \
perl-JSON-XS inotify-tools lsof curl perl-TermReadLine-Gnu \
perl-libwww-perl perl-Digest perl-IO-Socket-SSL \
perl-Net-Server cryptsetup mosh expect openssh \
coreutils netcat-openbsd bash perl-CGI iputils \
perl-Time-HiRes perl-Unix-Syslog hostname perl-LWP-Protocol-https"
wanted_list="$wanted_list google-authenticator-libpam tar"
perl-Time-HiRes perl-Unix-Syslog hostname perl-LWP-Protocol-https \
google-authenticator-libpam tar"
[ "$opt_syslogng" = 1 ] && wanted_list="$wanted_list syslog-ng"
[ "$opt_ttyrec" = 1 ] && wanted_list="$wanted_list ovh-ttyrec"
[ "$opt_supervisor" = 1 ] && wanted_list="$wanted_list python-supervisor python-setuptools"
@ -136,7 +138,7 @@ elif echo "$DISTRO_LIKE" | grep -q -w suse; then
exit $?
fi
installed="FIXME"
installed=$(rpm -qa --queryformat '%{NAME}\n')
install_cmd="zypper install"
elif [ "$OS_FAMILY" = FreeBSD ]; then
wanted_list="base64 coreutils rsync bash sudo pamtester p5-JSON p5-JSON-XS gnupg \