diff options
author | mph <mph@FreeBSD.org> | 1999-12-03 03:19:03 +0800 |
---|---|---|
committer | mph <mph@FreeBSD.org> | 1999-12-03 03:19:03 +0800 |
commit | a7b8d601ba24dcb320151f9a3738414a9a8254fd (patch) | |
tree | e1fb30c4cb1b3a13cae04539405eef6ef4f58b4a /games | |
parent | c40b2b1eef8023744f014c698afc4b47ce49ea6e (diff) | |
download | freebsd-ports-gnome-a7b8d601ba24dcb320151f9a3738414a9a8254fd.tar.gz freebsd-ports-gnome-a7b8d601ba24dcb320151f9a3738414a9a8254fd.tar.zst freebsd-ports-gnome-a7b8d601ba24dcb320151f9a3738414a9a8254fd.zip |
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.
Diffstat (limited to 'games')
-rw-r--r-- | games/angband/Makefile | 21 | ||||
-rw-r--r-- | games/angband/distinfo | 1 | ||||
-rw-r--r-- | games/angband/files/patch-aa | 20 | ||||
-rw-r--r-- | games/angband/files/patch-ad | 15 | ||||
-rw-r--r-- | games/angband/pkg-message | 8 | ||||
-rw-r--r-- | games/angband/pkg-plist | 38 |
6 files changed, 50 insertions, 53 deletions
diff --git a/games/angband/Makefile b/games/angband/Makefile index 560604a53cae..97880e00f5c9 100644 --- a/games/angband/Makefile +++ b/games/angband/Makefile @@ -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 diff --git a/games/angband/distinfo b/games/angband/distinfo index 505fda3e6e18..c767d6804332 100644 --- a/games/angband/distinfo +++ b/games/angband/distinfo @@ -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 diff --git a/games/angband/files/patch-aa b/games/angband/files/patch-aa index c3b60cdd303f..3c8cdb8348f6 100644 --- a/games/angband/files/patch-aa +++ b/games/angband/files/patch-aa @@ -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 diff --git a/games/angband/files/patch-ad b/games/angband/files/patch-ad index 4ff8860be1cc..ab45c2154585 100644 --- a/games/angband/files/patch-ad +++ b/games/angband/files/patch-ad @@ -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 ## diff --git a/games/angband/pkg-message b/games/angband/pkg-message index a5d7e9b9818c..0324550bc33a 100644 --- a/games/angband/pkg-message +++ b/games/angband/pkg-message @@ -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. ============================================================ diff --git a/games/angband/pkg-plist b/games/angband/pkg-plist index 6b4c69d1977f..2e7cb33406d0 100644 --- a/games/angband/pkg-plist +++ b/games/angband/pkg-plist @@ -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 |