Re: [arch-general] [PATCH 35/48] find has a builtin delete action. Use it instead of exec'ing rm.

2010-07-16 Thread Thomas Bächler
Am 30.06.2010 23:47, schrieb Victor Lowther:
 ---
  rc.sysinit |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/rc.sysinit b/rc.sysinit
 index 319ea60..037a9f2 100755
 --- a/rc.sysinit
 +++ b/rc.sysinit
 @@ -277,7 +277,7 @@ stat_busy Removing Leftover Files
  /bin/rm -f /var/lock/* /dev/null
  /bin/rm -rf /tmp/* /tmp/.* /dev/null
  /bin/rm -f /forcefsck /dev/null
 -(cd /var/run  /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
 +(cd /var/run  /usr/bin/find . \! -type d -delete  )
  : | /var/run/utmp
  /bin/chmod 0664 /var/run/utmp
  # Keep {x,k,g}dm happy with xorg

ACKed.



signature.asc
Description: OpenPGP digital signature


[arch-general] [PATCH 35/48] find has a builtin delete action. Use it instead of exec'ing rm.

2010-06-30 Thread Victor Lowther
---
 rc.sysinit |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index 319ea60..037a9f2 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -277,7 +277,7 @@ stat_busy Removing Leftover Files
 /bin/rm -f /var/lock/* /dev/null
 /bin/rm -rf /tmp/* /tmp/.* /dev/null
 /bin/rm -f /forcefsck /dev/null
-(cd /var/run  /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
+(cd /var/run  /usr/bin/find . \! -type d -delete  )
 : | /var/run/utmp
 /bin/chmod 0664 /var/run/utmp
 # Keep {x,k,g}dm happy with xorg
-- 
1.7.1



Re: [arch-general] [PATCH 35/48] find has a builtin delete action. Use it instead of exec'ing rm.

2010-06-30 Thread Victor Lowther
On Wed, 2010-06-30 at 17:58 -0400, Daenyth Blank wrote:
 On Wed, Jun 30, 2010 at 17:47, Victor Lowther victor.lowt...@gmail.com 
 wrote:
  ---
   rc.sysinit |2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)
 
  diff --git a/rc.sysinit b/rc.sysinit
  index 319ea60..037a9f2 100755
  --- a/rc.sysinit
  +++ b/rc.sysinit
  @@ -277,7 +277,7 @@ stat_busy Removing Leftover Files
   /bin/rm -f /var/lock/* /dev/null
   /bin/rm -rf /tmp/* /tmp/.* /dev/null
   /bin/rm -f /forcefsck /dev/null
  -(cd /var/run  /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
  +(cd /var/run  /usr/bin/find . \! -type d -delete  )
   : | /var/run/utmp
   /bin/chmod 0664 /var/run/utmp
   # Keep {x,k,g}dm happy with xorg
  --
  1.7.1
 
 
 
 I don't think this is portable though.

How portable are you looking for?

-- 
Victor Lowther
LPIC2 UCP RHCE 


Re: [arch-general] [PATCH 35/48] find has a builtin delete action. Use it instead of exec'ing rm.

2010-06-30 Thread Thomas Bächler
Am 30.06.2010 23:58, schrieb Daenyth Blank:
 On Wed, Jun 30, 2010 at 17:47, Victor Lowther victor.lowt...@gmail.com 
 wrote:
 ---
  rc.sysinit |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/rc.sysinit b/rc.sysinit
 index 319ea60..037a9f2 100755
 --- a/rc.sysinit
 +++ b/rc.sysinit
 @@ -277,7 +277,7 @@ stat_busy Removing Leftover Files
  /bin/rm -f /var/lock/* /dev/null
  /bin/rm -rf /tmp/* /tmp/.* /dev/null
  /bin/rm -f /forcefsck /dev/null
 -(cd /var/run  /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
 +(cd /var/run  /usr/bin/find . \! -type d -delete  )
  : | /var/run/utmp
  /bin/chmod 0664 /var/run/utmp
  # Keep {x,k,g}dm happy with xorg
 --
 1.7.1


 
 I don't think this is portable though.
 

Portability is not an issue. The beauty about this is that we can simply
assume we have GNU tools and we do use Linux ... because that is what
Arch is based on.

I have no problem having GNU-specific features in there, as we can rely
on GNU find (or GNU whatever) being present. The only exception is
initramfs - however, no shell script is used in both the system and
initramfs.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [PATCH 35/48] find has a builtin delete action. Use it instead of exec'ing rm.

2010-06-30 Thread Victor Lowther
On Wed, Jun 30, 2010 at 5:32 PM, Thomas Bächler tho...@archlinux.org wrote:
 Am 30.06.2010 23:58, schrieb Daenyth Blank:
 On Wed, Jun 30, 2010 at 17:47, Victor Lowther victor.lowt...@gmail.com 
 wrote:
 ---
  rc.sysinit |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/rc.sysinit b/rc.sysinit
 index 319ea60..037a9f2 100755
 --- a/rc.sysinit
 +++ b/rc.sysinit
 @@ -277,7 +277,7 @@ stat_busy Removing Leftover Files
  /bin/rm -f /var/lock/* /dev/null
  /bin/rm -rf /tmp/* /tmp/.* /dev/null
  /bin/rm -f /forcefsck /dev/null
 -(cd /var/run  /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
 +(cd /var/run  /usr/bin/find . \! -type d -delete  )
  : | /var/run/utmp
  /bin/chmod 0664 /var/run/utmp
  # Keep {x,k,g}dm happy with xorg
 --
 1.7.1



 I don't think this is portable though.


 Portability is not an issue. The beauty about this is that we can simply
 assume we have GNU tools and we do use Linux ... because that is what
 Arch is based on.

Exactly.

 I have no problem having GNU-specific features in there, as we can rely
 on GNU find (or GNU whatever) being present. The only exception is
 initramfs - however, no shell script is used in both the system and
 initramfs

That is one reason I helped write and use dracut (the new initramfs
generation framework that Fedora 12 and 13 use, and that RHEL6 will
use) -- instead of using busybox/klobc/whatever, it trades a slightly
larger initramfs for the convienence of using exactly the same
binaries the installed system uses for everything.  I will happily
trade a few hundred K larger initramfs for not having to maintain
another toolchain and userspace just for the initramfs.


Re: [arch-general] [PATCH 35/48] find has a builtin delete action. Use it instead of exec'ing rm.

2010-06-30 Thread Daenyth Blank
On Wed, Jun 30, 2010 at 18:32, Thomas Bächler tho...@archlinux.org wrote:
 Am 30.06.2010 23:58, schrieb Daenyth Blank:
 I don't think this is portable though.


 Portability is not an issue. The beauty about this is that we can simply
 assume we have GNU tools and we do use Linux ... because that is what
 Arch is based on.

Oh duh, I was thinking of makepkg et al which we want to be portable. Carry on


Re: [arch-general] [PATCH 35/48] find has a builtin delete action. Use it instead of exec'ing rm.

2010-06-30 Thread Thomas Bächler
Am 01.07.2010 00:40, schrieb Victor Lowther:
 I have no problem having GNU-specific features in there, as we can rely
 on GNU find (or GNU whatever) being present. The only exception is
 initramfs - however, no shell script is used in both the system and
 initramfs
 
 That is one reason I helped write and use dracut (the new initramfs
 generation framework that Fedora 12 and 13 use, and that RHEL6 will
 use) -- instead of using busybox/klobc/whatever, it trades a slightly
 larger initramfs for the convienence of using exactly the same
 binaries the installed system uses for everything.  I will happily
 trade a few hundred K larger initramfs for not having to maintain
 another toolchain and userspace just for the initramfs.

Well, it's basically what I did in mkinitcpio 0.6. I dumped klibc and
all the packages that used it in favor of pure glibc binaries.

However, I still use busybox instead of util-linux-ng and coreutils: It
is much more convenient to just run busybox --install -s and have a
fully functional environment than having to collect all the basic tools
and make sure they are installed. The maintenance effort for busybox is
almost nonexistent, and it offers many tools that you wouldn't install
into initramfs otherwise. I am convinced that this is the best of both
worlds, I get a feature-rich and very very small initramfs environment
this way.

Anyway, this is OT in this thread and we probably shouldn't pollute it
with this discussion.



signature.asc
Description: OpenPGP digital signature