coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

install: add missing directory chown

Open kylemanna opened this issue 2 years ago • 2 comments

  • Re-factor the copy function chown into a function that can be re-used.
  • Fix bug where the group overwrote the user.
  • Add chown compatibility to follow GNU coreutils.
  • Reduce two chown calls to a single syscall only when needed.
  • Fixes #4361

Not sure how to test this though. Can the CI/CD server change owners? I assume this will break most test setups.

Manually tested for now.

kylemanna avatar Feb 14 '23 07:02 kylemanna

GNU testsuite comparison:

Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!

github-actions[bot] avatar Feb 14 '23 11:02 github-actions[bot]

GNU testsuite comparison:

GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

github-actions[bot] avatar Feb 14 '23 18:02 github-actions[bot]

GNU testsuite comparison:

Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!

github-actions[bot] avatar Feb 19 '23 10:02 github-actions[bot]

Not sure how to test this though. Can the CI/CD server change owners? I assume this will break most test setups.

Passing thought: it's probably possible to chown/chrgp by running fakeroot cargo ... for the tests. This probably requires re-organizing tests that must run in fakeroot to another test suite or something to that we don't require users running unit-tests to have fakeroot installed.

kylemanna avatar Feb 19 '23 20:02 kylemanna

Thanks!

kylemanna avatar Feb 23 '23 04:02 kylemanna