From c4101770d3c2d712aa2080a90e16c0ddf6955d4ad21faa2059f98acb264db40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 15:59:18 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main libtracefs revision b336610f190637beb5a5f479cacdfe81 --- .gitattributes | 23 + ...racefs-Add-initial-support-for-meson.patch | 560 ++++++++++++++++++ libtracefs-1.6.4.tar.gz | 3 + libtracefs.changes | 211 +++++++ libtracefs.spec | 103 ++++ 5 files changed, 900 insertions(+) create mode 100644 .gitattributes create mode 100644 0001-libtracefs-Add-initial-support-for-meson.patch create mode 100644 libtracefs-1.6.4.tar.gz create mode 100644 libtracefs.changes create mode 100644 libtracefs.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-libtracefs-Add-initial-support-for-meson.patch b/0001-libtracefs-Add-initial-support-for-meson.patch new file mode 100644 index 0000000..da8c1e2 --- /dev/null +++ b/0001-libtracefs-Add-initial-support-for-meson.patch @@ -0,0 +1,560 @@ +From de739be1299aaa30469fc90ddc0f97ea915c784e Mon Sep 17 00:00:00 2001 +From: Daniel Wagner +Date: Thu, 7 Jul 2022 14:05:49 +0200 +Subject: [PATCH v7] libtracefs: Add initial support for meson + +Introduce Meson as build framework for building libtracefs. + +The build steps are: + + # configure using .build as build directory and install destination + # /tmp/test + meson setup --prefix=/tmp/libtraceevent .build + + # trigger the build + meson compile -C .build + + # In case you want to build the documentation, trigger the + # build via the 'docs' target: + meson compile -C build docs + + # install the library (and documentation) + meson install -C .build + +Signed-off-by: Daniel Wagner +--- + v7: + - set default html doc path to share/doc/libtracefs-doc + - list libtraceevent in Required pkg-config section. + - install (any) man5 pages (keep it in sync with other projects) + +v6: + - changed project defaults to --default-library=both + - code style consistency updates + - hardening doc install script (shellcheck) + - renamed install-man.sh.in to install-docs.sh.in + - install-docs.sh.in installs html pages too + - introduces docs target + - updated copyright year + - streamlined documentation meson build file + +v5: + - build unit test only if cunit is found + - default build target is debug + - do not install man pages into subdirs + - install sqlhist (because we install the man page too, so why not the tool?) + +v4: + - add subdir include path to cflags in pkgconfg file + - refactoring build instruction for section 1 and section 3 documentation + into one loop (reduce code duplication) + +v3: + - build documetation + - build samples + - set default location to /usr/local + +v2: + - updated commit message + - dropped the include path patch, the pkg-config + from libtraceevent is including them + +v1: + - initial version + + Documentation/install-docs.sh.in | 20 ++++ + Documentation/meson.build | 197 +++++++++++++++++++++++++++++++ + include/meson.build | 11 ++ + meson.build | 47 ++++++++ + meson_options.txt | 16 +++ + samples/extract-example.sh | 3 + + samples/meson.build | 45 +++++++ + src/meson.build | 63 ++++++++++ + utest/meson.build | 17 +++ + 9 files changed, 419 insertions(+) + create mode 100755 Documentation/install-docs.sh.in + create mode 100644 Documentation/meson.build + create mode 100644 include/meson.build + create mode 100644 meson.build + create mode 100644 meson_options.txt + create mode 100644 samples/extract-example.sh + create mode 100644 samples/meson.build + create mode 100644 src/meson.build + create mode 100644 utest/meson.build + +diff --git a/Documentation/install-docs.sh.in b/Documentation/install-docs.sh.in +new file mode 100755 +index 000000000000..eca9b1f42dcc +--- /dev/null ++++ b/Documentation/install-docs.sh.in +@@ -0,0 +1,20 @@ ++#!/bin/bash ++# SPDX-License-Identifier: LGPL-2.1 ++# ++# Copyright (c) 2023 Daniel Wagner, SUSE LLC ++ ++for section in 1 3 5; do ++ while IFS= read -r -d '' man; do ++ [ ! -d "${DESTDIR}@MANDIR@/man${section}" ] && install -d "${DESTDIR}@MANDIR@/man${section}" ++ ++ echo Installing "${man}" to "${DESTDIR}@MANDIR@/man${section}" ++ install -m 0644 "${man}" "${DESTDIR}@MANDIR@/man${section}/" ++ done< <(find "@SRCDIR@" -name "*\.${section}" -type f -print0) ++done ++ ++while IFS= read -r -d '' html; do ++ [ ! -d "${DESTDIR}@HTMLDIR@" ] && install -d "${DESTDIR}@HTMLDIR@" ++ ++ echo Installing "${html}" to "${DESTDIR}@HTMLDIR@" ++ install -m 0644 "${html}" "${DESTDIR}@HTMLDIR@" ++done< <(find "@SRCDIR@" -name "*\.html" -type f -print0) +diff --git a/Documentation/meson.build b/Documentation/meson.build +new file mode 100644 +index 000000000000..efb78b602965 +--- /dev/null ++++ b/Documentation/meson.build +@@ -0,0 +1,197 @@ ++# SPDX-License-Identifier: LGPL-2.1 ++# ++# Copyright (c) 2023 Daniel Wagner, SUSE LLC ++ ++# input text file: man page section ++ ++sources = { ++ 'libtracefs-sqlhist.txt.1': '1', ++ 'libtracefs-cpu-open.txt': '3', ++ 'libtracefs-cpu.txt': '3', ++ 'libtracefs-dynevents.txt': '3', ++ 'libtracefs-eprobes.txt': '3', ++ 'libtracefs-error.txt': '3', ++ 'libtracefs-events-file.txt': '3', ++ 'libtracefs-events-tep.txt': '3', ++ 'libtracefs-events.txt': '3', ++ 'libtracefs-files.txt': '3', ++ 'libtracefs-filter.txt': '3', ++ 'libtracefs-function-filter.txt': '3', ++ 'libtracefs-hist-cont.txt': '3', ++ 'libtracefs-hist-mod.txt': '3', ++ 'libtracefs-hist.txt': '3', ++ 'libtracefs-instances-affinity.txt': '3', ++ 'libtracefs-instances-file-manip.txt': '3', ++ 'libtracefs-instances-files.txt': '3', ++ 'libtracefs-instances-manage.txt': '3', ++ 'libtracefs-instances-utils.txt': '3', ++ 'libtracefs-iterator.txt': '3', ++ 'libtracefs-kprobes.txt': '3', ++ 'libtracefs-log.txt': '3', ++ 'libtracefs-marker_raw.txt': '3', ++ 'libtracefs-marker.txt': '3', ++ 'libtracefs-option-get.txt': '3', ++ 'libtracefs-option-misc.txt': '3', ++ 'libtracefs-options.txt': '3', ++ 'libtracefs-sql.txt': '3', ++ 'libtracefs-stream.txt': '3', ++ 'libtracefs-synth2.txt': '3', ++ 'libtracefs-synth-info.txt': '3', ++ 'libtracefs-synth.txt': '3', ++ 'libtracefs-traceon.txt': '3', ++ 'libtracefs-tracer.txt': '3', ++ 'libtracefs.txt': '3', ++ 'libtracefs-uprobes.txt': '3', ++ 'libtracefs-utils.txt': '3', ++} ++ ++conf_dir = meson.current_source_dir() + '/' ++top_source_dir = meson.current_source_dir() + '/../' ++ ++## ++# For asciidoc ... ++# -7.1.2, no extra settings are needed. ++# 8.0-, set ASCIIDOC8. ++# ++ ++# ++# For docbook-xsl ... ++# -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0) ++# 1.69.0, no extra settings are needed? ++# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP? ++# 1.71.1, no extra settings are needed? ++# 1.72.0, set DOCBOOK_XSL_172. ++# 1.73.0-, set ASCIIDOC_NO_ROFF ++# ++ ++# ++# If you had been using DOCBOOK_XSL_172 in an attempt to get rid ++# of 'the ".ft C" problem' in your generated manpages, and you ++# instead ended up with weird characters around callouts, try ++# using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8). ++# ++ ++if get_option('asciidoctor') ++ asciidoc = find_program('asciidoctor') ++ asciidoc_extra = ['-a', 'compat-mode'] ++ asciidoc_extra += ['-I.'] ++ asciidoc_extra += ['-r', 'asciidoctor-extensions'] ++ asciidoc_extra += ['-a', 'mansource=libtraceevent'] ++ asciidoc_extra += ['-a', 'manmanual="libtraceevent Manual"'] ++ asciidoc_html = 'xhtml5' ++else ++ asciidoc = find_program('asciidoc') ++ asciidoc_extra = ['--unsafe'] ++ asciidoc_extra += ['-f', conf_dir + 'asciidoc.conf'] ++ asciidoc_html = 'xhtml11' ++ ++ r = run_command(asciidoc, '--version', check: true) ++ v = r.stdout().strip() ++ if v.version_compare('>=8.0') ++ asciidoc_extra += ['-a', 'asciidoc7compatible'] ++ endif ++endif ++ ++manpage_xsl = conf_dir + 'manpage-normal.xsl' ++ ++if get_option('docbook-xls-172') ++ asciidoc_extra += ['-a', 'libtraceevent-asciidoc-no-roff'] ++ manpage_xsl = conf_dir + 'manpage-1.72.xsl' ++elif get_option('asciidoc-no-roff') ++ # docbook-xsl after 1.72 needs the regular XSL, but will not ++ # pass-thru raw roff codes from asciidoc.conf, so turn them off. ++ asciidoc_extra += ['-a', 'libtraceevent-asciidoc-no-roff'] ++endif ++ ++xmlto = find_program('xmlto') ++xmlto_extra = [] ++ ++if get_option('man-bold-literal') ++ xmlto_extra += ['-m ', conf_dir + 'manpage-bold-literal.xsl'] ++endif ++ ++if get_option('docbook-suppress-sp') ++ xmlto_extra += ['-m ', conf_dir + 'manpage-suppress-sp.xsl'] ++endif ++ ++check_doc = custom_target( ++ 'check-doc', ++ output: 'dummy', ++ command : [ ++ top_source_dir + 'check-manpages.sh', ++ meson.current_source_dir()]) ++ ++gen = generator( ++ asciidoc, ++ output: '@BASENAME@.xml', ++ arguments: [ ++ '-b', 'docbook', ++ '-d', 'manpage', ++ '-a', 'libtraceevent_version=' + meson.project_version(), ++ '-o', '@OUTPUT@'] ++ + asciidoc_extra ++ + ['@INPUT@']) ++ ++man = [] ++html = [] ++foreach txt, section : sources ++ # build man page(s) ++ xml = gen.process(txt) ++ man += custom_target( ++ txt.underscorify() + '_man', ++ input: xml, ++ output: '@BASENAME@.' + section, ++ depends: check_doc, ++ command: [ ++ xmlto, ++ '-m', manpage_xsl, ++ 'man', ++ '-o', '@OUTPUT@'] ++ + xmlto_extra ++ + ['@INPUT@']) ++ ++ # build html pages ++ html += custom_target( ++ txt.underscorify() + '_html', ++ input: txt, ++ output: '@BASENAME@.html', ++ depends: check_doc, ++ command: [ ++ asciidoc, ++ '-b', asciidoc_html, ++ '-d', 'manpage', ++ '-a', 'libtraceevent_version=' + meson.project_version(), ++ '-o', '@OUTPUT@'] ++ + asciidoc_extra ++ + ['@INPUT@']) ++endforeach ++ ++# Install path workaround because: ++# ++# - xmlto might generate more than one file and we would to tell meson ++# about those output files. We could figure out which files are generated ++# (see sed match in check-manpages.sh). ++# ++# - The man page generation puts all the generated files under sub dirs ++# and it's not obvious how to tell Meson it should not do this without ++# causing the install step to fail (confusion where the generated files ++# are stored) ++# ++# - The documentation build is not part of the 'build' target. The user ++# has explicitly to trigger the doc build. Hence the documentation is ++# not added to the 'install' target. ++# ++# Thus just use a plain old shell script to move the generated files to the ++# right location. ++ ++conf = configuration_data() ++conf.set('SRCDIR', meson.current_build_dir()) ++conf.set('MANDIR', mandir) ++conf.set('HTMLDIR', htmldir) ++configure_file( ++ input: 'install-docs.sh.in', ++ output: 'install-docs.sh', ++ configuration: conf) ++ ++meson.add_install_script( ++ join_paths(meson.current_build_dir(), 'install-docs.sh')) +diff --git a/include/meson.build b/include/meson.build +new file mode 100644 +index 000000000000..52db432c8275 +--- /dev/null ++++ b/include/meson.build +@@ -0,0 +1,11 @@ ++# SPDX-License-Identifier: LGPL-2.1 ++# ++# Copyright (c) 2023 Daniel Wagner, SUSE LLC ++ ++headers = [ ++ 'tracefs.h', ++] ++ ++foreach h : headers ++ install_headers(h, subdir : 'libtracefs') ++endforeach +diff --git a/meson.build b/meson.build +new file mode 100644 +index 000000000000..e793cfc16e14 +--- /dev/null ++++ b/meson.build +@@ -0,0 +1,47 @@ ++# SPDX-License-Identifier: LGPL-2.1 ++# ++# Copyright (c) 2023 Daniel Wagner, SUSE LLC ++ ++project( ++ 'libtracefs', ['c'], ++ meson_version: '>= 0.50.0', ++ license: 'LGPL-2.1', ++ version: '1.6.3', ++ default_options: [ ++ 'c_std=gnu99', ++ 'buildtype=debug', ++ 'default_library=both', ++ 'prefix=/usr/local', ++ 'warning_level=1']) ++ ++library_version = meson.project_version() ++ ++libtraceevent_dep = dependency('libtraceevent', version: '>= 1.7.0', required: true) ++cunit_dep = dependency('cunit', required : false) ++ ++prefixdir = get_option('prefix') ++bindir = join_paths(prefixdir, get_option('bindir')) ++mandir = join_paths(prefixdir, get_option('mandir')) ++htmldir = join_paths(prefixdir, get_option('htmldir')) ++ ++add_project_arguments( ++ [ ++ '-D_GNU_SOURCE', ++ ], ++ language : 'c') ++ ++incdir = include_directories(['include']) ++ ++subdir('src') ++subdir('include') ++if cunit_dep.found() ++ subdir('utest') ++endif ++subdir('samples') ++subdir('Documentation') ++ ++custom_target( ++ 'docs', ++ output: 'docs', ++ depends: [html, man], ++ command: ['echo']) +diff --git a/meson_options.txt b/meson_options.txt +new file mode 100644 +index 000000000000..1d92c28d5935 +--- /dev/null ++++ b/meson_options.txt +@@ -0,0 +1,16 @@ ++# SPDX-License-Identifier: LGPL-2.1 ++# ++# Copyright (c) 2023 Daniel Wagner, SUSE LLC ++ ++option('htmldir', type : 'string', value : 'share/doc/libtracefs-doc', ++ description : 'directory for HTML documentation') ++option('asciidoctor', type : 'boolean', value: false, ++ description : 'use asciidoctor instead of asciidoc') ++option('docbook-xls-172', type : 'boolean', value : false, ++ description : 'enable docbook XLS 172 workaround') ++option('asciidoc-no-roff', type : 'boolean', value : false, ++ description : 'enable no roff workaround') ++option('man-bold-literal', type : 'boolean', value : false, ++ description : 'enable bold literals') ++option('docbook-suppress-sp', type : 'boolean', value : false, ++ description : 'docbook suppress sp') +diff --git a/samples/extract-example.sh b/samples/extract-example.sh +new file mode 100644 +index 000000000000..c5c0f702e7f0 +--- /dev/null ++++ b/samples/extract-example.sh +@@ -0,0 +1,3 @@ ++#!/bin/bash ++ ++cat $1 | sed -ne '/^EXAMPLE/,/FILES/ { /EXAMPLE/,+2d ; /^FILES/d ; /^--/d ; p}' > $2 +diff --git a/samples/meson.build b/samples/meson.build +new file mode 100644 +index 000000000000..5e8ad270f812 +--- /dev/null ++++ b/samples/meson.build +@@ -0,0 +1,45 @@ ++# SPDX-License-Identifier: LGPL-2.1 ++# ++# Copyright (c) 2023 Daniel Wagner, SUSE LLC ++ ++examples = [ ++ 'dynevents', ++ 'kprobes', ++ 'eprobes', ++ 'uprobes', ++ 'synth', ++ 'error', ++ 'filter', ++ 'function-filter', ++ 'hist', ++ 'hist-cont', ++ 'tracer', ++ 'stream', ++ 'instances-affinity', ++ 'cpu', ++] ++ ++extract_examples = find_program('extract-example.sh') ++gen = generator( ++ extract_examples, ++ output: '@BASENAME@.c', ++ arguments: ['@INPUT@', '@OUTPUT@']) ++ ++foreach ex : examples ++ src = gen.process(meson.current_source_dir() + '/../Documentation/libtracefs-@0@.txt'.format(ex)) ++ executable( ++ ex.underscorify(), ++ src, ++ dependencies: [libtracefs_dep, libtraceevent_dep], ++ include_directories: [incdir]) ++endforeach ++ ++# sqlhist is unique and stands on its own ++src = gen.process(meson.current_source_dir() + '/../Documentation/libtracefs-sql.txt') ++executable( ++ 'sqlhist', ++ src, ++ dependencies: [libtracefs_dep, libtraceevent_dep], ++ include_directories: [incdir], ++ install: true, ++ install_dir: bindir) +diff --git a/src/meson.build b/src/meson.build +new file mode 100644 +index 000000000000..56087e2301bf +--- /dev/null ++++ b/src/meson.build +@@ -0,0 +1,63 @@ ++# SPDX-License-Identifier: LGPL-2.1 ++# ++# Copyright (c) 2023 Daniel Wagner, SUSE LLC ++ ++sources= [ ++ 'tracefs-dynevents.c', ++ 'tracefs-eprobes.c', ++ 'tracefs-events.c', ++ 'tracefs-filter.c', ++ 'tracefs-hist.c', ++ 'tracefs-instance.c', ++ 'tracefs-kprobes.c', ++ 'tracefs-marker.c', ++ 'tracefs-record.c', ++ 'tracefs-sqlhist.c', ++ 'tracefs-tools.c', ++ 'tracefs-uprobes.c', ++ 'tracefs-utils.c', ++] ++ ++flex = find_program('flex', required: true) ++bison = find_program('bison', required: true) ++ ++lgen = generator(flex, ++output : '@PLAINNAME@.yy.c', ++arguments : ['-o', '@OUTPUT@', '@INPUT@']) ++ ++pgen = generator(bison, ++output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'], ++arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']) ++ ++lfiles = lgen.process('sqlhist.l') ++pfiles = pgen.process('sqlhist.y') ++ ++libtracefs = library( ++ 'tracefs', ++ sources, lfiles, pfiles, ++ version: library_version, ++ dependencies: [libtraceevent_dep], ++ include_directories: [incdir], ++ install: true) ++ ++libtracefs_static = static_library( ++ 'tracefs_static', ++ sources, lfiles, pfiles, ++ dependencies: [libtraceevent_dep], ++ include_directories: [incdir], ++ install: false) ++ ++pkg = import('pkgconfig') ++pkg.generate( ++ libtracefs, ++ libraries: [libtraceevent_dep], ++ subdirs: 'libtracefs', ++ filebase: meson.project_name(), ++ name: meson.project_name(), ++ version: meson.project_version(), ++ description: 'Manage trace fs', ++ url: 'https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/') ++ ++libtracefs_dep = declare_dependency( ++ include_directories: ['.'], ++ link_with: libtracefs) +diff --git a/utest/meson.build b/utest/meson.build +new file mode 100644 +index 000000000000..91a526fca2bf +--- /dev/null ++++ b/utest/meson.build +@@ -0,0 +1,17 @@ ++# SPDX-License-Identifier: LGPL-2.1 ++# ++# Copyright (c) 2023 Daniel Wagner, SUSE LLC ++ ++source = [ ++ 'trace-utest.c', ++ 'tracefs-utest.c', ++] ++ ++e = executable( ++ 'trace-utest', ++ source, ++ include_directories: [incdir], ++ dependencies: [libtraceevent_dep, cunit_dep], ++ link_with: libtracefs_static) ++ ++test('trace-utest', e) +-- +2.39.0 + diff --git a/libtracefs-1.6.4.tar.gz b/libtracefs-1.6.4.tar.gz new file mode 100644 index 0000000..8968daf --- /dev/null +++ b/libtracefs-1.6.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52ce793dbb35a3e59bddce31de09a5d92cedd4d0702e64d0916f1ccdb00526c9 +size 193967 diff --git a/libtracefs.changes b/libtracefs.changes new file mode 100644 index 0000000..199f9f9 --- /dev/null +++ b/libtracefs.changes @@ -0,0 +1,211 @@ +------------------------------------------------------------------- +Tue Feb 7 13:23:20 UTC 2023 - Daniel Wagner + +- Sync meson build patch with latest upstream version + * Documentation is built via extra build target + +------------------------------------------------------------------- +Wed Jan 18 09:39:05 UTC 2023 - Dirk Müller + +- update to 1.6.4: + * Flush pipe data in tracefs_cpu_flush() + * Add check for duplicate functions in man pages + * Make sure 32 bit works on 64 bit file systems + +------------------------------------------------------------------- +Tue Dec 27 09:22:13 UTC 2022 - Daniel Wagner + +- Use meson to build package + * add 0001-libtracefs-Add-initial-support-for-meson.patch + +------------------------------------------------------------------- +Fri Dec 16 15:06:03 UTC 2022 - Jan Engelhardt + +- Update to release 1.6.3 + * Fix a regression of where tracefs_tracing_dir() did not mount + the tracefs file system if it was not already mounted. + Same for mounting debugfs with tracefs_debug_dir(). + * Have tracefs_tracing_dir() and tracefs_debug_dir() check if the + cached directory still exists and is mounted. + +------------------------------------------------------------------- +Fri Nov 25 00:14:30 UTC 2022 - Jan Engelhardt + +- Update to release 1.6.1 + * Fix tracefs_iterate_raw_events() to handle NULL callback + +------------------------------------------------------------------- +Wed Nov 16 01:32:28 UTC 2022 - Jan Engelhardt + +- Update to release 1.6.0 + * No changelog provided by upstream + * A set of new API functions + +------------------------------------------------------------------- +Mon Aug 29 09:59:28 UTC 2022 - Jan Engelhardt + +- Update to release 1.4.2 + * Build fixes only (parallel build, musl support) + +------------------------------------------------------------------- +Tue Jun 21 11:27:48 UTC 2022 - Jan Engelhardt + +- Force make -j1 during build because of object file corruption. + +------------------------------------------------------------------- +Tue Jun 7 08:34:18 UTC 2022 - Daniel Wagner + +- Update to latest upstream version (1.4.1) + * Raw uprobe API: tracefs_uprobe_alloc(), tracefs_uretprobe_alloc + * Return the debugfs mount point from tracefs_debug_dir() + * sqlhst: Fix labels being ignored for synthetic event field + * sqlhst: Allow same event to be both the start and end event + * sqlhst: Use unique names for labels + * sqlhst: Report errors when executing commands + +------------------------------------------------------------------- +Tue Apr 5 15:46:56 UTC 2022 - Daniel Wagner + +- Update to latest upstream version (1.3.1) + * Optimized string list handling. It was always stated that some string + lists must be freed with tracefs_list_free(), and now it is mandatory, as + metadata is used to store the size, and normal freeing of the list will + cause memory issues. + * More consistency with errno values + * sqlhist is now officially built + * New methods for setting and reading affinity + tracefs_instance_set_affinity_set() + tracefs_instance_set_affinity_raw() + tracefs_instance_set_affinity() + tracefs_instance_get_affinity() + tracefs_instance_get_affinity_raw() + tracefs_instance_get_affinity_set() + * New method to see the system tracers + tracefs_instances() + * New methods to read and clear the error log + tracefs_error_last() + tracefs_error_all() + tracefs_error_clear() + * New methods to modify the string lists + tracefs_list_add() + tracefs_list_size() + * New method to stop the iterator over raw events + tracefs_iterate_stop() + * New methods to make it easier to access event files + tracefs_event_get_file() + tracefs_event_file_read() + tracefs_event_file_write() + tracefs_event_file_append() + tracefs_event_file_clear() + tracefs_event_file_exists() + * New method to get the available filter functions + tracefs_filter_functions() + * New methods to enable or disable tracers + tracefs_tracer_set() + tracefs_tracer_clear() + * New methods for streaming the trace_pipe file + tracefs_trace_pipe_stream() + tracefs_trace_pipe_print() + tracefs_trace_pipe_stop() + * New methods for creating, modifying and destroying dynamic events + tracefs_dynevent_create() + tracefs_dynevent_destroy() + tracefs_dynevent_destroy_all() + tracefs_dynevent_free() + tracefs_dynevent_list_free() + tracefs_dynevent_get_all() + tracefs_dynevent_get() + tracefs_dynevent_info() + tracefs_dynevent_get_event() + * New method to create an event probe (then use dynamic methods above) + tracefs_eprobe_alloc() + * New methods to create kprobes and kretprobes + tracefs_kprobe_alloc() + tracefs_kretprobe_alloc() + tracefs_kprobe_raw() + tracefs_kretprobe_raw() + * New methods for creating, modifying and destroying histograms + tracefs_hist_free() + tracefs_hist_alloc() + tracefs_hist_alloc_2d() + tracefs_hist_alloc_nd() + tracefs_hist_get_name() + tracefs_hist_get_event() + tracefs_hist_get_system() + tracefs_hist_add_key() + tracefs_hist_add_value() + tracefs_hist_add_sort_key() + tracefs_hist_set_sort_key() + tracefs_hist_sort_key_direction() + tracefs_hist_add_name() + tracefs_hist_append_filter() + tracefs_hist_echo_cmd() + tracefs_hist_command() + tracefs_hist_start() + tracefs_hist_pause() + tracefs_hist_continue() + tracefs_hist_reset() + tracefs_hist_destroy() + * New methods for creating, modifying and destroying synthetic events + tracefs_synth_get_name() + tracefs_synth *tracefs_synth_alloc() + tracefs_synth_add_match_field() + tracefs_synth_add_compare_field() + tracefs_synth_add_start_field() + tracefs_synth_add_end_field() + tracefs_synth_append_start_filter() + tracefs_synth_append_end_filter() + tracefs_synth_trace() + tracefs_synth_snapshot() + tracefs_synth_save() + tracefs_synth_complete() + tracefs_synth_get_start_hist() + tracefs_synth_create() + tracefs_synth_destroy() + tracefs_synth_free() + tracefs_synth_echo_cmd() + tracefs_synth_raw_fmt() + tracefs_synth_show_event() + tracefs_synth_show_start_hist() + tracefs_synth_show_end_hist() + tracefs_synth_get_event() + * New methods to modify event filters + tracefs_filter_string_append() + tracefs_filter_string_verify() + tracefs_event_filter_apply() + tracefs_event_filter_clear() + tracefs_event_append_filter() + tracefs_event_verify_filter() + * New method to create a synthetic event via a SQL string + tracefs_sql() + The man page comes with its own program (sqlhist). + +------------------------------------------------------------------- +Tue Feb 22 12:34:56 UTC 2022 - olaf@aepfle.de + +- Force correct pkgconfig_dir location to fix build + +------------------------------------------------------------------- +Wed Jan 19 13:13:55 UTC 2022 - Dario Faggioli + +- Update to latest upstream version (1.2.5) + * No changelog provided again + +------------------------------------------------------------------- +Fri May 14 15:06:28 UTC 2021 - Dario Faggioli + +- Update to new upstream version (1.2.0) + * No changelog was provided by upstream. + * libtracefs: Add tracefs_event_enable/disable() API + +------------------------------------------------------------------- +Mon May 10 08:03:05 UTC 2021 - Dario Faggioli + +- update to new upstream version (1.1.2) +- drop patch 294319.patch (already present upstream) + +------------------------------------------------------------------- +Tue Dec 22 19:28:57 UTC 2020 - Jan Engelhardt + +- Initial package (version 1.0.0) for build.opensuse.org +- Add 294319.patch diff --git a/libtracefs.spec b/libtracefs.spec new file mode 100644 index 0000000..20c515a --- /dev/null +++ b/libtracefs.spec @@ -0,0 +1,103 @@ +# +# spec file for package libtracefs +# +# Copyright (c) 2023 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/ +# + + +Name: libtracefs +%define lname libtracefs1 +Version: 1.6.4 +Release: 0 +Summary: Linux kernel trace file system library +License: LGPL-2.1-only +Group: Development/Libraries/C and C++ +URL: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ +Source: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/%name-%version.tar.gz +Patch1: 0001-libtracefs-Add-initial-support-for-meson.patch +BuildRequires: asciidoc +BuildRequires: bison +BuildRequires: fdupes +BuildRequires: flex +BuildRequires: meson +BuildRequires: pkg-config +BuildRequires: source-highlight +BuildRequires: xmlto +BuildRequires: xz +BuildRequires: pkgconfig(libtraceevent) >= 1.3 + +%description +This library provides C APIs to access the kernel trace file system. + +%package -n %lname +Summary: Linux kernel trace file system library +Group: System/Libraries + +%description -n %lname +This library provides C APIs to access the kernel trace file system. + +%package tools +Summary: Tools for libtracefs +Group: Development/Libraries/C and C++ +Requires: %lname = %version + +%description tools +This library provides C APIs to access the kernel trace file system. + +This subpackage contains tools. + +%package devel +Summary: Development files for libtracefs +Group: Development/Libraries/C and C++ +Requires: %lname = %version + +%description devel +This library provides C APIs to access the kernel trace file system. + +This subpackage contains the header files. + +%prep +%autosetup -p1 + +%build +%meson \ + --default-library=shared \ + -Dhtmldir="%_docdir/%name" +%meson_build +%meson_build docs + +%install +%meson_install + +%fdupes %buildroot/%_prefix + +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig + +%files -n %lname +%_libdir/libtracefs.so.1* +%license LICENSES/LGPL-2.1 + +%files tools +%_bindir/sqlhist +%_mandir/man1/* + +%files devel +%_includedir/* +%_libdir/libtracefs.so +%_libdir/pkgconfig/*.pc +%_mandir/man3/* +%_docdir/%name/ + +%changelog