VirtualBox

source: vbox/trunk/tools/bin/prerequisites-rpm.sh@ 75141

Last change on this file since 75141 was 75115, checked in by vboxsync, 6 years ago

prerequisites-rpm.sh: add missing dependencies for a minimal Fedora26 chroot.
bugref: 9165: webtools: create scripts for (re-)creating chroot build jails

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1#!/bin/sh -e
2# @file
3## $Id: prerequisites-rpm.sh 75115 2018-10-26 19:03:32Z vboxsync $
4# Fetches prerequisites for RPM based GNU/Linux systems.
5#
6
7#
8# Copyright (C) 2018 Oracle Corporation
9#
10# This file is part of VirtualBox Open Source Edition (OSE), as
11# available from http://www.virtualbox.org. This file is free software;
12# you can redistribute it and/or modify it under the terms of the GNU
13# General Public License (GPL) as published by the Free Software
14# Foundation, in version 2 as it comes in the "COPYING" file of the
15# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17#
18
19# What this script does:
20usage_msg="\
21Usage: `basename ${0}` [--with-docs]
22
23Install the dependencies needed for building VirtualBox on an RPM-based Linux
24system. Additional distributions will be added as needed. There are no plans
25to add support for or to accept patches for distributions we do not package.
26The \`--with-docs\' parameter is to install the packages needed for building
27documentation. It will also be implemented per distribution as needed."
28
29# To repeat: there are no plans to add support for or to accept patches
30# for distributions we do not package.
31
32usage()
33{
34 echo "${usage_msg}"
35 exit "${1}"
36}
37
38unset WITHDOCS
39
40while test -n "${1}"; do
41 case "${1}" in
42 --with-docs)
43 WITHDOCS=1
44 shift ;;
45 -h|--help)
46 usage 0 ;;
47 *)
48 echo "Unknown parameter ${1}" >&2
49 usage 1 ;;
50 esac
51done
52
53export LC_ALL=C
54PATH=/sbin:/usr/sbin:$PATH
55
56# This list is valid for openSUSE 15.0
57PACKAGES_OPENSUSE="\
58bzip2 gcc-c++ glibc-devel gzip libcap-devel libcurl-devel libidl-devel \
59libxslt-devel libvpx-devel libXmu-devel make libopenssl-devel zlib-devel \
60pam-devel libpulse-devel python-devel rpm-build libSDL_ttf-devel \
61device-mapper-devel wget kernel-default-devel tar glibc-devel-32bit \
62libstdc++-devel-32bit libpng16-devel libqt5-qtx11extras-devel \
63libXcursor-devel libXinerama-devel libXrandr-devel alsa-devel gcc-c++-32bit \
64libQt5Widgets-devel libQt5OpenGL-devel libQt5PrintSupport-devel \
65libqt5-linguist libopus-devel"
66
67if test -f /etc/SUSE-brand; then
68 zypper install -y ${PACKAGES_OPENSUSE}
69 exit 0
70fi
71
72PACKAGES_EL="bzip2 gcc-c++ glibc-devel gzip libcap-devel libIDL-devel \
73 libxslt-devel libXmu-devel make openssl-devel pam-devel python-devel \
74 rpm-build wget kernel kernel-devel tar libpng-devel libXcursor-devel \
75 libXinerama-devel libXrandr-devel which"
76PACKAGES_EL5="curl-devel SDL-devel libstdc++-devel.i386 openssh-clients \
77 which gcc44-c++"
78PACKAGES_EPEL5_ARCH="/usr/bin/python2.6:python26-2.6.8-2.el5 \
79 /usr/bin/python2.6:python26-libs-2.6.8-2.el5 \
80 /usr/bin/python2.6:python26-devel-2.6.8-2.el5 \
81 /usr/bin/python2.6:libffi-3.0.5-1.el5 \
82 /usr/share/doc/SDL_ttf-2.0.8/README:SDL_ttf-2.0.8-3.el5 \
83 /usr/share/doc/SDL_ttf-2.0.8/README:SDL_ttf-devel-2.0.8-3.el5"
84LOCAL_EL5="\
85 /usr/local/include/pulse:\
86https://freedesktop.org/software/pulseaudio/releases/pulseaudio-11.1.tar.gz"
87PACKAGES_EL6_PLUS="libcurl-devel libstdc++-static libvpx-devel \
88 pulseaudio-libs-devel SDL-static device-mapper-devel glibc-static \
89 zlib-static glibc-devel.i686 libstdc++.i686 qt5-qttools-devel \
90 qt5-qtx11extras-devel"
91PACKAGES_EL7_PLUS="opus-devel"
92DOCS_EL="texlive-latex texlive-latex-bin texlive-ec texlive-pdftex-def \
93 texlive-fancybox"
94
95if test -f /etc/redhat-release; then
96 read elrelease < /etc/redhat-release
97 case "${elrelease}" in
98 *"release 5."*|*"release 6."*|*"release 7."*)
99 INSTALL="yum install -y" ;;
100 *)
101 INSTALL="dnf install -y" ;;
102 esac
103 case "`uname -m`" in
104 x86_64) ARCH=x86_64 ;;
105 *) ARCH=i386 ;;
106 esac
107 egrepignore=\
108"Setting up Install Process|already installed and latest version\
109|Nothing to do"
110 ${INSTALL} ${PACKAGES_EL} | egrep -v "${egrepignore}"
111 case "${elrelease}" in
112 *"release 5."*)
113 # Packages missing in EL5
114 ${INSTALL} ${PACKAGES_EL5} | egrep -v "${egrepignore}"
115 for i in ${PACKAGES_EPEL5_ARCH}; do
116 if test ! -r "${i%%:*}"; then
117 wget "http://archives.fedoraproject.org/pub/archive/epel/5/\
118${ARCH}/${i#*:}.${ARCH}.rpm" -P /tmp
119 rpm -i "/tmp/${i#*:}.${ARCH}.rpm"
120 rm "/tmp/${i#*:}.${ARCH}.rpm"
121 fi
122 done
123 for i in ${LOCAL_EL5}; do
124 if test ! -r "${i%%:*}"; then
125 {
126 ARCHIVE="${i#*:}"
127 TMPNAME=`/tmp/date +'%s'`
128 mkdir -p "${TMPNAME}"
129 cd "${TMPNAME}"
130 wget "${ARCHIVE}"
131 case "${ARCHIVE}" in
132 *.tar.gz)
133 tar xzf "${ARCHIVE}" --strip-components 1 ;;
134 *)
135 echo Error: unknown archive type "${ARCHIVE}"
136 exit 1
137 esac
138 ./configure
139 make
140 make install
141 cd /tmp
142 rm -r "${TMPNAME}"
143 }
144 fi
145 done ;;
146 *)
147 ${INSTALL} ${PACKAGES_EL6_PLUS} | egrep -v "${egrepignore}"
148 case "${elrelease}" in
149 *"release 6."*) ;;
150 *)
151 ${INSTALL} ${PACKAGES_EL7_PLUS} | egrep -v "${egrepignore}"
152 test -n "${WITHDOCS}" &&
153 ${INSTALL} ${DOCS_EL} | egrep -v "${egrepignore}"
154 esac
155 esac
156fi
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette