Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.55.3 #2004

Merged
merged 11 commits into from
Nov 8, 2024
Merged

v1.55.3 #2004

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/ncp-update-nc
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ then
exit $?
fi

systemctl reset-failed ncp-encrypt 2>/dev/null ||:
systemd-run -u 'ncp-update-nc' bash -c "set -o pipefail; DBG='${DBG:-}' /usr/local/bin/ncp-update-nc.d/update-nc.sh '${VER}' |& tee /var/log/ncp-update-nc.log"
systemctl reset-failed ncp-update-nc 2>/dev/null ||:
systemd-run -u 'ncp-update-nc' --service-type=oneshot --no-block -p TimeoutStartSec="24h" -p TimeoutStopSec="1h" \
bash -c "set -o pipefail; DBG='${DBG:-}' /usr/local/bin/ncp-update-nc.d/update-nc.sh '${VER}' |& tee /var/log/ncp-update-nc.log"
sleep 1

if ! [[ "$(systemctl is-active ncp-update-nc ||:)" =~ ^(active|inactive|activating|deactivating)$ ]]
Expand Down
8 changes: 7 additions & 1 deletion bin/ncp-update-nc.d/update-nc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,15 @@ grep -qP "\d+\.\d+\.\d+" <<<"$TARGET_VERSION" || { echo "Malformed version $TA
echo "Current Nextcloud version $CURRENT"
echo "Requested Nextcloud version $REQUESTED_VERSION"
echo "Selected Nextcloud version $TARGET_VERSION"
if [[ "$TARGET_VERSION" != "$REQUESTED_VERSION" ]]

if [[ "$REQUESTED_VERSION" == "latest" ]]
then
echo "INFO: You have requested an update to the latest available version that can be performed directly, which is '${TARGET_VERSION}'. Updates can only performed to the next major version (or the latest minor version of the current major version). If you run ncp-update-nc again after this update completes, a new version might be available."
sleep 3
elif [[ "$TARGET_VERSION" != "$REQUESTED_VERSION" ]]
then
echo "INFO: You have requested an update to '${REQUESTED_VERSION}', but a direct update to '${REQUESTED_VERSION}' cannot be performed, so the latest available version that can be updated to (${TARGET_VERSION}) has been selected automatically."
sleep 3
fi

# make sure that cron.php is not running and there are no pending jobs
Expand Down
2 changes: 1 addition & 1 deletion bin/ncp/CONFIG/nc-datadir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ configure()
cd /var/www/nextcloud
[[ "$BUILD_MODE" == 1 ]] || save_maintenance_mode

echo "moving data directory from ${SRCDIR} to ${BASEDIR}..."
echo "moving data directory from ${SRCDIR} to ${DATADIR}..."

# use subvolumes, if BTRFS
[[ "$(stat -fc%T "${BASEDIR}")" == "btrfs" ]] && ! is_docker && {
Expand Down
1 change: 1 addition & 0 deletions bin/ncp/CONFIG/nc-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ EOF
# TODO temporary workaround for https://github.com/nextcloud/server/pull/13358
ncc -n db:convert-filecache-bigint
ncc db:add-missing-indices
ncc maintenance:repair --include-expensive

# Default trusted domain (only from ncp-config)
test -f /usr/local/bin/nextcloud-domain.sh && {
Expand Down
4 changes: 2 additions & 2 deletions bin/ncp/CONFIG/nc-previews-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ configure()
grep -qP "^\d+$" <<<"$RUNTIME" || { echo "Invalid RUNTIME value $RUNTIME"; return 1; }
RUNTIME=$((RUNTIME*60))

echo "0 2 * * * root /usr/local/bin/nc-previews" > /etc/cron.d/ncp-previews-auto
chmod 644 /etc/cron.d/ncp-previews-auto
echo "0 2 * * * root /usr/local/bin/nc-previews" > /etc/cron.d/nc-previews-auto
chmod 644 /etc/cron.d/nc-previews-auto

cat > /usr/local/bin/nc-previews <<EOF
#!/bin/bash
Expand Down
19 changes: 14 additions & 5 deletions bin/ncp/NETWORKING/dnsmasq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,39 @@ install()
set -x
apt-get update
apt-get install --no-install-recommends -y dnsmasq
sleep 10
rc=0
service dnsmasq status > /dev/null 2>&1 || rc=$?
[[ $rc -eq 3 ]] && ! [[ "$INIT_SYSTEM" =~ ^("chroot"|"unknown")$ ]] && command -v systemd-resolve > /dev/null || {
if [[ $rc -eq 3 ]] && ! [[ "$INIT_SYSTEM" =~ ^("chroot"|"unknown")$ ]]
then
echo "Applying workaround for dnsmasq bug (compare issue #1446)"
mkdir -p /etc/systemd/resolved.conf.d
if systemctl status systemd-resolved
then
cat <<EOF > /etc/systemd/resolved.conf.d/nostublistener.conf
cat <<EOF > /etc/systemd/resolved.conf.d/nostublistener.conf
[Resolve]
DNSStubListener=no
EOF
[[ "$INIT_SYSTEM" != "systemd" ]] || systemctl restart systemd-resolved
else
elif systemctl status resolvconf
then
systemctl stop resolvconf
systemctl start dnsmasq
systemctl status dnsmasq
else
echo "dnsmasq failed to start and no workaround could be found. This means, the installer failed."
false
fi
# service systemd-resolved stop || true
systemctl start dnsmasq
systemctl status dnsmasq
}
fi

service dnsmasq stop
[[ "$INIT_SYSTEM" != "systemd" ]] || systemctl start systemd-resolved || systemctl start resolvconf
if [[ "$INIT_SYSTEM" == "systemd" ]] && systemctl list-unit-files resolvconf.service
then
systemctl start resolvconf
fi
update-rc.d dnsmasq disable || rm /etc/systemd/system/multi-user.target.wants/dnsmasq.service

return 0
Expand Down
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# NextcloudPi Changelog

## [v1.55.3](https://github.com/nextcloud/nextcloudpi/tree/v1.55.3) (2024-11-08) Nextcloud 30 and fixes

### Changes

- Support for Nextcloud 30 ([#1957](https://github.com/nextcloud/nextcloudpi/issues/1957))

### Fixes

- Fix resetting failed state of previous ncp-update-nc job ([#1992](https://github.com/nextcloud/nextcloudpi/issues/1992))
- Fix installer on systems using resolvconf as DNS manager ([#1926](](https://github.com/nextcloud/nextcloudpi/issues/1926))
- Fix typo that prevents ncp-previews from being disabled (Thanks @m-breitbach)

## [v1.55.2](https://github.com/nextcloud/nextcloudpi/tree/v1.55.2) (2024-09-24) Hotfix release

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion etc/ncp-config.d/nc-nextcloud.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"id": "VER",
"name": "Version",
"value": "29.0.4"
"value": "30.0.1"
},
{
"id": "MAXFILESIZE",
Expand Down
2 changes: 1 addition & 1 deletion etc/ncp.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"nextcloud_version": "29.0.4",
"nextcloud_version": "30.0.1",
"php_version": "8.3",
"release": "bookworm"
}
5 changes: 0 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ cp etc/ncp.cfg /usr/local/etc/

cp -r etc/ncp-templates /usr/local/etc/
install_app lamp.sh
if [[ -d "/run/systemd/system" ]] && is_lxc
then
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y systemd-resolved
systemctl enable systemd-resolved
fi
install_app bin/ncp/CONFIG/nc-nextcloud.sh
run_app_unsafe bin/ncp/CONFIG/nc-nextcloud.sh
rm /usr/local/etc/ncp-config.d/nc-nextcloud.cfg # armbian overlay is ro
Expand Down
2 changes: 1 addition & 1 deletion ncp-app/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<category>tools</category>
<bugs>https://github.com/nextcloud/nextcloudpi/issues</bugs>
<dependencies>
<nextcloud min-version="22" max-version="29"/>
<nextcloud min-version="22" max-version="30"/>
</dependencies>
<navigations>
<navigation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The first time you install this app, before using a cron job, you properly want
</types>
<dependencies>
<php min-version="7.2"/>
<nextcloud min-version="20" max-version="29" />
<nextcloud min-version="20" max-version="30" />
</dependencies>

<commands>
Expand Down
3 changes: 3 additions & 0 deletions updates/1.55.3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

[ -f /etc/cron.d/ncp-previews-auto ] && mv /etc/cron.d/ncp-previews-auto /etc/cron.d/nc-previews-auto
Loading