Request for review: Store convenience scripts as executable

Weijun Wang weijun.wang at oracle.com
Wed Aug 3 13:39:36 UTC 2011



On 07/22/2011 03:57 AM, Stuart Marks wrote:
> What's problematic about executables?
>
> Certainly we want to avoid storing actual binary executables in repos.
>
> I've also seen problems on other projects where Windows clients had
> stored files (perhaps via Samba) on Unix systems and the files ended up
> getting their execute bits set. I agree, this is really irritating,
> since 'ls' and various file managers will flag them as such or show them
> in a different color, etc.
>
> On the other hand, running "sh ./some_script.sh" is also problematic, as
> "sh" is different shells on different systems, e.g. it's the SysV Bourne
> shell on older Solaris, possibly ksh93 on newer Solaris, dash on Ubuntu,
> and bash on MacOS. Executing the scripts directly allows each script to
> declare which shell it actually needs.

IIRC, jtreg just calls "sh" to launch a test.

-Max

>
> It would be nice if we could relax the "no executables" rule, perhaps by
> allowing execute bits to appear on files that have a .sh suffix, or
> something.
>
> s'marks
>
>
>
> On 7/20/11 8:33 AM, Kelly O'Hair wrote:
>>
>> Although the jcheck extension isn't publicly available (it will be
>> someday), it is used on the servers
>> and by developers. That extension disallows ANY file from having
>> execute permissions.
>> So this changeset would get blocked, or create havoc for the developers.
>>
>> In general, placing execute permission on files has been problematic
>> and we decided a long time ago
>> that executables were not welcome in the OpenJDK repositories, and the
>> easiest way to try and block them
>> was by looking at the execute permissions.
>>
>> All these *.sh scripts can be run with "sh", e.g. "sh ./get_source.sh"
>> so I don't see this as a huge burden.
>>
>> -kto
>>
>> On Jul 20, 2011, at 2:47 AM, Neil Richards wrote:
>>
>>> Sometimes, it's the most petty things that can cause an itch.
>>>
>>> There are a small number of convenience scripts which are currently held
>>> within the repository without being marked as executable.
>>>
>>> So to use them (for each clone of the repository one may have), one has
>>> to go round manually setting the executable bit, which is a little sad,
>>> as mercurial is perfectly capable of remembering that these things
>>> should be executable.
>>>
>>> To that end, please find below the most trivial of changes, to store
>>> these scripts with their executable bit set.
>>>
>>> Please consider this change for committal.
>>>
>>> Thanks,
>>> Neil
>>>
>>> --
>>> Unless stated above:
>>> IBM email: neil_richards at uk.ibm.com
>>> IBM United Kingdom Limited - Registered in England and Wales with
>>> number 741598.
>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
>>> PO6 3AU
>>>
>>>
>>> # HG changeset patch
>>> # User Neil Richards<neil.richards at ngmr.net>,<neil_richards at uk.ibm.com>
>>> # Date 1311153869 -3600
>>> # Branch ojdk-144
>>> # Node ID 090ad60f2b03c1b806258e5a75a0fd15963df9e0
>>> # Parent 05e24d6ed56dce501b5b8633d2fe7c3725354257
>>> Summary: Store convenience scripts as executable
>>> Contributed-by:<neil.richards at ngmr.net>
>>>
>>> diff --git a/get_source.sh b/get_source.sh
>>> old mode 100644
>>> new mode 100755
>>> diff --git a/make/scripts/hgforest.sh b/make/scripts/hgforest.sh
>>> old mode 100644
>>> new mode 100755
>>> diff --git a/make/scripts/update_copyright_year.sh
>>> b/make/scripts/update_copyright_year.sh
>>> old mode 100644
>>> new mode 100755
>>> diff --git a/make/scripts/vsvars.sh b/make/scripts/vsvars.sh
>>> old mode 100644
>>> new mode 100755
>>> diff --git a/make/scripts/webrev.ksh b/make/scripts/webrev.ksh
>>> old mode 100644
>>> new mode 100755
>>>
>>>
>>



More information about the build-dev mailing list