Coder Social home page Coder Social logo

jdel / sspks Goto Github PK

View Code? Open in Web Editor NEW
256.0 256.0 63.0 1.39 MB

A very simple Synology Package Server, reverse engineered from the official Synology package repository and SynoCommunity.

License: GNU General Public License v3.0

CSS 6.37% JavaScript 2.28% PHP 71.39% Makefile 1.38% Shell 7.09% Dockerfile 1.19% Mustache 10.29%

sspks's People

Contributors

4sag avatar bipsendk avatar bwynants avatar colin1497 avatar dependabot[bot] avatar eburud avatar itn3rd77 avatar jdel avatar martinrothschink avatar mbirth avatar picrap avatar strausmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sspks's Issues

Image missing and giving error in log.

First thank you for creating and running this repository.

Today i cleaned up my packed sources list, and removed some not working url's.
I checked the var/log/messages file for errors, and saw that i was also getting an error from nimloth.pl.
Seems to be a missing image, probably forgot to add to the website.?

May  2 21:22:36 Synology PkgSynoMan.cgi: pkgcurltool.cpp:569 http://synology.nimloth.pl/packages/default_package_icon_72.png, Failed to request packages, httpResponseCode=404

Noting serious, but thought you might want to know. :)

Check available disk space before trying to unpack files

If there's no disk space available, trying to unpack metadata from packages will result in error messages like:

failed: Cannot extract "INFO" to "/tmp/INFO", copying contents failed'

And the file being 0 Bytes in size.

Just to be sure, we should check the available disk space and return a better error message.

Multible architecture issue

It is possible to have multible arch in the INFO-file (i.e. arch="88f8261 arm370")
sspkr cannot handle this.
regards
Erik Palsbo

DS411+II and DS716+II give an Invalid Location error when referring to a sspks repository

I've been trying to add an sspks repository to my DS411+II for a while now. I thought something was wrong with my Synology, but with Synology support we found that the issue is related to sspks. Package Center shows "Invalid Location".

When we run the following curl command, we can see that sspks works correctly for DS411+, but not for DS411+II:
curl -L -A "synology_x86_411+ DSM6.1-14902 (package)" --data "package_update_channel=stable&unique=synology_x86_411+&build=14903&language=enu&major=6&arch=x86&minor=1&timezone=Amsterdam" "http://www.jadahl.com/domoticz_stable_6/"

vs

curl -L -A "synology_x86_411+II DSM6.1-14902 (package)" --data "package_update_channel=stable&unique=synology_x86_411+II&build=14903&language=enu&major=6&arch=x86&minor=1&timezone=Amsterdam" "http://www.jadahl.com/domoticz_stable_6/"

Maybe Synology changed something, but I found that the issue is related to the preg_match on line 36 of index.php.

Since the + is a special character for regular expression, this fails. The + should be escaped and I think the following suggestion is a good solution?

Change line 34 from:
$unique = trim($_POST['unique']);
to
$unique = preg_quote(trim($_POST['unique']));

Thanks!
Jorik

DSM 7.0

Do you have an idea when the package will be compatible with new DSM 7.0

HTTPS Support?

Hi,

actually i host my server under http://spk.domain.tld:8080, but i want it a little bit saver.
The problem is, that https://spk.domain.tld:8080 does not work.
On which port the server is running for https...port 8443 is also not working inside the container.

THX for your help

BR
DKeppi

Deactivate qinst or check for WIZARD_UIFILES dir

Hi jdel,

sorry for another question.

I have a package where i need the wizard during installation to fill out the mysql root password, but in lib/SSpkS/Output/JsonOutput.php the standard for the server is "qinst = true"

Where i could change that to false via Docker image?

THX & BR
DKeppi

USB Drivers not working on DSM6.2 (RS820+)

Hello,
I'm trying to install USB Drivers to support RFXCOM by USB on Synology NAS Server, DSM version 6.2.3-25426 Update 2.
The server version is RS820+.

DSM accepts to install this driver http://www.jadahl.com/drivers_6.2/?arch=denverton, but dmesg looks to report errors :
[ 2453.590556] usbserial: version magic '4.4.59 SMP preempt mod_unload ' should be '4.4.59+ SMP preempt mod_unload ' [ 2453.603359] ftdi_sio: Unknown symbol usb_serial_handle_sysrq_char (err 0) [ 2453.610386] ftdi_sio: Unknown symbol usb_serial_generic_open (err 0) [ 2453.617029] ftdi_sio: Unknown symbol usb_serial_handle_dcd_change (err 0) [ 2453.624327] ftdi_sio: Unknown symbol usb_serial_deregister_drivers (err 0) [ 2453.631636] ftdi_sio: Unknown symbol usb_serial_generic_unthrottle (err 0) [ 2453.638795] ftdi_sio: Unknown symbol usb_serial_handle_break (err 0) [ 2453.645342] ftdi_sio: Unknown symbol usb_serial_generic_get_icount (err 0) [ 2453.652386] ftdi_sio: Unknown symbol usb_serial_generic_tiocmiwait (err 0) [ 2453.659472] ftdi_sio: Unknown symbol usb_serial_generic_throttle (err 0) [ 2453.666402] ftdi_sio: Unknown symbol usb_serial_register_drivers (err 0) [ 2453.680843] cp210x: Unknown symbol usb_serial_generic_open (err 0) [ 2453.687413] cp210x: Unknown symbol usb_serial_generic_close (err 0) [ 2453.693941] cp210x: Unknown symbol usb_serial_deregister_drivers (err 0) [ 2453.700967] cp210x: Unknown symbol usb_serial_register_drivers (err 0) [ 2453.714643] pl2303: Unknown symbol usb_serial_handle_sysrq_char (err 0) [ 2453.721465] pl2303: Unknown symbol usb_serial_generic_open (err 0) [ 2453.728387] pl2303: Unknown symbol usb_serial_generic_close (err 0) [ 2453.734864] pl2303: Unknown symbol usb_serial_handle_dcd_change (err 0) [ 2453.742010] pl2303: Unknown symbol usb_serial_deregister_drivers (err 0) [ 2453.748897] pl2303: Unknown symbol usb_serial_handle_break (err 0) [ 2453.755582] pl2303: Unknown symbol usb_serial_generic_tiocmiwait (err 0) [ 2453.762441] pl2303: Unknown symbol usb_serial_register_drivers (err 0) [ 2453.775766] ch341: Unknown symbol usb_serial_generic_open (err 0) [ 2453.782219] ch341: Unknown symbol usb_serial_generic_close (err 0) [ 2453.788625] ch341: Unknown symbol usb_serial_handle_dcd_change (err 0) [ 2453.795348] ch341: Unknown symbol usb_serial_generic_resume (err 0) [ 2453.801968] ch341: Unknown symbol usb_serial_deregister_drivers (err 0) [ 2453.808834] ch341: Unknown symbol usb_serial_generic_tiocmiwait (err 0) [ 2453.815894] ch341: Unknown symbol usb_serial_register_drivers (err 0) [ 2453.827709] ti_usb_3410_5052: Unknown symbol usb_serial_deregister_drivers (err 0) [ 2453.835490] ti_usb_3410_5052: Unknown symbol usb_serial_generic_get_icount (err 0) [ 2453.843996] ti_usb_3410_5052: Unknown symbol usb_serial_generic_tiocmiwait (err 0) [ 2453.852243] ti_usb_3410_5052: Unknown symbol usb_serial_register_drivers (err 0)
And, RFXCom is not working properly. lsusb detects the usb device :
Bus 001 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
The connection is visible in dmesg :
[ 2502.626166] usb 1-3.4: new full-speed USB device number 8 using xhci_hcd
But no ttyACMx or ttyUSB is created.

Could it be an issue due to new DSM version ?
Thanks.

Question - auto install dependencies

Hello, first of all, thanks for sharing your work, it works great!
Do you know if it is possible to automatically install depending packages (silently) ?
Some of the official Synology packages like phpMyAdmin-4.6.5-0170.spk does that - when it is launched from Package Center, But if the spk is downloaded and installed manually, it just shows the message regarding dependencies. So it seem to be a feature of the spk server.
Jens

Question: production and test server - recommended solution?

Hello,
I need two different spk servers, one for production and one for test. The production server runs on AWS/EC2 and to save money, it'd be nice use the same instance.
What are my options, can I run a second spks serving on different port? Any creative ideas are welcome
Thanks Jens

USB Serial Drivers not work on my D218+

Hi,

i'm trying your driver to get a CP2102 (arduino) working on my DS 218+. PKG was installed successfully but modules cannot be loaded, seems compiled for a slight different kernel, here is the error:

[1592416.209663] usbserial: version magic '4.4.59 SMP preempt mod_unload ' should be '4.4.59+ SMP preempt mod_unload '
[1592416.225010] ftdi_sio: module verification failed: signature and/or required key missing - tainting kernel
[1592416.237835] ftdi_sio: Unknown symbol usb_serial_handle_sysrq_char (err 0)
[1592416.245752] ftdi_sio: Unknown symbol usb_serial_generic_open (err 0)
[1592416.253761] ftdi_sio: Unknown symbol usb_serial_handle_dcd_change (err 0)
[1592416.261992] ftdi_sio: Unknown symbol usb_serial_deregister_drivers (err 0)
[1592416.270593] ftdi_sio: Unknown symbol usb_serial_generic_unthrottle (err 0)
[1592416.278596] ftdi_sio: Unknown symbol usb_serial_handle_break (err 0)
[1592416.285983] ftdi_sio: Unknown symbol usb_serial_generic_get_icount (err 0)
[1592416.293930] ftdi_sio: Unknown symbol usb_serial_generic_tiocmiwait (err 0)
[1592416.301881] ftdi_sio: Unknown symbol usb_serial_generic_throttle (err 0)
[1592416.309947] ftdi_sio: Unknown symbol usb_serial_register_drivers (err 0)
[1592416.323013] cp210x: Unknown symbol usb_serial_generic_open (err 0)
[1592416.330294] cp210x: Unknown symbol usb_serial_generic_close (err 0)
[1592416.337647] cp210x: Unknown symbol usb_serial_deregister_drivers (err 0)
[1592416.345454] cp210x: Unknown symbol usb_serial_register_drivers (err 0)
[1592416.357956] pl2303: Unknown symbol usb_serial_handle_sysrq_char (err 0)
[1592416.365720] pl2303: Unknown symbol usb_serial_generic_open (err 0)
[1592416.372883] pl2303: Unknown symbol usb_serial_generic_close (err 0)
[1592416.380149] pl2303: Unknown symbol usb_serial_handle_dcd_change (err 0)
[1592416.387797] pl2303: Unknown symbol usb_serial_deregister_drivers (err 0)
[1592416.395520] pl2303: Unknown symbol usb_serial_handle_break (err 0)
[1592416.402748] pl2303: Unknown symbol usb_serial_generic_tiocmiwait (err 0)
[1592416.410834] pl2303: Unknown symbol usb_serial_register_drivers (err 0)
[1592416.423975] ch341: Unknown symbol usb_serial_generic_open (err 0)
[1592416.431071] ch341: Unknown symbol usb_serial_generic_close (err 0)
[1592416.438337] ch341: Unknown symbol usb_serial_handle_dcd_change (err 0)
[1592416.446329] ch341: Unknown symbol usb_serial_generic_resume (err 0)
[1592416.453639] ch341: Unknown symbol usb_serial_deregister_drivers (err 0)
[1592416.461304] ch341: Unknown symbol usb_serial_generic_tiocmiwait (err 0)
[1592416.468953] ch341: Unknown symbol usb_serial_register_drivers (err 0)
[1592416.482084] ti_usb_3410_5052: Unknown symbol usb_serial_deregister_drivers (err 0)
[1592416.490814] ti_usb_3410_5052: Unknown symbol usb_serial_generic_get_icount (err 0)
[1592416.499566] ti_usb_3410_5052: Unknown symbol usb_serial_generic_tiocmiwait (err 0)
[1592416.508287] ti_usb_3410_5052: Unknown symbol usb_serial_register_drivers (err 0)

this is my kernel version

# uname -a
Linux lynx-DS 4.4.59+ #23824 SMP PREEMPT Tue Feb 12 16:52:55 CST 2019 x86_64 GNU/Linux synology_apollolake_218+

and DSM version:

# cat /etc.defaults/VERSION
majorversion="6"
minorversion="2"
productversion="6.2.1"
buildphase="GM"
buildnumber="23824"
smallfixnumber="6"
packing="iSCSI"
packing_id="1"
builddate="2019/02/12"
buildtime="17:00:41"

Thanks!

disk_free_space(): Value too large for defined data type

After uploading Simple SPK Server to my hoster strato.de I got the following Warning popping up.

Warning: disk_free_space(): Value too large for defined data type in /mnt/web211/b3/65/54228465/htdocs/spk/lib/SSpkS/Package/Package.php on line 199 Warning: disk_free_space(): Value too large for defined data type in /mnt/web211/b3/65/54228465/htdocs/spk/lib/SSpkS/Package/Package.php on line 199 Warning: disk_free_space(): Value too large for defined data type in /mnt/web211/b3/65/54228465/htdocs/spk/lib/SSpkS/Package/Package.php on line 199 Warning: disk_free_space(): Value too large for defined data type in /mnt/web211/b3/65/54228465/htdocs/spk/lib/SSpkS/Package/Package.php on line 199 Warning: disk_free_space(): Value too large for defined data type in /mnt/web211/b3/65/54228465/htdocs/spk/lib/SSpkS/Package/Package.php on line 199 Warning: disk_free_space(): Value too large for defined data type in /mnt/web211/b3/65/54228465/htdocs/spk/lib/SSpkS/Package/Package.php on line 199 Warning: disk_free_space(): Value too large for defined data type in /mnt/web211/b3/65/54228465/htdocs/spk/lib/SSpkS/Package/Package.php on line 199 

This seems to be a know for problem with some hosting providers especially strato.de. Other projects also struggled with this e.g. owncloud/core#18886.

As there seems no reliable way to determine the free space in that case, I would suggest to ignore the error and proceed as there is no logging available (AFAIK).

I will come up with a pull request soon.

[REQ] SSpkS Gui 2.0

I checked the project page and was thinking a rework of the GUI would be nice also, low prio though ;)

Separate extracted meta files and package directory

Currently, all meta files extracted from packages (INFO, icons, thumbnails/screenshots) are going to the same directory where the packages reside.

It's probably better to have those extracted/redundant files in a separate directory, e.g. cache. So if problems arise, one can just delete all files in that cache directory and they're going to get extracted from the Synology packages again on the next run.

This also makes the packages directory more tidy / gives a better overview over packages on offer.

(This probably also means there should be some cleanup when there are files in cache for a package no longer existing in packages. Or we leave that to the user, to occasionally tidy up everything.)

Certificate for signed packages

Hello!

Where i can import my certificate to upload signed packages to this server?
Would be nice to have the certificate in the packagecenter when i put my server-link into the package sources.

Best regards
DKeppi

Add more tests before trying to unpack files from spk

  • test for required php-phar extension
  • test for writeable permissions on package dir
  • test for allow_url_fopen = True
  • probably write a test file and delete again
  • probably use PharData class instead of fopen method

