aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert2017-03-12 12:04:10 -0700
committerPaul Eggert2017-03-12 12:04:10 -0700
commit995be66f0f0d26d1a96cbb8dfb429c3941157771 (patch)
treebdfcd011288f3ee5ca2ae228c5830f8d11b9f41f /lib-src
parentf7040f5b1615162845c84f41125f008a5eb604f3 (diff)
downloademacs-995be66f0f0d26d1a96cbb8dfb429c3941157771.tar.gz
emacs-995be66f0f0d26d1a96cbb8dfb429c3941157771.zip
Install update-game-score only on request
Most distributions do not install update-game-score properly due to setuid/setgid complications, so install it only when the installer specifies a user or group (Bug#25895). * .gitattributes: Remove lib-src/update-game-score.exe.manifest. * Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME): New vars. (epaths-force): Use PATH_GAME. (uninstall): Remove snake-scores and tetris-scores only if shared. * configure.ac: Default --with-gameuser to 'no'. (UPDATE_MANIFEST): Remove. * etc/NEWS: Mention this. * lib-src/Makefile.in (UPDATE_MANIFEST): Remove. (use_gamedir): New macro. (UTILITIES): Remove update-game-score unless use_gamedir. (SCRIPTS): Remove $(UPDATE_MANIFEST). ($(DESTDIR)${archlibdir}): Install game directory program and data only if use_gamedir. * lib-src/update-game-score.exe.manifest: Remove, as update-game-score is no longer installed on MS-Windows. * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score): Use auxiliary program only if setuid or setgid. * make-dist: Do not distribute update-game-score.exe.manifest. * src/callproc.c (init_callproc): Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT. (syms_of_callproc): Remove unnecessary initialization of Vshared_game_score_directory.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/Makefile.in50
-rw-r--r--lib-src/update-game-score.exe.manifest10
2 files changed, 23 insertions, 37 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 88f62805765..d0aa9cc7c27 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -40,7 +40,6 @@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
40PROFILING_CFLAGS = @PROFILING_CFLAGS@ 40PROFILING_CFLAGS = @PROFILING_CFLAGS@
41WARN_CFLAGS = @WARN_CFLAGS@ 41WARN_CFLAGS = @WARN_CFLAGS@
42WERROR_CFLAGS = @WERROR_CFLAGS@ 42WERROR_CFLAGS = @WERROR_CFLAGS@
43UPDATE_MANIFEST = @UPDATE_MANIFEST@
44 43
45# Program name transformation. 44# Program name transformation.
46TRANSFORM = @program_transform_name@ 45TRANSFORM = @program_transform_name@
@@ -130,9 +129,15 @@ abs_top_srcdir=@abs_top_srcdir@
130# to '../configure'. 129# to '../configure'.
131archlibdir=@archlibdir@ 130archlibdir=@archlibdir@
132 131
133gamedir=@gamedir@ 132# User or group of the auxiliary program update-game-score, which is
133# installed on platforms with a game directory shared by multiple users.
134# On other platforms Emacs can update the score files itself.
134gameuser=@gameuser@ 135gameuser=@gameuser@
135gamegroup=@gamegroup@ 136gamegroup=@gamegroup@
137# Where to install game score files, if gameuser or gamegroup is nonempty.
138gamedir=@gamedir@
139# Nonempty if and only if a shared gamedir is used.
140use_gamedir=$(gameuser)$(gamegroup)
136 141
137# ==================== Utility Programs for the Build ================= 142# ==================== Utility Programs for the Build =================
138 143
@@ -156,13 +161,13 @@ INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \
156# Things that Emacs runs internally, or during the build process, 161# Things that Emacs runs internally, or during the build process,
157# which should not be installed in bindir. 162# which should not be installed in bindir.
158UTILITIES = profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \ 163UTILITIES = profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \
159 update-game-score${EXEEXT} 164 $(and $(use_gamedir), update-game-score${EXEEXT})
160 165
161DONT_INSTALL= make-docfile${EXEEXT} 166DONT_INSTALL= make-docfile${EXEEXT}
162 167
163# Like UTILITIES, but they're not system-dependent, and should not be 168# Like UTILITIES, but they're not system-dependent, and should not be
164# deleted by the distclean target. 169# deleted by the distclean target.
165SCRIPTS= rcs2log $(UPDATE_MANIFEST) 170SCRIPTS= rcs2log
166 171
167# All files that are created by the linker, i.e., whose names end in ${EXEEXT}. 172# All files that are created by the linker, i.e., whose names end in ${EXEEXT}.
168EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} 173EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}
@@ -258,9 +263,6 @@ maybe-blessmail: $(BLESSMAIL_TARGET)
258 263
259## Install the internal utilities. Until they are installed, we can 264## Install the internal utilities. Until they are installed, we can
260## just run them directly from lib-src. 265## just run them directly from lib-src.
261## If the chown/chmod commands fail, that is not a big deal.
262## update-game-score will detect at runtime that it is not setuid,
263## and handle things accordingly.
264$(DESTDIR)${archlibdir}: all 266$(DESTDIR)${archlibdir}: all
265 @echo 267 @echo
266 @echo "Installing utilities run internally by Emacs." 268 @echo "Installing utilities run internally by Emacs."
@@ -272,28 +274,22 @@ $(DESTDIR)${archlibdir}: all
272 "$(DESTDIR)${archlibdir}/$$file" || exit; \ 274 "$(DESTDIR)${archlibdir}/$$file" || exit; \
273 done ; \ 275 done ; \
274 fi 276 fi
275 umask 022 && ${MKDIR_P} "$(DESTDIR)${gamedir}" && \ 277 ifneq (,$(use_gamedir))
278 umask 022 && ${MKDIR_P} "$(DESTDIR)${gamedir}"
276 touch "$(DESTDIR)${gamedir}/snake-scores" \ 279 touch "$(DESTDIR)${gamedir}/snake-scores" \
277 "$(DESTDIR)${gamedir}/tetris-scores" 280 "$(DESTDIR)${gamedir}/tetris-scores"
278ifneq ($(gameuser),) 281 ifneq (,$(gameuser))
279 if chown ${gameuser} \ 282 chown ${gameuser} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"
280 "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ 283 chmod u+s,go-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"
281 chmod u+s,go-r \ 284 chown ${gameuser} "$(DESTDIR)${gamedir}"
282 "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ 285 chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"
283 then \ 286 else
284 chown ${gameuser} "$(DESTDIR)${gamedir}" && \ 287 chgrp ${gamegroup} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"
285 chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"; \ 288 chmod g+s,o-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"
286 fi 289 chgrp ${gamegroup} "$(DESTDIR)${gamedir}"
287else ifneq ($(gamegroup),) 290 chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"
288 if chgrp ${gamegroup} \ 291 endif
289 "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ 292 endif
290 chmod g+s,o-r \
291 "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \
292 then \
293 chgrp ${gamegroup} "$(DESTDIR)${gamedir}" && \
294 chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"; \
295 fi
296endif
297 exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd` && \ 293 exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd` && \
298 if [ "$$exp_archlibdir" != "`cd ${srcdir} && /bin/pwd`" ]; then \ 294 if [ "$$exp_archlibdir" != "`cd ${srcdir} && /bin/pwd`" ]; then \
299 for file in ${SCRIPTS}; do \ 295 for file in ${SCRIPTS}; do \
diff --git a/lib-src/update-game-score.exe.manifest b/lib-src/update-game-score.exe.manifest
deleted file mode 100644
index 1db836bec6b..00000000000
--- a/lib-src/update-game-score.exe.manifest
+++ /dev/null
@@ -1,10 +0,0 @@
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3 <v3:trustInfo xmlns:v3="urn:schemas-microsoft-com:asm.v3">
4 <v3:security>
5 <v3:requestedPrivileges>
6 <v3:requestedExecutionLevel level="asInvoker" />
7 </v3:requestedPrivileges>
8 </v3:security>
9 </v3:trustInfo>
10</assembly>