Summary: | sys-apps/busybox[make-symlinks] should not overwrite existing files | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Maksim 'max_posedon' Melnikau <maxposedon> |
Component: | Current packages | Assignee: | Embedded Gentoo Team <embedded> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jsmolic, rafdev, sam |
Priority: | Normal | Keywords: | PATCH, PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/21353 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
cp -n (--no-clobber) is not destructive
force cp to be nondestructive Make USE=make-symlinks safer |
Description
Maksim 'max_posedon' Melnikau
2012-05-23 12:30:35 UTC
Created attachment 316189 [details, diff]
cp -n (--no-clobber) is not destructive
This patch makes ebuild less destructive, in cases when you want use busybox for most, but not all system components.
Comment on attachment 316189 [details, diff] cp -n (--no-clobber) is not destructive i don't think that'll work as that flag isn't in POSIX :/ http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html Created attachment 612890 [details, diff]
force cp to be nondestructive
Posix compliant workaround for non-destructive cp
Created attachment 675667 [details, diff]
Make USE=make-symlinks safer
Here’s another approach: only install an applet symlink if that name cannot be found in the usual /usr/sbin:/usr/bin:/sbin:/bin .
This guarantees the user can’t screw their system up, because it prevents a BB applet from both overwriting and hiding the “full” program (by installing a symlink in a different directory).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50b3efe86028e0e7d184d3a5c4a36c11f3388b6f commit 50b3efe86028e0e7d184d3a5c4a36c11f3388b6f Author: Jakov Smolic <jakov.smolic@sartura.hr> AuthorDate: 2021-08-16 16:31:47 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-08-16 16:35:39 +0000 sys-apps/busybox: Don't overwrite existing files when using make-symlinks Closes: https://bugs.gentoo.org/417263 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Closes: https://github.com/gentoo/gentoo/pull/21353 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/busybox/busybox-1.33.1-r1.ebuild | 343 ++++++++++++++++++++++++++++++ sys-apps/busybox/busybox-9999.ebuild | 2 +- 2 files changed, 344 insertions(+), 1 deletion(-) |