[PATCH] tools: Add PKG_VERSION to sstrip
mail at aparcar.org
Wed Jul 22 19:02:58 EDT 2020
On 22.07.20 12:49, mail at adrianschmutzler.de wrote:
> 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,
>> reflect that in the Makefile.
> note that conceptually, PKG_VERSION is for _external_ packages:
> "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:
> 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.
>> 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
>> include $(INCLUDE_DIR)/host-build.mk
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
More information about the openwrt-devel