mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
build: avoid buster
This commit is contained in:
parent
bc5dc6e574
commit
308a1a2ec6
@ -20,11 +20,8 @@ Internet access is required for this configuration to complete."
|
||||
|
||||
install()
|
||||
{
|
||||
# workaround until Sury has PHP7.2-redis armhf
|
||||
[[ "$(uname -m)" == "x86_64" ]] && local RELEASE=stretch || local RELEASE=buster
|
||||
|
||||
apt-get update
|
||||
apt-get install -t $RELEASE --no-install-recommends -y make gcc libc-dev
|
||||
apt-get install --no-install-recommends -y make gcc libc-dev
|
||||
|
||||
local TMPDIR="$( mktemp -d /tmp/noip.XXXXXX )"
|
||||
cd "$TMPDIR"
|
||||
|
||||
@ -38,14 +38,15 @@ install()
|
||||
# During build, this step is run before ncp.sh. Avoid executing twice
|
||||
[[ -f /usr/lib/systemd/system/nc-provisioning.service ]] && return 0
|
||||
|
||||
# workaround until Sury has PHP7.2-redis armhf
|
||||
[[ "$(uname -m)" == "x86_64" ]] && local RELEASE=stretch || local RELEASE=buster
|
||||
local RELEASE=stretch
|
||||
|
||||
# Optional packets for Nextcloud and Apps
|
||||
apt-get update
|
||||
$APTINSTALL lbzip2 iputils-ping
|
||||
$APTINSTALL -t $RELEASE php-smbclient # for external storage
|
||||
[[ "$(uname -m)" == "x86_64" ]] && {
|
||||
$APTINSTALL -t $RELEASE imagemagick php-imagick php${PHPVER}-exif # for gallery
|
||||
} # TODO fixme when armhf version is available for php7.2
|
||||
|
||||
|
||||
# POSTFIX
|
||||
|
||||
@ -20,11 +20,8 @@ This can be done manually or automatically using 'nc-scan' and 'nc-scan-auto'"
|
||||
|
||||
install()
|
||||
{
|
||||
# workaround until Sury has PHP7.2-redis armhf
|
||||
[[ "$(uname -m)" == "x86_64" ]] && local RELEASE=stretch || local RELEASE=buster
|
||||
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends -y -t $RELEASE samba
|
||||
apt-get install --no-install-recommends -y samba
|
||||
update-rc.d smbd disable
|
||||
update-rc.d nmbd disable
|
||||
|
||||
|
||||
20
lamp.sh
20
lamp.sh
@ -28,30 +28,12 @@ install()
|
||||
# GET PHP 7.2 SOURCES
|
||||
##########################################
|
||||
|
||||
# workaround until Sury has PHP7.2-redis armhf
|
||||
[[ "$(uname -m)" == "x86_64" ]] && local RELEASE=stretch || local RELEASE=buster
|
||||
|
||||
## Raspbian
|
||||
if [[ -f /usr/bin/raspi-config ]]; then
|
||||
echo "deb http://mirrordirector.raspbian.org/raspbian/ buster main contrib non-free rpi" > /etc/apt/sources.list.d/ncp-buster.list
|
||||
|
||||
## x86
|
||||
elif [[ "$(uname -m)" == "x86_64" ]]; then
|
||||
local RELEASE=stretch
|
||||
apt-get update
|
||||
$APTINSTALL apt-transport-https gnupg2 wget ca-certificates
|
||||
echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list
|
||||
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
|
||||
|
||||
## armhf
|
||||
else
|
||||
echo "deb http://deb.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list.d/ncp-buster.list
|
||||
cat > /etc/apt/preferences.d/10-ncp-buster <<EOF
|
||||
Package: *
|
||||
Pin: release n=stretch
|
||||
Pin-Priority: 600
|
||||
EOF
|
||||
fi
|
||||
|
||||
# INSTALL
|
||||
##########################################
|
||||
|
||||
|
||||
32
update.sh
32
update.sh
@ -190,29 +190,6 @@ EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
# Adjust sources
|
||||
## Raspbian
|
||||
if [[ -f /usr/bin/raspi-config ]]; then
|
||||
echo "deb http://mirrordirector.raspbian.org/raspbian/ buster main contrib non-free rpi" > /etc/apt/sources.list.d/ncp-buster.list
|
||||
|
||||
## x86
|
||||
elif [[ "$(uname -m)" == "x86_64" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends apt-transport-https gnupg
|
||||
echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list
|
||||
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
|
||||
rm -f /etc/apt/preferences.d/10-ncp-buster
|
||||
|
||||
## armhf
|
||||
else
|
||||
echo "deb http://deb.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list.d/ncp-buster.list
|
||||
cat > /etc/apt/preferences.d/10-ncp-buster <<EOF
|
||||
Package: *
|
||||
Pin: release n=stretch
|
||||
Pin-Priority: 600
|
||||
EOF
|
||||
fi
|
||||
|
||||
# remove redundant opcache configuration. Leave until update bug is fixed -> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968
|
||||
# Bug #416 reappeared after we moved to php7.2 and debian buster packages.
|
||||
[[ "$( ls -l /etc/php/7.2/fpm/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/fpm/conf.d/*-opcache.ini | tail -1 )"
|
||||
@ -230,6 +207,15 @@ launch_script $1
|
||||
EOF
|
||||
chmod 700 /home/www/ncp-launcher.sh
|
||||
|
||||
# Adjust sources
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends apt-transport-https gnupg
|
||||
echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list
|
||||
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
|
||||
rm -f /etc/apt/sources.list.d/ncp-buster.list
|
||||
rm -f /etc/apt/preferences.d/10-ncp-buster
|
||||
apt-get update
|
||||
|
||||
} # end - only live updates
|
||||
|
||||
exit 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user