From 4f6f74019fdb77bdef460aab7960780948954462 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Tue, 30 Jun 2009 10:51:41 +0200 Subject: [PATCH] Remove problematic case-insensitive duplicate files. Add missing copyright/license disclaimer to build/tools/make-release.sh Add a new tool: build/tools/find-case-duplicates.sh --- .../usr/include/linux/netfilter/xt_CONNMARK.h | 1 - .../usr/include/linux/netfilter/xt_MARK.h | 1 - .../usr/include/linux/netfilter/xt_connmark.h | 1 - .../usr/include/linux/netfilter/xt_mark.h | 1 - .../include/linux/netfilter_ipv6/ip6t_HL.h | 1 - .../include/linux/netfilter_ipv6/ip6t_hl.h | 1 - .../include/linux/netfilter/xt_CONNMARK.h | 27 ------------ .../common/include/linux/netfilter/xt_MARK.h | 30 ------------- .../include/linux/netfilter/xt_connmark.h | 20 --------- .../common/include/linux/netfilter/xt_mark.h | 20 --------- .../include/linux/netfilter_ipv6/ip6t_HL.h | 28 ------------ .../include/linux/netfilter_ipv6/ip6t_hl.h | 27 ------------ ndk/build/tools/find-case-duplicates.sh | 43 +++++++++++++++++++ ndk/build/tools/make-release.sh | 14 ++++++ 14 files changed, 57 insertions(+), 158 deletions(-) delete mode 120000 ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_CONNMARK.h delete mode 120000 ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_MARK.h delete mode 120000 ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_connmark.h delete mode 120000 ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_mark.h delete mode 120000 ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_HL.h delete mode 120000 ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_hl.h delete mode 100644 ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_CONNMARK.h delete mode 100644 ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_MARK.h delete mode 100644 ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_connmark.h delete mode 100644 ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_mark.h delete mode 100644 ndk/build/platforms/android-1.5/common/include/linux/netfilter_ipv6/ip6t_HL.h delete mode 100644 ndk/build/platforms/android-1.5/common/include/linux/netfilter_ipv6/ip6t_hl.h create mode 100755 ndk/build/tools/find-case-duplicates.sh diff --git a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_CONNMARK.h b/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_CONNMARK.h deleted file mode 120000 index 2b7e19817..000000000 --- a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_CONNMARK.h +++ /dev/null @@ -1 +0,0 @@ -../../../../../common/include/linux/netfilter/xt_CONNMARK.h \ No newline at end of file diff --git a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_MARK.h b/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_MARK.h deleted file mode 120000 index eaf3cd75c..000000000 --- a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_MARK.h +++ /dev/null @@ -1 +0,0 @@ -../../../../../common/include/linux/netfilter/xt_MARK.h \ No newline at end of file diff --git a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_connmark.h b/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_connmark.h deleted file mode 120000 index 2f70b9481..000000000 --- a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_connmark.h +++ /dev/null @@ -1 +0,0 @@ -../../../../../common/include/linux/netfilter/xt_connmark.h \ No newline at end of file diff --git a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_mark.h b/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_mark.h deleted file mode 120000 index 6ec390fb7..000000000 --- a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter/xt_mark.h +++ /dev/null @@ -1 +0,0 @@ -../../../../../common/include/linux/netfilter/xt_mark.h \ No newline at end of file diff --git a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_HL.h b/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_HL.h deleted file mode 120000 index 9ade85712..000000000 --- a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_HL.h +++ /dev/null @@ -1 +0,0 @@ -../../../../../common/include/linux/netfilter_ipv6/ip6t_HL.h \ No newline at end of file diff --git a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_hl.h b/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_hl.h deleted file mode 120000 index d9ed35331..000000000 --- a/ndk/build/platforms/android-1.5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_hl.h +++ /dev/null @@ -1 +0,0 @@ -../../../../../common/include/linux/netfilter_ipv6/ip6t_hl.h \ No newline at end of file diff --git a/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_CONNMARK.h b/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_CONNMARK.h deleted file mode 100644 index 1b30eebba..000000000 --- a/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_CONNMARK.h +++ /dev/null @@ -1,27 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _XT_CONNMARK_H_target -#define _XT_CONNMARK_H_target - -enum { - XT_CONNMARK_SET = 0, - XT_CONNMARK_SAVE, - XT_CONNMARK_RESTORE -}; - -struct xt_connmark_target_info { - unsigned long mark; - unsigned long mask; - u_int8_t mode; -}; - -#endif diff --git a/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_MARK.h b/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_MARK.h deleted file mode 100644 index f58c97c11..000000000 --- a/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_MARK.h +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _XT_MARK_H_target -#define _XT_MARK_H_target - -struct xt_mark_target_info { - unsigned long mark; -}; - -enum { - XT_MARK_SET=0, - XT_MARK_AND, - XT_MARK_OR, -}; - -struct xt_mark_target_info_v1 { - unsigned long mark; - u_int8_t mode; -}; - -#endif diff --git a/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_connmark.h b/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_connmark.h deleted file mode 100644 index 021e03ab1..000000000 --- a/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_connmark.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _XT_CONNMARK_H -#define _XT_CONNMARK_H - -struct xt_connmark_info { - unsigned long mark, mask; - u_int8_t invert; -}; - -#endif diff --git a/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_mark.h b/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_mark.h deleted file mode 100644 index 69699dfb8..000000000 --- a/ndk/build/platforms/android-1.5/common/include/linux/netfilter/xt_mark.h +++ /dev/null @@ -1,20 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _XT_MARK_H -#define _XT_MARK_H - -struct xt_mark_info { - unsigned long mark, mask; - u_int8_t invert; -}; - -#endif diff --git a/ndk/build/platforms/android-1.5/common/include/linux/netfilter_ipv6/ip6t_HL.h b/ndk/build/platforms/android-1.5/common/include/linux/netfilter_ipv6/ip6t_HL.h deleted file mode 100644 index 1071ff984..000000000 --- a/ndk/build/platforms/android-1.5/common/include/linux/netfilter_ipv6/ip6t_HL.h +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _IP6T_HL_H -#define _IP6T_HL_H - -enum { - IP6T_HL_SET = 0, - IP6T_HL_INC, - IP6T_HL_DEC -}; - -#define IP6T_HL_MAXMODE IP6T_HL_DEC - -struct ip6t_HL_info { - u_int8_t mode; - u_int8_t hop_limit; -}; - -#endif diff --git a/ndk/build/platforms/android-1.5/common/include/linux/netfilter_ipv6/ip6t_hl.h b/ndk/build/platforms/android-1.5/common/include/linux/netfilter_ipv6/ip6t_hl.h deleted file mode 100644 index e0144d2b7..000000000 --- a/ndk/build/platforms/android-1.5/common/include/linux/netfilter_ipv6/ip6t_hl.h +++ /dev/null @@ -1,27 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _IP6T_HL_H -#define _IP6T_HL_H - -enum { - IP6T_HL_EQ = 0, - IP6T_HL_NE, - IP6T_HL_LT, - IP6T_HL_GT, -}; - -struct ip6t_hl_info { - u_int8_t mode; - u_int8_t hop_limit; -}; - -#endif diff --git a/ndk/build/tools/find-case-duplicates.sh b/ndk/build/tools/find-case-duplicates.sh new file mode 100755 index 000000000..c5129e8e2 --- /dev/null +++ b/ndk/build/tools/find-case-duplicates.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Copyright (C) 2009 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is used to find case-insensitive duplicate file names +# from the git repository. This is used to remove them when generating +# a new sysroot. + +# location of the root ndk directory. we assume this script is under build/tools +NDK_ROOT_DIR=`dirname $0`/../.. +NDK_ROOT_DIR=`cd $NDK_ROOT_DIR && pwd` + +ORG_FILES=`(cd $NDK_ROOT_DIR && git ls-files) | sort -f` +NEW_FILES= + +PREVFILE= +PREVUPFILE=XXXXXX +for FILE in $ORG_FILES; do + # don't use [:lower:] and [:upper:] since they can produce + # strange results based on the current locale. + UPFILE=`echo $FILE | tr [a-z] [A-Z]` + if [ "$UPFILE" != "$PREVUPFILE" ] ; then + NEW_FILES="$NEW_FILES $FILE" + else + echo "$PREVFILE" + echo "$FILE" + fi + PREVFILE=$FILE + PREVUPFILE=$UPFILE +done diff --git a/ndk/build/tools/make-release.sh b/ndk/build/tools/make-release.sh index 0eae2ca38..f2b969737 100755 --- a/ndk/build/tools/make-release.sh +++ b/ndk/build/tools/make-release.sh @@ -1,5 +1,19 @@ #!/bin/sh # +# Copyright (C) 2009 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # This script is used to build complete Android NDK release packages # from the git repository and a set of prebuilt cross-toolchain tarballs #