Giter Club home page Giter Club logo

qdk's People

Contributors

bitstreamout avatar edhongcy avatar edhongsomezo avatar ericchouqnap avatar even-wei avatar jwalton avatar kevinlia1 avatar walkerlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qdk's Issues

How to build a QPKG on a Linux machine (not a QNAP)?

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?

`qbuild --extract` seems to be slightly broken

$ 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.

Output is not deterministic

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.

built_version

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.

Timestamps in archives.

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.

QDK 2.3.0: QPKG failed to install due to missing Optware package (but it is installed)

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.

Incorrect gzip tail

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.

[ enhancement ] Icons

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

Problem signing QPKG

When building a qpkg, there seems to be no problem signing:

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

Adding tail data...
Adding QPKG checksum: ############

but still, I get a Digital Signature Warning when installing...
What am I missing ?

Minimal sample is not installable

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.

Missing dependency in InstallToUbuntu.sh for rsync

apt-get install -y build-essential wget bsdmainutils curl python openssl

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.

releases GitHub

Hi Ed,

please propose release on Github .tar.gz . zip .qpkg (precompile)

thanks again,

Does QDK support code signing certificates on Azure Key Vault?

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.

Why run a `rsync` when uninstalling QPKG?

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.

return code for package service script?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.