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

use ostree commands to fetch remote URLs #116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sebhoss
Copy link

@sebhoss sebhoss commented Sep 21, 2023

Newer fedora-iot versions don't seem to include any files in /etc/ostree/remotes.d anymore, yet ostree remote list returns a list of remotes. Therefore, we are using that and its sibling ostree remote show-url to get all update URLs.

Relates to #98

Some more data here:

[root@rpi4 ~]# ls -la /etc/ostree/remotes.d/
total 8
drwxr-xr-x. 2 root root 4096 Sep 17 09:31 .
drwxr-xr-x. 3 root root 4096 Sep 17 09:31 ..
[root@rpi4 ~]# rpm-ostree status
State: idle
Deployments:
● fedora-iot:fedora/stable/aarch64/iot
                  Version: 38.20230915.0 (2023-09-15T14:10:44Z)
               BaseCommit: d71b230901de0739b05f67f13f0626dd3a2c3a3e8105cfcaf97998f5417564f9
             GPGSignature: Valid signature by 6A51BBABBA3D5467B6171221809A8D7CEB10B464
          LayeredPackages: cockpit cockpit-podman
[root@rpi4 ~]# cat /etc/os-release 
NAME="Fedora Linux"
VERSION="38.20230915.0 (IoT Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38.20230915.0 (IoT Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="IoT Edition"
VARIANT_ID=iot
OSTREE_VERSION='38.20230915.0'

Newer fedora-iot versions don't seem to include any files in /etc/ostree/remotes.d anymore, yet 'ostree remote list' returns a list of remotes. Therefore, we are using that and its sibling 'ostree remote show-url' to get all update URLs.

Signed-off-by: Sebastian Hoß <[email protected]>
@@ -5,7 +5,7 @@ REPOS_DIRECTORY=/etc/ostree/remotes.d
URLS_WITH_PROBLEMS=()

get_update_platform_urls() {
mapfile -t UPDATE_PLATFORM_URLS < <(grep -P -ho 'http[s]?.*' "${REPOS_DIRECTORY}"/*)
mapfile -t UPDATE_PLATFORM_URLS < <(ostree remote list | xargs ostree remote show-url)
Copy link
Member

@say-paul say-paul Sep 28, 2023

Choose a reason for hiding this comment

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

fetching it from rpm-ostree directly makes sense but this action needs to iterative as rpm-ostree can have multiple remotes that it can rebase off. reference doc

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.

2 participants