mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 14:43:27 -04:00
app-admin/run0edit: new package, add 0.5.6_p20251226, 9999
Signed-off-by: dsaf <ghostyn678+git@gmail.com>
This commit is contained in:
1
app-admin/run0edit/Manifest
Normal file
1
app-admin/run0edit/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST run0edit-0.5.6_p20251226.tar.gz 38917 BLAKE2B 06a9535d79452dcbc8b6bc4861a2792e251d6fddcdf9c96504bec1b5f1f248635e37228d3cb491beb8a3cf4ce702e55d3d1144c8e8a8afb9ec649939ae5d20b2 SHA512 1fc8a41e5c7556b08b2085cfd822ba976c8096830c74f7ce86ba6cf96fcfc980b081c2be8f6714030b4c878df910c9954105fdd474cd4ab0fcf54c72fe8604b3
|
||||
16
app-admin/run0edit/metadata.xml
Normal file
16
app-admin/run0edit/metadata.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ghostyn678+git@gmail.com</email>
|
||||
<name>dsaf</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
run0edit allows a permitted user to edit a file as root.
|
||||
Authorization uses the same mechanism as run0, which
|
||||
typically takes the form of a password prompt.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">HastD/run0edit</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
69
app-admin/run0edit/run0edit-0.5.6_p20251226.ebuild
Normal file
69
app-admin/run0edit/run0edit-0.5.6_p20251226.ebuild
Normal file
@@ -0,0 +1,69 @@
|
||||
# Copyright 2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{12..14} )
|
||||
inherit python-single-r1
|
||||
|
||||
MY_COMMIT="6c5827576ac9241d976cf8bd953ea244793f2506"
|
||||
|
||||
DESCRIPTION="Script to edit a single file as root using run0"
|
||||
HOMEPAGE="https://github.com/HastD/run0edit"
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/HastD/run0edit.git"
|
||||
elif [[ ${PV} == *_p* ]] ; then
|
||||
SRC_URI="https://github.com/HastD/run0edit/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_COMMIT}"
|
||||
else
|
||||
SRC_URI="https://github.com/HastD/run0edit/releases/download/v${PV}/run0edit-${PV}.tar.gz"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( Apache-2.0 MIT )"
|
||||
SLOT="0"
|
||||
|
||||
if [[ ${PV} != *9999* ]] ; then
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
>=sys-apps/systemd-256:=
|
||||
"
|
||||
|
||||
DOCS=( {CHANGELOG,SECURITY,README}.md )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
mv run0edit_main.py run0edit || die
|
||||
|
||||
python_fix_shebang run0edit run0edit_inner.py
|
||||
|
||||
local b2=$(b2sum "${S}"/run0edit_inner.py | cut -d' ' -f1)
|
||||
local sitedir=$(python_get_sitedir)
|
||||
|
||||
# patch hard-coded variables to work
|
||||
sed -i \
|
||||
-e "s|^INNER_SCRIPT_PATH:.*|INNER_SCRIPT_PATH: Final[str] = \"${sitedir}/run0edit_inner.py\"|" \
|
||||
-e "/^INNER_SCRIPT_B2:/{
|
||||
N
|
||||
s|^.*|INNER_SCRIPT_B2: Final[str] = \"${b2}\"|
|
||||
}" \
|
||||
run0edit || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
python_domodule run0edit_inner.py
|
||||
|
||||
python_doscript run0edit
|
||||
|
||||
einstalldocs
|
||||
|
||||
# setup editor.conf
|
||||
dodir /etc/"${PN}"
|
||||
echo "$(which ${EDITOR})" >> "${ED}"/etc/"${PN}"/editor.conf || die
|
||||
}
|
||||
69
app-admin/run0edit/run0edit-9999.ebuild
Normal file
69
app-admin/run0edit/run0edit-9999.ebuild
Normal file
@@ -0,0 +1,69 @@
|
||||
# Copyright 2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{12..14} )
|
||||
inherit python-single-r1
|
||||
|
||||
MY_COMMIT="6c5827576ac9241d976cf8bd953ea244793f2506"
|
||||
|
||||
DESCRIPTION="Script to edit a single file as root using run0"
|
||||
HOMEPAGE="https://github.com/HastD/run0edit"
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/HastD/run0edit.git"
|
||||
elif [[ ${PV} == *_p* ]] ; then
|
||||
SRC_URI="https://github.com/HastD/run0edit/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_COMMIT}"
|
||||
else
|
||||
SRC_URI="https://github.com/HastD/run0edit/releases/download/v${PV}/run0edit-${PV}.tar.gz"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( Apache-2.0 MIT )"
|
||||
SLOT="0"
|
||||
|
||||
if [[ ${PV} != *9999* ]] ; then
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
>=sys-apps/systemd-256:=
|
||||
"
|
||||
|
||||
DOCS=( {CHANGELOG,SECURITY,README}.md )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
mv run0edit_main.py run0edit || die
|
||||
|
||||
python_fix_shebang run0edit run0edit_inner.py
|
||||
|
||||
local b2=$(b2sum "${S}"/run0edit_inner.py | cut -d' ' -f1)
|
||||
local sitedir=$(python_get_sitedir)
|
||||
|
||||
# patch hard-coded variables to work
|
||||
sed -i \
|
||||
-e "s|^INNER_SCRIPT_PATH:.*|INNER_SCRIPT_PATH: Final[str] = \"${sitedir}/run0edit_inner.py\"|" \
|
||||
-e "/^INNER_SCRIPT_B2:/{
|
||||
N
|
||||
s|^.*|INNER_SCRIPT_B2: Final[str] = \"${b2}\"|
|
||||
}" \
|
||||
run0edit || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
python_domodule run0edit_inner.py
|
||||
|
||||
python_doscript run0edit
|
||||
|
||||
einstalldocs
|
||||
|
||||
# setup editor.conf
|
||||
dodir /etc/"${PN}"
|
||||
echo "$(which ${EDITOR})" >> "${ED}"/etc/"${PN}"/editor.conf || die
|
||||
}
|
||||
Reference in New Issue
Block a user