Initial import wrt bug #169104
authorWolfram Schlich <wschlich@gentoo.org>
Mon, 5 Mar 2007 22:40:06 +0000 (22:40 +0000)
committerWolfram Schlich <wschlich@gentoo.org>
Mon, 5 Mar 2007 22:40:06 +0000 (22:40 +0000)
Package-Manager: portage-2.1.2-r12

app-admin/sysrqd/ChangeLog [new file with mode: 0644]
app-admin/sysrqd/Manifest [new file with mode: 0644]
app-admin/sysrqd/files/digest-sysrqd-9 [new file with mode: 0644]
app-admin/sysrqd/files/sysrqd-9-config.patch [new file with mode: 0644]
app-admin/sysrqd/files/sysrqd.init [new file with mode: 0755]
app-admin/sysrqd/metadata.xml [new file with mode: 0644]
app-admin/sysrqd/sysrqd-9.ebuild [new file with mode: 0644]

diff --git a/app-admin/sysrqd/ChangeLog b/app-admin/sysrqd/ChangeLog
new file mode 100644 (file)
index 0000000..fcfd115
--- /dev/null
@@ -0,0 +1,11 @@
+# ChangeLog for app-admin/sysrqd
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysrqd/ChangeLog,v 1.1 2007/03/05 22:40:06 wschlich Exp $
+
+*sysrqd-9 (05 Mar 2007)
+
+  05 Mar 2007; Wolfram Schlich <wschlich@gentoo.org>
+  +files/sysrqd-9-config.patch, +files/sysrqd.init, +metadata.xml,
+  +sysrqd-9.ebuild:
+  Initial import wrt bug #169104
+
diff --git a/app-admin/sysrqd/Manifest b/app-admin/sysrqd/Manifest
new file mode 100644 (file)
index 0000000..0b834a3
--- /dev/null
@@ -0,0 +1,24 @@
+AUX sysrqd-9-config.patch 561 RMD160 dda44448863418331a2e6aaa4a480e8e92513c59 SHA1 ef9aa8754533000cbb7da19cfd80e038f9f4e777 SHA256 01ebb5cbfccb2ef1adda37f3416e88b10d01a9ed864facabb31b5fd2a95ce28f
+MD5 35e330d72bc6ee5c264581f92a80b39e files/sysrqd-9-config.patch 561
+RMD160 dda44448863418331a2e6aaa4a480e8e92513c59 files/sysrqd-9-config.patch 561
+SHA256 01ebb5cbfccb2ef1adda37f3416e88b10d01a9ed864facabb31b5fd2a95ce28f files/sysrqd-9-config.patch 561
+AUX sysrqd.init 810 RMD160 6407d00ee03b25bed81a68705dbb0c38ee00580d SHA1 302a74a74f30a0b3d095dee63582c00aa0b488ee SHA256 66f1b163eee66641d2d06e3c4b3e7fb7ae7b33f3e8beb64c2d20506146757d9b
+MD5 4935df6ff0a62b940f3650b0b0b68e97 files/sysrqd.init 810
+RMD160 6407d00ee03b25bed81a68705dbb0c38ee00580d files/sysrqd.init 810
+SHA256 66f1b163eee66641d2d06e3c4b3e7fb7ae7b33f3e8beb64c2d20506146757d9b files/sysrqd.init 810
+DIST sysrqd-9.tar.gz 4188 RMD160 efad126dd4a3e64df077bedb9dedac0189a983af SHA1 55b1067e856ee4dd058ee721bc85907e740ff9eb SHA256 836723b6001a33e3b5684dca20ba7734732c337d21ba3b6a481a0304642e81e4
+EBUILD sysrqd-9.ebuild 1435 RMD160 d9765ffc5b4f420cb0147e66d0149e9cf773c764 SHA1 62908a79eb484b6f05967ffcf13ee2998ad1c837 SHA256 a1a59a0befa5d8c2df3492f9137fd4a25d4ee992baa6bea6b85507c97e84d216
+MD5 f8eb816d70f42532d9d16c2f14a0abf5 sysrqd-9.ebuild 1435
+RMD160 d9765ffc5b4f420cb0147e66d0149e9cf773c764 sysrqd-9.ebuild 1435
+SHA256 a1a59a0befa5d8c2df3492f9137fd4a25d4ee992baa6bea6b85507c97e84d216 sysrqd-9.ebuild 1435
+MISC ChangeLog 406 RMD160 6041c5bab714637dccc75c3217830fcb1ec85e50 SHA1 8caa82d8e2a871d74a63fc8a89265683f7ef7f2f SHA256 a05cacc50cf5af8945ca2c2d8d5171fcb2425695073c49e82788150eb8d340f8
+MD5 cf6e8a4b4cc91d1ba998641cdf53fd0f ChangeLog 406
+RMD160 6041c5bab714637dccc75c3217830fcb1ec85e50 ChangeLog 406
+SHA256 a05cacc50cf5af8945ca2c2d8d5171fcb2425695073c49e82788150eb8d340f8 ChangeLog 406
+MISC metadata.xml 538 RMD160 920d790ec42de53798cdc10a55ddeecb0635e85c SHA1 33fcfe1e3791ab26f364fea629c6ec42324277d9 SHA256 d03810a1941a72ff902f282a8fa76065ad9b13b0213ac3e52cb9eb64be2df105
+MD5 d5e3feba57346352e821111c8ed605d7 metadata.xml 538
+RMD160 920d790ec42de53798cdc10a55ddeecb0635e85c metadata.xml 538
+SHA256 d03810a1941a72ff902f282a8fa76065ad9b13b0213ac3e52cb9eb64be2df105 metadata.xml 538
+MD5 91a1536fe4fa193c062ad211b46f6555 files/digest-sysrqd-9 220
+RMD160 5d27f5f6b9d322f3651b9e1944cecb41d4068eb6 files/digest-sysrqd-9 220
+SHA256 21da79a08e51a6f57947a443fa39333d05f63aa126b7a8a2a46a8017201eded4 files/digest-sysrqd-9 220
diff --git a/app-admin/sysrqd/files/digest-sysrqd-9 b/app-admin/sysrqd/files/digest-sysrqd-9
new file mode 100644 (file)
index 0000000..1aeffc0
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 907961ddad7ab58ed782516dbdd6691c sysrqd-9.tar.gz 4188
+RMD160 efad126dd4a3e64df077bedb9dedac0189a983af sysrqd-9.tar.gz 4188
+SHA256 836723b6001a33e3b5684dca20ba7734732c337d21ba3b6a481a0304642e81e4 sysrqd-9.tar.gz 4188
diff --git a/app-admin/sysrqd/files/sysrqd-9-config.patch b/app-admin/sysrqd/files/sysrqd-9-config.patch
new file mode 100644 (file)
index 0000000..5f368ae
--- /dev/null
@@ -0,0 +1,14 @@
+diff -urN sysrqd-9.orig/sysrqd.h sysrqd-9/sysrqd.h
+--- sysrqd-9.orig/sysrqd.h     2007-01-19 15:33:26.000000000 +0100
++++ sysrqd-9/sysrqd.h  2007-03-05 21:22:44.000000000 +0100
+@@ -4,8 +4,8 @@
+ #define BIND_MAX_LEN 16
+ #define PROMPT "sysrq> "
+ #define SYSRQ_TRIGGER_PATH "/proc/sysrq-trigger"
+-#define AUTH_FILE "/etc/sysrqd.secret"
+-#define BINDIP_FILE "/etc/sysrqd.bind"
++#define AUTH_FILE "/etc/sysrqd/sysrqd.secret"
++#define BINDIP_FILE "/etc/sysrqd/sysrqd.bind"
+ #define PID_FILE "/var/run/sysrqd.pid"
+ #define SYSRQD_PRIO -19
+ #define SYSRQD_LISTEN_PORT 4094
diff --git a/app-admin/sysrqd/files/sysrqd.init b/app-admin/sysrqd/files/sysrqd.init
new file mode 100755 (executable)
index 0000000..5150cff
--- /dev/null
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysrqd/files/sysrqd.init,v 1.1 2007/03/05 22:40:06 wschlich Exp $
+
+depend() {
+       need net
+}
+
+checkconfig() {
+       sysrqd_secret=/etc/sysrqd/sysrqd.secret
+       sysrqd_pidfile=/var/run/sysrqd.pid
+       if [ ! -e ${sysrqd_secret} ]; then
+               eerror "You need a '${sysrqd_secret}' containing a secret/password!"
+               eerror "Refusing to start."
+               return 1
+       fi
+}
+
+start() {
+       checkconfig || return 1
+       ebegin "Starting ${SVCNAME}"
+       start-stop-daemon --start --pidfile ${sysrqd_pidfile} --quiet --exec /usr/sbin/sysrqd
+       eend $?
+}
+
+stop() {
+       checkconfig || return 1
+       ebegin "Stopping ${SVCNAME}"
+       start-stop-daemon --stop --quiet --pidfile ${sysrqd_pidfile}
+       eend $?
+}
diff --git a/app-admin/sysrqd/metadata.xml b/app-admin/sysrqd/metadata.xml
new file mode 100644 (file)
index 0000000..b66b907
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+       <email>wschlich@gentoo.org</email>
+       <name>Wolfram Schlich</name>
+       <description>Primary maintainer</description>
+</maintainer>
+<longdescription>
+sysrqd is a small daemon intended to manage Linux Sysrq over network.
+Its philosophy is to be very responsive under heavy load and try to
+be somehow reliable. Authentication is made by clear password.
+</longdescription>
+</pkgmetadata>
diff --git a/app-admin/sysrqd/sysrqd-9.ebuild b/app-admin/sysrqd/sysrqd-9.ebuild
new file mode 100644 (file)
index 0000000..459a3aa
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysrqd/sysrqd-9.ebuild,v 1.1 2007/03/05 22:40:06 wschlich Exp $
+
+inherit eutils toolchain-funcs
+
+IUSE=""
+DESCRIPTION="daemon providing access to the kernel sysrq functions via network"
+HOMEPAGE="http://julien.danjou.info/sysrqd.html"
+SRC_URI="http://julien.danjou.info/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+DEPEND=""
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       epatch ${FILESDIR}/${P}-config.patch
+}
+
+src_compile() {
+       $(tc-getCC) ${CFLAGS} -o sysrqd sysrqd.c
+}
+
+src_install() {
+
+       dosbin sysrqd
+       newinitd ${FILESDIR}/sysrqd.init sysrqd
+
+       local bindip='127.0.0.1' secret
+       declare -i secret
+       let secret=${RANDOM}*${RANDOM}*${RANDOM}*${RANDOM}
+       echo ${bindip} > sysrqd.bind
+       echo ${secret} > sysrqd.secret
+
+       diropts -m 0700 -o root -g root
+       dodir /etc/sysrqd
+       insinto /etc/sysrqd
+       insopts -m 0600 -o root -g root
+       doins sysrqd.bind
+       doins sysrqd.secret
+
+       dodoc README ChangeLog
+}
+
+pkg_postinst() {
+       einfo
+       einfo "Be sure to change the initial secret in /etc/sysrqd/sysrqd.secret !"
+       einfo "As a security precaution, sysrqd is configured to only listen on"
+       einfo "127.0.0.1 by default. Change the content of /etc/sysrqd/sysrqd.bind"
+       einfo "to an IPv4 address you want it to listen on or remove the file"
+       einfo "to make it listen on any IP address (0.0.0.0)."
+       einfo
+}