<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/cp.c, branch v9.0</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.0</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2021-05-08T13:57:33Z</updated>
<entry>
<title>maint: consistently free hash structures in dev mode</title>
<updated>2021-05-08T13:57:33Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-05-03T17:11:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=09bbb2b703d78e2d577cba57b8bb3ad339303835'/>
<id>urn:sha1:09bbb2b703d78e2d577cba57b8bb3ad339303835</id>
<content type='text'>
Ensure we call hash_free() to avoid valgrind and leak_sanitizer
"definitely lost" warnings.  These were not real leaks as
we terminate immediately after, but we should avoid these
"definitely lost" warnings where possible.

* src/copy.c: Add dest_info_free() and src_info_free().
* src/copy.h: Declare the above.
* src/cp-hash.c: Don't define unless "lint" is defined.
* src/install.c: Call dest_info_free() in dev mode.
* src/mv.c: Likewise.
* src/cp.c: Likewise. Also call src_info_free().
* src/ln.c: Call hash_free() in dev mode.
* src/tail.c: Call hash_free() even if about to exit, in dev mode.

Fixes https://bugs.gnu.org/48189
</content>
</entry>
<entry>
<title>maint: use "char const *" rather than "const char *"</title>
<updated>2021-04-11T17:33:45Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-04-11T17:23:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ef772bf97f7ec577754cbb5b278504d83cf41a43'/>
<id>urn:sha1:ef772bf97f7ec577754cbb5b278504d83cf41a43</id>
<content type='text'>
* cfg.mk (sc_prohibit-const-char): Add a new syntax-check to
enforce this style.
* *.[ch]: sed -i 's/const char \*/char const */g'
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2021-01-01T16:36:09Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-01-01T16:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=32ff1d1313ff566685b9092ac929251a4c22e7c4'/>
<id>urn:sha1:32ff1d1313ff566685b9092ac929251a4c22e7c4</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>maint: remove no longer needed se_const helper</title>
<updated>2020-11-23T22:25:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2020-11-23T15:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e53bb7ad0555a41e2564103794df13afbf9e5269'/>
<id>urn:sha1:e53bb7ad0555a41e2564103794df13afbf9e5269</id>
<content type='text'>
This was needed before libselinux-2.3 (May 2014),
but modern releases have the correct const declarations.

* src/chcon.c: Remove se_const() wrapper.
* src/cp.c: Likewise.
* src/install.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
* src/system.h: Likewise.
* gnulib: update to pick up const correctness fixes in selinux stubs.
</content>
</entry>
<entry>
<title>maint: port from matchpathcon to selabel_lookup</title>
<updated>2020-11-22T02:41:25Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2020-11-22T00:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3aaa42deaaf0c63589ddc23df5549d4dedb0c817'/>
<id>urn:sha1:3aaa42deaaf0c63589ddc23df5549d4dedb0c817</id>
<content type='text'>
Ubuntu 20.10 is using a newer version of libselinux that
complains that matchpathcon is obsolete.  Rewrite the code
that it uses the recommended selabel_lookup instead.
* m4/jm-macros.m4 (coreutils_MACROS): Do not check for
matchpathcon_init_prefix, as it is no longer used.
* src/copy.c (set_file_security_ctx): Omit process_local arg,
as it is equivalent to !x-&gt;set_security_context.  All callers changed.
* src/copy.h (struct cp_options): set_security_context is now of
type struct selabel_handle *, not bool.  All uses changed.
* src/cp.c, src/install.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
* src/mv.c: Include selinux/label.h.
(main): Use selabel_open for set_security context.
* src/install.c (matchpathcon_init_prefix): Remove; now unused.
(get_labeling_handle): New static function.
(setdefaultfilecon, main): Use it.
(setdefaultfilecon): Do something regardless of
ENABLE_MATCHPATHCON, which seems to be a revenant macro.
(setdefaultfilecon): Use selabel_lookup instead of the obsolescent
matchpathcon.  Report an error unless it fails due to ENOENT.
* src/local.mk (src_ginstall_CPPFLAGS): Remove.
* src/selinux.c: Include selinux/label.h
Do not include die.h, error.h, canonicalize.h.
(defaultcon, restorecon_private, restorecon):
New arg HANDLE.  All callers changed.
Use selabel_lookup rather than matchpathcon.
(restorecon_private, restorecon): Don’t lose track of errno.
* src/selinux.c, src/selinux.h:
(restorecon): Don’t call ‘error’; that’s the caller’s job.
Use HAVE_SELINUX_LABEL_H, not HAVE_SELINUX_SELINUX_H,
in case there is some weird system with the former but not the latter.
* src/selinux.h (struct selinux_handle): Add forward decl.
</content>
</entry>
<entry>
<title>cp: default to COW</title>
<updated>2020-06-19T05:38:06Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2020-06-19T05:16:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=25725f9d41735d176d73a757430739fb71c7d043'/>
<id>urn:sha1:25725f9d41735d176d73a757430739fb71c7d043</id>
<content type='text'>
Likewise for ‘install’.  Proposed in Bug#24400, and long past due.
* NEWS:
* doc/coreutils.texi (cp invocation):
* src/copy.h (enum Reflink_type): Document this.
* src/cp.c (cp_option_init):
* src/install.c (cp_option_init): Implement this.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2020-01-01T14:16:56Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2020-01-01T14:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=aaba82431ceca97441d56152d8c7ec2d84fa1d12'/>
<id>urn:sha1:aaba82431ceca97441d56152d8c7ec2d84fa1d12</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2019-01-01T23:51:48Z</updated>
<author>
<name>Assaf Gordon</name>
<email>assafgordon@gmail.com</email>
</author>
<published>2019-01-01T23:50:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8dfcf38af1280c34d7c02b1bbed151368f6de211'/>
<id>urn:sha1:8dfcf38af1280c34d7c02b1bbed151368f6de211</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>build: update gnulib submodule to latest</title>
<updated>2018-10-28T08:46:11Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2018-10-28T08:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d9a4d983717c6db33b1b568180ad30ad9c2233b4'/>
<id>urn:sha1:d9a4d983717c6db33b1b568180ad30ad9c2233b4</id>
<content type='text'>
* src/copy.c (copy_internal):
* src/cp.c (do_copy):
* src/ln.c (do_link):
Adjust to Gnulib API change.
</content>
</entry>
<entry>
<title>cp: add --reflink=never to force standard copy mode</title>
<updated>2018-06-21T04:17:19Z</updated>
<author>
<name>Adam Borowski</name>
<email>kilobyte@angband.pl</email>
</author>
<published>2018-06-17T22:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=163df41d45bcc6615915ca507264dde090aba44d'/>
<id>urn:sha1:163df41d45bcc6615915ca507264dde090aba44d</id>
<content type='text'>
This mode is currently the default, but most if not all users of
reflink-capable filesystems want --reflink=auto, which is often
encapsulated into an alias.  Adding --reflink=never allows overriding
such an alias.

* doc/coreutils.texi (cp invocation): Describe the new option.
* src/cp.c: Support --reflink=never.
* tests/cp/reflink-auto.sh: Add a test case.
* NEWS: Mention the new feature.
</content>
</entry>
</feed>
