Spksrc: Install packages from the command line

Created on 27 Jul 2018  路  10Comments  路  Source: SynoCommunity/spksrc

I have a general question about managing packages on a Synology NAS. I own a 918+ running DSM 6.2, currently.

Is there a documented way to install packages from the CLI, e.g. using the syno* commands?

If not, where do I find the sources of the DSM Package Center, so that I can trace down which commands the UI is issuing to configure sources and install packages?

Related forum posts

Most helpful comment

I don't see why you should want to do it, but you can use the synopkg command to install packages from the commandline.

sudo synopkg install

All 10 comments

I don't see why you should want to do it, but you can use the synopkg command to install packages from the commandline.

sudo synopkg install

That's fine, that works for local package files.

Is there a tool that would download the package file for a package name and install the package? (Something like apt-get install <package> on Debian.)

Simple do a wget of the package and install it.
It seems to me that you want things without the basic knowledge needed.

And why should you want to do such things when DSM supplies that functionality and if you want that for other Nasses you could use CMS for that.

And to get URL of your package of interest, package view provides location for each version/architecture: https://synocommunity.com/packages
DSM system is far for a standard Linux distribution... so you have to do it the way Synology proposes.

so you have to do it the way Synology proposes.

That's what I'm trying to find out. Only, that I can't afford to do it manually, because that doesn't scale and is prone to human error.

IOW, I need to find out what is "the Synology way" under the hood. There must be a command that fetches the latest version of the package appropriate to the system DSM is running on. The Web GUI does it, and it's not magic.

Simple do a wget of the package and install it.

Can you give an example? Say, for the git package. Don't I have to find out the architecture and latest version and put it into the URL?

How does the DSM Web GUI fetch the list of available packages, and fetch and install the package files? There is probably a CLI command that does that. When I look at the processes spawned when you click on an "Install" button I see there is a delegation process started that deals with the installation (to make the installation asychronous).

And why should you want to do such things

We must be able to install, configure, restore a NAS in a matter of minutes. Apart from assembling the hardware and confirming the start of the setup it must all be automatic.

As I already mentioned Synology provide CMS for such functionality.
No need to develop it yourself,
See:

https://www.synology.com/en-global/knowledgebase/DSM/help/CMS/cms_desc

But to be honest you are asking this questions at the wrong place.
This is the SynoCommunity which is dedicated to creating en making available packages for Synology Nas.
You should ask your questions in the Synology forum.
https://forum.synology.com/enu/

Thank you for the information about the Synology CMS. IIUC, this requires that you set up at least the NAS running the CMS component manually.

I respect that we have different mindsets. (Note that I'm trying to automate _everything_. In the business I do I cannot afford to do things manually.)

My original question was: Is there documentation on how to do things with CLI commands (instead of the Web UI)? And if not, where can I find the (source code of the) DSM Package Center, i.e. the web application, on my NAS?

It is not documented en the DSM source can be found here.
https://sourceforge.net/projects/dsgpl/files

@BenjV thanks for the link!

Can you help me find the source code of the Package Center? I don't think it's in there.

If the source code is not included in the SF repo where on the NAS should I look to find it?

@bittner You probably should have guessed Synology DSM is not open source, neither is Package Center. Synology only publish some components sources to comply with GPL.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheMile picture TheMile  路  3Comments

eL-Zotto picture eL-Zotto  路  6Comments

zhuchun picture zhuchun  路  7Comments

SeppPenner picture SeppPenner  路  7Comments

tombro007 picture tombro007  路  7Comments