openhab / openhab-syno-spk

openHAB Synology SPK Install Package
Eclipse Public License 2.0
161 stars 42 forks source link

2.2.0.008-SNAPSHOT does not install on DSM 6.1.3-15152 Update 8 #108

Closed jaghatei closed 6 years ago

jaghatei commented 6 years ago

I tried to install 2.2.0.008 yesterday on a ds214play with DSM 6.1.3-15152 Update 8. By whatever reason the preinst and postinst routines are not called during installation procedure leaving the package dead. Calling these scripts manually after setting SYNOPKG_PKGNAME=openHAB2 and SYNOPKG_PKGDEST=/volume1/\@appstore/openHAB2 did install openHAB2 successfully. So I assume this must be a problem in above DSM version package installer not calling / not finding the package installation scripts. During deinstallation the preuninst and postuninst routines are called. I have not found any hint in any log explaining this issue, only the absence of the preinst and postinst parts in openHAB2-installation.log.

rkrausen commented 6 years ago

Same problem here... DS-916+ DSM 6.1.3-15152 Update 8

loovanloon commented 6 years ago

Same here on DS214 / DSM 6.1.3-15152 Update 8.

SchoppAx commented 6 years ago

Hi guys,

I will try to fix the issue this weekend.

cniweb commented 6 years ago

I think that's a problem with DSM 6.1. I can not test it because I only have DSM version 4.1 and 5.2. @SchoppAx Can you please take a look at this?

zhelyan commented 6 years ago

same

 cat /var/log/openHAB2-start_stop.log
Start service
  call start.sh.
  FAILED (su)
Stop service.
  openHAB is not running
done.
Start service
  call start.sh.
  FAILED (su)
Stop service.
  openHAB is not running
done.

The openhab2 user doesn't exist

SchoppAx commented 6 years ago

The problem is the ${OH_USERDATA} variable. You can't use this var instead of ${SYNOPKG_PKGDEST}/userdata, because if the folder dosen't exists the installation later tries to access the non existing path.

I will create a PR with the rollback to ${SYNOPKG_PKGDEST}/userdata ;-)

cniweb commented 6 years ago

OK, I released a new version, try it, please.

Starlordi commented 6 years ago

Still not working, after installation I am not able to start the package.

boukamp commented 6 years ago

Same issue here... just tried with the new version...

SchoppAx commented 6 years ago

Please test this pre-release: https://github.com/SchoppAx/openhab-syno-spk/releases/download/2.2.0.008-SNAPSHOT/openHAB-2.2.0.008-SNAPSHOT-syno-noarch-0.001.spk

jaghatei commented 6 years ago

Yes the installation of the new snapshot is successful.

Issue seems to base on a file rights problem in scripts folder of pkg. After setting executable bit for group and others on files in script folder of original pkg file installation works. So I suppose that with update 8 Synology changed the way of installation from default with root to some other user, but keeps deinstallation done by root. That is how it works: -rwxr-xr-x 1 root root 15418 Nov 5 20:15 installer.sh -rwxr-xr-x 1 root root 52 Nov 5 20:15 postinst -rwxr-xr-x 1 root root 52 Nov 5 20:15 postuninst -rwxr-xr-x 1 root root 52 Nov 5 20:15 postupgrade -rwxr-xr-x 1 root root 76 Nov 5 20:15 preinst -rwxr-xr-x 1 root root 52 Nov 5 20:15 preuninst -rwxr-xr-x 1 root root 76 Nov 5 20:15 preupgrade -rwxr-xr-x 1 root root 49 Nov 5 20:15 start-stop-status -rwxr-xr-x 1 root root 3791 Nov 5 20:15 start-stop-status.sh

this is how it is provided in original snapshot after unpack to /var/packages/openHAB2/scripts: -rwxr--r-- 1 root root 15418 Nov 5 20:15 installer.sh -rwxr--r-- 1 root root 52 Nov 5 20:15 postinst -rwxr--r-- 1 root root 52 Nov 5 20:15 postuninst -rwxr--r-- 1 root root 52 Nov 5 20:15 postupgrade -rwxr--r-- 1 root root 76 Nov 5 20:15 preinst -rwxr--r-- 1 root root 52 Nov 5 20:15 preuninst -rwxr--r-- 1 root root 76 Nov 5 20:15 preupgrade -rwxr--r-- 1 root root 49 Nov 5 20:15 start-stop-status -rwxr--r-- 1 root root 3791 Nov 5 20:15 start-stop-status.sh

with your new snapshot you already set the rigths to -rwxrwxrwx for all files in scripts folder.

loovanloon commented 6 years ago

Yes! Thank you, works like a charm. I cannot tell you how happy I am: just installed the package on my Syno, and copied all the addons, conf, and userdata map from my windows installation over to the syno-installation. Only had to install the bindings again through the Paper UI. The complete installation now runs on the syno. This gives me a lot of flexibility (and data security).

Thank you @cniweb Christian and @SchoppAx ! For all your time and efforts. (only add instruction about the USERDATA map to the installation instruction texts. I will open a new issue for that)

Starlordi commented 6 years ago

Hello, your pre-release worked fine for me, Thanks

cniweb commented 6 years ago

@jaghatei Is there still a problem here? Can we close the issue then?

Starlordi commented 6 years ago

only the pre-release:

https://github.com/SchoppAx/openhab-syno-spk/releases/download/2.2.0.008-SNAPSHOT/openHAB-2.2.0.008-SNAPSHOT-syno-noarch-0.001.spk

worked. It needs to be updated on the download homepage....

cniweb commented 6 years ago

Ahh, OK, I replaced it.

jaghatei commented 6 years ago

can be closed.