[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#910125: dh-golang: DH_GOLANG_INSTALL_EXTRA does not preserve file permissions



On 10/3/18 5:45 AM, Stephen Gelman wrote:
> Package: dh-golang
> Version: 1.36
> Severity: normal
> 
> When using DH_GOLANG_INSTALL_EXTRA to install some test fixtures in
> https://github.com/hashicorp/go-slug I noticed that one of the files has
> an execute bit that is not preserved, causing the test to fail.  This
> seems to be caused by dh-golang using "copy" instead of "cp".  From
> http://perldoc.perl.org/File/Copy.html:
> 
>     You may use the syntax use File::Copy "cp" to get at the cp alias
>     for this function. The syntax is exactly the same. The behavior is
>     nearly the same as well: as of version 2.15, cp will preserve the
>     source file's permission bits like the shell utility cp(1) would do,
>     while copy uses the default permissions for the target file (which
>     may depend on the process' umask, file ownership, inherited ACLs,
>     etc.).
> 
> Testing locally switching to "cp" fixed my issue and I don't know of any
> cases where it would break things.  I'm planning on submitting a MR to
> fix this but I wanted to make sure a bug was created to track this.


Good catch !

It's actually a regression introduced by the modifications I made in
order to fix #904261 (DH_GOLANG_EXCLUDE).

The fix shouldn't have any unwanted side effect, so I'm for merging it.

I'd merge it myself, but since I can't upload afterward, it would be
weird for me to add stuff in the changelog etc ;)


Cheers,

nodens


Reply to: