Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0092-use-grep-directly-without-nm-to-drop-binutils-requir.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0092-use-grep-directly-without-nm-to-drop-binutils-requir.patch of Package dracut
From fd7c4d28347218862f0825d8d8d3f015f3587174 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Fri, 7 May 2010 10:44:30 +0200 Subject: [PATCH] use "grep" directly without "nm" to drop binutils requirement --- dracut | 6 +++--- dracut.spec | 1 - modules.d/40network/installkernel | 4 ++-- modules.d/50plymouth/installkernel | 2 +- modules.d/90kernel-modules/installkernel | 2 +- modules.d/90multipath/installkernel | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dracut b/dracut index cd52499..6d9bf7c 100755 --- a/dracut +++ b/dracut @@ -46,8 +46,8 @@ Creates initial ramdisk images for preloading modules firmwares, separated by : --kernel-only Only install kernel drivers and firmware files --no-kernel Do not install kernel drivers and firmware files - --strip Strip binaries in the initramfs (default) - --nostrip Do not strip binaries in the initramfs + --strip Strip binaries in the initramfs + --nostrip Do not strip binaries in the initramfs (default) --mdadmconf Include local /etc/mdadm.conf --nomdadmconf Do not include local /etc/mdadm.conf --lvmconf Include local /etc/lvm/lvm.conf @@ -155,7 +155,7 @@ fi [[ $lvmconf_l ]] && lvmconf=$lvmconf_l [[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut [[ $fw_dir ]] || fw_dir=/lib/firmware -[[ $do_strip ]] || do_strip=yes +[[ $do_strip ]] || do_strip=no # eliminate IFS hackery when messing with fw_dir fw_dir=${fw_dir//:/ } diff --git a/dracut.spec b/dracut.spec index b55db9b..b78fcb2 100644 --- a/dracut.spec +++ b/dracut.spec @@ -45,7 +45,6 @@ Requires: module-init-tools >= 3.7-9 Requires: cpio Requires: coreutils Requires: findutils -Requires: binutils Requires: grep Requires: which Requires: mktemp >= 1.5-5 diff --git a/modules.d/40network/installkernel b/modules.d/40network/installkernel index 514902d..4c7adcd 100755 --- a/modules.d/40network/installkernel +++ b/modules.d/40network/installkernel @@ -4,8 +4,8 @@ net_module_test() { local net_drivers='eth_type_trans|register_virtio_device' local unwanted_drivers='/(wireless|isdn|uwb)/' - nm -uPA "$1" | egrep -q $net_drivers && \ - nm -uPA "$1" | egrep -qv 'iw_handler_get_spy' && \ + egrep -q $net_drivers "$1" && \ + egrep -qv 'iw_handler_get_spy' "$1" && \ [[ ! $1 =~ $unwanted_drivers ]] } diff --git a/modules.d/50plymouth/installkernel b/modules.d/50plymouth/installkernel index 61f2422..9f3291d 100755 --- a/modules.d/50plymouth/installkernel +++ b/modules.d/50plymouth/installkernel @@ -1,5 +1,5 @@ #!/bin/bash # Include KMS capable drm drivers for modname in $(find "$srcmods/kernel/drivers/gpu/drm" -name '*.ko' 2>/dev/null); do - nm -uPA $modname | grep -q drm_crtc_init && instmods $modname + grep -q drm_crtc_init $modname && instmods $modname done diff --git a/modules.d/90kernel-modules/installkernel b/modules.d/90kernel-modules/installkernel index 10d3cfc..2171e5a 100755 --- a/modules.d/90kernel-modules/installkernel +++ b/modules.d/90kernel-modules/installkernel @@ -3,7 +3,7 @@ if [[ -z $drivers ]]; then block_module_test() { local blockfuncs='ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device' - nm -uPA "$1" | egrep -q "$blockfuncs" + egrep -q "$blockfuncs" "$1" } hostonly='' instmods sr_mod sd_mod scsi_dh scsi_dh_rdac scsi_dh_emc hostonly='' instmods pcmcia firewire-ohci diff --git a/modules.d/90multipath/installkernel b/modules.d/90multipath/installkernel index 4a596f0..c2f4ec0 100755 --- a/modules.d/90multipath/installkernel +++ b/modules.d/90multipath/installkernel @@ -2,7 +2,7 @@ mp_mod_test() { local mpfuncs='scsi_register_device_handler|dm_dirty_log_type_register|dm_register_path_selector|dm_register_target' - nm -uPA "$1" | egrep -q "$mpfuncs" + egrep -q "$mpfuncs" "$1" } instmods $(filter_kernel_modules mp_mod_test) -- 1.8.3.1