summaryrefslogtreecommitdiffstats
path: root/tools/export.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-11-11 15:46:09 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-11-11 15:46:09 -0500
commite30c785c94c5aa399c44fff386fa2279f64f1acc (patch)
treee72c636dcae00a6ea0c668cfbee7d3e6b4e6a3fe /tools/export.py
parent7aa15c4c5507e311ff66264bc31e6758a80eb337 (diff)
parent103b1b5198828876fa0684296900769018075f1b (diff)
downloadbcfg2-e30c785c94c5aa399c44fff386fa2279f64f1acc.tar.gz
bcfg2-e30c785c94c5aa399c44fff386fa2279f64f1acc.tar.bz2
bcfg2-e30c785c94c5aa399c44fff386fa2279f64f1acc.zip
Merge branch 'maint'
Conflicts: src/lib/Bcfg2/Server/Admin/Compare.py src/lib/Bcfg2/Server/Admin/Snapshots.py src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugins/Probes.py src/sbin/bcfg2-crypt src/sbin/bcfg2-reports tools/upgrade/1.3/migrate_configs.py tools/upgrade/1.3/migrate_perms_to_mode.py
Diffstat (limited to 'tools/export.py')
-rwxr-xr-xtools/export.py49
1 files changed, 34 insertions, 15 deletions
diff --git a/tools/export.py b/tools/export.py
index 0ea6df2af..bdb85de41 100755
--- a/tools/export.py
+++ b/tools/export.py
@@ -220,12 +220,12 @@ E.G. 1.2.0pre1 is a valid version.
dryrun=options.dryrun)
find_and_replace('solaris-ips/MANIFEST.bcfg2.header',
'set name=pkg.fmri value="pkg://bcfg2/bcfg2@',
- 'set name=pkg.fmri value="pkg://bcfg2/bcfg2@%s"' % version,
+ 'set name=pkg.fmri value="pkg://bcfg2/bcfg2@%s"\n' % version,
startswith=True,
dryrun=options.dryrun)
find_and_replace('solaris-ips/MANIFEST.bcfg2-server.header',
'set name=pkg.fmri value="pkg://bcfg2/bcfg2-server@',
- 'set name=pkg.fmri value="pkg://bcfg2/bcfg2-server@%s"' % version,
+ 'set name=pkg.fmri value="pkg://bcfg2/bcfg2-server@%s"\n' % version,
startswith=True,
dryrun=options.dryrun)
find_and_replace('solaris-ips/pkginfo.bcfg2', 'VERSION=',
@@ -248,30 +248,49 @@ E.G. 1.2.0pre1 is a valid version.
find_and_replace('misc/bcfg2-selinux.spec', 'Version:',
'Version: %s\n' % version_release,
dryrun=options.dryrun)
- if version_info['build'] == '':
- find_and_replace('misc/bcfg2.spec', 'Release: ',
- 'Release: 1\n',
+ if version_info['build'].startswith('rc'):
+ find_and_replace('misc/bcfg2.spec', 'global _rc ',
+ '%%global _rc %s\n' % version_info['build'],
dryrun=options.dryrun)
- find_and_replace('misc/bcfg2-selinux.spec', 'Release: ',
- 'Release: 1\n',
+ find_and_replace('misc/bcfg2-selinux.spec', 'global _rc ',
+ '%%global _rc %s\n' % version_info['build'],
+ dryrun=options.dryrun)
+ elif version_info['build'].startswith('pre'):
+ find_and_replace('misc/bcfg2.spec', 'global _pre ',
+ '%%global _pre %s\n' % version_info['build'],
+ dryrun=options.dryrun)
+ find_and_replace('misc/bcfg2-selinux.spec', 'global _pre ',
+ '%%global _pre %s\n' % version_info['build'],
dryrun=options.dryrun)
else:
+ # comment out pre/rc
+ find_and_replace('misc/bcfg2.spec', 'global _pre ',
+ '#%%global _pre 2\n',
+ dryrun=options.dryrun)
+ find_and_replace('misc/bcfg2-selinux.spec', 'global _pre ',
+ '#%%global _pre 2\n',
+ dryrun=options.dryrun)
+ find_and_replace('misc/bcfg2.spec', 'global _rc ',
+ '#%%global _rc 1\n',
+ dryrun=options.dryrun)
+ find_and_replace('misc/bcfg2-selinux.spec', 'global _rc ',
+ '#%%global _rc 1\n',
+ dryrun=options.dryrun)
+
find_and_replace('misc/bcfg2.spec', 'Release: ',
- 'Release: 0.%s.%s\n' %
- (version_info['build'][-1], version_info['build']),
+ 'Release: 1%{?_pre_rc}%{?dist}\n',
+ startswith=True,
dryrun=options.dryrun)
find_and_replace('misc/bcfg2-selinux.spec', 'Release: ',
- 'Release: 0.%s.%s\n' %
- (version_info['build'][-1], version_info['build']),
+ 'Release: 1%{?_pre_rc}%{?dist}\n',
+ startswith=True,
dryrun=options.dryrun)
find_and_replace('misc/bcfg2.spec', '%setup',
- '%%setup -q -n %%{name}-%%{version}%s\n' %
- version_info['build'],
+ '%setup -q -n %{name}-%{version}%{?_pre_rc}\n',
startswith=True,
dryrun=options.dryrun)
find_and_replace('misc/bcfg2-selinux.spec', '%setup',
- '%%setup -q -n %%{name}-%%{version}%s\n' %
- version_info['build'],
+ '%setup -q -n %{name}-%{version}%{?_pre_rc}\n',
startswith=True,
dryrun=options.dryrun)
find_and_replace('misc/bcfg2.spec', 'BuildRoot',