YunoHost-Apps / gitea_ynh

Gitea is a fork of Gogs. A git platform, Mirror of https://framagit.org/YunoHost-Apps/gitea_ynh
https://gitea.io
MIT License
22 stars 17 forks source link

upgrade failed - from 1.14.5~ynh1 to 1.17.2~ynh2 #61

Closed ultimoistante closed 1 year ago

ultimoistante commented 1 year ago

Describe the bug

Upgrade failed, due to an unterminated `s' command on sed expression, with custom ssh port value

Context

Steps to reproduce

Logs

https://paste.yunohost.org/raw/eroxipakug

Relevant lines: 2022-11-19 14:34:30,206: DEBUG - + match_string=SSH_PORT__ 2022-11-19 14:34:30,206: DEBUG - + match_string=SSH_PORT 2022-11-19 14:34:30,207: DEBUG - + replace_string='7022 2022-11-19 14:34:30,207: DEBUG - 22' 2022-11-19 14:34:30,208: DEBUG - + replace_string='7022 2022-11-19 14:34:30,208: DEBUG - 22' 2022-11-19 14:34:30,208: DEBUG - + replace_string='7022 2022-11-19 14:34:30,210: DEBUG - 22' 2022-11-19 14:34:30,211: DEBUG - + sed --in-place 's@__SSH_PORT@7022 2022-11-19 14:34:30,211: DEBUG - 22@g' /opt/gitea/custom/conf/app.ini 2022-11-19 14:34:30,216: WARNING - sed: -e expression #1, char 19: unterminated `s' command 2022-11-19 14:34:30,218: DEBUG - + ynh_exit_properly 2022-11-19 14:34:30,718: DEBUG - + ynh_clean_setup

ultimoistante commented 1 year ago

sorry, found the issue (my fault):

in /etc/ssh/sshd_config i had following lines:

# This configuration has been automatically generated
# by YunoHost

Protocol 2
Port 7022
# Port 22

ListenAddress ::
ListenAddress 0.0.0.0

error was caused by this comment:

# Port 22

hope this can be useful for someone.