From owner-freebsd-ports@FreeBSD.ORG Wed Jul 13 22:36:53 2011 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90C0B106566C; Wed, 13 Jul 2011 22:36:53 +0000 (UTC) (envelope-from stephen@missouri.edu) Received: from wilberforce.math.missouri.edu (wilberforce.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 422368FC18; Wed, 13 Jul 2011 22:36:52 +0000 (UTC) Received: from [127.0.0.1] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.4/8.14.4) with ESMTP id p6DMapYC033150; Wed, 13 Jul 2011 17:36:52 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <4E1E1E03.8090200@missouri.edu> Date: Wed, 13 Jul 2011 17:36:51 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 MIME-Version: 1.0 To: Jung-uk Kim References: <201107121826.00020.jkim@FreeBSD.org> <201107131536.01059.jkim@FreeBSD.org> <4E1E09C0.9040609@missouri.edu> <201107131806.49966.jkim@FreeBSD.org> In-Reply-To: <201107131806.49966.jkim@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Matthias Andree , "freebsd-ports@FreeBSD.org" Subject: Re: [RFC] A trivial change for DESKTOP_ENTRIES X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2011 22:36:53 -0000 On 07/13/2011 05:06 PM, Jung-uk Kim wrote: > On Wednesday 13 July 2011 05:10 pm, Stephen Montgomery-Smith wrote: >> On 07/13/2011 02:35 PM, Jung-uk Kim wrote: >>> On Wednesday 13 July 2011 06:42 am, Matthias Andree wrote: >>>> Am 13.07.2011 00:25, schrieb Jung-uk Kim: >>>>> After I updated x11-wm/compiz, GNOME was not able to start the >>>>> window manager. Basically, it complained that compiz-manager >>>>> was not found. Then, I realized compiz-manager.desktop was >>>>> automagically replaced by compizmanager.desktop. Now I tracked >>>>> it down to this commit: >>>>> >>>>> Sat Nov 27 17:42:46 2010 UTC (7 months, 2 weeks ago) by pav >>>>> >>>>> - DESKTOP_ENTRIES: commandline is used to name installed >>>>> .desktop file, this can lead to files containing whitespace and >>>>> funny characters; thus strip all non-alphanumeric characters >>>>> >>>>> http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk.diff >>>>> ?r 1=1.656;r2=1.657 >>>>> >>>>> To me, it looks far too restrictive. At least, I'd like to >>>>> allow '-' and '_'. Please see the attached patch. >>>>> >>>>> Any objections? >>>> >>>> The dot should also be allowed, to cover the POSIX portable >>>> filename character set altogether. >>> >>> I liked the idea first. Then, I realized that we have to add >>> more sanity checks, e.g., ".", "..", ".foo", etc. >>> >>> Sorry, >>> >>> Jung-uk Kim >> >> The extra sanity check seems to add very little overhead: >> >> if (echo "$$4" | grep "^\..*"> /dev/null) \ >> >> || (echo "$$4" | grep [^[:alnum:]_.-]> /dev/null); then \ >> >> echo "blah blah"; \ >> fi >> >> And "." are very common in filenames. > > Some times '.' and '..' are very hard to deal with. :-( The only other way I can think of in which "."'s can appear in a filename in a bad way is via "xxx/../../../../../backdoor". But you are eliminating the "/"'s. > After I applied sanity checks .... ...but I respect your opinion because you did all this work checking it. Are you going to check with gnomes@ as Pav suggested?