diff mbox series

[Noble/Unstable,5/6] UBUNTU: [Packaging] Remove obsolete scripts

Message ID 20231124132836.92441-6-juerg.haefliger@canonical.com
State New
Headers show
Series Remove obsolete packaging bits and pieces | expand

Commit Message

Juerg Haefliger Nov. 24, 2023, 1:28 p.m. UTC
Remove the following old scripts which are no longer used:
  - fw-to-ihex.sh
  - insert-mainline-changes
  - retag
  - sanitize-annotations
  - splitconfig.pl
  - update-aufs.sh

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 debian.master/reconstruct                   |   6 --
 debian/scripts/misc/fw-to-ihex.sh           |  18 ----
 debian/scripts/misc/insert-mainline-changes |  42 --------
 debian/scripts/misc/retag                   |  34 -------
 debian/scripts/misc/sanitize-annotations    |  49 ---------
 debian/scripts/misc/splitconfig.pl          | 107 --------------------
 debian/scripts/misc/update-aufs.sh          |  50 ---------
 7 files changed, 306 deletions(-)
 delete mode 100755 debian/scripts/misc/fw-to-ihex.sh
 delete mode 100755 debian/scripts/misc/insert-mainline-changes
 delete mode 100755 debian/scripts/misc/retag
 delete mode 100755 debian/scripts/misc/sanitize-annotations
 delete mode 100755 debian/scripts/misc/splitconfig.pl
 delete mode 100755 debian/scripts/misc/update-aufs.sh
diff mbox series

Patch

diff --git a/debian.master/reconstruct b/debian.master/reconstruct
index fcb5bd1a70e2..8d1b2770fff8 100644
--- a/debian.master/reconstruct
+++ b/debian.master/reconstruct
@@ -23,18 +23,12 @@  chmod +x 'debian/scripts/link-lib-rust'
 chmod +x 'debian/scripts/misc/annotations'
 chmod +x 'debian/scripts/misc/arch-has-odm-enabled.sh'
 chmod +x 'debian/scripts/misc/find-missing-sauce.sh'
-chmod +x 'debian/scripts/misc/fw-to-ihex.sh'
 chmod +x 'debian/scripts/misc/gen-auto-reconstruct'
 chmod +x 'debian/scripts/misc/getabis'
 chmod +x 'debian/scripts/misc/git-ubuntu-log'
 chmod +x 'debian/scripts/misc/insert-changes'
-chmod +x 'debian/scripts/misc/insert-mainline-changes'
 chmod +x 'debian/scripts/misc/insert-ubuntu-changes'
 chmod +x 'debian/scripts/misc/kernelconfig'
-chmod +x 'debian/scripts/misc/retag'
-chmod +x 'debian/scripts/misc/sanitize-annotations'
-chmod +x 'debian/scripts/misc/splitconfig.pl'
-chmod +x 'debian/scripts/misc/update-aufs.sh'
 chmod +x 'debian/scripts/module-inclusion'
 chmod +x 'debian/scripts/retpoline-extract'
 chmod +x 'debian/scripts/retpoline-extract-one'
diff --git a/debian/scripts/misc/fw-to-ihex.sh b/debian/scripts/misc/fw-to-ihex.sh
deleted file mode 100755
index a63fe67b4f5d..000000000000
--- a/debian/scripts/misc/fw-to-ihex.sh
+++ /dev/null
@@ -1,18 +0,0 @@ 
-#!/bin/bash
-
-F=$1
-if [ "$F" = "" ]
-then
-	echo You must supply a firmware file.
-	exit 1
-fi
-
-echo "unsigned char d[] = {" > $F.c
-hexdump -v -e '"\t" 8/1 "0x%02x, " "\n"' $F >> $F.c
-echo "};" >> $F.c
-sed -i 's/0x .*$//' $F.c
-
-O="`dirname $F`/`basename $F`.o"
-gcc -o $O -c $F.c
-objcopy -Oihex $F.o $F.ihex
-
diff --git a/debian/scripts/misc/insert-mainline-changes b/debian/scripts/misc/insert-mainline-changes
deleted file mode 100755
index 5678b1031e54..000000000000
--- a/debian/scripts/misc/insert-mainline-changes
+++ /dev/null
@@ -1,42 +0,0 @@ 
-#!/usr/bin/perl
-
-if ($#ARGV != 2) {
-	warn "Usage: $0 <changelog> <to> <range>\n";
-	die  "       $0 debian.master/changelog v3.2.3 v3.2.2..v3.2.3\n";
-}
-my ($changelog, $to, $range) = @ARGV;
-
-my @changes = ();
-
-push(@changes, "\n");
-push(@changes, "  [ Upstream Kernel Changes ]\n\n");
-push(@changes, "  * rebase to $to\n");
-
-open(LOG, "git log '$range'|") || die "$0: git log failed: - $!\n";
-while (<LOG>) {
-	if (m@BugLink: .*launchpad.net/.*/([0-9]+)\s$@) {
-		push(@changes, "    - LP: #$1\n");
-	}
-}
-close(LOG);
-
-open(CHANGELOG, "< $changelog") or die "Cannot open changelog";
-open(NEW, "> $changelog.new") or die "Cannot open new changelog";
-
-$printed = 3;
-while (<CHANGELOG>) {
-	if (/^  CHANGELOG: /) {
-		$printed--;
-		print NEW;
-		if ($printed == 0) {
-			print NEW @changes;
-		}
-		next;
-	}
-	print NEW;
-}
-
-close(NEW);
-close(CHANGELOG);
-
-rename("$changelog.new", "$changelog");
diff --git a/debian/scripts/misc/retag b/debian/scripts/misc/retag
deleted file mode 100755
index 94cf169a0769..000000000000
--- a/debian/scripts/misc/retag
+++ /dev/null
@@ -1,34 +0,0 @@ 
-#!/usr/bin/perl -w
-
-open(TAGS, "git tag -l |") or die "Could not get list of tags";
-@tags = <TAGS>;
-close(TAGS);
-
-open(LOGS, "git log --pretty=short |") or die "ERROR: Calling git log";
-my $commit = "";
-
-while (<LOGS>) {
-	my $origtag;
-
-	if (m|^commit (.*)$|) {
-		$commit = $1;
-		next;
-	}
-
-	m|\s*UBUNTU: (Ubuntu-2\.6\..*)| or next;
-
-	$tag = $1;
-
-	($origtag) = grep(/^$tag.orig$/, @tags);
-
-	if (!defined($origtag)) {
-		print "I: Adding original tag for $tag\n";
-		system("git tag -m $tag $tag.orig $tag");
-	}
-
-	print "I: Tagging $tag => $commit\n";
-
-	system("git tag -f -m $tag $tag $commit");
-}
-
-close(LOGS);
diff --git a/debian/scripts/misc/sanitize-annotations b/debian/scripts/misc/sanitize-annotations
deleted file mode 100755
index 2814f00e8fad..000000000000
--- a/debian/scripts/misc/sanitize-annotations
+++ /dev/null
@@ -1,49 +0,0 @@ 
-#!/usr/bin/env python3
-#
-# Try to automatically sanitize an old "annotations" file, dropping all the
-# deprecated flags, arbitrary enforcements rules, etc.
-#
-# Usage:
-#  $ ./sanitize-annotations debian.master/config/annotations
-
-import sys
-import re
-
-
-def remove_flags_and_drop_lines(file_path):
-    # Read the contents of the file
-    with open(file_path, "r", encoding="utf-8") as file:
-        content = file.read()
-
-    # Check if the file has the required headers
-    lines = content.splitlines()
-    if (
-        len(lines) < 2
-        or lines[0].strip() != "# Menu: HEADER"
-        or lines[1].strip() != "# FORMAT: 4"
-    ):
-        print(f"ERROR: {file_path} doesn't have a valid header")
-        print("Fix the headers as explained here: " +
-              "https://docs.google.com/document/d/1NnGC2aknyy2TJWMsoYzhrZMr9rYMA09JQBEvC-LW_Lw/")
-        sys.exit(1)
-
-    # Remove unsupported annotations
-    updated_content = re.sub(r"(flag|mark)<.*?>", "", content)
-
-    # Drop lines with a single word and trailing spaces
-    updated_content = re.sub(r"^\w+\s*$", "", updated_content, flags=re.MULTILINE)
-
-    # Add a space after all caps followed by 'policy'
-    updated_content = re.sub(r"([A-Z]+)(policy)", r"\1 \2", updated_content)
-
-    # Add 'note' if missing
-    updated_content = re.sub(r"(\s+)(<.*?>)", r"\1note\2", updated_content)
-
-    # Write the updated contents back to the file
-    with open(file_path, "w", encoding="utf-8") as file:
-        file.write(updated_content)
-
-
-if __name__ == "__main__":
-    file_path = sys.argv[1]
-    remove_flags_and_drop_lines(file_path)
diff --git a/debian/scripts/misc/splitconfig.pl b/debian/scripts/misc/splitconfig.pl
deleted file mode 100755
index 3270edeb4e01..000000000000
--- a/debian/scripts/misc/splitconfig.pl
+++ /dev/null
@@ -1,107 +0,0 @@ 
-#!/usr/bin/perl -w
-
-%allconfigs = ();
-%common = ();
-
-print "Reading config's ...\n";
-
-for $config (@ARGV) {
-	# Only config.*
-	next if $config !~ /^config\..*/;
-	# Nothing that is disabled, or remnant
-	next if $config =~ /.*\.(default|disabled|stub)$/;
-
-	%{$allconfigs{$config}} = ();
-
-	print "  processing $config ... ";
-
-	open(CONFIG, "< $config");
-
-	while (<CONFIG>) {
-		# Skip comments
-		/^#*\s*CONFIG_(\w+)[\s=](.*)$/ or next;
-
-		${$allconfigs{$config}}{$1} = $2;
-
-		$common{$1} = $2;
-	}
-
-	close(CONFIG);
-
-	print "done.\n";
-}
-
-print "\n";
-
-print "Merging lists ... \n";
-
-# %options - pointer to flavour config inside the allconfigs array
-for $config (keys(%allconfigs)) {
-	my %options = %{$allconfigs{$config}};
-
-	print "   processing $config ... ";
-
-	for $key (keys(%common)) {
-		next if not defined $common{$key};
-
-		# If we don't have the common option, then it isn't
-		# common. If we do have that option, it must have the same
-		# value.  EXCEPT where this file does not have a value at all
-		# which may safely be merged with any other value; the value
-		# will be elided during recombination of the parts.
-		if (!defined($options{$key})) {
-			# Its ok really ... let it merge
-		} elsif (not defined($options{$key})) {
-			undef $common{$key};
-		} elsif ($common{$key} ne $options{$key}) {
-			undef $common{$key};
-		}
-	}
-
-	print "done.\n";
-}
-
-print "\n";
-
-print "Creating common config ... ";
-
-open(COMMON, "> config.common");
-print COMMON "#\n# Common config options automatically generated by splitconfig.pl\n#\n";
-
-for $key (sort(keys(%common))) {
-	if (not defined $common{$key}) {
-		print COMMON "# CONFIG_$key is UNMERGABLE\n";
-	} elsif ($common{$key} eq "is not set") {
-		print COMMON "# CONFIG_$key is not set\n";
-	} else {
-		print COMMON "CONFIG_$key=$common{$key}\n";
-	}
-}
-close(COMMON);
-
-print "done.\n\n";
-
-print "Creating stub configs ...\n";
-
-for $config (keys(%allconfigs)) {
-	my %options = %{$allconfigs{$config}};
-
-	print "  processing $config ... ";
-
-	open(STUB, "> $config");
-	print STUB "#\n# Config options for $config automatically generated by splitconfig.pl\n#\n";
-
-	for $key (sort(keys(%options))) {
-		next if defined $common{$key};
-
-		if ($options{$key} =~ /^is /) {
-			print STUB "# CONFIG_$key $options{$key}\n";
-		} else {
-			print STUB "CONFIG_$key=$options{$key}\n";
-		}
-	}
-
-	close(STUB);
-
-	print "done.\n";
-}
diff --git a/debian/scripts/misc/update-aufs.sh b/debian/scripts/misc/update-aufs.sh
deleted file mode 100755
index 83bbbff8ea69..000000000000
--- a/debian/scripts/misc/update-aufs.sh
+++ /dev/null
@@ -1,50 +0,0 @@ 
-#!/bin/bash
-
-AUFS=aufs4-standalone
-
-#
-# Before you run this be sure you've removed or reverted the 'UBUNTU: SAUCE: AUFS" patch.
-#
-#
-# Make sure the current working directory is at the top of the
-# linux tree.
-#
-if ! grep PATCHLEVEL Makefile
-then
-	echo "You must run this script from the top of the linux tree"
-	exit 1
-fi
-
-clean=0
-if [ "$#" = 1 ]; then
-	AUFS="$1"
-else
-	clean=1
-	rm -rf ${AUFS}
-	git clone https://github.com/sfjro/aufs5-standalone.git ${AUFS}
-	(cd ${AUFS}; git checkout -b aufs5.x-rcN remotes/origin/aufs5.x-rcN)
-fi
-
-cp ${AUFS}/include/uapi/linux/aufs_type.h include/uapi/linux
-rsync -av ${AUFS}/fs/ fs/
-rsync -av ${AUFS}/Documentation/ Documentation/
-
-PATCHES="${PATCHES} aufs5-kbuild.patch"
-PATCHES="${PATCHES} aufs5-base.patch"
-PATCHES="${PATCHES} aufs5-mmap.patch"
-PATCHES="${PATCHES} aufs5-standalone.patch"
-PATCHES="${PATCHES} aufs5-loopback.patch"
-#PATCHES="${PATCHES} vfs-ino.patch"
-#PATCHES="${PATCHES} tmpfs-idr.patch"
-
-for i in ${PATCHES}
-do
-	patch -p1 < ${AUFS}/$i
-done
-
-[ "$clean" = 1 ] && rm -rf ${AUFS}
-git add mm/prfile.c
-git add -u
-find . -name "*.orig" | xargs rm
-find . |grep aufs | xargs git add
-git commit -s -m"UBUNTU: SAUCE: AUFS"