diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/sysrqd | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/sysrqd')
-rw-r--r-- | app-admin/sysrqd/Manifest | 1 | ||||
-rw-r--r-- | app-admin/sysrqd/files/sysrqd-config.patch | 13 | ||||
-rwxr-xr-x | app-admin/sysrqd/files/sysrqd.init | 32 | ||||
-rw-r--r-- | app-admin/sysrqd/metadata.xml | 14 | ||||
-rw-r--r-- | app-admin/sysrqd/sysrqd-14.ebuild | 56 |
5 files changed, 116 insertions, 0 deletions
diff --git a/app-admin/sysrqd/Manifest b/app-admin/sysrqd/Manifest new file mode 100644 index 000000000000..a4912b54877d --- /dev/null +++ b/app-admin/sysrqd/Manifest @@ -0,0 +1 @@ +DIST sysrqd-14.tar.gz 4759 SHA256 aa938dc663b73fb28d165c8145f51b6c2412ccb202e641548452c9583d593428 diff --git a/app-admin/sysrqd/files/sysrqd-config.patch b/app-admin/sysrqd/files/sysrqd-config.patch new file mode 100644 index 000000000000..ce463814d1e3 --- /dev/null +++ b/app-admin/sysrqd/files/sysrqd-config.patch @@ -0,0 +1,13 @@ +--- sysrqd.c.orig 2009-11-05 14:58:21.644471772 +0100 ++++ sysrqd.c 2009-11-05 14:58:43.276472005 +0100 +@@ -40,8 +40,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 index 000000000000..de4885420f88 --- /dev/null +++ b/app-admin/sysrqd/files/sysrqd.init @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 index 000000000000..a1ade138906b --- /dev/null +++ b/app-admin/sysrqd/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<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-14.ebuild b/app-admin/sysrqd/sysrqd-14.ebuild new file mode 100644 index 000000000000..60e050b9349a --- /dev/null +++ b/app-admin/sysrqd/sysrqd-14.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs + +IUSE="" +DESCRIPTION="daemon providing access to the kernel sysrq functions via network" +HOMEPAGE="http://julien.danjou.info/projects/sysrqd" +#SRC_URI="http://julien.danjou.info/${PN}/${P}.tar.gz" +SRC_URI="http://dev.gentoo.org/~wschlich/src/${CATEGORY}/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +DEPEND="" +RDEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${PN}-config.patch" +} + +src_compile() { + $(tc-getCC) ${CFLAGS} ${LDFLAGS} -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() { + elog + elog "Be sure to change the initial secret in /etc/sysrqd/sysrqd.secret !" + elog "As a security precaution, sysrqd is configured to only listen on" + elog "127.0.0.1 by default. Change the content of /etc/sysrqd/sysrqd.bind" + elog "to an IPv4 address you want it to listen on or remove the file" + elog "to make it listen on any IP address (0.0.0.0)." + elog +} |