Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 444532

Summary: net-misc/cfengine try to exec /sbin/ifconfig instead of /bin/ifconfig
Product: Gentoo Linux Reporter: LABBE Corentin <clabbe.montjoie>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: ap, barzog, idl0r, sysadmin
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 432280    
Attachments: patch for changing path to ifconfig
Auto detect ifconfig location with configure script

Description LABBE Corentin 2012-11-24 08:02:11 UTC
Nov 23 01:43:17 xxx cf-execd[11788]:  Couldn't run /sbin/ifconfig
Nov 23 01:43:17 xxx cf-execd[11788]:   !!! System error for execv: "No such file or directory"


Reproducible: Always

Steps to Reproduce:
1. emerge cfengine
2. run cf-execd
3.
Actual Results:  
cf-exec log that it cannot exec /sbin/ifconfig

Expected Results:  
cf-exec run /bin/ifconfig
Comment 1 LABBE Corentin 2012-11-24 08:05:35 UTC
Created attachment 330392 [details, diff]
patch for changing path to ifconfig
Comment 2 LABBE Corentin 2012-11-24 12:23:31 UTC
related to bug 44444 since sys-apps/net-tools have moved ifconfig
Comment 3 SpanKY gentoo-dev 2012-12-21 03:55:22 UTC
(In reply to comment #1)

hardcoding any path is wrong
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-12-25 07:21:41 UTC
corentin: please rewrite it to try both paths.
Comment 5 LABBE Corentin 2012-12-29 14:24:17 UTC
Created attachment 333678 [details, diff]
Auto detect ifconfig location with configure script

Possible changes to this patch:
1: Fallback to default "/sbin/ifconfig" if no ifconfig was found
2: Try to exec IFCONFIG_RUN in configure if not cross-compiling, but I cannot found the correct autoconf macro for that at the moment.
Comment 6 Oleg Gawriloff 2013-02-08 06:53:29 UTC
Applied patch cleanly. Available alongside with 3.4.2 at barzog-overlay.
Only thing that I can't manage is ebuild QA warning:
 * QA Notice: Automake "maintainer mode" detected:
 *
 *       cd . && /bin/sh /var/tmp/portage/net-misc/cfengine-3.4.2/work/cfengine-3.4.2/missing --run automake-1.11 --foreign
 *
 * If you patch Makefile.am, configure.in,  or configure.ac then you
 * should use autotools.eclass and eautomake or eautoreconf. Exceptions
 * are limited to system packages for which it is impossible to run
 * autotools during stage building. See
 * http://www.gentoo.org/proj/en/qa/autofailure.xml for more information.
Comment 7 Christian Ruppert (idl0r) gentoo-dev 2013-03-28 23:35:47 UTC
Fixed in 3.4.4. Thanks!