diff --git a/ultramarine/release/org.projectatomic.rpmostree1.rules b/ultramarine/release/org.projectatomic.rpmostree1.rules new file mode 100644 index 0000000..bd483b3 --- /dev/null +++ b/ultramarine/release/org.projectatomic.rpmostree1.rules @@ -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; + } +}); \ No newline at end of file diff --git a/ultramarine/release/ultramarine-release.spec b/ultramarine/release/ultramarine-release.spec index 91c9d09..cf97c5c 100644 --- a/ultramarine/release/ultramarine-release.spec +++ b/ultramarine/release/ultramarine-release.spec @@ -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 @@ -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} @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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