[PATCH] tools: Add PKG_VERSION to sstrip

mail at adrianschmutzler.de mail at adrianschmutzler.de
Wed Jul 22 18:49:55 EDT 2020


Hi Paul,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Paul Spooren
> Sent: Donnerstag, 23. Juli 2020 00:15
> To: openwrt-devel at lists.openwrt.org
> Cc: Paul Spooren <mail at aparcar.org>
> 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.

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.

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.

Best

Adrian


> 
> 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 <mail at aparcar.org>
> ---
>  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
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200723/535ff867/attachment.sig>


More information about the openwrt-devel mailing list