Skip to content

Commit

Permalink
sysklogd: add patch ro read *.conf files from include/ dirs sorted, r…
Browse files Browse the repository at this point in the history
…elbump
  • Loading branch information
sighook committed Jul 18, 2024
1 parent bcdaa32 commit e065d51
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions sysklogd/.md5sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
8e696abdc85f3d7c505d774ed81aa0ef 28a1fb30567c6aecb1b50c79c4b7d17a03ed2453.patch
52b2544aedf0ed90007ce936b63aa975 cron.syslog
06705a148bc033eac191069e969f052f rc.sysklogd
576f95e96bcafa77d7b3d0553b94a682 rotatelog
Expand Down
26 changes: 26 additions & 0 deletions sysklogd/28a1fb30567c6aecb1b50c79c4b7d17a03ed2453.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 28a1fb30567c6aecb1b50c79c4b7d17a03ed2453 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <[email protected]>
Date: Thu, 18 Jul 2024 11:42:36 +0200
Subject: [PATCH] Read *.conf files from include/ directories sorted

No point in "saving time" on this operation. It is more important to
users that we read the files in a predefined order, alphabetically.

Signed-off-by: Joachim Wiberg <[email protected]>
---
src/syslogd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/syslogd.c b/src/syslogd.c
index ccd1870..e6d8747 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -3400,7 +3400,7 @@ static int cfparse(FILE *fp, struct files *newf)
p++;

logit("Searching for %s ...\n", p);
- if (glob(p, GLOB_NOSORT, NULL, &gl))
+ if (glob(p, 0, NULL, &gl))
logit("No files match %s\n", p);

for (size_t i = 0; i < gl.gl_pathc; i++) {
6 changes: 5 additions & 1 deletion sysklogd/Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@

name=sysklogd
version=2.6.0
release=1
release=2
source="https://github.com/troglobit/$name/releases/download/v$version/$name-$version.tar.gz
28a1fb30567c6aecb1b50c79c4b7d17a03ed2453.patch
rotatelog rotatelog.8 cron.syslog syslog.conf rc.sysklogd"

build() {
# [PATCH] Read *.conf files from include/ directories sorted
patch -d $name-$version -p1 -i $SRC/28a1fb30567c6aecb1b50c79c4b7d17a03ed2453.patch

# remove irrelevant note from the man page
sed 's/(The shipped systemd unit file disables this by default.)//' \
-i $name-$version/man/syslogd.8
Expand Down

0 comments on commit e065d51

Please sign in to comment.