public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Native symlinks and setup.exe
@ 2016-10-01 18:49 Gene Pavlovsky
  2016-10-01 21:56 ` Vlado
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Gene Pavlovsky @ 2016-10-01 18:49 UTC (permalink / raw)
  To: cygwin

I'm installing Cygwin 64-bit on a fresh Win 7 x64 installation.
Before running setup.exe I've set the system env var CYGWIN=winsymlinks:native
After that I ran setup-x86_64.exe and installed cygwin64.
The symlinks to .exe files in bin, created by setup, are not native
symlinks, they are cygwin symlinks. Apparently, setup doesn't honor
the winsymlinks:native CYGWIN option. Is that intended (why?) or a
bug?

--Gene

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-01 18:49 Native symlinks and setup.exe Gene Pavlovsky
@ 2016-10-01 21:56 ` Vlado
  2016-10-02  6:27   ` Herbert Stocker
  2016-10-02 11:48 ` Thorsten Kampe
  2016-10-02 20:08 ` Andrey Repin
  2 siblings, 1 reply; 17+ messages in thread
From: Vlado @ 2016-10-01 21:56 UTC (permalink / raw)
  To: cygwin

On 1.10.2016 17:52, Gene Pavlovsky wrote:
> Before running setup.exe I've set the system env var CYGWIN=winsymlinks:native
> After that I ran setup-x86_64.exe and installed cygwin64.
> The symlinks to .exe files in bin, created by setup, are not native
> symlinks, they are cygwin symlinks. Apparently, setup doesn't honor
> the winsymlinks:native CYGWIN option. Is that intended (why?) or a
> bug?

Hi Gene,

IMHO CYGWIN variable controls Cygwin behavior, but setup is native 
Windows app.
What You are describing is expected behavior.

Vlado.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-01 21:56 ` Vlado
@ 2016-10-02  6:27   ` Herbert Stocker
  0 siblings, 0 replies; 17+ messages in thread
From: Herbert Stocker @ 2016-10-02  6:27 UTC (permalink / raw)
  To: cygwin

On 01.10.2016 23:32, Vlado wrote:
 > On 1.10.2016 17:52, Gene Pavlovsky wrote:
 >> Before running setup.exe I've set the system env var
 >> CYGWIN=winsymlinks:native
 >> After that I ran setup-x86_64.exe and installed cygwin64.
 >> The symlinks to .exe files in bin, created by setup, are not native
 >> symlinks, they are cygwin symlinks. Apparently, setup doesn't honor
 >> the winsymlinks:native CYGWIN option. Is that intended (why?) or a
 >> bug?
 >
 > Hi Gene,
 >
 > IMHO CYGWIN variable controls Cygwin behavior, but setup is native
 > Windows app.
 > What You are describing is expected behavior.

 From a sole technical point of view, it's maybe expected.

But from a software usage point of view not:
Gene wants to use Cygwin with native links.
And setup.exe is part of Cygwin. Therefore setup.exe *should* honor
the CYGWIN variable.
(those parts of CYGWIN that make sense for the setup).

Or formulated another way:
Gene wants to use native links with Cygwin. Cygwin does have that
capability. How should he instruct setup.exe to do so?

Herbert



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-01 18:49 Native symlinks and setup.exe Gene Pavlovsky
  2016-10-01 21:56 ` Vlado
@ 2016-10-02 11:48 ` Thorsten Kampe
  2016-10-02 23:35   ` Gene Pavlovsky
  2016-10-02 20:08 ` Andrey Repin
  2 siblings, 1 reply; 17+ messages in thread
From: Thorsten Kampe @ 2016-10-02 11:48 UTC (permalink / raw)
  To: cygwin

* Gene Pavlovsky (Sat, 1 Oct 2016 18:52:47 +0300)
> 
> I'm installing Cygwin 64-bit on a fresh Win 7 x64 installation.
> Before running setup.exe I've set the system env var CYGWIN=winsymlinks:native
> After that I ran setup-x86_64.exe and installed cygwin64.
> The symlinks to .exe files in bin, created by setup, are not native
> symlinks, they are cygwin symlinks. Apparently, setup doesn't honor
> the winsymlinks:native CYGWIN option. Is that intended (why?) or a
> bug?

Setup does not create symlinks. That's either done by the postinstall 
scripts or the contents of the package are simply unpacked to the 
folder. So the answer to your question is: the symlinks are not 
created but copied, that's why.

Thorsten


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-01 18:49 Native symlinks and setup.exe Gene Pavlovsky
  2016-10-01 21:56 ` Vlado
  2016-10-02 11:48 ` Thorsten Kampe
@ 2016-10-02 20:08 ` Andrey Repin
  2 siblings, 0 replies; 17+ messages in thread
From: Andrey Repin @ 2016-10-02 20:08 UTC (permalink / raw)
  To: Gene Pavlovsky, cygwin

Greetings, Gene Pavlovsky!

> I'm installing Cygwin 64-bit on a fresh Win 7 x64 installation.
> Before running setup.exe I've set the system env var CYGWIN=winsymlinks:native
> After that I ran setup-x86_64.exe and installed cygwin64.
> The symlinks to .exe files in bin, created by setup, are not native
> symlinks, they are cygwin symlinks. Apparently, setup doesn't honor
> the winsymlinks:native CYGWIN option. Is that intended (why?) or a
> bug?

If your user is a member of Administrators group, you'd have to run setup in
privileged mode to even have a chance for that ability to actually work.
If not, you may control it with SeCreateSymlink privilege.


-- 
With best regards,
Andrey Repin
Sunday, October 2, 2016 21:22:34

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-02 11:48 ` Thorsten Kampe
@ 2016-10-02 23:35   ` Gene Pavlovsky
  2016-10-03 18:26     ` Thorsten Kampe
  0 siblings, 1 reply; 17+ messages in thread
From: Gene Pavlovsky @ 2016-10-02 23:35 UTC (permalink / raw)
  To: cygwin

Thorsten,

That's a great pointer. I've just investigated using the `flex`
package as an example.
Untarring flex-2.6.1-1.tar.xz, usr/bin/flex++ is extracted as a Cygwin
symlink to usr/bin/flex.exe.
If I create a native symlink to flex.exe, tar it all up to a new tar
archive, then extract it somewhere else, the native symlink is
extracted as native, as expected.

So, when installing, the type of symlinks doesn't honor the CYGWIN
option since they are just unpacked by tar as is.

The question I'm proposing now - should `tar` be modified to honor the
CYGWIN option and automatically convert symlinks when extracting, if
necessary?

--Gene

On 2 October 2016 at 14:00, Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> * Gene Pavlovsky (Sat, 1 Oct 2016 18:52:47 +0300)
>>
>> I'm installing Cygwin 64-bit on a fresh Win 7 x64 installation.
>> Before running setup.exe I've set the system env var CYGWIN=winsymlinks:native
>> After that I ran setup-x86_64.exe and installed cygwin64.
>> The symlinks to .exe files in bin, created by setup, are not native
>> symlinks, they are cygwin symlinks. Apparently, setup doesn't honor
>> the winsymlinks:native CYGWIN option. Is that intended (why?) or a
>> bug?
>
> Setup does not create symlinks. That's either done by the postinstall
> scripts or the contents of the package are simply unpacked to the
> folder. So the answer to your question is: the symlinks are not
> created but copied, that's why.
>
> Thorsten
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-02 23:35   ` Gene Pavlovsky
@ 2016-10-03 18:26     ` Thorsten Kampe
  2016-10-04  6:57       ` Gene Pavlovsky
  2016-10-04 19:39       ` Linda Walsh
  0 siblings, 2 replies; 17+ messages in thread
From: Thorsten Kampe @ 2016-10-03 18:26 UTC (permalink / raw)
  To: cygwin

* Gene Pavlovsky (Mon, 3 Oct 2016 00:46:54 +0300)
> 
> So, when installing, the type of symlinks doesn't honor the CYGWIN
> option since they are just unpacked by tar as is.
> 
> The question I'm proposing now - should `tar` be modified to honor the
> CYGWIN option and automatically convert symlinks when extracting, if
> necessary?

Tar's task is to unpack what's in the archive. So converting is out 
of question. You can ask the maintainer of the affected packages to 
create the symlinks in the postinstall script.

Thorsten


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-03 18:26     ` Thorsten Kampe
@ 2016-10-04  6:57       ` Gene Pavlovsky
  2016-10-04  8:15         ` Vlado
  2016-10-04 19:21         ` Gerrit Haase
  2016-10-04 19:39       ` Linda Walsh
  1 sibling, 2 replies; 17+ messages in thread
