On 22.07.20 12:49, [email protected] wrote:
Hi Paul,
-----Original Message-----
From: openwrt-devel [mailto:[email protected]]
On Behalf Of Paul Spooren
Sent: Donnerstag, 23. Juli 2020 00:15
To: [email protected]
Cc: Paul Spooren <[email protected]>
Subject: [PATCH] tools: Add PKG_VERSION to sstrip
Comparing the in tree stored source file of sstrip suggests it's version 2.0[0],
reflect that in the Makefile.
note that conceptually, PKG_VERSION is for _external_ packages:
https://openwrt.org/docs/guide-developer/packages#buildpackage_variables
"PKG_VERSION - The upstream version number that we're downloading"
So, effectively this is to be used when there is some PKG_SOURCE_URL in the
file.
For packages that just consist of "local" code, one should just use
"PKG_RELEASE".
Actually, I've only recently enforced that for the package directory:
https://github.com/openwrt/openwrt/commit/9c170cb92f4fbb316592c11567a080eb3f6a1fc3
I'd be happy if we could (continue to) follow that same scheme for the packages
in tools as well.
Works for me, I missed that specific patch but will just send a v2.
For your ultimate goal, it shouldn't matter anyway, just replace the
PKG_VERSION by PKG_RELEASE where we are using local code/there is no external
code pulled.
True, either is fine.
This obviously applies to all the similar patches you sent in parallel.
Despite, note that the common practice for PKG_RELEASE is to use plain integer numbers,
so no major.minor. I don't think that's as important as my first point, but I'd say only
deviate from the plain integer numbers when having a reason (since, actually, if the code
remains untouched for several years, nobody will maintain a reasonable major/minor
versioning anyway, and it's easier to just bump by "1" on each change).
Personally, to be honest, I'd just add PKG_RELEASE := 1 to all of the
previously unversioned packages.
Isn't it cleaner to state the upstream version of a package in the
Makefile even if the code is stored locally? I know sstrip is locally
patch-hacked but I think it's better to state version 2.0 instead of
release 1. Let's say version 3.1a brings some legit binary size
improvements, no one could tell by reading release 1.
Motivation is the tracking of changes in the buildsystem, which requires
versioning of packages.
[0]:
https://github.com/BR903/ELFkickers/commit/df4426a0f0ada861064d75c08c
bebaac7c16b3ae#diff-d3ba694d91432a068d5d3b36abf8cd0f
Signed-off-by: Paul Spooren <[email protected]>
---
tools/sstrip/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/sstrip/Makefile b/tools/sstrip/Makefile index
180bd1743e..99be063f4c 100644
--- a/tools/sstrip/Makefile
+++ b/tools/sstrip/Makefile
@@ -7,6 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sstrip
+PKG_VERSION:=2.0
include $(INCLUDE_DIR)/host-build.mk
--
2.25.1
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel