Re: Switching the default /bin/sh to dash

2009-07-10 Thread Torsten Landschoff
On Thu, Jun 25, 2009 at 03:42:28PM +0200, Gilles Filippini wrote:
  Note that /bin/sh belonging to the bash package for now, your changing
  the symlink will be forgotten if you ever install another version of
  bash that still has it.
 
 Is there any rational for not using the Debian alternatives method?

We tried that already 10 years ago. Have a look at this thread:

http://www.mail-archive.com/debian-devel@lists.debian.org/msg81293.html

The relevant bash version was 

bash (2.02.1-1.8) unstable; urgency=low

  * Applied Anthonies patch and recompiled as the libc5 version did
not compile for him (closes: #34717, #43050, #43096, #10699).
  * Bumped the version number of libreadline and recompiled,
hopefully in time before the dinstall run ;)

 -- Torsten Landschoff tors...@debian.org  Sat, 18 Sep 1999 19:26:20 +0200

Believe me, using update-alternatives to manage /bin/sh will get you many
emails from annoyed users. I think I got around 1000 hate emails on a 
single day...

Greetings, Torsten


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-07-01 Thread Petter Reinholdtsen
[Giacomo A. Catenazzi]
 Hmm, so a switch to dash it is not because of POSIX, but because
 of better code and lighter shell for our scripts?

 Which is also a good reason for the change.

Yes, it is a good change.  I would love to switch every installation
to dash as /bin/sh, but believe the path of least surprises to the
sysadmin is to only change new installations and not existing systems.

 But could you tell us more about the subtle problems for shutdown
 sequences.

URL: http://bugs.debian.org/159771  is an example, solved by
switching from bash to dash. :)

Happy hacking,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-07-01 Thread Luk Claes
Petter Reinholdtsen wrote:
 [Giacomo A. Catenazzi]
 Hmm, so a switch to dash it is not because of POSIX, but because
 of better code and lighter shell for our scripts?

 Which is also a good reason for the change.
 
 Yes, it is a good change.  I would love to switch every installation
 to dash as /bin/sh, but believe the path of least surprises to the
 sysadmin is to only change new installations and not existing systems.

Right, though how would you implement that? It doesn't look trivial at
all to me and will possibly be an extra source of errors.

It should also only affect external scripts that are bash specific
AFAICS and they would be easily 'fixed' by changing bin/sh to bin/bash
in the shebang (can even happen unconditionally).

Cheers

Luk


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-07-01 Thread Frans Pop
Raphael Hertzog wrote:
 On Thu, 25 Jun 2009, Raphael Geissert wrote:
 Artur R. Czechowski wrote:
  What about debconf question?
 
 dash already has one, the idea is to make it essential and default to
 yes, so that as soon as it is installed the symlink is changed. If you
 wish to have dash installed but not as /bin/sh you can always
 dpkg-reconfigure dash.
 
 Hum, AFAIK if it defaults to yes, it will be changed on upgrade for
 anyone who has not yet seen the question. So that doesn't work if your
 plan is to not change it except for new installations.

I've not seen any response to this, but it seems to me to be a very valid 
point.

dash currently is optional, so there will be on a lot of existing systems 
on which it is not installed. How is the planned strategy going to 
prevent dash becoming the default shell on existing systems when it gets 
installed for the first time because of its raised priority?


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-07-01 Thread Raphael Geissert
Frans Pop wrote:
 Raphael Hertzog wrote:
 
 Hum, AFAIK if it [debconf prompt] defaults to yes, it will be changed on
 upgrade for anyone who has not yet seen the question. So that doesn't
 work if your plan is to not change it except for new installations.
 
 I've not seen any response to this, but it seems to me to be a very valid
 point.

I though I had replied, sorry.

 
 dash currently is optional, so there will be on a lot of existing systems
 on which it is not installed. How is the planned strategy going to
 prevent dash becoming the default shell on existing systems when it gets
 installed for the first time because of its raised priority?

There are two, both ugly actually, ways to do it:
a) by making dpkg pre-depend on dash so that it is installed and can see if
an older dpkg is installed
b) by finding a file that could tell us the installation date and base the
decision on that.

I've personally had no time to check if there's any file installed by dpkg
that could indicate the installation date. But another option, as some
people have already expressed, is to simply make the change on all the
installations.

Unless somebody knows a file that could be used to do it the b) way I guess
I won't have another option but to send another proposal stating that all
the installations would be modified.

In case the reasons are not obvious enough, a D-I-based solution is not a
candidate as newly created chroots (debootstrap-created) should get dash
and not bash.

Cheers,
Raphael Geissert



-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-07-01 Thread Frans Pop
Raphael Geissert wrote:
 dash currently is optional, so there will be on a lot of existing
 systems on which it is not installed. How is the planned strategy going
 to prevent dash becoming the default shell on existing systems when it
 gets installed for the first time because of its raised priority?
 
 There are two, both ugly actually, ways to do it:
 a) by making dpkg pre-depend on dash so that it is installed and can see
 if an older dpkg is installed
 b) by finding a file that could tell us the installation date and base
 the decision on that.

An alternative that is still not pretty, but at least keeps the ugliness 
in the packages related to the switch and is fairly straightforward to 
implement, would be to make the new dash pre-depend on a new version of 
bash and have the maintainer scripts of bash preseed the dash template to 
false if:
- bash is being upgraded
- the dash template does not yet exist

Cheers,
FJP


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-07-01 Thread Raphael Geissert
Frans Pop wrote:
 An alternative that is still not pretty, but at least keeps the ugliness
 in the packages related to the switch and is fairly straightforward to
 implement, would be to make the new dash pre-depend on a new version of
 bash and have the maintainer scripts of bash preseed the dash template

bash playing the evil role, trying to keep some users for himself :)

 to false if:
 - bash is being upgraded
 - the dash template does not yet exist
 

It's another option, yes.

Will wait some more feedback, though.

Cheers,
Raphael Geissert



-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-29 Thread Giacomo A. Catenazzi

Russ Allbery wrote:

Giacomo A. Catenazzi c...@debian.org writes:


PS: I think that dash is a step toward a truly posix shell, but it is
not yet a posix shell: we still need fewer extentions. So in five/ten
year we will change it again.


I doubt that we're going to move in that direction farther than where
dash already is.  The extensions that are left in dash are by and large
things that people really want to use and that are helpful in practical
ways for writing reasonable scripts.

I think it's more likely that POSIX will end up adopting some of those
extensions.  (I certainly hope this will happen for things like test -a.)


I also hope so.

Anyway I was thinking about echo -n, which IMHO requires a such step
(and in this case I don't think POSIX will restore the old behaviour).
A silent change will break a lot of sysadmin scripts.

ciao
cate


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-29 Thread Giacomo A. Catenazzi

Steve Langasek wrote:

On Wed, Jun 24, 2009 at 10:21:45PM -0500, Raphael Geissert wrote:

I just noticed I forgot to say something:



What won't change:
* Bash will still be used as the default interactive shells for users

* the sh symlink won't be modified on existing installations


I understand the concerns about not breaking existing scripts, but I'll
nevertheless be disappointed if this switch isn't made on upgrades as well.
Using bash as /bin/sh causes a number of subtle problems for shutdown
sequences, in addition to the obvious performance issues, and I think the
fix for non-POSIX shell scripts is straightforward enough that we should
just document the change (in the release notes and NEWS.Debian) and tell
users to use the right interpreter if they have any doubts about their
dash-compatibility.


Hmm, so a switch to dash it is not because of POSIX, but because
of better code and lighter shell for our scripts?

Which is also a good reason for the change.

But could you tell us more about the subtle problems for shutdown
sequences.

The bash can simulate the init program, which is very good for
system management on emergencies or debug the init procedure.
(I don't know about dash)
These are special cases, but it would nice if we support or document the
strange iterations of bash (and maybe also of busibox) on init procedures.

ciao
cate


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-26 Thread Giacomo A. Catenazzi

Raphael Geissert wrote:

dash already has one, the idea is to make it essential and default to yes,
so that as soon as it is installed the symlink is changed. If you wish to
have dash installed but not as /bin/sh you can always dpkg-reconfigure
dash.


Why essential? It doesn't provide anything dash-specific, and I hope
nobody will write a script starting with #!/bin/dash.

I prefer that we handle it like the libraries:
make it essential-like via dependencies of true-essential packages.

ciao
cate

PS: I think that dash is a step toward a truly posix shell, but it
is not yet a posix shell: we still need fewer extentions. So
in five/ten year we will change it again.


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-26 Thread Christian Perrier
Quoting Luk Claes (l...@debian.org):

 It's enough to dpkg-reconfigure dash for existing installations.


And, by the way, if the switch happens, one has to think about
rewording the current debconf template for dash, that says:

Description: Install dash as /bin/sh?
 The default /bin/sh shell on Debian and Debian-based systems is bash.
 .
 However, since the default shell is required to be POSIX-compliant,
 any shell that conforms to POSIX, such as dash, can serve as /bin/sh.
 You may wish to do this because dash is faster and smaller than bash.


If dash becomes the default /bin/sh, then that template should be kept
with a different wording (for those who might want to restore it as
the default sh) and a similar template (and maintainer script magic)
should be added to bash.



signature.asc
Description: Digital signature


Re: Switching the default /bin/sh to dash

2009-06-26 Thread Russ Allbery
Giacomo A. Catenazzi c...@debian.org writes:

 PS: I think that dash is a step toward a truly posix shell, but it is
 not yet a posix shell: we still need fewer extentions. So in five/ten
 year we will change it again.

I doubt that we're going to move in that direction farther than where
dash already is.  The extensions that are left in dash are by and large
things that people really want to use and that are helpful in practical
ways for writing reasonable scripts.

I think it's more likely that POSIX will end up adopting some of those
extensions.  (I certainly hope this will happen for things like test -a.)

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-26 Thread Steve Langasek
On Wed, Jun 24, 2009 at 10:21:45PM -0500, Raphael Geissert wrote:
 I just noticed I forgot to say something:

  What won't change:
  * Bash will still be used as the default interactive shells for users
 * the sh symlink won't be modified on existing installations

I understand the concerns about not breaking existing scripts, but I'll
nevertheless be disappointed if this switch isn't made on upgrades as well.
Using bash as /bin/sh causes a number of subtle problems for shutdown
sequences, in addition to the obvious performance issues, and I think the
fix for non-POSIX shell scripts is straightforward enough that we should
just document the change (in the release notes and NEWS.Debian) and tell
users to use the right interpreter if they have any doubts about their
dash-compatibility.

We certainly make much more intrusive changes to the implementations of
other interpreters across releases, and while none of these have quite the
same penetration as /bin/sh, I think weighing the scope of the changes vs.
the number of scripts puts this on the same order as past updates to
/usr/bin/perl or /usr/bin/python.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Artur R. Czechowski
On Thu, Jun 25, 2009 at 07:31:15AM +0200, Mike Hommey wrote:
 On Thu, Jun 25, 2009 at 06:47:07AM +0200, Hendrik Sattler wrote:
  Am Donnerstag 25 Juni 2009 05:21:45 schrieb Raphael Geissert:
   I just noticed I forgot to say something:
What won't change:
* Bash will still be used as the default interactive shells for users
   * the sh symlink won't be modified on existing installations
[cut]
 I'd say if /bin/sh points to the current default (/bin/bash), then it
 should be modified. OTOH, if it was modified locally by the admin to
 point somewhere else, leave it alone.
What about debconf question?

Regards
Artur


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Stig Sandbeck Mathisen
Mike Hommey m...@glandium.org writes:

 I'd say if /bin/sh points to the current default (/bin/bash), then it
 should be modified. OTOH, if it was modified locally by the admin to
 point somewhere else, leave it alone.

That would potentially break locally written or installed scripts.  Not
touching the /bin/sh link on upgrade seems less harmful.

-- 
Stig Sandbeck Mathisen


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Christian Perrier
Quoting Raphael Geissert (atom...@gmail.com):

 Switch the default /bin/sh to dash in the following weeks


/me applauses

(I'm using dash as /bin/sh for about NN years now: IIRC I switched after
Marga's work in the GSOC about the boot process speed up)




signature.asc
Description: Digital signature


Re: Switching the default /bin/sh to dash

2009-06-25 Thread Stefano Zacchiroli
On Thu, Jun 25, 2009 at 12:10:46AM -0500, Raphael Geissert wrote:
  And so that all users that upgrade do not benefit from the goal of this
  change? Even better.
 
 This is to avoid causing undesirable effects when upgrading. People have
 always been concerned about such kind of changes, and they are more than
 right. The goal is not to cause a chaos.

I can understand the fear.

Still, as a DD, I would like to explicitly switch to dash to help in
spotting possible problems. Can you please consider document how to
switch? I guess switching the symlink is enough, but an entry in
README.Debian saying explicitly so (and possibly documenting extra
needed steps) would be nice.

Thanks for your work!
Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
z...@{upsilon.cc,pps.jussieu.fr,debian.org} -- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...| ..: | Je dis tu à tous ceux que j'aime


signature.asc
Description: Digital signature


Re: Switching the default /bin/sh to dash

2009-06-25 Thread Marc Haber
On Wed, 24 Jun 2009 17:51:58 -0500, Raphael Geissert
atom...@gmail.com wrote:
Side effects:
* Errors caused by the use of bashisms.
* Faster boot, builds, and general usage of /bin/sh scripts.
* Reduced memory footprint when running /bin/sh scripts.

Counter side effects:
* During the following weeks I will be working on providing patches for the 
known issues (check the list at [1]),
* and performing another archive-wide checkbashisms check on binary packages,
* debian/rules,
* and then an archive rebuild with dash as /bin/sh should follow.

Do you have statistics about how many packages would be instantly RC
buggy because they have #!/bin/bash scripts and would now need to
depend or even pre-depend on bash? Since bash is essential, it is a
bug to explicitly depend on bash, and after the change it will be a
bug to not depend on bash.

Greetings
Marc

-- 
-- !! No courtesy copies, please !! -
Marc Haber |Questions are the | Mailadresse im Header
Mannheim, Germany  | Beginning of Wisdom  | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG Rightful Heir | Fon: *49 621 72739834


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Lucas Nussbaum
On 25/06/09 at 10:05 +0200, Marc Haber wrote:
 On Wed, 24 Jun 2009 17:51:58 -0500, Raphael Geissert
 atom...@gmail.com wrote:
 Side effects:
 * Errors caused by the use of bashisms.
 * Faster boot, builds, and general usage of /bin/sh scripts.
 * Reduced memory footprint when running /bin/sh scripts.
 
 Counter side effects:
 * During the following weeks I will be working on providing patches for the 
 known issues (check the list at [1]),
 * and performing another archive-wide checkbashisms check on binary packages,
 * debian/rules,
 * and then an archive rebuild with dash as /bin/sh should follow.
 
 Do you have statistics about how many packages would be instantly RC
 buggy because they have #!/bin/bash scripts and would now need to
 depend or even pre-depend on bash? Since bash is essential, it is a
 bug to explicitly depend on bash, and after the change it will be a
 bug to not depend on bash.

It won't: bash stays the default shell for interactive use, so it stays
essential as well.
-- 
| Lucas Nussbaum
| lu...@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lu...@nussbaum.fr GPG: 1024D/023B3F4F |


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Sven Joachim
On 2009-06-25 10:05 +0200, Marc Haber wrote:

 Do you have statistics about how many packages would be instantly RC
 buggy because they have #!/bin/bash scripts and would now need to
 depend or even pre-depend on bash? Since bash is essential, it is a
 bug to explicitly depend on bash, and after the change it will be a
 bug to not depend on bash.

I don't think that Raphael meant to make bash non-essential.

Sven


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Harald Braumann
Hi,


On Wed, 24 Jun 2009 17:51:58 -0500
Raphael Geissert atom...@gmail.com wrote:

 Hello everybody,
 
 I think everyone readying this list is more than aware of the
 intention to switch to dash as the default /bin/sh.
 A lot of work has been done on many sides to make this switch doable
 and as smooth as possible and plenty of people has been contributing
 by testing, filing bugs, providing patches, fixing bugs and by using
 dash.
 [...]
 * and performing another archive-wide checkbashisms check on binary

Checkbashisms is a lintian check, right? Can I use it to check my own
scripts, not being in a package? 

Cheers,
harry



signature.asc
Description: PGP signature


Re: Switching the default /bin/sh to dash

2009-06-25 Thread Lucas Nussbaum
On 25/06/09 at 10:32 +0200, Harald Braumann wrote:
 Hi,
 
 
 On Wed, 24 Jun 2009 17:51:58 -0500
 Raphael Geissert atom...@gmail.com wrote:
 
  Hello everybody,
  
  I think everyone readying this list is more than aware of the
  intention to switch to dash as the default /bin/sh.
  A lot of work has been done on many sides to make this switch doable
  and as smooth as possible and plenty of people has been contributing
  by testing, filing bugs, providing patches, fixing bugs and by using
  dash.
  [...]
  * and performing another archive-wide checkbashisms check on binary
 
 Checkbashisms is a lintian check, right?

No, it's in devscripts.
-- 
| Lucas Nussbaum
| lu...@lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lu...@nussbaum.fr GPG: 1024D/023B3F4F |


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Cyril Brulebois
Stefano Zacchiroli z...@debian.org (25/06/2009):
 Still, as a DD, I would like to explicitly switch to dash to help in
 spotting possible problems. Can you please consider document how to
 switch? I guess switching the symlink is enough, but an entry in
 README.Debian saying explicitly so (and possibly documenting extra
 needed steps) would be nice.

Note that /bin/sh belonging to the bash package for now, your changing
the symlink will be forgotten if you ever install another version of
bash that still has it.

Mraw,
KiBi.


signature.asc
Description: Digital signature


Re: Switching the default /bin/sh to dash

2009-06-25 Thread Cyril Brulebois
Lucas Nussbaum lu...@lucas-nussbaum.net (25/06/2009):
 On 25/06/09 at 10:32 +0200, Harald Braumann wrote:
  Checkbashisms is a lintian check, right?
 
 No, it's in devscripts.

Yes, it is also a lintian check. Although not as complete, see lintian's
check/scripts file.

Mraw,
KiBi.


signature.asc
Description: Digital signature


Re: Switching the default /bin/sh to dash

2009-06-25 Thread Adam D. Barratt

Cyril Brulebois wrote, Thu, 25 Jun 2009 14:51:46 +0200:

Lucas Nussbaum lu...@lucas-nussbaum.net (25/06/2009):
 On 25/06/09 at 10:32 +0200, Harald Braumann wrote:
  Checkbashisms is a lintian check, right?

 No, it's in devscripts.



Yes, it is also a lintian check. Although not as complete,
see lintian's check/scripts file.


For completeness...

checkbashisms started life as basically a copy of the relevant section of 
checks/scripts and the two then developed separately.


More recently there's been a crossover between devscripts and Lintian 
maintainership (i.e. me) so they've become much more closely synced. I tend 
to apply obvious fixes to both and let newer or more FP-prone features 
mature in checkbashisms for a bit before adding them to Lintian.


Adam 



--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Gilles Filippini
Cyril Brulebois a écrit :
 Stefano Zacchiroli z...@debian.org (25/06/2009):
 Still, as a DD, I would like to explicitly switch to dash to help in
 spotting possible problems. Can you please consider document how to
 switch? I guess switching the symlink is enough, but an entry in
 README.Debian saying explicitly so (and possibly documenting extra
 needed steps) would be nice.
 
 Note that /bin/sh belonging to the bash package for now, your changing
 the symlink will be forgotten if you ever install another version of
 bash that still has it.

Is there any rational for not using the Debian alternatives method?

Thanks,

_Gilles.


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Sven Joachim
On 2009-06-25 14:40 +0200, Cyril Brulebois wrote:

 Stefano Zacchiroli z...@debian.org (25/06/2009):
 Still, as a DD, I would like to explicitly switch to dash to help in
 spotting possible problems. Can you please consider document how to
 switch? I guess switching the symlink is enough, but an entry in
 README.Debian saying explicitly so (and possibly documenting extra
 needed steps) would be nice.

 Note that /bin/sh belonging to the bash package for now, your changing
 the symlink will be forgotten if you ever install another version of
 bash that still has it.

Therefore one has to use dpkg-divert to move this symlink out of the
way, which is achieved most easily by dpkg-reconfigure dash.

Sven


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Josselin Mouette
Le jeudi 25 juin 2009 à 15:42 +0200, Gilles Filippini a écrit :
 Cyril Brulebois a écrit :
  Note that /bin/sh belonging to the bash package for now, your changing
  the symlink will be forgotten if you ever install another version of
  bash that still has it.
 
 Is there any rational for not using the Debian alternatives method?

IIRC, when using alternatives, there is no guarantee that the
alternative is always usable. For something as critical as /bin/sh, it
does not sound like a good idea.

-- 
 .''`.  Josselin Mouette
: :' :
`. `'   “I recommend you to learn English in hope that you in
  `- future understand things”  -- Jörg Schilling


signature.asc
Description: Ceci est une partie de message numériquement signée


Re: Switching the default /bin/sh to dash

2009-06-25 Thread Raphael Geissert
Artur R. Czechowski wrote:
 What about debconf question?
 

dash already has one, the idea is to make it essential and default to yes,
so that as soon as it is installed the symlink is changed. If you wish to
have dash installed but not as /bin/sh you can always dpkg-reconfigure
dash.

Cheers,
Raphael Geisser





-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Luk Claes
Stefano Zacchiroli wrote:
 On Thu, Jun 25, 2009 at 12:10:46AM -0500, Raphael Geissert wrote:
 And so that all users that upgrade do not benefit from the goal of this
 change? Even better.
 This is to avoid causing undesirable effects when upgrading. People have
 always been concerned about such kind of changes, and they are more than
 right. The goal is not to cause a chaos.
 
 I can understand the fear.
 
 Still, as a DD, I would like to explicitly switch to dash to help in
 spotting possible problems. Can you please consider document how to
 switch? I guess switching the symlink is enough, but an entry in
 README.Debian saying explicitly so (and possibly documenting extra
 needed steps) would be nice.

It's enough to dpkg-reconfigure dash for existing installations.

Cheers

Luk


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Russ Allbery
Adam D. Barratt a...@adam-barratt.org.uk writes:

 For completeness...

 checkbashisms started life as basically a copy of the relevant section
 of checks/scripts and the two then developed separately.

 More recently there's been a crossover between devscripts and Lintian
 maintainership (i.e. me) so they've become much more closely synced. I
 tend to apply obvious fixes to both and let newer or more FP-prone
 features mature in checkbashisms for a bit before adding them to
 Lintian.

The long-term goal is to turn checkbashisms into some more convenient
sort of shared code that both Lintian and the devscripts check can use.

Currently, Lintian only checks maintainer scripts, so you should use
checkbashisms to check other scripts.  Checking other scripts and
debian/rules files has been on the wish list for quite a while, but as
yet we've not done the necessary work in Lintian.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-25 Thread Raphael Hertzog
On Thu, 25 Jun 2009, Raphael Geissert wrote:
 Artur R. Czechowski wrote:
  What about debconf question?
 
 dash already has one, the idea is to make it essential and default to yes,
 so that as soon as it is installed the symlink is changed. If you wish to
 have dash installed but not as /bin/sh you can always dpkg-reconfigure
 dash.

Hum, AFAIK if it defaults to yes, it will be changed on upgrade for anyone
who has not yet seen the question. So that doesn't work if your plan is to
not change it except for new installations.

Cheers,
-- 
Raphaël Hertzog

Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-24 Thread Michael Biebl
Raphael Geissert wrote:
 Hello everybody,
 
 I think everyone readying this list is more than aware of the intention to 
 switch to dash as the default /bin/sh.

 
 Summarising:
 Unless a major blocker shows up, the switch is going to be done on the 
 following weeks.

\o/, finally.

Thanks for all your hard work,

Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Re: Switching the default /bin/sh to dash

2009-06-24 Thread John Goerzen
On Wed, Jun 24, 2009 at 05:51:58PM -0500, Raphael Geissert wrote:
 Side effects:
 * Errors caused by the use of bashisms.

And the really important side-effect is that user scripts on all sorts
of installed systems could experience trouble.

 * Faster boot, builds, and general usage of /bin/sh scripts.

That could be accomplished by just setting the bangpath different,
right?

 * Reduced memory footprint when running /bin/sh scripts.

That's a nice thing.

Both of these are nice to have, of course, but we need to make sure
this is documented explicitly, well, and in BIG UPPERCASE LETTERS in
the release notes.  This could be a significant issue at companies
that have done a lot of scripting outside the archive.

 * It's been more than three years since Ubuntu made the switch,
without all the extra bashisms-hunting Debian has done,
without rolling it back.

Not necessarily relevant.  They have a reputation (whether deserved or
not is a different discussion) of breaking people's machines on
upgrade, and don't have the server penetration Debian does either.

-- John


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-24 Thread Raphael Geissert
Hi,

I just noticed I forgot to say something:

 What won't change:
 * Bash will still be used as the default interactive shells for users
* the sh symlink won't be modified on existing installations

Cheers,
Raphael Geissert



-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-24 Thread Raphael Geissert
John Goerzen wrote:

 On Wed, Jun 24, 2009 at 05:51:58PM -0500, Raphael Geissert wrote:
 Side effects:
 * Errors caused by the use of bashisms.
 
 And the really important side-effect is that user scripts on all sorts
 of installed systems could experience trouble.

You are right, you made me notice I forgot to mention something:
* the sh symlink won't be modified on existing installations

 
 * Faster boot, builds, and general usage of /bin/sh scripts.
 
 That could be accomplished by just setting the bangpath different,
 right?

Of every single /bin/sh script? sure

 
 * Reduced memory footprint when running /bin/sh scripts.
 
 That's a nice thing.
 
 Both of these are nice to have, of course, but we need to make sure
 this is documented explicitly, well, and in BIG UPPERCASE LETTERS in
 the release notes.  This could be a significant issue at companies
 that have done a lot of scripting outside the archive.

Of course this is going to be mentioned on the release notes (just like the
switch to rsyslog as the default syslogd); but like I just said, the change
will only immediately affect new installations.

 
 * It's been more than three years since Ubuntu made the switch,
without all the extra bashisms-hunting Debian has done,
without rolling it back.
 
 Not necessarily relevant.  They have a reputation (whether deserved or
 not is a different discussion) of breaking people's machines on
 upgrade, and don't have the server penetration Debian does either.

It's relevant in the sense that
* we are not making a never done before move,
* many issues have been fixed because of their change,
* many upstreams are now aware of bashisms.

I won't object any of your other statements, but in this case we are not
discussing if what Ubuntu did was right or wrong, nor anything else. And as
such, what matters is that they made the move and it has worked for over
three years.

Thanks for your comments, and I hope that with the extra clarification I've
addressed your concerns.

Cheers,
Raphael Geissert



-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-24 Thread Hendrik Sattler
Am Donnerstag 25 Juni 2009 05:21:45 schrieb Raphael Geissert:
 I just noticed I forgot to say something:
  What won't change:
  * Bash will still be used as the default interactive shells for users

 * the sh symlink won't be modified on existing installations

So that it will be even more strange that a script with bashisms works on some 
Debian Squeeze systems but not on others? Yeah, great idea.
And so that all users that upgrade do not benefit from the goal of this change? 
Even better.
I usually don't like those not-on-upgrade exceptions.

HS


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-24 Thread Raphael Geissert
Hendrik Sattler wrote:

 Am Donnerstag 25 Juni 2009 05:21:45 schrieb Raphael Geissert:
 I just noticed I forgot to say something:
  What won't change:
  * Bash will still be used as the default interactive shells for users

 * the sh symlink won't be modified on existing installations
 
 So that it will be even more strange that a script with bashisms works on
 some Debian Squeeze systems but not on others? Yeah, great idea.

reportbug indicates what /bin/sh points to, and it should be irrelevant,
since many people have been using all sort of shell interpreters as /bin/sh
for many many years.

 And so that all users that upgrade do not benefit from the goal of this
 change? Even better.

This is to avoid causing undesirable effects when upgrading. People have
always been concerned about such kind of changes, and they are more than
right. The goal is not to cause a chaos.

 I usually don't like those not-on-upgrade exceptions.
 

I'd prefer if comments were restricted to objective arguments and not
subjective; specially when they include unneeded sarcasm.

Regards,
Raphael Geissert



-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-24 Thread Mike Hommey
On Thu, Jun 25, 2009 at 06:47:07AM +0200, Hendrik Sattler wrote:
 Am Donnerstag 25 Juni 2009 05:21:45 schrieb Raphael Geissert:
  I just noticed I forgot to say something:
   What won't change:
   * Bash will still be used as the default interactive shells for users
 
  * the sh symlink won't be modified on existing installations
 
 So that it will be even more strange that a script with bashisms works on 
 some 
 Debian Squeeze systems but not on others? Yeah, great idea.
 And so that all users that upgrade do not benefit from the goal of this 
 change? 
 Even better.
 I usually don't like those not-on-upgrade exceptions.

I'd say if /bin/sh points to the current default (/bin/bash), then it
should be modified. OTOH, if it was modified locally by the admin to
point somewhere else, leave it alone.

Mike


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-24 Thread Frank Lin PIAT
On Thu, 2009-06-25 at 06:47 +0200, Hendrik Sattler wrote:
 Am Donnerstag 25 Juni 2009 05:21:45 schrieb Raphael Geissert:
  I just noticed I forgot to say something:

(BTW, scripts not only loads faster under dash, they also run faster in
Dash.)

   What won't change:
   * Bash will still be used as the default interactive shells for users
 
  * the sh symlink won't be modified on existing installations
 
 So that it will be even more strange that a script with bashisms works on 
 some 
 Debian Squeeze systems but not on others? 

Upgraded systems don't behave exactly like new systems, this isn't
specific for Debian.
The release notes can document those changed behaviors, isn't it? (the
NEWS.Debian too)
And every one RTFM.

 And so that all users that upgrade do not benefit from the goal of this 
 change? 

This is the difference between upgrading a system, and installing a new
system:

When upgrading a system, you want your existing applications to keep
working the same way, so you prefer to keep the backward compatible
way (see John Goerzen's concerns about entreprise-made shell
scripts).

On the other hand, when an application is installed [on a fresh system],
it is ok to introduce new behavior, since it is much more easier to
detect incompatible scripts as you write/install them.

 I usually don't like those not-on-upgrade exceptions.

FYI, I have worked on modular tool (a Posix script;), that can test and
warn such changes on upgraded systems. I would a test for [bd]ash.
  http://wiki.debian.org/UpgradeAdvisor


Regards,

Franklin


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Switching the default /bin/sh to dash

2009-06-24 Thread Luk Claes
Mike Hommey wrote:
 On Thu, Jun 25, 2009 at 06:47:07AM +0200, Hendrik Sattler wrote:
 Am Donnerstag 25 Juni 2009 05:21:45 schrieb Raphael Geissert:
 I just noticed I forgot to say something:
 What won't change:
 * Bash will still be used as the default interactive shells for users
 * the sh symlink won't be modified on existing installations
 So that it will be even more strange that a script with bashisms works on 
 some 
 Debian Squeeze systems but not on others? Yeah, great idea.
 And so that all users that upgrade do not benefit from the goal of this 
 change? 
 Even better.
 I usually don't like those not-on-upgrade exceptions.
 
 I'd say if /bin/sh points to the current default (/bin/bash), then it
 should be modified. OTOH, if it was modified locally by the admin to
 point somewhere else, leave it alone.

How do you make the difference between an administrator choosing for the
default and one choosing for bash specifically?

I think it's best to either leave it alone (preferred option) or ask the
administrator (using debconf) if he wants to change to the default. In
any case it should be mentioned in the Release Notes and other
documentation regarding Squeeze.

Cheers

Luk


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org