public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* File mode problem on Github edk2-BaseTools-win32
@ 2016-11-11 11:05 Evan Lloyd
  2016-11-11 11:24 ` Laszlo Ersek
  0 siblings, 1 reply; 4+ messages in thread
From: Evan Lloyd @ 2016-11-11 11:05 UTC (permalink / raw)
  To: edk2-devel (edk2-devel@lists.01.org); +Cc: liming.gao@intel.com, Leif Lindholm

There is a minor, but annoying, problem with file modes on the Github edk2-BaseTools-win32 repository.
Git maintains a limited internal record of the Unix style file modes.
edk2-BaseTools-win32 currently causes Git to set the file's modes to 660.
So, after a checkout or pull of master, the builds fail because the files do not have Windows' "Read & Execute" permission.
This is simple to fix, but one has to remember (or, ofttimes, get reminded) to do it every time there is an update.

Liming,
Because this is purely a permission problem in the Git repository, and .exe files are not amenable to patching, I have raised a pull request on  https://github.com/tianocore/edk2-BaseTools-win32/pulls
This is only a minor thing, but I would deem it a great favour were you to accept the pull request.
It has me tearing my hair out, and I have little enough to begin with.  :-{

Regards,
Evan

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: File mode problem on Github edk2-BaseTools-win32
  2016-11-11 11:05 File mode problem on Github edk2-BaseTools-win32 Evan Lloyd
@ 2016-11-11 11:24 ` Laszlo Ersek
  2016-11-11 13:12   ` Evan Lloyd
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2016-11-11 11:24 UTC (permalink / raw)
  To: Evan Lloyd, edk2-devel (edk2-devel@lists.01.org)
  Cc: Leif Lindholm, liming.gao@intel.com

On 11/11/16 12:05, Evan Lloyd wrote:
> There is a minor, but annoying, problem with file modes on the Github edk2-BaseTools-win32 repository.
> Git maintains a limited internal record of the Unix style file modes.
> edk2-BaseTools-win32 currently causes Git to set the file's modes to 660.
> So, after a checkout or pull of master, the builds fail because the files do not have Windows' "Read & Execute" permission.
> This is simple to fix, but one has to remember (or, ofttimes, get reminded) to do it every time there is an update.
> 
> Liming,
> Because this is purely a permission problem in the Git repository, and .exe files are not amenable to patching,

They are -- I think if you change the file mode bits, git will see that, and will create a patch that has no content hunks, just the file mode changes.

For example, in the BaseTools/Conf/ directory, we happen have two template files that have gratuitous execute permissions. If I remove those permissions, "git diff" shows

> diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
> old mode 100755
> new mode 100644
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> old mode 100755
> new mode 100644

The same should be possible on Windows too. (You just need the inverse operation right now, chmod +x.)

(The above patch is one I could submit genuinely, but I'm too lazy. :))

> I have raised a pull request on  https://github.com/tianocore/edk2-BaseTools-win32/pulls
> This is only a minor thing, but I would deem it a great favour were you to accept the pull request.
> It has me tearing my hair out, and I have little enough to begin with.  :-{

It is fine to send pull requests, but:
- they should be mailed to the list (not opened on github),
- the patches have to be reviewed first, anyway.

(Speaking about the edk2 repo at least -- I realize this is a different repo.)

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: File mode problem on Github edk2-BaseTools-win32
  2016-11-11 11:24 ` Laszlo Ersek
@ 2016-11-11 13:12   ` Evan Lloyd
  2016-11-11 13:57     ` Gao, Liming
  0 siblings, 1 reply; 4+ messages in thread
From: Evan Lloyd @ 2016-11-11 13:12 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel (edk2-devel@lists.01.org)
  Cc: Leif Lindholm, liming.gao@intel.com

Hi Laszlo.

>-----Original Message-----
>From: Laszlo Ersek [mailto:lersek@redhat.com]
>Sent: 11 November 2016 11:24
>To: Evan Lloyd; edk2-devel (edk2-devel@lists.01.org)
>Cc: Leif Lindholm; liming.gao@intel.com
>Subject: Re: [edk2] File mode problem on Github edk2-BaseTools-win32
...
>> Liming,
>> Because this is purely a permission problem in the Git repository, and .exe
>files are not amenable to patching,
>
>They are -- I think if you change the file mode bits, git will see that, and will
>create a patch that has no content hunks, just the file mode changes.

A semantic quibble; ".exe files are not amenable to patching" is true, the file ATTRIBUTES may be.
Patches against a .exe (or .dll) should surely start alarm bells ringing for most people.

>
>For example, in the BaseTools/Conf/ directory, we happen have two
>template files that have gratuitous execute permissions. If I remove those
>permissions, "git diff" shows
>
...
>(The above patch is one I could submit genuinely, but I'm too lazy. :))

And somebody on the list would only object, so why bother?    ;-)

