From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8BA51158020 for ; Thu, 24 Nov 2022 00:53:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BDB0AE09F1; Thu, 24 Nov 2022 00:53:28 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A414EE09F1 for ; Thu, 24 Nov 2022 00:53:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7B50E340FCB for ; Thu, 24 Nov 2022 00:53:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B89B774D for ; Thu, 24 Nov 2022 00:53:25 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1669251133.6ccf1b9327a975ba069b356e3e9f1a51e39ca45d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/radvd/files/, net-misc/radvd/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/radvd/files/radvd-2.19-clang16.patch net-misc/radvd/radvd-2.19-r5.ebuild X-VCS-Directories: net-misc/radvd/ net-misc/radvd/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6ccf1b9327a975ba069b356e3e9f1a51e39ca45d X-VCS-Branch: master Date: Thu, 24 Nov 2022 00:53:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: df7837d1-4066-4e58-ba90-713d3b252efe X-Archives-Hash: f8ebe648327b40e06c6657c6c1fea01b commit: 6ccf1b9327a975ba069b356e3e9f1a51e39ca45d Author: Sam James gentoo org> AuthorDate: Thu Nov 24 00:52:13 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Nov 24 00:52:13 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ccf1b93 net-misc/radvd: fix build w/ clang 16 Closes: https://bugs.gentoo.org/880823 Signed-off-by: Sam James gentoo.org> net-misc/radvd/files/radvd-2.19-clang16.patch | 62 ++++++++++++++++++++++ net-misc/radvd/radvd-2.19-r5.ebuild | 74 +++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) diff --git a/net-misc/radvd/files/radvd-2.19-clang16.patch b/net-misc/radvd/files/radvd-2.19-clang16.patch new file mode 100644 index 000000000000..793126dbcc1b --- /dev/null +++ b/net-misc/radvd/files/radvd-2.19-clang16.patch @@ -0,0 +1,62 @@ +https://github.com/radvd-project/radvd/commit/f4baa88bfd77710a6034e3c23b95ef5efb80f83b +https://bugs.gentoo.org/880823 + +From ff7ab0cf445236f30e58531175ba912614fed952 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Thu, 17 Nov 2022 22:03:25 +0000 +Subject: [PATCH 1/2] Makefile.am: drop -Wno-implicit-function-declaration + +1. Clang 16 makes -Wimplicit-function-declaration error by default + (and it's planned that GCC 14 will do the same) so we need to fix + the real problem. This is papering over it. + +2. It's not true that there's nothing we can do about it. Fix in a follow-up + commit. + +Bug: https://bugs.gentoo.org/880823 +Fixes: b5e6b09cf914a960ac3b1676b77d3ea9f91821c7 +Signed-off-by: Sam James +--- a/Makefile.am ++++ b/Makefile.am +@@ -66,9 +66,6 @@ radvd_LDADD = \ + scanner.c: gram.h + gram.h: gram.c + +-libradvd_parser_a_CFLAGS = \ +- -Wno-implicit-function-declaration +- + libradvd_parser_a_SOURCES = \ + gram.h \ + gram.y \ + +From e0f5bcd9091a5f7abd423fce9f372c8079849a64 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Thu, 17 Nov 2022 22:03:25 +0000 +Subject: [PATCH 2/2] gram.y: Fix -Wimplicit-function-declaration + +Clang 16 makes -Wimplicit-function-declaration an error by default. + +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. + +Bug: https://bugs.gentoo.org/880823 +Signed-off-by: Sam James +--- a/gram.y ++++ b/gram.y +@@ -20,6 +20,10 @@ + + #define YYERROR_VERBOSE 1 + ++int yylex (void); ++void yyset_in (FILE * _in_str); ++int yylex_destroy (void); ++ + #if 0 /* no longer necessary? */ + #ifndef HAVE_IN6_ADDR_S6_ADDR + # ifdef __FreeBSD__ + diff --git a/net-misc/radvd/radvd-2.19-r5.ebuild b/net-misc/radvd/radvd-2.19-r5.ebuild new file mode 100644 index 000000000000..339fa3d60deb --- /dev/null +++ b/net-misc/radvd/radvd-2.19-r5.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools readme.gentoo-r1 systemd toolchain-funcs + +DESCRIPTION="Linux IPv6 Router Advertisement Daemon" +HOMEPAGE="https://v6web.litech.org/radvd/" +SRC_URI="https://v6web.litech.org/radvd/dist/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="selinux test" +RESTRICT="!test? ( test )" + +BDEPEND="virtual/pkgconfig" +DEPEND=" + sys-devel/bison + sys-devel/flex + test? ( dev-libs/check ) +" +RDEPEND=" + acct-group/radvd + acct-user/radvd + selinux? ( sec-policy/selinux-radvd ) +" + +DOCS=( CHANGES README TODO radvd.conf.example ) + +PATCHES=( + "${FILESDIR}"/${P}-musl-include.patch + "${FILESDIR}"/${P}-clang16.patch +) + +src_prepare() { + default + + # Drop once clang16 patch is in a release + eautoreconf +} + +src_configure() { + econf --with-pidfile=/run/radvd/radvd.pid \ + --with-systemdsystemunitdir=no \ + $(use_with test check) +} + +src_compile() { + emake AR="$(tc-getAR)" +} + +src_install() { + default + + docinto html + dodoc INTRO.html + + newinitd "${FILESDIR}"/${PN}-2.15.init ${PN} + newconfd "${FILESDIR}"/${PN}.conf ${PN} + + systemd_dounit "${FILESDIR}"/${PN}.service + + readme.gentoo_create_doc +} + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS="Please create a configuration file ${ROOT}/etc/radvd.conf. +See ${ROOT}/usr/share/doc/${PF} for an example. + +grsecurity users should allow a specific group to read /proc +and add the radvd user to that group, otherwise radvd may +segfault on startup."