Re: per-port make.conf options and hyphenated port names

2014-01-21 Thread Scot Hetzel
On Tue, Jan 21, 2014 at 3:36 AM, Volodymyr Kostyrko  wrote:
> 21.01.2014 03:01, Matthew Pounsett wrote:
>>
>>
>> At some point in the last couple of weeks I was pointed at
>>  as what has been
>> implemented to deprecate make.conf settings such as “WITHOUT_X11=yes”.
>> That document says it has been committed, but the porters handbook section
>> on OPTIONS doesn’t discuss the ${port}_SET/${port}_UNSET syntax, and I can’t
>> find mention of it in /usr/ports/KNOBS either.
>>
>> I’m trying to find specifics on the implementation because I’ve run into a
>> case that document doesn’t seem to plan for:  trying to set per-port options
>> for a hyphenated port name.
>>
>> Specifically, I’m trying to do this:
>> virtualbox-ose-additions_UNSET=X11
>>
>> Hyphenated variable names don’t work in most shells.  I think some older
>> versions of csh could set them, but couldn't reference them, and tinderbox’s
>> sh scripts blow right up when they encounter that.
>>
>> Digging through /usr/ports/Mk/ I can’t find anywhere that $UNIQUENAME is
>> modified to guarantee that it references a safe variable name (i.e. I don’t
>> see anywhere that $UNIQUENAME has reserved characters removed from it before
>> use).  So, given that a lot of times $UNIQUENAME is just the name of the
>> port, and a lot of ports have hyphens in their names, how is this meant to
>> be dealt with?
>>
>> Thanks for any pointers or help!
>
>
> Excuse me hijacking the thread but doesn't ports-mgmt/portconf do almost the
> same?
>

With the change to the new Options frame work, most of the
WITH/WITHOUT_ variables were changed to SET/UNSET values:

WITH_X11
WITH_JPEG
WITHOUT_DOCS

New way:

SET= X11 JPEG
UNSET= DOCS

The old way to set port specific variables was by using
ports-mgmt/portconf.  But with the change to using SET/UNSET, port
specific options are now:

${UNIQUENAME}_SET= MYSQL
${UNIQUENAME}_UNSET= PGSQL BDB

Which can be added directly to the /etc/make.conf.

There may still be uses for portconf, as it can still assign values to
port specific variables.
___
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: per-port make.conf options and hyphenated port names

2014-01-21 Thread Matthew Pounsett

On Jan 21, 2014, at 04:36 , Volodymyr Kostyrko  wrote:

> 21.01.2014 03:01, Matthew Pounsett wrote:
>> 
>> Digging through /usr/ports/Mk/ I can’t find anywhere that $UNIQUENAME is 
>> modified to guarantee that it references a safe variable name (i.e. I don’t 
>> see anywhere that $UNIQUENAME has reserved characters removed from it before 
>> use).  So, given that a lot of times $UNIQUENAME is just the name of the 
>> port, and a lot of ports have hyphens in their names, how is this meant to 
>> be dealt with?
>> 
>> Thanks for any pointers or help!
> 
> Excuse me hijacking the thread but doesn't ports-mgmt/portconf do almost the 
> same?

It might, but not being part of the core ports makefiles it’s not a candidate 
for use inside tinderbox and other port-building tools.



___
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: per-port make.conf options and hyphenated port names

2014-01-21 Thread Volodymyr Kostyrko

21.01.2014 03:01, Matthew Pounsett wrote:


At some point in the last couple of weeks I was pointed at 
 as what has been implemented 
to deprecate make.conf settings such as “WITHOUT_X11=yes”.   That document says it 
has been committed, but the porters handbook section on OPTIONS doesn’t discuss the 
${port}_SET/${port}_UNSET syntax, and I can’t find mention of it in /usr/ports/KNOBS 
either.

I’m trying to find specifics on the implementation because I’ve run into a case 
that document doesn’t seem to plan for:  trying to set per-port options for a 
hyphenated port name.

Specifically, I’m trying to do this:
virtualbox-ose-additions_UNSET=X11

Hyphenated variable names don’t work in most shells.  I think some older 
versions of csh could set them, but couldn't reference them, and tinderbox’s sh 
scripts blow right up when they encounter that.

Digging through /usr/ports/Mk/ I can’t find anywhere that $UNIQUENAME is 
modified to guarantee that it references a safe variable name (i.e. I don’t see 
anywhere that $UNIQUENAME has reserved characters removed from it before use).  
So, given that a lot of times $UNIQUENAME is just the name of the port, and a 
lot of ports have hyphens in their names, how is this meant to be dealt with?

Thanks for any pointers or help!


Excuse me hijacking the thread but doesn't ports-mgmt/portconf do almost 
the same?


--
Sphinx of black quartz, judge my vow.
___
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: per-port make.conf options and hyphenated port names

2014-01-20 Thread Matthew Pounsett

On Jan 20, 2014, at 20:01 , Matthew Pounsett  wrote:

> Digging through /usr/ports/Mk/ I can’t find anywhere that $UNIQUENAME is 
> modified to guarantee that it references a safe variable name (i.e. I don’t 
> see anywhere that $UNIQUENAME has reserved characters removed from it before 
> use).  So, given that a lot of times $UNIQUENAME is just the name of the 
> port, and a lot of ports have hyphens in their names, how is this meant to be 
> dealt with?

I take back part of that last bit.  I’ve found a couple cases (bsd.tcl.mk and 
bsd.database.mk) that use the ${UNIQUENAME:U:S,-,_,} construction to allow 
setting safe variables.  bsd.port.mk doesn’t use the same construction when 
referencing ${$UNIQUENAME}_SET and ${$UNIQUENAME}_UNSET.

So, I’m still back at my earlier question… how is this meant to be dealt with?

Thanks.
___
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"


per-port make.conf options and hyphenated port names

2014-01-20 Thread Matthew Pounsett

At some point in the last couple of weeks I was pointed at 
 as what has been implemented 
to deprecate make.conf settings such as “WITHOUT_X11=yes”.   That document says 
it has been committed, but the porters handbook section on OPTIONS doesn’t 
discuss the ${port}_SET/${port}_UNSET syntax, and I can’t find mention of it in 
/usr/ports/KNOBS either.

I’m trying to find specifics on the implementation because I’ve run into a case 
that document doesn’t seem to plan for:  trying to set per-port options for a 
hyphenated port name.

Specifically, I’m trying to do this:
virtualbox-ose-additions_UNSET=X11

Hyphenated variable names don’t work in most shells.  I think some older 
versions of csh could set them, but couldn't reference them, and tinderbox’s sh 
scripts blow right up when they encounter that.

Digging through /usr/ports/Mk/ I can’t find anywhere that $UNIQUENAME is 
modified to guarantee that it references a safe variable name (i.e. I don’t see 
anywhere that $UNIQUENAME has reserved characters removed from it before use).  
So, given that a lot of times $UNIQUENAME is just the name of the port, and a 
lot of ports have hyphens in their names, how is this meant to be dealt with?

Thanks for any pointers or help!
___
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"