Skip to content

Conversation

@ian-abbott
Copy link
Contributor

The "Use cp's -T option instead of wildcards when copying source directory" commit implements #538 to copy dot-files. Since dkms is already using the -a option, I thought it would be fine to use the -T option supported by GNU coreutils cp and BusyBox cp.

The "Preserve timestamps, file modes, and ownership when copying source directory" additionally uses cp's -p option, mostly to preserve the timestamps. It may help in cases where the source directory contains generated sources that should not need rebuilding.

The `*` glob pattern used to match the contents of the source directory
does not match hidden dot-files.  Rather than use the `*` glob pattern,
use cp's `-T` option to copy the contents of the source directory to a
specified, already existing destination directory.

Implements: dkms-project#538
…rectory

Preserving relative timestamps between files might be useful for some
Makefiles if the source distribution includes generated sources that
should not need to be rebuilt.
@scaronni scaronni merged commit d1dde5a into dkms-project:main Aug 19, 2025
28 checks passed
@anbe42
Copy link
Collaborator

anbe42 commented Aug 20, 2025

When thinking about copying files (not only source, but also modules), would it be a good idea to add --reflink=auto? E.g. the Nvidia modules contain some large blobs in the source, creating large modules. --reflink=auto could save some disk space on certain file systems (btrfs, xfs).

@ian-abbott
Copy link
Contributor Author

When thinking about copying files (not only source, but also modules), would it be a good idea to add --reflink=auto? E.g. the Nvidia modules contain some large blobs in the source, creating large modules. --reflink=auto could save some disk space on certain file systems (btrfs, xfs).

That won't work with BusyBox cp. Is that a problem?

@scaronni
Copy link
Member

Of all the distributions that are part of the tests, none uses busybox, so I think it's safe to add.

@anbe42
Copy link
Collaborator

anbe42 commented Aug 20, 2025

OK, I'll try to make a PR for that. Not checking for the option being supported right now, but if it turns out to be problematic, we can add such a test later.

@ian-abbott ian-abbott deleted the source-copy-changes branch August 22, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants