AutoQA Going Down for Updates
by Tim Flink
The physical machine which hosts autoqa.fp.o and autoqa-stg.fp.o is
going down for maintenance and thus, autoqa will be down for a little
while.
I'm starting to stop new jobs and will be bringing the hosts down
shortly. I'll send out an update when things are back up.
Tim
10 years, 6 months
[Fedora Build Service] Small enhancements for better readability
by Petr Schindler
Hi,
when I was going through the code of FBS I found some quite unclear
parts. You can find attached my small patch with changes that, I think,
make some things clearer. Please review it, I hope that at least some of
those changes will make it to the code.
Thank you,
Petr
-------PATCH-------
diff --git a/client/imagebuild.py b/client/imagebuild.py
index 78a29d4..b76e266 100755
--- a/client/imagebuild.py
+++ b/client/imagebuild.py
@@ -115,7 +115,7 @@ def main():
# when this script has distributed mode, this will go away
opts.__dict__['email']='foo(a)bar.com'
- if None in [option_value for option_value in
opts.__dict__.values()]:
+ if None in opts.__dict__.values():
print 'You must atleast specify the image type and the
configuration file'
parser.print_help()
sys.exit()
diff --git a/image_builder/imagebuilder.py
b/image_builder/imagebuilder.py
index 205b81c..0116edf 100644
--- a/image_builder/imagebuilder.py
+++ b/image_builder/imagebuilder.py
@@ -177,25 +177,25 @@ class ImageBuilder:
# boot
if self.iso_type == 'boot':
self.logger.info('Starting the Image Build Process')
- self.imgloc = worker.build_bootiso()
+ imgloc = worker.build_bootiso()
# DVD
if self.iso_type == 'dvd':
self.logger.info('Starting the Image Build Process')
- self.imgloc = worker.build_dvd(self.kickstart)
+ imgloc = worker.build_dvd(self.kickstart)
#Live image
if self.iso_type == 'live':
self.logger.info('Starting the Image Build Process')
- self.imgloc = worker.build_live(self.kickstart)
+ imgloc = worker.build_live(self.kickstart)
self.logger.info('Image building process complete')
#transfer image(s) and logs
- if self.imgloc:
+ if imgloc:
self.logger.info('Image successfully created. Transferring
to staging.')
- t = Transfer(self.buildconfig, self.imgloc, self.logfile)
+ t = Transfer(self.buildconfig, imgloc, self.logfile)
status = t.transfer()
if status == 0:
@@ -206,14 +206,14 @@ class ImageBuilder:
if status == -1:
self.logger.info('Error in transfering image(s)/logs')
- dirname, temp =
os.path.split(os.path.abspath(self.imgloc[0]))
+ dirname, temp =
os.path.split(os.path.abspath(imgloc[0]))
self.logger.info('Image(s) available in {0:s} on
{1:s}'.format(dirname,os.uname()[1]))
#build completion notification email
self.notify_email_final()
return -1
else:
self.logger.info('Error creating image. Transferring
Logs.')
- t = Transfer(self.buildconfig, self.imgloc, self.logfile)
+ t = Transfer(self.buildconfig, imgloc, self.logfile)
status = t.transfer()
if status == 0:
diff --git a/image_builder/util.py b/image_builder/util.py
index 2fe14cd..3ba9c8e 100644
--- a/image_builder/util.py
+++ b/image_builder/util.py
@@ -151,8 +151,8 @@ class Utilities:
if ks_fname.startswith(('http', 'https')):
# get the 'raw' file URL if its from the git repo
if 'spin-kickstarts.git' in ks_fname:
- ks_fname=ks_fname.split('tree')[0] + 'plain' +
ks_fname.split('tree')[1]
-
+ ks_fname = ks_fname.replace('tree', 'plain', 1)
+
# download and then JSON dump
import urllib2
try:
diff --git a/image_builder/worker.py b/image_builder/worker.py
index a31e594..277f259 100644
--- a/image_builder/worker.py
+++ b/image_builder/worker.py
@@ -122,13 +122,11 @@ class Worker():
def prep_siderepo(self, workdir, packages, arch):
""" prepare a side repository given extra packages """
- arch = [arch]
+ arch = [arch, 'noarch']
# DVD needs the SRPMs. Others don't.
if self.buildconfig['default']['type'] == 'dvd':
- arch.extend(['noarch','src'])
- else:
- arch.append('noarch')
+ arch.append('src')
repodir = '{0:s}/siderepo'.format(workdir)
repo_create = RepoCreate(repodir, arch)
10 years, 6 months
[Fedora Build Service] Review request
by Petr Schindler
Hi,
I've made a quick fix to [1]. Here is the patch for review, you can find
it also attached to this mail.
[1] https://fedorahosted.org/fedora-build-service/ticket/9
---------------------PATCH-------------------------------------------
diff --git a/client/imagebuild.py b/client/imagebuild.py
index
78a29d4c6b7bb8cbae6c75f9178d8d11549f6410..1460a0611d32d01891b164aa7209e38b337c9752 100755
--- a/client/imagebuild.py
+++ b/client/imagebuild.py
@@ -102,7 +102,7 @@ def main():
type='choice',
choices=['boot','dvd','live'])
parser.add_option('-w', '--workdir', help='Work directory for the
image builder.',
- dest='workdir',
default=tempfile.gettempdir()+'/imagebuilder_work')
+ dest='workdir',
default='/var/tmp/imagebuilder_work')
parser.add_option('-s', '--staging', help='Staging area (file:///
or ftp://)',
dest='staging', default='file:///'+os.getcwd())
#parser.add_option('-e', '--email', help='Email address for
notification', dest='email')
@@ -120,6 +120,8 @@ def main():
parser.print_help()
sys.exit()
+ #TODO: write some warning if workdir is /tmp (in F18 and above)
+
#check for config file path.
if not os.path.exists(opts.config):
sys.exit('Config file is non-existent')
diff --git a/conf/dvd_imagebuild.conf b/conf/dvd_imagebuild.conf
index
22ff578f5b9bb0cf5d2b11f0d8b2b93a6afb6993..89793343edc31bf942e0bc7cc95f76337228aa6a 100644
--- a/conf/dvd_imagebuild.conf
+++ b/conf/dvd_imagebuild.conf
@@ -16,8 +16,8 @@
config=file:///usr/share/spin-kickstarts/fedora-install-fedora.ks
# sourceisos=0
# force=1
# stage=all (default)
-# destdir=/tmp/dvd_iso
-# cachedir=/tmp/dvd_iso/cache
+# destdir=/var/tmp/dvd_iso
+# cachedir=/var/tmp/dvd_iso/cache
# Additional packages to retrieve from Koji
# Seperated by semicolons;
diff --git a/conf/live_imagebuild.conf b/conf/live_imagebuild.conf
index
551d71ef9828ab7d961eb1e1e32cb1cf6a2f45e9..a5ff4877e12c3e0ebb62e915610ce860c8bf190f 100644
--- a/conf/live_imagebuild.conf
+++ b/conf/live_imagebuild.conf
@@ -18,9 +18,9 @@
config=http://git.fedorahosted.org/cgit/spin-kickstarts.git/tree/fedora-l...
# releasever=rawhide
# nvr=
# bid=
-# tmpdir=/tmp/livework
+# tmpdir=/var/tmp/livework
# cachedir=/var/cache/liveimage
-# logfile=/tmp/liveimage.log
+# logfile=/var/tmp/liveimage.log
# Additional packages to retrieve from Koji
# Seperated by semicolons;
10 years, 6 months