From c89929c39b281565db5dd4fd51c7c1509db976d6 Mon Sep 17 00:00:00 2001 From: Jan-Espen Oversand Date: Fri, 16 Dec 2022 21:16:44 +0100 Subject: net-vpn/vtun: Fix bashism in shell script Fix shell script compatibility issue in rc script (bashism). Closes: https://bugs.gentoo.org/849446 Signed-off-by: Jan-Espen Oversand Closes: https://github.com/gentoo/gentoo/pull/28682 Signed-off-by: Sam James --- net-vpn/vtun/files/vtun.rc | 3 +- net-vpn/vtun/vtun-3.0.3-r3.ebuild | 62 --------------------------------------- net-vpn/vtun/vtun-3.0.3-r4.ebuild | 62 +++++++++++++++++++++++++++++++++++++++ net-vpn/vtun/vtun-3.0.4-r1.ebuild | 57 ----------------------------------- net-vpn/vtun/vtun-3.0.4-r2.ebuild | 57 +++++++++++++++++++++++++++++++++++ 5 files changed, 121 insertions(+), 120 deletions(-) delete mode 100644 net-vpn/vtun/vtun-3.0.3-r3.ebuild create mode 100644 net-vpn/vtun/vtun-3.0.3-r4.ebuild delete mode 100644 net-vpn/vtun/vtun-3.0.4-r1.ebuild create mode 100644 net-vpn/vtun/vtun-3.0.4-r2.ebuild (limited to 'net-vpn') diff --git a/net-vpn/vtun/files/vtun.rc b/net-vpn/vtun/files/vtun.rc index 7ef322985043..9d081eeb4f06 100644 --- a/net-vpn/vtun/files/vtun.rc +++ b/net-vpn/vtun/files/vtun.rc @@ -7,7 +7,8 @@ depend() { } start() { - IFS=$'\n' + IFS=$(printf '\n.'); # Set separator (IFS) to + IFS=${IFS%.}; # Remove - The was because shells remove trailing newlines with $(..) for line in `grep -v '^[[:space:]]*#' /etc/vtund-start.conf | grep -v '^[[:space:]]*$'` do echo $line | diff --git a/net-vpn/vtun/vtun-3.0.3-r3.ebuild b/net-vpn/vtun/vtun-3.0.3-r3.ebuild deleted file mode 100644 index aeebc636d14f..000000000000 --- a/net-vpn/vtun/vtun-3.0.3-r3.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit linux-info - -DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" -HOMEPAGE="http://vtun.sourceforge.net/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 ppc ~sparc x86" -IUSE="lzo socks5 ssl zlib" - -RDEPEND=" - lzo? ( dev-libs/lzo:2 ) - socks5? ( net-proxy/dante ) - ssl? ( dev-libs/openssl:0= ) - zlib? ( sys-libs/zlib ) - dev-libs/libbsd" -DEPEND="${RDEPEND}" -BDEPEND="sys-devel/bison" - -DOCS=( ChangeLog Credits FAQ README README.Setup README.Shaper TODO ) -CONFIG_CHECK="~TUN" - -PATCHES=( - "${FILESDIR}"/${P}-includes.patch - # remove unneeded checking for /etc/vtund.conf - "${FILESDIR}"/${PN}-3.0.2-remove-config-presence-check.patch - # GCC 5 compatibility, patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778164 - "${FILESDIR}"/${P}-gcc5.patch - # openssl 1.1 compatibility, bug 674280 - "${FILESDIR}"/${PN}-libssl-1.1.patch - "${FILESDIR}"/${P}-fno-common.patch - "${FILESDIR}"/${P}-C99-inline.patch -) - -src_prepare() { - default - sed -i -e '/^LDFLAGS/s|=|+=|g' Makefile.in || die - sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die -} - -src_configure() { - econf \ - $(use_enable ssl) \ - $(use_enable zlib) \ - $(use_enable lzo) \ - $(use_enable socks5 socks) \ - --enable-shaper -} - -src_install() { - default - newinitd "${FILESDIR}"/vtun.rc vtun - insinto /etc - doins "${FILESDIR}"/vtund-start.conf - rm -r "${ED}"/var || die -} diff --git a/net-vpn/vtun/vtun-3.0.3-r4.ebuild b/net-vpn/vtun/vtun-3.0.3-r4.ebuild new file mode 100644 index 000000000000..aeebc636d14f --- /dev/null +++ b/net-vpn/vtun/vtun-3.0.3-r4.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-info + +DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +HOMEPAGE="http://vtun.sourceforge.net/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ppc ~sparc x86" +IUSE="lzo socks5 ssl zlib" + +RDEPEND=" + lzo? ( dev-libs/lzo:2 ) + socks5? ( net-proxy/dante ) + ssl? ( dev-libs/openssl:0= ) + zlib? ( sys-libs/zlib ) + dev-libs/libbsd" +DEPEND="${RDEPEND}" +BDEPEND="sys-devel/bison" + +DOCS=( ChangeLog Credits FAQ README README.Setup README.Shaper TODO ) +CONFIG_CHECK="~TUN" + +PATCHES=( + "${FILESDIR}"/${P}-includes.patch + # remove unneeded checking for /etc/vtund.conf + "${FILESDIR}"/${PN}-3.0.2-remove-config-presence-check.patch + # GCC 5 compatibility, patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778164 + "${FILESDIR}"/${P}-gcc5.patch + # openssl 1.1 compatibility, bug 674280 + "${FILESDIR}"/${PN}-libssl-1.1.patch + "${FILESDIR}"/${P}-fno-common.patch + "${FILESDIR}"/${P}-C99-inline.patch +) + +src_prepare() { + default + sed -i -e '/^LDFLAGS/s|=|+=|g' Makefile.in || die + sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die +} + +src_configure() { + econf \ + $(use_enable ssl) \ + $(use_enable zlib) \ + $(use_enable lzo) \ + $(use_enable socks5 socks) \ + --enable-shaper +} + +src_install() { + default + newinitd "${FILESDIR}"/vtun.rc vtun + insinto /etc + doins "${FILESDIR}"/vtund-start.conf + rm -r "${ED}"/var || die +} diff --git a/net-vpn/vtun/vtun-3.0.4-r1.ebuild b/net-vpn/vtun/vtun-3.0.4-r1.ebuild deleted file mode 100644 index 800d5d0feb11..000000000000 --- a/net-vpn/vtun/vtun-3.0.4-r1.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit linux-info - -DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression" -SRC_URI="https://sourceforge.net/projects/vtun/files/${PN}/${PV}/${P}.tar.gz" -HOMEPAGE="https://vtun.sourceforge.net/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" -IUSE="lzo socks5 ssl zlib" - -RDEPEND=" - lzo? ( dev-libs/lzo:2 ) - socks5? ( net-proxy/dante ) - ssl? ( dev-libs/openssl:0= ) - zlib? ( sys-libs/zlib ) - dev-libs/libbsd" -DEPEND="${RDEPEND}" -BDEPEND="sys-devel/bison" - -DOCS=( ChangeLog Credits FAQ README README.Setup README.Shaper TODO ) -CONFIG_CHECK="~TUN" - -PATCHES=( - "${FILESDIR}"/${P}-libssl-ctx.patch - "${FILESDIR}"/${P}-includes.patch - "${FILESDIR}"/${P}-naughty-inlines.patch - "${FILESDIR}"/${P}-autoconf-fork-not-working.patch -) - -src_prepare() { - default - sed -i -e '/^LDFLAGS/s|=|+=|g' Makefile.in || die - sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die -} - -src_configure() { - econf \ - $(use_enable ssl) \ - $(use_enable zlib) \ - $(use_enable lzo) \ - $(use_enable socks5 socks) \ - --enable-shaper -} - -src_install() { - default - newinitd "${FILESDIR}"/vtun.rc vtun - insinto /etc - doins "${FILESDIR}"/vtund-start.conf - rm -r "${ED}"/var || die -} diff --git a/net-vpn/vtun/vtun-3.0.4-r2.ebuild b/net-vpn/vtun/vtun-3.0.4-r2.ebuild new file mode 100644 index 000000000000..800d5d0feb11 --- /dev/null +++ b/net-vpn/vtun/vtun-3.0.4-r2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info + +DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression" +SRC_URI="https://sourceforge.net/projects/vtun/files/${PN}/${PV}/${P}.tar.gz" +HOMEPAGE="https://vtun.sourceforge.net/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="lzo socks5 ssl zlib" + +RDEPEND=" + lzo? ( dev-libs/lzo:2 ) + socks5? ( net-proxy/dante ) + ssl? ( dev-libs/openssl:0= ) + zlib? ( sys-libs/zlib ) + dev-libs/libbsd" +DEPEND="${RDEPEND}" +BDEPEND="sys-devel/bison" + +DOCS=( ChangeLog Credits FAQ README README.Setup README.Shaper TODO ) +CONFIG_CHECK="~TUN" + +PATCHES=( + "${FILESDIR}"/${P}-libssl-ctx.patch + "${FILESDIR}"/${P}-includes.patch + "${FILESDIR}"/${P}-naughty-inlines.patch + "${FILESDIR}"/${P}-autoconf-fork-not-working.patch +) + +src_prepare() { + default + sed -i -e '/^LDFLAGS/s|=|+=|g' Makefile.in || die + sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in || die +} + +src_configure() { + econf \ + $(use_enable ssl) \ + $(use_enable zlib) \ + $(use_enable lzo) \ + $(use_enable socks5 socks) \ + --enable-shaper +} + +src_install() { + default + newinitd "${FILESDIR}"/vtun.rc vtun + insinto /etc + doins "${FILESDIR}"/vtund-start.conf + rm -r "${ED}"/var || die +} -- cgit v1.2.3-65-gdbad