Diff ufw-0.35-r1 with a ufw-0.36

/usr/portage/net-firewall/ufw/ufw-0.36.ebuild 2020-01-05 14:15:00.000000000 +0300
1 1
# Copyright 1999-2020 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=7
5

  
5 6
PYTHON_COMPAT=( python{2_7,3_6} )
6 7
DISTUTILS_IN_SOURCE_BUILD=1
7 8

  
8
inherit bash-completion-r1 eutils linux-info distutils-r1 systemd
9
inherit bash-completion-r1 distutils-r1 eutils linux-info systemd
9 10

  
10 11
DESCRIPTION="A program used to manage a netfilter firewall"
11 12
HOMEPAGE="https://launchpad.net/ufw"
......
16 17
KEYWORDS="amd64 ia64 ppc ppc64 sparc x86"
17 18
IUSE="examples ipv6"
18 19

  
19
DEPEND="sys-devel/gettext"
20
DEPEND=""
21

  
20 22
RDEPEND=">=net-firewall/iptables-1.4[ipv6?]
21 23
	!<kde-misc/kcm-ufw-0.4.2
22
	!<net-firewall/ufw-frontends-0.3.2
23
"
24
	!<net-firewall/ufw-frontends-0.3.2"
25

  
26
BDEPEND="sys-devel/gettext"
24 27

  
25 28
# tests fail; upstream bug: https://bugs.launchpad.net/ufw/+bug/815982
26 29
RESTRICT="test"
27 30

  
28 31
PATCHES=(
29
	# Remove unnecessary build time dependency on net-firewall/iptables.
30
	"${FILESDIR}"/${PN}-0.33-dont-check-iptables.patch
31 32
	# Move files away from /lib/ufw.
32
	"${FILESDIR}"/${PN}-0.35-move-path.patch
33
	"${FILESDIR}/${P}-move-path.patch"
34
	# Remove unnecessary build time dependency on net-firewall/iptables.
35
	"${FILESDIR}/${P}-dont-check-iptables.patch"
33 36
	# Remove shebang modification.
34
	"${FILESDIR}"/${PN}-0.34_pre805-shebang.patch
37
	"${FILESDIR}/${P}-shebang.patch"
35 38
	# Fix bash completions, bug #526300
36
	"${FILESDIR}"/${P}-bash-completion.patch
39
	"${FILESDIR}/${P}-bash-completion.patch"
37 40
)
38 41

  
39 42
pkg_pretend() {
......
79 82
		NF_CONNTRACK_NETBIOS_NS || nf_conntrack_netbios_ns_ok="no"
80 83

  
81 84
	# This is better than an essay for each unset option...
82
	if [[ ${nf_nat_ftp_ok} = no ]] || [[ ${nf_conntrack_ftp_ok} = no ]] \
83
		|| [[ ${nf_conntrack_netbios_ns_ok} = no ]]
84
	then
85
	if [[ "${nf_nat_ftp_ok}" == "no" ]] || \
86
	   [[ "${nf_conntrack_ftp_ok}" == "no" ]] || \
87
	   [[ "${nf_conntrack_netbios_ns_ok}" == "no" ]]; then
85 88
		echo
86 89
		local mod_msg="Kernel options listed below are not set. They are not"
87 90
		mod_msg+=" mandatory, but they are often useful."
88 91
		mod_msg+=" If you don't need some of them, please remove relevant"
89 92
		mod_msg+=" module name(s) from IPT_MODULES in"
90
		mod_msg+=" '${EROOT}etc/default/ufw' before (re)starting ufw."
93
		mod_msg+=" '${EROOT}/etc/default/ufw' before (re)starting ufw."
91 94
		mod_msg+=" Otherwise ufw may fail to start!"
92 95
		ewarn "${mod_msg}"
93
		if [[ ${nf_nat_ftp_ok} = no ]]; then
96
		if [[ "${nf_nat_ftp_ok}" == "no" ]]; then
94 97
			ewarn "NF_NAT_FTP: for better support for active mode FTP."
95 98
		fi
96
		if [[ ${nf_conntrack_ftp_ok} = no ]]; then
99
		if [[ "${nf_conntrack_ftp_ok}" == "no" ]]; then
97 100
			ewarn "NF_CONNTRACK_FTP: for better support for active mode FTP."
98 101
		fi
99
		if [[ ${nf_conntrack_netbios_ns_ok} = no ]]; then
102
		if [[ "${nf_conntrack_netbios_ns_ok}" == "no" ]]; then
100 103
			ewarn "NF_CONNTRACK_NETBIOS_NS: for better Samba support."
101 104
		fi
102 105
	fi
......
141 144
	doexe tests/check-requirements
142 145

  
143 146
	# users normally would want it
144
	insinto /usr/share/doc/${PF}/logging/syslog-ng
145
	doins "${FILESDIR}"/syslog-ng/*
147
	insinto "/usr/share/doc/${PF}/logging/syslog-ng"
148
	doins -r "${FILESDIR}"/syslog-ng/*
146 149

  
147
	insinto /usr/share/doc/${PF}/logging/rsyslog
148
	doins "${FILESDIR}"/rsyslog/*
150
	insinto "/usr/share/doc/${PF}/logging/rsyslog"
151
	doins -r "${FILESDIR}"/rsyslog/*
149 152
	doins doc/rsyslog.example
150 153

  
151 154
	if use examples; then
152
		insinto /usr/share/doc/${PF}/examples
153
		doins examples/*
155
		insinto "/usr/share/doc/${PF}/examples"
156
		doins -r examples/*
154 157
	fi
155
	newbashcomp shell-completion/bash ${PN}
158
	newbashcomp shell-completion/bash "${PN}"
156 159

  
157
	[[ $_EMPTY_LOCALE_LIST != yes ]] && domo locales/mo/*.mo
160
	[[ $_EMPTY_LOCALE_LIST != "yes" ]] && domo locales/mo/*.mo
158 161

  
159 162
	distutils-r1_python_install_all
160
	python_replicate_script "${D}usr/sbin/ufw"
163
	python_replicate_script "${D}/usr/sbin/ufw"
161 164
}
162 165

  
163 166
pkg_postinst() {
164 167
	local print_check_req_warn
165 168
	print_check_req_warn=false
166 169

  
167
	if [[ -z ${REPLACING_VERSIONS} ]]; then
170
	if [[ -z "${REPLACING_VERSIONS}" ]]; then
168 171
		echo
169 172
		elog "To enable ufw, add it to boot sequence and activate it:"
170 173
		elog "-- # rc-update add ufw boot"
......
174 177
		elog "/usr/share/doc/${PF}/logging."
175 178
		print_check_req_warn=true
176 179
	else
177
		for rv in ${REPLACING_VERSIONS}; do
180
		local rv
181
		for rv in "${REPLACING_VERSIONS}"; do
178 182
			local major=${rv%%.*}
179 183
			local minor=${rv#${major}.}
180
			if [[ ${major} -eq 0 && ${minor} -lt 34 ]]; then
184
			if [[ "${major}" -eq 0 && "${minor}" -lt 34 ]]; then
181 185
				print_check_req_warn=true
182 186
			fi
183 187
		done
184 188
	fi
185
	if $print_check_req_warn; then
189
	if [[ "${print_check_req_warn}" == "true" ]]; then
186 190
		echo
187 191
		elog "/usr/share/ufw/check-requirements script is installed."
188 192
		elog "It is useful for debugging problems with ufw. However one"
Thank you!