Re: [GNC-dev] Perl SheBang

2019-02-23 Thread Wm via gnucash-devel

On 04/02/2019 15:32, John Ralls wrote:


While we're on the topic of shebangs remember that they don't work on Windows. 
Remember too that running this obfuscate script on Windows will require the 
user to install perl. They might already have done so for Finance::Quote, but 
lots of users don't use F::Q.


True, there are  number of farmers that don't know why the person they 
voted for changed the price of their crops.


--
Wm

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Perl SheBang

2019-02-04 Thread John Ralls



> On Feb 4, 2019, at 1:27 AM, Alain D D Williams  wrote:
> 
> On Mon, Feb 04, 2019 at 10:23:46AM +0100, Frank H. Ellenberger wrote:
>> 
>> 
>> Am 04.02.19 um 09:40 schrieb Christian Stimming:
>>> Thanks for the pointer. I've copied this script into our git at 
>>>  ./util/obfuscate.pl
>> 
>> While for most gnc-fq-* scripts we us
>> #!@-PERL-@
>> and adjust them while building.
>> 
>> In utils all perl scripts are hardcoded to
>> #! /usr/bin/perl
>> Wouldn't it make sense to have them also configurable?

No, because gnc-fq-* are build products and util/*.pl are build tools. Since 
obfuscate.pl isn't a build tool it doesn't belong in util; if we're going to 
distribute it for users (and if we're not why put it in the repo at all?) then 
it needs to go somewhere Cmake can find it and install it to 
$CMAKE_INSTALL_PREFIX/bin or libexec and it needs to be renamed to 
"gnc-xml-obfuscate".

> 
> How about going:
> 
> #! /usr/bin/env perl

That's widely regarded as a security hole, though it's also widely used. Since 
it's trivial to override the shebang by calling the perl of your choice and 
passing the script as $1 it's kind of pointless.

While we're on the topic of shebangs remember that they don't work on Windows. 
Remember too that running this obfuscate script on Windows will require the 
user to install perl. They might already have done so for Finance::Quote, but 
lots of users don't use F::Q.

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Perl SheBang

2019-02-04 Thread Alain D D Williams
On Mon, Feb 04, 2019 at 10:23:46AM +0100, Frank H. Ellenberger wrote:
> 
> 
> Am 04.02.19 um 09:40 schrieb Christian Stimming:
> > Thanks for the pointer. I've copied this script into our git at 
> >   ./util/obfuscate.pl
> 
> While for most gnc-fq-* scripts we us
> #!@-PERL-@
> and adjust them while building.
> 
> In utils all perl scripts are hardcoded to
> #! /usr/bin/perl
> Wouldn't it make sense to have them also configurable?

How about going:

#! /usr/bin/env perl

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.
+44 (0) 787 668 0256  https://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: 
https://www.phcomp.co.uk/contact.php
#include 
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel