[RFC] treewide: set PKG_RELEASE automatically #134

Closed
adschm wants to merge 1 commits from adschm/firmware:autocommit into master
Owner

Backport support for COMMITCOUNT and AUTORELEASE from OpenWrt.

COMMITCOUNT allows to have the PKG_RELEASE calculated automatically
based on the number of commits for the package folder.

AUTORELEASE will count the number of commits since the last upstream
bump. This is relevant for packages with PKG_VERSION or
PKG_SOURCE_DATE set, but will not work for us since it assumes the
use of certain identifiers in commit titles.

COMMITCOUNT works fine for most of our packages, with the following
exceptions:

  • fff-nodewatcher would yield a commit count of 55, while the
    current PKG_RELEASE is 61. Thus, we do not touch it for now.

  • Packages that have been renamed will start counting from 1 after
    the rename, since folder renames are not tracked by git. This
    will result in descreasing PKG_RELEASE after the change for
    these packages.
    However, since moving essentially creates a new package anyway,
    counting from 1 makes sense conceptually, and PKG_RELEASE is
    still replaced for these packages.

  • alfred-json and fff-macnock use upstream code and thus would
    normally require AUTORELEASE. As discussed above, this will
    not work for us, so just leave these two untouched.

Note that all this is quite irrelevant for the way we use packages
currently, as without opkg PKG_RELEASE does not matter to us anyway.
So, let's just be happy about not having to bump PKG_RELEASE
anymore, while keeping the basic functionality intact.

The only package where the PKG_RELEASE is actually used for
something is fff-nodewatcher, where the version will be displayed
in the Monitoring.

Signed-off-by: Adrian Schmutzler freifunk@adrianschmutzler.de

Backport support for COMMITCOUNT and AUTORELEASE from OpenWrt. COMMITCOUNT allows to have the PKG_RELEASE calculated automatically based on the number of commits for the package folder. AUTORELEASE will count the number of commits since the last upstream bump. This is relevant for packages with PKG_VERSION or PKG_SOURCE_DATE set, but will not work for us since it assumes the use of certain identifiers in commit titles. COMMITCOUNT works fine for most of our packages, with the following exceptions: * fff-nodewatcher would yield a commit count of 55, while the current PKG_RELEASE is 61. Thus, we do not touch it for now. * Packages that have been renamed will start counting from 1 after the rename, since folder renames are not tracked by git. This will result in descreasing PKG_RELEASE after the change for these packages. However, since moving essentially creates a new package anyway, counting from 1 makes sense conceptually, and PKG_RELEASE is still replaced for these packages. * alfred-json and fff-macnock use upstream code and thus would normally require AUTORELEASE. As discussed above, this will not work for us, so just leave these two untouched. Note that all this is quite irrelevant for the way we use packages currently, as without opkg PKG_RELEASE does not matter to us anyway. So, let's just be happy about not having to bump PKG_RELEASE anymore, while keeping the basic functionality intact. The only package where the PKG_RELEASE is actually used for something is fff-nodewatcher, where the version will be displayed in the Monitoring. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
adschm added the
packages/fff
RFC
labels 2021-02-27 00:42:23 +01:00
adschm added 1 commit 2021-02-27 00:42:24 +01:00
537e864a37 treewide: set PKG_RELEASE automatically
Backport support for COMMITCOUNT and AUTORELEASE from OpenWrt.

COMMITCOUNT allows to have the PKG_RELEASE calculated automatically
based on the number of commits for the package folder.

AUTORELEASE will count the number of commits since the last upstream
bump. This is relevant for packages with PKG_VERSION or
PKG_SOURCE_DATE set, but will not work for us since it assumes the
use of certain identifiers in commit titles.

COMMITCOUNT works fine for most of our packages, with the following
exceptions:

 * fff-nodewatcher would yield a commit count of 55, while the
   current PKG_RELEASE is 61. Thus, we do not touch it for now.

 * Packages that have been renamed will start counting from 1 after
   the rename, since folder renames are not tracked by git. This
   will result in descreasing PKG_RELEASE after the change for
   these packages.
   However, since moving essentially creates a new package anyway,
   counting from 1 makes sense conceptually, and PKG_RELEASE is
   still replaced for these packages.

 * alfred-json and fff-macnock use upstream code and thus would
   normally require AUTORELEASE. As discussed above, this will
   not work for us, so just leave these two untouched.

Note that all this is quite irrelevant for the way we use packages
currently, as without opkg PKG_RELEASE does not matter to us anyway.
So, let's just be happy about not having to bump PKG_RELEASE
anymore, while keeping the basic functionality intact.

The only package where the PKG_RELEASE is actually used for
something is fff-nodewatcher, where the version will be displayed
in the Monitoring.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
fbl approved these changes 2021-03-02 01:06:16 +01:00
fbl left a comment
Owner

Reviewed-by: Fabian Bläse <fabian@blaese.de>

`Reviewed-by: Fabian Bläse <fabian@blaese.de>`
fbl added this to the 20220405-beta milestone 2021-12-21 14:48:20 +01:00
rohammer approved these changes 2021-12-28 22:29:33 +01:00
rohammer left a comment
Member

Was ist eigentlich damit?

Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Was ist eigentlich damit? ``` Reviewed-by: Robert Langhammer <rlanghammer@web.de> ```
Owner

COMMITCOUNT ist bereits in OpenWrt 21.02 enthalten, wir brauchen also nichts mehr backporten.

COMMITCOUNT ist bereits in OpenWrt 21.02 enthalten, wir brauchen also nichts mehr backporten.
Owner

Leider haben wir mittlerweile 2 Packages mehr, wo das nicht mehr hinhaut:

  • fff-layer3 (aktuell 8 commits, PKG_RELEASE: 9)
  • fff-web-ui (aktuell 6 commits, PKG_RELEASE: 18)
Leider haben wir mittlerweile 2 Packages mehr, wo das nicht mehr hinhaut: - fff-layer3 (aktuell 8 commits, PKG_RELEASE: 9) - fff-web-ui (aktuell 6 commits, PKG_RELEASE: 18)
Owner

Rebased, neue Packages hinzugefügt und mit diesen beiden Ausnahmen unter #202 submitted.

Rebased, neue Packages hinzugefügt und mit diesen beiden Ausnahmen unter #202 submitted.
Owner

Closed in favor of #202

Closed in favor of #202
fbl closed this pull request 2022-01-06 01:34:09 +01:00

Pull request closed

Sign in to join this conversation.
No description provided.