diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-03-12 12:04:10 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-03-12 12:04:10 -0700 |
commit | 995be66f0f0d26d1a96cbb8dfb429c3941157771 (patch) | |
tree | bdfcd011288f3ee5ca2ae228c5830f8d11b9f41f /lib-src/Makefile.in | |
parent | f7040f5b1615162845c84f41125f008a5eb604f3 (diff) | |
download | emacs-995be66f0f0d26d1a96cbb8dfb429c3941157771.tar.gz |
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/Makefile.in')
-rw-r--r-- | lib-src/Makefile.in | 50 |
1 files changed, 23 insertions, 27 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@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@ WERROR_CFLAGS = @WERROR_CFLAGS@ -UPDATE_MANIFEST = @UPDATE_MANIFEST@ # Program name transformation. TRANSFORM = @program_transform_name@ @@ -130,9 +129,15 @@ abs_top_srcdir=@abs_top_srcdir@ # to '../configure'. archlibdir=@archlibdir@ -gamedir=@gamedir@ +# User or group of the auxiliary program update-game-score, which is +# installed on platforms with a game directory shared by multiple users. +# On other platforms Emacs can update the score files itself. gameuser=@gameuser@ gamegroup=@gamegroup@ +# Where to install game score files, if gameuser or gamegroup is nonempty. +gamedir=@gamedir@ +# Nonempty if and only if a shared gamedir is used. +use_gamedir=$(gameuser)$(gamegroup) # ==================== Utility Programs for the Build ================= @@ -156,13 +161,13 @@ INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \ # Things that Emacs runs internally, or during the build process, # which should not be installed in bindir. UTILITIES = profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \ - update-game-score${EXEEXT} + $(and $(use_gamedir), update-game-score${EXEEXT}) DONT_INSTALL= make-docfile${EXEEXT} # Like UTILITIES, but they're not system-dependent, and should not be # deleted by the distclean target. -SCRIPTS= rcs2log $(UPDATE_MANIFEST) +SCRIPTS= rcs2log # All files that are created by the linker, i.e., whose names end in ${EXEEXT}. EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} @@ -258,9 +263,6 @@ maybe-blessmail: $(BLESSMAIL_TARGET) ## Install the internal utilities. Until they are installed, we can ## just run them directly from lib-src. -## If the chown/chmod commands fail, that is not a big deal. -## update-game-score will detect at runtime that it is not setuid, -## and handle things accordingly. $(DESTDIR)${archlibdir}: all @echo @echo "Installing utilities run internally by Emacs." @@ -272,28 +274,22 @@ $(DESTDIR)${archlibdir}: all "$(DESTDIR)${archlibdir}/$$file" || exit; \ done ; \ fi - umask 022 && ${MKDIR_P} "$(DESTDIR)${gamedir}" && \ + ifneq (,$(use_gamedir)) + umask 022 && ${MKDIR_P} "$(DESTDIR)${gamedir}" touch "$(DESTDIR)${gamedir}/snake-scores" \ "$(DESTDIR)${gamedir}/tetris-scores" -ifneq ($(gameuser),) - if chown ${gameuser} \ - "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ - chmod u+s,go-r \ - "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ - then \ - chown ${gameuser} "$(DESTDIR)${gamedir}" && \ - chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"; \ - fi -else ifneq ($(gamegroup),) - if chgrp ${gamegroup} \ - "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ - chmod g+s,o-r \ - "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ - then \ - chgrp ${gamegroup} "$(DESTDIR)${gamedir}" && \ - chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"; \ - fi -endif + ifneq (,$(gameuser)) + chown ${gameuser} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" + chmod u+s,go-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" + chown ${gameuser} "$(DESTDIR)${gamedir}" + chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}" + else + chgrp ${gamegroup} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" + chmod g+s,o-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" + chgrp ${gamegroup} "$(DESTDIR)${gamedir}" + chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}" + endif + endif exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd` && \ if [ "$$exp_archlibdir" != "`cd ${srcdir} && /bin/pwd`" ]; then \ for file in ${SCRIPTS}; do \ |