@@ -0,0 +1,1184 @@
+#!/usr/bin/python%0A%0A%22%22%22%0Arelease.py: Get back the upstream releaseNotes to generate the correponsing%0AChangeLog file%0A%22%22%22%0A%0Aimport codecs%0Aimport json%0Aimport re%0Aimport subprocess%0Aimport sys%0Aimport requests%0A%0A__author__ = %22P. Thierry%22%0A__license__ = %22GPL2+%22%0A__version__ = %221.0%22%0A__maintainer__ = %22P. Thierry%22%0A__email__ = %22phil@reseau-libre.net%22%0A%0ACMD = 'dpkg-parsechangelog -ldebian/changelog -S Version'%0ABASEURL = 'https://api.github.com/repos/OpenSCAP/openscap-daemon/releases/tags/'%0A%0A# runing subprocess and waiting for its end%0AP = subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE)%0A(STDOUT, STDERR) = P.communicate()%0AP_STATUS = P.wait()%0A%0A# cleaning Debian subversion%0AVERSION = re.sub(r%22-.+$%22, %22%22, STDOUT)%0A%0A# loading the current version ReleaseNote.md from Github%0Aprint 'Loading ReleaseNotes from ' + BASEURL + VERSION%0AR = requests.get(BASEURL + VERSION)%0Aif R.ok:%0A    REPOITEM = json.loads(R.text or R.content)%0A    with codecs.open(%22changelog%22, %22w%22, %22utf-8%22) as ch:%0A        ch.write(%22# openscap-daemon%22 + %22 %22 + REPOITEM%5B'tag_name'%5D + %22%5Cr%5Cn%22)%0A        ch.write(%22%5Cr%5Cn%22)%0A        ch.write(REPOITEM%5B'body'%5D)%0Aelse:%0A    print %22error loading request: got %22 + str(R.status_code)%0A    sys.exit(1)%0A

add changelog sync tool to debian dir