Skip to content

Commit

Permalink
net-misc/bird: New upstream version 2.0.8
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/779328
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
  • Loading branch information
alarig committed Mar 30, 2021
1 parent 90300fa commit bd115f5
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 2 deletions.
1 change: 1 addition & 0 deletions net-misc/bird/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST bird-2.0.7.tar.gz 1993395 BLAKE2B ceb88d811d254e57e089ef4b4e1e4f34fd96d4622d9f5563cc8694323c060e99d6cdfccfeb5d8c885b9431dc71e96d5cc04e4344901a7c7d899f4249e7503720 SHA512 48ca63be923285dd282e80d7e2b240256953fd7ad4f6eaa5dcba2648f3f148be20198bc8c6e7e888aac1588ecb005a4f4c03e979853e76ea6f8680643a874b35
DIST bird-2.0.8.tar.gz 1135228 BLAKE2B 4b36688ac85967ad8c39d9c37dc717d77b1cb5c3ec44a0cf4e84ff38b8d1710d10653a1333b50cd2ede79fd7f012ec86de0baefc9ac18435693ec5b3e43b8a3a SHA512 5f8ad63b1dcdcfdfd4c98f55601dda3a07dea3099fc51b52a340650ca475bd943ee6aac31a1e7735b7596b279e338697c65728754b97108ae687a05f566c94e2
59 changes: 59 additions & 0 deletions net-misc/bird/bird-2.0.8.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit fcaps

DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 & IPv6"
HOMEPAGE="https://bird.network.cz"
SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86 ~x64-macos"
IUSE="+client debug libssh"

RDEPEND="
client? ( sys-libs/ncurses:= )
client? ( sys-libs/readline:= )
filecaps? (
acct-group/bird
acct-user/bird
)
libssh? ( net-libs/libssh:= )"
BDEPEND="sys-devel/flex
sys-devel/bison
sys-devel/m4"

FILECAPS=(
CAP_NET_ADMIN usr/sbin/bird
CAP_NET_BIND_SERVICE usr/sbin/bird
CAP_NET_RAW usr/sbin/bird
)

src_configure() {
econf \
--localstatedir="${EPREFIX}/var" \
$(use_enable client) \
$(use_enable debug) \
$(use_enable libssh)
}

src_install() {
if use client; then
dobin birdc
fi
dobin birdcl
dosbin bird
newinitd "${FILESDIR}/initd-${PN}-2" ${PN}
newconfd "${FILESDIR}/confd-${PN}-2" ${PN}
dodoc doc/bird.conf.example
}

pkg_postinst() {
use filecaps && \
einfo "If you want to run bird as non-root, edit"
einfo "'${EROOT}/etc/conf.d/bird' and set BIRD_GROUP and BIRD_USER with"
einfo "the wanted username."
}
9 changes: 9 additions & 0 deletions net-misc/bird/files/confd-bird-2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# /etc/init.d/bird

# Options to pass to the bird process
# See https://bird.network.cz/?get_doc&v=20&f=bird-1.html#ss1.3
# BIRD_GROUP and BIRD_USER will be appended to BIRD_OPTS

#BIRD_GROUP="bird"
#BIRD_USER="bird"
#BIRD_OPTS=""
16 changes: 14 additions & 2 deletions net-misc/bird/files/initd-bird-2
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Copyright 2019 Alarig Le Lay <alarig@grifon.fr>
# Distributed under the terms of the GNU General Public License v2

Expand All @@ -8,12 +8,20 @@ extra_started_commands="reload"
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/sbin/${RC_SVCNAME}"
retry=15
start_stop_daemon_args="--make-pidfile"

CONF_FILE="/etc/${RC_SVCNAME}.conf"
SOCK="/run/${RC_SVCNAME}.ctl"

if [ ${BIRD_GROUP} ]; then
BIRD_OPTS="${BIRD_OPTS} -g ${BIRD_GROUP}"
fi
if [ ${BIRD_USER} ]; then
BIRD_OPTS="${BIRD_OPTS} -u ${BIRD_USER}"
fi

client_args="-s ${SOCK}"
command_args="${client_args} -c ${CONF_FILE} -P ${pidfile}"
command_args="${client_args} -c ${CONF_FILE} -P ${pidfile} ${BIRD_OPTS}"
client_args="${client_args} -r"

depend() {
Expand Down Expand Up @@ -44,6 +52,10 @@ reload() {
eend $?
}

start_post() {
checkpath -f -m 0655 -o bird:bird "${pidfile}"
}

stop_pre() {
if [ "${RC_CMD}" = "restart" ] ; then
check_run || return 1
Expand Down
4 changes: 4 additions & 0 deletions net-misc/bird/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
</maintainer>
<use>
<flag name="client">Build the ncurses/readline full featured CLI</flag>
<flag name="libssh">
Enables <pkg>net-libs/libssh</pkg> binding, mendatory for RPKI
support
</flag>
</use>
</pkgmetadata>

0 comments on commit bd115f5

Please sign in to comment.