1 |
commit: 8c6196d6e44e6fce001b39bd2db418a44678c63b |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 25 21:04:24 2021 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 25 21:04:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c6196d6 |
7 |
|
8 |
app-misc/screen: security cleanup |
9 |
|
10 |
Bug: https://bugs.gentoo.org/769770 |
11 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
app-misc/screen/screen-4.8.0-r1.ebuild | 158 --------------------------------- |
15 |
1 file changed, 158 deletions(-) |
16 |
|
17 |
diff --git a/app-misc/screen/screen-4.8.0-r1.ebuild b/app-misc/screen/screen-4.8.0-r1.ebuild |
18 |
deleted file mode 100644 |
19 |
index e0b624d80bf..00000000000 |
20 |
--- a/app-misc/screen/screen-4.8.0-r1.ebuild |
21 |
+++ /dev/null |
22 |
@@ -1,158 +0,0 @@ |
23 |
-# Copyright 1999-2021 Gentoo Authors |
24 |
-# Distributed under the terms of the GNU General Public License v2 |
25 |
- |
26 |
-EAPI=7 |
27 |
- |
28 |
-inherit autotools flag-o-matic pam tmpfiles toolchain-funcs |
29 |
- |
30 |
-DESCRIPTION="screen manager with VT100/ANSI terminal emulation" |
31 |
-HOMEPAGE="https://www.gnu.org/software/screen/" |
32 |
- |
33 |
-if [[ "${PV}" != 9999 ]] ; then |
34 |
- SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" |
35 |
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
36 |
-else |
37 |
- inherit git-r3 |
38 |
- EGIT_REPO_URI="https://git.savannah.gnu.org/git/screen.git" |
39 |
- EGIT_CHECKOUT_DIR="${WORKDIR}/${P}" # needed for setting S later on |
40 |
- S="${WORKDIR}"/${P}/src |
41 |
-fi |
42 |
- |
43 |
-LICENSE="GPL-2" |
44 |
-SLOT="0" |
45 |
-IUSE="debug nethack pam selinux multiuser" |
46 |
- |
47 |
-CDEPEND=" |
48 |
- >=sys-libs/ncurses-5.2:0= |
49 |
- pam? ( sys-libs/pam )" |
50 |
-RDEPEND="${CDEPEND} |
51 |
- acct-group/utmp |
52 |
- selinux? ( sec-policy/selinux-screen )" |
53 |
-DEPEND="${CDEPEND} |
54 |
- sys-apps/texinfo" |
55 |
- |
56 |
-PATCHES=( |
57 |
- # Don't use utempter even if it is found on the system. |
58 |
- "${FILESDIR}"/${PN}-4.3.0-no-utempter.patch |
59 |
- "${FILESDIR}"/${PN}-4.6.2-utmp-exit.patch |
60 |
-) |
61 |
- |
62 |
-src_prepare() { |
63 |
- default |
64 |
- |
65 |
- # sched.h is a system header and causes problems with some C libraries |
66 |
- mv sched.h _sched.h || die |
67 |
- sed -i '/include/ s:sched.h:_sched.h:' screen.h || die |
68 |
- |
69 |
- # Fix manpage. |
70 |
- sed -i \ |
71 |
- -e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ |
72 |
- -e "s:/usr/local/screens:${EPREFIX}/tmp/screen:g" \ |
73 |
- -e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \ |
74 |
- -e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \ |
75 |
- -e "s:/local/screens/S\\\-:${EPREFIX}/tmp/screen/S\\\-:g" \ |
76 |
- doc/screen.1 || die |
77 |
- |
78 |
- if [[ ${CHOST} == *-darwin* ]] || use elibc_musl ; then |
79 |
- sed -i -e '/^#define UTMPOK/s/define/undef/' acconfig.h || die |
80 |
- fi |
81 |
- |
82 |
- # disable musl dummy headers for utmp[x] |
83 |
- use elibc_musl && append-cppflags "-D_UTMP_H -D_UTMPX_H" |
84 |
- |
85 |
- # reconfigure |
86 |
- eautoreconf |
87 |
-} |
88 |
- |
89 |
-src_configure() { |
90 |
- append-cppflags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}" |
91 |
- |
92 |
- if [[ ${CHOST} == *-solaris* ]] ; then |
93 |
- # enable msg_header by upping the feature standard compatible |
94 |
- # with c99 mode |
95 |
- append-cppflags -D_XOPEN_SOURCE=600 |
96 |
- fi |
97 |
- |
98 |
- use nethack || append-cppflags "-DNONETHACK" |
99 |
- use debug && append-cppflags "-DDEBUG" |
100 |
- |
101 |
- local myeconfargs=( |
102 |
- --with-socket-dir="${EPREFIX}/tmp/${PN}" |
103 |
- --with-sys-screenrc="${EPREFIX}/etc/screenrc" |
104 |
- --with-pty-mode=0620 |
105 |
- --with-pty-group=5 |
106 |
- --enable-rxvt_osc |
107 |
- --enable-telnet |
108 |
- --enable-colors256 |
109 |
- $(use_enable pam) |
110 |
- ) |
111 |
- econf "${myeconfargs[@]}" |
112 |
-} |
113 |
- |
114 |
-src_compile() { |
115 |
- LC_ALL=POSIX emake comm.h term.h |
116 |
- emake osdef.h |
117 |
- |
118 |
- emake -C doc screen.info |
119 |
- default |
120 |
-} |
121 |
- |
122 |
-src_install() { |
123 |
- local DOCS=( |
124 |
- README ChangeLog INSTALL TODO NEWS* patchlevel.h |
125 |
- doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} |
126 |
- ) |
127 |
- |
128 |
- emake DESTDIR="${D}" SCREEN="${P}" install |
129 |
- |
130 |
- local tmpfiles_perms tmpfiles_group |
131 |
- |
132 |
- if use multiuser || use prefix ; then |
133 |
- fperms 4755 /usr/bin/${P} |
134 |
- tmpfiles_perms="0755" |
135 |
- tmpfiles_group="root" |
136 |
- else |
137 |
- fowners root:utmp /usr/bin/${P} |
138 |
- fperms 2755 /usr/bin/${P} |
139 |
- tmpfiles_perms="0775" |
140 |
- tmpfiles_group="utmp" |
141 |
- fi |
142 |
- |
143 |
- newtmpfiles - screen.conf <<<"d /tmp/screen ${tmpfiles_perms} root ${tmpfiles_group}" |
144 |
- |
145 |
- insinto /usr/share/${PN} |
146 |
- doins terminfo/{screencap,screeninfo.src} |
147 |
- |
148 |
- insinto /etc |
149 |
- doins "${FILESDIR}"/screenrc |
150 |
- |
151 |
- if use pam; then |
152 |
- pamd_mimic_system screen auth |
153 |
- fi |
154 |
- |
155 |
- dodoc "${DOCS[@]}" |
156 |
-} |
157 |
- |
158 |
-pkg_postinst() { |
159 |
- if [[ -z ${REPLACING_VERSIONS} ]] |
160 |
- then |
161 |
- elog "Some dangerous key bindings have been removed or changed to more safe values." |
162 |
- elog "We enable some xterm hacks in our default screenrc, which might break some" |
163 |
- elog "applications. Please check /etc/screenrc for information on these changes." |
164 |
- fi |
165 |
- |
166 |
- # Add /tmp/screen in case it doesn't exist yet. This should solve |
167 |
- # problems like bug #508634 where tmpfiles.d isn't in effect. |
168 |
- local rundir="${EROOT}/tmp/${PN}" |
169 |
- if [[ ! -d ${rundir} ]] ; then |
170 |
- if use multiuser || use prefix ; then |
171 |
- tmpfiles_group="root" |
172 |
- else |
173 |
- tmpfiles_group="utmp" |
174 |
- fi |
175 |
- mkdir -m 0775 "${rundir}" |
176 |
- chgrp ${tmpfiles_group} "${rundir}" |
177 |
- fi |
178 |
- |
179 |
- ewarn "This revision changes the screen socket location to ${rundir}" |
180 |
-} |