Skip to content

Commit

Permalink
New package: gtkgreet-0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
cinerea0 committed Sep 11, 2023
1 parent d09cea6 commit 84ac8c8
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
31 changes: 31 additions & 0 deletions srcpkgs/gtkgreet/patches/32-bit.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Upstream: https://git.sr.ht/~kennylevinsen/gtkgreet/commit/3471aaaaee4619fd4aded85803b27b4a8dff41a6
diff --git a/gtkgreet/proto.c b/gtkgreet/proto.c
index 92619494a7..a527e85552 100644
--- a/gtkgreet/proto.c
+++ b/gtkgreet/proto.c
@@ -21,9 +21,13 @@ struct header {

static int write_req(int fd, struct json_object* req) {
const char* reqstr = json_object_get_string(req);
- uint32_t len = strlen(reqstr);
- char* headerp = (char*)&len;
- ssize_t off = 0;
+ size_t len = strlen(reqstr);
+ if (len > 0xFFFFFFFF) {
+ goto error;
+ }
+ uint32_t header = len;
+ char* headerp = (char*)&header;
+ uint32_t off = 0;

while (off < 4) {
ssize_t n = write(fd, &headerp[off], 4-off);
@@ -51,7 +55,7 @@ static struct json_object* read_resp(int fd) {
struct json_object* resp = NULL;
char *respstr = NULL;
uint32_t len;
- ssize_t off = 0;
+ uint32_t off = 0;

while (off < 4) {
char* headerp = (char*)&len;
17 changes: 17 additions & 0 deletions srcpkgs/gtkgreet/patches/update-deprecated-constant.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
From 725846edf6a22f495fdbb2972bb559563a90262b Mon Sep 17 00:00:00 2001
From: Hugo Osvaldo Barrera <[email protected]>
Date: Thu, 3 Nov 2022 12:45:49 +0100
Subject: [PATCH] Update reference to deprecated constant
diff --git a/gtkgreet/gtkgreet.c b/gtkgreet/gtkgreet.c
index addad5a..1cbed1d 100644
--- a/gtkgreet/gtkgreet.c
+++ b/gtkgreet/gtkgreet.c
@@ -93,7 +93,7 @@ static int gtkgreet_update_clocks_handler(gpointer data) {

struct GtkGreet* create_gtkgreet() {
gtkgreet = calloc(1, sizeof(struct GtkGreet));
- gtkgreet->app = gtk_application_new("wtf.kl.gtkgreet", G_APPLICATION_FLAGS_NONE);
+ gtkgreet->app = gtk_application_new("wtf.kl.gtkgreet", G_APPLICATION_DEFAULT_FLAGS);
gtkgreet->windows = g_array_new(FALSE, TRUE, sizeof(struct Window*));
gtkgreet->question_cnt = 1;
return gtkgreet;
14 changes: 14 additions & 0 deletions srcpkgs/gtkgreet/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Template file for 'gtkgreet'
pkgname=gtkgreet
version=0.7
revision=1
build_style=meson
hostmakedepends="pkg-config scdoc"
makedepends="gtk+3-devel gtk-layer-shell-devel json-c-devel"
depends="greetd"
short_desc="Gtk greeter for greetd"
maintainer="cinerea0 <[email protected]>"
license="GPL-3.0-or-later"
homepage="https://git.sr.ht/~kennylevinsen/gtkgreet"
distfiles="https://git.sr.ht/~kennylevinsen/gtkgreet/archive/${version}.tar.gz"
checksum=eb4ba0e1e4f9cf888ce7b932b923f97521c2277032628cfc06bb86fecbad9373

0 comments on commit 84ac8c8

Please sign in to comment.