This fixes an issue where unless compression=auto (or compression=gzip) is specified, using wget to download jquery.min.js by setup/management.sh fails with max redirects exceeded.
The man page says --compression is an experimental option, but it doesn't appear to have any problems.
Note that downloading jquery.min.js with curl works fine when wget without --compression fails.
1. Autodetect encryption-at-rest and run the correct setup in boostrap and /usr/local/bin/mailinabox
2. Fix bug where directories in the local mod folder are improperly executed causing setup to fail
3. Add a remote_nextcloud.sh setup mod cleanup function for cleaner removal of the mod
a deep copy of a dictionary with values of type `dict_keys`, required by the underlying ldap3 python3 library, is no longer allowed. they must be a `list` type
actual error:
Traceback (most recent call last):
File "/mailinabox/setup/migrate.py", line 461, in <module>
run_miabldap_migrations()
File "/mailinabox/setup/migrate.py", line 440, in run_miabldap_migrations
raise e
File "/mailinabox/setup/migrate.py", line 431, in run_miabldap_migrations
migration_func(env)
File "/mailinabox/setup/migrate.py", line 249, in migration_miabldap_1
users=m13.create_users(env, conn, ldap, ldap_base, ldap_users_base, ldap_domains_base)
File "/mailinabox/setup/migration_13.py", line 137, in create_users
dn = add_user(env, ldapconn, ldap_base, ldap_users_base, ldap_domains_base, email, password, privs.split("\n"), totp)
File "/mailinabox/setup/migration_13.py", line 90, in add_user
ldapconn.add(dn, objectClasses, attrs)
File "/usr/lib/python3/dist-packages/ldap3/core/connection.py", line 947, in add
_attributes = deepcopy(attributes) # dict could change when adding objectClass values
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 161, in deepcopy
rv = reductor(4)
TypeError: cannot pickle 'dict_keys' object
Nextcloud:
* The Nextcloud user_external 1.0.0 package for Nextcloud 21.0.7 isn't available from Nextcloud's releases page, but it's not needed in an intermediate upgrade step (hopefully), so we can skip it.
* Nextcloud updgrade steps should not be elifs because multiple intermediate upgrades may be needed.
* Continue if the user_external backend migration fails. Maybe it's not necessary. It gives a scary error message though.
* Remove a line that removes an old file that hasn't been in use since 2019 and the expectation is that Ubuntu 22.04 installations are on fresh machines.
Backups:
* For duplicity, we now need boto3 for AWS.