Initial changes to try to install on Buster

This commit is contained in:
Alexandre Aubin 2019-06-25 22:43:11 +02:00
parent a4652842a5
commit 46b3e3dc69
3 changed files with 73 additions and 9 deletions

24
Makefile Normal file
View file

@ -0,0 +1,24 @@
BUILD_DEPS = dh-systemd python-all gdebi git git-buildpackage lua5.1 liblua5.1-dev libidn11-dev libssl-dev txt2man quilt
init:
apt -o Dpkg::Options::="--force-confold" -y --force-yes install $(BUILD_DEPS)
mkdir -p /ynh-build/
cd /ynh-build/; git clone https://github.com/yunohost/moulinette;
cd /ynh-build/; git clone https://github.com/yunohost/ssowat;
cd /ynh-build/; git clone https://github.com/yunohost/metronome;
cd /ynh-build/; git clone https://github.com/yunohost/yunohost;
metronome:
cd /ynh-build/; rm -f metronome_*; cd metronome; dpkg-buildpackage -rfakeroot -uc -b -d
yunohost:
cd /ynh-build/; rm -f yunohost_*; cd yunohost; debuild -us -uc
install:
cd /ynh-build/; debconf-set-selections < debconf; export SUDO_FORCE_REMOVE=yes; gdebi /ynh-build/yunohost*.deb -n
uninstall:
apt remove slapd yunohost moulinette --purge -y
rm -rf /usr/share/yunohost/
rm -rf /usr/lib/moulinette/
rm -rf /etc/yunohost/

21
debconf Normal file
View file

@ -0,0 +1,21 @@
slapd slapd/password1 password yunohost
slapd slapd/password2 password yunohost
slapd slapd/domain string yunohost.org
slapd shared/organization string yunohost.org
slapd slapd/allow_ldap_v2 boolean false
slapd slapd/invalid_config boolean true
slapd slapd/backend select MDB
postfix postfix/main_mailer_type select Internet Site
postfix postfix/mailname string /etc/mailname
mysql-server-5.5 mysql-server/root_password password yunohost
mysql-server-5.5 mysql-server/root_password_again password yunohost
mariadb-server-10.0 mysql-server/root_password password yunohost
mariadb-server-10.0 mysql-server/root_password_again password yunohost
nslcd nslcd/ldap-bindpw password
nslc nslcd/ldap-starttls boolean false
nslcd nslcd/ldap-reqcert select
nslcd nslcd/ldap-uris string ldap://localhost/
nslcd nslcd/ldap-binddn string
nslcd nslcd/ldap-base string dc=yunohost,dc=org
libnss-ldapd libnss-ldapd/nsswitch multiselect group, passwd, shadow

View file

@ -104,12 +104,15 @@ function main()
step confirm_installation || die "Installation cancelled at your request"
step manage_sshd_config || die "Error caught during sshd management"
step fix_locales # do not die for a failure here, it's minor
step setup_package_source || die "Setting up deb package sources failed"
step apt_update || die "Error caught during 'apt-get update'"
step register_debconf || die "Unable to insert new values into debconf database"
step workarounds_because_sysadmin_sucks || die "Unable to run stupid workarounds"
step install_yunohost_packages || die "Installation of Yunohost packages failed"
step restart_services || die "Error caught during services restart"
step build_packages_locally || die "Failed to build packages locally"
step install_local_packages || die "Failed to install local packages"
# The following steps rely on having a real deb repo, which we don't have for now
#step setup_package_source || die "Setting up deb package sources failed"
#step apt_update || die "Error caught during 'apt-get update'"
#step register_debconf || die "Unable to insert new values into debconf database"
#step workarounds_because_sysadmin_sucks || die "Unable to run stupid workarounds"
#step install_yunohost_packages || die "Installation of Yunohost packages failed"
#step restart_services || die "Error caught during services restart"
if is_raspbian ; then
step del_user_pi || die "Unable to delete user pi"
@ -130,6 +133,22 @@ function main()
exit 0
}
function build_packages_locally()
{
mkdir -p /ynh-build/
cp ./Makefile ./debconf /ynh-build/
cd /ynh-build
make init
make metronome
make yunohost
}
function install_local_packages()
{
cd /ynh-build
make install
}
###############################################################################
# Helpers #
###############################################################################
@ -214,10 +233,10 @@ function check_assertions()
# only to check this...
[[ -f "/etc/debian_version" ]] || die "This script can only be ran on Debian 9 (Stretch)."
# Assert we're on Stretch
# Assert we're on Buster
# Note : we do not rely on lsb_release to avoid installing a dependency
# only to check this...
[[ "$(cat /etc/debian_version)" =~ ^9.* ]] || die "YunoHost is only available for the version 9 (Stretch) of Debian, you are using '$(cat /etc/debian_version)'."
[[ "$(cat /etc/debian_version)" =~ ^10.* ]] || die "This script can only be ran on Debian Buster, you are using '$(cat /etc/debian_version)."
# Forbid people from installing on Ubuntu or Linux mint ...
if [[ -f "/etc/lsb-release" ]];
@ -392,7 +411,7 @@ function setup_package_source() {
# Debian repository
local CUSTOMDEB="deb http://forge.yunohost.org/debian/ stretch stable"
local CUSTOMDEB="deb http://forge.yunohost.org/debian/ buster stable"
if [[ "$DISTRIB" == "stable" ]] ; then
echo "$CUSTOMDEB" > $CUSTOMAPT