diff --git a/35eae6232b985faec7a137a3ab5af03fddc27b78.patch b/35eae6232b985faec7a137a3ab5af03fddc27b78.patch new file mode 100644 index 0000000..e80592b --- /dev/null +++ b/35eae6232b985faec7a137a3ab5af03fddc27b78.patch @@ -0,0 +1,64 @@ +commit 35eae6232b985faec7a137a3ab5af03fddc27b78 +Author: Bill Nottingham +Date: Thu Jan 5 15:18:22 2012 -0500 + + Add some basic support for overriding mail from/to addresses. (#739166) + +diff --git a/utils/spam-o-matic b/utils/spam-o-matic +index a1cbc98..ba9e059 100755 +--- a/utils/spam-o-matic ++++ b/utils/spam-o-matic +@@ -21,6 +21,9 @@ import repoclosure + owners = {} + deps = {} + ++owner_template = "%s-owner@fedoraproject.org" ++from_address = "buildsys@fedoraproject.org" ++ + def generateConfig(distdir, treename, arch): + if not os.path.exists(os.path.join(distdir, arch)): + return None +@@ -67,7 +70,7 @@ def addOwner(list, pkg): + if list.has_key(pkg): + return False + +- f = "%s-owner@fedoraproject.org" % pkg ++ f = owner_template % pkg + list[pkg] = f + if f: + return True +@@ -153,7 +156,7 @@ def generateSpam(pkgname, treename, sendmail = True): + + data = data + "Please resolve this as soon as possible.\n\n" + +- fromaddr = 'buildsys@fedoraproject.org' ++ fromaddr = from_address + toaddrs = [guilty] + if conspirators: + toaddrs = toaddrs + conspirators +@@ -244,8 +247,14 @@ def doit(dir, treename, mail=True): + if __name__ == '__main__': + + parser = OptionParser("usage: %prog [options] ") +- parser.add_option("--nomail", action="store_true") +- parser.add_option("--treename", default="rawhide") ++ parser.add_option("--nomail", action="store_true", ++ help="Don't mail the results") ++ parser.add_option("--treename", default="rawhide", ++ help="Name of the tree to use in messages") ++ parser.add_option("--fromaddr", default="buildsys@fedoraproject.org", ++ help="Address to send mail from (default: buildsys@fedoraproject.org)") ++ parser.add_option("--owneraddr", default="%s-owner@fedoraproject.org", ++ help="Template for package owner addresses to send mail to (default: %s-owner@fedoraproject.org)") + (options, args) = parser.parse_args(sys.argv[1:]) + if len(args) != 1: + parser.error("incorrect number of arguments") +@@ -254,4 +263,8 @@ if __name__ == '__main__': + mail = False + else: + mail = True ++ if options.fromaddr: ++ from_address = options.fromaddr ++ if options.owneraddr: ++ owner_template = options.owneraddr + doit(args[0], options.treename, mail) diff --git a/mash.spec b/mash.spec index c467b27..9150e11 100644 --- a/mash.spec +++ b/mash.spec @@ -2,7 +2,7 @@ Name: mash Version: 0.5.23 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Koji buildsystem to yum repository converter Group: Development/Tools License: GPLv2 @@ -14,6 +14,7 @@ Conflicts: pungi < 1.0.0 BuildRequires: python-devel BuildArch: noarch Patch1: mash-new.patch +Patch100: 35eae6232b985faec7a137a3ab5af03fddc27b78.patch %description mash is a tool that queries a koji buildsystem for the latest RPMs for @@ -23,6 +24,7 @@ any multlib RPMs that are necessary. %prep %setup -q %patch1 -p1 +%patch100 -p1 -b .addr %build %{__python} setup.py build @@ -46,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT /var/cache/mash %changelog +* Thu Jan 05 2011 Bill Nottingham 0.5.23-4 +- add basic support for overriding e-mail addresses in spam-o-matic (#739166) + * Thu Jul 28 2011 Bill Nottingham 0.5.23-3 - unbreak rawhide