From: Gene Pavlovsky @ 2016-10-04  6:57 UTC (permalink / raw)
  To: cygwin

That makes sense but it would be a LOT of work for many people (well,
a lot of small work for many people).

How about this kind of modification for the setup program: extract tar
archives into temp dir, after that search that temp dir for symlinks,
if they don't match the current winsymlinks option, recreate them
appropriately?

I just remembered what I did when I first discovered the winsymlinks
option (already having a 32-bit Cygwin set up for a couple of years).
I tarred my entire cygwin directory, copied it over to my Linux
server, untarred it there - which created all the symlinks, including
Cygwin's symlinks, as proper symlinks, then tarred it back, copied
back to the Windows box, untarred - voila, all symlinks are created as
native. I wonder how are Cygwin vs native symlinks stored inside tar
archive - tar knows they are symlinks but also knows which ones are
native vs Cygwin's. That's a whole lot of bother, though, and now that
I know that some further package update down the line might replace
native links with Cygwin links again (didn't expect that), I wouldn't
be willing to go to that trouble.

It should work out of the box automatically, in my opinion. Cygwin
symlinks are a kluge (e.g. I can't edit them in Far manager, the way I
can adjust a native symlink), and if using Cygwin exclusively on NTFS
filesystems, supporting symlinks, I can't see any reason to have any
on my system. The proposed solution is sensible, but it spreads
responsibility among all the package maintainers, and it will take a
long time to reach.

On 3 October 2016 at 15:08, Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> * Gene Pavlovsky (Mon, 3 Oct 2016 00:46:54 +0300)
>>
>> So, when installing, the type of symlinks doesn't honor the CYGWIN
>> option since they are just unpacked by tar as is.
>>
>> The question I'm proposing now - should `tar` be modified to honor the
>> CYGWIN option and automatically convert symlinks when extracting, if
>> necessary?
>
> Tar's task is to unpack what's in the archive. So converting is out
> of question. You can ask the maintainer of the affected packages to
> create the symlinks in the postinstall script.
>
> Thorsten
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-04  6:57       ` Gene Pavlovsky
@ 2016-10-04  8:15         ` Vlado
  2016-10-04 20:42           ` Gene Pavlovsky
  2016-10-04 19:21         ` Gerrit Haase
  1 sibling, 1 reply; 17+ messages in thread
From: Vlado @ 2016-10-04  8:15 UTC (permalink / raw)
  To: cygwin

On 3.10.2016 23:15, Gene Pavlovsky wrote:
> How about this kind of modification for the setup program: extract tar
> archives into temp dir, after that search that temp dir for symlinks,

Hi, Gene.

Maybe You can consider to write and run simple script:
- find all links (find -type l)
- read target of link (readlink)
- remove link (rm)
- re-create link (ln -s)
The ln -s should honor CYGWIN=winsymlinks:native and every link should 
be as You want.

Vlado


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-04  6:57       ` Gene Pavlovsky
  2016-10-04  8:15         ` Vlado
@ 2016-10-04 19:21         ` Gerrit Haase
  2016-10-04 20:54           ` Gene Pavlovsky
  1 sibling, 1 reply; 17+ messages in thread
From: Gerrit Haase @ 2016-10-04 19:21 UTC (permalink / raw)
  To: cygwin

Hello Gene,

in my opinion, it is not a setup.exe or tar problem, but I think
packages should not include symlinks at all. All can be created
postinstallation by the postinstall script, inside Cygwin and the
users environment it is running on.

Obviously, a political discussion is required, to decide whether it is
ok, as is, or if a change in package logic would have benefits.


Regards,
Gerrit

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-03 18:26     ` Thorsten Kampe
  2016-10-04  6:57       ` Gene Pavlovsky
@ 2016-10-04 19:39       ` Linda Walsh
  1 sibling, 0 replies; 17+ messages in thread
From: Linda Walsh @ 2016-10-04 19:39 UTC (permalink / raw)
  To: cygwin

Thorsten Kampe wrote:
> Tar's task is to unpack what's in the archive. So converting is out 
> of question. You can ask the maintainer of the affected packages to 
> create the symlinks in the postinstall script.
---
Is it a "special" tar, or is it the normal version of tar that 
runs under Cygwin?

I would assume that the install scripts run under the cygwin-environment.
That includes paying attention to the global value of CYGWIN.

If you set CYGWIN in your windows environment variables (recommended),
then it will always be set before any cygwin or setup program runs.
Setup isn't going to explicitly clear CYGWIN of its values, unless
they *happen* to be "invalid" -- and even then, I doubt it would modify
the user-set value of CYGWIN.

When I install programs, tar has always honored the global value of
CYGWIN I set in the system env vars.  (System is recommended over 
User Env, since cygwin can run as multiple users, and if you want 
consistent cygwin operation, you should set it before any cygwin
processes have started.

Is someone claiming that values in the System-Env var CYGWIN are
ignored by programs being installed?

NOTE: it is known and considered a "feature", that Cygwin ignores
MS-mountpoints mounted with mountd or linkd (link directory) and
treats them as symlinks.  This prohibits user control and redirection
of installed programs and disables the linux equivalent of 
mount --bind "thisdir" "onthisdir".




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-04  8:15         ` Vlado
@ 2016-10-04 20:42           ` Gene Pavlovsky
  0 siblings, 0 replies; 17+ messages in thread
From: Gene Pavlovsky @ 2016-10-04 20:42 UTC (permalink / raw)
  To: cygwin

That is a good solution indeed, if I just want to get the result I
want, for myself.
But it's just local solution.

On 4 October 2016 at 09:57, Vlado <v.99cygwin@gmail.com> wrote:
> On 3.10.2016 23:15, Gene Pavlovsky wrote:
>>
>> How about this kind of modification for the setup program: extract tar
>> archives into temp dir, after that search that temp dir for symlinks,
>
>
> Hi, Gene.
>
> Maybe You can consider to write and run simple script:
> - find all links (find -type l)
> - read target of link (readlink)
> - remove link (rm)
> - re-create link (ln -s)
> The ln -s should honor CYGWIN=winsymlinks:native and every link should be as
> You want.
>
> Vlado
>
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-04 19:21         ` Gerrit Haase
@ 2016-10-04 20:54           ` Gene Pavlovsky
  2016-10-04 21:04             ` Vince Rice
  0 siblings, 1 reply; 17+ messages in thread
From: Gene Pavlovsky @ 2016-10-04 20:54 UTC (permalink / raw)
  To: cygwin

That is a good point as well, however I'm not sure what are the
opinions of Cygwin's "elders".
Would everyone vote for creating a policy like that and pushing it to
the package maintainers?
A political discussion is what I'm trying to start here :)

On 4 October 2016 at 17:56, Gerrit Haase <gerrit.haase@gmail.com> wrote:
> Hello Gene,
>
> in my opinion, it is not a setup.exe or tar problem, but I think
> packages should not include symlinks at all. All can be created
> postinstallation by the postinstall script, inside Cygwin and the
> users environment it is running on.
>
> Obviously, a political discussion is required, to decide whether it is
> ok, as is, or if a change in package logic would have benefits.
>
>
> Regards,
> Gerrit
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-04 20:54           ` Gene Pavlovsky
@ 2016-10-04 21:04             ` Vince Rice
  2016-10-04 21:20               ` Eric Blake
  0 siblings, 1 reply; 17+ messages in thread
From: Vince Rice @ 2016-10-04 21:04 UTC (permalink / raw)
  To: The Cygwin Mailing List

Please don’t https://cygwin.com/acronyms/#TOFU.

> On 4 October 2016 at 17:56, Gerrit Haase <gerrit.haase@gmail.com> wrote:
>> Hello Gene,
>> 
>> in my opinion, it is not a setup.exe or tar problem, but I think
>> packages should not include symlinks at all. All can be created
>> postinstallation by the postinstall script, inside Cygwin and the
>> users environment it is running on.
>> 
>> Obviously, a political discussion is required, to decide whether it is
>> ok, as is, or if a change in package logic would have benefits.
> 
> On Oct 4, 2016, at 3:41 PM, Gene Pavlovsky <gene.pavlovsky@gmail.com> wrote:
> 
> That is a good point as well, however I'm not sure what are the
> opinions of Cygwin's "elders".
> Would everyone vote for creating a policy like that and pushing it to
> the package maintainers?
> A political discussion is what I'm trying to start here :)

I am not a “Cygwin elder,” nor do I play one on TV.

Packages are going to include simlinks because packages have simlinks in them.
The goal of Cygwin is to minimize the work that has to be done to port a package.
For example, the gawk package includes a link to awk. And so forth.

I don’t see that changing. And, as already noted, setup isn’t a Cygwin program,
so it knows (and cares) nothing about cygwin environment variables.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-04 21:04             ` Vince Rice
@ 2016-10-04 21:20               ` Eric Blake
  2016-10-04 23:15                 ` Gene Pavlovsky
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Blake @ 2016-10-04 21:20 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 1612 bytes --]

On 10/04/2016 03:53 PM, Vince Rice wrote:
>>> Obviously, a political discussion is required, to decide whether it is
>>> ok, as is, or if a change in package logic would have benefits.

The easiest way to have the discussion would be to write a patch,
instead of debating about different behaviors but then expecting others
to do the work.

> I don’t see that changing. And, as already noted, setup isn’t a Cygwin program,
> so it knows (and cares) nothing about cygwin environment variables.

setup.exe has its own untar'ing code (it is NOT forking tar, since one
of the packages setup.exe has to install is tar, and it would be a
chicken-and-egg problem if setup always forked out to a tar program if
it can't first untar the tarball containing tar).  But while setup.exe
apparently does NOT currently honor the CYGWIN environment variable with
regards to how its untar'ring code should behave on symlinks, there's
nothing that prevents you from writing a patch to teach it to do so, and
perhaps that patch can even share some of the existing code for
cygwin1.dll so that you aren't writing it from scratch.  It should
already be clear that code exists in setup.exe that handles symlinks in
tarballs - all that this thread is complaining about is that the code
doesn't do it the way that cygwin1.dll does it.  But someone has to
write such a patch, and preferably someone that cares enough to be
bothered by the current behavior (I don't, so it won't be me writing it).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

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

* Re: Native symlinks and setup.exe
  2016-10-04 21:20               ` Eric Blake
@ 2016-10-04 23:15                 ` Gene Pavlovsky
  2016-10-05  3:03                   ` Gene Pavlovsky
  0 siblings, 1 reply; 17+ messages in thread
From: Gene Pavlovsky @ 2016-10-04 23:15 UTC (permalink / raw)
  To: cygwin

Eric,

Before writing a patch it's wise to check if it would be accepted, now
that your position is clear, somebody might do it.
I don't think I'm up for the task, but I'd like to at least take a
look at the sources.
I've downloaded the git sources and found the link creation function
is in winsup/cygwin/path.cc, can you tell me where are the sources for
the setup util?

Thanks.

On 5 October 2016 at 00:04, Eric Blake <eblake@redhat.com> wrote:
> On 10/04/2016 03:53 PM, Vince Rice wrote:
>>>> Obviously, a political discussion is required, to decide whether it is
>>>> ok, as is, or if a change in package logic would have benefits.
>
> The easiest way to have the discussion would be to write a patch,
> instead of debating about different behaviors but then expecting others
> to do the work.
>
>> I don’t see that changing. And, as already noted, setup isn’t a Cygwin program,
>> so it knows (and cares) nothing about cygwin environment variables.
>
> setup.exe has its own untar'ing code (it is NOT forking tar, since one
> of the packages setup.exe has to install is tar, and it would be a
> chicken-and-egg problem if setup always forked out to a tar program if
> it can't first untar the tarball containing tar).  But while setup.exe
> apparently does NOT currently honor the CYGWIN environment variable with
> regards to how its untar'ring code should behave on symlinks, there's
> nothing that prevents you from writing a patch to teach it to do so, and
> perhaps that patch can even share some of the existing code for
> cygwin1.dll so that you aren't writing it from scratch.  It should
> already be clear that code exists in setup.exe that handles symlinks in
> tarballs - all that this thread is complaining about is that the code
> doesn't do it the way that cygwin1.dll does it.  But someone has to
> write such a patch, and preferably someone that cares enough to be
> bothered by the current behavior (I don't, so it won't be me writing it).
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Native symlinks and setup.exe
  2016-10-04 23:15                 ` Gene Pavlovsky
