mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge branch 'unstable' into stretch-unstable
This commit is contained in:
commit
e475d3afab
6 changed files with 44 additions and 12 deletions
|
@ -9,7 +9,7 @@ This repository is the core of YunoHost code.
|
|||
</a>
|
||||
|
||||
## Issues
|
||||
- [Please report issues on YunoHost bugtracker](https://dev.yunohost.org/projects/yunohost/issues) (no registration needed).
|
||||
- [Please report issues on YunoHost bugtracker](https://github.com/YunoHost/issues).
|
||||
|
||||
## Contribute
|
||||
- You can develop on this repository using [ynh-dev tool](https://github.com/YunoHost/ynh-dev) with `use-git` sub-command.
|
||||
|
|
22
debian/changelog
vendored
22
debian/changelog
vendored
|
@ -40,6 +40,28 @@ yunohost (3.0.0~beta1) testing; urgency=low
|
|||
|
||||
-- Alexandre Aubin <alex.aubin@mailoo.org> Thu, 03 May 2018 03:04:45 +0000
|
||||
|
||||
yunohost (2.7.13.5) testing; urgency=low
|
||||
|
||||
* [fix] a bug when log to be fetched is empty
|
||||
* [fix] a bug when computing diff in regen_conf
|
||||
* [stretch-migration] Tell postgresql-common to not send an email about 9.4->9.6 migration
|
||||
* [stretch-migration] Close port 465 / open port 587 during migration according to SMTP port change in postfix
|
||||
* [stretch-migration] Rely on /etc/os-release to get debian release number
|
||||
|
||||
Fixes by Bram and Aleks
|
||||
|
||||
-- Alexandre Aubin <alex.aubin@mailoo.org> Tue, 12 Jun 2018 01:00:00 +0000
|
||||
|
||||
yunohost (2.7.13.4) testing; urgency=low
|
||||
|
||||
* Fix a bug for services with alternate names (mysql<->mariadb)
|
||||
* Fix a bug in regen conf when computing diff with files that don't exists
|
||||
* Increase backup filename length
|
||||
|
||||
(Fixes by Bram <3)
|
||||
|
||||
-- Alexandre Aubin <alex.aubin@mailoo.org> Tue, 05 Jun 2018 18:22:00 +0000
|
||||
|
||||
yunohost (2.7.13.3) testing; urgency=low
|
||||
|
||||
* [enh] Add postgresql helpers (#238)
|
||||
|
|
|
@ -237,7 +237,7 @@
|
|||
"migration_0003_not_jessie": "The current debian distribution is not Jessie !",
|
||||
"migration_0003_system_not_fully_up_to_date": "Your system is not fully up to date. Please perform a regular upgrade before running the migration to stretch.",
|
||||
"migration_0003_still_on_jessie_after_main_upgrade": "Something wrong happened during the main upgrade : system is still on Jessie !? To investigate the issue, please look at {log} :s ...",
|
||||
"migration_0003_general_warning": "Please note that this migration is a delicate operation. While the YunoHost team did its best to review and test it, the migration might still break parts of the system or apps.\n\nTherefore, we recommend you to :\n - Perform a backup of any critical data or app ;\n - Be patient after launching the migration : depending on your internet connection and hardware, it might take up to a few hours for everything to upgrade.",
|
||||
"migration_0003_general_warning": "Please note that this migration is a delicate operation. While the YunoHost team did its best to review and test it, the migration might still break parts of the system or apps.\n\nTherefore, we recommend you to :\n - Perform a backup of any critical data or app. More infos on https://yunohost.org/backup ;\n - Be patient after launching the migration : depending on your internet connection and hardware, it might take up to a few hours for everything to upgrade.\n\nAdditionally, the port for SMTP, used by external email clients like (Thunderbird or K9-Mail) was changed from 465 (SSL/TLS) to 587 (STARTTLS). The old port 465 will automatically be closed and the new port 587 will be opened in the firewall. You and your users *will* have to adapt the configuration of your email clients accordingly!",
|
||||
"migration_0003_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from an applist or are not flagged as 'working'. Consequently, we cannot guarantee that they will still work after the upgrade : {problematic_apps}",
|
||||
"migration_0003_modified_files": "Please note that the following files were found to be manually modified and might be overwritten at the end of the upgrade : {manually_modified_files}",
|
||||
"migration_0005_postgresql_94_not_installed": "Postgresql was not installed on your system. Nothing to do!",
|
||||
|
|
|
@ -1756,7 +1756,7 @@ def _check_manifest_requirements(manifest, app_instance_name):
|
|||
# Validate multi-instance app
|
||||
if is_true(manifest.get('multi_instance', False)):
|
||||
# Handle backward-incompatible change introduced in yunohost >= 2.3.6
|
||||
# See https://dev.yunohost.org/issues/156
|
||||
# See https://github.com/YunoHost/issues/issues/156
|
||||
yunohost_req = requirements.get('yunohost', None)
|
||||
if (not yunohost_req or
|
||||
not packages.SpecifierSet(yunohost_req) & '>= 2.3.6'):
|
||||
|
|
|
@ -15,6 +15,7 @@ from yunohost.service import (_run_service_command,
|
|||
manually_modified_files_compared_to_debian_default)
|
||||
from yunohost.utils.filesystem import free_space_in_directory
|
||||
from yunohost.utils.packages import get_installed_version
|
||||
from yunohost.firewall import firewall_allow, firewall_disallow
|
||||
|
||||
logger = getActionLogger('yunohost.migration')
|
||||
|
||||
|
@ -72,6 +73,11 @@ class MyMigration(Migration):
|
|||
os.system("apt autoremove --assume-yes")
|
||||
os.system("apt clean --assume-yes")
|
||||
|
||||
# We moved to port 587 for SMTP
|
||||
# https://busylog.net/smtp-tls-ssl-25-465-587/
|
||||
firewall_allow("Both", 587)
|
||||
firewall_disallow("Both", 465)
|
||||
|
||||
# Upgrade yunohost packages
|
||||
logger.warning(m18n.n("migration_0003_yunohost_upgrade"))
|
||||
self.restore_files_to_keep()
|
||||
|
@ -79,11 +85,13 @@ class MyMigration(Migration):
|
|||
self.upgrade_yunohost_packages()
|
||||
|
||||
def debian_major_version(self):
|
||||
# We rely on lsb_release instead of the python module "platform",
|
||||
# because "platform" relies on uname, which on some weird setups does
|
||||
# not behave correctly (still says running Jessie when lsb_release says
|
||||
# Stretch...)
|
||||
return int(check_output("lsb_release -r").split("\t")[1][0])
|
||||
# The python module "platform" and lsb_release are not reliable because
|
||||
# on some setup, they still return Release=8 even after upgrading to
|
||||
# stretch ... (Apparently this is related to OVH overriding some stuff
|
||||
# with /etc/lsb-release for instance -_-)
|
||||
# Instead, we rely on /etc/os-release which should be the raw info from
|
||||
# the distribution...
|
||||
return int(check_output("grep VERSION_ID /etc/os-release | tr '\"' ' ' | cut -d ' ' -f2"))
|
||||
|
||||
def yunohost_major_version(self):
|
||||
return int(get_installed_version("yunohost").split('.')[0])
|
||||
|
@ -228,6 +236,8 @@ class MyMigration(Migration):
|
|||
|
||||
# Make apt-get happy
|
||||
os.system("echo 'libc6 libraries/restart-without-asking boolean true' | debconf-set-selections")
|
||||
# Don't send an email to root about the postgresql migration. It should be handled automatically after.
|
||||
os.system("echo 'postgresql-common postgresql-common/obsolete-major seen true' | debconf-set-selections")
|
||||
|
||||
command = ""
|
||||
command += " DEBIAN_FRONTEND=noninteractive"
|
||||
|
|
|
@ -326,7 +326,7 @@ def service_log(name, number=50):
|
|||
for log_path in log_list:
|
||||
# log is a file, read it
|
||||
if not os.path.isdir(log_path):
|
||||
result[log_path] = _tail(log_path, int(number))
|
||||
result[log_path] = _tail(log_path, int(number)) if os.path.exists(log_path) else []
|
||||
continue
|
||||
|
||||
for log_file in os.listdir(log_path):
|
||||
|
@ -338,7 +338,7 @@ def service_log(name, number=50):
|
|||
if not log_file.endswith(".log"):
|
||||
continue
|
||||
|
||||
result[log_file_path] = _tail(log_file_path, int(number))
|
||||
result[log_file_path] = _tail(log_file_path, int(number)) if os.path.exists(log_file_path) else []
|
||||
|
||||
return result
|
||||
|
||||
|
@ -733,9 +733,9 @@ def _get_files_diff(orig_file, new_file, as_string=False, skip_header=True):
|
|||
else:
|
||||
orig_file = []
|
||||
|
||||
if not os.path.exists(new_file):
|
||||
if os.path.exists(new_file):
|
||||
with open(new_file, 'r') as new_file:
|
||||
new_file.readlines()
|
||||
new_file = new_file.readlines()
|
||||
else:
|
||||
new_file = []
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue