# # spec file for package babeltrace # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define soname libbabeltrace %define sover 1 Name: babeltrace Version: 1.5.8 Release: 4.2 Summary: Common Trace Format Babel Tower License: GPL-2.0-only AND MIT URL: https://diamon.org/babeltrace Source: https://efficios.com/files/babeltrace/%{name}-%{version}.tar.bz2 Source1: https://efficios.com/files/babeltrace/%{name}-%{version}.tar.bz2.asc Source2: %{name}.keyring BuildRequires: bison BuildRequires: flex BuildRequires: pkgconfig BuildRequires: python3-setuptools BuildRequires: swig BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libdw) >= 0.154 BuildRequires: pkgconfig(libelf) >= 0.154 BuildRequires: pkgconfig(popt) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(uuid) ExcludeArch: s390 ppc %description This project provides trace read and write libraries, as well as a trace converter. A plugin can be created for any trace format to allow its conversion to/from another trace format. The main format expected to be converted to/from is the Common Trace Format (CTF). %package -n python3-%{name} Summary: Python Bindings for babeltrace %description -n python3-%{name} This project provides trace read and write libraries, as well as a trace converter. A plugin can be created for any trace format to allow its conversion to/from another trace format. Python Bindings for the babeltrace package. %package -n %{name}-devel Summary: Common Trace Format Babel Tower Requires: %{name} = %{version} %description -n %{name}-devel This project provides trace read and write libraries, as well as a trace converter. A plugin can be created for any trace format to allow its conversion to/from another trace format. The main format expected to be converted to/from is the Common Trace Format (CTF). %prep %setup -q %build export PYTHON="python3" export PYTHON_CONFIG="$PYTHON-config" %configure \ --disable-static \ --docdir=%{_docdir}/%{name} \ --enable-python-bindings %make_build %install %make_install find %{buildroot} -type f -name "*.la" -delete -print # Remove licences from doc. rm %{buildroot}%{_docdir}/%{name}/{LICENSE,mit-license.txt,gpl-2.0.txt} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc %{_docdir}/%{name}/ %license LICENSE mit-license.txt gpl-2.0.txt %{_bindir}/%{name}* %{_libdir}/%{soname}*.so.%{sover}* %{_mandir}/man1/*.1%{?ext_man} %files -n python3-%{name} %{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}-* %files -n %{name}-devel %{_includedir}/%{name}/ %{_libdir}/%{soname}*.so %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}-ctf.pc %changelog * Wed Jan 29 2025 Dominique Leuenberger - Add explicit python3-setuptools BuildRequires: needed when building with Python 3.13. * Mon Dec 13 2021 Dirk Müller - reenable babeltrace on armv6/v7 (switch to excludearch) * Mon Aug 31 2020 Andreas Schwab - Add riscv64 to ExclusiveArch * Wed Feb 26 2020 Alexei Sorokin - Update to version 1.5.8 (changes since 1.5.6): * Cleanup: bitfields: streamline use of underscores. * Fix: bitfield: shift undefined/implementation defined behaviours. * Fix: array and sequence field's 'elems' members can be left NULL. * Fix: invalid alignment of enumeration fields. * Fix: lttng-live format: do not error out on empty streams hang up. * Fix: lttng-live: ctf_live_packet_seek stream hang up handling. * Fix: lib/iterator.c: unbalanced ctx put (leak). * Fix: lttng-live: lttng_live_open_trace_read memory leak. * Fix: trace-collection: trace clock use after free. * Fix: lttng-live: use-after-free in get_next_index(). * Do not use diagnostic pragma when GCC version is lower than 4.6.0. * Missing define when not building with gcc. - Drop support for old openSUSE versions. * Mon Jul 15 2019 Berthold Gunreben - add s390x in ExclusiveArch * Wed Nov 14 2018 sor.alexei@meowr.ru - Update to version 1.5.6: * Fix: remove left-over debug logging statement. * Use trace->trace_id in check to remove trace from bt_ctx. * Fix: missing initializer braces warning. * Fix: zero out URL parsing array before use and ensure proper error reporting. * Sun Jun 17 2018 sor.alexei@meowr.ru - Update to version 1.5.5: * Propagate error from packet_seek in case of truncated packet. * Fix: report truncated files while reading. - Use tarball signing. * Tue Apr 3 2018 kukuk@suse.de - Use %%license instead of %%doc [bsc#1082318] * Thu Mar 15 2018 sor.alexei@meowr.ru - Update to version 1.5.4: * Use signed accessors for clock offsets. * Fix a signedness error in python complements. * Handle packet_seek errors. * Prevent calling adding the same trace recursively. * Make sure we have all the metadata streams before adding new traces. * Add missing debugging information in the live plugin. * Set stream id in HUP case. * Use list rather than ptr array for trace streams. * Fix a leak of streams. * Handle 0 session case in ask new streams. * Break loop on getting metadata error. * Return error on ask_new_stream when should quit. * Don't access missing ctf trace when getting metadata. * Fix lttng-live discarded event count after inactivity. * Fix timegm compat on Solaris. * Fix Python bindings when building with PIE hardening. * lttng-live: Print discarded event and packet lost warnings on stderr. * Fri Nov 3 2017 sor.alexei@meowr.ru - Disable static library build. - Enable Python 3 bindings build. - Remove explicit glib2-devel requirement for the devel package: is autodetected already. - Spec cleanup. * Fri Sep 1 2017 tonyj@suse.com - Update to version 1.5.3 for SLE15 (bsc#1055683) * Tue Aug 2 2016 normand@linux.vnet.ibm.com - add ppc64/ppc64le in ExclusiveArch * Mon Oct 5 2015 tonyj@suse.com - Cleanup urls in spec file (FATE#319273) * Mon Aug 31 2015 dmueller@suse.com - enable build for aarch64 (fate#318370) * Tue Jul 28 2015 tonyj@suse.com - Update to version 1.2.4 (FATE#319273) Changelog 1.2.4: * Fix: make sure we can exit the get_new_metadata loop * Docs fix: Change bt_ctf_writer_create_stream return description * Fix: offset_s and CTF clocks with frequency != 1GHz Changelog 1.2.3: * Fix: incorrect compiler warning * Fix: Don't assume that PROT_WRITE grants read permissions * Fix: align objstack on 8 bytes * Fix Python: Add a comment warning about an API limitation * Use BABELTRACE_HOST_NAME_MAX in test_ctf_writer.c * Add limits compatibility header * Fix: don't perform unaligned integer read/writes * Fix: Align buffers from objstack_alloc on sizeof(void *) * Fix: bt_ctf_field_type_structure_add_field argument validation Changelog 1.2.2: * Fix: Support out of tree builds in babeltrace * Fix: mmap trace read the stream_id from the first packet * Fix: check the lttng-relayd protocol version * Fix: don't update the trace collection if no new streams were received * Fix (Python bindings): Return a string if a sequence's element are chars * Fix: don't use a return code in _bt_ctf_stream_append_discarded_events * Fix: Report the sequence's length field's value as length * Fix: Variable name typo in SequenceField and Event classes * Fix python: remove weird char at the end of line * Fix: add missing files to gitignore * Fix: ctf-text: add missing double-quotes around enum tag * Fix: Add missing lttng_live_should_quit checks * Fix: Report errors occuring in lttng_live_read * Tue Apr 15 2014 tonyj@suse.com - Update to version 1.2.1 Changelog: * Fix: Accept an input port in the live URL when no session is provided * Fri Feb 28 2014 tonyj@suse.com - Update to version 1.2 * Mon Feb 10 2014 tonyj@suse.com - Update to version 1.1.1 * Fri Mar 15 2013 cfarrell@suse.com - license update: MIT and GPL-2.0 The correct operator is ^and^, not ^or^. Also, use SPDX format where possible * Mon Mar 11 2013 tonyj@suse.com - Upgrade to version 1.0.3 (FATE#314846) Changelog 1.0.3: * Fix: Double free when calling bt_context_remove_trace() * Add missing runall.sh to dist packaging * Fix: alignment of compound types containing array field Changelog 1.0.2: * Fix: add tests/lib missing files to Makefile.am Changelog 1.0.1: * Provides a basic pkg-config file for libbabeltrace * Fix erroneous warning/error messages * Fix comment in context.h * Cleanup: Remove whitespace at EOL from mit-license.txt * Add missing permission notice in each source file * Adding a test which do a sequence of seek BEGIN, LAST, BEGIN, LAST * Run seek tests on a second trace file * Add #define _GNU_SOURCE to remove warning about asprintf * Include a test for SEEK_BEGIN and SEEK_LAST * Fix: Report success even if we find at least one valid stream in find_max_timestamp_ctf_stream_class * Fix SEEK_BEGIN for streams that do not contain any event Changelog 1.0.0: * tests: add test traces to distribution tarball * Document bash requirement for make check in README * Add tests to make check * Fix: add missing header size validation * callbacks.c: handle extract_ctf_stream_event return value * Cleanup: fix cppcheck warning * Cleanup: fix cppcheck warnings * fix double-free on error path Changelog 1.0.0-rc6: * Add valgrind suppression file for libpopt * Fix: unplug memory leak that causes popt-0.13 to segfault * Fix: test all close/fclose ret val, fix double close * Cleanup: add missing newline * Fix: fd leak on trace close * Fix memory leaks induced by lack of libpopt documentation * babeltrace: fix poptGetOptArg memleak * plugins: implement plugin unregister * Doc: valgrind with babeltrace (glib workaround) * callsites: fix memory leak * Fix: free all the metadata-related memory * Fix : Free the iterator callback arrays * Fix : cleanup teardown of context * Fix : protect static float and double declarations * callsite: support instruction pointer field * Document that list.h is LGPLv2.1, but entirely trivial * Fix: callsite support: list multiple callsites * Add callsite support * Fix: Allow 64-bit packet offset * Fix: emf uri: surround by " " * Handle model.emf.uri event info * Fix: Documentation cleanup * Fix: misplaced C++ ifdef * Fix babeltrace-log get big line when the input file last line don't have enter * API Fix: bt_ctf_iter_read_event_flags * Fix: get encoding for char arrays and sequences * Fix: access to declaration from declaration_field * Fix: get_declaration_* should not cast to field * Fix babeltrace-log uninitialized memory (v2) * Revert "Fix babeltrace-log uninitialized memory" * Fix babeltrace-log uninitialized memory * Fix: access field properties by declaration * Fix: check return value of get_char_array * Fix: C++ support to API header files Changelog 1.0.0-rc5: * Change default printout to add host, process names and vpid * Add support for trace:hostname field * Fix: allow specifying more than one input trace path * Fix: make warnings (partial errors) visible * Fix: --clock-force-correlate to handle trace collections gathered from v * Documentation: update API doc with enum functions * Fix: API: remove unsupported BT_SEEK_END from API * API documentation * Cleanup: shut up gcc uninitialized var warning * Fix: support large files on 32-bit systems * Fix: remove unused fts.h include * Fix: add missing enum support to API * Fix: handle clock offset with frequency different from 1GHz * Cleanup: update ifdef wrapper name * Fix: clarify bt_ctf_get_field_list * Fix trace-collection.h: No such file or directory that build code with l * Fix: check return value of bt_context_create * Fix: ensure mmap_base_offset is zeroed on initialization * Fix: Reswitch to FTW for add_traces_recursive * Fix: don't free unallocated index * Fix: don't close the metadata FD if a FP is passed * Add BT_SEEK_LAST type to bt_iter_pos * Fix: iterator.c BT_SEEK_RESTORE: check return value * Fix: complete error handling of babeltrace API * cleanup: protected -> hidden: cleanup symbol table * Fix: add mmap_base_offset to ctf_stream_pos * Fix: assign the current clock for mmap traces * Fix: libbabeltrace add missing static declaration * Fix: safety checks for opening mmap traces * Remove trace-collection.h from include_headers * Fix: protect visibility of ctf-parser functions * Fix: correct name of bt_ctf_field_get_error in comments and typo in man * Fix: wrong type in bt_ctf_get_uint64/int64 * API cleanup name get_timestamp and get_cycles * fix comment struct bt_saved_pos * Fix: Add missing clock-types.h * Get rid of clock-raw and use real clock * Cleanup (messages): Make the wording of the signedness warning clearer * Fix: error path if heap_init fails * Fix: Remove obsolete bt_iter_seek function * Make the signedness warning useful with the field name * Fix: Restore heap for SEEK_BEGIN * Fix: check if handle is valid * Fix: iterator set_pos * Fix: get rid of consumed flag * Fix: add missing heap_copy * Fix: babeltrace assert() triggered by directories within trace * Several fixes for bt_iter_pos related functions * Fix iterator: various fixes * Fix: remove duplicate yydebug var * Fix babeltrace iterator lib: seek at time 0 * Mon Jun 4 2012 tonyj@suse.com - Update to version 1.0.0-rc4 * Tue May 1 2012 tonyj@suse.com - Update to version 1.0.0-rc2 * Fri Apr 20 2012 tonyj@suse.com - Update to version 1.0.0-rc1 * Tue Mar 20 2012 tonyj@suse.com - Update to version 1.0.0-pre4 * Wed Mar 14 2012 tonyj@suse.com - Update to version 1.0.0-pre3 * Mon Feb 27 2012 tonyj@suse.com - Update to version 1.0.0-pre2 * Wed Jan 4 2012 tonyj@suse.com - Update to version 0.8