#38 support fedora's iso label conventions
Closed: Fixed Opened by ausil.

fedora has a naming policy for both isos and volume id's

From de3faecaa181bf77dce7c62737ff0d0edc91b19e Mon Sep 17 00:00:00 2001
From: Dennis Gilmore dennis@ausil.us
Date: Mon, 6 Jul 2015 15:22:26 -0500
Subject: [PATCH] shorten the livecd iso labels to match fedora's naming policy


builder/kojid | 34 +++++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/builder/kojid b/builder/kojid
index c0759a8..5787919 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -2700,6 +2700,36 @@ class LiveCDTask(ImageTask):

     return manifest
  • def _shortenVolID(self, name, version, release):
  • Based on code from pungi

  • substitutions = {
  • 'MATE_Compiz': 'MATE',
  • 'Security': 'Sec',
  • 'Electronic_Lab': 'Elec',
  • 'Robotics': 'Robo',
  • 'Scientific_KDE': 'SciK',
  • 'Design_suite': 'Dsgn',
  • 'Games': 'Game',
  • 'Jam_KDE': 'Jam',
  • 'Workstation': 'WS',
  • 'Server': 'S',
  • 'Cloud': 'C',
  • 'Alpha': 'A',
  • 'Beta': 'B',
  • 'TC': 'T',
  • }
    +
  • for k, v in substitutions.iteritems():
  • if k in name:
  • name = name.replace(k, v)
  • if k in version:
  • version = version.replace(k, v)
  • if k in release:
  • release = release.replace(k, v)
    +
  • volid = "%s-%s-%s" % (name, version, release)
  • return volid[:32]
    +
    def handler(self, name, version, release, arch, target_info, build_tag, repo_info, ksfile, opts=None):
     if opts == None:
    

    @@ -2716,10 +2746,8 @@ class LiveCDTask(ImageTask):
    livecd_log = '/tmp/livecd.log'
    cmd = ['/usr/bin/livecd-creator', '-c', kskoji, '-d', '-v',
    '--logfile', livecd_log, '--cache', cachedir]
    - # we set the fs label to the same as the isoname if it exists,
    - # taking at most 32 characters
    isoname = '%s-%s-%s' % (name, version, release)
    - cmd.extend(['-f', isoname[:32]])
    + cmd.extend(['-f', self._shortenVolID(name, version, release)])

     # Run livecd-creator
     rv = broot.mock(['--cwd', '/tmp', '--chroot', '--'] + cmd)
    

    --
    2.4.3
    is the patch we have in koji for doing livecds

https://fedoraproject.org/wiki/User:Adamwill/Draft_fedora_image_naming_policy is the policy. we need to make sure we are in compliance


The original patch without mangling by Pagure.

Possible implementation in PR 101. The first commit is somewhat unrelated – it only updates tests after recent update to messaging.

All the image naming stuff is in second commit. I'm not sure if the possible customization to image filename and volume id is sufficient and practical, though.

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/pungi/pungi/issues/38

Please continue any further discussion there.

Metadata