WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Busybox 1.27 mv broken  (Read 229 times)

Offline andyj

  • Sr. Member
  • ****
  • Posts: 485
Busybox 1.27 mv broken
« on: October 28, 2017, 07:58:38 AM »
Busybox 1.25 (TC 8.0) mv would move all files in a wildcard source including links good or broken. Busybox 1.27 (TC 8.1+) mv will not move a link if it is broken. This is a bit of a challenge when building extensions because sometimes the link in the extension won't be good until the extension is installed. GNU mv on a distro like Slackware moves all links good and broken. Seems like mv changed for some reason?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9607
Re: Busybox 1.27 mv broken
« Reply #1 on: October 28, 2017, 09:31:15 PM »
Could you give an example - I just tried a quick test and was able to move a broken link?

Offline andyj

  • Sr. Member
  • ****
  • Posts: 485
Re: Busybox 1.27 mv broken
« Reply #2 on: October 29, 2017, 04:55:33 AM »
Try:

Code: [Select]
mkdir -p /tmp/mvtest/TCZ/usr/local/lib /tmp/mvtest/TCZ-dev/usr/local/lib
cd /tmp/mvtest/TCZ-dev/usr/local/lib
touch libmy.so.1.0.1
ln -s libmy.so.1.0.1 libmy.so.1
ln -s libmynolink.so libmy.so
cd /tmp/mvtest
mv TCZ-dev/usr/local/lib/*.so* TCZ/usr/local/lib
find

If it matters this is 64 bit.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9611
Re: Busybox 1.27 mv broken
« Reply #3 on: October 29, 2017, 10:26:04 AM »
Confirmed, but this is actually an ash bug. Running your script under bash succeeds.
The only barriers that can stop you are the ones you create yourself.

Offline andyj

  • Sr. Member
  • ****
  • Posts: 485
Re: Busybox 1.27 mv broken
« Reply #4 on: October 29, 2017, 12:55:05 PM »
But this used to work in Busybox/ash 1.25 (TC 8.0) and before. "type mv is /bin/mv" which is still Busybox. The behavior changed. It didn't used to be a bug, or it would have been a problem before I upgraded past 8.0.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9607
Re: Busybox 1.27 mv broken
« Reply #5 on: October 29, 2017, 10:53:00 PM »
There have been few recent changes to mv in busybox git (5 this year), whereas there have been a bunch of changes to ash..

Could you submit a bug report to busybox?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9611
Re: Busybox 1.27 mv broken
« Reply #6 on: October 30, 2017, 01:08:34 AM »
I sent an email. This is also something we can fix with a config change, by disabling the "ash: use glob from libc" option.

And yeah, the bug was introduced after 1.25. Ash is part of busybox.
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9607
Re: Busybox 1.27 mv broken
« Reply #7 on: October 30, 2017, 02:54:50 AM »
Meaning "CONFIG_ASH_INTERNAL_GLOB=y"?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9611
Re: Busybox 1.27 mv broken
« Reply #8 on: October 30, 2017, 11:05:26 AM »
Yeah, that one.
The only barriers that can stop you are the ones you create yourself.