Bug 2427

Summary: using -execdir in find does not change the current directory
Product: Mageia Reporter: Nikita Krupenko <krnekit>
Component: RPM PackagesAssignee: QA Team <qa-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: cazzaniga.sandro, davidwhodgins, jani.valimaa, marja11, sysadmin-bugs, tmb
Version: 1Keywords: PATCH, UPSTREAM, validated_update
Target Milestone: ---   
Hardware: All   
OS: Linux   
URL: http://savannah.gnu.org/bugs/?func=detailitem&item_id=29949
Whiteboard:
Source RPM: findutils-4.5.9-2.mga1 CVE:
Status comment:

Description Nikita Krupenko 2011-08-14 18:15:31 CEST
Description of problem:
When using -execdir option of find, it doesn't changes current working directory, but it should. URL contains more information and also a patch to fix the problem.


Version-Release number of selected component (if applicable):
4.5.9-2.mga1
Manuel Hiebel 2011-08-26 23:58:35 CEST

Keywords: (none) => PATCH, UPSTREAM

Comment 1 Marja Van Waes 2011-11-06 16:49:26 CET
It got fixed with findutils-4.5.10, which is in Cauldron

@ kharec

Would it be easy to get 4.5.10 in Mga 1 ? (I saw your name in the changelog of this package and we don't have a maintainer for it ;) )

CC: (none) => cazzaniga.sandro, marja11

Comment 2 Jani Välimaa 2011-11-06 21:37:38 CET
Pushed new release [1] to core/updates_testing with patch from upstream. Please test.

[1] findutils-4.5.9-2.1.mga1

CC: (none) => jani.valimaa
Assignee: bugsquad => qa-bugs

Comment 3 Dave Hodgins 2011-11-07 01:22:02 CET
Using ...
d=$(mktemp -d); mkdir -p $d/{foo,bar,baz}/bug; find $d -type d -name bug -print -execdir pwd \;
bug confirmed present in the Core Release version, and fixed in the
Core Updates Testing version.

Testing complete on i586 for the srpm
findutils-4.5.9-2.1.mga1.src.rpm

CC: (none) => davidwhodgins

Comment 4 claire robinson 2011-11-07 11:39:26 CET
x86_64

Before
------

# d=$(mktemp -d); mkdir -p $d/{foo,bar,baz}/bug; find $d -type d -name bug -print -execdir pwd \;
/tmp/tmp.JcamGBSXP5/foo/bug
/tmp/tmp.JcamGBSXP5/foo
/tmp/tmp.JcamGBSXP5/baz/bug
/tmp/tmp.JcamGBSXP5/foo
/tmp/tmp.JcamGBSXP5/bar/bug
/tmp/tmp.JcamGBSXP5/foo


After
-----

# d=$(mktemp -d); mkdir -p $d/{foo,bar,baz}/bug; find $d -type d -name bug -print -execdir pwd \;
/tmp/tmp.ZsjdEAW7NS/foo/bug
/tmp/tmp.ZsjdEAW7NS/foo
/tmp/tmp.ZsjdEAW7NS/baz/bug
/tmp/tmp.ZsjdEAW7NS/baz
/tmp/tmp.ZsjdEAW7NS/bar/bug
/tmp/tmp.ZsjdEAW7NS/bar

# cut -d: -f1 < /etc/passwd | sort | xargs echo

Returns expected output of list of user names.

# d=$(mktemp -d); mkdir -p $d/{foo,bar,baz}/bug; oldfind $d -type d -name bug -print -execdir pwd \;
/tmp/tmp.EdyyFjdEMx/foo/bug
/tmp/tmp.EdyyFjdEMx/foo
/tmp/tmp.EdyyFjdEMx/baz/bug
/tmp/tmp.EdyyFjdEMx/baz
/tmp/tmp.EdyyFjdEMx/bar/bug
/tmp/tmp.EdyyFjdEMx/bar


Bug confirmed and fixed. xargs tested too. Update validated.

SRPM: findutils-4.5.9-2.1.mga1.src.rpm

Advisory
---------------------
When using -execdir option of find, it did't change current working
directory.

Further information is available at:
http://savannah.gnu.org/bugs/?func=detailitem&item_id=29949

Mageia bug:
https://bugs.mageia.org/show_bug.cgi?id=2427
---------------------

Could sysadmin please push from core/updates_testing to core/updates

Thankyou!

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

claire robinson 2011-11-07 11:39:39 CET

Hardware: i586 => All

Comment 5 Thomas Backlund 2011-11-07 11:45:32 CET
Update pushed.

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED