From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Dec 17 08:50:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C6E6D9D for ; Tue, 17 Dec 2013 08:50:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2933D1A9B for ; Tue, 17 Dec 2013 08:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rBH8o2RO038723 for ; Tue, 17 Dec 2013 08:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rBH8o1aV038722; Tue, 17 Dec 2013 08:50:01 GMT (envelope-from gnats) Resent-Date: Tue, 17 Dec 2013 08:50:01 GMT Resent-Message-Id: <201312170850.rBH8o1aV038722@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, David Demelier Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4355D7C for ; Tue, 17 Dec 2013 08:48:50 +0000 (UTC) Received: from postfix.malikania.fr (ks3292218.kimsufi.com [5.135.187.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6F28E1A89 for ; Tue, 17 Dec 2013 08:48:50 +0000 (UTC) Received: from postfix.malikania.fr (unknown [10.0.0.5]) by postfix.malikania.fr (Postfix) with ESMTPS id 769EEE514 for ; Tue, 17 Dec 2013 09:48:47 +0100 (CET) Received: by postfix.malikania.fr (sSMTP sendmail emulation); Tue, 17 Dec 2013 09:48:45 +0100 Message-Id: <20131217084847.769EEE514@postfix.malikania.fr> Date: Tue, 17 Dec 2013 09:48:45 +0100 From: "David Demelier" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/184920: [patch] games/nsnake: fix permissions and fix score file X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: David Demelier List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2013 08:50:02 -0000 >Number: 184920 >Category: ports >Synopsis: [patch] games/nsnake: fix permissions and fix score file >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Dec 17 08:50:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: David Demelier >Release: FreeBSD 9.2-RELEASE amd64 >Organization: >Environment: System: FreeBSD Pomme.malikania.fr 9.2-RELEASE FreeBSD 9.2-RELEASE #1 r255916: Fri Sep 27 22:34:59 CEST 2013 root@Pomme.malikania.fr:/usr/obj/usr/src/sys/Pomme amd64 >Description: Since the commiter switched to a custom install, the permissions were wrong. The binary must have the setuid bit to allow scoring. bin/nsnake will be installed as games:games and setuid set. Then we create /var/db/nsnake for saving best scores. >How-To-Repeat: >Fix: I'm currently new to staging so I hope this looks correct. --- nsnake.diff begins here --- --- Makefile.orig 2013-12-17 09:08:54.000000000 +0100 +++ Makefile 2013-12-17 09:38:59.000000000 +0100 @@ -15,22 +15,25 @@ OPTIONS_DEFINE= DOCS MAN6= ${PORTNAME}.6 -PORTDOCS= CHANGELOG -PLIST_FILES= bin/${PORTNAME} -NO_STAGE= yes .include +.if ${PORT_OPTIONS:MDOCS} +PLIST_SUB+= DOCS="" +.else +PLIST_SUB+= DOCS="@comment " +.endif + do-build: (cd ${WRKSRC} && ${CC} ${CFLAGS} -o ${PORTNAME} ${PORTNAME}.c -lcurses) do-install: (cd ${WRKSRC} \ - && ${INSTALL_PROGRAM} ${PORTNAME} ${PREFIX}/bin \ - && ${INSTALL_MAN} ${PORTNAME}.6 ${MANPREFIX}/man/man6) + && ${INSTALL_PROGRAM} ${PORTNAME} ${STAGEDIR}${PREFIX}/bin \ + && ${INSTALL_MAN} ${PORTNAME}.6 ${STAGEDIR}${MANPREFIX}/man/man6) .if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - (cd ${WRKSRC} && ${INSTALL_DATA} CHANGELOG ${DOCSDIR}) + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} CHANGELOG ${STAGEDIR}${DOCSDIR}) .endif .include --- /dev/null 2013-12-17 09:42:27.000000000 +0100 +++ pkg-plist 2013-12-17 09:41:10.000000000 +0100 @@ -0,0 +1,8 @@ +@owner games +@group games +@mode 4555 +bin/nsnake +%%DOCS%%%%DOCSDIR%%/CHANGELOG +@dirrmtry %%DOCSDIR%% +@exec mkdir -p /var/db/nsnake +@exec chown games:games /var/db/nsnake --- nsnake.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: