]> gitweb.ps.run Git - ps-cgit/blobdiff - cgitrc.5.txt
ui-ssdiff: ban strncpy()
[ps-cgit] / cgitrc.5.txt
index 6f008ccb88f750d3fc274b3f3c9ce7b088f21ec1..34b351b00ffc1006966612ce957cbd4b134a5b72 100644 (file)
@@ -759,7 +759,7 @@ the environment variables defined in "FILTER API":
 
 
 CACHE
-------
+-----
 
 All cache ttl values are in minutes. Negative ttl values indicate that a page
 type will never expire, and thus the first time a URL is accessed, the result
@@ -767,6 +767,33 @@ will be cached indefinitely, even if the underlying git repository changes.
 Conversely, when a ttl value is zero, the cache is disabled for that
 particular page type, and the page type is never cached.
 
+SIGNATURES
+----------
+
+Cgit can host .asc signatures corresponding to various snapshot formats,
+through use of git notes. For example, the following command may be used to
+add a signature to a .tar.xz archive:
+
+    git notes --ref=refs/notes/signatures/tar.xz add -C "$(
+       gpg --output - --armor --detach-sign cgit-1.1.tar.xz |
+       git hash-object -w --stdin
+    )" v1.1
+
+If it is instead desirable to attach a signature of the underlying .tar, this
+will be linked, as a special case, beside a .tar.* link that does not have its
+own signature. For example, a signature of a tarball of the latest tag might
+be added with a similar command:
+
+    tag="$(git describe --abbrev=0)"
+    git notes --ref=refs/notes/signatures/tar add -C "$(
+        git archive --format tar --prefix "cgit-${tag#v}/" "$tag" |
+        gpg --output - --armor --detach-sign |
+        git hash-object -w --stdin
+    )" "$tag"
+
+Since git-archive(1) is expected to produce stable output between versions,
+this allows one to generate a long-term signature of the contents of a given
+tag.
 
 EXAMPLE CGITRC FILE
 -------------------