FS#73581 - [rssguard] default to no debug output and provide separate debug enabled desktop file

Attached to Project: Community Packages
Opened by Norbert Preining (npreining) - Tuesday, 01 February 2022, 05:29 GMT
Last edited by Antonio Rojas (arojas) - Monday, 23 January 2023, 07:01 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Antonio Rojas (arojas)
Balló György (City-busz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
rssguard logs all output to the journal, and defaults to debug output.

In my case, every time rssguard syncs there are a few hundred messages like:
```
Feb 01 14:04:00 bulldog rssguard[1551]: time=" 8118.676" type="debug" -> database: Checking if message with service-specific custom ID '14492' is present in DB.
Feb 01 14:04:00 bulldog rssguard[1551]: time=" 8118.676" type="debug" -> database: Message with custom ID '14449' is already present in DB and has DB ID '999'.
```

The rssguard command provides a command line to turn of this logging:
-n, --no-debug-output Completely disable stdout/stderr outputs.

I propose the following approach:
- change the default desktop file to include the above command line option
- provide another desktop file "rssguard-debug" which does not include the option
(same behaviour as of now)


The change can be implemented easily with the following patch to the PKGBUILD:
```
@@ -35,6 +36,11 @@ package_rssguard() {

cd build
make INSTALL_ROOT="$pkgdir" install -j1
+
+ # make default app not swamp the journal, but provide a debug version
+ cp "$pkgdir/usr/share/applications/com.github.rssguard.desktop" "$pkgdir/usr/share/applications/com.github.rssguard-debug.desktop"
+ sed -i -e 's/^Name=RSS Guard/Name=RSS Guard (debug)/' "$pkgdir/usr/share/applications/com.github.rssguard-debug.desktop"
+ sed -i -e 's/^Exec=rssguard/Exec=rssguard --no-debug-output/' "$pkgdir/usr/share/applications/com.github.rssguard.desktop"
}

package_rssguard-nowebengine() {
@@ -49,4 +55,9 @@ package_rssguard-nowebengine() {
# Ignore package by AppStream to avoid duplicated IDs
rm -r "$pkgdir/usr/share/metainfo/"
echo 'X-AppStream-Ignore=true' >> "$pkgdir/usr/share/applications/com.github.rssguard.desktop"
+
+ # make default app not swamp the journal, but provide a debug version
+ cp "$pkgdir/usr/share/applications/com.github.rssguard.desktop" "$pkgdir/usr/share/applications/com.github.rssguard-debug.desktop"
+ sed -i -e 's/^Name=RSS Guard/Name=RSS Guard (debug)/' "$pkgdir/usr/share/applications/com.github.rssguard-debug.desktop"
+ sed -i -e 's/^Exec=rssguard/Exec=rssguard --no-debug-output/' "$pkgdir/usr/share/applications/com.github.rssguard.desktop"
}
```

With this patch, the journal only contains
```
Feb 01 14:27:41 bulldog rssguard[2335038]: time=" 0.120" type="debug" -> core: Disabling any stdout/stderr outputs.
```

Additional info:
* package version(s): 4.1.2 (locally build, most recent version), 4.0.2 (in the archive)
* link to upstream bug report, if any

Upstream issues:
* https://github.com/martinrotter/rssguard/issues/299
closed by author with the remark to turn of Qt debugging
https://wiki.archlinux.org/title/qt#Disable/Change_Qt_journal_logging_behaviour
Comment: this is suboptimal since one might want to actually see debugging output in some cases
and not stop debugging for all Qt applications at once.
* https://github.com/martinrotter/rssguard/issues/359#issuecomment-775753871
upstream specifically wants debug messages to go to stderr, and rejected
the suggestion to make the output of debug message a switch that needs to be turned on.


For your convenience I attach a patch that implements this behavior and at the
same time updates the PKGBUILD to the latest version.

Thanks for your consideration
This task depends upon

Closed by  Antonio Rojas (arojas)
Monday, 23 January 2023, 07:01 GMT
Reason for closing:  Won't implement
Comment by Antonio Rojas (arojas) - Sunday, 22 January 2023, 18:34 GMT
-1 for overriding upstream decisions and tinkering with their provided desktop files
Comment by Norbert Preining (npreining) - Monday, 23 January 2023, 02:05 GMT
Thanks for your comments, fine with me then, feel free to close the issue.
I have a .desktop file locally for my user, and will discuss with upstream.

Loading...