diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/bcfg2-cron | 2 | ||||
-rwxr-xr-x | tools/export.py | 47 |
2 files changed, 5 insertions, 44 deletions
diff --git a/tools/bcfg2-cron b/tools/bcfg2-cron index fe0e6e90d..9a93c2e44 100755 --- a/tools/bcfg2-cron +++ b/tools/bcfg2-cron @@ -1,6 +1,6 @@ #!/bin/sh # -# Script to run bcfg2 with cron. +# Script to run bcfg2 with cron. # # This script is designed so that bcfg2-cron can be invoked from both # /etc/cron.daily and /etc/cron.hourly. This allows the administrators to diff --git a/tools/export.py b/tools/export.py index bdb85de41..df3c810d5 100755 --- a/tools/export.py +++ b/tools/export.py @@ -163,43 +163,6 @@ E.G. 1.2.0pre1 is a valid version. print(help_message) quit() - if version_info['build'] == '': - rpmchangelog = ["* %s %s <%s> %s-1\n" % - (datetime.datetime.now().strftime("%a %b %d %Y"), - name, email, version_release), - "- New upstream release\n", "\n"] - else: - rpmchangelog = ["* %s %s <%s> %s-0.%s.%s\n" % - (datetime.datetime.now().strftime("%a %b %d %Y"), - name, email, version_release, - version_info['build'][-1], version_info['build']), - "- New upstream release\n", "\n"] - - # write out the new RPM changelog - specs = ["misc/bcfg2.spec", - "misc/bcfg2-selinux.spec"] - if options.dryrun: - print("*** Add the following to the top of the %%changelog section in %s:\n%s\n" - % (rpmchangelog, " and ".join(specs))) - else: - for fname in specs: - try: - lines = open(fname).readlines() - for lineno in range(len(lines)): - if lines[lineno].startswith("%changelog"): - break - else: - print("No %changelog section found in %s" % fname) - continue - for line in reversed(rpmchangelog): - lines.insert(lineno + 1, line) - open(fname, 'w').write("".join(lines)) - except: - err = sys.exc_info()[1] - print("Could not write %s: %s" % (fname, err)) - print(help_message) - quit() - # update solaris version find_and_replace('solaris/Makefile', 'VERS=', 'VERS=%s-1\n' % version, @@ -294,25 +257,23 @@ E.G. 1.2.0pre1 is a valid version. startswith=True, dryrun=options.dryrun) find_and_replace('misc/bcfg2.spec', 'BuildRoot', - 'BuildRoot: %%{_tmppath}/%%{name}-%%{version}%s-%%{release}-root-%%(%%{__id_u} -n)\n' % - version_info['build'], + 'BuildRoot: %{_tmppath}/%{name}-%{version}%{?_pre_rc}-%{release}-root-%(%{__id_u} -n)\n', startswith=True, dryrun=options.dryrun) find_and_replace('misc/bcfg2-selinux.spec', 'BuildRoot', - 'BuildRoot: %%{_tmppath}/%%{name}-%%{version}%s-%%{release}-root-%%(%%{__id_u} -n)\n' % - version_info['build'], + 'BuildRoot: %{_tmppath}/%{name}-%{version}%{?_pre_rc}-%{release}-root-%(%{__id_u} -n)\n', startswith=True, dryrun=options.dryrun) # fix pre problem noted in # http://trac.mcs.anl.gov/projects/bcfg2/ticket/1129 find_and_replace('misc/bcfg2.spec', 'Source0', - 'Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/%%{name}-%%{version}%s.tar.gz\n' % version_info["build"], + 'Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/%{name}-%{version}%{?_pre_rc}.tar.gz\n', startswith=True, dryrun=options.dryrun) find_and_replace('misc/bcfg2-selinux.spec', 'Source0', - 'Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/%%{name}-%%{version}%s.tar.gz\n' % version_info["build"], + 'Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/%{name}-%{version}%{?_pre_rc}.tar.gz\n', startswith=True, dryrun=options.dryrun) # update the version in reports |