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

Update Gitea to v1.20.6 #5931

Closed
wants to merge 10 commits into from
Closed

Conversation

wkobiela
Copy link
Contributor

@wkobiela wkobiela commented Nov 19, 2023

Description

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

@wkobiela wkobiela mentioned this pull request Nov 19, 2023
6 tasks
@efussi
Copy link

efussi commented Nov 22, 2023

@hgy59 Can you please review this PR (and merge, if it's ok)?

@hgy59
Copy link
Contributor

hgy59 commented Nov 23, 2023

gitea package should use the redesigned shared folder handling to fix #5481

  • use SERVICE_WIZARD_SHARENAME instead of SERVICE_WIZARD_SHARE
  • adjust the install wizard to ask for the share name only
  • remove USE_DATA_SHARE_WORKER = yes (it is not used when SERVICE_WIZARD_SHARENAME is defined)
  • validate that on package upgrade the etc/installer-variables file variables SHARE_PATH and SHARE_NAME are correct (might need migration code) this is not mandatory, but would be required when an upgrade wizard will be added

The current spk/demoservice code can be used as an example of new shared folder handling.

@wkobiela
Copy link
Contributor Author

I think that I updated these points

  • use SERVICE_WIZARD_SHARENAME instead of SERVICE_WIZARD_SHARE
  • adjust the install wizard to ask for the share name only
  • remove USE_DATA_SHARE_WORKER = yes (it is not used when SERVICE_WIZARD_SHARENAME is defined)

Unfortunately, for now I don't have an option to test this package

@hgy59
Copy link
Contributor

hgy59 commented Nov 25, 2023

Unfortunately, for now I don't have an option to test this package

@wkobiela I did a fresh installation of the published gitea 1.17.3-10 on DSM 7.2.1 (virtual DSM x86_64).
The initial etc/installer-variables file has one entry

SHARE_PATH=/volume1/gitea

Then I did an update to 1.20.5-11 with the package built by latest github build action.
It took some time until the web ui got available after the update (gitea log shows that the db migration took ~ 15 sec., but it seemed like 2-3 minutes to get the ui back).
The etc/installer-variables file after update looks good:

SHARE_PATH=/volume1/gitea
SHARE_NAME=gitea

There are two configuration issues with this update, displayed on the configuration page:

  1. lfs path
    Deprecated config option [server] LFS_CONTENT_PATH present. Use [lfs] PATH instead. This fallback will be/has been removed in v1.19.0 (and 2 more)

    To solve this, I had to remove the LFS_CONTENT_PATH in the [server] section (the PATH in the [lfs] section was already set with the LFS_CONTENT_PATH value) in the conf.ini file.
    To get rid of the warning I had to restart gitea (in the package center or with command line tool synopkg)

    Then the next warning/error popped up on the configuration page:

  2. router log
    Deprecated config option [log] ROUTER present. Use [log] logger.router.MODE instead. This fallback will be/has been removed in 1.21

    As the text says, I had to rename ROUTER to logger.router.MODE in the [log] section.

    To get rid of the warning I had to restart gitea again.

I don't know whether it is worth to add upgrade code in the service-setup.sh script to migrate the confi.ini file (sounds sophisticated).
Another attempt would be to add an upgrade wizard page, telling that manual configuration changes are needed after package upgrade and a manual service restart is required to apply the changes.
Or - if manual adjustments are the regular case for gitea updates - we could leaf it as is.

Anyway, it is time to add a FAQ page for the gitea package in our wiki. at least to document the location of the configuration file at:
/var/packages/gitea/var/conf.ini

@hgy59
Copy link
Contributor

hgy59 commented Nov 25, 2023

@wkobiela second test with a new installation of gitea 1.20.5-11 built by latest github build action.

The installed conf.ini file is still deprecated.

I propose to add a var/conf.ini file to the package with placeholders for the wizard variables and not to generate the file in service-setup.sh.
For DSM 7 this works like a charm and an existing conf.ini file is not touched on upgrade but the file of the new installation package is installed with the name conf.ini.new.
For DSM 6 it needs some backup/restore code to not overwrite conf.ini of the former installation.

Hints:
You should not need to use ${wizard_shared_folder_name} in service-setup.sh. You can use the variable SHARE_PATH.

For DSM 6 the home folder SYNOPKG_PKGHOME="${SYNOPKG_PKGDEST}" must be replaced by SYNOPKG_PKGHOME="${SYNOPKG_PKGVAR}" or a subfolder of ${SYNOPKG_PKGVAR}. Otherwise the content gets lost on package updates.

The service_preinst function must be removed. With the redesigned shared folder handling the creation of the shared folder is done by DSM data share worker (including the folder permissions) for DSM 6 too.

@wkobiela
Copy link
Contributor Author

@hgy59 thank you for your tests and detailed description. I'm kind of fresh with deeply modifying synology packages, but tried to implement your thoughts. I hope we are going in a right direction.

I will try to setup xpenology in the meantime to test this package myself.

spk/gitea/src/config.ini Outdated Show resolved Hide resolved
@wkobiela
Copy link
Contributor Author

wkobiela commented Nov 26, 2023

Tested fresh install on Xpenology DVA3221 DSM 7.1-42661 Update 1 - works OK.
Tested manual upgrade on Xpenology DVA3221 DSM 7.1-42661 Update 1 from actual 1.17 package to 1.20.5 - upgrade works OK. Need some minor manual adjustments in conf.ini file and package restart as you mentioned, but other than that works fine. I will change a little description in upgrade_uifile to be more understandable.

Do not have an option to test on DSM6 now

@efussi
Copy link

efussi commented Nov 28, 2023

@wkobiela while this PR is stil in progress, should we right away bump to Gitea v1.20.6 which was just released (https://github.com/go-gitea/gitea/releases/tag/v1.20.6)?

@wkobiela
Copy link
Contributor Author

wkobiela commented Nov 28, 2023

Tested fresh install on Xpenology DVA3221 DSM 7.1-42661 Update 1 - works OK.
Tested manual upgrade on Xpenology DVA3221 DSM 7.1-42661 Update 1 from actual 1.17 package to 1.20.6 - upgrade works OK.

Do not have an option to test on DSM6 now - is there someone who can help clean install and upgrade on DSM6?

@wkobiela wkobiela changed the title Update Gitea to v1.20.5 Update Gitea to v1.20.6 Nov 28, 2023
@hgy59 hgy59 mentioned this pull request Nov 30, 2023
8 tasks
@wkobiela
Copy link
Contributor Author

Is here everything ok? Can we merge it?

@hgy59
Copy link
Contributor

hgy59 commented Dec 21, 2023

@mreid-tt can you please have a look here at the update of the shared folder (with the findings of #5962).

@hgy59
Copy link
Contributor

hgy59 commented Dec 21, 2023

@wkobiela there is a translation of the wizard page to plk in #5700. Can we add (and probably adjust) this here?

@wkobiela
Copy link
Contributor Author

wkobiela commented Jan 1, 2024

@hgy59 added translation, is there anything more I can do?

@Bruno21
Copy link

Bruno21 commented Jan 12, 2024

Sorry if it's the wrong place to post. I'm unable to install gitea with a mariadb database (Synology package). I'm trying port 3006/3007, localhost/127.0.0.1.
I have to use SQLite

@hgy59

This comment was marked as outdated.

@wkobiela
Copy link
Contributor Author

wkobiela commented Jan 12, 2024

Sorry if it's the wrong place to post. I'm unable to install gitea with a mariadb database (Synology package). I'm trying port 3006/3007, localhost/127.0.0.1. I have to use SQLite

I just installed package and connected it with mariadb package - default port is 3306 not 3006:
image

@hgy59 hgy59 mentioned this pull request Jan 15, 2024
3 tasks
@hgy59
Copy link
Contributor

hgy59 commented Jan 22, 2024

obsoleted by #5929

@hgy59 hgy59 closed this Jan 22, 2024
@wkobiela wkobiela deleted the v1.20.5 branch January 22, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants