spksrc icon indicating copy to clipboard operation
spksrc copied to clipboard

Gitea installer creates shared folder on wrong volume

Open jeremydouglass opened this issue 1 year ago • 7 comments

Is this a new Bug?

  • [X] I checkd that the bug hasn't been reported before

Package Name

Gitea

Package Version

1.17.3-10

Device Model

DS1019+

Device Architecture

x86_64

Firmware Version

DSM 6.2.4-25556 Update 6

What happened?

The Gitea package install wizard asks for two separate volumes: one volume on the first wizard page ~~for the package~~ "to install the software", one volume on the second wizard page ~~for the repository shared folder~~ "to use for the gitea folder". It then incorrectly sets up a Shared Folder and user (sc-gitea) on the wrong volume. This bug is only exposed if the user chooses two different volumes during the package install wizard.

If the user configures with two different volumes -- e.g. "software" on Volume 1 and "folder" on Volume 3 -- the installer incorrectly creates the shared folder on the wrong volume, Volume 1. Clicking "Open" on the installed package launches the Gitea Initial Configuration webpage at :8418, and pre-populates the shared folder field with "/volume3/git/gitea-repositories" -- however, no such shared folder exists, because the wizard installer created the Shared Folder on the wrong volume, so submitting the web installer form fails with a permissions error:

The repository root path is invalid: mkdir /volume3/git/gitea-repositories: permission denied

Reproduction steps

1. Open DSM Package center
2. install the SynoCommunity Gitea package. In the package install wizard,
3. "Select a destination volume to install the software": Volume 1
4. "Basic Config: Select a volume to use for the gitea folder"
    - "volume name": Volume 3
    - "repository shared folder": git
5. Install
6. Click "Open"
7. In the "Initial Configuration" web page that opens on :8418, click "Install Gitea

Install fails with an error:

> The repository root path is invalid: mkdir /volume3/git/gitea-repositories: permission denied

Related files: https://github.com/SynoCommunity/spksrc/blob/3f0b2c5acb8c3c59853e053618c1c264fb2efcd3/spk/gitea/src/wizard/install_uifile

Install Log

2022/11/06 16:11:14	install gitea 1.17.3-10 Begin preinst
2022/11/06 16:11:14	Begin reload_inst_variables
2022/11/06 16:11:14	End reload_inst_variables
2022/11/06 16:11:14	Begin initialize_variables
2022/11/06 16:11:14	End initialize_variables
2022/11/06 16:11:14	===> Step preinst. USER=gitea GROUP= SHARE_PATH=/volume3/git
2022/11/06 16:11:14	Begin service_preinst
2022/11/06 16:11:14	End service_preinst
2022/11/06 16:11:14	install gitea 1.17.3-10 End preinst ret=[0]
2022/11/06 16:11:14	install gitea 1.17.3-10 Begin /bin/rm -rf /volume1/@appstore/gitea
2022/11/06 16:11:14	install gitea 1.17.3-10 End /bin/rm -rf /volume1/@appstore/gitea ret=[0]
2022/11/06 16:11:14	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/gitea
2022/11/06 16:11:14	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/gitea ret=[0]
2022/11/06 16:11:14	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea
2022/11/06 16:11:14	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea ret=[0]
2022/11/06 16:11:15	install gitea 1.17.3-10 Begin /bin/mkdir -p /var/packages/gitea
2022/11/06 16:11:15	install gitea 1.17.3-10 End /bin/mkdir -p /var/packages/gitea ret=[0]
2022/11/06 16:11:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/gitea/INFO
2022/11/06 16:11:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/gitea/INFO ret=[0]
2022/11/06 16:11:15	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/scripts
2022/11/06 16:11:15	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/scripts ret=[0]
2022/11/06 16:11:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/gitea/scripts
2022/11/06 16:11:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/gitea/scripts ret=[0]
2022/11/06 16:11:15	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/WIZARD_UIFILES
2022/11/06 16:11:15	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/WIZARD_UIFILES ret=[0]
2022/11/06 16:11:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/gitea/WIZARD_UIFILES
2022/11/06 16:11:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/gitea/WIZARD_UIFILES ret=[0]
2022/11/06 16:11:15	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/conf
2022/11/06 16:11:15	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/conf ret=[0]
2022/11/06 16:11:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/gitea/conf
2022/11/06 16:11:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/gitea/conf ret=[0]
2022/11/06 16:11:18	install gitea 1.17.3-10 Begin postinst
2022/11/06 16:11:18	Begin reload_inst_variables
2022/11/06 16:11:18	End reload_inst_variables
2022/11/06 16:11:18	Begin initialize_variables
2022/11/06 16:11:18	End initialize_variables
2022/11/06 16:11:18	===> Step postinst. USER=gitea GROUP= SHARE_PATH=/volume3/git
2022/11/06 16:11:18	Begin save_wizard_variables
2022/11/06 16:11:18	End save_wizard_variables
2022/11/06 16:11:18	Configuring /volume3/git
2022/11/06 16:11:19	SYNOSHARE data dump:
2022/11/06 16:11:19		 Name .......[git]
2022/11/06 16:11:19		 Comment ....[]
2022/11/06 16:11:19		 Path .......[/volume1/git]
2022/11/06 16:11:19		 Deny list ..[]
2022/11/06 16:11:19		 RW list ....[]
2022/11/06 16:11:19		 RO list ....[]
2022/11/06 16:11:19		 fType ......[2]
2022/11/06 16:11:19		 fBrowseable [yes]
2022/11/06 16:11:19		 FTPPrivilege[0]
2022/11/06 16:11:19		 Status .....[0x1880]
2022/11/06 16:11:19		 WinShare .....[yes]
2022/11/06 16:11:19		 ACL ..........[yes]
2022/11/06 16:11:19		 Skip smb perm.[yes]
2022/11/06 16:11:19		 Permit .......[yes]
2022/11/06 16:11:19		 RecycleBin....[no]
2022/11/06 16:11:19		 RecycleBinAdminOnly....[no]
2022/11/06 16:11:19		 HideUnreadable ........[no]
2022/11/06 16:11:19		 Snapshot browsing .....[no]
2022/11/06 16:11:19		 On Cold Storage Volume.....[no]
2022/11/06 16:11:19	SYNOSHARE ACL Perm List:
2022/11/06 16:11:19		 Name ............[git]
2022/11/06 16:11:19		 ACL RO List .....[]
2022/11/06 16:11:19		 ACL RW List .....[@administrators,sc-gitea]
2022/11/06 16:11:19		 ACL NA List .....[]
2022/11/06 16:11:19		 ACL Custom List .[]
2022/11/06 16:11:19	Begin service_postinst
2022/11/06 16:11:19	End service_postinst
2022/11/06 16:11:19	Granting 'sc-gitea' unix ownership on /volume1/@appstore/gitea/var
2022/11/06 16:11:19	install gitea 1.17.3-10 End postinst ret=[0]
2022/11/06 16:11:19	install gitea 1.17.3-10 Begin /bin/rm -rf /volume1/@tmp/pkginstall
2022/11/06 16:11:19	install gitea 1.17.3-10 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]
2022/11/06 16:11:20	install gitea 1.17.3-10 Begin start-stop-status start
2022/11/06 16:11:21	install gitea 1.17.3-10 End start-stop-status start ret=[0]
2022/11/06 16:31:27	uninstall gitea 1.17.3-10 Begin start-stop-status stop
2022/11/06 16:31:29	uninstall gitea 1.17.3-10 End start-stop-status stop ret=[0]
2022/11/06 16:31:29	uninstall gitea 1.17.3-10 Begin preuninst
2022/11/06 16:31:29	Begin reload_inst_variables
2022/11/06 16:31:29	End reload_inst_variables
2022/11/06 16:31:29	Begin initialize_variables
2022/11/06 16:31:29	End initialize_variables
2022/11/06 16:31:29	===> Step preuninst. USER=gitea GROUP= SHARE_PATH=
2022/11/06 16:31:29	uninstall gitea 1.17.3-10 End preuninst ret=[0]
2022/11/06 16:31:29	uninstall gitea 1.17.3-10 Begin /bin/rm -rf /volume1/@appstore/gitea
2022/11/06 16:31:29	uninstall gitea 1.17.3-10 End /bin/rm -rf /volume1/@appstore/gitea ret=[0]
2022/11/06 16:31:29	uninstall gitea 1.17.3-10 Begin postuninst
2022/11/06 16:31:29	Begin reload_inst_variables
2022/11/06 16:31:29	End reload_inst_variables
2022/11/06 16:31:29	Begin initialize_variables
2022/11/06 16:31:29	End initialize_variables
2022/11/06 16:31:29	===> Step postuninst. USER=gitea GROUP= SHARE_PATH=
2022/11/06 16:31:29	Removing user sc-gitea
2022/11/06 16:31:30	uninstall gitea 1.17.3-10 End postuninst ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin preinst
2022/11/06 16:34:15	Begin reload_inst_variables
2022/11/06 16:34:15	End reload_inst_variables
2022/11/06 16:34:15	Begin initialize_variables
2022/11/06 16:34:15	End initialize_variables
2022/11/06 16:34:15	===> Step preinst. USER=gitea GROUP= SHARE_PATH=/volume3/git
2022/11/06 16:34:15	Begin service_preinst
2022/11/06 16:34:15	End service_preinst
2022/11/06 16:34:15	install gitea 1.17.3-10 End preinst ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/rm -rf /volume1/@appstore/gitea
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/rm -rf /volume1/@appstore/gitea ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/gitea
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/gitea ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/mkdir -p /var/packages/gitea
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/mkdir -p /var/packages/gitea ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/gitea/INFO
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/gitea/INFO ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/scripts
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/scripts ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/gitea/scripts
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/gitea/scripts ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/WIZARD_UIFILES
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/WIZARD_UIFILES ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/gitea/WIZARD_UIFILES
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/gitea/WIZARD_UIFILES ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/conf
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/conf ret=[0]
2022/11/06 16:34:15	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/gitea/conf
2022/11/06 16:34:15	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/gitea/conf ret=[0]
2022/11/06 16:34:18	install gitea 1.17.3-10 Begin postinst
2022/11/06 16:34:18	Begin reload_inst_variables
2022/11/06 16:34:18	End reload_inst_variables
2022/11/06 16:34:18	Begin initialize_variables
2022/11/06 16:34:18	End initialize_variables
2022/11/06 16:34:18	===> Step postinst. USER=gitea GROUP= SHARE_PATH=/volume3/git
2022/11/06 16:34:18	Begin save_wizard_variables
2022/11/06 16:34:18	End save_wizard_variables
2022/11/06 16:34:18	Configuring /volume3/git
2022/11/06 16:34:18	SYNOSHARE data dump:
2022/11/06 16:34:18		 Name .......[git]
2022/11/06 16:34:18		 Comment ....[]
2022/11/06 16:34:18		 Path .......[/volume1/git]
2022/11/06 16:34:18		 Deny list ..[]
2022/11/06 16:34:18		 RW list ....[]
2022/11/06 16:34:18		 RO list ....[]
2022/11/06 16:34:18		 fType ......[2]
2022/11/06 16:34:18		 fBrowseable [yes]
2022/11/06 16:34:18		 FTPPrivilege[0]
2022/11/06 16:34:18		 Status .....[0x1880]
2022/11/06 16:34:18		 WinShare .....[yes]
2022/11/06 16:34:18		 ACL ..........[yes]
2022/11/06 16:34:18		 Skip smb perm.[yes]
2022/11/06 16:34:18		 Permit .......[yes]
2022/11/06 16:34:18		 RecycleBin....[no]
2022/11/06 16:34:18		 RecycleBinAdminOnly....[no]
2022/11/06 16:34:18		 HideUnreadable ........[no]
2022/11/06 16:34:18		 Snapshot browsing .....[no]
2022/11/06 16:34:18		 On Cold Storage Volume.....[no]
2022/11/06 16:34:18	SYNOSHARE ACL Perm List:
2022/11/06 16:34:18		 Name ............[git]
2022/11/06 16:34:18		 ACL RO List .....[]
2022/11/06 16:34:18		 ACL RW List .....[@administrators,sc-gitea]
2022/11/06 16:34:18		 ACL NA List .....[]
2022/11/06 16:34:18		 ACL Custom List .[]
2022/11/06 16:34:18	Begin service_postinst
2022/11/06 16:34:18	End service_postinst
2022/11/06 16:34:18	Granting 'sc-gitea' unix ownership on /volume1/@appstore/gitea/var
2022/11/06 16:34:18	install gitea 1.17.3-10 End postinst ret=[0]
2022/11/06 16:34:18	install gitea 1.17.3-10 Begin /bin/rm -rf /volume1/@tmp/pkginstall
2022/11/06 16:34:18	install gitea 1.17.3-10 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]
2022/11/06 16:34:20	install gitea 1.17.3-10 Begin start-stop-status start
2022/11/06 16:34:21	install gitea 1.17.3-10 End start-stop-status start ret=[0]
2022/11/06 16:35:38	uninstall gitea 1.17.3-10 Begin start-stop-status stop
2022/11/06 16:35:40	uninstall gitea 1.17.3-10 End start-stop-status stop ret=[0]
2022/11/06 16:35:41	uninstall gitea 1.17.3-10 Begin preuninst
2022/11/06 16:35:41	Begin reload_inst_variables
2022/11/06 16:35:41	End reload_inst_variables
2022/11/06 16:35:41	Begin initialize_variables
2022/11/06 16:35:41	End initialize_variables
2022/11/06 16:35:41	===> Step preuninst. USER=gitea GROUP= SHARE_PATH=
2022/11/06 16:35:41	uninstall gitea 1.17.3-10 End preuninst ret=[0]
2022/11/06 16:35:41	uninstall gitea 1.17.3-10 Begin /bin/rm -rf /volume1/@appstore/gitea
2022/11/06 16:35:41	uninstall gitea 1.17.3-10 End /bin/rm -rf /volume1/@appstore/gitea ret=[0]
2022/11/06 16:35:41	uninstall gitea 1.17.3-10 Begin postuninst
2022/11/06 16:35:41	Begin reload_inst_variables
2022/11/06 16:35:41	End reload_inst_variables
2022/11/06 16:35:41	Begin initialize_variables
2022/11/06 16:35:41	End initialize_variables
2022/11/06 16:35:41	===> Step postuninst. USER=gitea GROUP= SHARE_PATH=
2022/11/06 16:35:41	Removing user sc-gitea
2022/11/06 16:35:42	uninstall gitea 1.17.3-10 End postuninst ret=[0]
2022/11/06 16:48:33	install gitea 1.17.3-10 Begin preinst
2022/11/06 16:48:33	Begin reload_inst_variables
2022/11/06 16:48:33	End reload_inst_variables
2022/11/06 16:48:33	Begin initialize_variables
2022/11/06 16:48:34	End initialize_variables
2022/11/06 16:48:34	===> Step preinst. USER=gitea GROUP= SHARE_PATH=/volume3/git
2022/11/06 16:48:34	Begin service_preinst
2022/11/06 16:48:34	End service_preinst
2022/11/06 16:48:34	install gitea 1.17.3-10 End preinst ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/rm -rf /volume1/@appstore/gitea
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/rm -rf /volume1/@appstore/gitea ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/gitea
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/gitea ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/mkdir -p /var/packages/gitea
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/mkdir -p /var/packages/gitea ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/gitea/INFO
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/gitea/INFO ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/scripts
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/scripts ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/gitea/scripts
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/gitea/scripts ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/WIZARD_UIFILES
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/WIZARD_UIFILES ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/gitea/WIZARD_UIFILES
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/gitea/WIZARD_UIFILES ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/rm -rf /var/packages/gitea/conf
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/rm -rf /var/packages/gitea/conf ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/gitea/conf
2022/11/06 16:48:34	install gitea 1.17.3-10 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/gitea/conf ret=[0]
2022/11/06 16:48:34	install gitea 1.17.3-10 Begin postinst
2022/11/06 16:48:34	Begin reload_inst_variables
2022/11/06 16:48:34	End reload_inst_variables
2022/11/06 16:48:34	Begin initialize_variables
2022/11/06 16:48:34	End initialize_variables
2022/11/06 16:48:34	===> Step postinst. USER=gitea GROUP= SHARE_PATH=/volume3/git
2022/11/06 16:48:35	Begin save_wizard_variables
2022/11/06 16:48:35	End save_wizard_variables
2022/11/06 16:48:35	Configuring /volume3/git
2022/11/06 16:48:35	SYNOSHARE data dump:
2022/11/06 16:48:35		 Name .......[git]
2022/11/06 16:48:35		 Comment ....[]
2022/11/06 16:48:35		 Path .......[/volume1/git]
2022/11/06 16:48:35		 Deny list ..[]
2022/11/06 16:48:35		 RW list ....[]
2022/11/06 16:48:35		 RO list ....[]
2022/11/06 16:48:35		 fType ......[2]
2022/11/06 16:48:35		 fBrowseable [yes]
2022/11/06 16:48:35		 FTPPrivilege[0]
2022/11/06 16:48:35		 Status .....[0x1880]
2022/11/06 16:48:35		 WinShare .....[yes]
2022/11/06 16:48:35		 ACL ..........[yes]
2022/11/06 16:48:35		 Skip smb perm.[yes]
2022/11/06 16:48:35		 Permit .......[yes]
2022/11/06 16:48:35		 RecycleBin....[no]
2022/11/06 16:48:35		 RecycleBinAdminOnly....[no]
2022/11/06 16:48:35		 HideUnreadable ........[no]
2022/11/06 16:48:35		 Snapshot browsing .....[no]
2022/11/06 16:48:35		 On Cold Storage Volume.....[no]
2022/11/06 16:48:35	SYNOSHARE ACL Perm List:
2022/11/06 16:48:35		 Name ............[git]
2022/11/06 16:48:35		 ACL RO List .....[]
2022/11/06 16:48:35		 ACL RW List .....[@administrators,sc-gitea]
2022/11/06 16:48:35		 ACL NA List .....[]
2022/11/06 16:48:35		 ACL Custom List .[]
2022/11/06 16:48:35	Begin service_postinst
2022/11/06 16:48:35	End service_postinst
2022/11/06 16:48:35	Granting 'sc-gitea' unix ownership on /volume1/@appstore/gitea/var
2022/11/06 16:48:35	install gitea 1.17.3-10 End postinst ret=[0]
2022/11/06 16:48:35	install gitea 1.17.3-10 Begin /bin/rm -rf /volume1/@tmp/pkginstall
2022/11/06 16:48:35	install gitea 1.17.3-10 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]
2022/11/06 16:48:36	install gitea 1.17.3-10 Begin start-stop-status start
2022/11/06 16:48:37	install gitea 1.17.3-10 End start-stop-status start ret=[0]

Service Log

No response

Other Logs

No response

jeremydouglass avatar Nov 07 '22 01:11 jeremydouglass

You misinterpreted things.

The package is not asking on which volume to store the package itself. The package is installed in the location configured in packages center of DSM (located under settings).

During the installation the package ask for a volume where to create the shared folder which you can define in the next question. So volume and name together will be created for this package.

BenjV avatar Nov 07 '22 12:11 BenjV

Hi BenjV:

Thank you for your time. I fear that you have misunderstood "one for the package" -- I was referring to the first of two wizard pages that ask volume questions. Please reread this issue. To summarize:

The wizard asks and I answer:

  1. "Basic Config: Select a volume to use for the gitea folder"
    • "volume name": Volume 3
    • "repository shared folder": git

The installer then creates a new shared folder on the wrong volume It creates "git" with permissions for sc-gitea on Volume 1, not Volume 3!

This is a bug.

The user should not be able to select "Volume 3" on the basic config page and have a folder created on Volume 1.

And, as mentioned, it then causes the downstream installer to fail -- it pre-populates its forms with /volume3/, but the installer has created the folder on /volume1/, which is the wrong volume.

jeremydouglass avatar Nov 07 '22 18:11 jeremydouglass

The package is not asking on which volume to store the package itself.

Thank you, I do already understand this! Please try the reproduction steps I provided -- as you will see, it asks for a volume twice, then uses the wrong one.

