Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added a/appstream-catalog/manifest.x86_64.bin
Binary file not shown.
406 changes: 406 additions & 0 deletions a/appstream-catalog/manifest.x86_64.jsonc

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions a/appstream-catalog/monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
id: ~

Check warning on line 2 in a/appstream-catalog/monitoring.yaml

View workflow job for this annotation

GitHub Actions / Checks

releases.id is set to null, it should have a numeric value
rss: ~

Check warning on line 3 in a/appstream-catalog/monitoring.yaml

View workflow job for this annotation

GitHub Actions / Checks

releases.rss is set to null, it should point to a rss feed
security:
cpe: ~
51 changes: 51 additions & 0 deletions a/appstream-catalog/stone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name : appstream-catalog
version : '20250817'
release : 1
upstreams :
- https://appstream.aerynos.dev/data/unstable/main/Components-x86_64.xml.gz:
hash: a8581fcd47b7ff44ebad2ce67982d6b4717f5deac6a295af596b10aa5a86f4b7
unpack: false
- https://appstream.aerynos.dev/data/unstable/main/icons-128x128.tar.gz:
hash: 664d2b84e55056d439163c759e514bd10d1a0ce74d6ebd56319e10f657854c06
unpack: false
- https://appstream.aerynos.dev/data/unstable/main/icons-128x128@2.tar.gz:
hash: e5ddd2d49d2a2cac6531f5a20709f6181d3707d5a39089f48c8133f6937a454d
unpack: false
- https://appstream.aerynos.dev/data/unstable/main/icons-48x48.tar.gz:
hash: 060fd70a53e2d559eb37fa450348c54649b236adbce7220697e437bf915140b3
unpack: false
- https://appstream.aerynos.dev/data/unstable/main/icons-48x48@2.tar.gz:
hash: cf339dcb849afd0bdd2b29039a68ff855ad3d901f7d3d3630366b408d2bcf5bc
unpack: false
- https://appstream.aerynos.dev/data/unstable/main/icons-64x64.tar.gz:
hash: 268b04658ee5e69c8801afddcd7bf023ef6c7da56a0554b68a751d929440e66b
unpack: false
- https://appstream.aerynos.dev/data/unstable/main/icons-64x64@2.tar.gz:
hash: c5798521f4428e48c83396b83432620115e081b7d1fe965f6ad3063333b92af8
unpack: false
homepage : https://www.freedesktop.org/wiki/Distributions/AppStream/
license :
- CC-BY-SA-3.0
- CC-BY-SA-4.0
- CC0-1.0
- GFDL-1.3
component : desktop.core
summary : AppStream data for AerynOS
description: |
AppStream data for AerynOS
install : |
install -Dm00644 %(sourcedir)/Components-x86_64.xml.gz %(installroot)/usr/share/swcatalog/xml/aerynos-unstable-main.xml.gz

install -dm00755 %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/48x48
install -dm00755 %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/48x48@2
install -dm00755 %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/64x64
install -dm00755 %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/64x64@2
install -dm00755 %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/128x128
install -dm00755 %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/128x128@2

bsdtar xf %(sourcedir)/icons-48x48.tar.gz -C %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/48x48
bsdtar xf %(sourcedir)/icons-48x48@2.tar.gz -C %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/48x48@2
bsdtar xf %(sourcedir)/icons-64x64.tar.gz -C %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/64x64
bsdtar xf %(sourcedir)/icons-64x64@2.tar.gz -C %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/64x64@2
bsdtar xf %(sourcedir)/icons-128x128.tar.gz -C %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/128x128
bsdtar xf %(sourcedir)/icons-128x128@2.tar.gz -C %(installroot)/usr/share/swcatalog/icons/aerynos-unstable-main/128x128@2
191 changes: 191 additions & 0 deletions a/appstream-catalog/update-appstream-sources.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
#!/usr/bin/env python3

import os
import pathlib
import hashlib
import datetime
import requests
import ruamel.yaml
import shutil
from urllib.parse import urlparse

# Define constants
YAML_FILE = "stone.yaml"
CACHE_DIR = "/var/lib/solbuild/sources"
DOWNLOAD_DIR = "/tmp"


def calculate_sha256(filepath):
"""Calculates the SHA256 hash of a file."""
sha256_hash = hashlib.sha256()
try:
with open(filepath, "rb") as f:
# Read and update hash string in chunks
for byte_block in iter(lambda: f.read(4096), b""):
sha256_hash.update(byte_block)
return sha256_hash.hexdigest()
except FileNotFoundError:
print(f"Error: File not found for hashing: {filepath}")
return None
except Exception as e:
print(f"Error calculating hash for {filepath}: {e}")
return None


def get_file_modification_time(filepath):
"""Gets the modification time of a file in the required format for If-Modified-Since."""
try:
mtime = os.path.getmtime(filepath)
return datetime.datetime.utcfromtimestamp(mtime).strftime('%a, %d %b %Y %H:%M:%S GMT')
except FileNotFoundError:
return None
except Exception as e:
print(f"Error getting modification time for {filepath}: {e}")
return None


def main():
yaml = ruamel.yaml.YAML()
yaml.preserve_quotes = True
yaml.indent(mapping=4, sequence=4, offset=4)
yaml.top_level_colon_align = True

yaml_data = None
try:
with open(YAML_FILE, 'r') as f:
yaml_data = yaml.load(f)
except FileNotFoundError:
print(f"Error: {YAML_FILE} not found.")
return
except Exception as e:
print(f"Error reading {YAML_FILE}: {e}")
return

# Validate data
if not yaml_data or 'upstreams' not in yaml_data or not isinstance(yaml_data.get('upstreams'), list):
print(f"Error: Invalid or missing 'upstreams' section in {YAML_FILE}. Expected a list under 'upstreams'.")
return

updated_sources_list = []
hashes_changed = False

for entry in yaml_data['upstreams']:
if not isinstance(entry, dict) or len(entry) != 1:
print(f"Warning: Skipping unexpected entry format: {entry}")
continue

url = list(entry.keys())[0]
props = entry[url] # Now a dict like {'hash': '...', 'unpack': False}
expected_hash = props.get('hash')
unpack = props.get('unpack', False)

filename = pathlib.Path(urlparse(url).path).name
hash_based_subdir = expected_hash

old_path = pathlib.Path(CACHE_DIR) / hash_based_subdir / filename
new_dir = pathlib.Path(DOWNLOAD_DIR) / hash_based_subdir
new_path = new_dir / filename

print(f"==> Processing {filename}")

download_successful = False
downloaded_file_path = None

try:
new_dir.mkdir(parents=True, exist_ok=True)

# Conditional download using If-Modified-Since
headers = {}
if old_path.exists():
mod_time = get_file_modification_time(old_path)
if mod_time:
headers['If-Modified-Since'] = mod_time

response = requests.get(url, headers=headers, stream=True, timeout=30)

if response.status_code == 304:
print("File not modified, using cached version.")
download_successful = True
downloaded_file_path = old_path
elif response.status_code == 200:
print("Downloading fresh file...")
with open(new_path, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
download_successful = True
downloaded_file_path = new_path
else:
print(f"Warning: download failed with status {response.status_code}")
if old_path.exists():
downloaded_file_path = old_path
download_successful = True

except Exception as e:
print(f"Error downloading {url}: {e}")
if old_path.exists():
downloaded_file_path = old_path
download_successful = True

calculated_hash = calculate_sha256(downloaded_file_path) if download_successful else None
final_hash = calculated_hash if calculated_hash else expected_hash
if calculated_hash and calculated_hash != expected_hash:
print(f"Hash mismatch for {filename}, updating hash.")
hashes_changed = True

# Append updated entry preserving 'unpack'
updated_sources_list.append({url: {'hash': final_hash, 'unpack': unpack}})

# Cleanup
if new_dir.exists():
try:
shutil.rmtree(new_dir)
except Exception as e:
print(f"Error cleaning up {new_dir}: {e}")

print("\n" + "="*20)
if not hashes_changed:
print("No changed hashes for sources found")
else:
print(f"Attempting to update {YAML_FILE}...")

# --- In-place update of the YAML file ---
try:
# Check if any hashes were changed before updating version and release
if hashes_changed:
print("Hashes have changed. Updating version and incrementing release.")
# Update the 'version' key with the current date
yaml_data['version'] = datetime.datetime.now().strftime("%Y%m%d")

# Increment the 'release' key if it exists and is an integer
if 'release' in yaml_data and isinstance(yaml_data['release'], int):
yaml_data['release'] += 1
else:
print(f"Warning: Cannot increment 'release' key. It is missing or not an integer.")

with open(YAML_FILE, 'w') as f:
# Update the 'source' section in the loaded data structure
if 'upstreams' in yaml_data and isinstance(yaml_data['upstreams'], list):
yaml_data['upstreams'] = updated_sources_list
else:
print(f"Error: 'upstreams' section not found or not a list in {YAML_FILE} during update phase.")
return

# Dump the modified data structure back into the YAML file
yaml.dump(yaml_data, f)

print(f"{YAML_FILE} updated successfully.")

except FileNotFoundError:
print(f"Error: {YAML_FILE} not found during the update attempt.")
except Exception as e:
print(f"Error writing updated data to {YAML_FILE}: {e}")

# --- End of In-place update ---

print("\n" + "="*20)

print("✅ Finished")


if __name__ == "__main__":
main()
Binary file modified d/discover/manifest.x86_64.bin
Binary file not shown.
12 changes: 11 additions & 1 deletion d/discover/manifest.x86_64.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
"cmake(QCoro6)",
"cmake(Qt6Quick)",
"cmake(Qt6WebView)",
"cmake(packagekitqt6)",
"pkgconfig(flatpak)",
"pkgconfig(libmarkdown)",
"pkgconfig(ostree-1)"
],
"depends": [
"appstream-catalog",
"interpreter(/usr/lib/ld-linux-x86-64.so.2(x86_64))",
"kf6-kirigami",
"kf6-kitemmodels",
Expand Down Expand Up @@ -80,16 +82,20 @@
"soname(libglib-2.0.so.0(x86_64))",
"soname(libgobject-2.0.so.0(x86_64))",
"soname(libm.so.6(x86_64))",
"soname(libmarkdown.so.3(x86_64))",
"soname(libpackagekitqt6.so.1(x86_64))",
"soname(libunwind.so.1(x86_64))"
],
"files": [
"/usr/bin/plasma-discover",
"/usr/lib/kf6/DiscoverNotifier",
"/usr/lib/libDiscoverCommon.so",
"/usr/lib/libDiscoverNotifiers.so",
"/usr/lib/qt6/plugins/discover-notifier/DiscoverPackageKitNotifier.so",
"/usr/lib/qt6/plugins/discover-notifier/FlatpakNotifier.so",
"/usr/lib/qt6/plugins/discover/flatpak-backend.so",
"/usr/lib/qt6/plugins/discover/kns-backend.so",
"/usr/lib/qt6/plugins/discover/packagekit-backend.so",
"/usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_updates.so",
"/usr/share/applications/kcm_updates.desktop",
"/usr/share/applications/org.kde.discover-flatpak.desktop",
Expand All @@ -107,6 +113,7 @@
"/usr/share/knotifications6/discoverabstractnotifier.notifyrc",
"/usr/share/kxmlgui5/plasmadiscover/plasmadiscoverui.rc",
"/usr/share/libdiscover/categories/flatpak-backend-categories.xml",
"/usr/share/libdiscover/categories/packagekit-backend-categories.xml",
"/usr/share/locale/ar/LC_MESSAGES/kcm_updates.mo",
"/usr/share/locale/ar/LC_MESSAGES/libdiscover.mo",
"/usr/share/locale/ar/LC_MESSAGES/plasma-discover-notifier.mo",
Expand Down Expand Up @@ -344,6 +351,7 @@
"/usr/share/locale/zh_TW/LC_MESSAGES/plasma-discover.mo",
"/usr/share/metainfo/org.kde.discover.appdata.xml",
"/usr/share/metainfo/org.kde.discover.flatpak.appdata.xml",
"/usr/share/metainfo/org.kde.discover.packagekit.appdata.xml",
"/usr/share/qlogging-categories6/discover.categories",
"/usr/share/xdg/autostart/org.kde.discover.notifier.desktop"
],
Expand All @@ -352,14 +360,16 @@
"binary(plasma-discover)",
"soname(libDiscoverCommon.so(x86_64))",
"soname(libDiscoverNotifiers.so(x86_64))",
"soname(qt6/plugins/discover-notifier/DiscoverPackageKitNotifier.so(x86_64))",
"soname(qt6/plugins/discover-notifier/FlatpakNotifier.so(x86_64))",
"soname(qt6/plugins/discover/flatpak-backend.so(x86_64))",
"soname(qt6/plugins/discover/kns-backend.so(x86_64))",
"soname(qt6/plugins/discover/packagekit-backend.so(x86_64))",
"soname(qt6/plugins/plasma/kcms/systemsettings/kcm_updates.so(x86_64))"
]
}
},
"source-name": "discover",
"source-release": "5",
"source-release": "6",
"source-version": "6.4.4"
}
5 changes: 3 additions & 2 deletions d/discover/stone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
name : discover
version : 6.4.4
release : 5
release : 6
upstreams :
- https://download.kde.org/stable/plasma/6.4.4/discover-6.4.4.tar.xz : baea19fadb3dee8e9516a402aa3bc16f1dd5f4b7dbe46a6ecd0617c508842e96
homepage : https://apps.kde.org/discover/
Expand All @@ -13,7 +13,7 @@
summary : Discover helps you find and install applications, games, and tools.
description : |
Discover helps you find and install applications, games, and tools. You can search or browse by category, and look at screenshots and read reviews to help you pick the perfect app. With Discover, you can manage software from multiple sources, including your operating system's software repository, Flatpak repos, the Snap store, or even AppImages from store.kde.org. Finally, Discover also allows you to find, install, and manage add-ons for Plasma and all your favorite KDE apps!
builddeps :

