[-]
[+]
|
Changed |
_service:tar_git:harbour-bugger.spec
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-bugger-0.10.5.tar.gz/README_logcollect.md
^
|
@@ -3,6 +3,8 @@
Bugger! provides a systemd Target as well as a Service Template to facilitate
"plug-in" functionality for log gathering.
+### Adding a script to the log collector:
+
In order to add your script to the Bugger! log collector, do the following:
1. create a POSIX shell script which outputs logging to standard output
@@ -15,7 +17,7 @@
dependency on the `harbour-bugger-gather-logs.target` target, which is
called by the app.
-Notes:
+*Notes:*
- Bugger! will run the log creation, but will not add the created log files in
the app. Users will have to select them manually.
@@ -28,10 +30,24 @@
- scripts are run in systemd user scope. You can't be root. If you need to be
root, use `pkexec` to prompt users for the lock code/fingerprint.
-
Of course, you are free to not use the Service Template and just depend on the
Target from any custom systemd services you have written.
If your log collecting script is part of a package, you can depend on
`harbour-bugger-gather-logs` to make sure the infrastructure is installed.
+### Example
+
+A very basig "Hello World" example is in the `contrib` folder and part of the
+`harbour-bugger-gather-logs-contrib` package.
+
+Is places a script in `/usr/share/harbour-bugger/scripts` and can be activated by doing
+
+ systemctl --user enable harbour-bugger-gather-logs-plugin@hello-world.service`
+
+### Submitting scripts
+
+If you would like to add a log collection script to the -contrib package,
+please file a Pull Request, placing the script in the `contrib` directory.
+
+
|
[-]
[+]
|
Added |
_service:tar_git:harbour-bugger-0.10.5.tar.gz/contrib/contrib.pri
^
|
@@ -0,0 +1,4 @@
+INSTALLS += contrib
+
+contrib.files = $$PWD/gather-logs-*.sh
+contrib.path = $$INSTALL_ROOT/usr/share/$${TARGET}/scripts
|
[-]
[+]
|
Added |
_service:tar_git:harbour-bugger-0.10.5.tar.gz/contrib/gather-logs-hello-world.sh
^
|
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+printf '%s sais"\n\tHello World!\n' "$0"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-bugger-0.10.5.tar.gz/harbour-bugger.pro
^
|
@@ -41,5 +41,6 @@
include(translations/translations.pri)
include(systemd/systemd.pri)
+include(contrib/contrib.pri)
include(icons/icons.pri)
include(sailjail/sailjail.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-bugger-0.10.5.tar.gz/qml/pages/MainPage.qml
^
|
@@ -417,7 +417,7 @@
var d = filesModel.get(i)
//links.push('<a href="' + d.pastedUrl + '">' + d.fileName + '</a>')
if (d.title && d.pastedUrl) {
- links.push(' - [' + d.title + '](' + d.pastedUrl + ') ')
+ links.push(' - [' + d.title.trim() + '](' + d.pastedUrl + ') ')
} else if (d.fileName && d.pastedUrl) {
links.push(' - [' + d.fileName + '](' + d.pastedUrl + ') ')
}
|
[-]
[+]
|
Added |
_service:tar_git:harbour-bugger-0.10.5.tar.gz/systemd/harbour-bugger-gather-hybris-logs.service
^
|
@@ -0,0 +1,29 @@
+[Unit]
+Description=Collect hybris logcat file for Bugger!
+
+After=lipstick-security-ui.service
+Requires=lipstick-security-ui.service
+
+# would be nice, but user service can't depend on system service:
+# therefore, we use ExecStartPre below instead
+# After=aliendalvik.service
+# Requisite=aliendalvik.service
+# BindsTo=aliendalvik.service
+
+PartOf=harbour-bugger-gather-logs.target
+
+ConditionPathExists=/usr/libexec/droid-hybris/system/bin/logcat
+
+[Service]
+Type=oneshot
+ProtectSystem=full
+ReadWritePaths=%h/Documents
+ExecStartPre=/bin/sh -c '/usr/bin/systemctl is-active --quiet droid-hal-init.service'
+ExecStart=/usr/bin/pkexec /bin/sh -c "\
+ /usr/libexec/droid-hybris/system/bin/logcat -d > %h/Documents/$(date -I)_%N.log; \
+ /usr/bin/chmod 0600 %h/Documents/$(date -I)_%N.log; \
+ /usr/bin/chown %u %h/Documents/$(date -I)_%N.log; \
+"
+
+[Install]
+WantedBy=harbour-bugger-gather-logs.target
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-bugger-0.10.5.tar.gz/systemd/systemd.pri
^
|
@@ -1,13 +1,16 @@
OTHER_FILES += $${TARGET}-gather-logs.target\
$${TARGET}-gather-logs.service\
- $${TARGET}-gather-logs-plugin@.service \
- $${TARGET}-gather-android-logs.service
+ $${TARGET}-gather-android-logs.service \
+ $${TARGET}-gather-hybris-logs.service \
+ $${TARGET}-gather-logs-plugin@.service
INSTALLS += sdservice
sdservice.files = $$PWD/$${TARGET}-gather-logs.target \
$$PWD/$${TARGET}-gather-logs.service \
- $$PWD/$${TARGET}-gather-logs-plugin@.service \
- $$PWD/$${TARGET}-gather-android-logs.service
+ $$PWD/$${TARGET}-gather-android-logs.service \
+ $$PWD/$${TARGET}-gather-hybris-logs.service \
+ $$PWD/$${TARGET}-gather-logs-plugin@.service
+
sdservice.path = $$INSTALL_ROOT/usr/lib/systemd/user
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-bugger.yaml
^
|
@@ -1,6 +1,6 @@
Name: harbour-bugger
Summary: Bug reporting helper
-Version: 0.10.4
+Version: 0.10.5
Release: 1
Group: Applications
License: ASL 2.0
@@ -100,6 +100,8 @@
BuildArch: noarch
AutoDepend: false
+ Requires:
+ - polkit
RequiresPost:
- systemd
RequiresPreUn:
@@ -111,3 +113,26 @@
- '%{_datadir}/%{name}/scripts/README_logcollect.md'
- '%{_userunitdir}/*.target'
- '%{_userunitdir}/*.service'
+
+ - Name: gather-logs-contrib
+ Version: 0.1
+ Summary: Log gathering contributions for %{name}
+ Group: Applications
+ Description: |
+ %{summary}.
+
+ %if "%{?vendor}" == "chum"
+ PackageName: Log collecting contributions for Bugger!
+ Type: addon
+ Categories:
+ - Utility
+ Custom:
+ Repo: https://github.com/sailfishos-chum/bugger
+ %endif
+
+ Requires:
+ - '%{name}-gather-logs'
+ BuildArch: noarch
+ AutoDepend: false
+ Files:
+ - '%{_datadir}/%{name}/scripts/gather-logs-*.sh'
|