merge from jesse's branch
This commit is contained in:
commit
5d46c0c53b
4
.hgtags
4
.hgtags
@ -15,7 +15,3 @@ ebfe0e963db6d7b652f63f99aaec121e7ff19074 pungi-0.2.1-1
|
||||
769a8e08d77a2234295449282b16ca38ff4d846e pungi-0.2.2-1
|
||||
ba049c3454d5dae9326d8050bb0d7d8116982ca4 f7-test1
|
||||
780520383876b76dd06fa013e1a41ddd6bf0901e pungi-0.2.3-1
|
||||
158bd9a170892b43645caed12bddc3602ef3be4d pungi-0.2.3-1
|
||||
6659955ccfdf29ecd6027bd3770f80d815720af0 pungi-0.2.3-1
|
||||
9f7b5877c32c533d00ea6baa67057ce424a40a61 pungi-0.2.3-1
|
||||
7ea08753383766ce36bb49fef6d4fcf44158ad26 pungi-0.2.3-1
|
||||
|
7
Authors
7
Authors
@ -1,8 +1 @@
|
||||
Authors:
|
||||
|
||||
Jesse Keating <jkeating at redhat dot com>
|
||||
|
||||
Contributors:
|
||||
|
||||
Will Woods <wwoods at redhat dot com>
|
||||
sien Ita Essien <essien at wazobialinux dot com>
|
||||
|
@ -1,8 +1,3 @@
|
||||
* Tue Feb 13 2007 Jesse Keating <jkeating@redhat.com>
|
||||
- Fix part of the patch from Essien
|
||||
- Add Contributors to the Authors file
|
||||
- Adjust the Makefile so that srpm doesn't cause a tag
|
||||
|
||||
* Mon Feb 12 2007 Jesse Keating <jkeating@redhat.com>
|
||||
- Add new Make targets (Essien Ita Essien)
|
||||
- Add runtime flags for doing specific stages of the compose (Essien Ita Essien)
|
||||
|
4
Makefile
4
Makefile
@ -17,7 +17,7 @@ tag:
|
||||
@hg tag -m "$(HGTAG)" $(HGTAG)
|
||||
# @hg push
|
||||
|
||||
archive:
|
||||
archive: tag
|
||||
@rm -rf ${PKGNAME}-$(VERSION)/
|
||||
@python setup.py sdist > /dev/null
|
||||
@echo "The archive is in dist/${PKGNAME}-$(VERSION).tar.gz"
|
||||
@ -27,7 +27,7 @@ srpm: archive
|
||||
@rpmbuild -bs ${PKGRPMFLAGS} ${PKGNAME}.spec
|
||||
@echo "The srpm is in $(SRPM)"
|
||||
|
||||
rpm: archive tag
|
||||
rpm: archive
|
||||
@rpmbuild --clean -bb ${PKGRPMFLAGS} ${PKGNAME}.spec
|
||||
@echo "The rpm is in $(RPM)"
|
||||
|
||||
|
2
pungi
2
pungi
@ -114,7 +114,7 @@ def main():
|
||||
mypungi.doSplittree()
|
||||
if opts.do_all or opts.do_createiso:
|
||||
mypungi.doCreateSplitrepo()
|
||||
mypungi.doCreateIsos()
|
||||
mypungi.doCreateIsos(config.get('default', 'iso_dir'))
|
||||
|
||||
# Do things slightly different for src.
|
||||
if config.get('default', 'arch') == 'source':
|
||||
|
@ -190,7 +190,9 @@ class Gather(yum.YumBase):
|
||||
|
||||
if not self.config.has_option('default', 'quiet'):
|
||||
self.logger.info("%s already exists and appears to be complete" % local)
|
||||
os.link(local, os.path.join(pkgdir, os.path.basename(remote)))
|
||||
target=os.path.join(pkgdir, os.path.basename(remote))
|
||||
os.remove(target) # avoid traceback after interrupted download
|
||||
os.link(local, target)
|
||||
continue
|
||||
|
||||
# Disable cache otherwise things won't download
|
||||
|
@ -40,7 +40,19 @@ class Pungi:
|
||||
os.makedirs(self.workdir)
|
||||
|
||||
self.common_files = []
|
||||
self.infofile = os.path.join(self.config.get('default','destdir'),
|
||||
'.composeinfo')
|
||||
|
||||
def writeinfo(self,line):
|
||||
'''Append a line to the infofile in self.infofile'''
|
||||
f=open(self.infofile,"a+")
|
||||
f.write(line.strip()+"\n")
|
||||
f.close()
|
||||
|
||||
def relativize(self,dir,subfile):
|
||||
'''Get the relative path for subfile underneath dir.'''
|
||||
if subfile.startswith(dir):
|
||||
return subfile.replace(dir+os.path.sep,'')
|
||||
|
||||
def doBuildinstall(self):
|
||||
# buildinstall looks for a comps file in base/ for now, copy it into place
|
||||
@ -55,6 +67,7 @@ class Pungi:
|
||||
self.config.get('default', 'version')), self.config.get('default', 'product_path'),
|
||||
bugurl, self.topdir)
|
||||
os.system('/usr/lib/anaconda-runtime/buildinstall %s' % args)
|
||||
self.writeinfo('tree: %s' % relativize(self.destdir,self.topdir))
|
||||
|
||||
def doPackageorder(self):
|
||||
os.system('/usr/lib/anaconda-runtime/pkgorder %s %s %s > %s' % (self.topdir, self.config.get('default', 'arch'),
|
||||
@ -171,6 +184,7 @@ class Pungi:
|
||||
ia64bootargs = '-b images/boot.img -no-emul-boot'
|
||||
ppcbootargs = '-part -hfs -r -l -sysid PPC -map %s -magic %s -no-desktop -allow-multidot -chrp-boot -hfs-bless' % (os.path.join(anaruntime, 'mapping'), os.path.join(anaruntime, 'magic'))
|
||||
os.makedirs(self.isodir)
|
||||
isolist=[]
|
||||
for disc in range(1, self.config.getint('default', 'discs') + 1): # cycle through the CD isos
|
||||
volname = '"%s %s %s Disc %s"' % (self.config.get('default', 'product_name'), self.config.get('default', 'version'),
|
||||
self.config.get('default', 'arch'), disc) # hacky :/
|
||||
@ -186,18 +200,23 @@ class Pungi:
|
||||
else:
|
||||
bootargs = '' # clear out any existing bootargs
|
||||
|
||||
os.system('mkisofs %s %s %s -o %s/%s %s' % (mkisofsargs,
|
||||
isofile=os.path.join(self.isodir, isoname)
|
||||
os.system('mkisofs %s %s %s -o %s %s' % (mkisofsargs,
|
||||
volname,
|
||||
bootargs,
|
||||
self.isodir,
|
||||
isoname,
|
||||
isofile,
|
||||
os.path.join('%s-disc%s' % (self.topdir, disc))))
|
||||
# implant md5 for mediacheck on all but source arches
|
||||
if not self.config.get('default', 'arch') == 'source':
|
||||
os.system('/usr/lib/anaconda-runtime/implantisomd5 %s' % os.path.join(self.isodir, isoname))
|
||||
os.system('/usr/lib/anaconda-runtime/implantisomd5 %s' % isofile)
|
||||
# shove the sha1sum into a file
|
||||
os.system('cd %s; sha1sum %s >> SHA1SUM' % (self.isodir, isoname))
|
||||
# keep track of the CD images we've written
|
||||
isolist.append(relativize(self.destdir,isofile))
|
||||
# Write out a line describing the CD set
|
||||
self.writeinfo('cdset=%s' % ' '.join(isolist))
|
||||
|
||||
isolist=[]
|
||||
# We've asked for more than one disc, and we're not srpms, so make a DVD image
|
||||
if self.config.getint('default', 'discs') > 1 and not self.config.get('default', 'arch') == 'source':
|
||||
# backup the main .discinfo to use a split one. This is an ugly hack :/
|
||||
@ -226,20 +245,25 @@ class Pungi:
|
||||
else:
|
||||
bootargs = '' # clear out any existing bootargs
|
||||
|
||||
isofile=os.path.join(self.isodir, isoname)
|
||||
os.system('mkisofs %s %s %s -o %s/%s %s' % (mkisofsargs,
|
||||
volname,
|
||||
bootargs,
|
||||
self.isodir,
|
||||
isoname,
|
||||
isofile,
|
||||
self.topdir))
|
||||
os.system('cd %s; sha1sum %s >> SHA1SUM' % (self.isodir, isoname))
|
||||
os.system('/usr/lib/anaconda-runtime/implantisomd5 %s' % os.path.join(self.isodir, isoname))
|
||||
os.system('/usr/lib/anaconda-runtime/implantisomd5 %s' % isofile)
|
||||
|
||||
shutil.move(os.path.join(self.config.get('default', 'destdir'), '.discinfo-%s' % self.config.get('default', 'arch')), discinfofile)
|
||||
|
||||
shutil.rmtree(os.path.join(self.topdir, 'repodata')) # remove our copied repodata
|
||||
shutil.move(os.path.join(self.config.get('default', 'destdir'),
|
||||
'repodata-%s' % self.config.get('default', 'arch')), os.path.join(self.topdir, 'repodata'))
|
||||
# keep track of the DVD images we've written
|
||||
isolist.append(relativize(self.destdir,isofile))
|
||||
|
||||
# Write out a line describing the DVD set
|
||||
self.writeinfo('dvdset=%s' % ' '.join(isolist))
|
||||
|
||||
# Now make rescue images
|
||||
if not self.config.get('default', 'arch') == 'source':
|
||||
|
Loading…
Reference in New Issue
Block a user