Languages

Menu
Sites
Language
Scripted Tizen Packaging / IDE Improvements

I'm currently trying to manually build a tizen package (.tpk) and noticed that the SDK (eclipse) uses it's own procedure and not the native binaries (native-signer, tpk, sbi). Also it seems very hard to find documentation related to the command line tools and the help message printed by "tpk" itself is wrong/outdated.

Issues with sbi:

(1) Documentation: I only found the correct arguments by chance on a stackoverflow anser. The provided documentation is not nearly complete enough.

(2) sbi fails at signing on the invocation call:

$SDK_PATH/tools/smart-build-interface/bin/sbi action ${TOOLCHAIN_PROFILE} -- buildpackage -BUILD_DIR="${BUILD_DIR}" -ARCH="${ARCH_TPK}" -PKG_TYPE=TPK -PKG_NAME="${PKG_NAME}" -PRJ_NAME="${PRJ_NAME}" -ARTIFACT_NAME="${ARTIFACT_NAME}" -PKG_VER="${PKG_VER}" -SIGN_CERT_DIR="${SIGN_CERT_DIR}" -SIGN_AUTHOR_KEY="${SIGN_AUTHOR_KEY}" -SIGN_AUTHOR_PWD="${SIGN_AUTHOR_PWD}" -SIGN_DIST1_KEY="${SIGN_DIST1_KEY}" -SIGN_DIST1_PWD="${SIGN_DIST1_PWD}" -SIGN_DIST1_CA="${SIGN_DIST1_CA}" -SIGN_DIST2_KEY="${SIGN_DIST2_KEY}" -SIGN_DIST2_PWD="${SIGN_DIST2_PWD}" -SIGN_DIST2_CA="${SIGN_DIST2_CA}" -SIGN_DIST2_ROOT="${SIGN_DIST2_ROOT}"

Fails with:

The message is "Exception in thread "main" java.lang.IllegalArgumentException: password is empty
    at org.tizen.common.sign.signer.TizenSigner.checkNullParameters(TizenSigner.java:165)
    at org.tizen.common.sign.signer.TizenSigner.main(TizenSigner.java:88)"
Signing failed!

Initializes the .tpk directory for packaging but fails at signing. One reason may be that the empty arguments for DIST2 vanish while invoking native-signer but this is just an idea.

I suggest to replace the positional arguments with named arguments. Then the order (which isn't exactly trivial with this number of parameters) doesn't matter anymore. (This goes for all those CLI tools that have a huge number of params)

Issues with tpk:

$SDK_PATH/tools/smart-build-interface/bin/tpk prints

Usage : tpk.exe BUILD_DIR PKG_NAME PRJ_NAME ARTIFACT_NAME PKG_VER STRIPPER STRIP LLVM_IR [SIGNER] [SIGN_CERT_DIR] [SIGN_AUTHOR_KEY] [SIGN_AUTHOR_PWD] [SIGN_DIST1_KEY] [SIGN_DIST1_PWD] [SIGN_DIST1_CA] [SIGN_DIST2_KEY] [SIGN_DIST2_PWD] [SIGN_DIST2_CA] [SIGN_DIST2_ROOT]

while the correct sequence requires the architecture before PKG_NAME

${TPK} "${BUILD_DIR}" "${ARCH_TPK}" "${PKG_NAME}" "${PRJ_NAME}" "${ARTIFACT_NAME}" "${PKG_VER}" "${STRIPPER}" "${STRIP}" "${LLVM_IR}"

Btw, when using the documented interface (without architecture) and the optional signing parameters, tpk segfaults (presumably because it tries to run/invoke the wrong parameter.) This could also not happen with named arguments instead of positional ones.

(Last and trivially, the usage message indicates tpk.exe on a linux system while the binary's name is just tpk - use argv[0] in the help message instead of a hardcoded string)

All in all, it would be great if the makefiles generated by eclipse would...

(1) Use paths relative to the project directory and not full paths (moving between build server and local machine is tedious), or, if absolute paths are required, at least use an externally influencable variable (environment variable) to indicate the project's root.

(2) Generate makefiles that include a target that builds the tpk to simplify headless builds. Even if eclipse itself doesn't use that target to build the tpk.

 

Hope this helps and can still make it into SDK2.4

Responses

1 Replies
daniel kim

Hi,

I'm expecting that next version will have improvement about it.

Regards