staticweb: don't copy timestamps in rsync

Authored by nalvarez on Mar 21 2020, 1:15 AM.

Description

staticweb: don't copy timestamps in rsync

Turns out the previous commit didn't fully work; it seems rsync doesn't
copy content because the content matches (--checksum), but still syncs the
file timestamp (--times, implied by --archive), so files still get touched
on every deploy and If-Modified-Since requests remain ineffective.

If I *don't* sync the mtime, files that actually get transferred will
still have the mtime changed, but to the time rsync wrote them on the
server rather than the local file's mtime. Files that don't get transferred
will stay as they are.

I could keep using -a (--archive) and explicitly disable copying
timestamps (--no-times). However, -a implies -rlptgoD, and most of those
are actually pointless for us (we can't copy ownership, we have no device
nodes, sockets or fifos). Instead, replace -a with -rlp (recursive,
symlinks, permissions), which is all we need. The lack of -t should fix
the timestamp-touching issue.

Details

Committed
nalvarezMar 21 2020, 1:15 AM
Parents
R993:8977fad08dcc: staticweb: avoid transferring unchanged files to the webserver
Branches
Unknown
Tags
Unknown