@ 2016-10-05  3:03                   ` Gene Pavlovsky
  0 siblings, 0 replies; 17+ messages in thread
From: Gene Pavlovsky @ 2016-10-05  3:03 UTC (permalink / raw)
  To: cygwin

Never mind, I found it's in another repository.
The code looks quite different, adapting the symlink code from newlib
to setup doesn't look straightforward, at least to my limited C
skills.

By the way, if I have an already created symlink, how do I check (e.g.
in a bash script) whether it's native or cygsymlink?

On 5 October 2016 at 02:08, Gene Pavlovsky <gene.pavlovsky@gmail.com> wrote:
> Eric,
>
> Before writing a patch it's wise to check if it would be accepted, now
> that your position is clear, somebody might do it.
> I don't think I'm up for the task, but I'd like to at least take a
> look at the sources.
> I've downloaded the git sources and found the link creation function
> is in winsup/cygwin/path.cc, can you tell me where are the sources for
> the setup util?
>
> Thanks.
>
> On 5 October 2016 at 00:04, Eric Blake <eblake@redhat.com> wrote:
>> On 10/04/2016 03:53 PM, Vince Rice wrote:
>>>>> Obviously, a political discussion is required, to decide whether it is
>>>>> ok, as is, or if a change in package logic would have benefits.
>>
>> The easiest way to have the discussion would be to write a patch,
>> instead of debating about different behaviors but then expecting others
>> to do the work.
>>
>>> I don’t see that changing. And, as already noted, setup isn’t a Cygwin program,
>>> so it knows (and cares) nothing about cygwin environment variables.
>>
>> setup.exe has its own untar'ing code (it is NOT forking tar, since one
>> of the packages setup.exe has to install is tar, and it would be a
>> chicken-and-egg problem if setup always forked out to a tar program if
>> it can't first untar the tarball containing tar).  But while setup.exe
>> apparently does NOT currently honor the CYGWIN environment variable with
>> regards to how its untar'ring code should behave on symlinks, there's
>> nothing that prevents you from writing a patch to teach it to do so, and
>> perhaps that patch can even share some of the existing code for
>> cygwin1.dll so that you aren't writing it from scratch.  It should
>> already be clear that code exists in setup.exe that handles symlinks in
>> tarballs - all that this thread is complaining about is that the code
>> doesn't do it the way that cygwin1.dll does it.  But someone has to
>> write such a patch, and preferably someone that cares enough to be
>> bothered by the current behavior (I don't, so it won't be me writing it).
>>
>> --
>> Eric Blake   eblake redhat com    +1-919-301-3266
>> Libvirt virtualization library http://libvirt.org
>>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2016-10-04 23:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-01 18:49 Native symlinks and setup.exe Gene Pavlovsky
2016-10-01 21:56 ` Vlado
2016-10-02  6:27   ` Herbert Stocker
2016-10-02 11:48 ` Thorsten Kampe
2016-10-02 23:35   ` Gene Pavlovsky
2016-10-03 18:26     ` Thorsten Kampe
2016-10-04  6:57       ` Gene Pavlovsky
2016-10-04  8:15         ` Vlado
2016-10-04 20:42           ` Gene Pavlovsky
2016-10-04 19:21         ` Gerrit Haase
2016-10-04 20:54           ` Gene Pavlovsky
2016-10-04 21:04             ` Vince Rice
2016-10-04 21:20               ` Eric Blake
2016-10-04 23:15                 ` Gene Pavlovsky
2016-10-05  3:03                   ` Gene Pavlovsky
2016-10-04 19:39       ` Linda Walsh
2016-10-02 20:08 ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).