Skip site navigation (1)Skip section navigation (2)
Date:      27 Dec 2001 11:40:08 +0100
From:      Jan.Stocker@t-online.de (Jan Stocker)
To:        ports@freebsd.org
Subject:   ports/32872: nethack3-gnome
Message-ID:  <1009449614.333.2.camel@twoflower>
In-Reply-To: <20011226120020.GA8053@titan.klemm.gtn.com>
References:  <1008504457.799.0.camel@twoflower> <20011216132633.GB6493@titan.klemm.gtn.com> <1009367025.22073.0.camel@twoflower>  <20011226120020.GA8053@titan.klemm.gtn.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-uPGceqM9HkYZV2woNo8s
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,
who is responsible to give me access to ports cvs and the reporting
system? This mail contains the patch for ports bug report 32872 and i
want to commit it by myself if i may. Also i want to change the problem
to be solved.

Jan

Changelog: Create binary wrapper with SUID which calls the original
script (moved to share/nethack/nethack-start.sh) cause gtk refuses SUID
programs to start.

--=-uPGceqM9HkYZV2woNo8s
Content-Disposition: attachment; filename="patch-sys::unix::Makefile.top"
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; charset=ISO-8859-1

*** sys/unix/Makefile.top.orig	Tue Jul  4 02:42:05 2000
--- sys/unix/Makefile.top	Wed Dec 26 13:46:52 2001
***************
*** 14,31 ****
  # MAKE =3D make
 =20
  # make NetHack
- PREFIX	 =3D /usr
  GAME     =3D nethack
  # GAME     =3D nethack.prg
  GAMEUID  =3D games
! GAMEGRP  =3D bin
 =20
  # Permissions - some places use setgid instead of setuid, for instance
  # See also the option "SECURE" in include/config.h
! GAMEPERM =3D 04755
! FILEPERM =3D 0644
! EXEPERM  =3D 0755
! DIRPERM  =3D 0755
 =20
  # GAMEDIR also appears in config.h as "HACKDIR".
  # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR
--- 14,30 ----
  # MAKE =3D make
 =20
  # make NetHack
  GAME     =3D nethack
  # GAME     =3D nethack.prg
  GAMEUID  =3D games
! GAMEGRP  =3D games
 =20
  # Permissions - some places use setgid instead of setuid, for instance
  # See also the option "SECURE" in include/config.h
! GAMEPERM =3D 0755
! FILEPERM =3D 0664
! EXEPERM  =3D 02755
! DIRPERM  =3D 0775
 =20
  # GAMEDIR also appears in config.h as "HACKDIR".
  # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR
***************
*** 35,43 ****
  # therefore there should not be anything in GAMEDIR that you want to keep
  # (if there is, you'll have to do the installation by hand or modify the
  # instructions)
! GAMEDIR  =3D $(PREFIX)/games/lib/$(GAME)dir
  VARDIR  =3D $(GAMEDIR)
! SHELLDIR =3D $(PREFIX)/games
 =20
  # per discussion in Install.X11 and Install.Qt
  VARDATND =3D=20
--- 34,42 ----
  # therefore there should not be anything in GAMEDIR that you want to keep
  # (if there is, you'll have to do the installation by hand or modify the
  # instructions)
! GAMEDIR  =3D $(PREFIX)/share/$(GAME)
  VARDIR  =3D $(GAMEDIR)
! SHELLDIR =3D $(PREFIX)/bin
 =20
  # per discussion in Install.X11 and Install.Qt
  VARDATND =3D=20
***************
*** 48,54 ****
  # for BeOS
  # VARDATND =3D beostiles
  # for Gnome
! # VARDATND =3D x11tiles pet_mark.xbm rip.xpm mapbg.xpm
 =20
  VARDATD =3D data oracles options quest.dat rumors
  VARDAT =3D $(VARDATD) $(VARDATND)
--- 47,53 ----
  # for BeOS
  # VARDATND =3D beostiles
  # for Gnome
! VARDATND =3D x11tiles pet_mark.xbm rip.xpm mapbg.xpm
 =20
  VARDATD =3D data oracles options quest.dat rumors
  VARDAT =3D $(VARDATD) $(VARDATND)
***************
*** 170,182 ****
  	sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
  		-e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
  		< sys/unix/nethack.sh \
! 		> $(SHELLDIR)/$(GAME)
  # set up their permissions
  	-( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) ; \
  			$(CHGRP) $(GAMEGRP) $(GAME) )
  	chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
  	-$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
  	$(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
  	chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
 =20
  dofiles-dlb: check-dlb
--- 169,189 ----
  	sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
  		-e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
  		< sys/unix/nethack.sh \
! 		> $(GAMEDIR)/$(GAME)-start.sh
! 	@echo "#include <unistd.h>"   > nethack-wrapper.c=20
! 	@echo "int main(int argc, char *argv[]) {" >> nethack-wrapper.c=20
! 	@echo "    execv(\"$(GAMEDIR)/$(GAME)-start.sh\", argv);}" >> nethack-wr=
apper.c=20
! 	$(CC) $(CFLAGS) -o nethack-wrapper nethack-wrapper.c
! 	cp nethack-wrapper $(SHELLDIR)/$(GAME)
  # set up their permissions
  	-( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) ; \
  			$(CHGRP) $(GAMEGRP) $(GAME) )
  	chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
  	-$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
  	$(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
+ 	chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)-start.sh
+ 	-$(CHOWN) $(GAMEUID) $(GAMEDIR)/$(GAME)-start.sh
+ 	$(CHGRP) $(GAMEGRP) $(GAMEDIR)/$(GAME)-start.sh
  	chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
 =20
  dofiles-dlb: check-dlb
