commit:     303ff4aee96a63094f606ef9a7a9e25a925e3286
Author:     Vladimir Timofeenko <id <AT> vtimofeenko <DOT> com>
AuthorDate: Fri Oct 22 17:49:18 2021 +0000
Commit:     Vladimir Timofeenko <public <AT> vtimofeenko <DOT> com>
CommitDate: Fri Oct 22 17:49:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=303ff4ae

x11-misc/betterlockscreen: added patch to fix path in systemd unit

In the systemd unit upstream the betterlockscreen binary path is
hardcoded to /usr/local .

This commit adds a patch that corrects that path to the one where
betterlocksreen is installed by the ebuild.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Vladimir Timofeenko <id <AT> vtimofeenko.com>

 ...reen-3.2.0.ebuild => betterlockscreen-3.2.0-r1.ebuild} |  2 ++
 ...reen-4.0.3.ebuild => betterlockscreen-4.0.3-r1.ebuild} |  2 ++
 x11-misc/betterlockscreen/betterlockscreen-9999.ebuild    |  2 ++
 .../files/00-fix-betterlockscreen-path-in-unit.patch      | 15 +++++++++++++++
 4 files changed, 21 insertions(+)

diff --git a/x11-misc/betterlockscreen/betterlockscreen-3.2.0.ebuild 
b/x11-misc/betterlockscreen/betterlockscreen-3.2.0-r1.ebuild
similarity index 93%
rename from x11-misc/betterlockscreen/betterlockscreen-3.2.0.ebuild
rename to x11-misc/betterlockscreen/betterlockscreen-3.2.0-r1.ebuild
index be4fa44dd..dc589ee40 100644
--- a/x11-misc/betterlockscreen/betterlockscreen-3.2.0.ebuild
+++ b/x11-misc/betterlockscreen/betterlockscreen-3.2.0-r1.ebuild
@@ -29,6 +29,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/00-fix-betterlockscreen-path-in-unit.patch" )
+
 src_install() {
        dobin betterlockscreen
 

diff --git a/x11-misc/betterlockscreen/betterlockscreen-4.0.3.ebuild 
b/x11-misc/betterlockscreen/betterlockscreen-4.0.3-r1.ebuild
similarity index 93%
rename from x11-misc/betterlockscreen/betterlockscreen-4.0.3.ebuild
rename to x11-misc/betterlockscreen/betterlockscreen-4.0.3-r1.ebuild
index 598ba67c5..1ff676a21 100644
--- a/x11-misc/betterlockscreen/betterlockscreen-4.0.3.ebuild
+++ b/x11-misc/betterlockscreen/betterlockscreen-4.0.3-r1.ebuild
@@ -31,6 +31,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/00-fix-betterlockscreen-path-in-unit.patch" )
+
 src_install() {
        dobin betterlockscreen
 

diff --git a/x11-misc/betterlockscreen/betterlockscreen-9999.ebuild 
b/x11-misc/betterlockscreen/betterlockscreen-9999.ebuild
index 3bbf13b7c..f0c466cc4 100644
--- a/x11-misc/betterlockscreen/betterlockscreen-9999.ebuild
+++ b/x11-misc/betterlockscreen/betterlockscreen-9999.ebuild
@@ -29,6 +29,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/00-fix-betterlockscreen-path-in-unit.patch" )
+
 src_install() {
        dobin betterlockscreen
 

diff --git 
a/x11-misc/betterlockscreen/files/00-fix-betterlockscreen-path-in-unit.patch 
b/x11-misc/betterlockscreen/files/00-fix-betterlockscreen-path-in-unit.patch
new file mode 100644
index 000000000..d98bfd3a7
--- /dev/null
+++ b/x11-misc/betterlockscreen/files/00-fix-betterlockscreen-path-in-unit.patch
@@ -0,0 +1,15 @@
+Original systemd service uses binary in /usr/local/bin which goes
+against Gentoo FS policy
+diff --git a/system/betterlockscreen@.service 
b/system/betterlockscreen@.service
+index b9ad6fb..d0674ab 100644
+--- a/system/betterlockscreen@.service
++++ b/system/betterlockscreen@.service
+@@ -7,7 +7,7 @@ Before=suspend.target
+ User=%I
+ Type=simple
+ Environment=DISPLAY=:0
+-ExecStart=/usr/local/bin/betterlockscreen --lock
++ExecStart=/usr/bin/betterlockscreen --lock
+ TimeoutSec=infinity
+ ExecStartPost=/usr/bin/sleep 1
+

Reply via email to