* [gentoo-commits] repo/proj/guru:dev commit in: net-misc/gmid/files/, net-misc/gmid/
@ 2021-04-07 6:55 Anna Vyalkova
0 siblings, 0 replies; 6+ messages in thread
From: Anna Vyalkova @ 2021-04-07 6:55 UTC (permalink / raw
To: gentoo-commits
commit: 65433ba88a032d674582ad5cc387d6dc485b7985
Author: Anna Vyalkova <cyber <AT> sysrq <DOT> in>
AuthorDate: Wed Apr 7 06:55:17 2021 +0000
Commit: Anna Vyalkova <cybertailor <AT> gmail <DOT> com>
CommitDate: Wed Apr 7 06:55:37 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=65433ba8
net-misc/gmid: fix initd script
It writes a valid PID file now
Other changes:
* add a reasonable default configuration file
* automatically generate a self-signed certificate for localhost
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Anna Vyalkova <cyber <AT> sysrq.in>
net-misc/gmid/files/gmid.conf | 8 ++++++++
net-misc/gmid/files/gmid.confd | 9 ---------
net-misc/gmid/files/gmid.initd | 7 +++----
net-misc/gmid/gmid-1.6.ebuild | 17 +++++++++++++++--
net-misc/gmid/gmid-9999.ebuild | 17 +++++++++++++++--
5 files changed, 41 insertions(+), 17 deletions(-)
diff --git a/net-misc/gmid/files/gmid.conf b/net-misc/gmid/files/gmid.conf
new file mode 100644
index 000000000..c9b298c2a
--- /dev/null
+++ b/net-misc/gmid/files/gmid.conf
@@ -0,0 +1,8 @@
+user "gemini" # drop privileges
+
+server "localhost" {
+ root "/var/gemini/localhost"
+ auto index on
+ cert "/etc/ssl/gmid/gmid.crt"
+ key "/etc/ssl/gmid/gmid.key"
+}
diff --git a/net-misc/gmid/files/gmid.confd b/net-misc/gmid/files/gmid.confd
index 62027f6a4..497ddb58e 100644
--- a/net-misc/gmid/files/gmid.confd
+++ b/net-misc/gmid/files/gmid.confd
@@ -2,12 +2,3 @@
# Configuration file
#GMID_CONFIGFILE="/etc/gmid/gmid.conf"
-
-# PID file
-#GMID_PIDFILE="/var/run/gmid.pid"
-
-# User to run gmid as
-#GMID_USER="gemini"
-
-# Group to run gmid as
-#GMID_GROUP="gemini"
diff --git a/net-misc/gmid/files/gmid.initd b/net-misc/gmid/files/gmid.initd
index dfe3b0009..6607c7d2f 100644
--- a/net-misc/gmid/files/gmid.initd
+++ b/net-misc/gmid/files/gmid.initd
@@ -12,10 +12,9 @@ description_reload="Reload the gmid configuration without losing connections."
GMID_CONFIGFILE=${GMID_CONFIGFILE:-/etc/gmid/gmid.conf}
command="/usr/bin/gmid"
-command_args="-c \"${GMID_CONFIGFILE}\""
-pidfile=${GMID_PIDFILE:-/var/run/gmid.pid}
-user=${GMID_USER:-gemini}
-group=${GMID_GROUP:-gemini}
+command_args="-c \"${GMID_CONFIGFILE}\" -f"
+command_background=1
+pidfile="/var/run/gmid.pid"
depend() {
need net
diff --git a/net-misc/gmid/gmid-1.6.ebuild b/net-misc/gmid/gmid-1.6.ebuild
index da3b22779..3e844bfec 100644
--- a/net-misc/gmid/gmid-1.6.ebuild
+++ b/net-misc/gmid/gmid-1.6.ebuild
@@ -3,7 +3,10 @@
EAPI=7
-inherit toolchain-funcs
+SSL_DEPS_SKIP=1
+SSL_DAYS=36500
+
+inherit ssl-cert toolchain-funcs
DESCRIPTION="simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
@@ -53,13 +56,23 @@ src_configure() {
src_install() {
default
+ dodir /etc/gmid
+ cp "${FILESDIR}"/gmid.conf "${ED}"/etc/gmid/gmid.conf || die
+
newinitd "${FILESDIR}"/gmid.initd gmid
newconfd "${FILESDIR}"/gmid.confd gmid
+
+ keepdir /var/gemini/localhost
}
pkg_postinst() {
+ if [[ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]]; then
+ install_cert /etc/ssl/${PN}/${PN}
+ chown gemini:gemini "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
+ fi
+
einfo "This gemini server can be run as a user with zero configuration.\n"
einfo "In order to use it with the init service you will need to generate a"
- einfo "self-signed TLS certificate and key and set up the configuration"
+ einfo "self-signed TLS certificate and a key and set up the configuration"
einfo "file (see man 1 gmid for details)."
}
diff --git a/net-misc/gmid/gmid-9999.ebuild b/net-misc/gmid/gmid-9999.ebuild
index da3b22779..3e844bfec 100644
--- a/net-misc/gmid/gmid-9999.ebuild
+++ b/net-misc/gmid/gmid-9999.ebuild
@@ -3,7 +3,10 @@
EAPI=7
-inherit toolchain-funcs
+SSL_DEPS_SKIP=1
+SSL_DAYS=36500
+
+inherit ssl-cert toolchain-funcs
DESCRIPTION="simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
@@ -53,13 +56,23 @@ src_configure() {
src_install() {
default
+ dodir /etc/gmid
+ cp "${FILESDIR}"/gmid.conf "${ED}"/etc/gmid/gmid.conf || die
+
newinitd "${FILESDIR}"/gmid.initd gmid
newconfd "${FILESDIR}"/gmid.confd gmid
+
+ keepdir /var/gemini/localhost
}
pkg_postinst() {
+ if [[ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]]; then
+ install_cert /etc/ssl/${PN}/${PN}
+ chown gemini:gemini "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
+ fi
+
einfo "This gemini server can be run as a user with zero configuration.\n"
einfo "In order to use it with the init service you will need to generate a"
- einfo "self-signed TLS certificate and key and set up the configuration"
+ einfo "self-signed TLS certificate and a key and set up the configuration"
einfo "file (see man 1 gmid for details)."
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: net-misc/gmid/files/, net-misc/gmid/
@ 2021-04-27 10:17 Anna Vyalkova
0 siblings, 0 replies; 6+ messages in thread
From: Anna Vyalkova @ 2021-04-27 10:17 UTC (permalink / raw
To: gentoo-commits
commit: 6a09bfd48b6caecf555d2c0d32394d9c2eccd2f1
Author: Anna Vyalkova <cyber <AT> sysrq <DOT> in>
AuthorDate: Tue Apr 27 10:17:33 2021 +0000
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Tue Apr 27 10:17:44 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6a09bfd4
net-misc/gmid: version bump to 1.6.1
also...
* include patch from the application developer to make a pidfile
* alter init.d script
* update a live ebuild
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Anna Vyalkova <cyber <AT> sysrq.in>
net-misc/gmid/Manifest | 2 +-
net-misc/gmid/files/gmid-1.6.1-make-pidfile.patch | 111 +++++++++++++++++++++
net-misc/gmid/files/gmid.initd | 7 +-
.../gmid/{gmid-1.6.ebuild => gmid-1.6.1.ebuild} | 4 +-
net-misc/gmid/gmid-9999.ebuild | 12 +--
net-misc/gmid/metadata.xml | 1 -
6 files changed, 117 insertions(+), 20 deletions(-)
diff --git a/net-misc/gmid/Manifest b/net-misc/gmid/Manifest
index 00cf99da9..636020c63 100644
--- a/net-misc/gmid/Manifest
+++ b/net-misc/gmid/Manifest
@@ -1 +1 @@
-DIST gmid-1.6.tar.gz 59402 BLAKE2B 1a13ae3f598a406e7920ad3a4f73cb230d70fe3bf4a1017d8d196ab80fdc0ffcf339ad79c64de93dc69d06e294132d714ad8ea1a5248dc69377e8d088f772d6c SHA512 cf118ac3b067b23d480006bccf36218ab0bf91d778092855a01706782fb0c68252157615d92d143d29deb8331422ef1263228b9eb53dd30e64a480b17c48af7a
+DIST gmid-1.6.1.tar.gz 59488 BLAKE2B 147c8eb4e1c7195405fdce9bef8260e1a3acb145e9dfd2cb3fb126e4445685a3a1826906b01699429e98a61db6bb2089ec3399a1403323b36adf2555afc61bf2 SHA512 b98592e4bb5b1121fad07dc1fcbdbc95ce69a5648b3c2d22dba974511ae265255be62a330125c2da9b0b357edc2f24065fd8b475013d3d2023a8eded2c01a490
diff --git a/net-misc/gmid/files/gmid-1.6.1-make-pidfile.patch b/net-misc/gmid/files/gmid-1.6.1-make-pidfile.patch
new file mode 100644
index 000000000..f95d583a7
--- /dev/null
+++ b/net-misc/gmid/files/gmid-1.6.1-make-pidfile.patch
@@ -0,0 +1,111 @@
+--- a/gmid.1
++++ b/gmid.1
+@@ -22,6 +22,7 @@
+ .Bk -words
+ .Op Fl fnv
+ .Op Fl c Ar config
++.Op Fl P Ar pidfile
+ .Ek
+ .Nm
+ .Bk -words
+@@ -51,6 +52,10 @@ Specify the configuration file.
+ Stays and logs on the foreground.
+ .It Fl n
+ Check that the configuration is valid, but don't start the server.
++.It Fl P Pa pidfile
++Write
++.Nm
++pid to the given path.
+ .El
+ .Pp
+ If no configuration file is given,
+--- a/gmid.c
++++ b/gmid.c
+@@ -316,7 +316,7 @@ static void
+ usage(const char *me)
+ {
+ fprintf(stderr,
+- "USAGE: %s [-fn] [-c config] | [-6h] [-d certs-dir] [-H host]\n"
++ "USAGE: %s [-fn] [-c config] [-P pidfile] | [-6h] [-d certs-dir] [-H host]\n"
+ " [-p port] [-x cgi] [dir]\n",
+ me);
+ }
+@@ -411,6 +411,34 @@ serve(int argc, char **argv, struct imsgbuf *ibuf)
+ _exit(executor_main(ibuf));
+ }
+
++static int
++write_pidfile(const char *pidfile)
++{
++ struct flock lock;
++ int fd;
++
++ if (pidfile == NULL)
++ return -1;
++
++ if ((fd = open(pidfile, O_WRONLY|O_CREAT|O_CLOEXEC, 0600)) == -1)
++ fatal("can't open pidfile %s: %s", pidfile, strerror(errno));
++
++ lock.l_start = 0;
++ lock.l_len = 0;
++ lock.l_type = F_WRLCK;
++ lock.l_whence = SEEK_SET;
++
++ if (fcntl(fd, F_SETLK, &lock) == -1)
++ fatal("can't lock %s, gmid is already running?", pidfile);
++
++ if (ftruncate(fd, 0) == -1)
++ fatal("ftruncate: %s: %s", pidfile, strerror(errno));
++
++ dprintf(fd, "%d\n", getpid());
++
++ return fd;
++}
++
+ static void
+ setup_configless(int argc, char **argv, const char *cgi)
+ {
+@@ -434,11 +462,12 @@ main(int argc, char **argv)
+ {
+ struct imsgbuf exibuf;
+ int ch, conftest = 0, configless = 0;
+- int old_ipv6, old_port;
++ int pidfd, old_ipv6, old_port;
++ const char *pidfile = NULL;
+
+ init_config();
+
+- while ((ch = getopt(argc, argv, "6c:d:fH:hnp:vx:")) != -1) {
++ while ((ch = getopt(argc, argv, "6c:d:fH:hnP:p:vx:")) != -1) {
+ switch (ch) {
+ case '6':
+ conf.ipv6 = 1;
+@@ -472,6 +501,10 @@ main(int argc, char **argv)
+ conftest = 1;
+ break;
+
++ case 'P':
++ pidfile = optarg;
++ break;
++
+ case 'p':
+ conf.port = parse_portno(optarg);
+ configless = 1;
+@@ -536,6 +569,8 @@ main(int argc, char **argv)
+ return 0;
+ }
+
++ pidfd = write_pidfile(pidfile);
++
+ /* Linux seems to call the event handlers even when we're
+ * doing a sigwait. These dummy handlers are here to avoid
+ * being terminated on SIGHUP, SIGINT or SIGTERM. */
+@@ -604,5 +639,8 @@ main(int argc, char **argv)
+ imsg_compose(&logibuf, IMSG_QUIT, 0, 0, -1, NULL, 0);
+ imsg_flush(&logibuf);
+
++ if (pidfd != -1)
++ close(pidfd);
++
+ return 0;
+ }
diff --git a/net-misc/gmid/files/gmid.initd b/net-misc/gmid/files/gmid.initd
index 6607c7d2f..a5f3b9f7e 100644
--- a/net-misc/gmid/files/gmid.initd
+++ b/net-misc/gmid/files/gmid.initd
@@ -12,9 +12,8 @@ description_reload="Reload the gmid configuration without losing connections."
GMID_CONFIGFILE=${GMID_CONFIGFILE:-/etc/gmid/gmid.conf}
command="/usr/bin/gmid"
-command_args="-c \"${GMID_CONFIGFILE}\" -f"
-command_background=1
pidfile="/var/run/gmid.pid"
+command_args="-c \"${GMID_CONFIGFILE}\" -P ${pidfile}"
depend() {
need net
@@ -33,10 +32,6 @@ stop_pre() {
fi
}
-stop_post() {
- rm -f ${pidfile}
-}
-
reload() {
configtest || return 1
ebegin "Refreshing gmid's configuration"
diff --git a/net-misc/gmid/gmid-1.6.ebuild b/net-misc/gmid/gmid-1.6.1.ebuild
similarity index 94%
rename from net-misc/gmid/gmid-1.6.ebuild
rename to net-misc/gmid/gmid-1.6.1.ebuild
index 3e844bfec..3f3f487a7 100644
--- a/net-misc/gmid/gmid-1.6.ebuild
+++ b/net-misc/gmid/gmid-1.6.1.ebuild
@@ -8,7 +8,7 @@ SSL_DAYS=36500
inherit ssl-cert toolchain-funcs
-DESCRIPTION="simple and secure Gemini server"
+DESCRIPTION="Simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
if [[ ${PV} == "9999" ]] ; then
@@ -23,6 +23,8 @@ LICENSE="ISC"
SLOT="0"
IUSE="libressl"
+PATCHES=( "${FILESDIR}"/${P}-make-pidfile.patch )
+
DEPEND="acct-user/gemini
dev-libs/libevent
!libressl? ( dev-libs/libretls )
diff --git a/net-misc/gmid/gmid-9999.ebuild b/net-misc/gmid/gmid-9999.ebuild
index 3e844bfec..9398659da 100644
--- a/net-misc/gmid/gmid-9999.ebuild
+++ b/net-misc/gmid/gmid-9999.ebuild
@@ -8,7 +8,7 @@ SSL_DAYS=36500
inherit ssl-cert toolchain-funcs
-DESCRIPTION="simple and secure Gemini server"
+DESCRIPTION="Simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
if [[ ${PV} == "9999" ]] ; then
@@ -33,16 +33,6 @@ RDEPEND="${DEPEND}"
DOCS=( README.md ChangeLog )
-src_prepare() {
- default
-
- # QA Notice: command not found
- # remove `etags` from the "all" target
- sed \
- -e "s/^\(all: .*\) TAGS \(.*\)$/\1 \2/" \
- -i Makefile || die
-}
-
src_configure() {
# note: not an autoconf configure script
./configure \
diff --git a/net-misc/gmid/metadata.xml b/net-misc/gmid/metadata.xml
index 2f806f847..db6c28fd0 100644
--- a/net-misc/gmid/metadata.xml
+++ b/net-misc/gmid/metadata.xml
@@ -6,7 +6,6 @@
<name>Omar Polo</name>
<email>op@omarpolo.com</email>
</maintainer>
- <changelog>https://git.omarpolo.com/gmid/tree/ChangeLog</changelog>
</upstream>
<maintainer type="person">
<email>cyber@sysrq.in</email>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: net-misc/gmid/files/, net-misc/gmid/
@ 2021-07-05 22:02 Anna Vyalkova
0 siblings, 0 replies; 6+ messages in thread
From: Anna Vyalkova @ 2021-07-05 22:02 UTC (permalink / raw
To: gentoo-commits
commit: 0903023cf4993efba41cd9e72bd3d2e444a3e7ca
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Jul 5 20:44:15 2021 +0000
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Jul 5 22:01:44 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0903023c
net-misc/gmid: add 1.6.2 and tests
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
net-misc/gmid/Manifest | 2 +-
.../files/gmid-1.6.2-disable-runtime-test.patch | 10 ++++
...pidfile.patch => gmid-1.6.2-make-pidfile.patch} | 0
.../gmid/{gmid-1.6.1.ebuild => gmid-1.6.2.ebuild} | 68 +++++++++++++---------
net-misc/gmid/gmid-9999.ebuild | 62 +++++++++++++-------
5 files changed, 93 insertions(+), 49 deletions(-)
diff --git a/net-misc/gmid/Manifest b/net-misc/gmid/Manifest
index 636020c63..1a3dac3a9 100644
--- a/net-misc/gmid/Manifest
+++ b/net-misc/gmid/Manifest
@@ -1 +1 @@
-DIST gmid-1.6.1.tar.gz 59488 BLAKE2B 147c8eb4e1c7195405fdce9bef8260e1a3acb145e9dfd2cb3fb126e4445685a3a1826906b01699429e98a61db6bb2089ec3399a1403323b36adf2555afc61bf2 SHA512 b98592e4bb5b1121fad07dc1fcbdbc95ce69a5648b3c2d22dba974511ae265255be62a330125c2da9b0b357edc2f24065fd8b475013d3d2023a8eded2c01a490
+DIST gmid-1.6.2.tar.gz 60293 BLAKE2B 807f4e93d1ed0f2a69a9631504ffe28d5aee4efbba85b9e7d0a8eec5b4fb50a38285478651f196f57fbcf7b4d38ff462f78c37210720353af638d76b2b28e3e1 SHA512 053e2f95449d71c72052c422b1c51657ad48f662422a121452618c69e6bac9b23bbaa2b35b52d314eb7614b9a0f413504c87cd431bc756d455dd198c79270da8
diff --git a/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch b/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch
new file mode 100644
index 000000000..c6cb8c19c
--- /dev/null
+++ b/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch
@@ -0,0 +1,10 @@
+--- a/regress/Makefile
++++ b/regress/Makefile
+@@ -4,7 +4,6 @@
+
+ all: puny-test testdata iri_test cert.pem testca.pem valid.crt invalid.cert.pem
+ ./puny-test
+- ./runtime
+ ./iri_test
+
+ puny-test: puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT}
diff --git a/net-misc/gmid/files/gmid-1.6.1-make-pidfile.patch b/net-misc/gmid/files/gmid-1.6.2-make-pidfile.patch
similarity index 100%
rename from net-misc/gmid/files/gmid-1.6.1-make-pidfile.patch
rename to net-misc/gmid/files/gmid-1.6.2-make-pidfile.patch
diff --git a/net-misc/gmid/gmid-1.6.1.ebuild b/net-misc/gmid/gmid-1.6.2.ebuild
similarity index 57%
rename from net-misc/gmid/gmid-1.6.1.ebuild
rename to net-misc/gmid/gmid-1.6.2.ebuild
index dbf6b69ac..fc7a027df 100644
--- a/net-misc/gmid/gmid-1.6.1.ebuild
+++ b/net-misc/gmid/gmid-1.6.2.ebuild
@@ -3,33 +3,31 @@
EAPI=7
-SSL_DEPS_SKIP=1
SSL_DAYS=36500
-
inherit ssl-cert toolchain-funcs
DESCRIPTION="Simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://git.omarpolo.com/${PN}"
-else
- SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
-fi
+SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz"
LICENSE="ISC"
SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+seccomp test"
+RESTRICT="!test? ( test )"
PATCHES=( "${FILESDIR}"/${P}-make-pidfile.patch )
-DEPEND="acct-user/gemini
+DEPEND="
+ acct-user/gemini
dev-libs/libevent
dev-libs/libretls
"
-BDEPEND="sys-devel/flex
- virtual/yacc"
+BDEPEND="
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc
+"
RDEPEND="${DEPEND}"
DOCS=( README.md ChangeLog )
@@ -37,28 +35,46 @@ DOCS=( README.md ChangeLog )
src_prepare() {
default
- # QA Notice: command not found
- # remove `etags` from the "all" target
- sed \
- -e "s/^\(all: .*\) TAGS \(.*\)$/\1 \2/" \
- -i Makefile || die
+ if use seccomp && has usersandbox ${FEATURES} ; then
+ eapply "${FILESDIR}"/${P}-disable-runtime-test.patch
+ fi
}
src_configure() {
+ local conf_args
+
# note: not an autoconf configure script
- ./configure \
- CC="$(tc-getCC)" \
- PREFIX="${EPREFIX}"/usr/share \
- BINDIR="${EPREFIX}"/usr/bin \
- CFLAGS="${CFLAGS}" \
- LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" || die
+ conf_args=(
+ CC="$(tc-getCC)"
+ PREFIX="${EPREFIX}"/usr/share
+ BINDIR="${EPREFIX}"/usr/bin
+ CFLAGS="${CFLAGS}"
+ LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent"
+ )
+ if ! use seccomp ; then
+ conf_args+=( --disable-sandbox )
+ fi
+
+ ./configure "${conf_args[@]}" || die
+}
+
+src_compile() {
+ emake gmid
+ if use test ; then
+ emake gg
+ emake -C regress puny-test testdata iri_test
+ fi
+}
+
+src_test() {
+ emake regress
}
src_install() {
default
- dodir /etc/gmid
- cp "${FILESDIR}"/gmid.conf "${ED}"/etc/gmid/gmid.conf || die
+ insinto /etc/gmid
+ doins "${FILESDIR}"/gmid.conf
newinitd "${FILESDIR}"/gmid.initd gmid
newconfd "${FILESDIR}"/gmid.confd gmid
diff --git a/net-misc/gmid/gmid-9999.ebuild b/net-misc/gmid/gmid-9999.ebuild
index a5f8bc23b..4818aacdb 100644
--- a/net-misc/gmid/gmid-9999.ebuild
+++ b/net-misc/gmid/gmid-9999.ebuild
@@ -3,50 +3,68 @@
EAPI=7
-SSL_DEPS_SKIP=1
SSL_DAYS=36500
-
-inherit ssl-cert toolchain-funcs
+inherit git-r3 ssl-cert toolchain-funcs
DESCRIPTION="Simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://git.omarpolo.com/${PN}"
-else
- SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
-fi
+EGIT_REPO_URI="https://github.com/omar-polo/${PN}.git https://git.omarpolo.com/${PN}"
LICENSE="ISC"
SLOT="0"
+IUSE="+seccomp test"
+RESTRICT="
+ !test? ( test )
+ seccomp? ( test )
+"
-DEPEND="acct-user/gemini
+DEPEND="
+ acct-user/gemini
dev-libs/libevent
dev-libs/libretls
"
-BDEPEND="sys-devel/flex
- virtual/yacc"
+BDEPEND="
+ virtual/pkgconfig
+ virtual/yacc
+"
RDEPEND="${DEPEND}"
DOCS=( README.md ChangeLog )
src_configure() {
+ local conf_args
+
# note: not an autoconf configure script
- ./configure \
- CC="$(tc-getCC)" \
- PREFIX="${EPREFIX}"/usr/share \
- BINDIR="${EPREFIX}"/usr/bin \
- CFLAGS="${CFLAGS}" \
- LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" || die
+ conf_args=(
+ CC="$(tc-getCC)"
+ PREFIX="${EPREFIX}"/usr/share
+ BINDIR="${EPREFIX}"/usr/bin
+ CFLAGS="${CFLAGS}"
+ LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent"
+ )
+ if ! use seccomp ; then
+ conf_args+=( --disable-sandbox )
+ fi
+
+ ./configure "${conf_args[@]}" || die
+}
+
+src_compile() {
+ emake gmid
+ if use test ; then
+ emake -C regress gg puny-test testdata iri_test
+ fi
+}
+
+src_test() {
+ emake regress
}
src_install() {
default
- dodir /etc/gmid
- cp "${FILESDIR}"/gmid.conf "${ED}"/etc/gmid/gmid.conf || die
+ insinto /etc/gmid
+ doins "${FILESDIR}"/gmid.conf
newinitd "${FILESDIR}"/gmid.initd gmid
newconfd "${FILESDIR}"/gmid.confd gmid
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: net-misc/gmid/files/, net-misc/gmid/
@ 2021-07-10 18:26 Anna Vyalkova
0 siblings, 0 replies; 6+ messages in thread
From: Anna Vyalkova @ 2021-07-10 18:26 UTC (permalink / raw
To: gentoo-commits
commit: b7e12e52c5028db68ec748a50f5f9904e255d4f1
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sat Jul 10 18:24:50 2021 +0000
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Sat Jul 10 18:24:50 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b7e12e52
net-misc/gmid: add 1.7, drop 1.6.2
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
net-misc/gmid/Manifest | 2 +-
.../files/gmid-1.6.2-disable-runtime-test.patch | 10 --
net-misc/gmid/files/gmid-1.6.2-make-pidfile.patch | 111 ---------------------
net-misc/gmid/files/gmid.conf | 6 +-
.../gmid/{gmid-1.6.2.ebuild => gmid-1.7.ebuild} | 37 +++----
5 files changed, 25 insertions(+), 141 deletions(-)
diff --git a/net-misc/gmid/Manifest b/net-misc/gmid/Manifest
index 1a3dac3a9..857b18fce 100644
--- a/net-misc/gmid/Manifest
+++ b/net-misc/gmid/Manifest
@@ -1 +1 @@
-DIST gmid-1.6.2.tar.gz 60293 BLAKE2B 807f4e93d1ed0f2a69a9631504ffe28d5aee4efbba85b9e7d0a8eec5b4fb50a38285478651f196f57fbcf7b4d38ff462f78c37210720353af638d76b2b28e3e1 SHA512 053e2f95449d71c72052c422b1c51657ad48f662422a121452618c69e6bac9b23bbaa2b35b52d314eb7614b9a0f413504c87cd431bc756d455dd198c79270da8
+DIST gmid-1.7.tar.gz 78157 BLAKE2B a48cd98621874f1a725b0c4b4ee70af45ebfec56734d00478e52d194f3d5a090ea3c4f8001159863149fdc400619685a1e355ab695b81e76d3b483d0101ef5a4 SHA512 d7aaddcc14ea48b4f8377ca841905071f4d82ce96168a39c38e2896b0d1253e31450a9a3794f6a2699afbbb266ffce2e301adc4acf41075a10e11eb878732ad4
diff --git a/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch b/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch
deleted file mode 100644
index c6cb8c19c..000000000
--- a/net-misc/gmid/files/gmid-1.6.2-disable-runtime-test.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/regress/Makefile
-+++ b/regress/Makefile
-@@ -4,7 +4,6 @@
-
- all: puny-test testdata iri_test cert.pem testca.pem valid.crt invalid.cert.pem
- ./puny-test
-- ./runtime
- ./iri_test
-
- puny-test: puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT}
diff --git a/net-misc/gmid/files/gmid-1.6.2-make-pidfile.patch b/net-misc/gmid/files/gmid-1.6.2-make-pidfile.patch
deleted file mode 100644
index f95d583a7..000000000
--- a/net-misc/gmid/files/gmid-1.6.2-make-pidfile.patch
+++ /dev/null
@@ -1,111 +0,0 @@
---- a/gmid.1
-+++ b/gmid.1
-@@ -22,6 +22,7 @@
- .Bk -words
- .Op Fl fnv
- .Op Fl c Ar config
-+.Op Fl P Ar pidfile
- .Ek
- .Nm
- .Bk -words
-@@ -51,6 +52,10 @@ Specify the configuration file.
- Stays and logs on the foreground.
- .It Fl n
- Check that the configuration is valid, but don't start the server.
-+.It Fl P Pa pidfile
-+Write
-+.Nm
-+pid to the given path.
- .El
- .Pp
- If no configuration file is given,
---- a/gmid.c
-+++ b/gmid.c
-@@ -316,7 +316,7 @@ static void
- usage(const char *me)
- {
- fprintf(stderr,
-- "USAGE: %s [-fn] [-c config] | [-6h] [-d certs-dir] [-H host]\n"
-+ "USAGE: %s [-fn] [-c config] [-P pidfile] | [-6h] [-d certs-dir] [-H host]\n"
- " [-p port] [-x cgi] [dir]\n",
- me);
- }
-@@ -411,6 +411,34 @@ serve(int argc, char **argv, struct imsgbuf *ibuf)
- _exit(executor_main(ibuf));
- }
-
-+static int
-+write_pidfile(const char *pidfile)
-+{
-+ struct flock lock;
-+ int fd;
-+
-+ if (pidfile == NULL)
-+ return -1;
-+
-+ if ((fd = open(pidfile, O_WRONLY|O_CREAT|O_CLOEXEC, 0600)) == -1)
-+ fatal("can't open pidfile %s: %s", pidfile, strerror(errno));
-+
-+ lock.l_start = 0;
-+ lock.l_len = 0;
-+ lock.l_type = F_WRLCK;
-+ lock.l_whence = SEEK_SET;
-+
-+ if (fcntl(fd, F_SETLK, &lock) == -1)
-+ fatal("can't lock %s, gmid is already running?", pidfile);
-+
-+ if (ftruncate(fd, 0) == -1)
-+ fatal("ftruncate: %s: %s", pidfile, strerror(errno));
-+
-+ dprintf(fd, "%d\n", getpid());
-+
-+ return fd;
-+}
-+
- static void
- setup_configless(int argc, char **argv, const char *cgi)
- {
-@@ -434,11 +462,12 @@ main(int argc, char **argv)
- {
- struct imsgbuf exibuf;
- int ch, conftest = 0, configless = 0;
-- int old_ipv6, old_port;
-+ int pidfd, old_ipv6, old_port;
-+ const char *pidfile = NULL;
-
- init_config();
-
-- while ((ch = getopt(argc, argv, "6c:d:fH:hnp:vx:")) != -1) {
-+ while ((ch = getopt(argc, argv, "6c:d:fH:hnP:p:vx:")) != -1) {
- switch (ch) {
- case '6':
- conf.ipv6 = 1;
-@@ -472,6 +501,10 @@ main(int argc, char **argv)
- conftest = 1;
- break;
-
-+ case 'P':
-+ pidfile = optarg;
-+ break;
-+
- case 'p':
- conf.port = parse_portno(optarg);
- configless = 1;
-@@ -536,6 +569,8 @@ main(int argc, char **argv)
- return 0;
- }
-
-+ pidfd = write_pidfile(pidfile);
-+
- /* Linux seems to call the event handlers even when we're
- * doing a sigwait. These dummy handlers are here to avoid
- * being terminated on SIGHUP, SIGINT or SIGTERM. */
-@@ -604,5 +639,8 @@ main(int argc, char **argv)
- imsg_compose(&logibuf, IMSG_QUIT, 0, 0, -1, NULL, 0);
- imsg_flush(&logibuf);
-
-+ if (pidfd != -1)
-+ close(pidfd);
-+
- return 0;
- }
diff --git a/net-misc/gmid/files/gmid.conf b/net-misc/gmid/files/gmid.conf
index c9b298c2a..e68ea6cb5 100644
--- a/net-misc/gmid/files/gmid.conf
+++ b/net-misc/gmid/files/gmid.conf
@@ -1,8 +1,10 @@
+certdir = "/etc/ssl/gmid"
+
user "gemini" # drop privileges
server "localhost" {
root "/var/gemini/localhost"
auto index on
- cert "/etc/ssl/gmid/gmid.crt"
- key "/etc/ssl/gmid/gmid.key"
+ cert $certdir "/gmid.crt"
+ key $certdir "/gmid.key"
}
diff --git a/net-misc/gmid/gmid-1.6.2.ebuild b/net-misc/gmid/gmid-1.7.ebuild
similarity index 74%
rename from net-misc/gmid/gmid-1.6.2.ebuild
rename to net-misc/gmid/gmid-1.7.ebuild
index fc7a027df..a5904dd5a 100644
--- a/net-misc/gmid/gmid-1.6.2.ebuild
+++ b/net-misc/gmid/gmid-1.7.ebuild
@@ -8,23 +8,28 @@ inherit ssl-cert toolchain-funcs
DESCRIPTION="Simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
-SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz"
-LICENSE="ISC"
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/omar-polo/${PN}.git https://git.omarpolo.com/${PN}"
+ inherit git-r3
+else
+ SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="BSD ISC MIT"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
IUSE="+seccomp test"
RESTRICT="!test? ( test )"
-PATCHES=( "${FILESDIR}"/${P}-make-pidfile.patch )
-
DEPEND="
acct-user/gemini
+ dev-libs/imsg-compat
+ dev-libs/libbsd
dev-libs/libevent
dev-libs/libretls
"
BDEPEND="
- sys-devel/flex
virtual/pkgconfig
virtual/yacc
"
@@ -35,34 +40,32 @@ DOCS=( README.md ChangeLog )
src_prepare() {
default
- if use seccomp && has usersandbox ${FEATURES} ; then
- eapply "${FILESDIR}"/${P}-disable-runtime-test.patch
- fi
+ # QA Notice: make jobserver unavailable
+ sed 's/make -C regress/${MAKE} -C regress/' -i Makefile || die
}
src_configure() {
local conf_args
+ tc-export CC
# note: not an autoconf configure script
conf_args=(
- CC="$(tc-getCC)"
PREFIX="${EPREFIX}"/usr/share
BINDIR="${EPREFIX}"/usr/bin
- CFLAGS="${CFLAGS}"
- LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent"
+ $(use_enable seccomp sandbox)
)
- if ! use seccomp ; then
- conf_args+=( --disable-sandbox )
- fi
./configure "${conf_args[@]}" || die
+
+ if use seccomp && has usersandbox ${FEATURES} ; then
+ export SKIP_RUNTIME_TESTS=1
+ fi
}
src_compile() {
emake gmid
if use test ; then
- emake gg
- emake -C regress puny-test testdata iri_test
+ emake -C regress gg data puny-test fcgi-test
fi
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: net-misc/gmid/files/, net-misc/gmid/
@ 2024-01-25 11:17 Anna Vyalkova
0 siblings, 0 replies; 6+ messages in thread
From: Anna Vyalkova @ 2024-01-25 11:17 UTC (permalink / raw
To: gentoo-commits
commit: 6275d600d3a834d3cbcaa6e91c50abdbc0d0002e
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Jan 25 11:16:31 2024 +0000
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Jan 25 11:17:17 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6275d600
net-misc/gmid: add 2.0.1
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
net-misc/gmid/Manifest | 2 ++
net-misc/gmid/files/gmid.conf-r1 | 12 +++++++++++
.../gmid/{gmid-9999.ebuild => gmid-2.0.1.ebuild} | 24 ++++++++++++----------
net-misc/gmid/gmid-9999.ebuild | 24 ++++++++++++----------
4 files changed, 40 insertions(+), 22 deletions(-)
diff --git a/net-misc/gmid/Manifest b/net-misc/gmid/Manifest
index 674e720be6..7598d362f8 100644
--- a/net-misc/gmid/Manifest
+++ b/net-misc/gmid/Manifest
@@ -1,2 +1,4 @@
DIST gmid-1.8.6.sha.sig 417 BLAKE2B b6b4735580d63d2a741cd26a45d7b418c7219425ce615a1ed767a14132938f880f860481e9f4e47d187efd68d33adb29287731b497a0e23576c9f25076afd21a SHA512 d9c2520abd668b4dd5d2def375e0aba2ba41940b93ff2941237e05ba92380d88f5037dbfe84f982d027fe7fbc0b5743af63b8abe83686cdf0d1ac9444247371f
DIST gmid-1.8.6.tar.gz 121648 BLAKE2B a5d30434603c7b45a12541baa2119377e313309499fcc33af1960f55c71b9dbb330e35f5d845f216a9452fb14670b775151174280fed6360d050e11a6621ddc3 SHA512 fce40e041a313c918acd0fdbe48d1a2d3d9e8907f8e8251c887cb0fcaf6e82b7128936dfc804241b00530d26901448752ac01b590819ed2aee10734c0f29eaae
+DIST gmid-2.0.1.sha256.sig 239 BLAKE2B b118bd39fc529a05112f405589ce2d1c44d4436b19edecb388709ff2cfe4f49ec15506082da6e8a9aecba7cd9ed2d308aafef5432f1692145d6eabe3b5e53683 SHA512 83eff56ffec7ed55338dfe1e48d670779008c523634c86050a63f333ed328541dcaeb1a0d3fccb01bdf2f6d3bbea20c2898bfbd115ee7590203c04bd24baa064
+DIST gmid-2.0.1.tar.gz 182989 BLAKE2B 4973711ee94babd0b0f470cf84f460343c39867753858817b7262d8ca3947e79b2e20fe004627e8acf00728a3b43db4bfddf446115acca8eadf190dcc6ef533f SHA512 38d29775968c40fe174b8ead3393c3cd77dd535dae18d3051eb9b98b248a56929d84909c07c3405ddc6035e7d1fc66ea856a2a1dd96e53ac8d30fd231c764478
diff --git a/net-misc/gmid/files/gmid.conf-r1 b/net-misc/gmid/files/gmid.conf-r1
new file mode 100644
index 0000000000..811a33b3af
--- /dev/null
+++ b/net-misc/gmid/files/gmid.conf-r1
@@ -0,0 +1,12 @@
+certdir = "/etc/ssl/gmid"
+
+user "gemini" # drop privileges
+
+server "localhost" {
+ listen on * port 1965;
+ cert $certdir "/gmid.crt"
+ key $certdir "/gmid.key"
+
+ root "/var/gemini/localhost"
+ auto index on
+}
diff --git a/net-misc/gmid/gmid-9999.ebuild b/net-misc/gmid/gmid-2.0.1.ebuild
similarity index 83%
copy from net-misc/gmid/gmid-9999.ebuild
copy to net-misc/gmid/gmid-2.0.1.ebuild
index 6809adf5d8..f046fc3257 100644
--- a/net-misc/gmid/gmid-9999.ebuild
+++ b/net-misc/gmid/gmid-2.0.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -16,7 +16,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://github.com/omar-polo/${PN}/releases/download/${PV}/${P}.tar.gz
- verify-sig? ( https://github.com/omar-polo/${PN}/releases/download/${PV}/SHA256.sig -> ${P}.sha.sig )"
+ verify-sig? ( https://github.com/omar-polo/${PN}/releases/download/${PV}/${P}.sha256.sig )"
KEYWORDS="~amd64 ~x86"
fi
@@ -27,7 +27,6 @@ RESTRICT="!test? ( test )"
DEPEND="
acct-user/gemini
- dev-libs/imsg-compat
dev-libs/libevent:=
dev-libs/libretls:=
dev-libs/openssl:=
@@ -43,21 +42,23 @@ if [[ ${PV} != 9999 ]]; then
BDEPEND+="verify-sig? ( sec-keys/signify-keys-gmid:$(ver_cut 1-2) )"
fi
-QA_CONFIG_IMPL_DECL_SKIP=1
VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/signify-keys/${PN}-$(ver_cut 1-2).pub"
DOCS=( README.md ChangeLog contrib/README )
+# not an autoconf configure script
+QA_CONFIG_IMPL_DECL_SKIP=( "*" )
+
src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
else
if use verify-sig; then
# Too many levels of symbolic links
- cp "${DISTDIR}"/${P}.{sha.sig,tar.gz} "${WORKDIR}" || die
+ cp "${DISTDIR}"/${P}.{sha256.sig,tar.gz} "${WORKDIR}" || die
cd "${WORKDIR}" || die
verify-sig_verify_signed_checksums \
- ${P}.sha.sig sha256 ${P}.tar.gz
+ ${P}.sha256.sig sha256 ${P}.tar.gz
fi
default
fi
@@ -69,14 +70,15 @@ src_configure() {
# note: not an autoconf configure script
conf_args=(
- PREFIX="${EPREFIX}"/usr
- MANDIR="${EPREFIX}"/usr/share/man
+ --prefix="${EPREFIX}"/usr
+ --mandir="${EPREFIX}"/usr/share/man
+ --sysconfdir="${EPREFIX}"/etc
+ --with-libtls=system
$(use_enable seccomp sandbox)
)
-
edo ./configure "${conf_args[@]}"
- if use seccomp && has usersandbox ${FEATURES} ; then
+ if use seccomp && has usersandbox ${FEATURES}; then
export SKIP_RUNTIME_TESTS=1
fi
}
@@ -85,7 +87,7 @@ src_install() {
default
insinto /etc/gmid
- doins "${FILESDIR}"/gmid.conf
+ newins "${FILESDIR}"/gmid.conf-r1 gmid.conf
insinto /usr/share/vim/vimfiles
doins -r contrib/vim/*
diff --git a/net-misc/gmid/gmid-9999.ebuild b/net-misc/gmid/gmid-9999.ebuild
index 6809adf5d8..f046fc3257 100644
--- a/net-misc/gmid/gmid-9999.ebuild
+++ b/net-misc/gmid/gmid-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -16,7 +16,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://github.com/omar-polo/${PN}/releases/download/${PV}/${P}.tar.gz
- verify-sig? ( https://github.com/omar-polo/${PN}/releases/download/${PV}/SHA256.sig -> ${P}.sha.sig )"
+ verify-sig? ( https://github.com/omar-polo/${PN}/releases/download/${PV}/${P}.sha256.sig )"
KEYWORDS="~amd64 ~x86"
fi
@@ -27,7 +27,6 @@ RESTRICT="!test? ( test )"
DEPEND="
acct-user/gemini
- dev-libs/imsg-compat
dev-libs/libevent:=
dev-libs/libretls:=
dev-libs/openssl:=
@@ -43,21 +42,23 @@ if [[ ${PV} != 9999 ]]; then
BDEPEND+="verify-sig? ( sec-keys/signify-keys-gmid:$(ver_cut 1-2) )"
fi
-QA_CONFIG_IMPL_DECL_SKIP=1
VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/signify-keys/${PN}-$(ver_cut 1-2).pub"
DOCS=( README.md ChangeLog contrib/README )
+# not an autoconf configure script
+QA_CONFIG_IMPL_DECL_SKIP=( "*" )
+
src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
else
if use verify-sig; then
# Too many levels of symbolic links
- cp "${DISTDIR}"/${P}.{sha.sig,tar.gz} "${WORKDIR}" || die
+ cp "${DISTDIR}"/${P}.{sha256.sig,tar.gz} "${WORKDIR}" || die
cd "${WORKDIR}" || die
verify-sig_verify_signed_checksums \
- ${P}.sha.sig sha256 ${P}.tar.gz
+ ${P}.sha256.sig sha256 ${P}.tar.gz
fi
default
fi
@@ -69,14 +70,15 @@ src_configure() {
# note: not an autoconf configure script
conf_args=(
- PREFIX="${EPREFIX}"/usr
- MANDIR="${EPREFIX}"/usr/share/man
+ --prefix="${EPREFIX}"/usr
+ --mandir="${EPREFIX}"/usr/share/man
+ --sysconfdir="${EPREFIX}"/etc
+ --with-libtls=system
$(use_enable seccomp sandbox)
)
-
edo ./configure "${conf_args[@]}"
- if use seccomp && has usersandbox ${FEATURES} ; then
+ if use seccomp && has usersandbox ${FEATURES}; then
export SKIP_RUNTIME_TESTS=1
fi
}
@@ -85,7 +87,7 @@ src_install() {
default
insinto /etc/gmid
- doins "${FILESDIR}"/gmid.conf
+ newins "${FILESDIR}"/gmid.conf-r1 gmid.conf
insinto /usr/share/vim/vimfiles
doins -r contrib/vim/*
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: net-misc/gmid/files/, net-misc/gmid/
@ 2024-02-12 22:03 Anna Vyalkova
0 siblings, 0 replies; 6+ messages in thread
From: Anna Vyalkova @ 2024-02-12 22:03 UTC (permalink / raw
To: gentoo-commits
commit: b67508d20bd7a1b41ec4043746a35abd3eb0b0ab
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon Feb 12 21:57:02 2024 +0000
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Mon Feb 12 21:57:15 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b67508d2
net-misc/gmid: drop 1.8.6, 2.0.1
Closes: https://bugs.gentoo.org/887869
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
net-misc/gmid/Manifest | 2 -
net-misc/gmid/files/gmid.conf | 10 ----
net-misc/gmid/gmid-1.8.6.ebuild | 110 ---------------------------------------
net-misc/gmid/gmid-2.0.1.ebuild | 112 ----------------------------------------
4 files changed, 234 deletions(-)
diff --git a/net-misc/gmid/Manifest b/net-misc/gmid/Manifest
index 7598d362f8..dad4fe7335 100644
--- a/net-misc/gmid/Manifest
+++ b/net-misc/gmid/Manifest
@@ -1,4 +1,2 @@
-DIST gmid-1.8.6.sha.sig 417 BLAKE2B b6b4735580d63d2a741cd26a45d7b418c7219425ce615a1ed767a14132938f880f860481e9f4e47d187efd68d33adb29287731b497a0e23576c9f25076afd21a SHA512 d9c2520abd668b4dd5d2def375e0aba2ba41940b93ff2941237e05ba92380d88f5037dbfe84f982d027fe7fbc0b5743af63b8abe83686cdf0d1ac9444247371f
-DIST gmid-1.8.6.tar.gz 121648 BLAKE2B a5d30434603c7b45a12541baa2119377e313309499fcc33af1960f55c71b9dbb330e35f5d845f216a9452fb14670b775151174280fed6360d050e11a6621ddc3 SHA512 fce40e041a313c918acd0fdbe48d1a2d3d9e8907f8e8251c887cb0fcaf6e82b7128936dfc804241b00530d26901448752ac01b590819ed2aee10734c0f29eaae
DIST gmid-2.0.1.sha256.sig 239 BLAKE2B b118bd39fc529a05112f405589ce2d1c44d4436b19edecb388709ff2cfe4f49ec15506082da6e8a9aecba7cd9ed2d308aafef5432f1692145d6eabe3b5e53683 SHA512 83eff56ffec7ed55338dfe1e48d670779008c523634c86050a63f333ed328541dcaeb1a0d3fccb01bdf2f6d3bbea20c2898bfbd115ee7590203c04bd24baa064
DIST gmid-2.0.1.tar.gz 182989 BLAKE2B 4973711ee94babd0b0f470cf84f460343c39867753858817b7262d8ca3947e79b2e20fe004627e8acf00728a3b43db4bfddf446115acca8eadf190dcc6ef533f SHA512 38d29775968c40fe174b8ead3393c3cd77dd535dae18d3051eb9b98b248a56929d84909c07c3405ddc6035e7d1fc66ea856a2a1dd96e53ac8d30fd231c764478
diff --git a/net-misc/gmid/files/gmid.conf b/net-misc/gmid/files/gmid.conf
deleted file mode 100644
index e68ea6cb54..0000000000
--- a/net-misc/gmid/files/gmid.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-certdir = "/etc/ssl/gmid"
-
-user "gemini" # drop privileges
-
-server "localhost" {
- root "/var/gemini/localhost"
- auto index on
- cert $certdir "/gmid.crt"
- key $certdir "/gmid.key"
-}
diff --git a/net-misc/gmid/gmid-1.8.6.ebuild b/net-misc/gmid/gmid-1.8.6.ebuild
deleted file mode 100644
index 6809adf5d8..0000000000
--- a/net-misc/gmid/gmid-1.8.6.ebuild
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-SSL_DAYS=36500
-SSL_CERT_MANDATORY=1
-VERIFY_SIG_METHOD="signify"
-inherit edo ssl-cert systemd toolchain-funcs verify-sig
-
-DESCRIPTION="Simple and secure Gemini server"
-HOMEPAGE="https://gmid.omarpolo.com"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://git.omarpolo.com/${PN} https://github.com/omar-polo/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/omar-polo/${PN}/releases/download/${PV}/${P}.tar.gz
- verify-sig? ( https://github.com/omar-polo/${PN}/releases/download/${PV}/SHA256.sig -> ${P}.sha.sig )"
- KEYWORDS="~amd64 ~x86"
-fi
-
-LICENSE="BSD ISC MIT"
-SLOT="0"
-IUSE="seccomp test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- acct-user/gemini
- dev-libs/imsg-compat
- dev-libs/libevent:=
- dev-libs/libretls:=
- dev-libs/openssl:=
- !elibc_Darwin? ( dev-libs/libbsd )
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
- virtual/pkgconfig
- app-alternatives/yacc
- seccomp? ( sys-kernel/linux-headers )
-"
-if [[ ${PV} != 9999 ]]; then
- BDEPEND+="verify-sig? ( sec-keys/signify-keys-gmid:$(ver_cut 1-2) )"
-fi
-
-QA_CONFIG_IMPL_DECL_SKIP=1
-VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/signify-keys/${PN}-$(ver_cut 1-2).pub"
-
-DOCS=( README.md ChangeLog contrib/README )
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- if use verify-sig; then
- # Too many levels of symbolic links
- cp "${DISTDIR}"/${P}.{sha.sig,tar.gz} "${WORKDIR}" || die
- cd "${WORKDIR}" || die
- verify-sig_verify_signed_checksums \
- ${P}.sha.sig sha256 ${P}.tar.gz
- fi
- default
- fi
-}
-
-src_configure() {
- local conf_args
- tc-export CC
-
- # note: not an autoconf configure script
- conf_args=(
- PREFIX="${EPREFIX}"/usr
- MANDIR="${EPREFIX}"/usr/share/man
- $(use_enable seccomp sandbox)
- )
-
- edo ./configure "${conf_args[@]}"
-
- if use seccomp && has usersandbox ${FEATURES} ; then
- export SKIP_RUNTIME_TESTS=1
- fi
-}
-
-src_install() {
- default
-
- insinto /etc/gmid
- doins "${FILESDIR}"/gmid.conf
-
- insinto /usr/share/vim/vimfiles
- doins -r contrib/vim/*
-
- systemd_dounit "${FILESDIR}"/gmid.service
- newinitd "${FILESDIR}"/gmid.initd gmid
- newconfd "${FILESDIR}"/gmid.confd gmid
-
- keepdir /var/gemini/localhost
-}
-
-pkg_postinst() {
- if [[ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]]; then
- install_cert /etc/ssl/${PN}/${PN}
- chown gemini:gemini "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
- fi
-
- einfo "This gemini server can be run as a user with zero configuration.\n"
- einfo "In order to use it with the init service you will need to generate a"
- einfo "self-signed TLS certificate and a key and set up the configuration"
- einfo "file (see man 1 gmid for details)."
-}
diff --git a/net-misc/gmid/gmid-2.0.1.ebuild b/net-misc/gmid/gmid-2.0.1.ebuild
deleted file mode 100644
index f046fc3257..0000000000
--- a/net-misc/gmid/gmid-2.0.1.ebuild
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-SSL_DAYS=36500
-SSL_CERT_MANDATORY=1
-VERIFY_SIG_METHOD="signify"
-inherit edo ssl-cert systemd toolchain-funcs verify-sig
-
-DESCRIPTION="Simple and secure Gemini server"
-HOMEPAGE="https://gmid.omarpolo.com"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://git.omarpolo.com/${PN} https://github.com/omar-polo/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/omar-polo/${PN}/releases/download/${PV}/${P}.tar.gz
- verify-sig? ( https://github.com/omar-polo/${PN}/releases/download/${PV}/${P}.sha256.sig )"
- KEYWORDS="~amd64 ~x86"
-fi
-
-LICENSE="BSD ISC MIT"
-SLOT="0"
-IUSE="seccomp test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- acct-user/gemini
- dev-libs/libevent:=
- dev-libs/libretls:=
- dev-libs/openssl:=
- !elibc_Darwin? ( dev-libs/libbsd )
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
- virtual/pkgconfig
- app-alternatives/yacc
- seccomp? ( sys-kernel/linux-headers )
-"
-if [[ ${PV} != 9999 ]]; then
- BDEPEND+="verify-sig? ( sec-keys/signify-keys-gmid:$(ver_cut 1-2) )"
-fi
-
-VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/signify-keys/${PN}-$(ver_cut 1-2).pub"
-
-DOCS=( README.md ChangeLog contrib/README )
-
-# not an autoconf configure script
-QA_CONFIG_IMPL_DECL_SKIP=( "*" )
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- git-r3_src_unpack
- else
- if use verify-sig; then
- # Too many levels of symbolic links
- cp "${DISTDIR}"/${P}.{sha256.sig,tar.gz} "${WORKDIR}" || die
- cd "${WORKDIR}" || die
- verify-sig_verify_signed_checksums \
- ${P}.sha256.sig sha256 ${P}.tar.gz
- fi
- default
- fi
-}
-
-src_configure() {
- local conf_args
- tc-export CC
-
- # note: not an autoconf configure script
- conf_args=(
- --prefix="${EPREFIX}"/usr
- --mandir="${EPREFIX}"/usr/share/man
- --sysconfdir="${EPREFIX}"/etc
- --with-libtls=system
- $(use_enable seccomp sandbox)
- )
- edo ./configure "${conf_args[@]}"
-
- if use seccomp && has usersandbox ${FEATURES}; then
- export SKIP_RUNTIME_TESTS=1
- fi
-}
-
-src_install() {
- default
-
- insinto /etc/gmid
- newins "${FILESDIR}"/gmid.conf-r1 gmid.conf
-
- insinto /usr/share/vim/vimfiles
- doins -r contrib/vim/*
-
- systemd_dounit "${FILESDIR}"/gmid.service
- newinitd "${FILESDIR}"/gmid.initd gmid
- newconfd "${FILESDIR}"/gmid.confd gmid
-
- keepdir /var/gemini/localhost
-}
-
-pkg_postinst() {
- if [[ ! -f "${EROOT}"/etc/ssl/${PN}/${PN}.key ]]; then
- install_cert /etc/ssl/${PN}/${PN}
- chown gemini:gemini "${EROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
- fi
-
- einfo "This gemini server can be run as a user with zero configuration.\n"
- einfo "In order to use it with the init service you will need to generate a"
- einfo "self-signed TLS certificate and a key and set up the configuration"
- einfo "file (see man 1 gmid for details)."
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-12 22:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-25 11:17 [gentoo-commits] repo/proj/guru:dev commit in: net-misc/gmid/files/, net-misc/gmid/ Anna Vyalkova
-- strict thread matches above, loose matches on Subject: below --
2024-02-12 22:03 Anna Vyalkova
2021-07-10 18:26 Anna Vyalkova
2021-07-05 22:02 Anna Vyalkova
2021-04-27 10:17 Anna Vyalkova
2021-04-07 6:55 Anna Vyalkova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox