jdel / gosspks Goto Github PK
View Code? Open in Web Editor NEWA very simple Synology Package Server written in Go
License: GNU General Public License v3.0
A very simple Synology Package Server written in Go
License: GNU General Public License v3.0
Implement this: jdel/sspks#47
I look on the website packages.jdel.org and for my model (DS718+ apollolake) there are 2 packages, however when I add the link in Package Center (DSM 6.1.6 Update 1) there are no packages from this source.
Hi,
I'm locked on a http error 400
Is it possible to implement a download counter?
Since 6.1-14715 the firmware
field is deprecated in favour of os_min_ver
.
Both should still be supported, with os_min_ver
taking precedence.
References:
jdel/sspks#61 (comment)
https://help.synology.com/developer-guide/synology_package/INFO_necessary_fields.html
Hello,
I've installed gosspks on Ubuntu and I've got it working when requesting "about" or "models"
./gosspks-linux-amd64 --port 80
curl -i localhost:80/about
{"name":"gosspks","version":"v0.1.2","maintainer":"jdel","license":"GNU GPL v3","year":2018}
curl -i localhost:80/v1/models
-> Ok displaying all the models
However when trying to retrieve the list of packages I have the below error :
curl -i localhost:80/v1/packages
HTTP/1.1 404 Not Found
Date: Mon, 11 Nov 2019 12:00:41 GMT
Content-Length: 0
Content-Type: text/plain; charset=utf-8
Any idea about this issue ?
The default /
endpoint should return only the latest version of a package. Often that's the case, but not always:
% curl -s ... | json_pp | egrep 'package|arch|version'
"packages" : [
"arch" : "x86 bromolow cedarview avoton braswell broadwell dockerx64 kvmx64 grantley denverton apollolake broadwellnk",
"package" : "syncthing",
"version" : "1.3.3.syno-38"
"arch" : "x86 bromolow cedarview avoton braswell broadwell dockerx64 kvmx64 grantley denverton apollolake broadwellnk",
"package" : "syncthing",
"version" : "1.3.3.spk-37"
"arch" : "x86 bromolow cedarview avoton braswell broadwell dockerx64 kvmx64 grantley denverton apollolake broadwellnk",
"package" : "syncthing",
"version" : "1.3.3.36"
When requesting package list, one package is ignored.
Packages in the $HOME/gosspks/packages/ :
Launching gosspks server :
gosspks-linux-amd64 --port 1500 -l debug
Retrieving packages list :
curl -i 10.0.2.15:1500/v1/packages
=> Only Icecast is displayed
=> Erlang package is renamed to "erlang_braswell-6.1_22.1-1.spk.ignored"
Debug log :
DEBU[19/11/14 21:16:19.109] Processing 2 files module=handler/v1/v1.go
DEBU[19/11/14 21:16:19.109] Started processing filename=erlang_braswell-6.1_22.1-1.spk module=handler/v1/v1.go size="57 MB"
DEBU[19/11/14 21:16:19.109] Started processing filename=icecast_braswell-6.1_2.4.4-2.spk module=handler/v1/v1.go size="4.8 MB"
DEBU[19/11/14 21:16:19.109] Finished processing duration=1ms filename=icecast_braswell-6.1_2.4.4-2.spk module=handler/v1/v1.go
DEBU[19/11/14 21:16:19.110] Finished processing duration=0s filename=erlang_braswell-6.1_22.1-1.spk module=handler/v1/v1.go
DEBU[19/11/14 21:16:19.110] Stored syno packages () in cache for 5m0s module=handler/v1/v1.go
INFO[19/11/14 21:16:19.110] 10.0.2.15 - - [14/Nov/2019:21:16:19 +0100] "GET /v1/packages HTTP/1.1" 200 1149 module=lgr/lgr.go route=Packages template=/v1/packages
When adding this spk repo server URL, DSM7 package center no longer is able to see community packages, if I remove it then everything works, please look further into this as I had to switch back to sspks to get things working again.
Thanks!
It would be really awesome if there was support for Amazon or Minio S3 storage support, is this something that can be done ?
Thanks!
Hello,
I've installed gosspks with Docker on my Synology and I have no error :
ubuntu:~$ curl -i reposyno.mydomain.com:9999/about
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Date: Mon, 18 Jan 2021 11:47:33 GMT
Content-Length: 93
{"name":"gosspks","version":"v0.3.1","maintainer":"jdel","license":"GNU GPL v3","year":2021}
ubuntu:~$ curl -i reposyno.mydomain.com:9999/v1/packages
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Date: Mon, 18 Jan 2021 11:47:36 GMT
Content-Length: 645
[{"package":"Plex Media Server","version":"1.21.1.3876-3c3adfcb4","firmware":"6.0-7321","desc":"Plex organizes all of your personal media so you can easily access and enjoy it.","arch":"x86_64","maintainer":"Plex Inc","adminport":"32400","adminurl":"web","helpurl":"https://plex.tv/","start":true,"link":"http://reposyno.mydomain.com:9999/download/PlexMediaServer-1.21.1.3876-3c3adfcb4-x86_64.spk","size":"111687680","qinst":true,"qstart":true,"qupdate":true,"thumbnail":["http://reposyno.mydomain.com:9999/static/PlexMediaServer-1.21.1.3876-3c3adfcb4-x86_64.spk/PACKAGE_ICON.PNG"],"thumbnail_retina":["http://reposyno.mydomain.com:9999/static/default.png"]}]
ubuntu:~$ curl -i reposyno.mydomain.com:9999/v1/models
HTTP/1.1 200 OK
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=UTF-8
Date: Mon, 18 Jan 2021 11:49:18 GMT
Transfer-Encoding: chunked
[ .... {"name":"DS218+","cpu":"Intel Celeron J3355","cores":"Dual Core","threads":"2","fpu":"Yes","arch":"Apollolake","ram":"DDR3L SODIMM 2GB"},{"name":"DS218","cpu":"Realtek RTD1296","cores":"Quad Core","threads":"4","fpu":"Yes","arch":"rtd1296","ram":"DDR4 2GB"},{"name":"DS218play","cpu":"Realtek RTD1296","cores":"Quad Core","threads":"4","fpu":"Yes","arch":"rtd1296","ram":"DDR4 1GB"},{"name":"DS218j","cpu":"Marvell Armada 385 88F6820","cores":"Dual Core","threads":"2","fpu":"Yes","arch":"Armada38x","ram":"DDR3 512MB"} .... ]
But on my Synology DS218+ I added the repo in my package center and I don't see my package (Plex), I have a blank page.
Any idea? Thanks.
gosspks should follow XDG directives and use $XDG_CONFIG_HOME/gosspks or $HOME/.config/gosspks if null instead of using $HOME/gosspks
On Windows should use %localappdata%/gosspks.
I have a package list like the following:
% curl -s 'https://synology.kastelo.net/v1/packages' | json_pp
[
{
"arch" : "x86 bromolow cedarview avoton braswell broadwell dockerx64 kvmx64 grantley denverton apollolake broadwellnk",
"desc" : "Test",
"dname" : "Test",
...
}
]
which is fine, however
% curl 'https://synology.kastelo.net/v1/packages?arch=apollolake'
[]
should return the package above.
It seems the arch comparison is string-exact or some family fuzziness which does not seem to work in my case.
This is with the current docker image and no optional parameters except hostname and scheme (behind HTTPS reverse proxy). Possibly related, models doesn't seem to load:
% curl -i 'https://synology.kastelo.net/v1/models'
HTTP/2 404
date: Mon, 13 Jan 2020 12:00:00 GMT
server: Caddy
content-length: 0
and the following logged at debug level:
time="20/01/13 11:48:59.105" level=debug msg="Fetching models from the internet"
time="20/01/13 11:48:59.320" level=warning msg="No models available" module=handler/v1/routeModels.go
time="20/01/13 11:48:59.321" level=info msg="172.17.0.1 - - [13/Jan/2020:11:48:59 +0000] \"GET /v1/models HTTP/1.1\" 404 0" module=lgr/lgr.go route=Models template=/v1/models
Although, the arch in question is mentioned in the package so should work without models being loaded I think?
See jdel/sspks#38
All my packages are getting set to ignored for the following error below:
Cannot extract INFO for sickrage-dev_hi3535-6.1_9.4.212.dev14-1.spk: Quatantined sickrage-dev_hi3535-6.1_9.4.212.dev14-1.spk: No INFO or not a tar file" filename=sickrage-dev_hi3535-6.1_9.4.212.dev14-1.spk module=/src/handler/v1/v1.go
Running file on that package comes back with file sickrage-dev_88f6281-6.1_9.4.212.dev14-1.spk sickrage-dev_88f6281-6.1_9.4.212.dev14-1.spk: POSIX tar archive (GNU)
Please help, not sure what's causing this issue as the INFO file is present in the tar archive
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.