Conversation
Signed-off-by: Jo5ta <Jo5ta@mail.de>
Signed-off-by: Jo5ta <Jo5ta@mail.de>
Auto-detect non-interactive terminal using [ -t 0 ] instead of requiring CONTAINER_NON_INTERACTIVE=true to be set manually. Add missing pytz dependency to container Dockerfile. Signed-off-by: Jo5ta <Jo5ta@mail.de>
Replace duplicated compiler-intrinsic ASAN detection boilerplate in file.tests.cpp, memory.tests.cpp, and sync.tests.cpp with a single CLLTK_ASAN_ENABLED preprocessor macro defined by CMake when ENABLE_ASAN is ON, scoped to test targets only. Use GTEST_SKIP() for skipped tests instead of silent early return. Signed-off-by: Jo5ta <Jo5ta@mail.de>
stdbuf sets LD_PRELOAD=libstdbuf.so which displaces libasan from its required first position, causing ASAN to abort. Add is_asan_build() helper to detect ASAN via ldd and auto-skip stdbuf usage in live tests. Also fix memory leak in vector test (missing vector_free). Signed-off-by: Jo5ta <Jo5ta@mail.de>
Signed-off-by: Jo5ta <Jo5ta@mail.de>
…ties Fix inverted comparison in command_line_tool/CMakeLists.txt that compared the target name instead of target_type, making the check non-functional. Replace set_directory_properties() with invalid property names (CXX_STANDARD, LANGUAGE, etc. are target properties, not directory properties) with proper directory-scoped CMAKE_* variables in tests/CMakeLists.txt. Signed-off-by: Jo5ta <Jo5ta@mail.de>
Create clltk_warnings and clltk_warnings_extra INTERFACE libraries that encapsulate shared compiler warning flags. Targets link against these instead of using directory-scoped add_compile_options(). This prevents flag pollution across directory boundaries and enables composable builds. Signed-off-by: Jo5ta <Jo5ta@mail.de>
…tests, examples, and snapshot Replace add_compile_options() blocks in tests/, examples/, and snapshot_library/ with INTERFACE libraries (clltk_test_flags, clltk_example_flags) that targets link against. This eliminates directory-level flag leakage and makes per-target dependencies explicit and auditable. Signed-off-by: Jo5ta <Jo5ta@mail.de>
…nd PRIVATE keyword
Add BUILD_INTERFACE/INSTALL_INTERFACE generator expressions to public
include directories in tracing_library, decoder_tool, snapshot_library,
and cmake/CreateVersion.cmake so paths are correct for both build-tree
and installed consumers.
Replace raw pthread with Threads::Threads imported target in the
abstraction layer and process_threads example. Replace
${Boost_INCLUDE_DIRS}/${Boost_LIBRARIES} with Boost::boost imported
target in decoder_tool and cmd.tests. Add missing PRIVATE keyword to
clltk_decoder_object target_link_libraries.
Signed-off-by: Jo5ta <Jo5ta@mail.de>
…tories Add CONFIGURE_DEPENDS to all file(GLOB) and file(GLOB_RECURSE) calls across tests, decoder, and command_line_tool so that adding or removing source files triggers an automatic CMake re-configure. Remove no-op target_link_directories(PRIVATE .) from command_line_tool OBJECT library targets where the current directory contains no libraries to link against. Signed-off-by: Jo5ta <Jo5ta@mail.de>
Signed-off-by: Jo5ta <Jo5ta@mail.de>
…nfig - Split install components into runtime/devel/static/cmd/decoder for proper RPM subpackage separation - Add install(EXPORT) and CMake package config files (CLLTKConfig.cmake) so downstream projects can use find_package(CLLTK) - Add pkg-config .pc files for tracing, decoder, and snapshot libraries - Fix decoder library component from 'tracing' to 'decoder_libs' - Add per-component RPM package names, summaries, and dependencies - Add SRPM build params and fix source ignore patterns - Add ldconfig scriptlets for shared library components - Update CMakePresets package presets for new component structure - Remove internal targets (CLI commands, static libs) from export set Signed-off-by: Jo5ta <Jo5ta@mail.de>
Signed-off-by: Jo5ta <Jo5ta@mail.de>
Add comprehensive packaging validation tests (76 tests across 5 levels): - Level 1: RPM artifact validation (metadata, files, deps, scriptlets) - Level 2: Install smoke tests (cmake --install + verify) - Level 2+: Consumer project tests (find_package, pkg-config compilation) - Level 3: SRPM rebuild (skipped by default - CPack limitation) Fix RPM packaging issues found during test development: - Add NAMELINK_COMPONENT devel to all shared lib installs so unversioned .so symlinks go into clltk-devel RPM, not the runtime RPMs - Fix ldconfig scriptlets using POST_INSTALL_SCRIPT_FILE with lowercase component names and external scriptlet file (cmake/rpm_ldconfig.sh) - Remove component GROUPs from CreatePackage.cmake (caused CPack to merge components into group-level RPMs) Add CI integration: - scripts/ci-cd/step_package_validate.sh for running packaging tests - Step 8 in run_all.sh and ci.yml workflow Signed-off-by: Jo5ta <Jo5ta@mail.de>
CPack's CPACK_SOURCE_GENERATOR=RPM packages the install tree, not actual source code, making the resulting SRPM non-rebuildable. Replace with a proper SRPM workflow: - Add cmake/clltk.spec.in: Fedora-style RPM spec file with subpackages matching the CPack component RPMs (tracing, decoder, snapshot, devel, static, tools, python-decoder), using %cmake/%cmake_build/%cmake_install - Add cmake/build_srpm.sh: creates source tarball via git archive and builds SRPM with rpmbuild -bs - Add CMake custom target 'srpm' in CreatePackage.cmake - Remove old CPack srpm preset from CMakePresets.json - Remove CPACK_SOURCE_GENERATOR and CPACK_SOURCE_IGNORE_FILES (no longer needed since we use git archive instead of CPack source packaging) The SRPM rebuild test (test_srpm_rebuild.py) now runs and passes — rpmbuild --rebuild produces all expected binary RPMs from the SRPM. Also fixes style consistency: - Add shebang lines to all packaging test files - Deduplicate get_repo_root/get_build_dir by importing from tests.helpers.base instead of reimplementing locally Signed-off-by: Jo5ta <Jo5ta@mail.de>
Spec file: add missing BuildRequires (rapidjson-devel, cli11-devel, boost-regex), fix clltk-devel deps to include decoder/snapshot, remove wrong clltk-tools dep on clltk-tracing, add %license to all subpackages, add base package %files section, add python3 dep, add %changelog entry. CPack: fix ldconfig scriptlet variable case to UPPERCASE, fix devel deps, remove cmd tracing dep, fix filelist paths to use /usr instead of CMAKE_INSTALL_PREFIX. Tests: add 16 new tests (76->92) covering devel .so symlinks, decoder/ snapshot no-unversioned-so, debuginfo RPMs, ldd for decoder/snapshot, C++ pkg-config compile tests, SRPM subpackage count verification, and robust packages_exist() checking all expected RPMs. Signed-off-by: Jo5ta <Jo5ta@mail.de>
Simplify RPM package set by merging static libraries (.a) into the clltk-devel package — the separate clltk-static RPM added complexity without benefit at this project scale. Rename clltk-tools to clltk-cmd to match the internal CMake component name and better reflect that it ships a single CLI binary. Changes across spec, CPack config, CMakePresets, install components, and all packaging tests. Package count: 8 -> 7 subpackages (tracing, decoder, snapshot, devel, cmd, python-decoder, plus full monolithic). Signed-off-by: Jo5ta <Jo5ta@mail.de>
Signed-off-by: Jo5ta <Jo5ta@mail.de>
The configure_file() calls for .pc.in templates used CMAKE_SOURCE_DIR which resolves to the root project directory, not the CLLTK repo root. When libraries are included via add_subdirectory from an external project (e.g. tests/helpers/temp_target), CMAKE_SOURCE_DIR points to the wrong location causing 'file does not exist' errors. Fix by using CMAKE_CURRENT_SOURCE_DIR-relative paths with an EXISTS guard so pkg-config generation is skipped gracefully when consumed as a subdirectory. Also make debuginfo RPM tests skip instead of fail since CPack debuginfo generation is environment-dependent. Signed-off-by: Jo5ta <Jo5ta@mail.de>
ensure_rpms_built() skipped cmake --preset rpm when CMakeCache.txt already existed from the unittests preset. Since both presets share the same binaryDir, CPACK_GENERATOR was never set to RPM and CPack produced TGZ/Shell archives instead — causing all 11 packaging tests to fail. Fix by always reconfiguring with --fresh. Replace skipTest/SkipTest guards in packaging tests with hard asserts so missing RPMs or failed installs surface as real failures instead of being silently skipped. Remove skipIf(root) on file-permission tests by introducing clltk_as_nobody() which drops privileges via runuser, allowing the tests to run correctly inside CI containers that use root. Remove skipUnless(gcc/g++/rpmbuild) since these tools are always present in the CI container. Signed-off-by: Jo5ta <Jo5ta@mail.de>
Both commands were writing directly to fprintf(stdout, ...) while the decode and live commands already used the Output abstraction layer. Thread Output & through all print functions in list.cpp and meta.cpp, and add -o/--output and -z/--compress options to both commands for consistency. Signed-off-by: Jo5ta <Jo5ta@mail.de>
gzip_output: dup() stdout fd before gzdopen so gzclose does not close fd 1 when writing compressed output to stdout. output: fall back to heap allocation in GzipFileOutput::printf when the formatted string exceeds the 8 KB stack buffer instead of silently truncating it. snapshot: pass the recursive flag through take_snapshot and getAllFiles so --no-recursive actually takes effect when no --filter is given. tracebuffer: give a clear error when clltk clear is called with none of --buffer, --all, or --filter, instead of falling into find_tracebuffer with an empty name. file: initialise m_fd to -1 and check >= 0 throughout RegularFile; fd 0 is valid and was incorrectly treated as an error. ToString: delegate the signed write_digits overload to the unsigned one to avoid negative remainder producing non-digit characters for years before 0 (latent, not reachable from normal timestamps). Signed-off-by: Jo5ta <Jo5ta@mail.de>
…mmands The rename in c12ca22 dropped the original subcommand names and option flags that existed before the live decoder was introduced (0d4f31d). Restore them as additional aliases/option names so existing scripts and users are not broken. buffer command: - re-add 'tracebuffer' subcommand alias (was primary before rename) - re-add --name / -n option names for the buffer name argument trace command: - re-add 'tracepoint' subcommand alias (was primary before rename) - re-add --tracebuffer / --tb option names for the buffer argument - re-add --tracebuffer-size option name for the size argument - re-add --msg option name for the message argument - re-add -t short option for --tid - re-add -p short option for --pid Add tests/test_backwards_compat.py with 19 tests covering every old invocation style to prevent future regressions. Signed-off-by: Jo5ta <Jo5ta@mail.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.