Skip to content

Commit

Permalink
feat: add atomic-desktop confiuration package
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton authored Dec 5, 2023
1 parent ca90135 commit 7f6c517
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 3 deletions.
24 changes: 24 additions & 0 deletions ultramarine/release/org.projectatomic.rpmostree1.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
polkit.addRule(function(action, subject) {
if (action.id == "org.projectatomic.rpmostree1.repo-refresh" &&
subject.active == true && subject.local == true) {
return polkit.Result.YES;
}

if ((action.id == "org.projectatomic.rpmostree1.install-uninstall-packages" ||
action.id == "org.projectatomic.rpmostree1.install-local-packages" ||
action.id == "org.projectatomic.rpmostree1.override" ||
action.id == "org.projectatomic.rpmostree1.deploy" ||
action.id == "org.projectatomic.rpmostree1.upgrade" ||
action.id == "org.projectatomic.rpmostree1.rebase" ||
action.id == "org.projectatomic.rpmostree1.rollback" ||
action.id == "org.projectatomic.rpmostree1.bootconfig" ||
action.id == "org.projectatomic.rpmostree1.reload-daemon" ||
action.id == "org.projectatomic.rpmostree1.cancel" ||
action.id == "org.projectatomic.rpmostree1.cleanup" ||
action.id == "org.projectatomic.rpmostree1.client-management") &&
subject.active == true &&
subject.local == true &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
39 changes: 36 additions & 3 deletions ultramarine/release/ultramarine-release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
%bcond_without atomic_kde
%bcond_without atomic_gnome

%if %{with atomic_flagship} || %{with atomic_pantheon} || %{with atomic_kde} || %{with atomic_gnome}
%global with_atomic_desktop 1
%endif

Summary: Ultramarine Linux release files
Name: ultramarine-release
Version: 39
Release: 0.8%{?dist}
Release: 0.9%{?dist}
License: MIT
Source0: LICENSE
URL: https://ultramarine-linux.org
Expand All @@ -47,14 +51,14 @@ Source15: 50_ultramarine-gnome.gschema.override
Source19: distro-template.swidtag
Source20: distro-edition-template.swidtag


Source28: longer-default-shutdown-timeout.conf


Source30: ultramarine.conf

Source31: enable-kwin-system76-scheduler-integration.service

Source32: org.projectatomic.rpmostree1.rules

BuildArch: noarch

Provides: ultramarine-release = %{version}-%{release}
Expand Down Expand Up @@ -181,6 +185,7 @@ Provides: system-release
Provides: system-release(%{version})
Provides: base-module(platform:f%{version})
Requires: ultramarine-release-common = %{version}-%{release}
Requires: ultramarine-release-atomic-desktop = %{version}-%{release}
Provides: system-release-product
# ultramarine-release-common Requires: ultramarine-release-identity, so at least one
# package must provide it. This Recommends: pulls in
Expand Down Expand Up @@ -255,6 +260,7 @@ Provides: system-release
Provides: system-release(%{version})
Provides: base-module(platform:f%{version})
Requires: ultramarine-release-common = %{version}-%{release}
Requires: ultramarine-release-atomic-desktop = %{version}-%{release}
Provides: system-release-product
# ultramarine-release-common Requires: ultramarine-release-identity, so at least one
# package must provide it. This Recommends: pulls in
Expand Down Expand Up @@ -330,6 +336,7 @@ Provides: system-release
Provides: system-release(%{version})
Provides: base-module(platform:f%{version})
Requires: ultramarine-release-common = %{version}-%{release}
Requires: ultramarine-release-atomic-desktop = %{version}-%{release}
Provides: system-release-product
# ultramarine-release-common Requires: ultramarine-release-identity, so at least one
# package must provide it. This Recommends: pulls in
Expand Down Expand Up @@ -417,6 +424,7 @@ Provides: system-release
Provides: system-release(%{version})
Provides: base-module(platform:f%{version})
Requires: ultramarine-release-common = %{version}-%{release}
Requires: ultramarine-release-atomic-desktop = %{version}-%{release}
Provides: system-release-product
Recommends: gnome-shell-extension-pop-shell
Recommends: gnome-shell-extension-appindicator
Expand Down Expand Up @@ -445,6 +453,20 @@ Provides the necessary files for a Ultramarine Atomic GNOME installation.

%endif

######################################################################
#### Accessory packages
######################################################################

####### Atomic Desktop (OSTree) #######

%if %{with atomic_desktop}
%package atomic-desktop
Summary: Common configuration package for atomic desktop variants

%description atomic-desktop
Common configuration package for atomic desktop variants
%endif

%prep

%build
Expand Down Expand Up @@ -737,7 +759,13 @@ install -Dm0644 %{SOURCE28} -t %{buildroot}%{_prefix}/lib/systemd/user.conf.d/
%systemd_user_preun enable-kwin-system76-scheduler-integration.service

%endif

%if %{with atomic_desktop}

# Install rpm-ostree polkit rules
install -Dm0644 %{SOURCE32} -t %{buildroot}%{_datadir}/polkit-1/rules.d/

%endif

%files common
%{_datadir}/dnf/plugins/copr.vendor.conf
Expand Down Expand Up @@ -842,6 +870,11 @@ install -Dm0644 %{SOURCE28} -t %{buildroot}%{_prefix}/lib/systemd/user.conf.d/
%{_datadir}/glib-2.0/schemas/50_ultramarine-gnome.gschema.override
%endif

%if %{with atomic_desktop}
%files atomic-desktop
%attr(0644,root,root) %{_prefix}/share/polkit-1/rules.d/org.projectatomic.rpmostree1.rules
%endif

%files notes
%doc readme/README.Ultramarine-Release-Notes

Expand Down

0 comments on commit 7f6c517

Please sign in to comment.