Re: Patch to /etc/profile to deal with $HOME with a space

2004-12-01 Thread John Morrison
 On Tue, Nov 30, 2004 at 07:33:02PM -, John Morrison wrote:
 I have just set up Cygwin, and noticed that my default home was under
 my
 Documents and Settings directory (not yet having run mkpasswd).
 However,
 the /etc/profile setup which tries to only create the warning message
 about running mkpasswd and mkgroup once can't deal with a HOME
 environment
 variable with a space in it. Here is a patch to allow that to work:

Thanks,

I'm away on a course at the moment and don't have access to the machine
with the files I use to generate the package.  I'll be back home on
Friday, I'll try and get something out over the weekend or by mid-week at
the latest.

 Since this has been a persistent problem, pretty much since the inception
 of base-files, can I request that you do an audit of everything in base
 files
 and quote all unquoted access to environment variables in the package?
 It seems like we just keep running across these problems in bits and
 pieces and
 maybe it's time for a concerted effort to wipe these types of problems
 out.

OK.

I did consider changing /etc/postinstall/passwd-grp.sh so that instead of
running

/bin/mkpasswd -l -c  /etc/passwd

it does

mkpasswd.exe -l -c | sed 's/cygdrive\/.*Documents and Settings/home/' 
/etc/passwd

The reason the 'Doc and Settings' directory is appearing is because these
people are networked based and the flags to mkpasswd tell it to only check
the local machine.  It was talked about passing in the domain flag, but
ruled out because of the amount of time it would take if there were lots
of users or it was unable to contact a default domain (there may have been
other issues too, but they were the only ones I can remember).

Think it's worth it?

Anyway, I'll fix the profile quotes soonest.

J.


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



RE: Patch to /etc/profile to deal with $HOME with a space

2004-12-01 Thread Jörg Schaible
Hi John,

John Morrison wrote on Wednesday, December 01, 2004 10:08 AM:

[snip]

 
 I did consider changing /etc/postinstall/passwd-grp.sh so that
 instead of running 
 
 /bin/mkpasswd -l -c  /etc/passwd
 
 it does
 
 mkpasswd.exe -l -c | sed 's/cygdrive\/.*Documents and Settings/home/'
  /etc/passwd 

This is nonsense. Documents and Settings is localized.

[snip]

- Jörg

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



RE: Patch to /etc/profile to deal with $HOME with a space

2004-12-01 Thread John Morrison
 Hi John,

Hi :)

 John Morrison wrote on Wednesday, December 01, 2004 10:08 AM:

 I did consider changing /etc/postinstall/passwd-grp.sh so that
 instead of running

 /bin/mkpasswd -l -c  /etc/passwd

 it does

 mkpasswd.exe -l -c | sed 's/cygdrive\/.*Documents and Settings/home/'
  /etc/passwd

 This is nonsense. Documents and Settings is localized.

Humm, not nonsense (it works for English), maybe not correct... (is this
retrievable for replacement?)

Anyway, the idea (if not the impl) stands, when a network user installs
cygwin HOME is set to doc  settings.  When a local user installs HOME is
set to /home/user.  So, should network user functionality be changed?
(assuming it's possible to get the localisation)

J.


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



RE: Patch to /etc/profile to deal with $HOME with a space

2004-12-01 Thread Jörg Schaible
Hi John,

John Morrison wrote on Wednesday, December 01, 2004 12:32 PM:
 mkpasswd.exe -l -c | sed 's/cygdrive\/.*Documents and Settings/home/'
  /etc/passwd
 
 This is nonsense. Documents and Settings is localized.
 
 Humm, not nonsense (it works for English), maybe not
 correct... (is this retrievable for replacement?)

May also not work for English, cygdrive is just a default value and is 
settable. In case of my system:

 $ mount -p
 Prefix  Type Flags
 /mntsystem   binmode

You may *assume* it is called cygdrive for a new installation, but if there 
are registry entries left from an old one ...

 Anyway, the idea (if not the impl) stands, when a network
 user installs cygwin HOME is set to doc  settings.  When a
 local user installs HOME is set to /home/user.  So, should
 network user functionality be changed? (assuming it's
 possible to get the localisation)

 $ cygpath -H

Personally I use a mount for home:

 $ mount
 ...
 C:\Dokumente und Einstellungen on /home type system (binmode)
 ...

But this is *my* preference only (and applies not for Win95, Win 98, Win NT 
etc. anyway). Additionally in the pattern /home/user may not apply for newer 
Win OSses also, since the user's profile directory may not have the name of the 
user and unfortunately this information cannot be retrieved from cygpath, you 
may read directly from the registry.

- Jörg

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



RE: Patch to /etc/profile to deal with $HOME with a space

2004-12-01 Thread John Morrison
 Hi John,

 John Morrison wrote on Wednesday, December 01, 2004 12:32 PM:
 mkpasswd.exe -l -c | sed 's/cygdrive\/.*Documents and Settings/home/'
  /etc/passwd

 This is nonsense. Documents and Settings is localized.

 Humm, not nonsense (it works for English), maybe not
 correct... (is this retrievable for replacement?)

 May also not work for English, cygdrive is just a default value and is
 settable. In case of my system:

  $ mount -p
  Prefix  Type Flags
  /mntsystem   binmode

 You may *assume* it is called cygdrive for a new installation, but if
 there are registry entries left from an old one ...

 Anyway, the idea (if not the impl) stands, when a network
 user installs cygwin HOME is set to doc  settings.  When a
 local user installs HOME is set to /home/user.  So, should
 network user functionality be changed? (assuming it's
 possible to get the localisation)

  $ cygpath -H

 Personally I use a mount for home:

  $ mount
  ...
  C:\Dokumente und Einstellungen on /home type system (binmode)
  ...

 But this is *my* preference only (and applies not for Win95, Win 98, Win
 NT etc. anyway). Additionally in the pattern /home/user may not apply for
 newer Win OSses also, since the user's profile directory may not have the
 name of the user and unfortunately this information cannot be retrieved
 from cygpath, you may read directly from the registry.

Humm, OK - scratch that idea :)

J.


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



RE: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread Harig, Mark
1. Thank you for the patch file.

2. More fundamentally, this is a problem in 
   /etc/defaults/etc/profile, instead of with /etc/profile.

3. This file belongs to the 'base-files' package:

   $ /usr/bin/cygcheck -f /etc/defaults/etc/profile
   base-files-3.1-4

4. This problem could be reported to Bugzilla, with
   a patch file attachment.  Please see

   http://sourceware.org/bugzilla/enter_bug.cgi?product=cygwin

   and select 'Cygwin Applications' as the Component.

   After you have entered the Summary and Description, revisit
   the Bugzilla report, and click on the 'Create new attachment'
   link.  It will allow you to attach a patch file, and select
   that type of file.

---

Please do not reply to me.  Please do not include my email
address in any replies to the Cygwin mailing list.

 -Original Message-
 From: William R. Knox
 Sent: Tuesday, November 30, 2004 12:38 PM
 Subject: Patch to /etc/profile to deal with $HOME with a space
 
 
 I have just set up Cygwin, and noticed that my default home 
 was under my
 Documents and Settings directory (not yet having run 
 mkpasswd). However,
 the /etc/profile setup which tries to only create the warning message
 about running mkpasswd and mkgroup once can't deal with a 
 HOME environment
 variable with a space in it. Here is a patch to allow that to work:
 
 --- /etc/profile2004-11-26 14:53:34.477082000 -0500
 +++ /etc/profile2004-11-30 11:22:32.175340300 -0500
 @@ -194,10 +194,10 @@
echo and can be safely ignored.
 
# only display the above once
 -  cp -f /etc/group ${HOME}/group.mkgroup_l_d \
 +  cp -f /etc/group ${HOME}/group.mkgroup_l_d \
 ( [ -w /etc/group ] || chmod --silent a+w /etc/group ; )\
 -   sed -e 's/^mkgroup_l_d/mkgroup-l-d/' 
 ${HOME}/group.mkgroup_l_d  /etc/grou
 p \
 +   sed -e 's/^mkgroup_l_d/mkgroup-l-d/' 
 ${HOME}/group.mkgroup_l_d  /etc/gr
 oup \
 chmod --silent --reference=/etc/passwd /etc/group
 -  rm -f ${HOME}/group.mkgroup_l_d
 +  rm -f ${HOME}/group.mkgroup_l_d
;;
  esac
 



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



RE: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread Harig, Mark
 
 4. This problem could be reported to Bugzilla, with
a patch file attachment.  Please see
 
http://sourceware.org/bugzilla/enter_bug.cgi?product=cygwin
 
and select 'Cygwin Applications' as the Component.
 
After you have entered the Summary and Description, revisit
the Bugzilla report, and click on the 'Create new attachment'
link.  It will allow you to attach a patch file, and select
that type of file.
 

If you have not used Bugzilla before, then it will require that
you create an account.  This requires that you provide your email
address and name.  Bugzilla will send a password to your email account.
After you log in using this cryptic password, you can change it to
something you can remember by clicking on the 'prefs' link in the footer.

For a new account, click on the 'Open a new Bugzilla account' at the URL
http://sources.redhat.com/bugzilla/.

Please do not reply to me.  Please do not include my email
address in any replies to the Cygwin mailing list.

---

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



Re: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread Reini Urban
Harig, Mark schrieb:
1. Thank you for the patch file.
2. More fundamentally, this is a problem in 
   /etc/defaults/etc/profile, instead of with /etc/profile.

3. This file belongs to the 'base-files' package:
   $ /usr/bin/cygcheck -f /etc/defaults/etc/profile
   base-files-3.1-4
4. This problem could be reported to Bugzilla, with
   a patch file attachment.  Please see
   http://sourceware.org/bugzilla/enter_bug.cgi?product=cygwin
   and select 'Cygwin Applications' as the Component.
   After you have entered the Summary and Description, revisit
   the Bugzilla report, and click on the 'Create new attachment'
   link.  It will allow you to attach a patch file, and select
   that type of file.
Didn't we say that before?
Please don't file arbitrary patches to bugzilla by yourself!
Let the developers do that, based on the discussion here.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


RE: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread Harig, Mark

  
  4. This problem could be reported to Bugzilla, with
 a patch file attachment.  Please see
  
 http://sourceware.org/bugzilla/enter_bug.cgi?product=cygwin
  
 and select 'Cygwin Applications' as the Component.
  
 After you have entered the Summary and Description, revisit
 the Bugzilla report, and click on the 'Create new attachment'
 link.  It will allow you to attach a patch file, and select
 that type of file.
 
 Didn't we say that before?
 Please don't file arbitrary patches to bugzilla by yourself!
 Let the developers do that, based on the discussion here.
 -- 
 Reini Urban

OK.  Should this be added to http://cygwin.com/problems.html?

Or, should subscribers to this list not be referred to Bugzilla?



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



Re: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread John Morrison
 I have just set up Cygwin, and noticed that my default home was under my
 Documents and Settings directory (not yet having run mkpasswd). However,
 the /etc/profile setup which tries to only create the warning message
 about running mkpasswd and mkgroup once can't deal with a HOME environment
 variable with a space in it. Here is a patch to allow that to work:

Thanks,

I'm away on a course at the moment and don't have access to the machine
with the files I use to generate the package.  I'll be back home on
Friday, I'll try and get something out over the weekend or by mid-week at
the latest.

J.


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



RE: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread Harig, Mark


 -Original Message-
 From: Harig, Mark 
 Sent: Tuesday, November 30, 2004 2:26 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Patch to /etc/profile to deal with $HOME with a space
 
 
 
   
   4. This problem could be reported to Bugzilla, with
  a patch file attachment.  Please see
   
  http://sourceware.org/bugzilla/enter_bug.cgi?product=cygwin
   
  and select 'Cygwin Applications' as the Component.
   
  After you have entered the Summary and Description, revisit
  the Bugzilla report, and click on the 'Create new attachment'
  link.  It will allow you to attach a patch file, and select
  that type of file.
  
  Didn't we say that before?
  Please don't file arbitrary patches to bugzilla by yourself!
  Let the developers do that, based on the discussion here.
  -- 
  Reini Urban
 
 OK.  Should this be added to http://cygwin.com/problems.html?
 
 Or, should subscribers to this list not be referred to Bugzilla?
 

