-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
DSM 7.0
Maksim Karasev edited this page May 31, 2023
·
5 revisions
Developer Guide: https://global.download.synology.com/download/Document/Software/DeveloperGuide/Os/DSM/All/enu/DSM_Developer_Guide_7_enu.pdf
# only for the wallabag package
git checkout dsm7-packages
build all supported arches:
make -j`nproc` arch-x64-7.0 arch-armv7-7.0 arch-aarch64-7.0 arch-evansport-7.0
noarch build:
make && make TCVERSION=7.0-
SYSTEM_GROUP = http- add package to a system group (e.g. http, system)
-
SPK_GROUP- override group, the default is
sc-{packagename} - Synology uses this to add the package to a group, if the group already exists in the GUI the group will be renamed to
{groupname}__PKG_. Synology also uses it for the following command, during package install/upgrade.chown sc-{packagename}:{SPK_GROUP}
- override group, the default is
-
SPK_USR_LOCAL_LINKS- Allows the package to link files to
/usr/local/etcand/usr/local/lib - e.g.
SPK_USR_LOCAL_LINKS = etc:var/foo lib:libs/bar
- Allows the package to link files to
-
${SYNOPKG_PKGDEST}/var/->${SYNOPKG_PKGVAR}- migrate files to preserve user settings/preferences from a DSM 6 package
- pre-DSM7,
SYNOPKG_PKGVARgets set toSYNOPKG_PKGDEST/varto keep forwards compatibility and make migrating packages easier.
- pre-DSM7,
- package files are only moved to permanent storage if
SYNOPKG_PKGVARis empty -
/var/packages/{package}/target/var->/var/packages/{package}/var - Why? On DSM7
SYNOPKG_PKGDESTgets overridden during package upgrades. See the Package Filesystem Hierarchy Standard (FHS) below.
- migrate files to preserve user settings/preferences from a DSM 6 package
- generic uninstall script:
- new uninstall wizard which allows the user to choose whether to remove all files in
/var/packages/{package}/var/var/packages/{package}/etc/var/packages/{package}/home/var/packages/{package}/tmp
- new uninstall wizard which allows the user to choose whether to remove all files in
- newer GCC versions
- packages are executed with
packagepermissions - new log file location during install
/var/log/packages/{package}.log
- assuming root privileges in install/startup scripts or while running service
- inc.
chmod,chown,su,synouser,synogroupetc. -
synoacltool -getis still allowed
- inc.
- package managed groups e.g
sc-download,sc-media - busybox
- start-stop-daemon / SERVICE_EXE
- group migrations from DSM 5
-
SPK_LINKSplease useSPK_USR_LOCAL_LINKSinstead - the former installer created link
/usr/local/{package-name} -> /var/packages/{package-name}/targetis not supported anymore due to restricted permissions. Any package specific installation or configuration must be updated to use/var/packages/{package-name}/targetinstead of/usr/local/{package-name}. This does not need DSM7 specific installer code as it is backwards compatible.
On armv7 and aarch64 the gold linker in the toolchain is broken. See #4494
- package users (
sc-{packagename}) show up as "System Internal User" for shared folder permissions - package users (
sc-{packagename}) can have permissions set in the file manager for more granular control - package groups no longer show up in the GUI
- VAAPI (for hardware acceleration) with ffmpeg make sure the resource file contains:
- conf/resource:
{"video-driver":{}} - This is needed to gain access to
/dev/dri/renderD128
- conf/resource:
- Package Filesystem Hierarchy Standard:
| Directory | Purpose | Mode | Creation Timing | Remove Timing | Script Variable |
|---|---|---|---|---|---|
| etc | permanant config storage | 0755 | installed/upgraded | none | none |
| var (since 7.0-40314) | permanant data storage | 0755 | installed/upgraded | none | SYNOPKG_PKGVAR |
| tmp (since 7.0-40356) | temporary data storage | 0755 | installed/upgraded | uninstalled/upgrading | SYNOPKG_PKGTMP |
| home (since 7.0-40759) | private storage | 0700 | installed/upgraded | none | SYNOPKG_PKGHOME |
| target | data extracted from `package.tgz | 0755 | installed/upgraded | uninstalled/upgrading | SYNOPKG_PKGDEST |
/var/packages/[package_name]
├── etc -> /usr/syno/etc/packages/[package_name]
├── var -> /volume[volume_number]/@appdata/[package_name]
├── tmp -> /volume[volume_number]/@apptemp/[package_name]
├── home -> /volume[volume_number]/@apphome/[package_name]
└── target -> /volume[volume_number]/@appstore/[package_name]
- Shared folder permissions: see Transmission package for an example
- set
SERVICE_WIZARD_SHARE = wizard_download_dirin makefile - update install wizard
- set
- WebServer with php: see Adminer package for an example
- Create a Database with MariaDB: see Wallabag package for an example - resource file - wizards
- packages with
SPK_COMMANDSwill function with no major changes- All specified files will auto link to
/usr/local/bin/
- All specified files will auto link to
-
SERVICE_EXE/ (start-stop-daemon) with busybox- must migrate using the generic service script:
- SERVICE_COMMAND=
- SVC_BACKGROUND=y
- SVC_WRITE_PID=y
Control Panel > Shared Folder > Edit > Permissions > System internal user

In DSM File Station, select target folder, open "Properties" with right click and open the "Permissions" tab.

- Home
-
Packages
- Adminer
- Aria2
- Beets
- BicBucStriim
- Borgmatic
- cloudflared
- Comskip
- Debian Chroot
- Deluge
- Duplicity
- dnscrypt-proxy
- FFmpeg
- FFsync
- Flexget
- Gstreamer
- Google Authenticator
- Home Assistant Core
- Jellyfin
- Kiwix
- [matrix] Synapse homeserver
- MinIO
- Mono
- Mosh
- Mosquitto
- Node-Exporter
- OpenList
- ownCloud
- Radarr/Sonarr/Lidarr/Jackett
- rclone
- SaltStack
- SickBeard Custom
- SynoCLI-Disk
- SynoCLI-Devel
- SynoCLI-File
- SynoCLI-Kernel
- SynoCLI-Misc.
- SynoCLI-Monitor
- SynoCLI-NET
- Synogear
- Concepts
- Development
- Resources