Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssh: Use apk-compatible versioning #24906

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Conversation

hnyman
Copy link
Contributor

@hnyman hnyman commented Sep 1, 2024

Adjust openssh's versioning to be compatible with apk: 8.9p1-r2 --> 8.9_p1-r2

"_p" is an allowed semantic suffix, so use that, although the p in upstream versioning means "portable" instead of patch level.

(Alternative might have been 8.9.1-r2)

PKG_REALVERSION will have the upstream version and internal PKG_VERSION is calculated from that.

Maintainer: nobody
Compile & run tested: mediatek/filogic MT6000 r27279-8b6c63cfaf

Copy link

github-actions bot commented Sep 1, 2024

OpenWrt will change to the APK package manager which requires
deterministic verisons. Please make sure that PKG_VERSION
follows Semantic Versioning or more specifically,
the APK version scheme.
If the version is based on a date, please use dots instead of dashes, i.e. 24.01.01.

The PKG_RELEASE should be an integer and not contain any letters or special characters.

  • net/openssh/Makefile

@hnyman
Copy link
Contributor Author

hnyman commented Sep 1, 2024

@aparcar
Funny, the CI rejects the PKG_VERSION although apk itself accepts that.

PKG_REALVERSION:=9.8p1
PKG_VERSION:=$(subst p,_p,$(PKG_REALVERSION))

in router the version is tested ok by apk, (and the OpenWrt build system also accepted it into the image)

root@router6000:~# apk version -c 8.9_p1-r2
root@router6000:~#

The CI apparently does not evaluate a calculated PKG_VERSION correctly...
Apparently it should be manually set in order to avoid CI trouble also in future.

Adjust openssh's versioning to be compatible with apk:
8.9p1-r2 --> 8.9_p1-r2

"_p" is an allowed semantic suffix, so use that.
(Alternative might have been 8.9.1-r2)

Signed-off-by: Hannu Nyman <[email protected]>
@@ -8,13 +8,15 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=openssh
PKG_VERSION:=9.8p1
PKG_REALVERSION:=9.8p1
PKG_VERSION:=9.8_p1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PKG_VERSION:=$(subst p,_p,$(PKG_REALVERSION))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my original approach in e655193, but CI rejected it, so I moved to manual strategy to avoid CI trouble in future...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm? That should evaluate to the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, in actual make it does evaluate ok (and was ok in my original commit), but the CI workflow takes the string from Makefile as it is, and passes it to apk for verification, so using variables fails in CI.

PKG_VERSION=$(grep -E '^PKG_VERSION' "$ROOT/Makefile" | cut -f 2 -d '=')

I had it with "subst" in e655193 , but dropped that to avoid CI trouble in all forthcoming version upgrades.

@hnyman hnyman merged commit 49fdabe into openwrt:master Sep 5, 2024
13 checks passed
@hnyman hnyman deleted the apkssh branch September 5, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants