[OS-BUILD PATCH 1/3] uki_addons: remove completely sbat/sbat.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Emanuele Giuseppe Esposito <eesposit@xxxxxxxxxx>

uki_addons: remove completely sbat/sbat.conf

sbat/sbat.conf is not really useful, because usually the SBAT
description contains the kernel version.

We will pass it directly as input parameter, so that it comes from the
kernel.spec and contains all info that it has to provide.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@xxxxxxxxxx>

diff --git a/redhat/scripts/uki_addons/uki_create_addons.py b/redhat/scripts/uki_addons/uki_create_addons.py
index blahblah..blahblah 100755
--- a/redhat/scripts/uki_addons/uki_create_addons.py
+++ b/redhat/scripts/uki_addons/uki_create_addons.py
@@ -26,14 +26,6 @@
 # json['virt']['common']['test.addon'] = ['test2'], any other uki except virt
 # will have a test.addon.efi with text "test1", and virt will have a
 # test.addon.efi with "test2"
-#
-# sbat.conf
-#----------
-# This dict is containing the sbat string for *all* addons being created.
-# This dict is optional, but when used has to be put in a sub-dict with
-# { 'sbat' : { 'sbat.conf' : ['your text here'] }}
-# It follows the same syntax as the addon files, meaning '#' is comment and
-# the rest is taken as sbat string and feed to ukify.
 
 import os
 import sys
@@ -62,9 +54,8 @@ def check_clean_arguments(input_json, out_dir):
 UKICmdlineAddon = collections.namedtuple('UKICmdlineAddon', ['name', 'cmdline'])
 uki_addons_list = []
 uki_addons = {}
-addon_sbat_string = None
 
-def parse_lines(lines, rstrip=True):
+def parse_lines(lines):
     cmdline = ''
     for l in lines:
         l = l.lstrip()
@@ -72,27 +63,17 @@ def parse_lines(lines, rstrip=True):
             continue
         if l[0] == '#':
             continue
-        # rstrip is used only for addons cmdline, not sbat.conf, as it replaces
-        # return lines with spaces.
-        if rstrip:
-            l = l.rstrip() + ' '
-        cmdline += l
+        cmdline += l.rstrip() + ' '
     if cmdline == '':
         return ''
     return cmdline
 
 def parse_all_addons(in_obj):
-    global addon_sbat_string
-
     for el in in_obj.keys():
         # addon found: copy it in our global dict uki_addons
         if el.endswith('.addon'):
             uki_addons[el] = in_obj[el]
 
-    if 'sbat' in in_obj and 'sbat.conf' in in_obj['sbat']:
-        # sbat.conf found: override sbat with the most specific one found
-        addon_sbat_string = parse_lines(in_obj['sbat']['sbat.conf'], rstrip=False)
-
 def recursively_find_addons(in_obj, folder_list):
     # end of recursion, leaf directory. Search all addons here
     if len(folder_list) == 0:
@@ -128,8 +109,6 @@ def create_addons(out_dir):
             f'{UKIFY_PATH}', 'build',
             '--cmdline', uki_addon.cmdline,
             '--output', out_path]
-        if addon_sbat_string:
-            cmd.extend(['--sbat', addon_sbat_string.rstrip()])
 
         subprocess.check_call(cmd, text=True)
 
diff --git a/redhat/scripts/uki_addons/uki_create_json.py b/redhat/scripts/uki_addons/uki_create_json.py
index blahblah..blahblah 100755
--- a/redhat/scripts/uki_addons/uki_create_json.py
+++ b/redhat/scripts/uki_addons/uki_create_json.py
@@ -21,7 +21,7 @@
 # The name of the end resulting addon is taken from the folder hierarchy, but this
 # is handled by uki_create_addons.py when building the rpm. This script only
 # prepares the json file to be added in the srpm. For more information about
-# the folder hierarchy, what the 'common' and 'sbat' folder are, look at
+# the folder hierarchy and what the 'common' folder is, look at
 # uki_create_addons.py.
 #
 # The common folder, present in any folder under redhat/uki_addons
@@ -51,7 +51,7 @@ def usage(err):
     sys.exit(1)
 
 def find_addons():
-    cmd = ['/usr/bin/find', 'uki_addons', "(", '-name', '*.addon', '-o', '-name', 'sbat.conf', ")"]
+    cmd = ['/usr/bin/find', 'uki_addons', '-name', '*.addon']
     proc_out = subprocess.run(cmd, check=True, capture_output=True, text=True)
     if proc_out.returncode == 0:
         return proc_out.stdout

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3875

-- 
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux