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

Manage oldstable version #714

Open
wants to merge 110 commits into
base: testing
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
06a9c07
Update manifest.toml
ericgaspar Apr 23, 2024
e5d224a
Auto-update READMEs
yunohost-bot Apr 23, 2024
89f4373
Merge branch 'testing' into 29.0.0
ericgaspar Apr 25, 2024
ded5039
Merge branch 'testing' into 29.0.0
ericgaspar Apr 26, 2024
3503f0e
add pre upgrade warning for NC 29
OniriCorpe Apr 26, 2024
6d0c2ce
update to PHP8.3
ericgaspar May 22, 2024
2b1d579
Auto-update READMEs
yunohost-bot May 22, 2024
7c9f968
Merge pull request #684 from YunoHost-Apps/29.0.0
ericgaspar May 23, 2024
cc263ec
Update manifest.toml
ericgaspar May 23, 2024
0d05a77
Auto-update READMEs
yunohost-bot May 23, 2024
1b66d7f
Fix space splitting in phpflags on install (#690)
lyynd Jun 1, 2024
c3ec387
Merge branch 'master' into testing
ericgaspar Jun 1, 2024
f6a8dc8
Auto-update READMEs
yunohost-bot Jun 1, 2024
652d6de
Update upgrade
ericgaspar Jun 2, 2024
253357a
Update manifest.toml
ericgaspar Jun 6, 2024
cc45b8e
Auto-update READMEs
yunohost-bot Jun 6, 2024
38c2ecc
Fix phpflags (#691)
tituspijean Jun 8, 2024
1ab6c01
Fix upgrade: php version is 8.3 starting from 29.x ? (#692)
alexAubin Jun 20, 2024
ef6d230
Update manifest.toml
ericgaspar Jun 20, 2024
6aa7821
Auto-update READMEs
yunohost-bot Jun 20, 2024
6870be0
Update tests.toml
ericgaspar Jun 20, 2024
336bc29
Merge branch 'testing' of https://github.com/YunoHost-Apps/nextcloud_…
ericgaspar Jun 20, 2024
25b828b
Merge branch 'master' into testing
ericgaspar Jun 20, 2024
89899fd
[autopatch] Do not delete logs on app removal (#697)
yunohost-bot Jun 23, 2024
2f0cfe5
[autopatch] Do not delete logs on app removal (#698)
yunohost-bot Jun 23, 2024
d848e73
29.0.3
ericgaspar Jun 25, 2024
e584e31
Auto-update READMEs
yunohost-bot Jun 25, 2024
26bfa59
Update remove
ericgaspar Jun 25, 2024
0a4b38f
Merge branch 'testing' of https://github.com/YunoHost-Apps/nextcloud_…
ericgaspar Jun 25, 2024
88fbb73
Indent
alexAubin Jun 27, 2024
f7c21e4
Fix again upgrade ending with Nextcloud being in PHP 8.2 ?
alexAubin Jun 27, 2024
b96736a
Auto-update READMEs
yunohost-bot Jun 27, 2024
42ae252
Update nginx.conf
ericgaspar Jul 1, 2024
9fcb43a
Update manifest.toml
ericgaspar Jul 18, 2024
49e88d8
Auto-update READMEs
yunohost-bot Jul 18, 2024
70e9e72
Rework DESCRIPTION.md (#707)
alexAubin Jul 18, 2024
c0a58b2
bump all old versions
kay0u Jul 25, 2024
9d44878
oupsie
kay0u Jul 25, 2024
9bb5bee
Auto-update READMEs
yunohost-bot Jul 25, 2024
1cb2448
system_addressbook_exposed is a boolean
kay0u Jul 29, 2024
0c4ab48
Auto-update READMEs
yunohost-bot Jul 29, 2024
a3173b7
Merge pull request #703 from YunoHost-Apps/NGINX-upstream-setting
kay0u Jul 29, 2024
7f40b5a
migrate system_addressbook_exposed to boolean, fix upgrade test
kay0u Jul 29, 2024
4fa1f99
another fix for system_addressbook_exposed, update the dav conf accor…
kay0u Jul 29, 2024
ae91654
zblerg, do not modify system_addressbook_exposed config value in the …
kay0u Jul 29, 2024
4b9224f
add redis-server as deps
kay0u Jul 30, 2024
bc59bba
Merge pull request #710 from YunoHost-Apps/trying-to-fix-the-upgrade-…
kay0u Jul 30, 2024
12024a6
Merge branch 'master' into testing
ericgaspar Jul 30, 2024
e215d9c
find files before chown them
kay0u Jul 30, 2024
5dc5e8b
chown the root folder too
kay0u Jul 30, 2024
8d682cb
fix find condition
kay0u Jul 31, 2024
706d507
find ... chmod is not faster, at least avoid to chown -R the data_dir…
kay0u Jul 31, 2024
d240d55
add a button in the config panel to run chown/chmod on data_dir
kay0u Jul 31, 2024
30b2d81
we can avoid this chmod too i guess?
kay0u Jul 31, 2024
55b5c79
only nextcloud is allowed to read the config file
kay0u Jul 31, 2024
07f90a8
zblerg, the config file doesn't exist before install
kay0u Aug 1, 2024
5556fb6
wait until nginx has actually remove the nextcloud conf during upgrad…
kay0u Aug 1, 2024
d7f9b2c
create a function for that
kay0u Aug 1, 2024
49ec72b
fix change-url dav detection
kay0u Aug 1, 2024
73a3498
only if domain has changed...
kay0u Aug 1, 2024
fa5da4f
Update scripts/_common.sh
kay0u Aug 1, 2024
79c87b1
Merge pull request #712 from YunoHost-Apps/fix-dav-detection
kay0u Aug 1, 2024
4372e3d
Merge pull request #711 from YunoHost-Apps/speedup-chown
kay0u Aug 1, 2024
4df511a
select the version you wish to track in Yunohost
kay0u Aug 1, 2024
cfb346d
install: select between latest or oldstable version
kay0u Aug 1, 2024
8a7f99d
moar sleep
kay0u Aug 1, 2024
5e498de
oups
kay0u Aug 1, 2024
e83c680
minor typos
ericgaspar Aug 3, 2024
a86e321
Update backup
ericgaspar Aug 3, 2024
31fd6a5
minor typos
ericgaspar Aug 3, 2024
bf5ef59
Merge branch 'master' into testing
ericgaspar Aug 8, 2024
1c8a1ba
Fix removing ACL permissions on uninstall
x3rAx Aug 13, 2024
aae9736
Fix: Add missing `file` argument to `setfacl`
x3rAx Aug 13, 2024
abfb04d
Fix: Use absolute path for removing ACL permissions
x3rAx Aug 13, 2024
79ef249
Update manifest.toml
ericgaspar Aug 20, 2024
2794d04
Auto-update READMEs
yunohost-bot Aug 20, 2024
b5e5d83
[enh] oldstable support for upgrade
zamentur Aug 22, 2024
9150d4e
Auto-update READMEs
yunohost-bot Aug 22, 2024
3ca78a2
Merge branch 'testing' into manage-oldstable-version
ericgaspar Aug 22, 2024
66412c0
[debug] infinite loop on upgrade
zamentur Aug 22, 2024
a448839
[fix] infinite loop on upgrade
zamentur Aug 22, 2024
d8fefce
add help key in manifest
kay0u Aug 23, 2024
a483dd7
we don't want to worry about pre/post decrement
kay0u Aug 23, 2024
8fc95ed
add tests for oldstable
kay0u Aug 23, 2024
d7d2403
Add notify push option (#417)
kay0u Aug 27, 2024
9da7de2
Merge pull request #717 from x3rAx/patch-1
kay0u Aug 27, 2024
047cfa3
Merge branch 'master' into testing
ericgaspar Aug 27, 2024
aca04bd
Remove ~duplicate pre-upgrade message (#723)
alexAubin Aug 30, 2024
19ae3b0
Fix notify_push after reboot/restart the service, create the folder /…
kay0u Sep 1, 2024
aa5842d
Update manifest.toml
ericgaspar Sep 3, 2024
6f7509a
Auto-update READMEs
yunohost-bot Sep 3, 2024
46bffb0
Update backup
ericgaspar Sep 3, 2024
af3a571
29.0.7
ericgaspar Sep 12, 2024
f43dc34
Auto-update READMEs
yunohost-bot Sep 12, 2024
63cf35d
Add comment about the cron check for high perf backend
alexAubin Sep 18, 2024
7a1274d
Add extended description of the notify push option
alexAubin Sep 18, 2024
82bd58f
Merge branch 'master' into testing
ericgaspar Sep 18, 2024
599541a
Merge branch 'testing' into manage-oldstable-version
zamentur Sep 18, 2024
6afb7b9
Merge branch 'testing' into manage-oldstable-version
zamentur Oct 1, 2024
dc736b7
Merge branch 'testing' into manage-oldstable-version
ericgaspar Nov 4, 2024
180000e
Merge branch 'testing' into manage-oldstable-version
ericgaspar Nov 4, 2024
5e88693
add some context
ericgaspar Nov 4, 2024
c826829
Merge branch 'testing' into manage-oldstable-version
ericgaspar Nov 4, 2024
a67fb02
Update config_panel.toml
ericgaspar Nov 4, 2024
581764a
Update config_panel.toml
ericgaspar Nov 4, 2024
f196579
Merge branch 'testing' into manage-oldstable-version
ericgaspar Nov 7, 2024
266ddba
Update manifest.toml
ericgaspar Dec 5, 2024
f18792a
Auto-update READMEs
yunohost-bot Dec 5, 2024
8038ea2
Merge branch 'testing' into manage-oldstable-version
ericgaspar Dec 5, 2024
0393004
Merge branch 'manage-oldstable-version' of https://github.com/YunoHos…
ericgaspar Dec 5, 2024
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
8 changes: 8 additions & 0 deletions config_panel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ name = "Nextcloud configuration"
type = "button"
style = "success"

[main.version]
[main.version.version_to_follow]
ask.en = "Upgrade channel to use"
type = "select"
choices = ["stable", "oldstable"]
default = "stable"
help.en = "Recent major releases contains sometimes some annoying bugs or regressions. Using the oldstable channel during this period can be useful if you need high stability."

[main.addressbook]
name = "Address book configuration"

Expand Down
8 changes: 8 additions & 0 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ ram.runtime = "512M"
type = "boolean"
default = true

[install.version_to_follow]
ask.en = "Upgrade channel to use"
help.en = "Recent major releases contains sometimes some annoying bugs or regressions. Using the oldstable channel during this period can be useful if you need high stability."
type = "select"
choices = ["stable", "oldstable"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find those two choices confusing... Is Oldstable defined by Nextcloud? shouldn't we need to be more specific about it

default = "stable"

[install.enable_notify_push]
ask.en = "Configure the High Performance Backend?"
ask.fr = "Configurer le Backend Hautes Performances ?"
Expand All @@ -68,6 +75,7 @@ ram.runtime = "512M"
help.en = "Also called 'notify push' and corresponds to a mechanism allowing more instantaneous notifications and reduce server load. (However, it is still a bit new and adds complexity to the setup)"
help.fr = "Aussi appelé 'notifications push' et corresponds à un mécanisme qui permet d'avoir des notifications plus rapides et de réduire la charge du serveur. (Cependant, cette fonctionnalité reste relativement nouvelle, et augmente la complexité de l'installation)"


[resources]

[resources.sources]
Expand Down
9 changes: 8 additions & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ ynh_script_progression --message="Setting up source files..." --weight=5

# Enable YunoHost patches on Nextcloud sources
cp -a ../sources/patches_last_version/* ../sources/patches

source_id="main"
if [ "$version_to_follow" == "oldstable" ]; then
last_version=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]')
last_major_version=${last_version%%.*}
last_major_version=$(( $last_major_version - 1 ))
fi
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id"

#=================================================
# PHP-FPM CONFIGURATION
Expand Down
22 changes: 18 additions & 4 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ then
ynh_die --message="Upgrading from Nextcloud < 22.2 is not supported anymore. You should first upgrade to 22.2 using: yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/41f5f902e7c7cd3c30a6793020562ba98b9bf3e9"
fi

if [ -z "${version_to_follow:-}" ]
then
version_to_follow=stable
ynh_app_setting_set --app=$app --key=version_to_follow --value="$version_to_follow"
fi


#=================================================
# SPECIFIC UPGRADE
#=================================================
Expand Down Expand Up @@ -128,6 +135,11 @@ current_major_version=${current_version%%.*}

last_version=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]')
last_major_version=${last_version%%.*}
if [[ "$version_to_follow" == "oldstable" ]]
then
last_major_version=$(( $last_major_version - 1 ))
last_version=$(ynh_read_manifest --manifest_key="resources.sources.${last_major_version}.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]')
fi

if [[ "$last_major_version" != "$current_major_version" ]]
then
Expand Down Expand Up @@ -169,17 +181,19 @@ then
fi

# While the current version is not the last version, do an upgrade
while [ "$last_version" != "$current_version" ]
while [[ "$last_version" > "$current_version" ]]
do

next_major_version="$(( $current_major_version + 1 ))"
source_id="$next_major_version"
if [[ "$next_major_version" -ge "$last_major_version" ]]; then
ynh_print_info --message="Upgrading to Nextcloud $last_version"
cp -a ../sources/patches_last_version/* ../sources/patches
source_id="main"
if [[ "$version_to_follow" != "oldstable" ]]
then
source_id="main"
fi
else
ynh_print_info --message="Upgrading to Nextcloud $next_major_version"
source_id="$next_major_version"
fi

# Create a temporary directory
Expand Down
9 changes: 7 additions & 2 deletions tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ test_format = 1.0

[default]

args.version_to_follow = "stable"
args.enable_notify_push = "0"

# -------------------------------
Expand Down Expand Up @@ -38,8 +39,12 @@ test_format = 1.0
caldav.logged_on_sso = true
caldav.expect_content = "This is the WebDAV interface."

[oldstable]
args.version_to_follow = "oldstable"
test_upgrade_from.e9f82ab7.name = "Upgrade from 28.0.6"
test_upgrade_from.e9f82ab7.args.system_addressbook_exposed = "yes"

[notify_push_test]

args.enable_notify_push = "1"
test_upgrade_from.e9f82ab7.name = "Upgrade from 28.0.6"
test_upgrade_from.e9f82ab7.args.system_addressbook_exposed = "yes"
test_upgrade_from.e9f82ab7.args.system_addressbook_exposed = "yes"