bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch#
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen# Dependency management.
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen#
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen# Copyright (C) 2014 Red Hat
96308127e006bb3b1108093bcf4cc1fd9481cb7aTimo Sirainen#
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen# This program is free software; you can redistribute it and/or modify
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen# it under the terms of the GNU General Public License as published by
6b6011c2242e470b41316f92512b282b5e306dacTimo Sirainen# the Free Software Foundation; either version 3 of the License, or
636f017be100bce67d66fd3ae1544a47681efd33Timo Sirainen# (at your option) any later version.
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen#
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen# This program is distributed in the hope that it will be useful,
3d7828efd92ecc0d08049f727d9be0154d1d681bStephan Bosch# but WITHOUT ANY WARRANTY; without even the implied warranty of
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen# GNU General Public License for more details.
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen#
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen# You should have received a copy of the GNU General Public License
f41f6294f438bd16a35be64cef3bc90d2b66e0eaStephan Bosch# along with this program. If not, see <http://www.gnu.org/licenses/>.
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainenif [ -z ${_DEPS_SH+set} ]; then
f41f6294f438bd16a35be64cef3bc90d2b66e0eaStephan Boschdeclare -r _DEPS_SH=
f41f6294f438bd16a35be64cef3bc90d2b66e0eaStephan Bosch
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen. distro.sh
79c7e806276f4eab6a48ec5dcd5e7c1378aae246Aki Tuomi
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen# Dependency list
79c7e806276f4eab6a48ec5dcd5e7c1378aae246Aki Tuomideclare -a DEPS_LIST=(
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen lcov
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen valgrind
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen)
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen
b3523787a7c3b9e82fd9dfe9d1b4687a3b0000b0Timo Sirainen# "Integration tests dependencies satisfied" flag
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainendeclare DEPS_INTGCHECK_SATISFIED=true
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainenif [[ "$DISTRO_BRANCH" == -redhat-* ]]; then
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen declare _DEPS_LIST_SPEC
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen DEPS_LIST+=(
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen clang-analyzer
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen fakeroot
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libcmocka-devel
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen mock
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen nss_wrapper
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen openldap-clients
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen openldap-servers
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen pytest
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen python-ldap
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen python-psutil
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen pyldb
2e35ede0f3afa8b4528cc530a6efba239d77a022Timo Sirainen rpm-build
2e35ede0f3afa8b4528cc530a6efba239d77a022Timo Sirainen uid_wrapper
87dae9ffcd43023361019ca803709dbf5b8119bcTimo Sirainen python-requests
87dae9ffcd43023361019ca803709dbf5b8119bcTimo Sirainen curl-devel
87dae9ffcd43023361019ca803709dbf5b8119bcTimo Sirainen krb5-server
87dae9ffcd43023361019ca803709dbf5b8119bcTimo Sirainen krb5-workstation
87dae9ffcd43023361019ca803709dbf5b8119bcTimo Sirainen dbus-python
87dae9ffcd43023361019ca803709dbf5b8119bcTimo Sirainen python-pep8
2e35ede0f3afa8b4528cc530a6efba239d77a022Timo Sirainen )
2e35ede0f3afa8b4528cc530a6efba239d77a022Timo Sirainen _DEPS_LIST_SPEC=`
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainen sed -e 's/@PACKAGE_VERSION@/0/g' \
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainen -e 's/@PACKAGE_NAME@/package-name/g' \
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainen -e 's/@PRERELEASE_VERSION@//g' contrib/sssd.spec.in |
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainen rpm-spec-builddeps /dev/stdin`
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainen readarray -t -O "${#DEPS_LIST[@]}" DEPS_LIST <<<"$_DEPS_LIST_SPEC"
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainenfi
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainenif [[ "$DISTRO_BRANCH" == -debian-* ]]; then
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen DEPS_LIST+=(
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen autoconf
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainen automake
3d7828efd92ecc0d08049f727d9be0154d1d681bStephan Bosch autopoint
3d7828efd92ecc0d08049f727d9be0154d1d681bStephan Bosch check
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen cifs-utils
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen clang
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen dh-apparmor
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen dnsutils
16d8197506b63d2ca7e38447df9faf1612c1f288Timo Sirainen docbook-xml
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen docbook-xsl
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen gettext
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen krb5-config
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen libc-ares-dev
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen libcmocka-dev
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen libcollection-dev
3d7828efd92ecc0d08049f727d9be0154d1d681bStephan Bosch libdbus-1-dev
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen libdhash-dev
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen libglib2.0-dev
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libini-config-dev
0783364679d85752a759de55b3dfd108fc72d957Timo Sirainen libkeyutils-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libkrb5-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libldap2-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libldb-dev
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libltdl-dev
0783364679d85752a759de55b3dfd108fc72d957Timo Sirainen libnfsidmap-dev
0783364679d85752a759de55b3dfd108fc72d957Timo Sirainen libnl-3-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libnl-route-3-dev
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libnspr4-dev
eed56fe22f1fc61f2003d5e66373d03dacbc9aaaTimo Sirainen libnss3-dev
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen libpam0g-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libpcre3-dev
796d1ca5e01126f1328ac4cdec0c23491d0e3f10Timo Sirainen libpopt-dev
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen libsasl2-dev
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libselinux1-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libsemanage1-dev
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libsmbclient-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libsystemd-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libtalloc-dev
acfda38b75d0f0e899ef692fef01593bd56ed85eTimo Sirainen libtdb-dev
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libtevent-dev
82727bef77e1e3abf7ae1b46290503b7899d8d92Timo Sirainen libtool
acfda38b75d0f0e899ef692fef01593bd56ed85eTimo Sirainen libtool-bin
acfda38b75d0f0e899ef692fef01593bd56ed85eTimo Sirainen libxml2-utils
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen make
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen python-dev
3d7828efd92ecc0d08049f727d9be0154d1d681bStephan Bosch python3-dev
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen samba-dev
82727bef77e1e3abf7ae1b46290503b7899d8d92Timo Sirainen systemd
acfda38b75d0f0e899ef692fef01593bd56ed85eTimo Sirainen xml-core
acfda38b75d0f0e899ef692fef01593bd56ed85eTimo Sirainen xsltproc
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libssl-dev
fd42aa358abc9fbd8c25b7625cc2a1dc3ecbcffdTimo Sirainen fakeroot
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libnss-wrapper
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen libuid-wrapper
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen python-pytest
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen python-ldap
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen python-ldb
58c61ac5650583d21c891e61e051c614290d31fbTimo Sirainen python-requests
6b6011c2242e470b41316f92512b282b5e306dacTimo Sirainen python-psutil
6b6011c2242e470b41316f92512b282b5e306dacTimo Sirainen ldap-utils
6b6011c2242e470b41316f92512b282b5e306dacTimo Sirainen slapd
6b6011c2242e470b41316f92512b282b5e306dacTimo Sirainen systemtap-sdt-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen libhttp-parser-dev
6b6011c2242e470b41316f92512b282b5e306dacTimo Sirainen libjansson-dev
2a494f93f48424d391552a419ad8872fbc771eb5Timo Sirainen libcurl4-openssl-dev
2a494f93f48424d391552a419ad8872fbc771eb5Timo Sirainen krb5-kdc
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen krb5-admin-server
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen krb5-user
d609c2ffca2b61556980b46e1de2303c662ad0f7Timo Sirainen uuid-dev
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen dbus
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen python-dbus
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen pep8
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainen )
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen DEPS_INTGCHECK_SATISFIED=true
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainenfi
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen
291f1e54dcb8c7f38e5b78afc1eaf518e3756692Timo Sirainendeclare -a -r DEPS_LIST
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen# Install dependencies.
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainenfunction deps_install()
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen{
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen distro_pkg_install "${DEPS_LIST[@]}"
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen}
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen# Remove dependencies.
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainenfunction deps_remove()
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen{
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen distro_pkg_remove "${DEPS_LIST[@]}"
de0971aff3009fe6906c3631e8322908658a5e93Stephan Bosch}
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainenfi # _DEPS_SH
12e28ffc2655b6d0efce628eb7d93fa74fbd345bTimo Sirainen