Compatibility with Ryzen-based devices, such as the DS1621+ or DS1821+

I was researching your project and was interested in using the USB drivers, but noticed that none of the Ryzen-based devices are listed as supported explicitly. As it's unclear to me whether or not I'd be able to select another model to attempt an install, I thought before venturing down that path I'd raise this issue.

If there's another way to take, or a model that I could select to install it—great—otherwise I thought it would be worthwhile to bring up the possibility of adding these models!

Thanks

Implement download count

Several directions possible:

  • Allows an external script (to plug to database)
  • Keep count in a file (the poor man’s solution, my favorite)

Constant warning in logs

I constantly get these warning in the logs. Probably a variable check required to avoid these

PHP Notice:  Undefined index: HTTPS in /var/www/localhost/htdocs/index.php on line 16
PHP Notice:  Undefined index: arch in /var/www/localhost/htdocs/lib/SSpkS/Handler/BrowserPackageListHandler.php on line 14
PHP Notice:  Undefined index: fulllist in /var/www/localhost/htdocs/lib/SSpkS/Handler/BrowserAllPackagesListHandler.php on line 12

PHP Warning: rename(cache/XXX): failed to open stream: Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

Is sspks still under development and support?
I installed sspks with successfully with docker. by adding a new spks (plex in my example) i get 5-10 Permission denied errors.
seems the Package.php has no permissions to rename the package.
i got the package 777 permissions already and its owner is root like the container.
so whats wrong here?
here is my container log:
`[Sun Mar 07 21:55:21.756473 2021] [php7:warn] [pid 13] [client 10.24.0.2:48154] PHP Warning: rename(cache/PlexMediaServer-1.22.0.4145.nfo): failed to open stream: Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

[Sun Mar 07 21:55:21.756715 2021] [php7:warn] [pid 13] [client 10.24.0.2:48154] PHP Warning: rename(/tmp/INFO,cache/PlexMediaServer-1.22.0.4145.nfo): Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

[Sun Mar 07 21:55:21.757754 2021] [php7:warn] [pid 13] [client 10.24.0.2:48154] PHP Warning: parse_ini_file(cache/PlexMediaServer-1.22.0.4145.nfo): failed to open stream: No such file or directory in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 149

[Sun Mar 07 21:55:21.757790 2021] [php7:notice] [pid 13] [client 10.24.0.2:48154] PHP Notice: Undefined index: arch in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 156

[Sun Mar 07 21:55:21.757969 2021] [php7:warn] [pid 13] [client 10.24.0.2:48154] PHP Warning: touch(): Unable to create file cache/PlexMediaServer-1.22.0.4145.nowiz because Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 254

[Sun Mar 07 21:55:21.758581 2021] [php7:warn] [pid 13] [client 10.24.0.2:48154] PHP Warning: rename(cache/PlexMediaServer-1.22.0.4145_thumb_72.png): failed to open stream: Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

[Sun Mar 07 21:55:21.758623 2021] [php7:warn] [pid 13] [client 10.24.0.2:48154] PHP Warning: rename(/tmp/PACKAGE_ICON.PNG,cache/PlexMediaServer-1.22.0.4145_thumb_72.png): Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

10.24.0.2 - - [07/Mar/2021:21:55:21 +0000] "GET /?package_update_channel=stable&unique=synology_apollolake_918%2B&build=25426&language=ger&major=6&micro=3&arch=apollolake&minor=2&timezone=Amsterdam&group_id=8221&nano=3 HTTP/1.1" 200 15 "-" "synology_apollolake_918+ DSM6.2-25426 Update 3 (package)"

[Sun Mar 07 21:55:54.199049 2021] [php7:warn] [pid 8] [client 10.24.0.2:48182] PHP Warning: rename(cache/PlexMediaServer-1.22.0.4145.nfo): failed to open stream: Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

[Sun Mar 07 21:55:54.199129 2021] [php7:warn] [pid 8] [client 10.24.0.2:48182] PHP Warning: rename(/tmp/INFO,cache/PlexMediaServer-1.22.0.4145.nfo): Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

[Sun Mar 07 21:55:54.199212 2021] [php7:warn] [pid 8] [client 10.24.0.2:48182] PHP Warning: parse_ini_file(cache/PlexMediaServer-1.22.0.4145.nfo): failed to open stream: No such file or directory in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 149

[Sun Mar 07 21:55:54.199234 2021] [php7:notice] [pid 8] [client 10.24.0.2:48182] PHP Notice: Undefined index: arch in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 156

[Sun Mar 07 21:55:54.199396 2021] [php7:warn] [pid 8] [client 10.24.0.2:48182] PHP Warning: touch(): Unable to create file cache/PlexMediaServer-1.22.0.4145.nowiz because Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 254

[Sun Mar 07 21:55:54.199746 2021] [php7:warn] [pid 8] [client 10.24.0.2:48182] PHP Warning: rename(cache/PlexMediaServer-1.22.0.4145_thumb_72.png): failed to open stream: Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

[Sun Mar 07 21:55:54.199776 2021] [php7:warn] [pid 8] [client 10.24.0.2:48182] PHP Warning: rename(/tmp/PACKAGE_ICON.PNG,cache/PlexMediaServer-1.22.0.4145_thumb_72.png): Permission denied in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 223

10.24.0.2 - - [07/Mar/2021:21:55:54 +0000] "GET /?package_update_channel=stable&unique=synology_apollolake_918%2B&build=25426&language=ger&major=6&micro=3&arch=apollolake&minor=2&timezone=Amsterdam&group_id=8221&nano=3 HTTP/1.1" 200 15 "-" "synology_apollolake_918+ DSM6.2-25426 Update 3 (package)"`

install_dep_packages

This may not be a bug, but maybe it is. Just checkin'

I have created this package with install_dep_packages in the INFO file.
I am using DSM 6.0 and 6.1 (1 prod and 1 dev box) and have added the repo to the package center.
When prior to installing, all preconditions are met, it installs fine.
When prior to installing, NOT all preconditions are met, it gives an error.
What I have seen with packages from Synology, is that it names out the dependencies and asks whether to install them.

Why I am raising this issue, is that I would like to check whether this is a metadata-in-sspks kind of issue. Any clues?

Catchup: Implement dummy debug package

Implement a dummy debug package that will output debug information directly in the Syno UI as the package description.

Conditions to trigger that package to show:

  • In sspks.yml:
packages:
  debug: 1
  • Package has to be a beta so it is not shown to stable channel users.

Data that could be in the description: full HTTP request (headers, url, vars...)

Can this run on a DiskStation that can't run docker?

Hi,

I'm very interested in hosting this on my Diskstation and pointing the package manager at it locally. I'd then use various scripts to place spks in the correct folder so I have a simple automated update mechanism.

As I understand it (and I'm new to PHP), the PHP code can be hosted on a DiskStation as a local web server and used to serve spks, however I see there's a docker file in here too. Is this simply a different method of hosting the web server, or is it required for the whole system to function correctly?

Catchup: Fetch and group devices

The device list is getting larger and larger each year so there should be some sort of grouping for easier(!) identification.

E.g. by number of disks or desktop/rackmount

Also photos of the devices might be a nice addition.

Probably implement a dynamic searchfield (while typing, the displayed models reduce to what's matching the typed text).

Invalid location with DSM 5.1-4977

Thank you for this great package wich save me lot of reverse engineering time...

By the way with DSM 5.1-4977 the DSM does not accept my repo, invesigating a bit I saw tha DSM makes first a GET request with

ds_sn=C7L1Nxxxxxx&unique=synology_qoriq_213%2B&language=fre&package_update_channel=beta&major=5&arch=qoriq&build=4977&timezone=Brussels&minor=1

and expect a json list of packages and then a POST with same data and still expecting a json list...

The following patch fix this :

diff --git a/index.php b/index.php
index d18ca4b..d5d0c4d 100644
--- a/index.php
+++ b/index.php
@@ -22,16 +22,16 @@ $host = $_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVE

$siteName = "Simple SPK Server";

-if($_SERVER['REQUEST_METHOD'] == 'POST'){
+if(isset($_REQUEST['ds_sn'])){

  • $language = trim($_POST['language']);
  • $timezone = trim($_POST['timezone']);
  • $arch = trim($_POST['arch']);
  • $major = trim($_POST['major']);
  • $minor = trim($_POST['minor']);
  • $build = trim($_POST['build']);
  • $channel = trim($_POST['package_update_channel']);
  • $unique = trim($_POST['unique']);
  • $language = trim($_REQUEST['language']);
  • $timezone = trim($_REQUEST['timezone']);
  • $arch = trim($_REQUEST['arch']);
  • $major = trim($_REQUEST['major']);
  • $minor = trim($_REQUEST['minor']);
  • $build = trim($_REQUEST['build']);
  • $channel = trim($_REQUEST['package_update_channel']);
  • $unique = trim($_REQUEST['unique']);

if (!$language || !$timezone || !$arch || !$major || is_null($minor) || !$build || !$channel || !$unique || !$serial || !(preg_match("/^$unique/", $_SERVER['HTTP_USER_AGENT']) || $_SERVER['HTTP_USER_AGENT'] == ""Mozilla/4.0 (compatible; MSIE 6.1; Windows XP) Synology"" || $_SERVER['HTTP_USER_AGENT'] == ""Mozilla/4.0 (compatible; MSIE 6.1; Windows XP)"" )){
header('Content-type: text/html');

That said, there still a pb with the test on $serial, I needed to squeeze it (don't know where and how it's supposed to be initalized but is not...

Thanks & cheers

PHP index error

I keep getting the following error below in the logs:

PHP Notice: Undefined index: firmware in /var/www/localhost/htdocs/lib/SSpkS/Package/Package.php on line 79

DS1821+

Hello,

Is there an option to install the Nortek HUSBZB-1 on the DS1821+ ?

Thanks,
Richard

Can't get it work on my DS415+

When I try to add humweb.nl/sspk to my package list is gives me a "invalid location" warning.
I use DSM 6.1-15022. Hope someone can help.

Allow to override /tmp

For some obscure reasons, when the cache directory is set to a /tmp subdirectory, the move fails when parsing packages:

[Mon Aug 16 11:28:34.237121 2021] [php7:warn] [pid 52168] [client x.x.x.x:35371] PHP Warning:  rename(/tmp/PACKAGE_ICON.PNG,/tmp/cache/sspks/xxx-9.0.14924.1615beta_thumb_72.png): No such file or directory in /xxx/content/20210816T110645/lib/sspks/lib/SSpkS/Package/Package.php on line 217

It seems that private tmp only works partially?

sspks_noarch_20130506-1.spk: "invalid location" with the package center of DSM 5.0 beta

If I try to add my sspks server (sspks_noarch_20130506-1.spk) as "source" in DSM 4.3 it works.

If I try to add my sspks server (sspks_noarch_20130506-1.spk) as "source" in DSM 5.0 beta I get the error message "invalid location".
Tested with DS213 and DS213+

I can still browse the web page of my sspks server though.

http://packages.jdel.org/ works as package source in DSM 5.0 beta though.

Any hints how to debug this would be warmly welcome ;-)

Doorbell Byron mp001 transmit

Is it possible to add byron mp001 transmit with rfxtrx433e
In windows transmit it is working. but not on my synology dsm 5 with domoticz.

Review makefile to build SPK

make spk should be working but the postinstall script needs to be reviewed to get composer and install dependencies.

Travis is probably going to fail builds after this...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.