Technical preview version 0.3 #2

Merged
adamm merged 1 commits from malikirri/cockpit-bootloader:main into main 2025-12-18 13:24:27 +01:00
6 changed files with 61 additions and 31 deletions

Binary file not shown.

BIN
cockpit-bootloader-0.3.tar.xz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Dec 17 11:26:21 UTC 2025 - Miika Alikirri <miika.alikirri@suse.com>
- Update to version 0.3
* Implement snapshots
* Include vendor.tar.zst for Cargo dependencies
* Remove unneeded load-css-overrides.patch
-------------------------------------------------------------------
Tue Nov 11 11:04:35 UTC 2025 - Miika Alikirri <miika.alikirri@suse.com>

View File

@@ -16,17 +16,17 @@
#
Name: cockpit-bootloader
Version: 0.2
Version: 0.3
Release: 0%{?dist}
Summary: Cockpit module for editing bootloader settings
License: LGPL-2.1-or-later
Source: %{name}-%{version}.tar.xz
Source3: vendor.tar.zst
Source10: package-lock.json
Source11: node_modules.spec.inc
Patch10: load-css-overrides.patch
%include %_sourcedir/node_modules.spec.inc
BuildArch: noarch
ExclusiveArch: %{rust_arches}
%if ! 0%{?suse_version}
ExclusiveArch: %{nodejs_arches} noarch
%endif
@@ -46,6 +46,9 @@ BuildRequires: libappstream-glib-devel
%endif
BuildRequires: local-npm-registry
BuildRequires: cockpit-devel >= 337
BuildRequires: cargo >= 1.74.0
BuildRequires: cargo-packaging
BuildRequires: sqlite3
Requires: cockpit-bridge
@@ -53,13 +56,25 @@ Requires: cockpit-bridge
Cockpit module for editing bootloader settings
%prep
%setup -q -n %{name}-%{version}
%patch -P 10 -p1
%autosetup -a3
rm -rf node_modules
rm -f package-lock.json
local-npm-registry %{_sourcedir} install --include=dev --ignore-scripts
%build
# bootkitd build
cd bootkit-service
mkdir -p tmp
touch tmp/bootkit.db
sqlite3 tmp/bootkit.db < db/grub2.sql
sqlite3 tmp/bootkit.db < db/selected_snapshot.sql
export DATABASE_URL=sqlite://`pwd`/tmp/bootkit.db
%{cargo_build}
rm tmp/bootkit.db
cd ..
# cockpit-bootloader build
mkdir -p pkg
cp -r %{_datadir}/cockpit/devel/lib pkg/lib
# Bug in how cockpit devel is built
@@ -67,6 +82,18 @@ sed -i 's/import glob from "glob"/import { glob } from "glob"/' pkg/lib/cockpit-
NODE_ENV=production npm run build
%install
# bootkitd install
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_prefix}/share/dbus-1/system.d
install -m 0755 ./target/release/bootkit %{buildroot}%{_sbindir}/bootkitd
install -m 0644 ./bootkit-service/dbus/bootkitd.service %{buildroot}%{_unitdir}/bootkitd.service
install -m 0644 ./bootkit-service/dbus/org.opensuse.bootkit.conf %{buildroot}%{_prefix}/share/dbus-1/system.d/org.opensuse.bootkit.conf
mkdir -p %{buildroot}/var/lib/bootkit
touch %{buildroot}/var/lib/bootkit/bootkit.db
# cockpit-bootloader install
PREFIX=/usr DESTDIR=%{buildroot} make install
# drop source maps, they are large and just for debugging
@@ -78,10 +105,25 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*
# this can't be meaningfully tested during package build; tests happen through
# FMF (see plans/all.fmf) during package gating
%preun
%systemd_preun bootkitd.service
%postun
%systemd_postun_with_restart bootkitd.service
%files
%doc README.md
%license LICENSE dist/index.js.LEGAL.txt
%{_datadir}/cockpit
%{_datadir}/metainfo/*
# bootkitd files
%dir %{_prefix}/share/dbus-1
%dir %{_prefix}/share/dbus-1/system.d
%dir /var/lib/bootkit
%ghost /var/lib/bootkit/bootkit.db
%{_sbindir}/bootkitd
%{_unitdir}/bootkitd.service
%{_prefix}/share/dbus-1/system.d/org.opensuse.bootkit.conf
%changelog

View File

@@ -1,23 +0,0 @@
From 77918aef950c352f0d35c8198e8109e398a74396 Mon Sep 17 00:00:00 2001
From: Alice Brooks <alice.brooks@suse.com>
Date: Thu, 22 May 2025 11:22:23 +0100
Subject: [PATCH] Load css overrides
---
src/index.html | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/index.html b/src/index.html
index efcacba..28e9d0c 100644
--- a/src/index.html
+++ b/src/index.html
@@ -23,6 +23,7 @@ along with this package; If not, see <http://www.gnu.org/licenses/>.
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="index.css">
+ <link href="../../static/css-overrides.css" type="text/css" rel="stylesheet">
<link href="../../static/branding.css" rel="stylesheet" />
<link href="../../static/css-overrides.css" rel="stylesheet" />
--
2.49.0

BIN
vendor.tar.zst LFS Normal file

Binary file not shown.