Diff
3 commits, 5 files changed
+47 -33

file modified
+6 -1
@@ -1,7 +1,7 @@

  %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

  

  Name:           pungi

- Version:        3.13

+ Version:        3.14

  Release:        1%{?dist}

  Summary:        Distribution compose tool

  
@@ -56,6 +56,11 @@

  /var/cache/pungi

  

  %changelog

+ * Tue Mar 10 2015 Dennis Gilmore <dennis@ausil.us> - 3.14-1

+ - switch to BSD style hashes for the iso checksums (dennis)

+ - refactor to get better data into .treeinfo (dennis)

+ - Add --nomacboot option (csieh)

+ 

  * Fri Dec 12 2014 Dennis Gilmore <dennis@ausil.us> - 3.13-1

  - Add support for --installpkgs (bcl)

  - Add a cmdline option to set the lorax config file (bcl)

file modified
+1 -1
@@ -2,7 +2,7 @@

  import glob

  

  setup(name='pungi',

-       version='3.13', # make sure src/bin/pungi.py is updated to match

+       version='3.14', # make sure src/bin/pungi.py is updated to match

        description='Distribution compose tool',

        author='Dennis Gilmore',

        author_email='dgilmore@fedoraproject.org',

file modified
+20 -11
@@ -185,7 +185,7 @@

          # we already have all the content gathered

          mypungi.topdir = os.path.join(config.get('pungi', 'destdir'),

                                        config.get('pungi', 'version'),

-                                       config.get('pungi', 'flavor'),

+                                       config.get('pungi', 'variant'),

                                        'source', 'SRPMS')

          mypungi.doCreaterepo(comps=False)

          if opts.do_all or opts.do_createiso:
@@ -201,24 +201,27 @@

      today = time.strftime('%Y%m%d', time.localtime())

  

      def get_arguments(config):

-         parser = OptionParser("%prog [--help] [options]", version="%prog 3.13")

+         parser = OptionParser("%prog [--help] [options]", version="%prog 3.14")

  

          def set_config(option, opt_str, value, parser, config):

              config.set('pungi', option.dest, value)

-             # When setting name, also set the iso_basename.

-             if option.dest == 'name':

-                 config.set('pungi', 'iso_basename', value)

  

          # Pulled in from config file to be cli options as part of pykickstart conversion

-         parser.add_option("--name", dest="name", type="string",

+         parser.add_option("--name", dest="family", type="string",

            action="callback", callback=set_config, callback_args=(config, ),

-           help='the name for your distribution (defaults to "Fedora")')

+           help='the name for your distribution (defaults to "Fedora"), DEPRECATED')

+         parser.add_option("--family", dest="family", type="string",

+           action="callback", callback=set_config, callback_args=(config, ),

+           help='the family name for your distribution (defaults to "Fedora")')

          parser.add_option("--ver", dest="version", type="string",

            action="callback", callback=set_config, callback_args=(config, ),

            help='the version of your distribution (defaults to datestamp)')

-         parser.add_option("--flavor", dest="flavor", type="string",

+         parser.add_option("--flavor", dest="variant", type="string",

+           action="callback", callback=set_config, callback_args=(config, ),

+           help='the flavor of your distribution spin (optional), DEPRECATED')

+         parser.add_option("--variant", dest="variant", type="string",

            action="callback", callback=set_config, callback_args=(config, ),

-           help='the flavor of your distribution spin (optional)')

+           help='the variant of your distribution spin (optional)')

          parser.add_option("--destdir", dest="destdir", type="string",

            action="callback", callback=set_config, callback_args=(config, ),

            help='destination directory (defaults to current directory)')
@@ -299,8 +302,8 @@

          if not opts.config:

              parser.error("Please specify a config file")

  

-         if not config.get('pungi', 'flavor').isalnum() and not config.get('pungi', 'flavor') == '':

-             parser.error("Flavor must be alphanumeric")

+         if not config.get('pungi', 'variant').isalnum() and not config.get('pungi', 'variant') == '':

+             parser.error("Variant must be alphanumeric")

  

          if opts.do_gather or opts.do_createrepo or opts.do_buildinstall or opts.do_createiso:

              opts.do_all = False
@@ -308,6 +311,12 @@

          if opts.arch and (opts.do_all or opts.do_buildinstall):

              parser.error("Cannot override arch while the BuildInstall stage is enabled")

  

+         # set the iso_basename.

+         if not config.get('pungi', 'variant') == '':

+             config.set('pungi', 'iso_basename', '%s-%s' % (config.get('pungi', 'family'), config.get('pungi', 'variant')))

+         else:

+             config.set('pungi', 'iso_basename', config.get('pungi', 'family'))

+ 

          return (opts, args)

  

      main()

file modified
+16 -16
@@ -125,7 +125,7 @@

  

          self.doLoggerSetup()

          self.workdir = os.path.join(self.config.get('pungi', 'workdirbase'),

-                                     self.config.get('pungi', 'flavor'),

+                                     self.config.get('pungi', 'variant'),

                                      self.tree_arch)

  

  
@@ -137,8 +137,8 @@

  

          pypungi.util._ensuredir(logdir, None, force=True) # Always allow logs to be written out

  

-         if self.config.get('pungi', 'flavor'):

-             logfile = os.path.join(logdir, '%s.%s.log' % (self.config.get('pungi', 'flavor'),

+         if self.config.get('pungi', 'variant'):

+             logfile = os.path.join(logdir, '%s.%s.log' % (self.config.get('pungi', 'variant'),

                                                            self.tree_arch))

          else:

              logfile = os.path.join(logdir, '%s.log' % (self.tree_arch))
@@ -169,8 +169,8 @@

          logdir = os.path.join(self.pungiconfig.get('pungi', 'destdir'), 'logs')

          if not os.path.exists(logdir):

              os.makedirs(logdir)

-         if self.pungiconfig.get('pungi', 'flavor'):

-             logfile = os.path.join(logdir, '%s.%s.log' % (self.pungiconfig.get('pungi', 'flavor'),

+         if self.pungiconfig.get('pungi', 'variant'):

+             logfile = os.path.join(logdir, '%s.%s.log' % (self.pungiconfig.get('pungi', 'variant'),

                                                            self.pungiconfig.get('pungi', 'arch')))

          else:

              logfile = os.path.join(logdir, '%s.log' % (self.pungiconfig.get('pungi', 'arch')))
@@ -216,7 +216,7 @@

          self.destdir = self.config.get('pungi', 'destdir')

          self.archdir = os.path.join(self.destdir,

                                     self.config.get('pungi', 'version'),

-                                    self.config.get('pungi', 'flavor'),

+                                    self.config.get('pungi', 'variant'),

                                     self.tree_arch)

  

          self.topdir = os.path.join(self.archdir, 'os')
@@ -1068,7 +1068,7 @@

  

          pkgdir = os.path.join(self.config.get('pungi', 'destdir'),

                                self.config.get('pungi', 'version'),

-                               self.config.get('pungi', 'flavor'),

+                               self.config.get('pungi', 'variant'),

                                relpkgdir)

  

          # Ensure the pkgdir exists, force if requested, and make sure we clean it out
@@ -1122,7 +1122,7 @@

      def makeCompsFile(self):

          """Gather any comps files we can from repos and merge them into one."""

  

-         ourcompspath = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('pungi', 'name'), self.config.get('pungi', 'version')))

+         ourcompspath = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('pungi', 'family'), self.config.get('pungi', 'version')))

  

          # Filter out things we don't include

          ourgroups = []
@@ -1314,7 +1314,7 @@

  

          compsfile = None

          if comps:

-             compsfile = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('pungi', 'name'), self.config.get('pungi', 'version')))

