Compare commits

...

3 Commits

6 changed files with 50 additions and 76 deletions

View File

@ -1,2 +1,2 @@
DIST unrealircd-6.0.4.2.tar.gz 8698501 BLAKE2B e5252dc3e4b332adbbd5a2d435d5be14a7745777dd53b8fa72b79d4cba2c1c92c0f9381b62b9c3031f48347f2ce7086d44f619cb4ec1b4f3a4cd2020f391643b SHA512 2677834660f9e6123ddf5121d9a46908f6071070cc9da085884d6c6ccec9fefc5429effa2890527a1e162984f1c5cd57bcd9cd488e8713613af84fb6d507207d
DIST unrealircd-6.0.4.2.tar.gz.asc 866 BLAKE2B cdfee99a09479d6099ef42e4caa05024b682f35a7d6302b1baa2ac4697b2b430856d9cbd00f0361360050ce5f2a0478dd9c6e1dbb86ec5714de24e5edcfeaeb7 SHA512 3bbad079c486bd072694f246306094a5cdfc7648f49a9ec40743453bec78173454667243a05870a8a19320b31843dfcd15d962d04758cf97cccd8854dbfdfea4
DIST unrealircd-6.0.7.tar.gz 10293495 BLAKE2B 463bd2b38c712a1a9d1429d1142052750f859a9577772240c1a1094049a9d0768c3830f98204795049ff3f66d4c96a5de87503b44d01a402b72da9095078afe8 SHA512 2cbddb9510066c5a05fd5b907f8bcfa15b32bd345cd42f73cf5bc57a053aefee6bdd324e4dc149aff68887dc591cdbb1ea9db3d65c20703aee94a9c30aadcb64
DIST unrealircd-6.0.7.tar.gz.asc 866 BLAKE2B 46b932d3d52e9211bbce4bfdb26ad2164fbbd60e593e632534563e87bff49c8fe6ae74725cce697f056204c1333a672b3bf4d7b96fa6d5e35b5eb07c4b3ef6f4 SHA512 5237def4849cf1f25928dba5fa4a3974a1641ff538f330408d233b5826b8d67aee0274e372946f8a1c46aeca4738db487ac40b0989450902bc5562c8ecada835

View File

@ -1,64 +0,0 @@
https://github.com/unrealircd/unrealircd/pull/242
From 3246e472842237ac9e655e254380c4dd8fea7abc Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 18 Dec 2022 06:18:51 +0000
Subject: [PATCH] configure.ac: fix -Wimplicit-function-declaration
Clang 16 makes -Wimplicit-function-declaration error by default.
Unfortunately, this can lead to misconfiguration or miscompilation of software as configure
tests may then return the wrong result.
We also fix -Wstrict-prototypes while here as it's easy to do and it prepares
us for C23.
Fixes the following:
```
configure:6250: checking if your system has IPv6 support
configure:6275: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int -fno-strict-aliasing -fno-common -funsigned-char -Wall -Wextra -Waggregate-return -Wformat-nonliteral -Wduplicated-cond -Wduplicated-branches -Wparentheses -Wno-pointer-sign -Wno-format-zero-length -Wno-format-truncation -Wno-format-overflow -Wno-unused -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-char-subscripts -Wno-sign-compare -Wno-empty-body -Wno-pragmas -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs conftest.c >&5
conftest.c: In function 'main':
conftest.c:30:1: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration]
30 | exit(0); /* We only check if the code compiles, that's enough. We can deal with missing runtime IPv6 */
| ^~~~
conftest.c:28:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
27 | #include <sys/socket.h>
+++ |+#include <stdlib.h>
28 | int main() {
conftest.c:30:1: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
30 | exit(0); /* We only check if the code compiles, that's enough. We can deal with missing runtime IPv6 */
| ^~~~
conftest.c:30:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
cc1: some warnings being treated as errors
configure:6275: $? = 1
```
For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2],
or the (new) c-std-porting mailing list [3].
[0] https://lwn.net/Articles/913505/
[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
[2] https://wiki.gentoo.org/wiki/Modern_C_porting
[3] hosted at lists.linux.dev.
--- a/configure.ac
+++ b/configure.ac
@@ -326,7 +326,7 @@ fi
])
AC_CACHE_CHECK(if your system prepends an underscore on symbols,ac_cv_underscore,[
cat >uscore.c << __EOF__
-int main() {
+int main(void) {
return 0;
}
__EOF__
@@ -354,7 +354,8 @@ AC_CACHE_CHECK([if your system has IPv6 support], [ac_cv_ip6], [
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
-int main() {
+#include <stdlib.h>
+int main(void) {
int s = socket(AF_INET6, SOCK_STREAM, 0);
exit(0); /* We only check if the code compiles, that's enough. We can deal with missing runtime IPv6 */
}

View File

@ -0,0 +1,37 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Where to chroot to
# Uncomment this line for chrooting
#UNREALIRCD_CHROOT="/var/chroot/ircd"
UNREALIRCD_CHROOT=""
# Which configuration file to load instead of unrealircd.conf. If you
# want to run multiple instances of unrealircd, you must edit
# files::pidfile to match UNREALIRCD_PIDFILE. You should also ensure
# that files::tunefile is different for each unrealircd instance. See
# https://www.unrealircd.org/docs/Configuration#Files_block
#
# To support multiple instances of unrealircd, you may create symlinks
# in /etc/init.d pointing to /etc/init.d/unrealircd. It is recommended
# that the scheme unrealircd.${instance_name} be used. For each
# instance, you may make a copy of this file with the appropriate name
# to override default options specific to that instance.
UNREALIRCD_CONF="${UNREALIRCD_CHROOT}/etc/unrealircd/${SVCNAME}.conf"
# The path where unrealircd is configured to create its pidfile.
UNREALIRCD_PIDFILE="${UNREALIRCD_CHROOT}/run/${SVCNAME}.pid"
# extra options to pass to unrealircd ...
# You should not specify the -f option here; use
# UNREALIRCD_CONF instead.
#
# [-h servername]
# [-p portnumber]
# [-x loglevel]
# [-t] (to enable debug output)
UNREALIRCD_OPTS=""
# Extra flags to pass to start-stop-daemon. When initially
# debugging, removing --quiet may help.
UNREALIRCD_SSD_OPTS="--quiet"

View File

@ -4,7 +4,7 @@
# Defaults
: ${UNREALIRCD_CONF:=/etc/unrealircd/${SVCNAME}.conf}
: ${UNREALIRCD_PIDFILE:=/run/unrealircd/${SVCNAME#unreal}.pid}
: ${UNREALIRCD_PIDFILE:=/run/${SVCNAME#unreal}.pid}
# Convenience variable for the chroot bits, not actually user-controllable via conf.d
UNREALIRCD_USER="unrealircd"
@ -34,7 +34,7 @@ fi
checkconfig() {
# command_args weirdness because we want to preserve the chroot arguments if it's set
# Only run the configtest for the main instance; it can't work right now for others (no way to specify config file)
[ ${SVCNAME} = unrealircd ] && su -s /bin/sh ${command_user:=root} -c "${command} ${command_args%${UNREALIRCD_COMMAND_ARGS}}" configtest
[ ${SVCNAME} = unrealircd ] && su -s /bin/sh ${command_user:=root} -c "${command} ${command_args%${UNREALIRCD_COMMAND_ARGS}} -c"
}
depend() {
@ -42,7 +42,13 @@ depend() {
provide ircd
}
start_pre() {
checkconfig || return $?
}
reload() {
checkconfig || return $?
ebegin "Reloading ${RC_SVCNAME}"
start-stop-daemon --signal HUP \
--pidfile "${pidfile}" \

View File

@ -1,2 +1 @@
d /run/unrealircd 755 unrealircd unrealircd

View File

@ -39,10 +39,6 @@ BDEPEND="
DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} )
PATCHES=(
"${FILESDIR}"/${PN}-6.0.4.2-configure-clang16.patch
)
src_prepare() {
# QA check against bundled pkgs
rm -r extras || die
@ -75,7 +71,7 @@ src_configure() {
--with-logdir="${EPREFIX}"/var/log/${PN} \
--with-modulesdir="${EPREFIX}/usr/$(get_libdir)"/${PN}/modules \
--without-privatelibdir \
--with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \
--with-pidfile="${EPREFIX}"/run/${PN}.pid \
--with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \
--with-maxconnections=1024 \
--with-nick-history=2000 \
@ -86,7 +82,7 @@ src_configure() {
--with-system-sodium \
--with-system-jansson \
--enable-dynamic-linking \
--with-controlfile="${EPREFIX}"/run/${PN}/unrealircd.ctl \
--with-controlfile="${EPREFIX}"/run/${PN}/${PN}.ctl \
--enable-ssl="${EPREFIX}"/usr \
$(use_enable curl libcurl "${EPREFIX}"/usr) \
$(use_with !operoverride no-operoverride) \
@ -126,7 +122,7 @@ src_install() {
einstalldocs
newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN}
newconfd "${FILESDIR}"/${PN}.confd-r4 ${PN}
newconfd "${FILESDIR}"/${PN}.confd-r5 ${PN}
# config should be read-only
fperms -R 0640 /etc/${PN}