Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dialup/ppp/
Date: Thu, 02 Apr 2020 07:18:47
Message-Id: 1585811910.d97a6cdaa517c0c7c2a5658100bc99ea2dc7188c.polynomial-c@gentoo
1 commit: d97a6cdaa517c0c7c2a5658100bc99ea2dc7188c
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 2 07:18:30 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 2 07:18:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d97a6cda
7
8 net-dialup/ppp: Security cleanup
9
10 Bug: https://bugs.gentoo.org/710308
11 Package-Manager: Portage-2.3.96, Repoman-2.3.22
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 net-dialup/ppp/Manifest | 2 -
15 net-dialup/ppp/ppp-2.4.7-r7.ebuild | 230 -------------------------------------
16 2 files changed, 232 deletions(-)
17
18 diff --git a/net-dialup/ppp/Manifest b/net-dialup/ppp/Manifest
19 index 193696f8047..7ecead42b4f 100644
20 --- a/net-dialup/ppp/Manifest
21 +++ b/net-dialup/ppp/Manifest
22 @@ -1,5 +1,3 @@
23 -DIST ppp-2.4.7-patches-7.tar.xz 40540 BLAKE2B 353814692aab3012f5d5ccdecc514d69357826ea7abe64a7581c562f333d868f9766f11516721cf0b116b4c1c8b01daee306d98ef7be356af6e8d16e22fc9fac SHA512 9d34c044ded09424a6d80047e88bb21130a9c2414c9ea4f52c7299d9db08b1391543b50cd97c0c8763e6943591fc325d01932b31966a1374dbfe5e977bbf4356
24 -DIST ppp-2.4.7.tar.gz 688117 BLAKE2B e1c94ce31d98674536929d19e956e4013eb2b02c20c34e6184c0b99b50262ad1cd7fb6f4a1ed302872527a0c164af340e15ad1e2eaf191392c3f6ae2de21f5dd SHA512 e34ce24020af6a73e7a26c83c4f73a9c83fa455b7b363794dba27bf01f70368be06bff779777843949bd77f4bc9385d6ad455ea48bf8fff4e0d73cc8fef16ae2
25 DIST ppp-2.4.8-patches-02.tar.xz 39700 BLAKE2B 8e03ecf306ff415370a96ba2eca4ecdb9daed2eaa569cabbd49b94ff279dc04081cbf6749463556ba42832f4baf6f8f4cbdc0c79d6419f57080b14f3214ca992 SHA512 4f2c08a8c1d659d79c18471b41aac2d18383f86ac22231993609b548f899ee32d1ea3cc25952f00b85d1357e53bad6cf93842c49a59ecf29ed20be3020378e78
26 DIST ppp-2.4.8.tar.gz 697530 BLAKE2B 235114288699db45501bc7d9ce8f36c0b5684ab0dab09da93d7f2b4f7c3eca030ae26e34dfff25efa971374fbd7fde62f121ea6aa69872658f44c5ac8c7850a2 SHA512 a99b3b6c7bd80cd133bda4e29d33c793a76f3b67e1f8db774547e88932ce29564fad390a4f51d3fe30a75e006499b95000b042ae0f64cd360548426f8091a478
27 DIST ppp-dhcpc.tgz 33497 BLAKE2B ca59130012f007cf45af6bcfa468c112b0d521c8b11f42d42c566dd9de55bd6d6f1b1ceb83cbae18cfe79cb5cb36ba6c6858a4718915acc6987295008aca53da SHA512 aeaf791b14f5a09c0e2079072a157e65132cbff46e608bc0724e6a5827a01da934f5006e2774eb7105f83e607a52cb4987238f4385cf6f5cc86cbe305a556738
28
29 diff --git a/net-dialup/ppp/ppp-2.4.7-r7.ebuild b/net-dialup/ppp/ppp-2.4.7-r7.ebuild
30 deleted file mode 100644
31 index 9d5af0507ed..00000000000
32 --- a/net-dialup/ppp/ppp-2.4.7-r7.ebuild
33 +++ /dev/null
34 @@ -1,230 +0,0 @@
35 -# Copyright 1999-2020 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=6
39 -
40 -inherit linux-info multilib pam toolchain-funcs
41 -
42 -PATCH_VER="7"
43 -DESCRIPTION="Point-to-Point Protocol (PPP)"
44 -HOMEPAGE="https://ppp.samba.org/"
45 -SRC_URI="https://download.samba.org/pub/ppp/${P}.tar.gz
46 - https://dev.gentoo.org/~polynomial-c/${P}-patches-${PATCH_VER}.tar.xz
47 - http://www.netservers.net.uk/gpl/ppp-dhcpc.tgz"
48 -
49 -LICENSE="BSD GPL-2"
50 -SLOT="0/${PV}"
51 -KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
52 -IUSE="activefilter atm dhcp eap-tls gtk ipv6 libressl pam radius"
53 -
54 -DEPEND="
55 - activefilter? ( net-libs/libpcap )
56 - atm? ( net-dialup/linux-atm )
57 - pam? ( sys-libs/pam )
58 - gtk? ( x11-libs/gtk+:2 )
59 - !libressl? ( dev-libs/openssl:0= )
60 - libressl? ( dev-libs/libressl:= )
61 -"
62 -RDEPEND="${DEPEND}"
63 -PDEPEND="net-dialup/ppp-scripts"
64 -
65 -src_prepare() {
66 - mv "${WORKDIR}/dhcp" "${S}/pppd/plugins" || die
67 -
68 - if ! use eap-tls ; then
69 - rm "${WORKDIR}"/patch/8?_all_eaptls-* || die
70 - fi
71 - eapply "${WORKDIR}"/patch
72 -
73 - if use atm ; then
74 - einfo "Enabling PPPoATM support"
75 - sed -i '/^#HAVE_LIBATM=yes/s:#::' \
76 - pppd/plugins/pppoatm/Makefile.linux || die
77 - fi
78 -
79 - if ! use activefilter ; then
80 - einfo "Disabling active filter"
81 - sed -i '/^FILTER=y/s:^:#:' pppd/Makefile.linux || die
82 - fi
83 -
84 - if use pam ; then
85 - einfo "Enabling PAM"
86 - sed -i '/^#USE_PAM=y/s:^#::' pppd/Makefile.linux || die
87 - fi
88 -
89 - if use ipv6 ; then
90 - einfo "Enabling IPv6"
91 - sed -i '/#HAVE_INET6/s:#::' pppd/Makefile.linux || die
92 - echo "+ipv6" >> etc.ppp/options || die
93 - fi
94 -
95 - einfo "Enabling CBCP"
96 - sed -i '/^#CBCP=y/s:#::' pppd/Makefile.linux || die
97 -
98 - if use dhcp ; then
99 - einfo "Adding ppp-dhcp plugin files"
100 - sed \
101 - -e '/^SUBDIRS :=/s:$: dhcp:' \
102 - -i pppd/plugins/Makefile.linux || die
103 - fi
104 -
105 - # Set correct libdir
106 - sed -i -e "s:/lib/pppd:/$(get_libdir)/pppd:" \
107 - pppd/{pathnames.h,pppd.8} || die
108 -
109 - if use radius ; then
110 - #set the right paths in radiusclient.conf
111 - sed -e "s:/usr/local/etc:/etc:" \
112 - -e "s:/usr/local/sbin:/usr/sbin:" \
113 - -i pppd/plugins/radius/etc/radiusclient.conf || die
114 - #set config dir to /etc/ppp/radius
115 - sed -i -e "s:/etc/radiusclient:/etc/ppp/radius:g" \
116 - pppd/plugins/radius/{*.8,*.c,*.h} \
117 - pppd/plugins/radius/etc/* || die
118 - else
119 - einfo "Disabling radius"
120 - sed -i -e '/+= radius/s:^:#:' pppd/plugins/Makefile.linux || die
121 - fi
122 -
123 - # Respect our pkg-config settings.
124 - sed -i \
125 - -e 's:pkg-config:$(PKG_CONFIG):' \
126 - contrib/pppgetpass/Makefile.linux || die
127 - sed -i \
128 - -e '/^LIBS/{s:-L/usr/local/ssl/lib::;s:-lcrypto:`$(PKG_CONFIG) --libs libcrypto`:}' \
129 - pppd/Makefile.linux || die
130 -
131 - eapply_user #549588
132 -}
133 -
134 -src_compile() {
135 - tc-export AR CC PKG_CONFIG
136 - emake COPTS="${CFLAGS} -D_GNU_SOURCE"
137 -
138 - # build pppgetpass
139 - cd contrib/pppgetpass || die
140 - if use gtk ; then
141 - emake -f Makefile.linux
142 - else
143 - emake pppgetpass.vt
144 - fi
145 -}
146 -
147 -src_install() {
148 - local i
149 - for i in chat pppd pppdump pppstats ; do
150 - doman ${i}/${i}.8
151 - dosbin ${i}/${i}
152 - done
153 - fperms u+s-w /usr/sbin/pppd
154 -
155 - # Install pppd header files
156 - emake -C pppd INSTROOT="${D}" install-devel
157 -
158 - dosbin pppd/plugins/rp-pppoe/pppoe-discovery
159 -
160 - dodir /etc/ppp/peers
161 - insinto /etc/ppp
162 - insopts -m0600
163 - newins etc.ppp/pap-secrets pap-secrets.example
164 - newins etc.ppp/chap-secrets chap-secrets.example
165 -
166 - insopts -m0644
167 - doins etc.ppp/options
168 -
169 - pamd_mimic_system ppp auth account session
170 -
171 - local PLUGINS_DIR="/usr/$(get_libdir)/pppd/${PV}"
172 - # closing " for syntax coloring
173 - insinto "${PLUGINS_DIR}"
174 - insopts -m0755
175 - doins pppd/plugins/minconn.so
176 - doins pppd/plugins/passprompt.so
177 - doins pppd/plugins/passwordfd.so
178 - doins pppd/plugins/winbind.so
179 - doins pppd/plugins/rp-pppoe/rp-pppoe.so
180 - doins pppd/plugins/pppol2tp/openl2tp.so
181 - doins pppd/plugins/pppol2tp/pppol2tp.so
182 - if use atm ; then
183 - doins pppd/plugins/pppoatm/pppoatm.so
184 - fi
185 - if use dhcp ; then
186 - doins pppd/plugins/dhcp/dhcpc.so
187 - fi
188 - if use radius ; then
189 - doins pppd/plugins/radius/rad{ius,attr,realms}.so
190 -
191 - #Copy radiusclient configuration files (#92878)
192 - insinto /etc/ppp/radius
193 - insopts -m0644
194 - doins pppd/plugins/radius/etc/{dictionary*,issue,port-id-map,radiusclient.conf,realms,servers}
195 -
196 - doman pppd/plugins/radius/pppd-rad{ius,attr}.8
197 - fi
198 -
199 - insinto /etc/modprobe.d
200 - insopts -m0644
201 - newins "${FILESDIR}/modules.ppp" ppp.conf
202 -
203 - dodoc PLUGINS README* SETUP Changes-2.3 FAQ
204 - dodoc "${FILESDIR}/README.mpls"
205 -
206 - dosbin scripts/p{on,off,log}
207 - doman scripts/pon.1
208 -
209 - # Adding misc. specialized scripts to doc dir
210 - insinto /usr/share/doc/${PF}/scripts/chatchat
211 - doins scripts/chatchat/*
212 - insinto /usr/share/doc/${PF}/scripts
213 - doins scripts/*
214 -
215 - if use gtk ; then
216 - dosbin contrib/pppgetpass/{pppgetpass.vt,pppgetpass.gtk}
217 - newsbin contrib/pppgetpass/pppgetpass.sh pppgetpass
218 - else
219 - newsbin contrib/pppgetpass/pppgetpass.vt pppgetpass
220 - fi
221 - doman contrib/pppgetpass/pppgetpass.8
222 -}
223 -
224 -pkg_postinst() {
225 - if linux-info_get_any_version && linux_config_src_exists ; then
226 - echo
227 - ewarn "If the following test report contains a missing kernel configuration option that you need,"
228 - ewarn "you should reconfigure and rebuild your kernel before running pppd."
229 - CONFIG_CHECK="~PPP ~PPP_ASYNC ~PPP_SYNC_TTY"
230 - local ERROR_PPP="CONFIG_PPP:\t missing PPP support (REQUIRED)"
231 - local ERROR_PPP_ASYNC="CONFIG_PPP_ASYNC:\t missing asynchronous serial line discipline (optional, but highly recommended)"
232 - local WARNING_PPP_SYNC_TTY="CONFIG_PPP_SYNC_TTY:\t missing synchronous serial line discipline (optional; used by 'sync' pppd option)"
233 - if use activefilter ; then
234 - CONFIG_CHECK="${CONFIG_CHECK} ~PPP_FILTER"
235 - local ERROR_PPP_FILTER="CONFIG_PPP_FILTER:\t missing PPP filtering support (REQUIRED)"
236 - fi
237 - CONFIG_CHECK="${CONFIG_CHECK} ~PPP_DEFLATE ~PPP_BSDCOMP ~PPP_MPPE"
238 - local ERROR_PPP_DEFLATE="CONFIG_PPP_DEFLATE:\t missing Deflate compression (optional, but highly recommended)"
239 - local ERROR_PPP_BSDCOMP="CONFIG_PPP_BSDCOMP:\t missing BSD-Compress compression (optional, but highly recommended)"
240 - local WARNING_PPP_MPPE="CONFIG_PPP_MPPE:\t missing MPPE encryption (optional, mostly used by PPTP links)"
241 - CONFIG_CHECK="${CONFIG_CHECK} ~PPPOE ~PACKET"
242 - local WARNING_PPPOE="CONFIG_PPPOE:\t missing PPPoE support (optional, needed by rp-pppoe plugin)"
243 - local WARNING_PACKET="CONFIG_PACKET:\t missing AF_PACKET support (optional, used by rp-pppoe and dhcpc plugins)"
244 - if use atm ; then
245 - CONFIG_CHECK="${CONFIG_CHECK} ~PPPOATM"
246 - local WARNING_PPPOATM="CONFIG_PPPOATM:\t missing PPPoA support (optional, needed by pppoatm plugin)"
247 - fi
248 - check_extra_config
249 - fi
250 -
251 - # create *-secrets files if not exists
252 - [ -f "${ROOT}/etc/ppp/pap-secrets" ] || \
253 - cp -pP "${ROOT}/etc/ppp/pap-secrets.example" "${ROOT}/etc/ppp/pap-secrets"
254 - [ -f "${ROOT}/etc/ppp/chap-secrets" ] || \
255 - cp -pP "${ROOT}/etc/ppp/chap-secrets.example" "${ROOT}/etc/ppp/chap-secrets"
256 -
257 - # lib name has changed
258 - sed -i -e "s:^pppoe.so:rp-pppoe.so:" "${ROOT}/etc/ppp/options" || die
259 -
260 - echo
261 - elog "Pon, poff and plog scripts have been supplied for experienced users."
262 - elog "Users needing particular scripts (ssh,rsh,etc.) should check out the"
263 - elog "/usr/share/doc/${PF}/scripts directory."
264 -}