Re: [arch-general] [Bulk] Re: A good time to switch to dash as /bin/sh?

2014-09-28 Thread Florian Pelz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/28/2014 07:04 AM, Benjamin A. Shelton wrote:
 On 09/27/2014 02:13 AM, Ralf Mardorf wrote:
 On Sat, 2014-09-27 at 10:02 +0200, Florian Pelz wrote:
 
 Same here. With only NoExtract, I linked /bin/sh to dash,
 reinstalled bash, and /bin/sh was gone. With both NoExtract and
 NoUpgrade, I did the same and /bin/sh was still a link to
 dash.
 My bad, until now I'm using NoExtract for files I don't want to
 have, I wasn't aware that a file or link we want to have gets
 lost.
 
 Okay, so I wasn't *completely* losing my mind (what little of it
 there is!).
 
 Here's what I think is happening (probably wrong, but this is what
 I've deduced from further reading and some strace fun):
 
 Since (re)installing over an existing package first removes its 
 constituent files, NoExtract alone results in the reinstallation
 process removing bash (and the /usr/bin/sh link). But, since the
 file is specified as NoExtract, the link/file isn't recreated
 during package extraction (it's skipped). NoUpgrade, on the other
 hand, prevents the file from being removed (reinstallation must
 therefore be considered as an upgrade for this purpose) but if
 it's not also specified by NoExtract, it's immediately overwritten
 by the new copy.
 
 So, if my understanding is correct, this would explain why both
 options must be used in order to keep something relatively
 unscathed. NoUpgrade prevents its removal (or more accurately it
 prevents its upgrade); NoExtract prevents it from being
 overwritten.
 
 Disclaimer: I haven't looked at the pacman sources yet. This is 
 exclusively from observation and what my (admittedly very limited) 
 understanding of pacman provides.
 
 Benjamin

That makes sense, even if it is not what I would have expected pacman
to do judging from the description in man pacman.conf.

Thank you.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBAgAGBQJUJ6iJAAoJEMqreLELZNG3wSMP/1zge+KR4yRSi/ZZUTILsqGO
8E6DfmHDfvOvLZddTTiSGmSJm8NV1j4kjjon6ifuW2orEBmd/Hr4L22bCGQrd8X6
oWseS0VoXgxMRmjO/CPKImvOUY3kMmBEYZzV56Ags6iCBQrXo0fkFrg4Gy65+lYc
JIH2nnKQLCb5D0JMfcdnicrmTwitqWDPSoE/rbgKpa4bLG/WzvZTClJBP9wOtlaI
aWNEUSoEYiXaz2/p9HoEzWGTY22IAz01eVY/PfV0J7nY6h+N2evas+T9Z1Cq3W3D
KPJgqjiCSh2f02Sr+iERWl71E5hOEQLQb+b1vI4HsZShwlwpdpRSPbWdiUB878fI
pZM8lMURK3yt2nLc5tQ6tcUDmMskcWt/RXw/gLTdDfURGfeymD9362BQPR6tu5/P
WxFQekf+ScODStOFU98DUASo7gRdR30+WvVzUwpuAoent/fgLNEQvOX7r8uYX4DT
7RVnmLO2u6SoPD08Xlocd18qqc8EIZJm/lCKzwX/drF7+KKMxVe/vKKzPeGbHhhb
gr657+6W3xZBYtSmBvabjq8Tktp/TvLfxiSUGdCxfCSqLqw+hs5UYXNxKAx6GvdT
RlX6rlPaylX5cBPWoB1Jt+1fDuTZPZnsMDiYDF0GdCI8P68+zijrmJ9vkXEkF/cj
tcdta/fK8ceZogIN/i0Y
=R4dC
-END PGP SIGNATURE-


Re: [arch-general] [Bulk] Re: A good time to switch to dash as /bin/sh?

2014-09-27 Thread Ralf Mardorf
On Sat, 2014-09-27 at 09:04 +0200, Florian Pelz wrote:
 On 09/27/2014 09:01 AM, Benjamin A. Shelton wrote:
  On 09/26/2014 05:11 PM, Doug Newgard wrote:
  
  I should qualify that in that I don't think adding another
  package to base is a good idea *unless* there is a significant
  benefit to doing so. The plan to add dash to base when Arch was
  using initscripts made sense, it doesn't now that we're using
  systemd. There's already too much in base IMO.
  
  Doug
  
  By that reasoning, if the intent is to make base leaner, then bash
  ought to be replaced with dash (mkinitcpio and others
  notwithstanding). :)
  
  Benjamin
 
 Regardless of what's the default, could there be a cleaner way to use
 dash as one's /bin/sh without preventing pacman from upgrading bash?

I would add usr/bin/sh to my pacman.conf's NoExtract, then bash would be
updated, but the link wouldn't be overwritten, I'm already using it for
other reasons:

[rocketmouse@archlinux ~]$ pacman -Ql bash | grep /usr/bin/sh
bash /usr/bin/sh
[rocketmouse@archlinux ~]$ grep NoExtract /etc/pacman.conf
NoExtract   = usr/share/xsessions/gnome.desktop 
usr/share/xsessions/gnome-fallback.desktop 
usr/share/xsessions/gnome-flashback-compiz.desktop 
usr/share/xsessions/openbox-kde.desktop


Re: [arch-general] [Bulk] Re: A good time to switch to dash as /bin/sh?

2014-09-27 Thread Florian Pelz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/27/2014 09:23 AM, Ralf Mardorf wrote:
 On Sat, 2014-09-27 at 09:04 +0200, Florian Pelz wrote:
 On 09/27/2014 09:01 AM, Benjamin A. Shelton wrote:
 On 09/26/2014 05:11 PM, Doug Newgard wrote:
 
 I should qualify that in that I don't think adding another 
 package to base is a good idea *unless* there is a
 significant benefit to doing so. The plan to add dash to base
 when Arch was using initscripts made sense, it doesn't now
 that we're using systemd. There's already too much in base
 IMO.
 
 Doug
 
 By that reasoning, if the intent is to make base leaner, then
 bash ought to be replaced with dash (mkinitcpio and others 
 notwithstanding). :)
 
 Benjamin
 
 Regardless of what's the default, could there be a cleaner way to
 use dash as one's /bin/sh without preventing pacman from
 upgrading bash?
 
 I would add usr/bin/sh to my pacman.conf's NoExtract, then bash
 would be updated, but the link wouldn't be overwritten, I'm already
 using it for other reasons:
 
 [rocketmouse@archlinux ~]$ pacman -Ql bash | grep /usr/bin/sh bash
 /usr/bin/sh [rocketmouse@archlinux ~]$ grep NoExtract
 /etc/pacman.conf NoExtract   = usr/share/xsessions/gnome.desktop
 usr/share/xsessions/gnome-fallback.desktop
 usr/share/xsessions/gnome-flashback-compiz.desktop
 usr/share/xsessions/openbox-kde.desktop
 

Thank you. I probably should pay more attention to what the ArchWiki
says on dash; I just read it there.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBAgAGBQJUJmbSAAoJEMqreLELZNG3e3QQAKsXEXJtdRKkDdryWp9N/qaN
gI7JgVl5IXhhz6rxes7AdC4uSxJ58otmD4xvORU/jyU9crI/5EdGdosFbcX/LMub
x5JxxWcskcFfaL2RLW4LV4AU0Ec7Vllut03TVAYiQDGE0D9bXYntymtBQc6vuvIo
xhln8h9c1O8CnwsDdmCX/PqaprEXB4YKDoK2jShlbzs7kKv0fx/1EHC1IEfglu9R
tMChMkyFwcIvyH1dVNqVIaIt0TlQsjcbxRxhddmuZX2hriX3fzFQkywdxva8Pm+o
9I1tfz7CJ8HDxPo9WB5iaeE5PXPyUZRh5H/CNCFRmyb88BuYs6ZG+HyKrmrX074d
AkKGS9A856ryemFX437NuUmWdnziJqJqkAbN6L06FHzFX+/rPzg5pJQD2ctVUDT3
Zv3DUgVhLQcgtEKxVKsI8YBHOM7A0EVRh62KFAaTzNfFbRNVj6eLnK0GPqQDrcL7
lLBUdUGxCvVQ/3q7hbrLFg1kDqu2sH5ZsJlV53C+JwwSLDx5K6zwDoGQ5fpT3j21
klWYeDWcdh1aKGDr8ufU0Y6jtwOUkIkx+BFCz3+hg9LM3xkEnxpc4vTZ9gppa1fG
v5QvNzG7gmguJghEJ0OcGZ6lkHr4IkwXtAA9qSFCxLDsQmbVEplpaLMgTrFb5LZW
hDuNeiw0xMpQzchAuknU
=Gjur
-END PGP SIGNATURE-


Re: [arch-general] [Bulk] Re: A good time to switch to dash as /bin/sh?

2014-09-27 Thread Ralf Mardorf
On Sat, 2014-09-27 at 10:02 +0200, Florian Pelz wrote:
 On 09/27/2014 09:30 AM, Benjamin A. Shelton wrote:
  On 09/27/2014 01:28 AM, Ralf Mardorf wrote:
  On Sat, 2014-09-27 at 01:21 -0600, Benjamin A. Shelton wrote:
  I assumed NoExtract should have been enough
  Correct! Or are we missing something?
  
  Oddly, using only NoExtract caused pacman to remove the usr/bin/sh 
  symlink, replacing it with nothing. (Using both NoUpgrade and
  NoExtract seems to work fine.)
  
  Perhaps it's a local oddity on my installation, but I admit I
  didn't fiddle with it for more than 5 minutes. I very likely
  overlooked something.
  
  ...when all you have is a hammer...
  
  Benjamin
 
 Same here. With only NoExtract, I linked /bin/sh to dash, reinstalled
 bash, and /bin/sh was gone. With both NoExtract and NoUpgrade, I did
 the same and /bin/sh was still a link to dash.

My bad, until now I'm using NoExtract for files I don't want to have, I
wasn't aware that a file or link we want to have gets lost.


Re: [arch-general] [Bulk] Re: A good time to switch to dash as /bin/sh?

2014-09-27 Thread Benjamin A. Shelton

On 09/27/2014 02:13 AM, Ralf Mardorf wrote:

On Sat, 2014-09-27 at 10:02 +0200, Florian Pelz wrote:


Same here. With only NoExtract, I linked /bin/sh to dash, reinstalled
bash, and /bin/sh was gone. With both NoExtract and NoUpgrade, I did
the same and /bin/sh was still a link to dash.

My bad, until now I'm using NoExtract for files I don't want to have, I
wasn't aware that a file or link we want to have gets lost.


Okay, so I wasn't *completely* losing my mind (what little of it there is!).

Here's what I think is happening (probably wrong, but this is what I've 
deduced from further reading and some strace fun):


Since (re)installing over an existing package first removes its 
constituent files, NoExtract alone results in the reinstallation process 
removing bash (and the /usr/bin/sh link). But, since the file is 
specified as NoExtract, the link/file isn't recreated during package 
extraction (it's skipped). NoUpgrade, on the other hand, prevents the 
file from being removed (reinstallation must therefore be considered as 
an upgrade for this purpose) but if it's not also specified by 
NoExtract, it's immediately overwritten by the new copy.


So, if my understanding is correct, this would explain why both options 
must be used in order to keep something relatively unscathed. NoUpgrade 
prevents its removal (or more accurately it prevents its upgrade); 
NoExtract prevents it from being overwritten.


Disclaimer: I haven't looked at the pacman sources yet. This is 
exclusively from observation and what my (admittedly very limited) 
understanding of pacman provides.


Benjamin