Unverified Commit 37e7878f authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

archives: update paragraph about `tar` and `--clamp-mtime` flag

parent 4bff2339
Loading
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -45,15 +45,10 @@ $ find build -newermt "@${SOURCE_DATE_EPOCH}" -print0 |
$ zip -r product.zip build
{% endhighlight %}

A patch has been written to simplify the latter operation with GNU
Tar. It is currently available in Debian since
[tar](https://packages.qa.debian.org/tar) version 1.28-1. Hopefully it
will be integrated upstream soon, but you might want to use it with
caution. It adds a new `--clamp-mtime` flag which will only set the time
In `tar` >= 1.29, the `--clamp-mtime` flag can be used to only set the
when the file is more recent than the value specified with `--mtime`:

{% highlight sh %}
# Only in Debian unstable for now
$ tar --mtime='2015-10-21 00:00Z' --clamp-mtime -cf product.tar build
{% endhighlight %}