Add sendpage user. Although the daemon starts as root it is willing to spawn unprivil...
authorTony Vroon <chainsaw@gentoo.org>
Thu, 15 Jun 2006 13:26:40 +0000 (13:26 +0000)
committerTony Vroon <chainsaw@gentoo.org>
Thu, 15 Jun 2006 13:26:40 +0000 (13:26 +0000)
Package-Manager: portage-2.1

net-dialup/sendpage/ChangeLog
net-dialup/sendpage/files/digest-sendpage-1.1.0-r1 [new file with mode: 0644]
net-dialup/sendpage/files/sendpage.initd
net-dialup/sendpage/sendpage-1.1.0-r1.ebuild [new file with mode: 0644]

index bfc6c084bc57fa9fa2f3e363e6286ce3da3c2340..a88c134159b94adaeb002c3fbe1d093a57498c19 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for net-dialup/sendpage
 # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/sendpage/ChangeLog,v 1.6 2006/06/14 16:52:08 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/sendpage/ChangeLog,v 1.7 2006/06/15 13:26:40 chainsaw Exp $
+
+*sendpage-1.1.0-r1 (15 Jun 2006)
+
+  15 Jun 2006; Tony Vroon <chainsaw@gentoo.org> files/sendpage.initd,
+  -sendpage-1.1.0.ebuild, +sendpage-1.1.0-r1.ebuild:
+  Add sendpage user. Although the daemon starts as root it is willing to spawn
+  unprivileged children. Touch up initscript so it properly terminates all
+  subprocesses in this situation.
 
   14 Jun 2006; Tony Vroon <chainsaw@gentoo.org> +files/1.1.0-makefile.patch,
   +files/sendpage.initd, +sendpage-1.1.0.ebuild:
diff --git a/net-dialup/sendpage/files/digest-sendpage-1.1.0-r1 b/net-dialup/sendpage/files/digest-sendpage-1.1.0-r1
new file mode 100644 (file)
index 0000000..846ab9d
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 7ca49276f010ea26053bfb07874f38e2 sendpage-1.001.tar.gz 127130
+RMD160 26a9fb7fa30a26deea32dc41ed4022ad689ffbc5 sendpage-1.001.tar.gz 127130
+SHA256 2f2d8253b3f94fd3915ae7568a87e1263c416066f2cce7923b6dd3d2d5dc2b0c sendpage-1.001.tar.gz 127130
index 418cdbb625bc402336074bf3d7a25a05ff056a94..a9ba1712d5ae376b813fd23d8b87617b0d39c840 100644 (file)
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/sendpage/files/sendpage.initd,v 1.1 2006/06/14 16:52:08 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/sendpage/files/sendpage.initd,v 1.2 2006/06/15 13:26:40 chainsaw Exp $
 
 depend() {
         need localmount
@@ -9,14 +9,13 @@ depend() {
 
 start() {
         ebegin "Starting sendpage"
-        start-stop-daemon --start --exec /usr/bin/sendpage -- \
-                -bd
+        start-stop-daemon --start --exec /usr/bin/sendpage -- -bd
         eend ${?}
 }
 
 stop() {
         ebegin "Stopping sendpage"
-        start-stop-daemon --stop -p /var/run/sendpage.pid
+        start-stop-daemon --stop -n sendpage
         eend ${?}
 }
 
diff --git a/net-dialup/sendpage/sendpage-1.1.0-r1.ebuild b/net-dialup/sendpage/sendpage-1.1.0-r1.ebuild
new file mode 100644 (file)
index 0000000..e64fb46
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/sendpage/sendpage-1.1.0-r1.ebuild,v 1.1 2006/06/15 13:26:40 chainsaw Exp $
+
+inherit perl-module eutils
+
+MY_P=${PN}-1.001
+DESCRIPTION="Dialup alphapaging software."
+HOMEPAGE="http://www.sendpage.org/"
+SRC_URI="http://www.sendpage.org/download/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=">=dev-perl/Device-SerialPort-0.13
+       >=dev-perl/MailTools-1.44
+       >=virtual/perl-libnet-1.11
+       >=dev-perl/Net-SNPP-1.13
+       dev-perl/DBI"
+
+mydoc="FEATURES THANKS TODO email2page.conf sendpage.cf snpp.conf docs/*"
+
+pkg_setup() {
+       enewgroup sms
+       enewuser sendpage -1 -1 /var/spool/sendpage sms
+}
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       epatch ${FILESDIR}/${PV}-makefile.patch
+}
+
+src_install() {
+       perl-module_src_install
+       insinto /etc
+       doins sendpage.cf
+       newinitd ${FILESDIR}/sendpage.initd sendpage
+       diropts -o sendpage -g sms -m0770
+       keepdir /var/spool/sendpage
+}
+
+pkg_preinst() {
+       pkg_setup
+}