mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
Fix buildroot using ~/rpmbuild/BUILDROOT.
This may have been a recent change in rpmbuild that caused this as the _buildroot macro appears to be somewhat new. However it seems using topdir accomplishes the same thing more thoroughly.
This commit is contained in:
parent
b1ca749682
commit
8fe640e0ed
2 changed files with 13 additions and 9 deletions
|
@ -269,6 +269,7 @@ class Builder(ConfigObject):
|
|||
'--define "_binary_filedigest_algorithm md5" %s %s %s --clean '
|
||||
'-ba %s' % (rpmbuild_options,
|
||||
self._get_rpmbuild_dir_options(), define_dist, self.spec_file))
|
||||
debug(cmd)
|
||||
try:
|
||||
output = run_command(cmd)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
|
@ -429,8 +430,9 @@ class Builder(ConfigObject):
|
|||
self.ran_setup_test_specfile = True
|
||||
|
||||
def _get_rpmbuild_dir_options(self):
|
||||
return ('--define "_sourcedir %s" --define "_builddir %s" --define '
|
||||
return ('--define "_topdir %s" --define "_sourcedir %s" --define "_builddir %s" --define '
|
||||
'"_srcrpmdir %s" --define "_rpmdir %s" ' % (
|
||||
self.rpmbuild_dir,
|
||||
self.rpmbuild_sourcedir, self.rpmbuild_builddir,
|
||||
self.rpmbuild_basedir, self.rpmbuild_basedir))
|
||||
|
||||
|
@ -500,8 +502,9 @@ class NoTgzBuilder(Builder):
|
|||
dir, use the git copy we create as the sources directory when
|
||||
building package so everything can be found:
|
||||
"""
|
||||
return ('--define "_sourcedir %s" --define "_builddir %s" '
|
||||
return ('--define "_topdir %s" --define "_sourcedir %s" --define "_builddir %s" '
|
||||
'--define "_srcrpmdir %s" --define "_rpmdir %s" ' % (
|
||||
self.rpmbuild_dir,
|
||||
self.rpmbuild_gitcopy, self.rpmbuild_builddir,
|
||||
self.rpmbuild_basedir, self.rpmbuild_basedir))
|
||||
|
||||
|
@ -888,8 +891,9 @@ class UpstreamBuilder(NoTgzBuilder):
|
|||
dir, use the git copy we create as the sources directory when
|
||||
building package so everything can be found:
|
||||
"""
|
||||
return ('--define "_sourcedir %s" --define "_builddir %s" '
|
||||
return ('--define "_topdir %s" --define "_sourcedir %s" --define "_builddir %s" '
|
||||
'--define "_srcrpmdir %s" --define "_rpmdir %s" ' % (
|
||||
self.rpmbuild_dir,
|
||||
self.rpmbuild_sourcedir, self.rpmbuild_builddir,
|
||||
self.rpmbuild_basedir, self.rpmbuild_basedir))
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ class SingleProjectTests(TitoGitTestFixture):
|
|||
|
||||
def tearDown(self):
|
||||
shutil.rmtree(self.repo_dir)
|
||||
pass
|
||||
|
||||
def test_init_worked(self):
|
||||
# Not actually running init here, just making sure it worked when
|
||||
|
@ -67,21 +66,22 @@ class SingleProjectTests(TitoGitTestFixture):
|
|||
def test_latest_tgz(self):
|
||||
tito("build --tgz -o %s" % self.repo_dir)
|
||||
|
||||
def test_tag_tgz(self):
|
||||
def test_build_tgz_tag(self):
|
||||
tito("build --tgz --tag=%s-0.0.1-1 -o %s" % (PKG_NAME,
|
||||
self.repo_dir))
|
||||
self.assertTrue(os.path.exists(os.path.join(self.repo_dir,
|
||||
"%s-0.0.1.tar.gz" % PKG_NAME)))
|
||||
|
||||
def test_latest_srpm(self):
|
||||
def test_build_latest_srpm(self):
|
||||
tito("build --srpm")
|
||||
|
||||
def test_tag_srpm(self):
|
||||
def test_build_srpm_tag(self):
|
||||
tito("build --srpm --tag=%s-0.0.1-1 -o %s" % (PKG_NAME, self.repo_dir))
|
||||
|
||||
def test_latest_rpm(self):
|
||||
def test_build_latest_rpm(self):
|
||||
tito("build --rpm -o %s" % self.repo_dir)
|
||||
|
||||
def test_tag_rpm(self):
|
||||
def test_build_rpm_tag(self):
|
||||
tito("build --rpm --tag=%s-0.0.1-1 -o %s" % (PKG_NAME,
|
||||
self.repo_dir))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue