Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorTasos Sahanidis <tasos@tasossah.com>2024-07-14 03:23:39 +0300
committerTasos Sahanidis <tasos@tasossah.com>2024-07-14 03:23:39 +0300
commit278b25f1debc0aaf55b7164a9c492bfd101762da (patch)
tree666cd9b7781cc26753e550658115cb13cec04dca /extra
parentfe2ee30e322a269adf716fad75518fa23ecfef7a (diff)
extra/syslog-ng: Backport patches for 4.6
Diffstat (limited to 'extra')
-rw-r--r--extra/syslog-ng/581bb46db5c3e7bc4abd1ea45487652756ce022f.patch33
-rw-r--r--extra/syslog-ng/PKGBUILD7
-rw-r--r--extra/syslog-ng/ac13999810bced8f623b0e027579a95f23dc0641.patch53
3 files changed, 93 insertions, 0 deletions
diff --git a/extra/syslog-ng/581bb46db5c3e7bc4abd1ea45487652756ce022f.patch b/extra/syslog-ng/581bb46db5c3e7bc4abd1ea45487652756ce022f.patch
new file mode 100644
index 00000000..937eacfa
--- /dev/null
+++ b/extra/syslog-ng/581bb46db5c3e7bc4abd1ea45487652756ce022f.patch
@@ -0,0 +1,33 @@
+From 581bb46db5c3e7bc4abd1ea45487652756ce022f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kov=C3=A1cs=2C=20Gerg=C5=91=20Ferenc?= <kovgeri01@gmail.com>
+Date: Mon, 5 Feb 2024 22:59:44 +0100
+Subject: [PATCH] secure-logging: Fix printing of guint64 by using it's format
+ macro.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Kovács, Gergő Ferenc <kovgeri01@gmail.com>
+---
+ modules/secure-logging/slogkey/slogkey.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/modules/secure-logging/slogkey/slogkey.c b/modules/secure-logging/slogkey/slogkey.c
+index 13c5786943..685205cd07 100644
+--- a/modules/secure-logging/slogkey/slogkey.c
++++ b/modules/secure-logging/slogkey/slogkey.c
+@@ -1,4 +1,5 @@
+ /*
++ * Copyright (c) 2024 Gergo Ferenc Kovacs
+ * Copyright (c) 2019 Airbus Commercial Aircraft
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -157,7 +158,7 @@ int main(int argc, char **argv)
+ msg_error("[SLOG] ERROR: Unable to read key file", evt_tag_str("file", keyfile));
+ return ret;
+ }
+- printf("counter=%zu\n", counterValue);
++ printf("counter=%" G_GUINT64_FORMAT "\n", counterValue);
+ }
+ else if (host)
+ {
diff --git a/extra/syslog-ng/PKGBUILD b/extra/syslog-ng/PKGBUILD
new file mode 100644
index 00000000..50a4b2db
--- /dev/null
+++ b/extra/syslog-ng/PKGBUILD
@@ -0,0 +1,7 @@
+if [[ $pkgver = 4.6.* ]]; then
+ source+=('ac13999810bced8f623b0e027579a95f23dc0641.patch'
+ '581bb46db5c3e7bc4abd1ea45487652756ce022f.patch')
+ sha512sums+=('SKIP' 'SKIP')
+
+ eval "$(declare -f prepare | sed '$ d' | sed '$ a patch -p1 -i ../ac13999810bced8f623b0e027579a95f23dc0641.patch; patch -p1 -i ../581bb46db5c3e7bc4abd1ea45487652756ce022f.patch; }')"
+fi
diff --git a/extra/syslog-ng/ac13999810bced8f623b0e027579a95f23dc0641.patch b/extra/syslog-ng/ac13999810bced8f623b0e027579a95f23dc0641.patch
new file mode 100644
index 00000000..673f0fef
--- /dev/null
+++ b/extra/syslog-ng/ac13999810bced8f623b0e027579a95f23dc0641.patch
@@ -0,0 +1,53 @@
+From ac13999810bced8f623b0e027579a95f23dc0641 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kov=C3=A1cs=2C=20Gerg=C5=91=20Ferenc?= <kovgeri01@gmail.com>
+Date: Mon, 5 Feb 2024 23:01:08 +0100
+Subject: [PATCH] secure-logging: Changed local variable type as
+ g_io_channel_write_chars as it's 4th parameter accepts gsize.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Kovács, Gergő Ferenc <kovgeri01@gmail.com>
+---
+ modules/secure-logging/slog.c | 3 ++-
+ modules/secure-logging/tests/test_secure_logging.c | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/modules/secure-logging/slog.c b/modules/secure-logging/slog.c
+index 7bc8fcf7d4..4f585fe599 100644
+--- a/modules/secure-logging/slog.c
++++ b/modules/secure-logging/slog.c
+@@ -1,4 +1,5 @@
+ /*
++ * Copyright (c) 2024 Gergo Ferenc Kovacs
+ * Copyright (c) 2019 Airbus Commercial Aircraft
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -932,7 +933,7 @@ int writeKey(char *key, guint64 counter, gchar *keypath)
+ return 0;
+ }
+
+- guint64 outlen = 0;
++ gsize outlen = 0;
+ // Write key
+ status = g_io_channel_write_chars(keyfile, key, KEY_LENGTH, &outlen, &error);
+ if(status != G_IO_STATUS_NORMAL)
+diff --git a/modules/secure-logging/tests/test_secure_logging.c b/modules/secure-logging/tests/test_secure_logging.c
+index 0f11d52e6d..0005b48652 100644
+--- a/modules/secure-logging/tests/test_secure_logging.c
++++ b/modules/secure-logging/tests/test_secure_logging.c
+@@ -1,4 +1,5 @@
+ /*
++ * Copyright (c) 2024 Gergo Ferenc Kovacs
+ * Copyright (c) 2019 Airbus Commercial Aircraft
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -373,7 +374,7 @@ void corruptKey(TestData *testData)
+
+ cr_assert(status == G_IO_STATUS_NORMAL, " Unable to set encoding for key file %s", testData->keyFile->str);
+
+- guint64 outlen = 0;
++ gsize outlen = 0;
+
+ int buflen = KEY_LENGTH + CMAC_LENGTH + sizeof(guint64);
+