aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-10-01mb2q: Workaround broken mbox formatsHEADmasterThomas Gleixner1-2/+76
mailbox format requires that lines starting with 'From ' in the mail body are escaped. That's usually done as '>From '. Some mailbox generators including patchwork fail to do that which confuses the python mailbox parser as it considers a 'From ' line in the mail body as start of the next message. Work around it by parsing the binary file content of the mailbox manually and by applying heuristics to distinguish between a 'From ' line in the body and a valid unixfrom line which starts a new message. Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-10-01mb2q: Add keepcc optionThomas Gleixner1-1/+4
Stripping Cc lists from the mailheader also causes to lose the Cc: list in the mail body around the SOB line. Add an option to collect that independently. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-10-01mb2q: Handle newlines in Message-Id and related headersThomas Gleixner1-3/+12
New lines in Message-Id headers are not handled correctly. Strip any whitespace from the message id after retrieving it. The same applies to References and In-Reply-To headers. Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-10-01mb2q: Make subject stripping more robustThomas Gleixner1-1/+4
Deal with asymetric '[' brackets correctly. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-10-01mb2q: Make Cc parsing less fragileThomas Gleixner1-2/+8
Malformed Cc: and To: headers cause exceptions. Handle them gracefully. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-10-01mb2q: Pickup Reviewed-and-tested-by tagsKurt Kanzenbach1-0/+4
Currently Reviewed-and-tested-by tags are ignored. Pick them up in the same way as Reported-and-tested-by is handled. Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-10-01mb2q: Add Debugged-by tagThomas Gleixner1-0/+1
Another infrequently used tag missing. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-10-01mb2q: Split out version informationBenedikt Spranger2-2/+5
Packaging information depends on a proper versioning scheme. The version information by now is hardcoded in the mb2q tool. Split out the version information and provide the version for packaging tools. Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-10-01quilttools: Add Python setup supportBenedikt Spranger3-0/+103
The Python ecosystem provides mechanism to maintain proper information for installation and packaging. Provide these informations. Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-02-07mb2q: Use yaml.SafeLoader for compability with py-yaml < v3.14Torben Hohn1-1/+1
Debian buster only has python-yaml v3.13 currently. That version does not include yaml.FullLoader. Use the SafeLoader. Signed-off-by: Torben Hohn <torben.hohn@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-01-09mb2q: Version 0.3v0.3Thomas Gleixner1-1/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-01-09mb2q: Handle Co-developed-by tag correctlyThomas Gleixner1-0/+1
The Co-developed-by is missing in the tag ordering list. Add it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-01-09mb2q: Handle notmuch message ordering correctlyThomas Gleixner1-1/+6
Notmuch provides the messages in a thread in reverse order, except for the message which is the first one in a thread. This causes the patch ordering in the resulting patch queue to be reverse. Insert the mails into the list after thread starting message instead of queueing them at the end. Reported-by: Kurt Kanzenbach <kurt@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-12-17mb2q: Add version infov0.2Thomas Gleixner1-0/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-12-17mb2q: Support notmuch tag based exportThomas Gleixner1-7/+69
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-12-17mb2q: Add support for maildir inputThomas Gleixner1-4/+20
Be lazy and treat the inbox argument depending on the type. If it's a file, assume mailbox, if it's a directory assume maildir. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-11-07mb2q: Make cover letter replies work againThomas Gleixner1-1/+1
Using a stale variable for comparison instead of the actual iterator does not work well. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-09-26mb2q: Fix deprecated yaml.load() warnings by specifying LoaderDaniel Borkmann1-1/+1
Fix the following mb2q issue on startup: $ ./mb2q ./t.mbox ./mb2q:653: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. cfg = yaml.load(open(os.path.expanduser(args.config))) Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-09-03mb2q: Feed the supplied character set into the decoderThomas Gleixner1-1/+8
Otherwise the decoder fails to handle especially asian character sets. Reported-by: Bjorn Helgaas <helgaas@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-09-03mb2q: Handle malformed discard lines gracefullyThomas Gleixner1-6/+11
A discard line '--\n' was obviously not detected as the code was looking for '---'. Handle it by making the decision whether the posttag area starts by checking whether the current line is past the last tag seen in the text. Reported-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-09-03mb2q: Do not assume that diffs start with 'a/'Thomas Gleixner1-0/+1
Allow other p1 prefixes than 'a/' Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-08-28mb2q: Handle same subject in a thread and no SOB in patch properThomas Gleixner1-1/+17
The code only checks whether a patch file exists already, but it does not handle the case when the same subject is there for two mails, which can happen when there is a V$N+1 reply in the thread. While patches which lack a SOB are correctly detected, the code fails later because is assumes that there is always a SOB. Fixup both. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-08-27mb2q: Make the default list/cc work correctlyThomas Gleixner1-2/+2
Reported-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-08-27mb2q: Add config option to keep certain Cc addresses and fix SOB placementThomas Gleixner3-7/+29
Add a configuration option which allows to add mail addresses which are never dropped from the Cc list, e.g. stable@vger.kernel.org. Move the committer SOB (if not placed at the end) right after the last SOB in the chain. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-08-26man: Add examples to mb2q man pageThomas Gleixner1-0/+37
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2019-08-26quilttools: Initial importThomas Gleixner14-0/+1588
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>