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

apt-utils.sh: get base-files package version from GHA #7473

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

amazingfate
Copy link
Contributor

Description

I have written a python script running in Github workflow: https://github.com/amazingfate/deb-files-parser, which will generate all versions of base-files from debian and ubuntu in a json file: https://github.com/amazingfate/deb-files-parser/blob/master/base-files.json, and now we can get rid of the unstable packages.debian.org or packages.ubuntu.com.
If this change is fine, we can move the repo amazingfate/deb-files-parser to armbian.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • ./compile.sh BOARD=rock-5b BRANCH=vendor BUILD_MINIMAL=yes DEB_COMPRESS=xz DOWNLOAD_MIRROR=china KERNEL_CONFIGURE=no RELEASE=jammy GITHUB_MIRROR=ghproxy KERNEL_GIT=shallow BUILD_DESKTOP=no ENABLE_EXTENSIONS=mesa-vpu DEBUG=yes. Build log:
--> (19) DEBUG: Calling artifact function [ artifact_armbian-base-files_prepare_version()  ]
--> (20) INFO: Found upstream base-files package filename [ base-files_12ubuntu4.7_arm64.deb ]
--> (20) DEBUG: Found package filename [ base-files_12ubuntu4.7_arm64.deb in url http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/pool/main/b/base-files/base-files_12ubuntu4.7_arm64.deb ]
--> (20) INFO: Found base-files upstream package version [ 12ubuntu4.7 ]
--> (20) DEBUG: Found package download url [ http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/pool/main/b/base-files/base-files_12ubuntu4.7_arm64.deb ]

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@amazingfate amazingfate requested a review from a team as a code owner November 14, 2024 09:02
@github-actions github-actions bot added size/small PR with less then 50 lines Needs review Seeking for review Framework Framework components labels Nov 14, 2024
# get json with latest pacakge info generated by GHA
case "${GITHUB_MIRROR}" in
"ghproxy")
package_info_download_url="https://ghp.ci/https://raw.githubusercontent.com/armbian/armbian.github.io/refs/heads/data/data/${sought_package_name}.json"
Copy link
Member

Choose a reason for hiding this comment

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

This proxy is limited to repository content, so we can't use nice URL's. Is there a way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverse proxy like ghproxy does not support github pages. We can use https://github.armbian.com/base-files.json, and at least at the moment the url is reachable from China.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But in case github pages is down for some reason, the ghproxy should save the world for user, it's better to keep this fall back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Framework components Needs review Seeking for review size/small PR with less then 50 lines
Development

Successfully merging this pull request may close these issues.

2 participants