Gentoo Archives: gentoo-commits

From: "Alin Nastac (mrness)" <mrness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dialup/mgetty: ChangeLog mgetty-1.1.36-r2.ebuild
Date: Sun, 07 Sep 2008 09:54:32
Message-Id: E1KcGyT-0002rg-0q@stork.gentoo.org
1 mrness 08/09/07 09:54:29
2
3 Modified: ChangeLog
4 Added: mgetty-1.1.36-r2.ebuild
5 Log:
6 Fix insecure temporary file usage (#235806).
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.89 net-dialup/mgetty/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/mgetty/ChangeLog?rev=1.89&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/mgetty/ChangeLog?rev=1.89&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/mgetty/ChangeLog?r1=1.88&r2=1.89
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-dialup/mgetty/ChangeLog,v
19 retrieving revision 1.88
20 retrieving revision 1.89
21 diff -u -r1.88 -r1.89
22 --- ChangeLog 23 Aug 2008 03:08:01 -0000 1.88
23 +++ ChangeLog 7 Sep 2008 09:54:28 -0000 1.89
24 @@ -1,6 +1,12 @@
25 # ChangeLog for net-dialup/mgetty
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/mgetty/ChangeLog,v 1.88 2008/08/23 03:08:01 cardoe Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/mgetty/ChangeLog,v 1.89 2008/09/07 09:54:28 mrness Exp $
29 +
30 +*mgetty-1.1.36-r2 (07 Sep 2008)
31 +
32 + 07 Sep 2008; Alin Năstac <mrness@g.o>
33 + +files/mgetty-1.1.36-tmpfile.patch, +mgetty-1.1.36-r2.ebuild:
34 + Fix insecure temporary file usage (#235806).
35
36 23 Aug 2008; Doug Goldstein <cardoe@g.o> metadata.xml:
37 add GLEP 56 USE flag desc from use.local.desc
38
39
40
41 1.1 net-dialup/mgetty/mgetty-1.1.36-r2.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/mgetty/mgetty-1.1.36-r2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/mgetty/mgetty-1.1.36-r2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mgetty-1.1.36-r2.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-dialup/mgetty/mgetty-1.1.36-r2.ebuild,v 1.1 2008/09/07 09:54:28 mrness Exp $
51
52 inherit toolchain-funcs flag-o-matic eutils
53
54 DESCRIPTION="fax and voice modem programs"
55 SRC_URI="ftp://mgetty.greenie.net/pub/mgetty/source/1.1/${PN}${PV}-Jun15.tar.gz"
56 HOMEPAGE="http://mgetty.greenie.net/"
57
58 DEPEND="doc? ( virtual/latex-base virtual/texi2dvi )
59 >=sys-apps/sed-4
60 sys-apps/gawk
61 sys-apps/groff
62 dev-lang/perl
63 sys-apps/texinfo
64 fax? ( !net-misc/hylafax )"
65 RDEPEND="${DEPEND}
66 fax? ( media-libs/netpbm virtual/ghostscript )"
67
68 SLOT="0"
69 LICENSE="GPL-2"
70 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
71 IUSE="doc fax fidonet"
72
73 pkg_setup() {
74 enewgroup fax
75 enewuser fax -1 -1 /dev/null fax
76 }
77
78 src_unpack() {
79 unpack ${A}
80
81 cd "${S}"
82 epatch "${FILESDIR}/${P}-gentoo.patch"
83 epatch "${FILESDIR}/${P}-qa-fixes.patch"
84 epatch "${FILESDIR}/${P}-callback.patch" # add callback install to Makefile
85 epatch "${FILESDIR}/Lucent.c.patch" # Lucent modem CallerID patch - bug #80366
86 use fax || epatch "${FILESDIR}/${P}-nofax.patch" # don't install fax related files - bug #195467
87 epatch "${FILESDIR}/${P}-tmpfile.patch" # fix security bug 235806
88
89 sed -e 's:var/log/mgetty:var/log/mgetty/mgetty:' \
90 -e 's:var/log/sendfax:var/log/mgetty/sendfax:' \
91 -e 's:\/\* \(\#define CNDFILE "dialin.config"\) \*\/:\1:' \
92 -e 's:\(\#define FAX_NOTIFY_PROGRAM\).*:\1 "/etc/mgetty+sendfax/new_fax":' \
93 "${S}/policy.h-dist" > "${S}/policy.h"
94
95 sed -i -e 's:/usr/local/lib/mgetty+sendfax:/etc/mgetty+sendfax:' faxrunq.config
96 sed -i -e 's:/usr/local/bin/g3cat:/usr/bin/g3cat:' faxrunq.config fax/faxspool.rules
97
98 sed -e "/^doc-all:/s/mgetty.asc mgetty.info mgetty.dvi mgetty.ps/mgetty.info/" \
99 -i "${S}/doc/Makefile"
100 if use doc; then
101 sed -e "s/^doc-all:/doc-all: mgetty.ps/" \
102 -i "${S}/doc/Makefile"
103 fi
104 }
105
106 src_compile() {
107 use fidonet && append-flags "-DFIDO"
108 append-flags "-DAUTO_PPP"
109
110 # parallel make fix later - 'sedscript' issue
111 VARTEXFONTS="${T}"/fonts make prefix=/usr \
112 CC="$(tc-getCC)" \
113 CONFDIR=/etc/mgetty+sendfax \
114 CFLAGS="${CFLAGS}" \
115 LDFLAGS="${LDFLAGS}" \
116 all vgetty || die "make failed."
117 }
118
119 src_install () {
120 dodir /var/spool
121 keepdir /var/log/mgetty
122 dodir /usr/share/info
123
124 make prefix="${D}/usr" \
125 INFODIR="${D}/usr/share/info" \
126 CONFDIR="${D}/etc/mgetty+sendfax" \
127 MAN1DIR="${D}/usr/share/man/man1" \
128 MAN4DIR="${D}/usr/share/man/man4" \
129 MAN5DIR="${D}/usr/share/man/man5" \
130 MAN8DIR="${D}/usr/share/man/man8" \
131 SBINDIR="${D}/usr/sbin" \
132 BINDIR="${D}/usr/bin" \
133 VOICE_DIR="${D}/var/spool/voice" \
134 PHONE_GROUP=fax \
135 PHONE_PERMS=755 \
136 spool="${D}/var/spool" \
137 install vgetty-install install-callback || die "make install failed."
138
139 #Install mgetty into /sbin (#119078)
140 dodir /sbin && \
141 mv "${D}"/usr/sbin/mgetty "${D}"/sbin && \
142 dosym /sbin/mgetty /usr/sbin/mgetty || die "failed to install /sbin/mgetty"
143 #Don't install ct (#106337)
144 rm "${D}"/usr/bin/ct || die "failed to remove useless ct program"
145
146 cd "${S}"
147 dodoc BUGS ChangeLog README.1st Recommend THANKS TODO \
148 doc/*.txt doc/modems.db || die "dodoc failed."
149 doinfo doc/mgetty.info || die "doinfo failed."
150
151 docinto vgetty
152 dodoc voice/{Readme,Announce,ChangeLog,Credits} || die "vgetty voice failed."
153
154 if use doc; then
155 dodoc doc/mgetty.ps || die "mgetty.ps failed"
156 fi
157
158 docinto vgetty/doc
159 dodoc voice/doc/*
160
161 if use fax; then
162 mv samples/new_fax.all samples_new_fax.all || die "move failed."
163 docinto samples
164 dodoc samples/*
165
166 docinto samples/new_fax
167 dodoc samples_new_fax.all/*
168 fi
169
170 if ! use fax; then
171 insinto /usr/share/${PN}/frontends
172 doins -r frontends/{voice,network}
173 else
174 insinto /usr/share/${PN}
175 doins -r frontends
176 fi
177 insinto /usr/share/${PN}
178 doins -r patches
179 insinto /usr/share/${PN}/voice
180 doins -r voice/{contrib,Perl,scripts}
181
182 diropts -m 0750 -o fax -g fax
183 dodir /var/spool/voice
184 keepdir /var/spool/voice/incoming
185 keepdir /var/spool/voice/messages
186 if use fax; then
187 dodir /var/spool/fax
188 dodir /var/spool/fax/outgoing
189 keepdir /var/spool/fax/outgoing/locks
190 keepdir /var/spool/fax/incoming
191 fi
192 }
193
194 pkg_postinst() {
195 elog "Users who wish to use the fax or voicemail capabilities must be members"
196 elog "of the group fax in order to access files"
197 elog
198 elog "If you want to grab voice messages from a remote location, you must save"
199 elog "the password in /var/spool/voice/.code file"
200 echo
201 ewarn "/var/spool/voice/.code and /var/spool/voice/messages/Index"
202 ewarn "are not longer created by this automatically!"
203 }