diff --git a/gen-changelog.py b/gen-changelog.py new file mode 100644 index 0000000..e7ee1d7 --- /dev/null +++ b/gen-changelog.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 + +# LFS ChangeLog generator for trivial package addition, removal, and update + +from subprocess import Popen, PIPE +from urllib.request import urlopen +from os import getenv + +def get_entity(line): + line = line[1:] + if not line.startswith("= 2: + pkg = fields[1].lower() + pos = pkg.find(' ') + if pos > 0: + pkg = pkg[:pos] + tic = fields[0] + if len(fields) >= 3 and fields[2].startswith("high"): + security.add(pkg) + ticket[pkg] = tic + +print("Plain Text:") +for (s, act) in [(upd, "Update to "), (add, "Add ")]: + for i in s: + pkgver = i + "-" + expand_entity(ent, i + "-version") + out = act + pkgver + if pkgver in ticket: + out += ' (#' + ticket[pkgver] + ')' + print("-", out) +for i in rem: + print("-", "Remove", i) + +print("---------------------") + +print("XML") +name = getenv("USER") +for (s, act) in [(upd, "Update to "), (add, "Add ")]: + for i in s: + print(' ') + pkgver = i + "-" + expand_entity(ent, i + "-version") + out = ' [' + name + '] - ' + act + pkgver + if pkgver in security: + out += " (security fix)" + out += "." + if pkgver in ticket: + out += " Fixes\n " + out += "#" + out += ticket[pkgver] + "." + out += "" + print(out) + print(' ') diff --git a/general.ent b/general.ent index b9d3052..285ac90 100644 --- a/general.ent +++ b/general.ent @@ -10,7 +10,7 @@ - + @@ -91,7 +91,11 @@ - + + + + - + + - + - - - - - - - @@ -179,10 +172,10 @@ - - + + - + @@ -207,20 +200,28 @@ - - + + + + + + + + + + - + - - + + - + @@ -230,7 +231,7 @@ - + @@ -245,30 +246,30 @@ - - + + - + - - + + - + - - + + - + @@ -281,20 +282,20 @@ - - + + - + - - + + - + @@ -317,10 +318,10 @@ - - + + - + @@ -342,10 +343,10 @@ - - + + - + @@ -358,10 +359,10 @@ - - + + - + @@ -374,15 +375,15 @@ - - + + - + - + @@ -390,10 +391,10 @@ - - + + - + @@ -422,14 +423,22 @@ + + + + + + + + - - + + - + - + - + - + - + - - + + @@ -634,35 +643,35 @@ - + - + - + - - + + - + - - + + - + - - + + - + @@ -681,54 +690,57 @@ - - + + - + - - + + - + - - + + + + + - + - - - + + + - + - + - + - - + + - - + + - + @@ -741,10 +753,10 @@ - - + + - + @@ -759,10 +771,10 @@ - - + + - + diff --git a/patches.ent b/patches.ent index 898e9fa..eab4290 100644 --- a/patches.ent +++ b/patches.ent @@ -23,7 +23,7 @@ - +