* [PATCH] cpupower: Make versioning scheme more obvious and fix version link
@ 2025-03-06 15:27 Thomas Renninger
2025-03-06 20:14 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Renninger @ 2025-03-06 15:27 UTC (permalink / raw)
To: Shuah Khan; +Cc: linux-pm
[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]
Hi Shuah,
I can darkly remember this was discussed already, but it seems
it's still broken.
Currently there is:
LIB_MAJ= 0.0.1
LIB_MIN= 1
Resulting in:
libcpupower.so.0.0.1
libcpupower.so -> libcpupower.so.0.0.1
libcpupower.so.1 -> libcpupower.so.0.0.1
The naming of the variables is confusing (MIN should be MAJ) and the result is wrong.
You get the desired result by:
-LIB_MAJ= 0.0.1
+LIB_MAJ= 1.0.1
LIB_MIN= 1
libcpupower.so.1.0.1
libcpupower.so -> libcpupower.so.1.0.1
libcpupower.so.1 -> libcpupower.so.1.0.1
Correct, but still confusing.
Here my suggestion to fix this with a reasonable (re-)naming:
-----------------
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index 51a95239fe06..a7d7d335c1ee 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -52,8 +52,11 @@ DESTDIR ?=
# and _should_ modify the PACKAGE_BUGREPORT definition
VERSION:= $(shell ./utils/version-gen.sh)
-LIB_MAJ= 0.0.1
-LIB_MIN= 1
+LIB_FIX= 1
+LIB_MIN= 0
+LIB_MAJ= 1
+LIB_VER= $(LIB_MAJ).$(LIB_MIN).$(LIB_FIX)
+
PACKAGE = cpupower
PACKAGE_BUGREPORT = linux-pm@vger.kernel.org
@@ -203,9 +206,9 @@ $(OUTPUT)lib/%.o: $(LIB_SRC) $(LIB_HEADERS)
$(OUTPUT)libcpupower.so.$(LIB_MAJ): $(LIB_OBJS)
$(ECHO) " LD " $@
$(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \
- -Wl,-soname,libcpupower.so.$(LIB_MIN) $(LIB_OBJS)
+ -Wl,-soname,libcpupower.so.$(LIB_VER) $(LIB_OBJS)
@ln -sf $(@F) $(OUTPUT)libcpupower.so
- @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_MIN)
+ @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_VER)
libcpupower: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cpupower: Make versioning scheme more obvious and fix version link
2025-03-06 15:27 [PATCH] cpupower: Make versioning scheme more obvious and fix version link Thomas Renninger
@ 2025-03-06 20:14 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2025-03-06 20:14 UTC (permalink / raw)
To: Thomas Renninger; +Cc: linux-pm, Shuah Khan
On 3/6/25 08:27, Thomas Renninger wrote:
> Hi Shuah,
>
> I can darkly remember this was discussed already, but it seems
> it's still broken.
>
> Currently there is:
> LIB_MAJ= 0.0.1
> LIB_MIN= 1
>
> Resulting in:
> libcpupower.so.0.0.1
> libcpupower.so -> libcpupower.so.0.0.1
> libcpupower.so.1 -> libcpupower.so.0.0.1
>
> The naming of the variables is confusing (MIN should be MAJ) and the result is wrong.
>
> You get the desired result by:
> -LIB_MAJ= 0.0.1
> +LIB_MAJ= 1.0.1
> LIB_MIN= 1
> libcpupower.so.1.0.1
> libcpupower.so -> libcpupower.so.1.0.1
> libcpupower.so.1 -> libcpupower.so.1.0.1
>
> Correct, but still confusing.
> Here my suggestion to fix this with a reasonable (re-)naming:
I thought we fixed this one. Guess not. Can you send me a patch
to fix this?
>
> -----------------
> diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
> index 51a95239fe06..a7d7d335c1ee 100644
> --- a/tools/power/cpupower/Makefile
> +++ b/tools/power/cpupower/Makefile
> @@ -52,8 +52,11 @@ DESTDIR ?=
> # and _should_ modify the PACKAGE_BUGREPORT definition
>
> VERSION:= $(shell ./utils/version-gen.sh)
> -LIB_MAJ= 0.0.1
> -LIB_MIN= 1
> +LIB_FIX= 1
> +LIB_MIN= 0
> +LIB_MAJ= 1
> +LIB_VER= $(LIB_MAJ).$(LIB_MIN).$(LIB_FIX)
> +
>
> PACKAGE = cpupower
> PACKAGE_BUGREPORT = linux-pm@vger.kernel.org
> @@ -203,9 +206,9 @@ $(OUTPUT)lib/%.o: $(LIB_SRC) $(LIB_HEADERS)
> $(OUTPUT)libcpupower.so.$(LIB_MAJ): $(LIB_OBJS)
> $(ECHO) " LD " $@
> $(QUIET) $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ \
> - -Wl,-soname,libcpupower.so.$(LIB_MIN) $(LIB_OBJS)
> + -Wl,-soname,libcpupower.so.$(LIB_VER) $(LIB_OBJS)
> @ln -sf $(@F) $(OUTPUT)libcpupower.so
> - @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_MIN)
> + @ln -sf $(@F) $(OUTPUT)libcpupower.so.$(LIB_VER)
>
> libcpupower: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-06 20:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-06 15:27 [PATCH] cpupower: Make versioning scheme more obvious and fix version link Thomas Renninger
2025-03-06 20:14 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).