[OS-BUILD PATCH] [redhat] kabi: rename legacy terminology

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

 



From: Čestmír Kalina <ckalina@xxxxxxxxxx>

[redhat] kabi: rename legacy terminology

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1953486
Upstream Status: RHEL only

As part of Red Hat’s commitment to remove problematic language from
our code, documentation, websites, and open source projects that we
are involved with, this patch renames kABI whitelist to stablelist.

Signed-off-by: Čestmír Kalina <ckalina@xxxxxxxxxx>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -66,7 +66,7 @@ dist-kabi: dist-python-check
 		for i in {0..$(RHEL_MINOR)}; do \
 			mkdir -p $(REDHAT)/kabi/kabi-rhel$(RHEL_MAJOR)$$i/;\
 			$(REDHAT)/kabi/show-kabi -k $(REDHAT)/kabi/kabi-module/ -s -a $$KABIARCH \
-			-r $(RHEL_MAJOR).$$i > $(REDHAT)/kabi/kabi-rhel$(RHEL_MAJOR)$$i/kabi_whitelist_$$KABIARCH;\
+			-r $(RHEL_MAJOR).$$i > $(REDHAT)/kabi/kabi-rhel$(RHEL_MAJOR)$$i/kabi_stablelist_$$KABIARCH;\
 		done;\
 	done;
 	@(cd $(REDHAT)/kabi/ && ln -Tsf kabi-rhel$(RHEL_MAJOR)$(RHEL_MINOR) kabi-current)
@@ -101,7 +101,7 @@ dist-kabi-dw-base: dist-kabi
 	@echo "Generating baseline dataset for KABI DWARF-based comparison..."
 	@echo "**** GENERATING DWARF-based kABI baseline dataset ****"
 	@$(KABIDW)/run_kabi-dw.sh generate \
-		$(REDHAT)/kabi/kabi-current/kabi_whitelist_$(CURARCH) \
+		$(REDHAT)/kabi/kabi-current/kabi_stablelist_$(CURARCH) \
 		$(_OUTPUT) $(KABIDW)/base/$(CURARCH)/
 
 dist-kabi-dw-check: dist-kabi
@@ -113,7 +113,7 @@ dist-kabi-dw-check: dist-kabi
 	fi
 	@echo "**** GENERATING DWARF-based kABI dataset ****"
 	@$(KABIDW)/run_kabi-dw.sh generate \
-		$(REDHAT)/kabi/kabi-current/kabi_whitelist_$(CURARCH) \
+		$(REDHAT)/kabi/kabi-current/kabi_stablelist_$(CURARCH) \
 		$(_OUTPUT) $(KABIDW)/base/$(CURARCH).tmp/
 	@echo "**** KABI DWARF-based comparison report ****"
 	@$(KABIDW)/run_kabi-dw.sh compare \
@@ -525,15 +525,15 @@ dist-full-help:
 
 	@echo  ''
 	@echo  'kABI targets:'
-	@echo  '  dist-kabi           - Create kABI whitelist files in redhat/kabi/kabi-rhel*/'
+	@echo  '  dist-kabi           - Create kABI stablelist files in redhat/kabi/kabi-rhel*/'
 	@echo  '                        and merge kABI checksums into redhat/kabi/Module.kabi_*.'
 	@echo  '  dist-kabi-dup       - Merge kABI checksums for Driver Update Program (DUP)'
 	@echo  '                        into redhat/kabi/Module.kabi_dup_*.'
-	@echo  '  dist-check-kabi     - Check for changes in kABI whitelisted symbols.'
+	@echo  '  dist-check-kabi     - Check for changes in kABI stablelisted symbols.'
 	@echo  '                        Requires a pre-compiled tree: run `make dist-configs`,'
 	@echo  '                        copy the relevant config file from redhat/configs/ to'
 	@echo  '                       .config, and run `make`.'
-	@echo  '  dist-check-kabi-dup - Like dist-check-kabi but uses a DUP kABI whitelist.'
+	@echo  '  dist-check-kabi-dup - Like dist-check-kabi but uses a DUP kABI stablelist.'
 	@echo  '  dist-kabi-dw-base   - Generate the base dataset for kABI DWARF-based check.'
 	@echo  '  dist-kabi-dw-check  - Run DWARF-based kABI comparison of current binaries'
 	@echo  '                        with the base dataset.'
diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index blahblah..blahblah 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -140,7 +140,7 @@ endif
 TARFILE:=linux-$(TARFILE_RELEASE).tar.xz
 TARBALL:=$(REDHAT)/$(TARFILE)
 DISTRO_BUILD:=$(PREBUILD)$(shell echo $(BUILD) | sed -e 's|\(^[0-9]\{1,4\}\)\..*|\1|')
-KABI_TARFILE:=kernel-abi-whitelists-$(KVERSION)-$(DISTRO_BUILD).tar.bz2
+KABI_TARFILE:=kernel-abi-stablelists-$(KVERSION)-$(DISTRO_BUILD).tar.bz2
 KABI_TARBALL:=$(REDHAT)/rpm/SOURCES/$(KABI_TARFILE)
 KABIDW_TARFILE:=kernel-kabi-dw-$(KVERSION)-$(DISTRO_BUILD).tar.bz2
 KABIDW_TARBALL:=$(REDHAT)/rpm/SOURCES/$(KABIDW_TARFILE)
diff --git a/redhat/kabi-dwarf/run_kabi-dw.sh b/redhat/kabi-dwarf/run_kabi-dw.sh
index blahblah..blahblah 100644
--- a/redhat/kabi-dwarf/run_kabi-dw.sh
+++ b/redhat/kabi-dwarf/run_kabi-dw.sh
@@ -19,7 +19,7 @@
 # same options from both the Makefile and kernel.spec file.
 #
 # Usage:
-# 	./run_kabi-dw.sh generate whitelist module_dir kabi_dir
+# 	./run_kabi-dw.sh generate stablelist module_dir kabi_dir
 # 	./run_kabi-dw.sh compare kabi_dir1 kabi_dir2
 # shellcheck disable=SC2164
 
@@ -31,7 +31,7 @@ KABIDW=kabi-dw
 
 usage() {
 	echo "Usage:"
-	echo "	$PROG generate whitelist module_dir kabi_dir"
+	echo "	$PROG generate stablelist module_dir kabi_dir"
 	echo "	$PROG compare kabi_dir1 kabi_dir2"
 	exit 1
 }
diff --git a/redhat/kabi/make-kabi b/redhat/kabi/make-kabi
index blahblah..blahblah 100755
--- a/redhat/kabi/make-kabi
+++ b/redhat/kabi/make-kabi
@@ -49,20 +49,20 @@ def load_symvers(symvers, filename):
         symvers[symbol] = in_line[0:-1]
 
 
-def load_whitelist(whitelist, order, filename):
+def load_stablelist(stablelist, order, filename):
     if os.path.isfile(filename):
-        load_whitelist_file(whitelist, order, filename)
+        load_stablelist_file(stablelist, order, filename)
     else:
-        load_whitelist_dir(whitelist, order, filename)
+        load_stablelist_dir(stablelist, order, filename)
 
 
-def load_whitelist_file(whitelist, order, filename):
-    """Load a reference whitelist file."""
+def load_stablelist_file(stablelist, order, filename):
+    """Load a reference stablelist file."""
 
-    whitelist_file = open(filename, "r")
+    stablelist_file = open(filename, "r")
 
     while true:
-        in_line = whitelist_file.readline()
+        in_line = stablelist_file.readline()
         if in_line == "":
             break
         if in_line == "\n":
@@ -72,14 +72,14 @@ def load_whitelist_file(whitelist, order, filename):
             continue
         symbol = in_line[1:-1]
 
-        whitelist[symbol] = []
+        stablelist[symbol] = []
         order.append(symbol)
 
     order.sort()
 
 
-def load_whitelist_dir(whitelist, order, dirname):
-    """Load a reference whitelist directory."""
+def load_stablelist_dir(stablelist, order, dirname):
+    """Load a reference stablelist directory."""
 
     for symbol in os.listdir(dirname):
         kabi_file = open(dirname + "/" + symbol, "r")
@@ -92,14 +92,14 @@ def load_whitelist_dir(whitelist, order, dirname):
         if re.match("#[0-9]+-[0-9]+", line[0]):
             print("Symbol {} is currently removed, ignoring".format(symbol))
             continue
-        whitelist[symbol] = line
+        stablelist[symbol] = line
         order.append(symbol)
 
     order.sort()
 
 
 def make_kabi_file(filename, symvers, order):
-    """Munge together whitelist and Module.symvers file."""
+    """Munge together stablelist and Module.symvers file."""
 
     if os.path.isfile(filename):
         print("{} already exists".format(filename))
@@ -114,16 +114,16 @@ def make_kabi_file(filename, symvers, order):
     kabi_file.close()
 
 
-def make_kabi_dir(dirname, symvers, whitelist):
-    """Munge together whitelist and Module.symvers file."""
+def make_kabi_dir(dirname, symvers, stablelist):
+    """Munge together stablelist and Module.symvers file."""
 
     current_dir = os.getcwd()
     os.chdir(dirname)
 
-    for symbol in whitelist:
+    for symbol in stablelist:
         if symbol in symvers:
             kabi_file = open(symbol, "w")
-            kabi_file.write(whitelist[symbol][0])
+            kabi_file.write(stablelist[symbol][0])
             kabi_file.write(symvers[symbol] + "\n")
             kabi_file.close()
 
@@ -132,9 +132,9 @@ def make_kabi_dir(dirname, symvers, whitelist):
 
 def usage():
     print("""make-kabi: process Module.symvers into reference Module.kabi output file/directory using
-           the kabi whitelist provided as a set of symbols to filer on.
+           the kabi stablelist provided as a set of symbols to filer on.
 
-    make-kabi [ -k Module.kabi or -d (kabi-module dir) ] [ -s Module.symvers ] [ -w kabi_whitelist ]
+    make-kabi [ -k Module.kabi or -d (kabi-module dir) ] [ -s Module.symvers ] [ -w kabi_stablelist ]
 
     examples:
         add checksums to files into kabi-module/kabi_x86_64/
@@ -146,7 +146,7 @@ def usage():
 
 if __name__ == "__main__":
 
-    whitelist_source = ""
+    stablelist_source = ""
     symvers_file = ""
     kabi_output = ""
     kabi_file = true
@@ -165,19 +165,19 @@ if __name__ == "__main__":
         if o == "-d":
             kabi_file = false
         if o == "-w":
-            whitelist_source = v
+            stablelist_source = v
 
-    if (whitelist_source == "") or (symvers_file == "") or (kabi_output == "" and kabi_file):
+    if (stablelist_source == "") or (symvers_file == "") or (kabi_output == "" and kabi_file):
         usage()
         sys.exit(1)
 
     symvers = {}
-    whitelist = {}
-    whitelist_order = []
+    stablelist = {}
+    stablelist_order = []
 
     load_symvers(symvers, symvers_file)
-    load_whitelist(whitelist, whitelist_order, whitelist_source)
+    load_stablelist(stablelist, stablelist_order, stablelist_source)
     if kabi_file:
-        make_kabi_file(kabi_output, symvers, whitelist_order)
+        make_kabi_file(kabi_output, symvers, stablelist_order)
     else:
-        make_kabi_dir(whitelist_source, symvers, whitelist)
+        make_kabi_dir(stablelist_source, symvers, stablelist)
diff --git a/redhat/kabi/show-kabi b/redhat/kabi/show-kabi
index blahblah..blahblah 100755
--- a/redhat/kabi/show-kabi
+++ b/redhat/kabi/show-kabi
@@ -26,7 +26,7 @@ import sys
 
 
 def load_kabi(dirname, kabi, order, arch):
-    """Load a reference whitelist content."""
+    """Load a reference stablelist content."""
 
     try:
         archlist = []
@@ -88,8 +88,8 @@ def show_kabi(kabi, order, release, fmt, show_head):
     else:
         rhel_minor = int(rhel_minor)
     for current_arch in kabi:
-        if show_head and (fmt == "whitelist"):
-            print("[rhel8_{}_whitelist]".format(current_arch))
+        if show_head and (fmt == "stablelist"):
+            print("[rhel9_{}_stablelist]".format(current_arch))
         for sym in order[current_arch]:
             if kabi[current_arch][sym][0][0] != "#":
                 print("Invalid metadata format: {}".format(kabi[current_arch][sym][0]))
@@ -107,7 +107,7 @@ def show_kabi(kabi, order, release, fmt, show_head):
             # format Module.kabi_$arch styled file
             if fmt == "module":
                 print(kabi[current_arch][sym][1])
-            # format kabi_whitelist_$arch styled file
+            # format kabi_stablelist_$arch styled file
             else:
                 print("\t{}".format(sym))
 
@@ -117,9 +117,9 @@ def usage():
     -a arch        architecture, ( default all archs )
     -k dir        kabi-module root directory ( default ./kabi-module )
     -m        output Module.kabi_$(arch) styled file
-            default output kabi_whitelist_$(arch) styled file
+            default output kabi_stablelist_$(arch) styled file
     -r release    release, for example 8.1 ( default latest )
-    -s        show header ( no headers like [rhel8_x86_64_whitelist] )
+    -s        show header ( no headers like [rhel9_x86_64_stablelist] )
     -h         this help""")
 
 
@@ -131,7 +131,7 @@ if __name__ == "__main__":
     kabi_dir = "kabi-module"
     release = ""
     kabi_head = False
-    kabi_out = "whitelist"
+    kabi_out = "stablelist"
 
     opts, args = getopt.getopt(sys.argv[1:], 'a:k:mr:sh')
 
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -156,8 +156,8 @@ Summary: The Linux kernel
 %define with_bpftool   %{?_without_bpftool:   0} %{?!_without_bpftool:   1}
 # kernel-debuginfo
 %define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1}
-# kernel-abi-whitelists
-%define with_kernel_abi_whitelists %{?_without_kernel_abi_whitelists: 0} %{?!_without_kernel_abi_whitelists: 1}
+# kernel-abi-stablelists
+%define with_kernel_abi_stablelists %{?_without_kernel_abi_stablelists: 0} %{?!_without_kernel_abi_stablelists: 1}
 # internal samples and selftests
 %define with_selftests %{?_without_selftests: 0} %{?!_without_selftests: 1}
 #
@@ -217,8 +217,8 @@ Summary: The Linux kernel
 %define with_cross_headers 0
 # no ipa_clone for now
 %define with_ipaclones 0
-# no whitelist
-%define with_kernel_abi_whitelists 0
+# no stablelist
+%define with_kernel_abi_stablelists 0
 # Fedora builds these separately
 %define with_perf 0
 %define with_tools 0
@@ -246,7 +246,7 @@ Summary: The Linux kernel
 %define with_kabidupchk 0
 %define with_kabidwchk 0
 %define with_kabidw_base 0
-%define with_kernel_abi_whitelists 0
+%define with_kernel_abi_stablelists 0
 %endif
 
 # turn off kABI DWARF-based check if we're generating the base dataset
@@ -305,7 +305,7 @@ Summary: The Linux kernel
 %define with_perf 0
 %define with_tools 0
 %define with_bpftool 0
-%define with_kernel_abi_whitelists 0
+%define with_kernel_abi_stablelists 0
 %define with_selftests 0
 %define with_cross 0
 %define with_cross_headers 0
@@ -325,7 +325,7 @@ Summary: The Linux kernel
 %define with_perf 0
 %define with_tools 0
 %define with_bpftool 0
-%define with_kernel_abi_whitelists 0
+%define with_kernel_abi_stablelists 0
 %define with_selftests 0
 %define with_cross 0
 %define with_cross_headers 0
@@ -348,7 +348,7 @@ Summary: The Linux kernel
 %endif
 
 %ifnarch noarch
-%define with_kernel_abi_whitelists 0
+%define with_kernel_abi_stablelists 0
 %endif
 
 # Overrides for generic default options
@@ -788,7 +788,7 @@ Source211: Module.kabi_dup_ppc64le
 Source212: Module.kabi_dup_s390x
 Source213: Module.kabi_dup_x86_64
 
-Source300: kernel-abi-whitelists-%{rpmversion}-%{distro_build}.tar.bz2
+Source300: kernel-abi-stablelists-%{rpmversion}-%{distro_build}.tar.bz2
 Source301: kernel-kabi-dw-%{rpmversion}-%{distro_build}.tar.bz2
 
 # Sources for kernel-tools
@@ -1034,10 +1034,10 @@ Summary: gcov graph and source files for coverage data collection.
 kernel-gcov includes the gcov graph and source files for gcov coverage collection.
 %endif
 
-%package -n kernel-abi-whitelists
-Summary: The Red Hat Enterprise Linux kernel ABI symbol whitelists
+%package -n kernel-abi-stablelists
+Summary: The Red Hat Enterprise Linux kernel ABI symbol stablelists
 AutoReqProv: no
-%description -n kernel-abi-whitelists
+%description -n kernel-abi-stablelists
 The kABI package contains information pertaining to the Red Hat Enterprise
 Linux kernel ABI, including lists of kernel symbols that are needed by
 external Linux kernel modules, and a yum plugin to aid enforcement.
@@ -1734,13 +1734,13 @@ BuildKernel() {
         mkdir -p $RPM_BUILD_ROOT/kabi-dwarf
         tar xjvf %{SOURCE301} -C $RPM_BUILD_ROOT/kabi-dwarf
 
-        mkdir -p $RPM_BUILD_ROOT/kabi-dwarf/whitelists
-        tar xjvf %{SOURCE300} -C $RPM_BUILD_ROOT/kabi-dwarf/whitelists
+        mkdir -p $RPM_BUILD_ROOT/kabi-dwarf/stablelists
+        tar xjvf %{SOURCE300} -C $RPM_BUILD_ROOT/kabi-dwarf/stablelists
 
         echo "**** GENERATING DWARF-based kABI baseline dataset ****"
         chmod 0755 $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh
         $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh generate \
-            "$RPM_BUILD_ROOT/kabi-dwarf/whitelists/kabi-current/kabi_whitelist_%{_target_cpu}" \
+            "$RPM_BUILD_ROOT/kabi-dwarf/stablelists/kabi-current/kabi_stablelist_%{_target_cpu}" \
             "$(pwd)" \
             "$RPM_BUILD_ROOT/kabidw-base/%{_target_cpu}${Variant:+.${Variant}}" || :
 
@@ -1753,13 +1753,13 @@ BuildKernel() {
         mkdir -p $RPM_BUILD_ROOT/kabi-dwarf
         tar xjvf %{SOURCE301} -C $RPM_BUILD_ROOT/kabi-dwarf
         if [ -d "$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Variant:+.${Variant}}" ]; then
-            mkdir -p $RPM_BUILD_ROOT/kabi-dwarf/whitelists
-            tar xjvf %{SOURCE300} -C $RPM_BUILD_ROOT/kabi-dwarf/whitelists
+            mkdir -p $RPM_BUILD_ROOT/kabi-dwarf/stablelists
+            tar xjvf %{SOURCE300} -C $RPM_BUILD_ROOT/kabi-dwarf/stablelists
 
             echo "**** GENERATING DWARF-based kABI dataset ****"
             chmod 0755 $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh
             $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh generate \
-                "$RPM_BUILD_ROOT/kabi-dwarf/whitelists/kabi-current/kabi_whitelist_%{_target_cpu}" \
+                "$RPM_BUILD_ROOT/kabi-dwarf/stablelists/kabi-current/kabi_stablelist_%{_target_cpu}" \
                 "$(pwd)" \
                 "$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Variant:+.${Variant}}.tmp" || :
 
@@ -2370,14 +2370,14 @@ done
 rm -rf $RPM_BUILD_ROOT/usr/tmp-headers
 %endif
 
-%if %{with_kernel_abi_whitelists}
+%if %{with_kernel_abi_stablelists}
 # kabi directory
 INSTALL_KABI_PATH=$RPM_BUILD_ROOT/lib/modules/
 mkdir -p $INSTALL_KABI_PATH
 
 # install kabi releases directories
 tar xjvf %{SOURCE300} -C $INSTALL_KABI_PATH
-# with_kernel_abi_whitelists
+# with_kernel_abi_stablelists
 %endif
 
 %if %{with_perf}
@@ -2689,8 +2689,8 @@ fi
 /usr/*-linux-gnu/include/*
 %endif
 
-%if %{with_kernel_abi_whitelists}
-%files -n kernel-abi-whitelists
+%if %{with_kernel_abi_stablelists}
+%files -n kernel-abi-stablelists
 /lib/modules/kabi-*
 %endif
 
diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/rh-dist-git.sh
+++ b/redhat/scripts/rh-dist-git.sh
@@ -6,7 +6,7 @@
 # $3: alternate tmp directory (if you have faster storage)
 # $4: alternate dist-git server
 # $5: kernel source tarball
-# $6: kabi whitelists tarball
+# $6: kabi stablelists tarball
 # $7: dwarf-bases kabi tarball
 # $8: zstream build
 # $9: package name
@@ -63,10 +63,10 @@ echo "Uploading new tarballs"
 sed -i "/linux-.*.tar.xz/d" "$tmpdir/$package_name"/{sources,.gitignore};
 upload_list="$rhdistgit_tarball"
 
-# Only upload kernel-abi-whitelists tarball if its release counter changed.
+# Only upload kernel-abi-stablelists tarball if its release counter changed.
 if [ "$rhdistgit_zstream_flag" == "no" ]; then
 	if ! grep -q "$rhdistgit_kabi_tarball" "$tmpdir/$package_name"/sources; then
-		sed -i "/kernel-abi-whitelists.*.tar.bz2/d" "$tmpdir/$package_name"/{sources,.gitignore};
+		sed -i "/kernel-abi-stablelists.*.tar.bz2/d" "$tmpdir/$package_name"/{sources,.gitignore};
 		upload_list="$upload_list $rhdistgit_kabi_tarball"
 	fi
 	if ! grep -q "$rhdistgit_kabidw_tarball" "$tmpdir/$package_name"/sources; then

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1240
_______________________________________________
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 on the list, report it: https://pagure.io/fedora-infrastructure




[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