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

tc.mk: Force two (2x) digits for version #4219

Merged
merged 8 commits into from
Oct 14, 2020
Merged

Conversation

th0ma7
Copy link
Contributor

@th0ma7 th0ma7 commented Oct 13, 2020

Motivation: Relates to recent PR #4200 where @hgy59 noticed that the version number must be always two (2x) digits.
Linked issues: N/A

Checklist

  • Build rule all-supported completed successfully

Addition to current PR

  • Removal of fake geminilake-6.2 and pureley-6.2 as now superseeded with this fix using 6.2.2 & 6.2.3 toolchains
  • Removal of startable flag for DSM-6.1+ versions
  • Removal of firmware flag for DSM-6.1+ versions
  • Removal of thirdparty flag as deprecated since DSM-5.0

@th0ma7 th0ma7 self-assigned this Oct 13, 2020
@th0ma7 th0ma7 requested a review from hgy59 October 13, 2020 01:52
@th0ma7 th0ma7 added the bug label Oct 13, 2020
@th0ma7 th0ma7 requested a review from ymartin59 October 13, 2020 01:53
@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 13, 2020

tc_vars.mk on 3x digit version number :

TC_VERS := 6.2.3
TC_BUILD := 25423
TC_FIRMWARE := 6.2-25423
TC_OS_MIN_VER := 6.2-25423

tc_vars.mk on 2x digit version number :

TC_VERS := 6.1
TC_BUILD := 15047
TC_FIRMWARE := 6.1-15047
TC_OS_MIN_VER := 6.1-15047
TC_ARCH := qoriq

@th0ma7 th0ma7 mentioned this pull request Oct 13, 2020
3 tasks
@hgy59
Copy link
Contributor

hgy59 commented Oct 13, 2020

Please remove TC_FIRMWARE

DSM 6 development guide:

Field Name: firmware

Description: Earliest version of DSM firmware that is required to run the package.
Note: Deprecated after 6.1-14715, use os_min_ver instead.
Value: X.Y-Z DSM major number, DSM minor number, DSM build number
Default Value: (Empty)
Example: None
DSM Requirement: 2.3-1118

@hgy59
Copy link
Contributor

hgy59 commented Oct 13, 2020

After deleting TC_FIRMWARE the INFO file generation can be adjusted for backward compatibility like this (pseudo code)

if TC_OS_MIN_VER < 6.1 then
   echo firmware=$(TC_OS_MIN_VER) >> INFO
else
   echo os_min_ver=$(TC_OS_MIN_VER) >> INFO
endif

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 13, 2020

Please remove TC_FIRMWARE

DSM 6 development guide:

Field Name: firmware

Description: Earliest version of DSM firmware that is required to run the package.
Note: Deprecated after 6.1-14715, use os_min_ver instead.
Value: X.Y-Z DSM major number, DSM minor number, DSM build number
Default Value: (Empty)
Example: None
DSM Requirement: 2.3-1118

Thnx! It's exactly what I was wondering about yesterday when I left the PR for review. I'll make the necessary adjustments.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 13, 2020

After deleting TC_FIRMWARE the INFO file generation can be adjusted for backward compatibility like this (pseudo code)

if TC_OS_MIN_VER < 6.1 then
   echo firmware=$(TC_OS_MIN_VER) >> INFO
else
   echo os_min_ver=$(TC_OS_MIN_VER) >> INFO
endif

Have a look at the code I've pushed (untested yet)... There is still this part which confuses me and that I believe it may not be needed anymore or algo needs to be revisited:

ifneq ($(strip $(FIRMWARE)),)
        @echo firmware=\"$(FIRMWARE)\" >> $@
else ifneq ($(strip $(OS_MIN_VER)),)
        @echo os_min_ver=\"$(OS_MIN_VER)\" >> $@
endif

@th0ma7 th0ma7 added enhancement request to enhance existing package and removed bug labels Oct 13, 2020
@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 13, 2020

@publicarray , @ymartin59 and @hgy59 I've reviewed the code and currently testing.
Please have a take on it to confirm all is looking good for you too.

I've reworked the FIRMWARE vs TC_FIRMWARE along with OS_MIN_VER vs TC_OS_MIN_VER with hope that it make sense. I believe the "legacy" FIRMWARE option can be discarded all together as only being used for lirc which hasn't been updated in years (FIRMWARE = 4.3-3776).

A quick run provided the following over apollolake-6.2.3 :

package="zsh"
thirdparty="yes"
version="5.8-10"
description="Zsh is a shell designed for interactive use, although it is also a powerful scripting language."
description_fre="Zsh est un shell conçu pour un usage intéractif, mais il est aussi un puissant langage de script."

arch="apollolake"
maintainer="SynoCommunity"
maintainer_url=""
distributor=""
distributor_url=""
os_min_ver="6.2-25423"
helpurl="http://www.zsh.org"
reloadui="no"
startable="no"
ctl_stop="no"
displayname="Z shell"
dsmuidir="app"
dsmappname="com.synocommunity.zsh"
changelog="Update to 5.8"
install_conflict_packages="zsh-static"
checksum="80f4511afe9c99918004f988720b7d37"

Versus the same run on apollolake-6.1:

package="zsh"
thirdparty="yes"
version="5.8-10"
description="Zsh is a shell designed for interactive use, although it is also a powerful scripting language."
description_fre="Zsh est un shell conçu pour un usage intéractif, mais il est aussi un puissant langage de script."

arch="apollolake"
maintainer="SynoCommunity"
maintainer_url=""
distributor=""
distributor_url=""
os_min_ver="6.1-15047"
helpurl="http://www.zsh.org"
reloadui="no"
startable="no"
ctl_stop="no"
displayname="Z shell"
dsmuidir="app"
dsmappname="com.synocommunity.zsh"
changelog="Update to 5.8"
install_conflict_packages="zsh-static"
checksum="2eb16b7fb8d096547532b5dbcb49dfc6"

Versus the same run on ppc853x-5.2 where firmware finally shows:

package="zsh"
thirdparty="yes"
version="5.8-10"
description="Zsh is a shell designed for interactive use, although it is also a powerful scripting language."
description_fre="Zsh est un shell conçu pour un usage intéractif, mais il est aussi un puissant langage de script."

arch="ppc853x"
maintainer="SynoCommunity"
maintainer_url=""
distributor=""
distributor_url=""
os_min_ver="5.2-5644"
firmware="5.2-5644"
helpurl="http://www.zsh.org"
reloadui="no"
startable="no"
ctl_stop="no"
displayname="Z shell"
dsmuidir="app"
dsmappname="com.synocommunity.zsh"
changelog="Update to 5.8"
install_conflict_packages="zsh-static"
checksum="269e2e073a4b9bbf8d27539555789c41"

@publicarray
Copy link
Member

publicarray commented Oct 13, 2020

@th0ma7 Just want to say thank you and good work on cleaning up the Makefiles with the recent PRs. Excellent work 👍

I haven't been following the toolchains much. Why are geminilake-6.2 and purley-6.2 removed here?

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 13, 2020

Why are geminilake-6.2 and purley-6.2 removed here?

Reason is simple: This was to "fake" a 6.2 build for theses two arches as none of them ever existed as "6.2" DSM version and where never published online. But, with the current versioning fix you can now build a 6.2.2 or 6.2.3 package and final version will be showed as 6.2-BUILD# which will vary depending of its origin. And the best of that is that it follows Synology's guidelines (thnx to @hgy59 and @ymartin59 for pointers on this).

@publicarray
Copy link
Member

I think we can remove thirdparty in this PR too

Field Name: thirdparty
Description: If set to “yes”, your package is a third-party package and isn't developed by Synology. In Package Center, third-pary pacakges will be shown in another part.
Note: It's not used in DSM 5.0 or newer.
Value: "yes"/"no" Default Value: "no" Example:
DSM Requirement: 4.0~4.3

@publicarray
Copy link
Member

@th0ma7 Thanks that explains it :)

@publicarray
Copy link
Member

Sorry one more I'd like to have addresed: (let me know if a sperate PR is preferred and I can make one)

Field Name: startable
Description: When no program in the package provides the end-user with the options to enable or disable its function. This key is set to "no" and the end-user cannot start or stop the package in Package Center.
Note: Deprecated after 6.1-14907, use ctl_stop instead.
If “startable” is set to “no”, start-stop-status script which runs in bootup or shotdown is still required.
Value: "yes"/"no"
Default Value: "yes" Example: None
DSM Requirement: 3.2-1922

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 14, 2020

Sorry to ask @hgy59 @ymartin59 @publicarray but re-requesting review after this other round of testing after new changes...

apollolake-6.2.3:

package="zsh"
version="5.8-10"
description="Zsh is a shell designed for interactive use, although it is also a powerful scripting language."
description_fre="Zsh est un shell conçu pour un usage intéractif, mais il est aussi un puissant langage de script."

arch="apollolake"
maintainer="SynoCommunity"
maintainer_url=""
distributor=""
distributor_url=""
os_min_ver="6.2-25423"
helpurl="http://www.zsh.org"
reloadui="no"
ctl_stop="no"
displayname="Z shell"
dsmuidir="app"
dsmappname="com.synocommunity.zsh"
changelog="Update to 5.8"
install_conflict_packages="zsh-static"
checksum="8a86e276bdb390360c20a2272cfd8ddd"

apollolake-6.1:

package="zsh"
version="5.8-10"
description="Zsh is a shell designed for interactive use, although it is also a powerful scripting language."
description_fre="Zsh est un shell conçu pour un usage intéractif, mais il est aussi un puissant langage de script."

arch="apollolake"
maintainer="SynoCommunity"
maintainer_url=""
distributor=""
distributor_url=""
os_min_ver="6.1-15047"
helpurl="http://www.zsh.org"
reloadui="no"
ctl_stop="no"
displayname="Z shell"
dsmuidir="app"
dsmappname="com.synocommunity.zsh"
changelog="Update to 5.8"
install_conflict_packages="zsh-static"
checksum="5b239b69fdce1b6abec792b2ba7e2469"

evansport-6.0.2:

package="zsh"
version="5.8-10"
description="Zsh is a shell designed for interactive use, although it is also a powerful scripting language."
description_fre="Zsh est un shell conçu pour un usage intéractif, mais il est aussi un puissant langage de script."

arch="evansport"
maintainer="SynoCommunity"
maintainer_url=""
distributor=""
distributor_url=""
os_min_ver="6.0-8451"
firmware="6.0-8451"
helpurl="http://www.zsh.org"
reloadui="no"
startable="no"
ctl_stop="no"
displayname="Z shell"
dsmuidir="app"
dsmappname="com.synocommunity.zsh"
changelog="Update to 5.8"
install_conflict_packages="zsh-static"
checksum="89a6d6edfd43b3f867f2fb8a437638d1"

ppc853x-5.2:

package="zsh"
version="5.8-10"
description="Zsh is a shell designed for interactive use, although it is also a powerful scripting language."
description_fre="Zsh est un shell conçu pour un usage intéractif, mais il est aussi un puissant langage de script."

arch="ppc853x"
maintainer="SynoCommunity"
maintainer_url=""
distributor=""
distributor_url=""
os_min_ver="5.2-5644"
firmware="5.2-5644"
helpurl="http://www.zsh.org"
reloadui="no"
startable="no"
ctl_stop="no"
displayname="Z shell"
dsmuidir="app"
dsmappname="com.synocommunity.zsh"
changelog="Update to 5.8"
install_conflict_packages="zsh-static"
checksum="b8ed8f19e63b7e58c4a8dff2a414cb3f"

@@ -84,7 +84,6 @@ $(WORK_DIR)/INFO:
$(create_target_dir)
@$(MSG) "Creating INFO file for $(SPK_NAME)"
@echo package=\"$(SPK_NAME)\" > $@
@echo thirdparty=\"yes\" >> $@
Copy link
Member

Choose a reason for hiding this comment

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

I'm just wondering do we support older DSM versions, like really old 3.x or even 4.x where this could still be used?
If not I'm very happy removing it completely

Thanks for the quick updates @th0ma7 👌

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't believe we will ever be releasing any DSM 3.x or 4.x spk ever. That's why I removed it entirely, further more as we lost all old packages during the web server migration. Presumably similar hooks will disappear for DSM5 once DSM7 comes in.

@ymartin59
Copy link
Contributor

@th0ma7 Do I understand there is no longer need to extend spkrepo to support minor version numbering "a.b.c"?

@th0ma7
Copy link
Contributor Author

th0ma7 commented Oct 14, 2020

@th0ma7 Do I understand there is no longer need to extend spkrepo to support minor version numbering "a.b.c"?

That's my expectation. To be confirmed with the new set of ffmpeg packages coming over the next week or so.

@th0ma7 th0ma7 merged commit f5e99a3 into SynoCommunity:master Oct 14, 2020
@th0ma7 th0ma7 deleted the build-no branch October 14, 2020 10:09
@th0ma7 th0ma7 mentioned this pull request Oct 14, 2020
3 tasks
hgy59 added a commit to hgy59/spksrc that referenced this pull request Jan 16, 2021
AlexPresso pushed a commit to AlexPresso/spksrc that referenced this pull request Jan 30, 2025
* tc.mk: Force two (2x) digits for version

* spk.mk: Remove TC_FIRMWARE variable and force firmware for < 6.1

* common.mk: Use latest for apollolake, geminilake and purley

* spk.mk: Use @publicarray proposal to manage <=6.1 DSM version

* spksrc.spk.mk: remove thirdparty as not used in DSM 5.0 or newer

* spksrc.spk.mk: startable is deprecatade > DSM-6.1, use ctl_stop
AlexPresso pushed a commit to AlexPresso/spksrc that referenced this pull request Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement request to enhance existing package framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants