Re: [RFC] A trivial change for DESKTOP_ENTRIES
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?r1=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. -- Matthias Andree ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On 2011/07/13 00:25, Jung-uk Kim wrote: 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?r1=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? Shouldn't you fix whatever is trying to call compizmanager not to use .desktop file instead? -- Pav Lucistnik p...@oook.cz p...@freebsd.org ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On Wednesday 13 July 2011 07:39 am, Pav Lucistnik wrote: On 2011/07/13 00:25, Jung-uk Kim wrote: 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? Shouldn't you fix whatever is trying to call compizmanager not to use .desktop file instead? GNOME session manager calls the compiz-manager, i.e., the user has to change it manually. Actually, x11-wm/compiz/pkg-message recommended this: If you are using gnome, you can use the configuration editor to set the value of: desktop-gnome-session-required_components-windowmanager = compiz-manager ^^ This will enable compiz as your default window manager. I am quite sure there are similar instructions on the net. Jung-uk Kim ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On Wednesday 13 July 2011 12:08 am, Stephen Montgomery-Smith wrote: On 07/12/2011 05:25 PM, Jung-uk Kim wrote: 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? Jung-uk Kim Thinking more about it, it seems to me that instead of silently deleting the disallowed characters in the filename, that the port should declare itself broken if there are disallowed characters. That way, this particular error would have been caught far more easily. I think that's a good idea but exit 1; should be done in a separate commit as an exp-run is needed. Here is a simple patch, although I think you guys could come up with a better error message. :-) entry 4 of seems redundant. What do you think about the attached patch? Please note I also added . per Matthias Andree's request. Thanks, Jung-uk Kim diff -u bsd.port.mk-orig bsd.port.mk --- bsd.port.mk-orig2011-07-13 03:48:35.0 + +++ bsd.port.mk 2011-07-13 04:04:14.0 + @@ -6432,7 +6432,10 @@ ${ECHO_CMD} @cwd ${DESKTOPDIR} ${TMPPLIST}; \ fi; \ while [ $$# -gt 6 ]; do \ - filename=`${ECHO_CMD} $$4 | ${TR} -cd [:alnum:]`.desktop; \ + filename=`${ECHO_CMD} $$4 | ${TR} -cd [:alnum:]-._`.desktop; \ + if [ $$filename != $$4.desktop ]; then \ + ${ECHO_MSG} === WARNING: Disallowed characters in DESKTOP_ENTRIES \$$4\; \ + fi; \ pathname=${DESKTOPDIR}/$$filename; \ categories=$$5; \ if [ -z $$categories ]; then \ ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On 07/13/2011 10:41 AM, Jung-uk Kim wrote: On Wednesday 13 July 2011 07:39 am, Pav Lucistnik wrote: On 2011/07/13 00:25, Jung-uk Kim wrote: 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? Shouldn't you fix whatever is trying to call compizmanager not to use .desktop file instead? GNOME session manager calls the compiz-manager, i.e., the user has to change it manually. Actually, x11-wm/compiz/pkg-message recommended this: If you are using gnome, you can use the configuration editor to set the value of: desktop-gnome-session-required_components-windowmanager = compiz-manager ^^ This will enable compiz as your default window manager. I am quite sure there are similar instructions on the net. Jung-uk Kim Also, bsd.ports.mk shouldn't change what the port tells it to do, without informing anybody. I'm sure it took Jung-uk Kim many hours to figure out why it wasn't working. Other users are going to be in a similar spot. Many users will never figure it out. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On 07/13/2011 11:42 AM, Jung-uk Kim wrote: On Wednesday 13 July 2011 12:08 am, Stephen Montgomery-Smith wrote: On 07/12/2011 05:25 PM, Jung-uk Kim wrote: 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? Jung-uk Kim Thinking more about it, it seems to me that instead of silently deleting the disallowed characters in the filename, that the port should declare itself broken if there are disallowed characters. That way, this particular error would have been caught far more easily. I think that's a good idea but exit 1; should be done in a separate commit as an exp-run is needed. Here is a simple patch, although I think you guys could come up with a better error message. :-) entry 4 of seems redundant. What do you think about the attached patch? Please note I also added . per Matthias Andree's request. Thanks, Jung-uk Kim I have no problems with your changes. But I didn't see where you put the .. Maybe it was meant to be at the end of the error message. But code like this seems simpler than my original suggestion: if (echo $$4 | grep -E [^[:alnum:]_-] /dev/null); then echo \ ${ECHO_MSG} blah blah.; \ exit 1; \ fi; \ pathname=${DESKTOPDIR}/$$4; ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On 07/13/2011 11:59 AM, Stephen Montgomery-Smith wrote: On 07/13/2011 11:42 AM, Jung-uk Kim wrote: On Wednesday 13 July 2011 12:08 am, Stephen Montgomery-Smith wrote: On 07/12/2011 05:25 PM, Jung-uk Kim wrote: 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? Jung-uk Kim Thinking more about it, it seems to me that instead of silently deleting the disallowed characters in the filename, that the port should declare itself broken if there are disallowed characters. That way, this particular error would have been caught far more easily. I think that's a good idea but exit 1; should be done in a separate commit as an exp-run is needed. Here is a simple patch, although I think you guys could come up with a better error message. :-) entry 4 of seems redundant. What do you think about the attached patch? Please note I also added . per Matthias Andree's request. Thanks, Jung-uk Kim I have no problems with your changes. But I didn't see where you put the .. Maybe it was meant to be at the end of the error message. But code like this seems simpler than my original suggestion: if (echo $$4 | grep -E [^[:alnum:]_-] /dev/null); then echo \ ${ECHO_MSG} blah blah.; \ exit 1; \ fi; \ pathname=${DESKTOPDIR}/$$4; Oh, and use ${GREP} and ${ECHO_CMD} instead of echo and grep. And maybe the -E is unnecessary. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On Wednesday 13 July 2011 12:42 pm, Stephen Montgomery-Smith wrote: On 07/13/2011 10:41 AM, Jung-uk Kim wrote: On Wednesday 13 July 2011 07:39 am, Pav Lucistnik wrote: On 2011/07/13 00:25, Jung-uk Kim wrote: 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? Shouldn't you fix whatever is trying to call compizmanager not to use .desktop file instead? GNOME session manager calls the compiz-manager, i.e., the user has to change it manually. Actually, x11-wm/compiz/pkg-message recommended this: If you are using gnome, you can use the configuration editor to set the value of: desktop-gnome-session-required_components-windowmanager = compiz-manager ^^ This will enable compiz as your default window manager. I am quite sure there are similar instructions on the net. Jung-uk Kim Also, bsd.ports.mk shouldn't change what the port tells it to do, without informing anybody. Exactly. I'm sure it took Jung-uk Kim many hours to figure out why it wasn't working. Other users are going to be in a similar spot. Many users will never figure it out. Sh... Please don't tell it to my employee. ;-P It only took me about 1/2 hour. But you're right; average users may misinterpret unrelated commits (such as yours) and think it broke their desktop environment after updating ports. Jung-uk Kim ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On Wednesday 13 July 2011 01:04 pm, Jung-uk Kim wrote: On Wednesday 13 July 2011 12:42 pm, Stephen Montgomery-Smith wrote: On 07/13/2011 10:41 AM, Jung-uk Kim wrote: On Wednesday 13 July 2011 07:39 am, Pav Lucistnik wrote: On 2011/07/13 00:25, Jung-uk Kim wrote: 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.di ff ?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? Shouldn't you fix whatever is trying to call compizmanager not to use .desktop file instead? GNOME session manager calls the compiz-manager, i.e., the user has to change it manually. Actually, x11-wm/compiz/pkg-message recommended this: If you are using gnome, you can use the configuration editor to set the value of: desktop-gnome-session-required_components-windowmanager = compiz-manager ^^ This will enable compiz as your default window manager. I am quite sure there are similar instructions on the net. Jung-uk Kim Also, bsd.ports.mk shouldn't change what the port tells it to do, without informing anybody. Exactly. I'm sure it took Jung-uk Kim many hours to figure out why it wasn't working. Other users are going to be in a similar spot. Many users will never figure it out. Sh... Please don't tell it to my employee. ;-P employer I am not there yet. :-( Jung-uk Kim It only took me about 1/2 hour. But you're right; average users may misinterpret unrelated commits (such as yours) and think it broke their desktop environment after updating ports. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On Wednesday 13 July 2011 12:59 pm, Stephen Montgomery-Smith wrote: On 07/13/2011 11:42 AM, Jung-uk Kim wrote: On Wednesday 13 July 2011 12:08 am, Stephen Montgomery-Smith wrote: On 07/12/2011 05:25 PM, Jung-uk Kim wrote: 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? Jung-uk Kim Thinking more about it, it seems to me that instead of silently deleting the disallowed characters in the filename, that the port should declare itself broken if there are disallowed characters. That way, this particular error would have been caught far more easily. I think that's a good idea but exit 1; should be done in a separate commit as an exp-run is needed. Here is a simple patch, although I think you guys could come up with a better error message. :-) entry 4 of seems redundant. What do you think about the attached patch? Please note I also added . per Matthias Andree's request. Thanks, Jung-uk Kim I have no problems with your changes. But I didn't see where you put the .. Maybe it was meant to be at the end of the error message. Err... Here: filename=`${ECHO_CMD} $$4 | ${TR} -cd [:alnum:]-._`.desktop; ^ i.e., allowing . as a legal character. Jung-uk Kim But code like this seems simpler than my original suggestion: if (echo $$4 | grep -E [^[:alnum:]_-] /dev/null); then echo \ ${ECHO_MSG} blah blah.; \ exit 1; \ fi; \ pathname=${DESKTOPDIR}/$$4; ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On 07/13/2011 12:04 PM, Jung-uk Kim wrote: On Wednesday 13 July 2011 12:42 pm, Stephen Montgomery-Smith wrote: I'm sure it took Jung-uk Kim many hours to figure out why it wasn't working. Other users are going to be in a similar spot. Many users will never figure it out. Sh... Please don't tell it to my employee. ;-P It only took me about 1/2 hour. But you're right; average users may misinterpret unrelated commits (such as yours) and think it broke their desktop environment after updating ports. And if you hadn't figured it out, you would have emailed me asking me how I broke compiz. There is no way I would have figured it out, because I can't get compiz to work on my system anyway. So I would have emailed the submitter of the PR. And I don't think he would have figured it out either. So then we would have reverted the commit. Then you would have found out that it still didn't work. And then we would be truly mystified. This could have turned into a disaster. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On Wednesday 13 July 2011 01:04 pm, Stephen Montgomery-Smith wrote: On 07/13/2011 11:59 AM, Stephen Montgomery-Smith wrote: But code like this seems simpler than my original suggestion: if (echo $$4 | grep -E [^[:alnum:]_-] /dev/null); then echo \ ${ECHO_MSG} blah blah.; \ exit 1; \ fi; \ pathname=${DESKTOPDIR}/$$4; Oh, and use ${GREP} and ${ECHO_CMD} instead of echo and grep. And maybe the -E is unnecessary. If we actually do exit 1;, I'd prefer something like that, too. Jung-uk Kim ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On Wednesday 13 July 2011 01:23 pm, Jung-uk Kim wrote: On Wednesday 13 July 2011 01:04 pm, Stephen Montgomery-Smith wrote: On 07/13/2011 11:59 AM, Stephen Montgomery-Smith wrote: But code like this seems simpler than my original suggestion: if (echo $$4 | grep -E [^[:alnum:]_-] /dev/null); then echo \ ${ECHO_MSG} blah blah.; \ exit 1; \ fi; \ pathname=${DESKTOPDIR}/$$4; Oh, and use ${GREP} and ${ECHO_CMD} instead of echo and grep. And maybe the -E is unnecessary. If we actually do exit 1;, I'd prefer something like that, too. Actually, this must be moved to 'check-desktop-entries' target, I believe. Jung-uk Kim ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
On 07/13/2011 12:26 PM, Jung-uk Kim wrote: On Wednesday 13 July 2011 01:23 pm, Jung-uk Kim wrote: On Wednesday 13 July 2011 01:04 pm, Stephen Montgomery-Smith wrote: On 07/13/2011 11:59 AM, Stephen Montgomery-Smith wrote: But code like this seems simpler than my original suggestion: if (echo $$4 | grep -E [^[:alnum:]_-] /dev/null); then echo \ ${ECHO_MSG} blah blah.; \ exit 1; \ fi; \ pathname=${DESKTOPDIR}/$$4; Oh, and use ${GREP} and ${ECHO_CMD} instead of echo and grep. And maybe the -E is unnecessary. If we actually do exit 1;, I'd prefer something like that, too. Actually, this must be moved to 'check-desktop-entries' target, I believe. Yes, that seems to be the right place. And the code there is so full of exit 1's that one more won't be noticed. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
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 ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Proposing new USE_ knob for p5-DBD-mysql*
Hi Sergey and Alex, Problem: p5-DBD-mysql[45][0-5] ports are a pain to depend upon in a port, because of the need to differentiate between the mysql versions. I've thrown together [1] as an example of how we could approach this... I've had to put this logic into sympa, and it looks a common problem unless I've missed something obvious. Anyone have any opinions or better ideas? [1] http://people.freebsd.org/~crees/patches/database-mk-p5-DBD-mysql.diff -- Chris Rees | FreeBSD Developer cr...@freebsd.org | http://people.freebsd.org/~crees ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
Jung-uk Kim píše v st 13. 07. 2011 v 11:41 -0400: On Wednesday 13 July 2011 07:39 am, Pav Lucistnik wrote: On 2011/07/13 00:25, Jung-uk Kim wrote: 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? Shouldn't you fix whatever is trying to call compizmanager not to use .desktop file instead? GNOME session manager calls the compiz-manager, i.e., the user has to change it manually. Actually, x11-wm/compiz/pkg-message recommended this: If you are using gnome, you can use the configuration editor to set the value of: desktop-gnome-session-required_components-windowmanager = compiz-manager ^^ This will enable compiz as your default window manager. What does the gnome@ people said about this whole issue? -- -- Pav Lucistnik p...@oook.cz p...@freebsd.org KDE is for the techies who feel they can't be productive without being able to control the exact amount of bevel in their window frames in 2% increments. signature.asc Description: This is a digitally signed message part
Re: [RFC] A trivial change for DESKTOP_ENTRIES
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. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
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. :-( After I applied sanity checks, I only found one port that contains '.' in Exec, i.e., misc/metalink-editor, which has metalink_editer.py as an executable name. So, I concluded it isn't very useful check while it is error-prone. There are two ports that contains spaces: games/tome: tome -v -g www/links: links -g These can be easily fixable by adding static desktop files. Other failures are caused by / in their Execs, which is also very valid. Currently, these ports create very ugly desktop files, e.g., usrlocalbinfoo.desktop. This problem is also easily fixable, i.e., s/ECHO_CMD/BASENAME/. I believe it must be fixed regardless. Jung-uk Kim ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES
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? ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: [RFC] A trivial change for DESKTOP_ENTRIES (take 2)
On Tuesday 12 July 2011 06:25 pm, Jung-uk Kim wrote: 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?r1= 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. Please review the revised patches. bsd.port.mk.diff: - Allow '-' and '_' in desktop file names for DESKTOP_ENTRIES. - Apply basename(1) on Exec to remove directory structure when desktop file names are made. - Add a comment about Exec limitations. links.diff, metalink-editor.diff, tome.diff: - Add static desktop files to work around DESKTOP_ENTRIES limitations. Ultimately, we may have to consider adding an additional field in DESKTOP_ENTRIES for its file name. These patches are also available from here: http://people.freebsd.org/~jkim/bsd.port.mk.diff http://people.freebsd.org/~jkim/links.diff http://people.freebsd.org/~jkim/metalink-editor.diff http://people.freebsd.org/~jkim/tome.diff Thanks, Jung-uk Kim Index: Mk/bsd.port.mk === RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.687 diff -u -r1.687 bsd.port.mk --- Mk/bsd.port.mk 3 Jul 2011 15:51:18 - 1.687 +++ Mk/bsd.port.mk 13 Jul 2011 22:33:56 - @@ -1064,7 +1064,9 @@ #If the deduction fails, you will have to set Categories #manually. You should check the generated value using #make desktop-categories, and override it if necessary. -# * Exec will also be used to name the .desktop file. +# * Exec will also be used to name the .desktop file. Only +#alphanumeric characters, -, and _ are allowed after +#basename(1) is executed on it. # * The files will be automatically added to ${PLIST}. #Example: # X Window Information \ @@ -6389,6 +6391,11 @@ if [ -z $$4 ]; then \ ${ECHO_MSG} ${PKGNAME}: Makefile error: in desktop entry $$entry: field 4 (Exec) is empty; \ exit 1; \ + else \ + if [ -n `${BASENAME} $$4 | ${TR} -d '[:alnum:]-_'` ]; then \ + ${ECHO_CMD} ${PKGNAME}: Makefile error: in desktop entry $$entry: field 4 (Exec) has a disallowed character; \ + exit 1; \ + fi; \ fi; \ if [ -n $$5 ]; then \ for c in `${ECHO_CMD} $$5 | ${TR} ';' ' '`; do \ @@ -6432,7 +6439,7 @@ ${ECHO_CMD} @cwd ${DESKTOPDIR} ${TMPPLIST}; \ fi; \ while [ $$# -gt 6 ]; do \ - filename=`${ECHO_CMD} $$4 | ${TR} -cd [:alnum:]`.desktop; \ + filename=`${BASENAME} $$4`.desktop; \ pathname=${DESKTOPDIR}/$$filename; \ categories=$$5; \ if [ -z $$categories ]; then \ Index: games/tome/Makefile === RCS file: /home/pcvs/ports/games/tome/Makefile,v retrieving revision 1.21 diff -u -r1.21 Makefile --- games/tome/Makefile 25 Jan 2010 22:49:44 - 1.21 +++ games/tome/Makefile 13 Jul 2011 22:33:56 - @@ -7,7 +7,7 @@ PORTNAME= tome PORTVERSION= 2.3.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES=games MASTER_SITES= http://t-o-m-e.net/dl/src/ DISTNAME= tome-235-src @@ -15,7 +15,7 @@ MAINTAINER=po...@freebsd.org COMMENT= Roguelike dungeon exploration game based on JRR Tolkien's works -SUB_FILES= pkg-deinstall +SUB_FILES= pkg-deinstall tome.desktop ALL_TARGET=# empty MAKEFILE= makefile.bsd @@ -24,10 +24,6 @@ WRKSRC=${WRKDIR}/${DISTNAME}/src OPTIONS= X11 Turn on support for X on -DESKTOP_ENTRIES= ToME Roguelike game based on JRR Tolkien's work \ - ${DATADIR}/xtra/graf/tome-128.png \ - tome -v -g Application;Game;RolePlaying; \ - false .include bsd.port.pre.mk @@ -43,4 +39,8 @@ ${REINPLACE_CMD} -e 's@-I$$(LOCALBASE)/include@@g' ${WRKSRC}/${MAKEFILE} .endif
ports/144597: security/openssh-portable fails to compile with KERBEROS enabled
Hey people, I was looking over old unresolved PR's. I came across this one: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/144597 When I sent a message to the submitter of the PR, the email bounced back suggesting that the submitter no longer uses that email address. I don't think it would be too hard to make the port build under the circumstances he describes. But is ANYONE interested? Would it be worth investing effort to make this work? Note that the port has ports@ as its maintainer, so it doesn't look like there is a lot of interest. Thanks, Stephen P.S. This one is related: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/57498 Is this a big bag of worms? I can see that seems to be fixed, for example, in mail/fetchmail. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org