Skip to content

Commit

Permalink
user/cinnamon: new package
Browse files Browse the repository at this point in the history
  • Loading branch information
EarldridgeJazzedPineda committed Oct 3, 2024
1 parent 6f6680f commit fc38a79
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 0 deletions.
1 change: 1 addition & 0 deletions user/cinnamon-apps
75 changes: 75 additions & 0 deletions user/cinnamon/patches/12272.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From c6402be3b5eb84f53367ebd57b1a38664a240d44 Mon Sep 17 00:00:00 2001
From: Sparky Bluefang <[email protected]>
Date: Wed, 3 Jul 2024 02:10:18 -0400
Subject: [PATCH] Use Polkit agent for X11 sessions. Don't crash if polkit
doesn't start properly.

---
debian/control | 1 -
js/ui/main.js | 4 +---
js/ui/polkitAuthenticationAgent.js | 20 +++++++++++++++++++-
3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/debian/control b/debian/control
index b9812a1276..d886fac1ec 100644
--- a/debian/control
+++ b/debian/control
@@ -85,7 +85,6 @@ Depends:
metacity,
nemo,
network-manager-gnome [linux-any],
- policykit-1-gnome,
python3,
python3-dbus,
python3-distro,
diff --git a/js/ui/main.js b/js/ui/main.js
index 12bcfc0cfc..55703b96b3 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -430,9 +430,7 @@ function start() {
_initUserSession();
screenRecorder = new ScreenRecorder.ScreenRecorder();

- if (Meta.is_wayland_compositor()) {
- PolkitAuthenticationAgent.init();
- }
+ PolkitAuthenticationAgent.init();

_startDate = new Date();

diff --git a/js/ui/polkitAuthenticationAgent.js b/js/ui/polkitAuthenticationAgent.js
index 5f0b55c387..e9ac7b8853 100644
--- a/js/ui/polkitAuthenticationAgent.js
+++ b/js/ui/polkitAuthenticationAgent.js
@@ -35,6 +35,7 @@ const PolkitAgent = imports.gi.PolkitAgent;
const ModalDialog = imports.ui.modalDialog;
const CinnamonEntry = imports.ui.cinnamonEntry;
const UserWidget = imports.ui.userWidget;
+const Main = imports.ui.main;

const DIALOG_ICON_SIZE = 64;

@@ -389,5 +390,22 @@ AuthenticationAgent.prototype = {
}

function init() {
- let agent = new AuthenticationAgent();
+ try {
+ let agent = new AuthenticationAgent();
+ } catch(err) {
+ if(!(err instanceof Error)) {
+ err = new Error(err);
+ }
+
+ log('polkitAuthenticationAgent: init error ' + err);
+
+ let icon = new St.Icon({ icon_name: 'dialog-warning',
+ icon_type: St.IconType.FULLCOLOR,
+ icon_size: 36 });
+
+ Main.warningNotify(_('Unable to start Cinnamon PolicyKit Agent'), err.message +
+ "\n\n" +
+ _("If you have another PolicyKit Agent configured to autostart, it should be disabled."),
+ icon);
+ }
}
90 changes: 90 additions & 0 deletions user/cinnamon/template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Update cinnamon-schemas when bumping
pkgname = "cinnamon"
pkgver = "6.2.9"
pkgrel = 0
build_style = "meson"
configure_args = ["-Ddefault_library=shared"]
hostmakedepends = [
"gobject-introspection",
"intltool",
"meson",
"pkgconf",
]
makedepends = [
"at-spi2-core-devel",
"cinnamon-menus-devel",
"cjs-devel",
"dbus-devel",
"glib-devel",
"gstreamer-devel",
"gtk+3-devel",
"libx11-devel",
"libxml2-devel",
"mesa-devel",
"muffin-devel",
"networkmanager-devel",
"polkit-devel",
"xapp-devel",
]
depends = [
"accountsservice",
"bash",
"caribou",
"cinnamon-control-center",
"cinnamon-desktop",
"cinnamon-menus",
"cinnamon-schemas",
"cinnamon-screensaver",
"cinnamon-session",
"evolution-data-server",
"glib",
"gsound",
"gtk+3",
"libical",
"libnotify",
"libtimezonemap",
"nemo",
"network-manager-applet",
"openrc-settingsd",
"python-cairo",
"python-dbus",
"python-gobject",
"python-pam",
"python-pexpect",
"python-pillow",
"python-psutil",
"python-pytz",
"python-requests",
"python-setproctitle",
"python-tinycss2",
"python-xapp",
"touchegg",
"upower-libs",
"xapp",
]
pkgdesc = "Linux desktop that provides a traditional user experience"
maintainer = "Earldridge Jazzed Pineda <[email protected]>"
license = "GPL-2.0-or-later"
url = "https://projects.linuxmint.com/cinnamon"
source = (
f"https://github.com/linuxmint/cinnamon/archive/refs/tags/{pkgver}.tar.gz"
)
sha256 = "a0b15b98a899532d531689ea11ff6805a87fcf5994e238322b6c916bf8c29919"
broken_symlinks = ["etc/xdg/menus/cinnamon-applications-merged"]
# meson.build: tests are not currently functional
options = ["!check", "!cross"]


def post_install(self):
# Schema files are provided by cinnamon-schemas
self.uninstall("usr/share/glib-2.0")


@subpackage("cinnamon-apps")
def _(self):
self.subdesc = "apps"
self.install_if = [self.parent]
self.depends = ["gnome-terminal", "xapp-apps"]
self.options = ["empty"]

return []

0 comments on commit fc38a79

Please sign in to comment.