Lines 32-37
Link Here
|
32 |
|
32 |
|
33 |
HACKDIR="${GAMES_DATADIR}/${PN}" |
33 |
HACKDIR="${GAMES_DATADIR}/${PN}" |
34 |
|
34 |
|
|
|
35 |
pkg_setup() { |
36 |
enewgroup nethack |
37 |
} |
38 |
|
35 |
src_unpack() { |
39 |
src_unpack() { |
36 |
unpack ${A} |
40 |
unpack ${A} |
37 |
|
41 |
|
Lines 173-180
Link Here
|
173 |
make_desktop_entry nethack "Nethack" |
177 |
make_desktop_entry nethack "Nethack" |
174 |
|
178 |
|
175 |
prepgamesdirs |
179 |
prepgamesdirs |
176 |
chmod -R 660 "${D}/${statedir}" |
180 |
|
177 |
chmod 770 "${D}/${statedir}" "${D}/${statedir}/save" |
181 |
# Prevent users from modifying state files (#125902) |
|
|
182 |
chgrp -R nethack "${D}/${HACKDIR}" "${D}/${statedir}" || die "chgrp nethack" |
183 |
chmod -R 640 "${D}/${HACKDIR}" || die "chmod hackdir 1" |
184 |
chmod 750 "${D}/${HACKDIR}" || die "chmod hackdir 2" |
185 |
chmod -R 660 "${D}/${statedir}" || die "chmod statedir 1" |
186 |
chmod 770 "${D}/${statedir}" "${D}/${statedir}/save" \ |
187 |
|| die "chmod statedir 2" |
188 |
# Note that ${GAMES_BINDIR}/nethack is a shell script, so we make the |
189 |
# actual binary setgid |
190 |
chgrp nethack \ |
191 |
"${D}/${HACKDIR}/nethack" "${D}/${GAMES_BINDIR}/recover-nethack" \ |
192 |
|| die "chgrp binaries" |
193 |
chmod 2751 \ |
194 |
"${D}/${HACKDIR}/nethack" "${D}/${GAMES_BINDIR}/recover-nethack" \ |
195 |
|| die "chmod binaries" |
178 |
} |
196 |
} |
179 |
|
197 |
|
180 |
pkg_postinst() { |
198 |
pkg_postinst() { |
Lines 184-187
Link Here
|
184 |
ewarn "please see Bug 32629 for more information" |
202 |
ewarn "please see Bug 32629 for more information" |
185 |
fi |
203 |
fi |
186 |
elog "You may want to look at /etc/skel/.nethackrc for interesting options" |
204 |
elog "You may want to look at /etc/skel/.nethackrc for interesting options" |
|
|
205 |
|
206 |
# Yes, Virginia, there is a nethack group (kludge for #125902) |
207 |
chgrp -v -R nethack "${GAMES_STATEDIR}/${PN}" \ |
208 |
|| die "failed to chgrp state dir" |
187 |
} |
209 |
} |