From a414bc341829753568f491f6f48d8644def55886 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Thu, 10 Jan 2019 09:08:45 +0200 Subject: [PATCH 1/4] Add support for Buster in the installer --- Vagrantfile | 6 ++ install | 25 +++++-- installer/lib/requirements-debian-buster.apt | 69 ++++++++++++++++++++ 3 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 installer/lib/requirements-debian-buster.apt diff --git a/Vagrantfile b/Vagrantfile index 7299438a2..0d5cae12a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -59,6 +59,12 @@ Vagrant.configure("2") do |config| os.vm.box = "bento/debian-9.6" provision_libretime(os, "debian.sh", installer_args) end + config.vm.define "debian-buster" do |os| + # TODO: Replace with generic/debian10 once it is released + os.vm.box = "fujimakishouten/debian-buster64" + # TODO: Remove the manual flags after buster is released + provision_libretime(os, "debian.sh", installer_args + "--distribution=debian --release=buster") + end config.vm.define "centos" do |os| os.vm.box = 'centos/7' provision_libretime(os, "centos.sh", installer_args + "--selinux") diff --git a/install b/install index 1b82370f6..40cd9c40c 100755 --- a/install +++ b/install @@ -147,11 +147,18 @@ function systemInitDetect() { # Get the path of the command where pid=1 following any symlinks pid_1_path=$(readlink --canonicalize -n /proc/1/exe) # returns '/sbin/init' (Debian Wheezy & Ubuntu Trusty) - # returns '(/usr)?/lib/systemd/systemd' (Debian Stretch, Debian Jessie, Ubuntu Xenial, CentOS 7) + # returns '(/usr)?/lib/systemd/systemd' (Debian Stretch, Debian Jessie, Debian Buster, Ubuntu Xenial, CentOS 7) verbose "Detected path to PID=1 process: $pid_1_path" # Get package of PID=1 path as it identifies the init system - pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || - rpm --qf '%{name}\n' -qf $pid_1_path 2>/dev/null) + if $if_debian_buster; then + # /usr/lib/systemd/systemd is provided by the base system in Debian Buster, so + # dpkg -S /usr/lib/systemd returns an error - no path found matching pattern + # This is a work around to avoid failing on package detection + pid_1_package=systemd + else + pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || + rpm --qf '%{name}\n' -qf $pid_1_path 2>/dev/null) + fi verbose "Detected package name for PID=1 process: $pid_1_package" case "${pid_1_package-$pid_1_path}" in *systemd*) has_systemd_init=true; verbose "Detected init system type: systemd" ;; @@ -584,6 +591,7 @@ fi # Validate the distribution and release is a supported one; set boolean flags. is_debian_dist=false +is_debian_buster=false is_debian_stretch=false is_debian_jessie=false is_ubuntu_dist=false @@ -621,6 +629,11 @@ case "${dist}-${code}" in is_debian_dist=true is_debian_stretch=true ;; + debian-10|debian-buster) + code="buster" + is_debian_dist=true + is_debian_buster=true + ;; #Fix for Raspbian 9 (stretch) raspbian-9|9) code="stretch" @@ -684,6 +697,7 @@ if [ "$ignore_dependencies" = "f" ]; then apt_force_options="--allow-downgrades --allow-remove-essential --allow-change-held-packages" # Get apt-get version by returning the 2nd parameter from the 1st line of output apt_version=$(apt-get --version |awk 'NR == 1 { print $2 }') + # returns 1.8.0~alpha3 (Debian Buster) # returns: 1.4.7 (Debian Stretch) # returns: 0.9.7.9 (Debian Wheezy) # returns: 1.0.1ubuntu2 (Ubuntu Trusty) @@ -983,6 +997,7 @@ loud " * Configuring PHP in Apache * " loud "-----------------------------------------------------" # Test common locations for php conf directory php_conf_dirs=( + "/etc/php/7.3/apache2/conf.d" # Debian Buster "/etc/php/7.2/apache2/conf.d" # Ubuntu Bionic "/etc/php/7.0/apache2/conf.d" # Ubuntu Xenial "/etc/php5/apache2/conf.d" # Debian Stretch, Debian Jessie, Ubuntu Trusty @@ -1006,7 +1021,9 @@ else fi # Enable Apache modules -if $is_ubuntu_bionic; then +if $is_debian_buster; then + loudCmd "a2enmod rewrite php7.3" +elif $is_ubuntu_bionic; then loudCmd "a2enmod rewrite php7.2" elif $is_ubuntu_xenial || $is_debian_stretch; then loudCmd "a2enmod rewrite php7.0" diff --git a/installer/lib/requirements-debian-buster.apt b/installer/lib/requirements-debian-buster.apt new file mode 100644 index 000000000..e50bd7aed --- /dev/null +++ b/installer/lib/requirements-debian-buster.apt @@ -0,0 +1,69 @@ +apache2 +git +libapache2-mod-php7.3 +php7.3 +php7.3-dev +php7.3-bcmath +php7.3-mbstring +php-pear +php7.3-gd +php-amqplib + +lsb-release + +zip +unzip + +rabbitmq-server + +postgresql +postgresql-client +php7.3-pgsql + +python +python-virtualenv +python-pip + +libsoundtouch-ocaml +libtaglib-ocaml +libao-ocaml +libmad-ocaml +ecasound +libportaudio2 +libsamplerate0 +libvo-aacenc0 + +python-rgain +python-gst-1.0 +gstreamer1.0-plugins-ugly +python-pika + +patch + +icecast2 + +curl +php7.3-curl +mpg123 + +libcamomile-ocaml-data +libpulse0 +vorbis-tools +lsb-release +lsof +vorbisgain +flac +vorbis-tools +pwgen +libfaad2 +php-apcu + +lame + +coreutils + +liquidsoap + +libopus0 + +systemd-sysv From 1ab5a42de290d017e54553ec1b614ed9d912a81f Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Fri, 11 Jan 2019 12:30:03 +0200 Subject: [PATCH 2/4] add buster to the vagrant machine matrix docs --- docs/vagrant.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/vagrant.md b/docs/vagrant.md index 10abeacbf..635d8ba31 100644 --- a/docs/vagrant.md +++ b/docs/vagrant.md @@ -95,6 +95,7 @@ offers the option to choose a different operation system according to you needs. | OS | Command | Comment | | ------ | ------------------- | ------- | +| Debian 10 | `vagrant up debian-buster` | Install on Debian Buster. | | Debian 9.6 | `vagrant up debian-stretch` | Install on current Debian Stretch. | | Debian 8.7 | `vagrant up debian-jessie` | Install on Debian Jessie. | | Ubuntu 18.04 | `vagrant up ubuntu-bionic` | Experimental install on current Ubuntu Bionic Beaver. | From 916cc35058e19095c27085b1ce08a5fe23edcbc7 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Thu, 10 Jan 2019 15:29:04 +0200 Subject: [PATCH 3/4] Allow init package detection to fail. As the init system isn't necessarily shipped in a package (dpkg and rpm fail), then use the PID 1 file path to assume the init system. --- install | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/install b/install index 40cd9c40c..bb8de1d60 100755 --- a/install +++ b/install @@ -149,18 +149,14 @@ function systemInitDetect() { # returns '/sbin/init' (Debian Wheezy & Ubuntu Trusty) # returns '(/usr)?/lib/systemd/systemd' (Debian Stretch, Debian Jessie, Debian Buster, Ubuntu Xenial, CentOS 7) verbose "Detected path to PID=1 process: $pid_1_path" - # Get package of PID=1 path as it identifies the init system - if $if_debian_buster; then - # /usr/lib/systemd/systemd is provided by the base system in Debian Buster, so - # dpkg -S /usr/lib/systemd returns an error - no path found matching pattern - # This is a work around to avoid failing on package detection - pid_1_package=systemd - else - pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || - rpm --qf '%{name}\n' -qf $pid_1_path 2>/dev/null) - fi + # Get package of PID=1 path as it identifies the init system. + # Allow this to fail, at least then the init system can be guessed from the + # PID 1 executable alone + pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || + rpm --qf '%{name}\n' -qf $pid_1_path 2>/dev/null || + echo "unknown") verbose "Detected package name for PID=1 process: $pid_1_package" - case "${pid_1_package-$pid_1_path}" in + case "${pid_1_package:$pid_1_path}" in *systemd*) has_systemd_init=true; verbose "Detected init system type: systemd" ;; *upstart*) has_upstart_init=true; verbose "Detected init system type: Upstart" ;; *sysvinit*) has_systemv_init=true; verbose "Detected init system type: System V" ;; From b5325f45ff68c69d56314d51bd4261a40fa0d697 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Mon, 18 Feb 2019 13:04:08 +0200 Subject: [PATCH 4/4] Fix systemd detection logic --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index bb8de1d60..bd46d036e 100755 --- a/install +++ b/install @@ -152,11 +152,11 @@ function systemInitDetect() { # Get package of PID=1 path as it identifies the init system. # Allow this to fail, at least then the init system can be guessed from the # PID 1 executable alone - pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || + pid_1_package=$(dpkg -S $pid_1_path 2>/dev/null || rpm --qf '%{name}\n' -qf $pid_1_path 2>/dev/null || echo "unknown") verbose "Detected package name for PID=1 process: $pid_1_package" - case "${pid_1_package:$pid_1_path}" in + case "${pid_1_package}:${pid_1_path}" in *systemd*) has_systemd_init=true; verbose "Detected init system type: systemd" ;; *upstart*) has_upstart_init=true; verbose "Detected init system type: Upstart" ;; *sysvinit*) has_systemv_init=true; verbose "Detected init system type: System V" ;;