commit:     137fb07816c4a11feb4f1bc415ddb9bcd1481b61
Author:     Tony Vroon <chainsaw <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 11 13:22:13 2017 +0000
Commit:     Tony Vroon <chainsaw <AT> gentoo <DOT> org>
CommitDate: Mon Sep 11 13:22:13 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=137fb078

app-mobilephone/smstools: Fix bug #603266 & #607470.

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 .../smstools/files/3.1.21-gawk-location.patch      |  9 +++++++++
 app-mobilephone/smstools/files/smsd.initd4         | 23 ++++++++++++++++++++++
 ...ols-3.1.21.ebuild => smstools-3.1.21-r1.ebuild} |  3 ++-
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/app-mobilephone/smstools/files/3.1.21-gawk-location.patch 
b/app-mobilephone/smstools/files/3.1.21-gawk-location.patch
new file mode 100644
index 00000000000..e8070a329b9
--- /dev/null
+++ b/app-mobilephone/smstools/files/3.1.21-gawk-location.patch
@@ -0,0 +1,9 @@
+diff -uNr smstools3.ORIG/scripts/hex2bin smstools3/scripts/hex2bin
+--- smstools3.ORIG/scripts/hex2bin     2017-09-11 14:11:48.040928533 +0100
++++ smstools3/scripts/hex2bin  2017-09-11 14:12:00.925927820 +0100
+@@ -1,4 +1,4 @@
+-#!/bin/gawk -f
++#!/usr/bin/gawk -f
+ 
+ # This script reads a hex-dump and converts it to a binary file.
+ # The hex-dump must contain one or more hexadecimal numbers separated

diff --git a/app-mobilephone/smstools/files/smsd.initd4 
b/app-mobilephone/smstools/files/smsd.initd4
new file mode 100644
index 00000000000..ff40d472896
--- /dev/null
+++ b/app-mobilephone/smstools/files/smsd.initd4
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+       need localmount
+}
+
+start() {
+       checkpath -q -d -m 0770 -o smsd:sms /run/smsd || return 1
+       checkpath -q -f -o smsd:sms /var/log/smsd.log || return 1
+       ebegin "Starting smsd"
+       start-stop-daemon -b -u smsd:sms --start --exec /usr/bin/smsd -- \
+               -c /etc/smsd.conf -p /run/smsd/smsd.pid \
+               -i /run/smsd/smsd.working
+       eend ${?}
+}
+
+stop() {
+       ebegin "Stopping smsd"
+       start-stop-daemon --stop -n smsd
+       eend ${?}
+}

diff --git a/app-mobilephone/smstools/smstools-3.1.21.ebuild 
b/app-mobilephone/smstools/smstools-3.1.21-r1.ebuild
similarity index 94%
rename from app-mobilephone/smstools/smstools-3.1.21.ebuild
rename to app-mobilephone/smstools/smstools-3.1.21-r1.ebuild
index d041d82242a..96dfea8f106 100644
--- a/app-mobilephone/smstools/smstools-3.1.21.ebuild
+++ b/app-mobilephone/smstools/smstools-3.1.21-r1.ebuild
@@ -18,6 +18,7 @@ DEPEND=""
 RDEPEND="sys-process/procps
        stats? ( >=dev-libs/mm-1.4.0 )"
 
+PATCHES="${FILESDIR}/${PV}-gawk-location.patch"
 S="${WORKDIR}/${PN}3"
 
 pkg_setup() {
@@ -57,7 +58,7 @@ src_install() {
        fowners -R smsd:sms /var/spool/sms
        fperms g+s /var/spool/sms/incoming
 
-       newinitd "${FILESDIR}"/smsd.initd3 smsd
+       newinitd "${FILESDIR}"/smsd.initd4 smsd
        insopts -o smsd -g sms -m0644
        insinto /etc
        newins examples/smsd.conf.easy smsd.conf

Reply via email to