[OS-BUILD PATCH] redhat: Really remove cpupower files

2023-11-04 Thread Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava 

redhat: Really remove cpupower files

a13e49d0dd0f ("redhat: Remove cpupower files") removed the need for these
files but they were left in place.

Really remove these dead files.

Signed-off-by: Prarit Bhargava 

diff --git a/redhat/scripts/kernel-tools/cpupower.config 
b/redhat/scripts/kernel-tools/cpupower.config
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/scripts/kernel-tools/cpupower.config
+++ /dev/null
@@ -1,3 +0,0 @@
-# See 'cpupower help' and cpupower(1) for more info
-CPUPOWER_START_OPTS="frequency-set -g performance"
-CPUPOWER_STOP_OPTS="frequency-set -g ondemand"
diff --git a/redhat/scripts/kernel-tools/cpupower.service 
b/redhat/scripts/kernel-tools/cpupower.service
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/scripts/kernel-tools/cpupower.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Configure CPU power related settings
-After=syslog.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-EnvironmentFile=/etc/sysconfig/cpupower
-ExecStart=/usr/bin/cpupower $CPUPOWER_START_OPTS
-ExecStop=/usr/bin/cpupower $CPUPOWER_STOP_OPTS
-
-[Install]
-WantedBy=multi-user.target

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2770
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] redhat: remove update_scripts.sh

2023-11-04 Thread Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava 

redhat: remove update_scripts.sh

Remove update_scripts.sh and incorporate it as a function in the Makefile.

Signed-off-by: Prarit Bhargava 

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -691,7 +691,6 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source 
dist-configs-check
configs/$(SPECPACKAGE_NAME)-*.config \
configs/partial*.config \
scripts/gating/gating.yaml \
-   scripts/update_scripts.sh \
scripts/mod/mod-denylist.sh \
scripts/mod/mod-internal.list \
scripts/mod/mod-partner.list \
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -919,8 +919,6 @@ Source77: partial-clang_lto-aarch64-debug-snip.config
 Source80: generate_all_configs.sh
 Source81: process_configs.sh
 
-Source82: update_scripts.sh
-
 Source84: mod-internal.list
 Source85: mod-partner.list
 
@@ -1859,20 +1857,27 @@ done
 %endif
 RHJOBS=$RPM_BUILD_NCPUS SPECPACKAGE_NAME=%{name} ./process_configs.sh $OPTS 
%{specrpmversion}
 
-cp %{SOURCE82} .
-RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target}
-
 # We may want to override files from the primary target in case of building
 # against a flavour of it (eg. centos not rhel), thus override it here if
 # necessary
+update_scripts() {
+   TARGET="$1"
+
+   for i in "$RPM_SOURCE_DIR"/*."$TARGET"; do
+   NEW=${i%."$TARGET"}
+   cp "$i" "$(basename "$NEW")"
+   done
+}
+
+update_target=%{primary_target}
 if [ "%{primary_target}" == "rhel" ]; then
+: # no-op to avoid empty if-fi error
 %if 0%{?centos}
   echo "Updating scripts/sources to centos version"
-  RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh centos
-%else
-  echo "Not updating scripts/sources to centos version"
+  update_target=centos
 %endif
 fi
+update_scripts $update_target
 
 # end of kernel config
 %endif
diff --git a/redhat/scripts/update_scripts.sh b/redhat/scripts/update_scripts.sh
deleted file mode 100755
index blahblah..blahblah 0
--- a/redhat/scripts/update_scripts.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-if [ -z "$1" ]; then
-   exit 1
-fi
-
-TARGET="$1"
-
-for i in "$RPM_SOURCE_DIR"/*."$TARGET"; do
-   NEW=${i%."$TARGET"}
-   cp "$i" "$(basename "$NEW")"
-done

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2769
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue