Skip to content
Yves Martin edited this page Dec 3, 2017 · 6 revisions

Package migration to generic service support

Support has only been testing on DSM 5 and 6 and relies on availability of

  • synouser
  • synogroup
  • servicetool
  • synoshare
  • synoacltool

Common actions

Discard INSTALL_DIR from Makefile as new default is now set to /var/packages/$(SPK_NAME)/target/ in mk/spk.directory.mk

If relevant, take befenits from group and share folder creation with SERVICE_WIZARD_GROUP and SERVICE_WIZARD_SHARE

If INSTALLER_SCRIPT contains other specific actions like configuration setup or link creation, move them to service_ACTION functions in SERVICE_SETUP script.

For non service application, add explicitely STARTABLE=no for proper Package Center status reporting.

Service application

Discard busybox dependencies and related variables, rules and sources if any.

If SSS_SCRIPT has specific code, try to move behaviour to service_prestart or service_poststop. If not possible, create package specific from mk/spksrc.service.start-stop-service.

Service user transition

If service user already exists in system, DSM will create an additional account with _PKGtime suffix which perfectly works but may be cleaner.

Before publishing DSM 6 compatible package, it is recommended to publish a package update from current master with legacy installer script, adding user and group removal in preupgrade function

    # Remove busybox service user to prepare to generic service DSM 5+6
    delgroup ${USER} ${GROUP}
    deluser ${USER}

Example with mosquitto update PR: https://github.com/SynoCommunity/spksrc/pull/3025/files#diff-a39652d205d22941b635b1a50dd272b9

Clone this wiki locally