diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2021-02-13 00:55:30 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2021-02-25 23:15:06 +0300 |
commit | 706d5aacd7ab7b37c00df1a1b210e4ced06119e1 (patch) | |
tree | ed0bec373424d01accfb2e9c895c177a3e2d7abe /poky/contrib | |
parent | ac970dd705934286df062e0f1501f776dc2ef01d (diff) | |
download | openbmc-706d5aacd7ab7b37c00df1a1b210e4ced06119e1.tar.xz |
Reset poky to before our libpam hacks
Things got a bit out of synch with openbmc-config due to the libpam
issues and the migration from the meta-* layers.
Revert the two previous commits and then put the latest poky in with the
libpam revert and get openbmc-config right again.
Revert "Revert "libpam: update 1.3.1 -> 1.5.1""
This reverts commit 87ddd3eab4df68e624b5350ccaab28b3b97547c0.
Revert "poky: subtree update:796be0593a..10c69538c0"
This reverts commit c723b72979bfac6362509cf1fe086900f6641f28.
Change-Id: I3a1f405193aee6a21fe0cd24be9927c143a23d9a
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/contrib')
-rwxr-xr-x | poky/contrib/git-hooks/sendemail-validate.sample | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/poky/contrib/git-hooks/sendemail-validate.sample b/poky/contrib/git-hooks/sendemail-validate.sample deleted file mode 100755 index af5d55cb00..0000000000 --- a/poky/contrib/git-hooks/sendemail-validate.sample +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (C) 2020 Agilent Technologies, Inc. -# Author: Chris Laplante <chris.laplante@agilent.com> - -# This sendemail-validate hook injects 'From: ' header lines into outgoing -# emails sent via 'git send-email', to ensure that accurate commit authorship -# information is present. It was created because some email servers -# (notably Microsoft Exchange / Office 360) seem to butcher outgoing patches, -# resulting in incorrect authorship. - -# Current limitations: -# 1. Assumes one per patch per email -# 2. Minimal error checking -# -# Installation: -# 1. Copy to .git/hooks/sendemail-validate -# 2. chmod +x .git/hooks/sendemail-validate - - -import enum -import re -import subprocess -import sys - - -class Subject(enum.IntEnum): - NOT_SEEN = 0 - CONSUMING = 1 - SEEN = 2 - - -def make_from_line(): - cmd = ["git", "var", "GIT_COMMITTER_IDENT"] - proc = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True) - regex = re.compile(r"^(.*>).*$") - match = regex.match(proc.stdout) - assert match is not None - return "From: {0}".format(match.group(1)) - - -def main(): - email = sys.argv[1] - - with open(email, "r") as f: - email_lines = f.read().split("\n") - - subject_seen = Subject.NOT_SEEN - first_body_line = None - for i, line in enumerate(email_lines): - if (subject_seen == Subject.NOT_SEEN) and line.startswith("Subject: "): - subject_seen = Subject.CONSUMING - continue - if subject_seen == Subject.CONSUMING: - if not line.strip(): - subject_seen = Subject.SEEN - continue - if subject_seen == Subject.SEEN: - first_body_line = i - break - - assert subject_seen == Subject.SEEN - assert first_body_line is not None - - from_line = make_from_line() - # Only add FROM line if it is not already there - if email_lines[first_body_line] != from_line: - email_lines.insert(first_body_line, from_line) - email_lines.insert(first_body_line + 1, "") - with open(email, "w") as f: - f.write("\n".join(email_lines)) - - return 0 - - -if __name__ == "__main__": - sys.exit(main()) - |