From patchwork Thu Feb 26 20:00:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1969 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136218; bh=yZYFFxvqdPWwQnjIdHIT9a/R2l9Nv5b+V6V3fWukS8w=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZAPqN4XXb6PzWPztgG5UrPnxDhrTTcyTrG8wzIsuxEYPbYClHGKfdP6cqscOQar24 rucWA0dbeS7gNONAirvcj1nRXdRBQSaSuUf2+h2ig+krcVLZ6jz9+KMKNFRq57n7TO QNka6Wa+rT0M2AmGcchSpcd2V0ReFHKftn6VEG1Wmisl4pNh3sEEST2tQ/c9P2Y2aJ MJSgfGxXLSO1utHMwwolxyK9IHiA+B/3NIO+1b7XB8UlqYf1h3cIIPMTO560MCf4OD 7ucpYFxn2AFZqmORyRlMQwqoGq4MrTMtmYknfIkYG6y5eJTJzHB44EZTjUCC1lMvw3 sDsCWzRwjofig== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 882C269E39 for ; Thu, 26 Feb 2026 13:03:38 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id yp9elZAyDPpH for ; Thu, 26 Feb 2026 13:03:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136218; bh=yZYFFxvqdPWwQnjIdHIT9a/R2l9Nv5b+V6V3fWukS8w=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZAPqN4XXb6PzWPztgG5UrPnxDhrTTcyTrG8wzIsuxEYPbYClHGKfdP6cqscOQar24 rucWA0dbeS7gNONAirvcj1nRXdRBQSaSuUf2+h2ig+krcVLZ6jz9+KMKNFRq57n7TO QNka6Wa+rT0M2AmGcchSpcd2V0ReFHKftn6VEG1Wmisl4pNh3sEEST2tQ/c9P2Y2aJ MJSgfGxXLSO1utHMwwolxyK9IHiA+B/3NIO+1b7XB8UlqYf1h3cIIPMTO560MCf4OD 7ucpYFxn2AFZqmORyRlMQwqoGq4MrTMtmYknfIkYG6y5eJTJzHB44EZTjUCC1lMvw3 sDsCWzRwjofig== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 76F5369D8A for ; Thu, 26 Feb 2026 13:03:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136217; bh=lTa1u+UOouwSf2J7hwSXK6sHmwkIVd8d0MS16YaC0Ik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hQ0UPlvR42vBX4nuLLWVXf/XPjOmQXYCkjPecxh3Z5hUFaNmWauy7dVZikMyrniA9 YMK+R49hPB8alDi3mE5OSr/AgyD9jBKh732n1VXXBXIGOEnZ8CprwGZPIOZC89eRQd WV5qm61sXRXVWX/4v7xF5LtR9EaCf/FjNljhyjfTgUC9dYzKEf+XecEeT2TPXXG8ml d0LyJGY7K7pqGhtquGCQ7z6Rim6sQkZP75QViS8W1lOmm79SAhbcOKU5qv9zEmHgGM o7puQWsg4hgskuUU3vmT40zU0WyThoV0tZ0EtOxlZLNlf9XhwIiqA2w2Ol/im5Watw w2shXy4CB1p5A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 183CE69D4A; Thu, 26 Feb 2026 13:03:37 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id gjZ5VRBhwd5x; Thu, 26 Feb 2026 13:03:37 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136212; bh=Tb8e2pn6GlKgwjPTr/QMIy95urp/DlGpjx3BCzUrgGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Luxj5vZzPRCli+ZNMwiVxEaIO1L1iDKvjrtaGjo0C0xWsBEg64izwvB9uS0uZXfBC 3yqKt3IvweiOb5cnicqQDEugrKOGoVOPLZtqhah19MAiTY5XYP9JppwISVQWG0Hi/h ZV4N+DWIbSeGDiFfMLzC79S011tAHUO7zK8bbjZH1oUQI3gmdzKsirbFVE7iKi9ADp m5MQ8esF+FOCPjDz7I/ABRmkKdw7TKrGtCkKWbXRRLYpKWw6uz7n8u8otOCW/J2nCq sgoXXI7b42m8Vv7KExOD526nfV+XL5QgFVuzAdz/IL1EB3NgxgCRCe2DiGjTCqfaVt nI/xIH/eCt3wg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 958DB69E35; Thu, 26 Feb 2026 13:03:32 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 26 Feb 2026 13:00:38 -0700 Message-ID: <20260226200106.1727176-33-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226200106.1727176-1-sjg@u-boot.org> References: <20260226200106.1727176-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: VIUV2HDVBEPES6Y2GCGNKEG6CDGYWLGW X-Message-ID-Hash: VIUV2HDVBEPES6Y2GCGNKEG6CDGYWLGW X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 32/32] patman: Document multi-upstream setup List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add a step-by-step guide covering how to configure multiple upstreams with different patchwork servers, sendemail identities, To addresses and send options. Signed-off-by: Simon Glass --- tools/patman/patman.rst | 167 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) diff --git a/tools/patman/patman.rst b/tools/patman/patman.rst index 549e203c254..87e0984c0d7 100644 --- a/tools/patman/patman.rst +++ b/tools/patman/patman.rst @@ -936,6 +936,173 @@ Here is a sample 'progress' view: :width: 800 :alt: Patman showing the progress view +Multiple upstreams +~~~~~~~~~~~~~~~~~~ + +If you send patches to more than one upstream tree (e.g. U-Boot mainline and +the U-Boot concept tree), you can configure patman with multiple upstreams so +that each series automatically uses the correct send settings for its +destination. The trees may use different mailing lists, patchwork servers and +SMTP credentials. + +The key concepts are: + +**Upstream** + A remote git repository that you send patches to. Each upstream has a name + (e.g. ``us``, ``ci``) and a URL. Upstreams can also carry send settings: + a patchwork URL, a sendemail identity, a To address and flags controlling + ``get_maintainer.pl`` and subject-tag processing. Use ``patman upstream`` + commands to manage these. + +**Patchwork project** + The patchwork server tracks patches for a project (e.g. ``U-Boot``). + Each upstream can point to a different patchwork server, and patman needs + to know the project name on that server so it can look up series links. + Use ``patman patchwork set-project`` to configure this per upstream. + +**Sendemail identity** + Git supports multiple SMTP configurations via ``[sendemail ""]`` + sections in ``.gitconfig``. An upstream can reference one of these + identities so that patman passes ``--identity`` to ``git send-email`` + automatically. + +**Series upstream** + Each series can be associated with an upstream. When you send the series, + patman looks up the upstream's settings and applies them. This means the + correct identity, To address and patchwork server are used without any + extra flags on the command line. + +Here is a step-by-step guide for a developer who sends to both U-Boot +mainline and the U-Boot concept tree. + +Step 1: Add your upstreams +.......................... + +First, add each upstream with its git remote URL, patchwork URL and send +settings:: + + patman upstream add us https://source.denx.de/u-boot/u-boot.git \ + -p https://patchwork.ozlabs.org -t u-boot + + patman upstream add ci https://concept.u-boot.org/u-boot/u-boot.git \ + -p https://patchwork.u-boot.org -t concept -I concept -m --no-tags + +The options are: + +``-p`` / ``--patchwork-url`` + URL of the patchwork server for this upstream + +``-t`` / ``--series-to`` + Patman alias for the To address (from your ``~/.patman`` alias file) + +``-I`` / ``--identity`` + Git sendemail identity (selects ``[sendemail ""]`` from + ``.gitconfig``) + +``-m`` / ``--no-maintainers`` + Skip running ``get_maintainer.pl`` + +``--no-tags`` + Skip subject-tag alias processing + +You can check your upstreams with:: + + patman upstream ls + +You can also set a default upstream:: + + patman upstream default us + +Step 2: Configure git sendemail identities +.......................................... + +If your upstreams use different SMTP servers or credentials, set up git +sendemail identities in your ``.gitconfig``. Each identity is a +``[sendemail ""]`` section that overrides the base ``[sendemail]`` +settings. + +For example, to use one SMTP server by default and a different one for the +concept tree (server names and credentials are just examples; substitute your +own):: + + [sendemail] + smtpserver = smtp.denx.de + smtpserverport = 587 + smtpencryption = tls + + [sendemail "concept"] + smtpserver = smtp.gmail.com + smtpserverport = 587 + smtpencryption = tls + smtpuser = user@gmail.com + +The base ``[sendemail]`` settings are used when no identity is specified. When +you add ``-I concept`` to an upstream, patman passes ``--identity=concept`` to +``git send-email``, which selects the matching section. + +Step 3: Set up patchwork projects +................................. + +Each upstream needs a patchwork project so that patman can find your series on +the server:: + + patman patchwork set-project U-Boot us + patman patchwork set-project U-Boot ci + +This looks up the project on the patchwork server associated with the upstream +and stores the project ID locally. + +Step 4: Set up aliases +...................... + +Add To-address aliases to your ``~/.patman`` file:: + + [alias] + u-boot: U-Boot Mailing List + concept: U-Boot Concept + +These are the names referenced by ``--series-to`` above. + +Step 5: Add series with an upstream +.................................... + +When adding a series, specify which upstream it targets:: + + patman series add -S us + +If you omit ``-S``, you can set it later with:: + + patman series set-upstream + +Step 6: Send +............ + +When you send a series, patman automatically applies the upstream's settings:: + + patman series send + +This looks up the upstream for the series and: + +- passes ``--identity`` to ``git send-email`` if configured +- sets the To address from ``--series-to`` if no ``Series-to:`` tag is present +- skips ``get_maintainer.pl`` if ``--no-maintainers`` is set +- skips tag processing if ``--no-tags`` is set + +If the series has a ``Series-to:`` tag that does not match the upstream's +expected To address, patman raises an error. This prevents accidentally sending +to the wrong mailing list. + +Updating upstream settings +.......................... + +To change settings on an existing upstream, use ``upstream set``:: + + patman upstream set ci -I chromium + patman upstream set us -p https://patchwork.ozlabs.org + +The same flags as ``upstream add`` are available, plus ``--maintainers`` and +``--tags`` to re-enable options that were previously disabled. + General points --------------