jeremydouglass avatar Nov 07 '22 18:11 jeremydouglass

I cannot test it because I do not have a Nas with multiple volumes. I don't see any problem in the .spk itself.

When you start the package and you are getting the config page, are alle the defaults volume1 or are they volume3 ?

As a workaround you could create a shared folder named 'git' on volume3 yourself and grant the "system internal user" sc-gitea access. Then you could try to start gitea and see if you can finish the config page.

BenjV avatar Nov 08 '22 09:11 BenjV

Hi BenjV -- sorry that you are not able to test the bug.

When you start the package and you are getting the config page, are alle the defaults volume1 or are they volume3 ?

When I start the package and get the web config page, the gitea shared folder is pre-listed on the web config page as "/volume3/git/gitea-repositories". However, the install script actually created and gave sc-gitea permissions to a different folder, "/volume1/git/gitea-repositories." So:

  1. The user is asked to define two volumes, volA and volB -- volB is the shared repositories folder.
  2. The install script incorrectly creates a shared folder at volA/git/gitea-repositories
  3. It then writes some configurations(?) and launches the package web config, which has the form field correctly pre-populated with volB/git/gitea-repositories -- but that folder doesn't exist.

As a workaround you could create a shared folder named 'git' on volume3 yourself and grant the "system internal user" sc-gitea access. Then you could try to start gitea and see if you can finish the config page.

Thanks. Another workaround is to set both "Select a destination volume" and "Basic Config: Select a volume" both the same volume. This installs correctly.

jeremydouglass avatar Nov 08 '22 23:11 jeremydouglass

@wkobiela is it possible that you can have a look?

publicarray avatar Nov 09 '22 09:11 publicarray

The problem is partly a DSM 6 issue and partly the package. The share is created by the package center via the resource file if the share not yet exists. On DSM 6 this methode always creates shares on the same volume where the package is installed in this case volume1

The share should first be created in the preinstall phase with the "synoshare" command but there it only creates a folder with the "mkdir" command.

I created a package for you, so you can test it. You can find it on my github, download it, do a manual install and let me know if it works. My github is found here: https://github.com/BenjV/SYNO-packages

BenjV avatar Nov 09 '22 12:11 BenjV

@BenjV can you provide your fork link/code changes? Is your package fixing the problem? I'm not able to reproduce this, as I do not have multiple shares

wkobiela avatar Jan 15 '23 09:01 wkobiela

@jeremydouglass @wkobiela DSM always creates shared folders on the same volume as the package is installed to, when the share is created at installation time. This is a limitation by DSM, as the shared folder defined by package resources do not contain a property for the volume.

If you want to use a different volume for the shared folder of gitea, than you have to manually create that shared folder in DSM and use the respective volume.

Than you can chose the name of that folder in the installation wizard. The volume selected in the installation wizard is never used for creating shared folders in packages using the resources to define shared folders. If you install like this, you probably have to adjust the settings in the gitea config file (and/op in etc/installer_variables) as our current package installers might not be aware of this (maybe this is not the case when you select the same volume in the wizard as the manually created share uses).


@publicarray, @th0ma7 IMHO we need a redesign regarding packages with shared folder usage for DSM 7 (and DSM 6 with USE_DATA_SHARE_WORKER = yes)

  • remove the volume selection from wizard UI
  • the evaluation of the SHARE_PATH variable (and related SHARE_VOLUME and SHARE_NAME variables) for service installers and service functions must be adjusted to read the volume from the DSM shared folders (this must be done after new shared folders are created).

related packages so far:

  • deluge
  • gitea
  • google-fonts
  • sabnzbd
  • transmission
  • kiwix
  • minio
  • nzbget
  • ps3netsrv
  • subversion (WIP in #5296)

hgy59 avatar Feb 27 '23 13:02 hgy59

This issue was addressed in #5929.

mreid-tt avatar Jan 22 '24 09:01 mreid-tt