Check warning on line 16 in d/discover/stone.yaml

View workflow job for this annotation

GitHub Actions / Checks

builddeps are not in order, expected: - cmake(AppStreamQt) - cmake(ECM) - cmake(KF6Archive) - cmake(KF6Attica) - cmake(KF6Auth) - cmake(KF6Config) - cmake(KF6CoreAddons) - cmake(KF6Crash) - cmake(KF6DBusAddons) - cmake(KF6I18n) - cmake(KF6IconThemes) - cmake(KF6IdleTime) - cmake(KF6ItemModels) - cmake(KF6KCMUtils) - cmake(KF6KIO) - cmake(KF6Kirigami) - cmake(KF6KirigamiAddons) - cmake(KF6NewStuff) - cmake(KF6Notifications) - cmake(KF6Purpose) - cmake(KF6StatusNotifierItem) - cmake(KF6UserFeedback) - cmake(KF6XmlGui) - cmake(QCoro6) - cmake(Qt6Quick) - cmake(Qt6WebView) - cmake(packagekitqt6) - pkgconfig(flatpak) - pkgconfig(libmarkdown) - pkgconfig(ostree-1)
- cmake(AppStreamQt)
# Temporary, boulder doesn't handle build ordering resolution correctly when builddeps are added by macros, so add ECM manually
- cmake(ECM)
Expand Down Expand Up @@ -41,13 +41,14 @@
- cmake(QCoro6)
- cmake(Qt6Quick)
- cmake(Qt6WebView)
- cmake(packagekitqt6)
- pkgconfig(flatpak)
- pkgconfig(libmarkdown)
- pkgconfig(ostree-1)
# TODO:
# - fwupd
# - packagekitqt
rundeps :
- appstream-catalog
- kf6-kirigami
- kf6-kitemmodels
- kf6-purpose
Expand Down
Binary file modified g/gnome-software/manifest.x86_64.bin
Binary file not shown.
8 changes: 8 additions & 0 deletions g/gnome-software/manifest.x86_64.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
"pkgconfig(libadwaita-1)",
"pkgconfig(libsoup-3.0)",
"pkgconfig(ostree-1)",
"pkgconfig(packagekit-glib2)",
"pkgconfig(polkit-gobject-1)",
"pkgconfig(sysprof-capture-4)",
"pkgconfig(xmlb)"
],
"depends": [
"appstream-catalog",
"gnome-app-list",
"interpreter(/usr/lib/ld-linux-x86-64.so.2(x86_64))",
"soname(libadwaita-1.so.0(x86_64))",
Expand All @@ -41,6 +43,7 @@
"soname(libjson-glib-1.0.so.0(x86_64))",
"soname(libm.so.6(x86_64))",
"soname(libostree-1.so.1(x86_64))",
"soname(libpackagekit-glib2.so.18(x86_64))",
"soname(libpango-1.0.so.0(x86_64))",
"soname(libpolkit-gobject-1.so.0(x86_64))",
"soname(libsoup-3.0.so.0(x86_64))",
Expand All @@ -64,13 +67,16 @@
"/usr/lib/gnome-software/plugins-22/libgs_plugin_icons.so",
"/usr/lib/gnome-software/plugins-22/libgs_plugin_modalias.so",
"/usr/lib/gnome-software/plugins-22/libgs_plugin_os-release.so",
"/usr/lib/gnome-software/plugins-22/libgs_plugin_packagekit.so",
"/usr/lib/gnome-software/plugins-22/libgs_plugin_provenance-license.so",
"/usr/lib/gnome-software/plugins-22/libgs_plugin_provenance.so",
"/usr/lib/gnome-software/plugins-22/libgs_plugin_repos.so",
"/usr/lib/libgnomesoftware.so.22",
"/usr/share/applications/gnome-software-local-file-flatpak.desktop",
"/usr/share/applications/gnome-software-local-file-packagekit.desktop",
"/usr/share/applications/org.gnome.Software.desktop",
"/usr/share/bash-completion/completions/gnome-software",
"/usr/share/dbus-1/services/org.freedesktop.PackageKit.service",
"/usr/share/dbus-1/services/org.gnome.Software.service",
"/usr/share/doc/gnome-software/README.md",
"/usr/share/glib-2.0/schemas/org.gnome.software.gschema.xml",
Expand Down Expand Up @@ -412,6 +418,7 @@
"soname(gnome-software/plugins-22/libgs_plugin_icons.so(x86_64))",
"soname(gnome-software/plugins-22/libgs_plugin_modalias.so(x86_64))",
"soname(gnome-software/plugins-22/libgs_plugin_os-release.so(x86_64))",
"soname(gnome-software/plugins-22/libgs_plugin_packagekit.so(x86_64))",
"soname(gnome-software/plugins-22/libgs_plugin_provenance-license.so(x86_64))",
"soname(gnome-software/plugins-22/libgs_plugin_provenance.so(x86_64))",
"soname(gnome-software/plugins-22/libgs_plugin_repos.so(x86_64))",
Expand All @@ -436,6 +443,7 @@
"pkgconfig(libadwaita-1)",
"pkgconfig(libsoup-3.0)",
"pkgconfig(ostree-1)",
"pkgconfig(packagekit-glib2)",
"pkgconfig(polkit-gobject-1)",
"pkgconfig(sysprof-capture-4)",
"pkgconfig(xmlb)"
Expand Down
Loading