+             compsfile = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('pungi', 'family'), self.config.get('pungi', 'version')))

          

          # setup the cache dirs

          for target in ['createrepocache', 'repoviewcache']:
@@ -1323,7 +1323,7 @@

                                 self.logger, 

                                 force=True)

              

-         repoviewtitle = '%s %s - %s' % (self.config.get('pungi', 'name'), 

+         repoviewtitle = '%s %s - %s' % (self.config.get('pungi', 'family'),

                                          self.config.get('pungi', 'version'),

                                          self.tree_arch)

  
@@ -1353,7 +1353,7 @@

                          'Alpha': 'A',

                          'Beta': 'B',

                          'TC': 'T'}

-         name = self.config.get('pungi', 'name')

+         name = self.config.get('pungi', 'family')

          version = self.config.get('pungi', 'version')

          arch = self.tree_arch

  
@@ -1379,11 +1379,11 @@

                             'file://%s' % self.topdir,

                             cost=10)

  

-         product = self.config.get('pungi', 'name')

+         product = self.config.get('pungi', 'family')

          version = self.config.get('pungi', 'version')

-         release = '%s %s' % (self.config.get('pungi', 'name'), self.config.get('pungi', 'version'))

+         release = '%s %s' % (self.config.get('pungi', 'family'), self.config.get('pungi', 'version'))

  

-         variant = self.config.get('pungi', 'flavor')

+         variant = self.config.get('pungi', 'variant')

          bugurl = self.config.get('pungi', 'bugurl')

          isfinal = self.config.get('pungi', 'isfinal')

  
@@ -1556,7 +1556,7 @@

          self.logger.info("Generating checksum of %s" % path)

          checksum = pypungi.util._doCheckSum(path, 'sha256', self.logger)

          if checksum:

-             checkfile.write("%s *%s\n" % (checksum.replace('sha256:', ''), os.path.basename(path)))

+             checkfile.write("SHA256 (%s) = %s\n" % (os.path.basename(path), checksum.replace('sha256:', '')))

          else:

              self.logger.error('Failed to generate checksum for %s' % checkfile)

              sys.exit(1)
@@ -1606,7 +1606,7 @@

              treesize = int(subprocess.Popen(mkisofs + ['-print-size', '-quiet', self.topdir], stdout=subprocess.PIPE).communicate()[0])

          else:

              srcdir = os.path.join(self.config.get('pungi', 'destdir'), self.config.get('pungi', 'version'), 

-                                   self.config.get('pungi', 'flavor'), 'source', 'SRPMS')

+                                   self.config.get('pungi', 'variant'), 'source', 'SRPMS')

  

              treesize = int(subprocess.Popen(mkisofs + ['-print-size', '-quiet', srcdir], stdout=subprocess.PIPE).communicate()[0])

          # Size returned is 2KiB clusters or some such.  This translates that to MiB.

file modified
+4 -4
@@ -29,17 +29,17 @@

          self.set('pungi', 'sourcedir', 'source')

          self.set('pungi', 'debugdir', 'debug')

          self.set('pungi', 'isodir', 'iso')

-         self.set('pungi', 'relnotefilere', 'GPL README-BURNING-ISOS-en_US.txt ^RPM-GPG')

+         self.set('pungi', 'relnotefilere', 'LICENSE README-BURNING-ISOS-en_US.txt ^RPM-GPG')

          self.set('pungi', 'relnotedirre', '')

-         self.set('pungi', 'relnotepkgs', 'fedora-release fedora-release-notes')

+         self.set('pungi', 'relnotepkgs', 'fedora-repos fedora-release fedora-release-notes')

          self.set('pungi', 'product_path', 'Packages')

          self.set('pungi', 'cachedir', '/var/cache/pungi')

          self.set('pungi', 'compress_type', 'xz')

          self.set('pungi', 'arch', yum.rpmUtils.arch.getBaseArch())

-         self.set('pungi', 'name', 'Fedora')

+         self.set('pungi', 'family', 'Fedora')

          self.set('pungi', 'iso_basename', 'Fedora')

          self.set('pungi', 'version', time.strftime('%Y%m%d', time.localtime()))

-         self.set('pungi', 'flavor', '')

+         self.set('pungi', 'variant', '')

          self.set('pungi', 'destdir', os.getcwd())

          self.set('pungi', 'workdirbase', "/work")

          self.set('pungi', 'bugurl', 'https://bugzilla.redhat.com')