***************
*** 236,241 ****
--- 243,249 ----
  clean:
  	( cd src ; $(MAKE) clean )
  	( cd util ; $(MAKE) clean )
+ 	rm -f nethack-wrapper.c nethack-wrapper
 =20
  # 'make spotless' returns the source tree to near-distribution condition.
  # it removes .o files, executables, and compiled data files

--=-uPGceqM9HkYZV2woNo8s
Content-Disposition: attachment; filename=pkg-plist
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1

bin/nethack
@exec chmod 2755 %D/bin/nethack
@exec chown games:games %D/bin/nethack
share/nethack/nethack
share/nethack/nethack-start.sh
@exec mkdir %D/share/nethack/save
@exec mkdir %D/share/nethack/save
@exec chmod -R 775 %D/share/nethack
@exec chmod 755 %D/share/nethack/nethack
@exec chmod 755 %D/share/nethack/nethack-start.sh
@exec chown games:games %D/share/nethack/save
@unexec rm -rf %D/share/nethack/save
share/doc/nethack/Guidebook.txt
share/nethack/Arc-fila.lev
share/nethack/Arc-filb.lev
share/nethack/Arc-goal.lev
share/nethack/Arc-loca.lev
share/nethack/Arc-strt.lev
share/nethack/Bar-fila.lev
share/nethack/Bar-filb.lev
share/nethack/Bar-goal.lev
share/nethack/Bar-loca.lev
share/nethack/Bar-strt.lev
share/nethack/Cav-fila.lev
share/nethack/Cav-filb.lev
share/nethack/Cav-goal.lev
share/nethack/Cav-loca.lev
share/nethack/Cav-strt.lev
share/nethack/Hea-fila.lev
share/nethack/Hea-filb.lev
share/nethack/Hea-goal.lev
share/nethack/Hea-loca.lev
share/nethack/Hea-strt.lev
share/nethack/Kni-fila.lev
share/nethack/Kni-filb.lev
share/nethack/Kni-goal.lev
share/nethack/Kni-loca.lev
share/nethack/Kni-strt.lev
share/nethack/Mon-fila.lev
share/nethack/Mon-filb.lev
share/nethack/Mon-goal.lev
share/nethack/Mon-loca.lev
share/nethack/Mon-strt.lev
share/nethack/Pri-fila.lev
share/nethack/Pri-filb.lev
share/nethack/Pri-goal.lev
share/nethack/Pri-loca.lev
share/nethack/Pri-strt.lev
share/nethack/Ran-fila.lev
share/nethack/Ran-filb.lev
share/nethack/Ran-goal.lev
share/nethack/Ran-loca.lev
share/nethack/Ran-strt.lev
share/nethack/Rog-fila.lev
share/nethack/Rog-filb.lev
share/nethack/Rog-goal.lev
share/nethack/Rog-loca.lev
share/nethack/Rog-strt.lev
share/nethack/Sam-fila.lev
share/nethack/Sam-filb.lev
share/nethack/Sam-goal.lev
share/nethack/Sam-loca.lev
share/nethack/Sam-strt.lev
share/nethack/Tou-fila.lev
share/nethack/Tou-filb.lev
share/nethack/Tou-goal.lev
share/nethack/Tou-loca.lev
share/nethack/Tou-strt.lev
share/nethack/Val-fila.lev
share/nethack/Val-filb.lev
share/nethack/Val-goal.lev
share/nethack/Val-loca.lev
share/nethack/Val-strt.lev
share/nethack/Wiz-fila.lev
share/nethack/Wiz-filb.lev
share/nethack/Wiz-goal.lev
share/nethack/Wiz-loca.lev
share/nethack/Wiz-strt.lev
share/nethack/air.lev
share/nethack/asmodeus.lev
share/nethack/astral.lev
share/nethack/baalz.lev
share/nethack/bigrm-1.lev
share/nethack/bigrm-2.lev
share/nethack/bigrm-3.lev
share/nethack/bigrm-4.lev
share/nethack/bigrm-5.lev
share/nethack/castle.lev
share/nethack/cmdhelp
share/nethack/data
share/nethack/dungeon
share/nethack/earth.lev
share/nethack/fakewiz1.lev
share/nethack/fakewiz2.lev
share/nethack/fire.lev
share/nethack/help
share/nethack/hh
share/nethack/history
share/nethack/juiblex.lev
share/nethack/knox.lev
share/nethack/license
share/nethack/mapbg.xpm
share/nethack/medusa-1.lev
share/nethack/medusa-2.lev
share/nethack/minefill.lev
share/nethack/minend-1.lev
share/nethack/minend-2.lev
share/nethack/minetn-1.lev
share/nethack/minetn-2.lev
share/nethack/opthelp
share/nethack/options
share/nethack/oracle.lev
share/nethack/oracles
share/nethack/orcus.lev
share/nethack/pet_mark.xbm
share/nethack/quest.dat
share/nethack/rumors
share/nethack/sanctum.lev
share/nethack/soko1-1.lev
share/nethack/soko1-2.lev
share/nethack/soko2-1.lev
share/nethack/soko2-2.lev
share/nethack/soko3-1.lev
share/nethack/soko3-2.lev
share/nethack/soko4-1.lev
share/nethack/soko4-2.lev
share/nethack/tower1.lev
share/nethack/tower2.lev
share/nethack/tower3.lev
share/nethack/valley.lev
share/nethack/water.lev
share/nethack/wizard1.lev
share/nethack/wizard2.lev
share/nethack/wizard3.lev
share/nethack/wizhelp
share/nethack/rip.xpm
share/nethack/x11tiles
@mode 664
share/nethack/logfile
share/nethack/record
share/nethack/perm
@dirrm share/nethack
@dirrm share/doc/nethack

--=-uPGceqM9HkYZV2woNo8s--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1009449614.333.2.camel>