mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Install angband non-sgid, with the following side effects:
- Two directories are mode 1777; the user is alerted to this during "make install". - High score reporting doesn't work, to avoid having a world-writable file. - It is presumably possible for one user to prevent another from playing by creating bogus savefiles in the mode 1777 directories. Frankly, I'm not going to devote my time to solving game-play DoS attacks. Previously, certain files (lib/data) were generated the first time angband was run. These files are now obtained from my directory on www.freebsd.org and are installed during "make install". Several cleanups also, while I'm here. This port is no longer BROKEN.
This commit is contained in:
parent
d09301b69a
commit
ac7b5b17c7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=23558
@ -9,22 +9,33 @@
|
||||
DISTNAME= angband-283
|
||||
PKGNAME= angband-2.8.3
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= ftp://export.andrew.cmu.edu/angband/Source/
|
||||
DISTFILES= angband-283.tar.gz ext-x11-283.tar.gz
|
||||
MASTER_SITES= ftp://export.andrew.cmu.edu/angband/Source/ \
|
||||
http://www.freebsd.org/~mph/distfiles/
|
||||
DISTFILES= angband-283.tar.gz ext-x11-283.tar.gz angband-data.tar.gz
|
||||
|
||||
MAINTAINER= mph@freebsd.org
|
||||
|
||||
BROKEN= "Security hole (buffer overflow)"
|
||||
|
||||
USE_X_PREFIX= yes
|
||||
DIST_SUBDIR= angband
|
||||
|
||||
EXTRACT_ONLY= angband-283.tar.gz ext-x11-283.tar.gz
|
||||
|
||||
EXTSRC= ${WRKDIR}/ext-x11-283
|
||||
|
||||
pre-patch:
|
||||
${CP} ${WRKSRC}/src/Makefile.std ${WRKSRC}/src/Makefile
|
||||
|
||||
post-install:
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/angband ${PREFIX}/bin/angband
|
||||
${MKDIR} ${PREFIX}/lib/X11/angband
|
||||
(cd ${WRKSRC}/lib && ${TAR} cf - * ) | (cd ${PREFIX}/lib/X11/angband && tar xf - )
|
||||
(cd ${PREFIX} && ${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/angband-data.tar.gz)
|
||||
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/X11/angband
|
||||
(cd ${PREFIX}/lib/X11/angband && \
|
||||
${CHMOD} 555 apex bone data edit file help info xtra ; \
|
||||
${CHMOD} 1777 save user \
|
||||
)
|
||||
${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m 555 /dev/null ${PREFIX}/lib/X11/angband/apex/scores.raw
|
||||
${INSTALL_DATA} ${EXTSRC}/lib/xtra/tiles.raw \
|
||||
${PREFIX}/lib/X11/angband/xtra
|
||||
@${CAT} ${PKGDIR}/MESSAGE
|
||||
|
@ -1,2 +1,3 @@
|
||||
MD5 (angband/angband-283.tar.gz) = 33c56940cf2f9c7aa265204159ab1cf8
|
||||
MD5 (angband/ext-x11-283.tar.gz) = 05b9b5c0c06bddc24f9e5b62cc4764c7
|
||||
MD5 (angband/angband-data.tar.gz) = 019d7f8484bfb458578f5c0f822fea22
|
||||
|
@ -1,22 +1,12 @@
|
||||
--- Makefile.orig Mon Feb 9 09:38:23 1998
|
||||
+++ Makefile Mon Feb 9 09:38:23 1998
|
||||
@@ -0,0 +1,19 @@
|
||||
--- Makefile.orig Thu Dec 2 10:13:33 1999
|
||||
+++ Makefile Thu Dec 2 10:27:53 1999
|
||||
@@ -0,0 +1,9 @@
|
||||
+# My makefile for Angband
|
||||
+# Matthew Hunt <mph@pobox.com>
|
||||
+# Matthew Hunt <mph@FreeBSD.org>
|
||||
+
|
||||
+CFLAGS+=-I/usr/X11R6/include -D"USE_X11" -D"USE_GCU" -DDEFAULT_PATH=\\\"$(PREFIX)/lib/X11/angband\\\"
|
||||
+CFLAGS+=-I${X11BASE}/include -D"USE_X11" -D"USE_GCU" -DDEFAULT_PATH=\\\"$(PREFIX)/lib/X11/angband\\\"
|
||||
+
|
||||
+all: angband
|
||||
+
|
||||
+angband:
|
||||
+ cd src && make "CFLAGS=$(CFLAGS)"
|
||||
+
|
||||
+install: angband
|
||||
+ install -c -o bin -g games -m 2555 angband ${PREFIX}/bin/angband
|
||||
+ mkdir -p ${PREFIX}/lib/X11/angband
|
||||
+ (cd lib && tar cf - * ) | (cd ${PREFIX}/lib/X11/angband && tar xf - )
|
||||
+ /usr/sbin/chown -R bin.games ${PREFIX}/lib/X11/angband
|
||||
+ (cd ${PREFIX}/lib/X11/angband && \
|
||||
+ /bin/chmod 775 apex bone data edit file help info xtra\
|
||||
+ save user )
|
||||
+ install -o games -g games -m 664 /dev/null ${PREFIX}/lib/X11/angband/apex/scores.raw
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- src/Makefile.orig Mon Feb 9 09:38:23 1998
|
||||
+++ src/Makefile Mon Feb 9 09:38:24 1998
|
||||
--- src/Makefile.orig Thu Dec 2 10:00:10 1999
|
||||
+++ src/Makefile Thu Dec 2 10:12:47 1999
|
||||
@@ -94,7 +94,7 @@
|
||||
#
|
||||
# This is my compiler of choice, it seems to work most everywhere
|
||||
@ -16,16 +16,7 @@
|
||||
-CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU"
|
||||
-LIBS = -lX11 -lcurses -ltermcap
|
||||
+#CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU"
|
||||
+LIBS = -L/usr/X11R6/lib -lX11 -lcurses -ltermcap
|
||||
|
||||
|
||||
##
|
||||
@@ -137,7 +137,7 @@
|
||||
## Variation -- Use "main-xaw.c" instead of "main-x11.c"
|
||||
##
|
||||
#CFLAGS = -Wall -O1 -pipe -g -D"USE_XAW" -D"USE_GCU"
|
||||
-#LIBS = -lXaw -lXmu -lXt -lX11 -lcurses -ltermcap
|
||||
+#LIBS = -L/usr/X11R6/lib -lXaw -lXmu -lXt -lX11 -lcurses -ltermcap
|
||||
+LIBS = -L$(X11BASE)/lib -lX11 -lcurses -ltermcap
|
||||
|
||||
|
||||
##
|
||||
|
@ -4,4 +4,12 @@
|
||||
angband -- -n2
|
||||
To use graphical tiles, use -g:
|
||||
angband -g
|
||||
|
||||
You now have the following world-writable (mode 1777)
|
||||
directories:
|
||||
${PREFIX}/lib/X11/angband/save
|
||||
${PREFIX}/lib/X11/angband/user
|
||||
|
||||
Scores will not be reported to avoid having a world-writable
|
||||
score file.
|
||||
============================================================
|
||||
|
@ -1,5 +1,11 @@
|
||||
bin/angband
|
||||
lib/X11/angband/apex/scores.raw
|
||||
lib/X11/angband/data/f_info.raw
|
||||
lib/X11/angband/data/k_info.raw
|
||||
lib/X11/angband/data/a_info.raw
|
||||
lib/X11/angband/data/e_info.raw
|
||||
lib/X11/angband/data/r_info.raw
|
||||
lib/X11/angband/data/v_info.raw
|
||||
lib/X11/angband/edit/a_info.txt
|
||||
lib/X11/angband/edit/e_info.txt
|
||||
lib/X11/angband/edit/f_info.txt
|
||||
@ -53,27 +59,17 @@ lib/X11/angband/xtra/tiles.raw
|
||||
@exec mkdir -p %D/lib/X11/angband/file
|
||||
@exec mkdir -p %D/lib/X11/angband/help
|
||||
@exec mkdir -p %D/lib/X11/angband/user
|
||||
@exec chown bin.games %D/lib/X11/angband/apex
|
||||
@exec chown bin.games %D/lib/X11/angband/bone
|
||||
@exec chown bin.games %D/lib/X11/angband/data
|
||||
@exec chown bin.games %D/lib/X11/angband/edit
|
||||
@exec chown bin.games %D/lib/X11/angband/file
|
||||
@exec chown bin.games %D/lib/X11/angband/help
|
||||
@exec chown bin.games %D/lib/X11/angband/info
|
||||
@exec chown bin.games %D/lib/X11/angband/xtra
|
||||
@exec chown bin.games %D/lib/X11/angband/save
|
||||
@exec chown bin.games %D/lib/X11/angband/user
|
||||
@exec chmod 775 %D/lib/X11/angband/apex
|
||||
@exec chmod 775 %D/lib/X11/angband/bone
|
||||
@exec chmod 775 %D/lib/X11/angband/data
|
||||
@exec chmod 775 %D/lib/X11/angband/edit
|
||||
@exec chmod 775 %D/lib/X11/angband/file
|
||||
@exec chmod 775 %D/lib/X11/angband/help
|
||||
@exec chmod 775 %D/lib/X11/angband/info
|
||||
@exec chmod 775 %D/lib/X11/angband/xtra
|
||||
@exec chmod 775 %D/lib/X11/angband/save
|
||||
@exec chmod 775 %D/lib/X11/angband/user
|
||||
@exec chmod 664 %D/lib/X11/angband/apex/scores.raw
|
||||
@exec chmod 555 %D/lib/X11/angband/apex
|
||||
@exec chmod 555 %D/lib/X11/angband/bone
|
||||
@exec chmod 555 %D/lib/X11/angband/data
|
||||
@exec chmod 555 %D/lib/X11/angband/edit
|
||||
@exec chmod 555 %D/lib/X11/angband/file
|
||||
@exec chmod 555 %D/lib/X11/angband/help
|
||||
@exec chmod 555 %D/lib/X11/angband/info
|
||||
@exec chmod 555 %D/lib/X11/angband/xtra
|
||||
@exec chmod 1777 %D/lib/X11/angband/save
|
||||
@exec chmod 1777 %D/lib/X11/angband/user
|
||||
@exec chmod 444 %D/lib/X11/angband/apex/scores.raw
|
||||
@dirrm lib/X11/angband/bone
|
||||
@dirrm lib/X11/angband/data
|
||||
@dirrm lib/X11/angband/info
|
||||
|
Loading…
Reference in New Issue
Block a user