>
>> I have raised a pull request on  https://github.com/tianocore/edk2-
>BaseTools-win32/pulls
>> This is only a minor thing, but I would deem it a great favour were you to
>accept the pull request.
>> It has me tearing my hair out, and I have little enough to begin with.  :-{
>
>It is fine to send pull requests, but:
>- they should be mailed to the list (not opened on github),
>- the patches have to be reviewed first, anyway.
>
>(Speaking about the edk2 repo at least -- I realize this is a different repo.)

As you point out, this is for a different repo; provided (I think) as a convenience, and is ancillary to edk2.
My viewpoint is that this is a specialised aspect, of interest to very few people. (Does anyone else use Cygwin Git and the Win32 binaries?)
The only reason for publishing this request here was one of awareness.  Most people will, I expect,  be blissfully unconcerned.

I am happy to submit a patch though, should those responsible (Liming?) want that.
Until that is confirmed though, I'm assuming that the GitHub repo is a mirror of a Subversion original (which will not record modes), so applying a patch might involve a lot more work than accepting the pull request on GitHub.

Regards,
Evan

>
>Thanks
>Laszlo
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: File mode problem on Github edk2-BaseTools-win32
  2016-11-11 13:12   ` Evan Lloyd
@ 2016-11-11 13:57     ` Gao, Liming
  0 siblings, 0 replies; 4+ messages in thread
From: Gao, Liming @ 2016-11-11 13:57 UTC (permalink / raw)
  To: Evan Lloyd, Laszlo Ersek, edk2-devel (edk2-devel@lists.01.org)
  Cc: Leif Lindholm

Evan:
  Yes. I expect you send the patch into this mail list. After I review and test, I will help push it into edk2-BaseTools-win32 repo. As you mention, this repo is still the mirror of svn. Any change in this repo will impact the mirror sync. So, we expect the patch to be applied.

Thanks
Liming
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Evan Lloyd
Sent: Friday, November 11, 2016 9:13 PM
To: Laszlo Ersek <lersek@redhat.com>; edk2-devel (edk2-devel@lists.01.org) <edk2-devel@ml01.01.org>
Cc: Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [edk2] File mode problem on Github edk2-BaseTools-win32

Hi Laszlo.

>-----Original Message-----
>From: Laszlo Ersek [mailto:lersek@redhat.com]
>Sent: 11 November 2016 11:24
>To: Evan Lloyd; edk2-devel (edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>)
>Cc: Leif Lindholm; liming.gao@intel.com<mailto:liming.gao@intel.com>
>Subject: Re: [edk2] File mode problem on Github edk2-BaseTools-win32
...
>> Liming,
>> Because this is purely a permission problem in the Git repository, and .exe
>files are not amenable to patching,
>
>They are -- I think if you change the file mode bits, git will see that, and will
>create a patch that has no content hunks, just the file mode changes.

A semantic quibble; ".exe files are not amenable to patching" is true, the file ATTRIBUTES may be.
Patches against a .exe (or .dll) should surely start alarm bells ringing for most people.

>
>For example, in the BaseTools/Conf/ directory, we happen have two
>template files that have gratuitous execute permissions. If I remove those
>permissions, "git diff" shows
>
...
>(The above patch is one I could submit genuinely, but I'm too lazy. :))

And somebody on the list would only object, so why bother? ;-)

>
>> I have raised a pull request on https://github.com/tianocore/edk2-
>BaseTools-win32/pulls
>> This is only a minor thing, but I would deem it a great favour were you to
>accept the pull request.
>> It has me tearing my hair out, and I have little enough to begin with. :-{
>
>It is fine to send pull requests, but:
>- they should be mailed to the list (not opened on github),
>- the patches have to be reviewed first, anyway.
>
>(Speaking about the edk2 repo at least -- I realize this is a different repo.)

As you point out, this is for a different repo; provided (I think) as a convenience, and is ancillary to edk2.
My viewpoint is that this is a specialised aspect, of interest to very few people. (Does anyone else use Cygwin Git and the Win32 binaries?)
The only reason for publishing this request here was one of awareness. Most people will, I expect, be blissfully unconcerned.

I am happy to submit a patch though, should those responsible (Liming?) want that.
Until that is confirmed though, I'm assuming that the GitHub repo is a mirror of a Subversion original (which will not record modes), so applying a patch might involve a lot more work than accepting the pull request on GitHub.

Regards,
Evan

>
>Thanks
>Laszlo
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-11 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-11 11:05 File mode problem on Github edk2-BaseTools-win32 Evan Lloyd
2016-11-11 11:24 ` Laszlo Ersek
2016-11-11 13:12   ` Evan Lloyd
2016-11-11 13:57     ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox