Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] ulogd: fix logrotate file
@ 2021-10-31 12:50 amak79
  2021-10-31 13:00 ` amak79
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: amak79 @ 2021-10-31 12:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1801 bytes --]

There is a new pull request by amak79 against master on the void-packages repository

https://github.com/amak79/void-packages ulogd
https://github.com/void-linux/void-packages/pull/33847

ulogd: fix logrotate file
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

The logrotate file is configured to rotate `/var/log/ulog.log` and `/var/log/ulog.pcap`, but the default `/etc/ulogd.conf` is configured for `/var/log/ulogd.log` and `/var/log/ulogd.pcap` so nothing will get rotated.

A patch file from https://github.com/void-linux/void-packages/pull/33847.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ulogd-33847.patch --]
[-- Type: text/x-diff, Size: 1048 bytes --]

From 55260d9ba7706b96e72a0252498babaea867fc10 Mon Sep 17 00:00:00 2001
From: amak <amak.git@outlook.com>
Date: Sun, 31 Oct 2021 23:27:44 +1100
Subject: [PATCH] ulogd: fix logrotate file

---
 srcpkgs/ulogd/files/ulogd.logrotate | 2 +-
 srcpkgs/ulogd/template              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ulogd/files/ulogd.logrotate b/srcpkgs/ulogd/files/ulogd.logrotate
index c50479d92cfb..ea10b772743d 100644
--- a/srcpkgs/ulogd/files/ulogd.logrotate
+++ b/srcpkgs/ulogd/files/ulogd.logrotate
@@ -1,4 +1,4 @@
-/var/log/ulog.log /var/log/ulog.pcap {
+/var/log/ulogd.log /var/log/ulogd.pcap {
     missingok
     compress
     sharedscripts
diff --git a/srcpkgs/ulogd/template b/srcpkgs/ulogd/template
index 55e9ae34a0e1..d456f896f540 100644
--- a/srcpkgs/ulogd/template
+++ b/srcpkgs/ulogd/template
@@ -1,7 +1,7 @@
 # Template file for 'ulogd'
 pkgname=ulogd
 version=2.0.7
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--sbindir=/usr/bin"
 hostmakedepends="pkg-config automake"

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
@ 2021-10-31 13:00 ` amak79
  2021-10-31 13:09 ` amak79
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-10-31 13:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

New comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-955696146

Comment:
Please hold the merge. The template also needs to have `conf_files` set.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
  2021-10-31 13:00 ` amak79
@ 2021-10-31 13:09 ` amak79
  2021-10-31 13:09 ` [PR PATCH] [Updated] " amak79
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-10-31 13:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

New comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-955696146

Comment:
Please hold the merge. The template also needs to have `conf_files` set.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] ulogd: fix logrotate file
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
  2021-10-31 13:00 ` amak79
  2021-10-31 13:09 ` amak79
@ 2021-10-31 13:09 ` amak79
  2021-10-31 23:03 ` [PR REVIEW] ulogd: fix logrotate file, add conf_files ericonr
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-10-31 13:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]

There is an updated pull request by amak79 against master on the void-packages repository

https://github.com/amak79/void-packages ulogd
https://github.com/void-linux/void-packages/pull/33847

ulogd: fix logrotate file
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

The logrotate file is configured to rotate `/var/log/ulog.log` and `/var/log/ulog.pcap`, but the default `/etc/ulogd.conf` is configured for `/var/log/ulogd.log` and `/var/log/ulogd.pcap` so nothing will get rotated.

A patch file from https://github.com/void-linux/void-packages/pull/33847.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ulogd-33847.patch --]
[-- Type: text/x-diff, Size: 1235 bytes --]

From 940e750a71f9396c945dbd306529e029bfbb5319 Mon Sep 17 00:00:00 2001
From: amak <amak.git@outlook.com>
Date: Sun, 31 Oct 2021 23:27:44 +1100
Subject: [PATCH] ulogd: fix logrotate file, add conf_files

---
 srcpkgs/ulogd/files/ulogd.logrotate | 2 +-
 srcpkgs/ulogd/template              | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ulogd/files/ulogd.logrotate b/srcpkgs/ulogd/files/ulogd.logrotate
index c50479d92cfb..ea10b772743d 100644
--- a/srcpkgs/ulogd/files/ulogd.logrotate
+++ b/srcpkgs/ulogd/files/ulogd.logrotate
@@ -1,4 +1,4 @@
-/var/log/ulog.log /var/log/ulog.pcap {
+/var/log/ulogd.log /var/log/ulogd.pcap {
     missingok
     compress
     sharedscripts
diff --git a/srcpkgs/ulogd/template b/srcpkgs/ulogd/template
index 55e9ae34a0e1..430006c3e917 100644
--- a/srcpkgs/ulogd/template
+++ b/srcpkgs/ulogd/template
@@ -1,9 +1,10 @@
 # Template file for 'ulogd'
 pkgname=ulogd
 version=2.0.7
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--sbindir=/usr/bin"
+conf_files="/etc/ulogd.conf"
 hostmakedepends="pkg-config automake"
 makedepends="libnfnetlink-devel libmnl-devel libnetfilter_log-devel
  libnetfilter_conntrack-devel libnetfilter_acct-devel libpcap-devel"

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (2 preceding siblings ...)
  2021-10-31 13:09 ` [PR PATCH] [Updated] " amak79
@ 2021-10-31 23:03 ` ericonr
  2021-10-31 23:12 ` [PR PATCH] [Updated] " amak79
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ericonr @ 2021-10-31 23:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#discussion_r739889103

Comment:
Shouldn't the logrotate file also be a conf one?

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (3 preceding siblings ...)
  2021-10-31 23:03 ` [PR REVIEW] ulogd: fix logrotate file, add conf_files ericonr
@ 2021-10-31 23:12 ` amak79
  2021-10-31 23:15 ` [PR REVIEW] " amak79
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-10-31 23:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]

There is an updated pull request by amak79 against master on the void-packages repository

https://github.com/amak79/void-packages ulogd
https://github.com/void-linux/void-packages/pull/33847

ulogd: fix logrotate file, add conf_files
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

The logrotate file is configured to rotate `/var/log/ulog.log` and `/var/log/ulog.pcap`, but the default `/etc/ulogd.conf` is configured for `/var/log/ulogd.log` and `/var/log/ulogd.pcap` so nothing will get rotated.

A patch file from https://github.com/void-linux/void-packages/pull/33847.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ulogd-33847.patch --]
[-- Type: text/x-diff, Size: 1258 bytes --]

From 435591dc5473a4b7112a5c0612405b7189a75281 Mon Sep 17 00:00:00 2001
From: amak <amak.git@outlook.com>
Date: Sun, 31 Oct 2021 23:27:44 +1100
Subject: [PATCH] ulogd: fix logrotate file, add conf_files

---
 srcpkgs/ulogd/files/ulogd.logrotate | 2 +-
 srcpkgs/ulogd/template              | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ulogd/files/ulogd.logrotate b/srcpkgs/ulogd/files/ulogd.logrotate
index c50479d92cfb..ea10b772743d 100644
--- a/srcpkgs/ulogd/files/ulogd.logrotate
+++ b/srcpkgs/ulogd/files/ulogd.logrotate
@@ -1,4 +1,4 @@
-/var/log/ulog.log /var/log/ulog.pcap {
+/var/log/ulogd.log /var/log/ulogd.pcap {
     missingok
     compress
     sharedscripts
diff --git a/srcpkgs/ulogd/template b/srcpkgs/ulogd/template
index 55e9ae34a0e1..fdb79a570c8b 100644
--- a/srcpkgs/ulogd/template
+++ b/srcpkgs/ulogd/template
@@ -1,9 +1,10 @@
 # Template file for 'ulogd'
 pkgname=ulogd
 version=2.0.7
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--sbindir=/usr/bin"
+conf_files="/etc/ulogd.conf /etc/logrotate.d/ulogd"
 hostmakedepends="pkg-config automake"
 makedepends="libnfnetlink-devel libmnl-devel libnetfilter_log-devel
  libnetfilter_conntrack-devel libnetfilter_acct-devel libpcap-devel"

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (4 preceding siblings ...)
  2021-10-31 23:12 ` [PR PATCH] [Updated] " amak79
@ 2021-10-31 23:15 ` amak79
  2021-11-01  0:45 ` amak79
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-10-31 23:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New review comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#discussion_r739890504

Comment:
Added the logrotate file as well. Thanks.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (5 preceding siblings ...)
  2021-10-31 23:15 ` [PR REVIEW] " amak79
@ 2021-11-01  0:45 ` amak79
  2021-11-01  3:12 ` ericonr
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-01  0:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

New comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-955828695

Comment:
I noticed when ulogd is started for the first time, `/var/log/ulogd.log` is created with `root:root` ownership and `644` mode. When the log file is rotated, a new log file is created with `_ulogd:adm` ownership and `640` mode as expected. After 4 rotations the ownership and mode will be same for all log files.

Should we make the initial and rotated log files have the same ownership and mode? My concern is that the initial log file is world readable. I fixed it by manually changing the ownership and mode to that of the rotated log files.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (6 preceding siblings ...)
  2021-11-01  0:45 ` amak79
@ 2021-11-01  3:12 ` ericonr
  2021-11-01  6:13 ` CameronNemo
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ericonr @ 2021-11-01  3:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-955890648

Comment:
@CameronNemo thoughts?

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (7 preceding siblings ...)
  2021-11-01  3:12 ` ericonr
@ 2021-11-01  6:13 ` CameronNemo
  2021-11-02  2:37 ` amak79
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: CameronNemo @ 2021-11-01  6:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-955962671

Comment:
>Should we make the initial and rotated log files have the same ownership and mode?

That sounds like a nice improvement. Options for how include doing it in the runit service or the package INSTALL script.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (8 preceding siblings ...)
  2021-11-01  6:13 ` CameronNemo
@ 2021-11-02  2:37 ` amak79
  2021-11-02  3:57 ` amak79
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-02  2:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

New comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-957045521

Comment:
> Options for how include doing it in the runit service or the package INSTALL script.

If we use the runit or INSTALL script to create the log files, there will be log files such as `/var/log/ulogd.pcap` that will be created even though they may not be used. There are also other log files specified in `/etc/ulogd.conf` which will be left with incorrect ownership/permissions if enabled.

How about instead we move the logs to `/var/log/ulogd/` and set the ownership to `root:root` and mode to `750` to restrict access? This will require modification of `/etc/ulogd.conf`. The logrotate directive `create 640 _ulogd adm` can be removed and the log files will be owned by `root:root`. The logrotate file can then be configured to rotate every file `/var/log/ulogd/`.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (9 preceding siblings ...)
  2021-11-02  2:37 ` amak79
@ 2021-11-02  3:57 ` amak79
  2021-11-02  4:02 ` amak79
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-02  3:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]

New comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-957045521

Comment:
> Options for how include doing it in the runit service or the package INSTALL script.

If we use the runit or INSTALL script to create the log files, there will be log files such as `/var/log/ulogd.pcap` that will be created even though they may not be used. There are also other log files specified in `/etc/ulogd.conf` which will be left with incorrect ownership/permissions if enabled.

How about instead we move the logs to `/var/log/ulogd/` and set the ownership to `root:root` or `root:adm` and mode to `750` to restrict access? This will require modification of `/etc/ulogd.conf`. The logrotate directive `create 640 _ulogd adm` can be removed and the log files will be owned by `root:root`. The logrotate file can then be configured to rotate every file `/var/log/ulogd/`.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (10 preceding siblings ...)
  2021-11-02  3:57 ` amak79
@ 2021-11-02  4:02 ` amak79
  2021-11-02  4:15 ` [PR PATCH] [Updated] " amak79
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-02  4:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

New comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-957045521

Comment:
> Options for how include doing it in the runit service or the package INSTALL script.

If we use the runit or INSTALL script to create the log files, there will be log files such as `/var/log/ulogd.pcap` that will be created even though they may not be used. There are also other log files specified in `/etc/ulogd.conf` which will be left with incorrect ownership/permissions if enabled.

How about instead we move the logs to `/var/log/ulogd/` and set the ownership to `root:root` or `root:adm` and mode to `750` to restrict access? This will require modification of `/etc/ulogd.conf`. The logrotate directive `create 640 _ulogd adm` can be removed and the log files will be owned by `root:root` with `644` mode. The logrotate file can then be configured to rotate every file `/var/log/ulogd/`.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (11 preceding siblings ...)
  2021-11-02  4:02 ` amak79
@ 2021-11-02  4:15 ` amak79
  2021-11-02  4:21 ` amak79
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-02  4:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]

There is an updated pull request by amak79 against master on the void-packages repository

https://github.com/amak79/void-packages ulogd
https://github.com/void-linux/void-packages/pull/33847

ulogd: fix logrotate file, add conf_files
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

The logrotate file is configured to rotate `/var/log/ulog.log` and `/var/log/ulog.pcap`, but the default `/etc/ulogd.conf` is configured for `/var/log/ulogd.log` and `/var/log/ulogd.pcap` so nothing will get rotated.

A patch file from https://github.com/void-linux/void-packages/pull/33847.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ulogd-33847.patch --]
[-- Type: text/x-diff, Size: 1793 bytes --]

From bac6394fc769c19e06e8671974bdca5da0773a7a Mon Sep 17 00:00:00 2001
From: amak <amak.git@outlook.com>
Date: Sun, 31 Oct 2021 23:27:44 +1100
Subject: [PATCH] ulogd: move logs to subdir, update logrotate file, add
 conf_files

---
 srcpkgs/ulogd/files/ulogd.logrotate | 8 ++++----
 srcpkgs/ulogd/template              | 8 ++++++--
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/ulogd/files/ulogd.logrotate b/srcpkgs/ulogd/files/ulogd.logrotate
index c50479d92cfb..d403a26b1605 100644
--- a/srcpkgs/ulogd/files/ulogd.logrotate
+++ b/srcpkgs/ulogd/files/ulogd.logrotate
@@ -1,9 +1,9 @@
-/var/log/ulog.log /var/log/ulog.pcap {
-    missingok
+/var/log/ulogd/* {
     compress
+    missingok
+    notifempty
     sharedscripts
-    create 640 _ulogd adm
     postrotate
-	sv hup ulogd
+        sv hup ulogd
     endscript
 }
diff --git a/srcpkgs/ulogd/template b/srcpkgs/ulogd/template
index 55e9ae34a0e1..e3e37330dabc 100644
--- a/srcpkgs/ulogd/template
+++ b/srcpkgs/ulogd/template
@@ -1,7 +1,7 @@
 # Template file for 'ulogd'
 pkgname=ulogd
 version=2.0.7
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--sbindir=/usr/bin"
 hostmakedepends="pkg-config automake"
@@ -13,10 +13,14 @@ license="GPL-2.0-only"
 homepage="http://www.netfilter.org/projects/ulogd/"
 distfiles="${homepage}/files/${pkgname}-${version}.tar.bz2"
 checksum=990a05494d9c16029ba0a83f3b7294fc05c756546b8d60d1c1572dc25249a92b
-CFLAGS="-D_GNU_SOURCE"
+conf_files="/etc/ulogd.conf /etc/logrotate.d/ulogd"
+make_dirs="/var/log/ulogd 0750 root adm"
 system_accounts="_ulogd"
 
+CFLAGS="-D_GNU_SOURCE"
+
 post_install() {
+	vsed -i -e "s:/var/log:/var/log/ulogd:g" ulogd.conf
 	vinstall ulogd.conf 644 etc
 	vinstall ${FILESDIR}/ulogd.logrotate 644 etc/logrotate.d ulogd
 	vsv ulogd

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: fix logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (12 preceding siblings ...)
  2021-11-02  4:15 ` [PR PATCH] [Updated] " amak79
@ 2021-11-02  4:21 ` amak79
  2021-11-03  2:26 ` [PR REVIEW] ulogd: move logs to subdir, update " CameronNemo
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-02  4:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

New comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-957090113

Comment:
I've updated the PR according to my proposal. Please review.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (13 preceding siblings ...)
  2021-11-02  4:21 ` amak79
@ 2021-11-03  2:26 ` CameronNemo
  2021-11-03  2:26 ` CameronNemo
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: CameronNemo @ 2021-11-03  2:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

New review comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#discussion_r741578931

Comment:
Please use a more exact wildcard or set of wildcards. E.g. `/var/log/ulogd/*.log /var/log/ulogd/*.pcap`. See below:

>       Please use wildcards with caution.  If you specify *, logrotate will rotate all files, including previously rotated ones.  A way around this is to use the olddir directive or a more exact wildcard (such as    *.log).

https://man.voidlinux.org/logrotate.8


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (14 preceding siblings ...)
  2021-11-03  2:26 ` [PR REVIEW] ulogd: move logs to subdir, update " CameronNemo
@ 2021-11-03  2:26 ` CameronNemo
  2021-11-03  2:26 ` CameronNemo
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: CameronNemo @ 2021-11-03  2:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

New review comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#discussion_r741578959

Comment:
Can we make the directory setgid (2750 instead of 0750)?

>if a directory’s set-group-ID bit is set, newly created subfiles inherit the same group as the directory, and newly created subdirectories inherit the set-group-ID bit of the parent directory

https://www.gnu.org/software/coreutils/manual/html_node/Directory-Setuid-and-Setgid.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (15 preceding siblings ...)
  2021-11-03  2:26 ` CameronNemo
@ 2021-11-03  2:26 ` CameronNemo
  2021-11-03  2:27 ` CameronNemo
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: CameronNemo @ 2021-11-03  2:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New review comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#discussion_r741579266

Comment:
not sure what happened here, but please try to match tabs/spaces.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (16 preceding siblings ...)
  2021-11-03  2:26 ` CameronNemo
@ 2021-11-03  2:27 ` CameronNemo
  2021-11-03  2:50 ` [PR PATCH] [Updated] " amak79
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: CameronNemo @ 2021-11-03  2:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

New review comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#discussion_r741578931

Comment:
Please use a more exact wildcard or set of wildcards. E.g. `/var/log/ulogd/*.log /var/log/ulogd/*.pcap`. See below:

> Please use wildcards with caution.  If you specify *, logrotate will rotate all files, including previously rotated ones.  A way around this is to use the olddir directive or a more exact wildcard (such as    *.log).

https://man.voidlinux.org/logrotate.8


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Updated] ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (17 preceding siblings ...)
  2021-11-03  2:27 ` CameronNemo
@ 2021-11-03  2:50 ` amak79
  2021-11-03  2:56 ` [PR REVIEW] " amak79
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-03  2:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1846 bytes --]

There is an updated pull request by amak79 against master on the void-packages repository

https://github.com/amak79/void-packages ulogd
https://github.com/void-linux/void-packages/pull/33847

ulogd: move logs to subdir, update logrotate file, add conf_files
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

The logrotate file is configured to rotate `/var/log/ulog.log` and `/var/log/ulog.pcap`, but the default `/etc/ulogd.conf` is configured for `/var/log/ulogd.log` and `/var/log/ulogd.pcap` so nothing will get rotated.

A patch file from https://github.com/void-linux/void-packages/pull/33847.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ulogd-33847.patch --]
[-- Type: text/x-diff, Size: 1791 bytes --]

From 406f43d37b1a6bf9f68ece7d4c3143b7afc1db90 Mon Sep 17 00:00:00 2001
From: amak <amak.git@outlook.com>
Date: Sun, 31 Oct 2021 23:27:44 +1100
Subject: [PATCH] ulogd: move logs to subdir, update logrotate file, add
 conf_files

---
 srcpkgs/ulogd/files/ulogd.logrotate | 6 +++---
 srcpkgs/ulogd/template              | 8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/ulogd/files/ulogd.logrotate b/srcpkgs/ulogd/files/ulogd.logrotate
index c50479d92cfb..186a95eb42a3 100644
--- a/srcpkgs/ulogd/files/ulogd.logrotate
+++ b/srcpkgs/ulogd/files/ulogd.logrotate
@@ -1,8 +1,8 @@
-/var/log/ulog.log /var/log/ulog.pcap {
-    missingok
+/var/log/ulogd/*.log /var/log/ulogd/*.pcap {
     compress
+    missingok
+    notifempty
     sharedscripts
-    create 640 _ulogd adm
     postrotate
 	sv hup ulogd
     endscript
diff --git a/srcpkgs/ulogd/template b/srcpkgs/ulogd/template
index 55e9ae34a0e1..633a78c2cfd4 100644
--- a/srcpkgs/ulogd/template
+++ b/srcpkgs/ulogd/template
@@ -1,7 +1,7 @@
 # Template file for 'ulogd'
 pkgname=ulogd
 version=2.0.7
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--sbindir=/usr/bin"
 hostmakedepends="pkg-config automake"
@@ -13,10 +13,14 @@ license="GPL-2.0-only"
 homepage="http://www.netfilter.org/projects/ulogd/"
 distfiles="${homepage}/files/${pkgname}-${version}.tar.bz2"
 checksum=990a05494d9c16029ba0a83f3b7294fc05c756546b8d60d1c1572dc25249a92b
-CFLAGS="-D_GNU_SOURCE"
+conf_files="/etc/ulogd.conf /etc/logrotate.d/ulogd"
+make_dirs="/var/log/ulogd 2750 root adm"
 system_accounts="_ulogd"
 
+CFLAGS="-D_GNU_SOURCE"
+
 post_install() {
+	vsed -i -e "s:/var/log:/var/log/ulogd:g" ulogd.conf
 	vinstall ulogd.conf 644 etc
 	vinstall ${FILESDIR}/ulogd.logrotate 644 etc/logrotate.d ulogd
 	vsv ulogd

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (18 preceding siblings ...)
  2021-11-03  2:50 ` [PR PATCH] [Updated] " amak79
@ 2021-11-03  2:56 ` amak79
  2021-11-03  2:57 ` amak79
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-03  2:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

New review comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#discussion_r741587134

Comment:
Good catch. Thanks.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR REVIEW] ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (19 preceding siblings ...)
  2021-11-03  2:56 ` [PR REVIEW] " amak79
@ 2021-11-03  2:57 ` amak79
  2021-11-03  3:03 ` CameronNemo
  2021-11-14  7:07 ` [PR PATCH] [Merged]: " ericonr
  22 siblings, 0 replies; 24+ messages in thread
From: amak79 @ 2021-11-03  2:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

New review comment by amak79 on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#discussion_r741587390

Comment:
The logrotate file was using spaces and tabs so I changed it to spaces only. I reverted this change.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (20 preceding siblings ...)
  2021-11-03  2:57 ` amak79
@ 2021-11-03  3:03 ` CameronNemo
  2021-11-14  7:07 ` [PR PATCH] [Merged]: " ericonr
  22 siblings, 0 replies; 24+ messages in thread
From: CameronNemo @ 2021-11-03  3:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/33847#issuecomment-958615716

Comment:
Looks good now.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PR PATCH] [Merged]: ulogd: move logs to subdir, update logrotate file, add conf_files
  2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
                   ` (21 preceding siblings ...)
  2021-11-03  3:03 ` CameronNemo
@ 2021-11-14  7:07 ` ericonr
  22 siblings, 0 replies; 24+ messages in thread
From: ericonr @ 2021-11-14  7:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1694 bytes --]

There's a merged pull request on the void-packages repository

ulogd: move logs to subdir, update logrotate file, add conf_files
https://github.com/void-linux/void-packages/pull/33847

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

The logrotate file is configured to rotate `/var/log/ulog.log` and `/var/log/ulog.pcap`, but the default `/etc/ulogd.conf` is configured for `/var/log/ulogd.log` and `/var/log/ulogd.pcap` so nothing will get rotated.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-11-14  7:07 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-31 12:50 [PR PATCH] ulogd: fix logrotate file amak79
2021-10-31 13:00 ` amak79
2021-10-31 13:09 ` amak79
2021-10-31 13:09 ` [PR PATCH] [Updated] " amak79
2021-10-31 23:03 ` [PR REVIEW] ulogd: fix logrotate file, add conf_files ericonr
2021-10-31 23:12 ` [PR PATCH] [Updated] " amak79
2021-10-31 23:15 ` [PR REVIEW] " amak79
2021-11-01  0:45 ` amak79
2021-11-01  3:12 ` ericonr
2021-11-01  6:13 ` CameronNemo
2021-11-02  2:37 ` amak79
2021-11-02  3:57 ` amak79
2021-11-02  4:02 ` amak79
2021-11-02  4:15 ` [PR PATCH] [Updated] " amak79
2021-11-02  4:21 ` amak79
2021-11-03  2:26 ` [PR REVIEW] ulogd: move logs to subdir, update " CameronNemo
2021-11-03  2:26 ` CameronNemo
2021-11-03  2:26 ` CameronNemo
2021-11-03  2:27 ` CameronNemo
2021-11-03  2:50 ` [PR PATCH] [Updated] " amak79
2021-11-03  2:56 ` [PR REVIEW] " amak79
2021-11-03  2:57 ` amak79
2021-11-03  3:03 ` CameronNemo
2021-11-14  7:07 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).