qnap-dev / qdk Goto Github PK
View Code? Open in Web Editor NEWQNAP Development Kit
QNAP Development Kit
Since 6069cf3 the Makefile tries to copy the compiled binary to /bin while building. This should at least be split into the install
target, because it breaks building without root permissions. The previous behaviour (copying to ../shared/bin/
makes much more sense and works without root permissions.
The change breaks the InstallToUbuntu.sh
script too, because it expects the binary to be in ../shared/bin/
.
From the documentation it doesn't become clear to me how to cross-build a QPKG on a Linux machine (not being a QNAP device).
How can I start cross building a QPKG?
Or is there a virtual (image of a) QNAP device available?
$ curl -o MalwareRemover-5.6.1.6.20220729_172738-x86_64.zip https://download.qnap.com/QPKG/MalwareRemover-5.6.1.6.20220729_172738-x86_64.zip
$ unzip MalwareRemover-5.6.1.6.20220729_172738-x86_64.zip
$ qbuild --extract ./MalwareRemover-5.6.1.6.20220729_172738-x86_64.qpkg
./
./data.tar.gz
./qpkg.cfg
./qinstall.sh
gzip: stdin: decompression OK, trailing garbage ignored
./package_routines
/bin/tar: Child returned status 2
/bin/tar: Error is not recoverable: exiting now
If I try this on QPKGs I build myself, I often see it succeed, but then when I try to unpack data.tar.gz
it will be corrupt or files will be truncated.
Hi Ed
can you please modify qpkg.conf template
QTS_MAX_VERSION="5.0.0"
to
#QTS_MAX_VERSION="5.0.0"
thanks a lot
If you run:
$ qbuild
$ cp build/foo_unknown.qpkg /tmp
$ qbuild
$ diff /tmp/foo_unknown.qpkg build/foo_unknown.qpkg
Binary files /tmp/foo_unknown.qpkg and build/foo/unknown.qpkg differ
This causes problems when using build systems like bazel, as we'll end up with a cache miss. There are also many other reasons why reproducible builds are a desireable thing.
I'm not sure if I've tracked down all the reasons this happens, but there are a couple I've found.
The built_version
file contains the time at which the build happened. It would be nice if we could pass in a timestamp when we run qbuild and record this timestamp in the built_version
file. This would let us pass in, for example, the timestamp of the most recent git commit, so the contents of this file would be predictable.
Threre are timestamps being recorded in various tar archives. and these timestamps are not stable. For example, when we call create_control_package
, this copies a number of files into the build.$$
folder (which updates their mtimes to the current time) then runs tar
to create the control.tar file. We should either be preserving the attributes of these files (with cp -a
for example), or passing the --mtime
option to tar.
The built_version
file is another offender here, as we create it right before generating the control package. If we allow passing in a build timestamp, we could either touch
this file with that timestamp or again use tar --mtime "${BUILD_TIMESTAMP}" ...
to force the mtime of this file.
There are some places where we are implicitly recording timestamps too. For example, when creating the data archive with 7z we run:
/bin/tar $tar_verbose -cf - -C build.$$ . | /usr/local/sbin/7z a -si tmp.$$/data.tar.7z
and here 7z will record the current timestamp because of the -si
option. We can work around this with:
/bin/tar $tar_verbose -cf tmp.$$/data.tar -C build.$$ .
touch -d "${BUILD_TIME}" tmp.$$/data.tar
/usr/local/sbin/7z a tmp.$$/data.tar tmp.$$/data.tar.7z
which will explicitly set the timestamp in the 7z file. There's a similar problem with gzip compression, which can be worked around in much the same way.
Hi Ed
a new enhancement, people requsting .md5 files for each qpkg built
i actually create them with
qbuild && for file in build/*qpkg; do md5sum "$file" > "$file".md5; done
can be nice to auto generate it on fly once QPKG is built ;)
thanks a lot,
I just built my QPKG with v.2.3.0 of the QDK but it won't installl ("Failed to install myqpkg. You must first install and enable JRE, OPT/busybox." The same QPKG worked fine when built with QDK 2.216.
In qpkg.cfg I defined
QPKG_REQUIRE="JRE, OPT/busybox"
If I limit QPKG_REQUIRE to "JRE", the installation works just fine.
What did I do wrong? I have Entware installed which provides - amongst other - busybox via opkg.
Thanks for looking at it or helping me to adjust my requirement.
add_qpkg_tail() in qbuild is addind to qpkg something that recognaized by tar as trailing garbage.
So force tar to return warning "/bin/tar: Exiting with failure status due to previous errors"
So "sh ./aa.qpkg" is return
"aa 0.1 installation failed. Data file error.
Installation Abort."
This occurse only in terminal package installation.
If I comment add_qpkg_tail in qbuild the future installation is done also in terminal mode.
Hi Ed
Can it be possbile to use .png instead of .gif for icons files
each time i have to rename .png to .gif
gif is too limited compared png
qbuild -v
Creating archive with data files for x86_64...
Adding shared files...
Adding architecture specific files...
Adding icons...
Adding configuration files...
Adding built version...
Adapt the data package files (such as file owner)
Creating compressed tar archive...
Creating archive with control files...
Adding built information...
Creating QPKG package...
QPKG package name set to ##################
Packaging optional extra data files...
Adding header script...
Adding content...
control data...
data archive...
Adding signature...
You need a passphrase to unlock the secret key for
user: #####################################
4096-bit RSA key, ID ############, created 2021-02-01
but still, I get a Digital Signature Warning when installing...
What am I missing ?
Creating and installing a sample QPGK does not work.
Create a qpkg called MyQPKG
qbuild --create-env MyQPKG
cd MyQPKG/
qbuild
Download MyQPKG_1.qpkg and install it via the web interface.
This leads to the error:
Failed to install MyQPKG. Downgrade QTS to 5.0.0 or an older compatible version.
Line 10 in cd478c7
While building a QPKG with QDK in a Docker image I encountered the problem, that the contents of shared data wouldn't be copied in to the final package. There was no error output. Inspecting the qbuild script I found out, that there is a dependency to rsync.
It would be nice if you would add it to the required installed packages, installed by apt-get.
Line 30 in cd478c7
Hi Ed,
please propose release on Github .tar.gz . zip .qpkg (precompile)
thanks again,
Hi
Iโm unable to reach - https://cheng-yuan-hong.gitbook.io/qdk-quick-start-guide/
Error: Server Error
The server encountered an error and could not complete your request.
is there a new address ?
We renewed our OV code signing certificate on Azure Key Vault because it had expired.
Regarding QDK support for code signing certificates on Azure Key Vault, we have only found an offline HSM option available, and not a Cloud HSM option like Azure Key Vault.
Hi guys,
Just noticed this today in the .uninstall.sh
for one of my QDK-built QPKGS:
# Remove QPKG directory, init-scripts, and icons.
if which rsync >/dev/null 2>&1; then
/bin/mkdir -p /tmp/qpkg_blankdir
rsync -a --delete /tmp/qpkg_blankdir "/share/CACHEDEV1_DATA/.qpkg/nzbToMedia"
/bin/rm -fr "/share/CACHEDEV1_DATA/.qpkg/nzbToMedia"
fi
/bin/rm -fr "/share/CACHEDEV1_DATA/.qpkg/nzbToMedia"
Why does the uninstaller perform an rsync
from an empty directory in /tmp
when the QPKG is being removed? Seems a rather odd thing to do.
Thank you.
source: https://forum.qnap.com/viewtopic.php?p=745580#p745580
NAS: TS-431P2 (I think)
# getcfg "" Platform -f /etc/platform.conf
ARM_MS
So, this NAS model is a "rejected platform".
Can anyone explain why? What is the reason for rejecting this platform?
Thank you.
Hey guys, is there a way to get the return-code of the service script integrated into the QPKG when the package installation is complete?
Example: a QPKG is installed and executes the integrated service script start
- but if the start
process fails, the script return-code does not appear to be returned to the installer. So, the installer shows everything went fine, but the service isn't running.
I manually install a few QPKGs at the CLI and would like to be able to test that the service was started without issue.
Thank you.
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.