From 623ee73d661e5ed8475cb264511f683407d87365 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 12 Apr 2020 03:41:30 +0100 Subject: gentoo Easter resync : 12.04.2020 --- app-admin/sysrqd/Manifest | 2 ++ app-admin/sysrqd/files/sysrqd.service | 11 ++++++++ app-admin/sysrqd/sysrqd-17-r1.ebuild | 53 +++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 app-admin/sysrqd/files/sysrqd.service create mode 100644 app-admin/sysrqd/sysrqd-17-r1.ebuild (limited to 'app-admin/sysrqd') diff --git a/app-admin/sysrqd/Manifest b/app-admin/sysrqd/Manifest index 9c4bfbe6d73b..f10c7ee7a709 100644 --- a/app-admin/sysrqd/Manifest +++ b/app-admin/sysrqd/Manifest @@ -1,6 +1,8 @@ AUX sysrqd-17-fix-build-system.patch 570 BLAKE2B 06007cdc8783abea99060437db96f9493b9a2c410b44169c5960aa43d7f15231021dbbfdf5140d25c918de7cfcce09dd9e8106fda02c5ecdf8b76c9554d9c91b SHA512 2db00903e2325c4b5da296ceca11b71f61775122371b542a1c0f3d6bc70022ade4337fe237b1c9fe03b8aebc3dc349320e04db006c6fbf601d1dbae676101afa AUX sysrqd-config.patch 421 BLAKE2B 9cc04c7c31c39f1015b95aaf5c695a2221b65d2c471506b9f3e836fec43585e7e21d7fa7a01c4cdd7815f9c1ebb10800ca1cfccabd397223eb6b3f700f8cd54d SHA512 5dd351220cbb10a09d6c6f0bae07a37fc678988467a8a1cff2075217a82eb4bbfc6f2155b47b71159e3442f8d25bbff539a3e2a61f91829d6dae7820e647fca8 AUX sysrqd.init 700 BLAKE2B 2570aeb1b01d098bd8330a9e78c85708013d3ee09318f84a1e5f088ffc2a32077cf6e18bc3413106724d7fe024bea9720f6f20c5a28a5fb5a775a219ed7c95e4 SHA512 9845a09cfa20ee9cd09e61e142cf53aaf482909ce3ec1401743864823a7bd45ced812fb235eef2adb914c3c624e227fa5936b73e1b83d8a3888fb25498980918 +AUX sysrqd.service 166 BLAKE2B f6963ca6f1fac672aa400c40b899e56f436e674bcc88bccae63f2f529624fedfd193137da157b0088f8c9c14eb22d9ccc261b5f131451b0269e5742b7238c6ce SHA512 fbac57e9367872cd7289edb24d1fce259fb1b39c3ad5484c259cb7bcc56db84fb21019fb6402759025329db26360f427fc9235f743a49fe2198e44ac8443a69c DIST sysrqd-17.tar.gz 5232 BLAKE2B 4fd3baf7bce45b43577db7cd4a383161a8d69bd88e041afe20c33d3812235829729c57b748321195c2bccea819827655080199c0167bafad7252ca29b2a3a27c SHA512 fd0e42d2edd5e8548510aa823b2fef6339b2dc1dde1fe387585b9f2611e7d944fa6d73447e3f58a0aa00d45a88459c6e9cbb619428282abf367f62a8270e5d54 +EBUILD sysrqd-17-r1.ebuild 1350 BLAKE2B 41d94d29437692c868d8e8734c60317940130bfbd149597985ec170bb981eae63afc2a5d427f8dda93fd6035dea12235680814fe82611e2c2e06dce79c8a6230 SHA512 1ae634662ea246aa4d22b72f3897915de163eac159b4c9d05cebb6456b98a3daf890fc9fe0cf4e6908578833d9b3000bbfb34f978f4c72954ce85ea7f05503b2 EBUILD sysrqd-17.ebuild 1316 BLAKE2B e0f1b6a31fb3418058a6e576b4f9f25855ec55e191dbccc9e49486d4ab52af129f9d71931dbd04566f33876131bd05b85cfbdf9a69c1f8c03dec4c40eee155f0 SHA512 213b573ebeb6e9cadb08e0641fa4c68a0513cc2e0bec9e77124c9972be3edc16745f4133442ec4641cbc527ad16e1d7c8fc703727f669b0aab88458d3bc9f8c3 MISC metadata.xml 414 BLAKE2B eb2c97371677b4c978e210a3069e30cd453ebaf2249d01e80e52c116bb9dd4243f692cb4e4f384412191e691a67054a390f35143fb8fc403b595f11c3e09dd68 SHA512 e0c64a75f859353dd258c074a2353882ddba2955144297672ada48f29ebd742d4acd7193816aae859f7f7df1d4b23e9bd1176856aa801ee7a0035f8ce2224859 diff --git a/app-admin/sysrqd/files/sysrqd.service b/app-admin/sysrqd/files/sysrqd.service new file mode 100644 index 000000000000..278226b581b9 --- /dev/null +++ b/app-admin/sysrqd/files/sysrqd.service @@ -0,0 +1,11 @@ +[Unit] +Description=SysRqd Telnet Daemon +After=network.target + +[Service] +Type=forking +Restart=always +ExecStart=-/usr/sbin/sysrqd + +[Install] +WantedBy=multi-user.target diff --git a/app-admin/sysrqd/sysrqd-17-r1.ebuild b/app-admin/sysrqd/sysrqd-17-r1.ebuild new file mode 100644 index 000000000000..337bac7f13dc --- /dev/null +++ b/app-admin/sysrqd/sysrqd-17-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd toolchain-funcs + +DESCRIPTION="Daemon providing access to the kernel sysrq functions via network" +HOMEPAGE="https://github.com/jd/sysrqd" +SRC_URI="https://github.com/jd/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +PATCHES=( + "${FILESDIR}"/${PN}-config.patch + "${FILESDIR}"/${P}-fix-build-system.patch +) + +src_configure() { + tc-export CC +} + +src_install() { + dosbin sysrqd + newinitd "${FILESDIR}/sysrqd.init" sysrqd + systemd_dounit "${FILESDIR}"/sysrqd.service + + local bindip='127.0.0.1' secret + declare -i secret + let secret="${RANDOM}*${RANDOM}*${RANDOM}*${RANDOM}" + echo "${bindip}" > sysrqd.bind || die + echo "${secret}" > sysrqd.secret || die + + diropts -m 0700 -o root -g root + insinto /etc/sysrqd + insopts -m 0600 -o root -g root + doins sysrqd.bind + doins sysrqd.secret + + einstalldocs +} + +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 +} -- cgit v1.2.3