Skip to contentSkip to conversation

(Trivial) README fix and libtracecmd SONAME

PATCH Applied Dario Faggioli 2 participants 4 messages Jan 20, 2022 – Jan 23, 2022

lore
Share & tools
lore
#0 lore raw

cover (Trivial) README fix and libtracecmd SONAME

Hi!

So, patch 1 of this small series just get rid of a stale mention to libparsevent in the README file.

About patch 2. Some distributions have the requirement that the package name contains/is related to the SONAME (for packages that ship libraries, of course).

Currently, the SONAME of libtracecmd is something like libtracecmd.so.0.0.1 or libtracecmd.so.1.0.0. This is not a problem, but I think libtracecmd.so.0 (libtracecmd.so.1) is a bit more convenient.

It is also how things are for libtracefs and libtraceevent.

So, patch 2 does exactly that for libtracecmd, if that could be interesting. :-)

If, instead, it was intentional and there is an actual reason for the SONAME of libtracecmd to be the entire file name of the .so file, then I guess I've missed it. In which case, sorry for the noise.

Regards
---
Dario Faggioli (2):
README: remove stale mention to libparsevent
libtracecmd: use major version as SONAME

 lib/trace-cmd/Makefile | 2 +-
 scripts/utils.mk       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

#1 lore raw

PATCH 1/2 README: remove stale mention to libparsevent

---
Cc: Tzvetomir Stoyanov (VMware) <[email protected]>
Cc: Steven Rostedt <[email protected]>

---
 README |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
README +1 -3
index 9a3533d..9d8c127 100644
@@ -14,9 +14,7 @@ These files make up the code that create the trace-cmd programs.
 This includes the GUI interface application kernelshark as well
 as trace-graph and trace-view.
 
-These files also make up the code to create the libraries
-
-  libtracecmd and libparsevent
+These files also make up the code to create the libtracecmd library.
 
 The applications are licensed under the GNU General Public License 2.0
 (see COPYING) and the libraries are licensed under the GNU
#2 lore raw

PATCH 2/2 libtracecmd: use major version as SONAME

In reply to Dario Faggioli

Currently, the SONAME of libtracecmd is libtracecmd.so.0.0.1, which is legit and overall fine, but slightly inconvenient for packaging.

For other libreries, like libtraceevent and libtracefs, it is set to libtraceevent.so.1 and libtracefs.so.1. Do the same here

---
Cc: Tzvetomir Stoyanov (VMware) <[email protected]>
Cc: Steven Rostedt <[email protected]>

---
 lib/trace-cmd/Makefile |    2 +-
 scripts/utils.mk       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/trace-cmd/Makefile +1 -1
index 1760031..c9d36d1 100644
@@ -55,7 +55,7 @@ $(LIBTRACECMD_SHARED_SO): $(LIBTRACECMD_SHARED_VERSION)
 libtracecmd.so: force $(LIBTRACECMD_SHARED_SO)
 
 $(LIBTRACECMD_SHARED): $(OBJS)
-	$(Q)$(call do_compile_shared_library)
+	$(Q)$(call do_compile_shared_library,$(notdir $(LIBTRACECMD_SHARED_VERSION)))
 
 $(bdir)/%.o: %.c
 	$(Q)$(call do_fpic_compile)
scripts/utils.mk +1 -1
index 53b2b07..3fc2d74 100644
@@ -72,7 +72,7 @@ do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
+	$(CC) --shared $^ '-Wl,-soname,$(1),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\
#3 lore raw
In reply to Dario Faggioli
Quoted 13 lines · On Thu, 20 Jan 2022 12:34:08 +0100 Dario Faggioli <[email protected]> wrote:

Hi!

So, patch 1 of this small series just get rid of a stale mention to libparsevent in the README file.

About patch 2. Some distributions have the requirement that the package name contains/is related to the SONAME (for packages that ship libraries, of course).

Currently, the SONAME of libtracecmd is something like libtracecmd.so.0.0.1 or libtracecmd.so.1.0.0. This is not a problem, but I think libtracecmd.so.0 (libtracecmd.so.1) is a bit more convenient.

Quoted 10 lines

It is also how things are for libtracefs and libtraceevent.

So, patch 2 does exactly that for libtracecmd, if that could be interesting. :-)

If, instead, it was intentional and there is an actual reason for the SONAME of libtracecmd to be the entire file name of the .so file, then I guess I've missed it. In which case, sorry for the noise.

Applied. Thanks Dario.

Although I had to tweak the subjects to have them start with a capital letter (like a sentence). And I also fixed a typo in the change log of the second patch.

-- Steve