package: drop PKG_VERSION for purely local packages
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 24 Feb 2020 15:57:38 +0000 (16:57 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 15 Jul 2020 16:33:56 +0000 (18:33 +0200)
In the package guidelines, PKG_VERSION is supposed to be used as
"The upstream version number that we're downloading", while
PKG_RELEASE is referred to as "The version of this package Makefile".
Thus, the variables in a strict interpretation provide a clear
distinction between "their" (upstream) version in PKG_VERSION and
"our" (local OpenWrt trunk) version in PKG_RELEASE.

For local (OpenWrt-only) packages, this implies that those will only
need PKG_RELEASE defined, while PKG_VERSION does not apply following
a strict interpretation. While the majority of "our" packages actually
follow that scheme, there are also some that mix both variables or
have one of them defined but keep them at "1".

This is misleading and confusing, which can be observed by the fact
that there typically either one of the variables is never bumped or
the choice of the variable to increase depends on the person doing the
change.

Consequently, this patch aims at clarifying the situation by
consistently using only PKG_RELEASE for "our" packages. To achieve
that, PKG_VERSION is removed there, bumping PKG_RELEASE where
necessary to ensure the resulting package version string is bigger
than before.

During adjustment, one has to make sure that the new resulting composite
package version will not be considered "older" than the previous one.

A useful tool for evaluating that is 'opkg compare-versions'. In
principle, there are the following cases:

1. Sole PKG_VERSION replaced by sole PKG_RELEASE:
   In this case, the resulting version string does not change, it's
   just the value of the variable put in the file. Consequently, we
   do not bump the number in these cases so nobody is tempted to
   install the same package again.

2. PKG_VERSION and PKG_RELEASE replaced by sole PKG_RELEASE:
   In this case, the resulting version string has been "version-release",
   e.g. 1-3 or 1.0-3. For this case, the new PKG_RELEASE will just
   need to be higher than the previous PKG_VERSION.
   For the cases where PKG_VERSION has always sticked to "1", and
   PKG_RELEASE has been incremented, we take the most recent value of
   PKG_RELEASE.

Apart from that, a few packages appear to have developed their own
complex versioning scheme, e.g. using x.y.z number for PKG_VERSION
_and_ a PKG_RELEASE (qos-scripts) or using dates for PKG_VERSION
(adb-enablemodem, wwan). I didn't touch these few in this patch.

Cc: Hans Dedecker <dedeckeh@gmail.com>
Cc: Felix Fietkau <nbd@nbd.name>
Cc: Andre Valentin <avalentin@marcant.net>
Cc: Matthias Schiffer <mschiffer@universe-factory.net>
Cc: Jo-Philipp Wich <jo@mein.io>
Cc: Steven Barth <steven@midlink.org>
Cc: Daniel Golle <dgolle@allnet.de>
Cc: John Crispin <john@phrozen.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
15 files changed:
package/kernel/om-watchdog/Makefile
package/kernel/trelay/Makefile
package/network/config/gre/Makefile
package/network/config/ipip/Makefile
package/network/config/vti/Makefile
package/network/config/xfrm/Makefile
package/network/ipv6/464xlat/Makefile
package/network/ipv6/6in4/Makefile
package/network/ipv6/6rd/Makefile
package/network/ipv6/6to4/Makefile
package/network/ipv6/ds-lite/Makefile
package/network/ipv6/map/Makefile
package/network/utils/rssileds/Makefile
package/system/urandom-seed/Makefile
package/system/zram-swap/Makefile

index 403069b8166aeb323a716e9335753b9880b46fa5..a7e859dc8b5b498e2b15ec21fffff9211fd268e9 100644 (file)
@@ -9,7 +9,6 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=om-watchdog
 PKG_RELEASE:=2
-PKG_VERSION:=1
 
 include $(INCLUDE_DIR)/package.mk
 
index a6bada1a9b7e8ee7d85fd449826df9bfb36ff95d..ad83523cd4da5326bc7f0ec2f38ed8979e8eb926 100644 (file)
@@ -9,7 +9,6 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=trelay
-PKG_VERSION:=0.1
 PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
index ca19f5d47c1c247b44e80227a9fb9c3598c94fe1..b16dd72cde483a1e9880f686d6bc72a1a34a2b4b 100644 (file)
@@ -8,7 +8,6 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gre
-PKG_VERSION:=1
 PKG_RELEASE:=12
 PKG_LICENSE:=GPL-2.0
 
index 458709038b65e7d81f5d0f9ab3c2171546b02c29..c262182558c62e07e52c7630bf1c08bff414e053 100644 (file)
@@ -8,7 +8,6 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ipip
-PKG_VERSION:=1
 PKG_RELEASE:=3
 PKG_LICENSE:=GPL-2.0
 
index ee7c0d11e88fefcedceeab81a3a649819d0b7118..ffac77ab91d982de5c70dbccb74ef5879152f68d 100644 (file)
@@ -8,7 +8,6 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vti
-PKG_VERSION:=1
 PKG_RELEASE:=3
 PKG_LICENSE:=GPL-2.0
 
index 1d0766f568856b2e22fb11d8908827e6dc898e33..1b3b99adb008855a0d8304f1ee20ac46c2c934e0 100644 (file)
@@ -2,7 +2,6 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xfrm
-PKG_VERSION:=1
 PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 
index f4dce2e77d848c64067fb573ed9558c4a4031ed3..c792323235feaa3384dcb1bd15dd2d870b868094 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=464xlat
-PKG_VERSION:=12
+PKG_RELEASE:=12
 
 PKG_SOURCE_DATE:=2018-01-16
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
index 8ff4730e74f7ee661a109191a4580eaaf880d6b5..08696ef7a8915d021e2bfcbb0fd4a805a7b27635 100644 (file)
@@ -8,8 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6in4
-PKG_VERSION:=25
-PKG_RELEASE:=1
+PKG_RELEASE:=26
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
index 47f20414fc7663b0fc2aab919bea17cc44bf10ad..9836ae9361c7f26385ff0ea9ec998fc37fb214be 100644 (file)
@@ -8,8 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6rd
-PKG_VERSION:=9
-PKG_RELEASE:=4
+PKG_RELEASE:=10
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
index 32d7b325aad1fc2e522248fabbf7dae6f7d96862..dfb66aaae2895c6317168cb14093a5b4e0754559 100644 (file)
@@ -8,8 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6to4
-PKG_VERSION:=12
-PKG_RELEASE:=2
+PKG_RELEASE:=13
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
index 198b6ebcc7cd13ba39bf118ee87bb3a10f361913..502da366a92e6730dd48c60aacf6a6bf2cba8b02 100644 (file)
@@ -8,8 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ds-lite
-PKG_VERSION:=7
-PKG_RELEASE:=4
+PKG_RELEASE:=8
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
index f05f216a4c8f1b27cb95e400ee71b1214883e4c1..5d0e0bbd3d8aef62bb22c5f8801dc3b2a3a6a12e 100644 (file)
@@ -8,8 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=map
-PKG_VERSION:=4
-PKG_RELEASE:=13
+PKG_RELEASE:=5
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
index 7a59314693ca8b1462d6e420fc0a81ffed5f1542..892b9f2c517f95f0accfa86af4df0d13fb69e680 100644 (file)
@@ -8,8 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rssileds
-PKG_VERSION:=0.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICNESE:=GPL-2.0+
 
 include $(INCLUDE_DIR)/package.mk
index 5a48a07ce10876aca0a8b1e769c7e275297637fa..7cb7c720382d76a2f6f8b7a18f4314a143c60c7e 100644 (file)
@@ -1,7 +1,6 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=urandom-seed
-PKG_VERSION:=1.0
 PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0-only
 
index a6661ce5e9820cf0aa5659a3ed2654b1d683e266..4422c351ea2fbd5bf324729aacea99a6b9440b11 100644 (file)
@@ -8,8 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zram-swap
-PKG_VERSION:=1.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)