Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 264AEC433B4 for ; Tue, 11 May 2021 14:35:38 +0000 (UTC) Received: by mail.kernel.org (Postfix) id DA26561261; Tue, 11 May 2021 14:35:37 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9232261285 for ; Tue, 11 May 2021 14:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620743737; bh=IyeVpJI07WGI7bPP5lUB0POuqcF1Cf51aCYEWDjz+I0=; h=From:List-Id:To:Subject:Date:In-Reply-To:References:From; b=WxWTc4kz8Vy3FDXJWPDaGC94ofGcVWN5S0F0xSyN3kwDcdojqiqIiYuGxz6yv1Xvw mAt5PHtTPG+SsINszVoa4SwxK2mFVCT5B0zniclF7WlxeRbIO1BqQuKQsij3EhCdx0 9CIcOTKqoInBSM9vC4e36Rve7/hgRKXcvtTbW9sI= From: Konstantin Ryabitsev List-Id: To: signatures@kernel.org Subject: [PATCH 1/4] Add manpages and prepare for 0.1.0 release Date: Tue, 11 May 2021 10:35:33 -0400 Message-Id: <20210511143536.743919-2-konstantin@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210511143536.743919-1-konstantin@linuxfoundation.org> References: <20210511143536.743919-1-konstantin@linuxfoundation.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1620743735; l=6428; h=from:subject; bh=IyeVpJI07WGI7bPP5lUB0POuqcF1Cf51aCYEWDjz+I0=; b=4uMjusCOth1G4YMJbDtFWN8f2MMEZS1L65I2IcQxZcfTX6Q1npqy6LR4/ARVlAztuX093h6xmt+k J63b8n+wDiWXSg4enYETvDPGiuNcLk0cQJHE0dV5QTUI/PQhINVy X-Developer-Key: i=konstantin@linuxfoundation.org; a=ed25519; pk=Y2ZW6YZvsJGJ1VvUSOZ3gk8LCaer4ziXgdZyIi6zC00= Content-Transfer-Encoding: 8bit It's time to cut the first release, I think. Signed-off-by: Konstantin Ryabitsev --- MANIFEST.in | 2 + man/patatt.5 | 112 +++++++++++++++++++++++++++++++++++++++++++++++ man/patatt.5.rst | 61 ++++++++++++++++++++++++++ setup.py | 3 +- 4 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 man/patatt.5 create mode 100644 man/patatt.5.rst diff --git a/MANIFEST.in b/MANIFEST.in index e72662c..b62d6b7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ include COPYING +include DCO include README.rst +include man/*.rst diff --git a/man/patatt.5 b/man/patatt.5 new file mode 100644 index 0000000..5e97753 --- /dev/null +++ b/man/patatt.5 @@ -0,0 +1,112 @@ +.\" Man page generated from reStructuredText. +. +.TH PATATT 5 "2021-05-07" "0.1.0" "" +.SH NAME +PATATT \- DKIM-like cryptographic patch attestation +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +patatt {sign,validate,genkey} [options] +.SH DESCRIPTION +.sp +This tools allows cryptographically signing patches sent via email +by using DKIM\-like message headers. This approach is both effective and +doesn\(aqt interfere with other code review tools the way inline or +detached PGP signatures do. For a full overview of core concepts and +considerations, please see README. +.sp +If you already have a PGP key configured for signing git tags or +commits, then you should be able to use patatt without any additional +configuration. Try running the following in any git repository: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +git format\-patch \-1 \-\-stdout | patatt sign +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +If patatt is not finding your PGP key, try adding the following to your +~/.gitconfig: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +[user] + signingkey = [yourkeyid] +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +To find out your keyid, run \fBgpg \-\-list\-secret\-keys\fP\&. If you want to +use a specific subkey, you can specify the subkey ID with a \fB!\fP at the +end. +.SH USING AS A GIT HOOK +.sp +If you use \fBgit\-send\-email\fP for sending patches, then you can get +them automatically signed via the \fBsendemail\-validate\fP hook: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ echo \(aqpatatt sign \-\-hook "${1}"\(aq >> .git/hooks/sendemail\-validate +$ chmod a+x .git/hooks/sendemail\-validate +.ft P +.fi +.UNINDENT +.UNINDENT +.SH SUBCOMMANDS +.INDENT 0.0 +.IP \(bu 2 +\fIpatatt sign\fP: sign stdin or RFC2822 files passed as arguments +.IP \(bu 2 +\fIpatatt validate\fP: basic validation for signed messages +.IP \(bu 2 +\fIpatatt genkey\fP: generate a new ed25519 keypair +.UNINDENT +.sp +You can run \fBpatatt [subcommand] \-\-help\fP to see a summary of flags for +each subcommand. +.SH SUPPORT +.sp +Please email \fI\%tools@linux.kernel.org\fP with support requests. +.SH AUTHOR +mricon@kernel.org + +License: MIT-0 +.SH COPYRIGHT +The Linux Foundation and contributors +.\" Generated by docutils manpage writer. +. diff --git a/man/patatt.5.rst b/man/patatt.5.rst new file mode 100644 index 0000000..f607ed9 --- /dev/null +++ b/man/patatt.5.rst @@ -0,0 +1,61 @@ +PATATT +====== +----------------------------------------- +DKIM-like cryptographic patch attestation +----------------------------------------- + +:Author: mricon@kernel.org +:Date: 2021-05-07 +:Copyright: The Linux Foundation and contributors +:License: MIT-0 +:Version: 0.1.0 +:Manual section: 5 + +SYNOPSIS +-------- +patatt {sign,validate,genkey} [options] + +DESCRIPTION +----------- +This tools allows cryptographically signing patches sent via email +by using DKIM-like message headers. This approach is both effective and +doesn't interfere with other code review tools the way inline or +detached PGP signatures do. For a full overview of core concepts and +considerations, please see README. + +If you already have a PGP key configured for signing git tags or +commits, then you should be able to use patatt without any additional +configuration. Try running the following in any git repository:: + + git format-patch -1 --stdout | patatt sign + +If patatt is not finding your PGP key, try adding the following to your +~/.gitconfig:: + + [user] + signingkey = [yourkeyid] + +To find out your keyid, run ``gpg --list-secret-keys``. If you want to +use a specific subkey, you can specify the subkey ID with a ``!`` at the +end. + +USING AS A GIT HOOK +------------------- +If you use ``git-send-email`` for sending patches, then you can get +them automatically signed via the ``sendemail-validate`` hook:: + + $ echo 'patatt sign --hook "${1}"' >> .git/hooks/sendemail-validate + $ chmod a+x .git/hooks/sendemail-validate + +SUBCOMMANDS +----------- +* *patatt sign*: sign stdin or RFC2822 files passed as arguments +* *patatt validate*: basic validation for signed messages +* *patatt genkey*: generate a new ed25519 keypair + +You can run ``patatt [subcommand] --help`` to see a summary of flags for +each subcommand. + +SUPPORT +------- +Please email tools@linux.kernel.org with support requests. diff --git a/setup.py b/setup.py index 3eb5a8f..7fa6809 100644 --- a/setup.py +++ b/setup.py @@ -33,8 +33,9 @@ setup( author_email='mricon@kernel.org', packages=['patatt'], license='MIT-0', - long_description=read('README'), + long_description=read('README.rst'), long_description_content_type='text/x-rst', + data_files = [('share/man/man5', ['man/patatt.5'])], keywords=['git', 'patches', 'attestation'], install_requires=[ 'pynacl', -- 2.31.1