Also, does http://cygwin.com/contrib.html need to be updated in
light of the use of Bugzilla, or is it still the preferred way to
provide patches?

From the contrib.html page:

 When you have finalized your changes

 Once you've finished making and testing your changes, you should send a 
 unified diff to the cygwin-patches list. As an example, if you have modified 
 several files in /c/src/winsup, then do the following in bash:

   cd /c/src/winsup
   cvs diff -up  /tmp/mypatch

 This will produce one file with all of your changes, making it easy for 
 someone to review and apply. Send the contents of this file as plain text. Do 
 not uuencode or otherwise encrypt it.

 Then send it to the cygwin-patches list in an email along with an explanation 
 of what the change does. Make sure that you include a ChangeLog entry. If you 
 have never used a ChangeLog before 1) refer to the GNU ChangeLog Standards 
 and 2) model your entry after other entries in the file winsup/ChangeLog.

-

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



Re: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread Reini Urban
Harig, Mark schrieb:
4. This problem could be reported to Bugzilla, with
  a patch file attachment.  Please see
  http://sourceware.org/bugzilla/enter_bug.cgi?product=cygwin
  and select 'Cygwin Applications' as the Component.
  After you have entered the Summary and Description, revisit
  the Bugzilla report, and click on the 'Create new attachment'
  link.  It will allow you to attach a patch file, and select
  that type of file.
Didn't we say that before?
Please don't file arbitrary patches to bugzilla by yourself!
Let the developers do that, based on the discussion here.
--
Reini Urban
OK.  Should this be added to http://cygwin.com/problems.html?
Better don't mention that.
Or, should subscribers to this list not be referred to Bugzilla?
If it stays read-only. But so far it's a developers-internal tool.
Otherwise it will lead to ineffective and cluttered bug reports.
It is much easier to understand the problem if analyzed here and then 
maybe posted by the developer, who understands the real problem and 
might want to use bugzilla. If at all.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

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


Re: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread Christopher Faylor
On Tue, Nov 30, 2004 at 02:26:21PM -0500, Harig, Mark wrote:
  4. This problem could be reported to Bugzilla, with
 a patch file attachment.  Please see
  
 http://sourceware.org/bugzilla/enter_bug.cgi?product=cygwin
  
 and select 'Cygwin Applications' as the Component.
  
 After you have entered the Summary and Description, revisit
 the Bugzilla report, and click on the 'Create new attachment'
 link.  It will allow you to attach a patch file, and select
 that type of file.
 
 Didn't we say that before?
 Please don't file arbitrary patches to bugzilla by yourself!
 Let the developers do that, based on the discussion here.

OK.  Should this be added to http://cygwin.com/problems.html?

Or, should subscribers to this list not be referred to Bugzilla?

bugzilla was set up to report bugs.  It was not intended to supersede
the existing mechanisms for providing patches.

cgf

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



Re: Patch to /etc/profile to deal with $HOME with a space

2004-11-30 Thread Christopher Faylor
On Tue, Nov 30, 2004 at 07:33:02PM -, John Morrison wrote:
 I have just set up Cygwin, and noticed that my default home was under my
 Documents and Settings directory (not yet having run mkpasswd). However,
 the /etc/profile setup which tries to only create the warning message
 about running mkpasswd and mkgroup once can't deal with a HOME environment
 variable with a space in it. Here is a patch to allow that to work:

Thanks,

I'm away on a course at the moment and don't have access to the machine
with the files I use to generate the package.  I'll be back home on
Friday, I'll try and get something out over the weekend or by mid-week at
the latest.

Since this has been a persistent problem, pretty much since the inception
of base-files, can I request that you do an audit of everything in base files
and quote all unquoted access to environment variables in the package?  It
seems like we just keep running across these problems in bits and pieces and
maybe it's time for a concerted effort to wipe these types of problems out.

cgf

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