From: Clark Williams <williams(a)redhat.com>
redhat: remove merge.pl and references to it
get rid of redhat/configs/merge.pl and any references to it
in redhat/kernel.spec.template and redhat/Makefile
Signed-off-by: Clark Williams <williams(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -634,7 +634,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source
dist-configs-check
scripts/mod/mod-sign.sh \
configs/flavors \
configs/generate_all_configs.sh \
- configs/merge.pl \
+ configs/merge.py \
configs/process_configs.sh \
../Makefile.rhelver \
README.rst \
diff --git a/redhat/configs/merge.pl b/redhat/configs/merge.pl
deleted file mode 100755
index blahblah..blahblah 0
--- a/redhat/configs/merge.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-#! /usr/bin/perl
-
-my @args=@ARGV;
-my %configvalues;
-my @configoptions;
-my $configcounter = 0;
-
-# optionally print out the architecture as the first line of our output
-my $arch = $args[2];
-if (defined $arch) {
- print "# $arch\n";
-}
-
-# first, read the override file
-
-open (FILE,"$args[0]") || die "Could not open $args[0]";
-while (<FILE>) {
- my $str = $_;
- my $configname;
-
- if (/\# ([\w]+) is not set/) {
- $configname = $1;
- } elsif (/^\#/) {
- # fall through on comments like 'avoid CONFIG_FOO=y'
- ;
- } elsif (/([\w]+)=/) {
- $configname = $1;
- }
-
- if (defined($configname) && !exists($configvalues{$configname})) {
- $configvalues{$configname} = $str;
- $configoptions[$configcounter] = $configname;
- $configcounter ++;
- }
-};
-
-# now, read and output the entire configfile, except for the overridden
-# parts... for those the new value is printed.
-
-open (FILE2,"$args[1]") || die "Could not open $args[1]";
-while (<FILE2>) {
- my $configname;
-
- if (/\# ([\w]+) is not set/) {
- $configname = $1;
- } elsif (/^\#/) {
- # fall through on comments like 'avoid CONFIG_FOO=y'
- ;
- } elsif (/([\w]+)=/) {
- $configname = $1;
- }
-
- if (defined($configname) && exists($configvalues{$configname})) {
- print "$configvalues{$configname}";
- delete($configvalues{$configname});
- } else {
- print "$_";
- }
-}
-
-# now print the new values from the overridden configfile
-my $counter = 0;
-
-while ($counter < $configcounter) {
- my $configname = $configoptions[$counter];
- if (exists($configvalues{$configname})) {
- print "$configvalues{$configname}";
- }
- $counter++;
-}
-
-1;
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
@@ -850,7 +850,7 @@ Source2002: kvm_stat.logrotate
# Some people enjoy building customized kernels from the dist-git in Fedora and
# use this to override configuration options. One day they may all use the
# source tree, but in the mean time we carry this to support the legacy workflow
-Source3000: merge.pl
+Source3000: merge.py
Source3001: kernel-local
%if %{patchlist_changelog}
Source3002: Patchlist.changelog
@@ -1042,7 +1042,7 @@ This package provides debug information for package kernel-tools.
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p
'.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/gpio-watch(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|.*%%{_bindir}/intel-speed-select(\.debug)?|.*%%{_bindir}/page_owner_sort(\.debug)?|.*%%{_bindir}/slabinfo(\.debug)?|.*%%{_sbindir}/intel_sdsi(\.debug)?|XXX'
-o kernel-tools-debuginfo.list}
%package -n rtla
-Summary: RTLA: Real-Time Linux Analysis tools
+Summary: RTLA: Real-Time Linux Analysis tools
%description -n rtla
The rtla tool is a meta-tool that includes a set of commands that
aims to analyze the real-time properties of Linux. But, instead of
@@ -1512,7 +1512,7 @@ cd configs
# Drop some necessary files from the source dir into the buildroot
cp $RPM_SOURCE_DIR/kernel-*.config .
cp %{SOURCE80} .
-# merge.pl
+# merge.py
cp %{SOURCE3000} .
# kernel-local
cp %{SOURCE3001} .
@@ -1523,12 +1523,12 @@ FLAVOR=%{primary_target} SPECVERSION=%{version}
./generate_all_configs.sh %{debu
for i in %{all_arch_configs}
do
mv $i $i.tmp
- ./merge.pl %{SOURCE3001} $i.tmp > $i
+ ./merge.py %{SOURCE3001} $i.tmp > $i
%if %{with_gcov}
echo "Merging with gcov options"
cat %{SOURCE75}
mv $i $i.tmp
- ./merge.pl %{SOURCE75} $i.tmp > $i
+ ./merge.py %{SOURCE75} $i.tmp > $i
%endif
rm $i.tmp
done
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2262