QPKG Development Guidelines
QDK is used to build QPKG files/applications for QNAP Turbo NAS. A QPKG file makes it easy for anyone to install and remove packages. It also gives a package maintainer almost total control on how the package is installed on the NAS.
The major design goal of QDK is to make it easy for the package maintainer to create simple QPKG files and at the same time also support more advanced packages. QDK started out as a simple modification of the first official release of the QPKG SDK, but now supersedes it. It includes many new features like architecture check at installation, support for digital signatures, different compression algorithms, a comprehensive option to check that other required QPKG packages or Optware packages are installed (or that conflicting packages are not installed), automatic installation of required Optware packages, and a powerful build script.
QDK is distributed under the GPL making it completely open and available for anyone to use.
Download and install the QPKG file and it will automatically create the system-wide configuration file, /etc/config/qdk.conf, and when enabled it also creates a symlink for qbuild in /usr/bin. The reference manual is included in a separate zip file. There is also a document (QDK Cookbook) with solutions to different common situations that you could run into when using QDK to build QPKG packages.
- Add "export QNAP_QPKG" session in sample start script. It is for Resource Monitor to monitor the folk process of your QPKG.
- Add creating md5sum file after qbuild the package.
- Support png format for icon files.
- Change order of installation logs.
- Add QNAP display name in qpkg.cfg.(The QPKG name displayed on QTS Web UI)
- Add support maxmum QTS version limitation.
- Fix template sample code bug.
- Add QTS HTTP Proxy and set Proxy_Path function in qpkg.cfg.
- Add Timeout (in seconds) for QPKG Enable (first integer) and Timeout for QPKG Disable (second integer) function in qpkg.cfg. (since 4.1.0)
- Add Visible setting for If the QPKG has web UI, show this QPKG on the Main menu function in qpkg.cfg.
- Add QTS system volume mount check.
- Modify installation succeeded system logs.
- Add installation log to system logs.
- Support volume selection / migration (requires minimum QTS 4.2.1)
- Add to support minimum QTS version limitation.
- Add QTS apache root path.
- Command qbuild could use build bumber
- Enhance recognition of different platforms
- New platform - support arm_x31, ce53xx(TS-269H) and arm_x41(TS-x31+) architecture string.
- New option - “Web_SSL_Port” that can access Web via SSL port.
- Bug fix: support extract QPKG that builded by previous QDK.
- Add QPKG_DESKTOP_APP="1" option.
- Bug fix: List of installed files is not updated when using 7-zip. This would make an upgrade of a package behave as if it was a new installation.
- New upgrade handling. The new version is installed over the old version and then any obsolete files are removed. No other files are removed.
- The new upgrade handling means that QPKG_CONFIG_DIR has no effect any longer and can be removed from the QPKG configuration file.
- Support for other compression algorithms. Currently, QDK supports gzip, bzip2, and 7-zip.
- Support for specifying requirements on Optware packages (both in QPKG_REQUIRE and QPKG_CONFLICT)
- Support for installing required Optware packages automatically at installation.
- Support to include Optware packages in the QPKG package and access them as part of a local repository at installation.
- New function to extract data archives can be used in package specific functions, extract_data ARCHIVE [DIRECTORY]
- Support for more verbose output and debug messages when running qbuild.
- Possible to use | in QPKG_REQUIRE to separate requirements where only one of the requirements has to be true.
- The data in the QPKG package has been split into several parts, control files, data files, and any extra data files. Provides better performance and easier access to the control files.
- Support for digital signatures that can be used to make sure a package has not been modified after the package builder created it.
- New QDK area has been added to QPKG format. At the moment only used for the optional digital signature.
- Query option to retrieve information about a QPKG package without extracting the content.
- Name changes for some definitions. The old definitions can still be used, but a warning is output if they are found.
- Several minor bugs have been fixed.
- Fixed bug that could make the cleanup function after a failed installation run when it shouldn't run.
- Obsolete configuration files were not removed from /etc/config/qpkg.conf.
- Support function that could be used to add configuration files in the package specific functions.
- New 64-bit systems could not install x86 packages. Architecture check has been updated to also allow the x86_64 architecture string.
- Changed location for the saved configuration data during an upgrade.
- Support for variables defined at run-time in the remove functions (PKG_PRE_REMOVE, PKG_MAIN_REMOVE, and PKG_POST_REMOVE)
- New package specific function, pkg_init, that can be used for initialization before the installation is started.
- New option --build-model that is used to include a check for given model in the QPKG file.
- New option --force-config that is used to ignore missing configuration files specified in QPKG_CONFIG.
- New option --no-compress that is used to not compress QPKG meta-files.
- Changed --extract option to make it possible to specify where the data shall be extracted (default is still the current directory).
- Template init-script is included when creating build environment using --create-env option.
- List of available definitions included in template qpkg.cfg and package_routines files.
- Name and location of system shares are available in shell definitions.
- Extra source packages can be included using QDK_EXTRA_SRC_FILE
- Upgrade functions in the installation scripts are replaced with a re-installation where specified config files are restored if necessary.
- Configuration files that shall be restored at an upgrade can be specified using QPKG_CONFIG
- Directory with configuration data that shall be restored at an upgrade can be specified using QPKG_CONFIG_DIR
- Added support function that can write warning messages to system log, warn_log
- QPKG icons contributed by WatskeBart
- Optimized functions in generic installation script for slightly faster installation (5-10 seconds) of created packages.
- First release