Change install dir of libv4l2tracer.so
Subsystems (2)
PATCH 1/1 Change install dir of libv4l2tracer.so
The default install dir of libv4l2tracer.so is libdir, which will be packaged to libv4l-dev in debian or libv4l-devel in fedora by default. While libv4l2tracer.so is different from other library files like libv4lconvert.so in this path, it is only used by v4l2-tracer at runtime,
and it is not a good idea to let binary file in v4l-utils depend on
libv4l development package.
Installing libv4l2tracer.so to the default libdir won't pass debian lintian test because this library doesn't have a SONAME, so it's better to change the install dir of it, just like other v4l plugin libraries.
---
meson_options.txt | 2 ++ utils/v4l2-tracer/meson.build | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-)
meson_options.txt +2 -0
@@ -46,6 +46,8 @@ option('libv4l2subdir', type : 'string', value : 'libv4l', description : 'Set libv4l2 library subdir') option('libv4lconvertsubdir', type : 'string', value : 'libv4l', description : 'Set libv4lconvert library subdir') +option('libv4l2tracersubdir', type : 'string', value : 'v4l2-tracer', + description : 'Set libv4l2tracer library subdir') option('systemdsystemunitdir', type : 'string', description : 'Set systemd system unit directory') option('udevdir', type : 'string',
utils/v4l2-tracer/meson.build +4 -1
@@ -24,9 +24,12 @@ libv4l2_tracer_incdir = [ v4l2_utils_incdir, ] +libv4l2tracerdir = get_option('prefix') / get_option('libdir') / get_option('libv4l2tracersubdir') + libv4l2tracer = shared_module('v4l2tracer', libv4l2tracer_sources, install : true, + install_dir : libv4l2tracerdir, cpp_args : v4l2_wrapper_args, dependencies : libv4l2tracer_deps, include_directories : libv4l2_tracer_incdir)
@@ -51,7 +54,7 @@ v4l2_tracer_deps = [ ] v4l2_tracer_cpp_args = [ - '-DLIBTRACER_PATH="@0@"'.format(get_option('prefix') / get_option('libdir')), + '-DLIBTRACER_PATH="@0@"'.format(libv4l2tracerdir), ] if have_visibility
Signature · 4 lines
2.51.0 base-commit: 34aa1df2b23fb85b030cddf64c427137ddf04e93 branch: v4l2-tracer-install-path
Hi,
Le jeudi 11 septembre 2025 à 09:48 +0800, Jianfeng Liu a écrit :
Quoted 11 lines
The default install dir of libv4l2tracer.so is libdir, which will be packaged to libv4l-dev in debian or libv4l-devel in fedora by default. While libv4l2tracer.so is different from other library files like libv4lconvert.so in this path, it is only used by v4l2-tracer at runtime, and it is not a good idea to let binary file in v4l-utils depend on libv4l development package.
Installing libv4l2tracer.so to the default libdir won't pass debian lintian test because this library doesn't have a SONAME, so it's better to change the install dir of it, just like other v4l plugin libraries.
You forgot the important part in your commit message, how this patch fixes it ?
Quoted 13 lines
Signed-off-by Jianfeng Liu <[email protected]>---
meson_options.txt | 2 ++
utils/v4l2-tracer/meson.build | 5 ++++-2 files changed, 6 insertions(+), 1 deletion(-)meson_options.txt +0
-0
meson_options.txt option('libv4l2subdir', type : 'string', value : 'libv4l', · line 50
Quoted 5 lines
meson_options.txt +2
-0@@ -46,6 +46,8 @@ option('libv4l2subdir', type : 'string', value : 'libv4l', description : 'Set libv4l2 library subdir') option('libv4lconvertsubdir', type : 'string', value : 'libv4l', description : 'Set libv4lconvert library subdir') +option('libv4l2tracersubdir', type : 'string', value : 'v4l2-tracer', + description : 'Set libv4l2tracer library subdir')
I don't see why its nicer to keep the libv4l2 wrapper appart from the v4l2 tracer wrapper, this is the same type of shared object. Place them in the same directory please.
Nicolas
Quoted 29 lines
meson_options.txt +0
-0option('systemdsystemunitdir', type : 'string', description : 'Set systemd system unit directory') option('udevdir', type : 'string',utils/v4l2-tracer/meson.build +0
-0@@ -24,9 +24,12 @@ libv4l2_tracer_incdir = [ v4l2_utils_incdir,]
utils/v4l2-tracer/meson.build +2
-0+libv4l2tracerdir = get_option('prefix') / get_option('libdir') / get_option('libv4l2tracersubdir') +libv4l2tracer = shared_module('v4l2tracer',
libv4l2tracer_sources,
install : true,
+install_dir: libv4l2tracerdir,cpp_args:v4l2_wrapper_args, dependencies :libv4l2tracer_deps,include_directories:libv4l2_tracer_incdir)utils/v4l2-tracer/meson.build +0
-0@@ -51,7 +54,7 @@ v4l2_tracer_deps = []
v4l2_tracer_cpp_args = [
- '-DLIBTRACER_PATH="@0@"'.format(get_option('prefix') /get_option('libdir')), + '-DLIBTRACER_PATH="@0@"'.format(libv4l2tracerdir),
]
ifhave_visibility