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

[RFC] update to check-compliance script



Hello,

Using the script that Frans has contributed I've prepared two patches
against it. First is a trivial one to allow it to be run from
installer directory while the second adds support to whitelist
packages that do not has files and contents embedded inside of
installer binaires.

The list is fairly incomplete and I'd like to ask for people to take a
look, specially porters, to check for another packages that could be
whitelisted.

To see all possible packages, just go inside installer directory and
run it as:

../scripts/check-compliance all

Thanks a lot,
>From 71fad87eb17a1d421155496477534597ffbf971f Mon Sep 17 00:00:00 2001
From: Otavio Salvador <otavio@ossystems.com.br>
Date: Fri, 7 Nov 2008 22:45:03 -0200
Subject: [PATCH 2/2] add support to list non-embedded packages

All non-embedded packages that has different version between testing
and unstable are marked with '-' while the packages that has embedded
contents and unknown ones are marked with '*'
---
 scripts/check-compliance |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/scripts/check-compliance b/scripts/check-compliance
index 5a4e889..f87ed23 100755
--- a/scripts/check-compliance
+++ b/scripts/check-compliance
@@ -12,9 +12,10 @@
 
 # TODO
 # - convert list to unique source packages and check those instead
-# - add ignore list for non-embedded packages and optionally ignore those
 
 ignore_m68k="amiboot atari-bootstrap emile emile-bootblocks m68k-vme-tftplilo vmelilo"
+safe="apt apt-utils bc cpio cramfsprogs debhelper docbook-xsl dosfstools e2fsprogs \
+      upx-ucl tofrodos wget "
 
 get_version() {
 	local ver
@@ -29,7 +30,7 @@ if [ "$1" = all ]; then
 	PRINT_ALL=1
 fi
 
-build_deps="$(sed -nr "/^#[[:space:]]*-/ s/[^-]*- ([^ ]*).*/\1/p" debian/control | sort)"
+build_deps="$(sed -nr '/^#[[:space:]]*-/ s/[^-]*- ([^ ]*).*/\1/p' debian/control | sort -u)"
 
 for p in $build_deps; do
 	# m68k is not a release arch, so ignore m68k-only dependencies
@@ -45,9 +46,18 @@ for p in $build_deps; do
 	tver=$(get_version $p testing)
 	uver=$(get_version $p unstable)
 
+	mark=
 	if [ "$tver" != "$uver" ]; then
-		printf "%-25s %20s %20s   *\n" "$p" "$tver" "$uver"
-	elif [ "$PRINT_ALL" ]; then
-		printf "%-25s %20s %20s\n" "$p" "$tver" "$uver"
+		if echo " $safe " | grep -q " $p "; then
+			mark="-"
+		else
+			mark="*"
+		fi
+	else
+		if [ -z "$PRINT_ALL" ]; then
+			continue
+		fi
 	fi
+
+	printf "%-25s %20s %20s   %s\n" "$p" "$tver" "$uver" "$mark"
 done
-- 
1.6.0.3.640.g6331a

>From c96f39efd4c7d27e59fd7a5a0d68bc30b8b49fbf Mon Sep 17 00:00:00 2001
From: Otavio Salvador <otavio@ossystems.com.br>
Date: Fri, 7 Nov 2008 20:20:19 -0200
Subject: [PATCH 1/2] use debian/control while looking for building dependencies

---
 scripts/check-compliance |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/check-compliance b/scripts/check-compliance
index 941d1ec..5a4e889 100755
--- a/scripts/check-compliance
+++ b/scripts/check-compliance
@@ -8,7 +8,7 @@
 # If called with 'all' the script will list all build dependencies, if not it
 # will only list those for which the versions do not match.
 #
-# The script should be run from the installer/debian directory in D-I SVN.
+# The script should be run from the installer directory in D-I SVN.
 
 # TODO
 # - convert list to unique source packages and check those instead
@@ -29,7 +29,7 @@ if [ "$1" = all ]; then
 	PRINT_ALL=1
 fi
 
-build_deps="$(sed -nr "/^#[[:space:]]*-/ s/[^-]*- ([^ ]*).*/\1/p" control | sort)"
+build_deps="$(sed -nr "/^#[[:space:]]*-/ s/[^-]*- ([^ ]*).*/\1/p" debian/control | sort)"
 
 for p in $build_deps; do
 	# m68k is not a release arch, so ignore m68k-only dependencies
-- 
1.6.0.3.640.g6331a


-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."

Reply to: