mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	apply_patches: Sort patch list before applying
The apply_patches script wasn't sorting the list of patches in the "patches" directory before applying them. This left the list in an indeterminate order. In most cases, the list is actually sorted but rarely, they can be out of order and cause dependent patches to fail to apply. We now sort the list but the "sort" program wasn't in the configure scripts so we needed to add that and regenerate the scripts as well. Resolves: #193
This commit is contained in:
		
				
					committed by
					
						 AsteriskCI2
						AsteriskCI2
					
				
			
			
				
	
			
			
			
						parent
						
							e341a41578
						
					
				
				
					commit
					7a725e3159
				
			
							
								
								
									
										68
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										68
									
								
								configure
									
									
									
									
										vendored
									
									
								
							| @@ -1250,6 +1250,7 @@ DOWNLOAD_TIMEOUT | ||||
| DOWNLOAD_TO_STDOUT | ||||
| DOWNLOAD | ||||
| FETCH | ||||
| SORT | ||||
| REALPATH | ||||
| NM | ||||
| PATCH | ||||
| @@ -1359,7 +1360,6 @@ infodir | ||||
| docdir | ||||
| oldincludedir | ||||
| includedir | ||||
| runstatedir | ||||
| localstatedir | ||||
| sharedstatedir | ||||
| sysconfdir | ||||
| @@ -1555,7 +1555,6 @@ datadir='${datarootdir}' | ||||
| sysconfdir='${prefix}/etc' | ||||
| sharedstatedir='${prefix}/com' | ||||
| localstatedir='${prefix}/var' | ||||
| runstatedir='${localstatedir}/run' | ||||
| includedir='${prefix}/include' | ||||
| oldincludedir='/usr/include' | ||||
| docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | ||||
| @@ -1808,15 +1807,6 @@ do | ||||
|   | -silent | --silent | --silen | --sile | --sil) | ||||
|     silent=yes ;; | ||||
|  | ||||
|   -runstatedir | --runstatedir | --runstatedi | --runstated \ | ||||
|   | --runstate | --runstat | --runsta | --runst | --runs \ | ||||
|   | --run | --ru | --r) | ||||
|     ac_prev=runstatedir ;; | ||||
|   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | ||||
|   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | ||||
|   | --run=* | --ru=* | --r=*) | ||||
|     runstatedir=$ac_optarg ;; | ||||
|  | ||||
|   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | ||||
|     ac_prev=sbindir ;; | ||||
|   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | ||||
| @@ -1954,7 +1944,7 @@ fi | ||||
| for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \ | ||||
| 		datadir sysconfdir sharedstatedir localstatedir includedir \ | ||||
| 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | ||||
| 		libdir localedir mandir runstatedir | ||||
| 		libdir localedir mandir | ||||
| do | ||||
|   eval ac_val=\$$ac_var | ||||
|   # Remove trailing slashes. | ||||
| @@ -2107,7 +2097,6 @@ Fine tuning of the installation directories: | ||||
|   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc] | ||||
|   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com] | ||||
|   --localstatedir=DIR     modifiable single-machine data [PREFIX/var] | ||||
|   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run] | ||||
|   --libdir=DIR            object code libraries [EPREFIX/lib] | ||||
|   --includedir=DIR        C header files [PREFIX/include] | ||||
|   --oldincludedir=DIR     C header files for non-gcc [/usr/include] | ||||
| @@ -7801,6 +7790,47 @@ $as_echo "no" >&6; } | ||||
| fi | ||||
|  | ||||
|  | ||||
| # Extract the first word of "sort", so it can be a program name with args. | ||||
| set dummy sort; ac_word=$2 | ||||
| { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||||
| $as_echo_n "checking for $ac_word... " >&6; } | ||||
| if ${ac_cv_path_SORT+:} false; then : | ||||
|   $as_echo_n "(cached) " >&6 | ||||
| else | ||||
|   case $SORT in | ||||
|   [\\/]* | ?:[\\/]*) | ||||
|   ac_cv_path_SORT="$SORT" # Let the user override the test with a path. | ||||
|   ;; | ||||
|   *) | ||||
|   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||||
| for as_dir in $PATH | ||||
| do | ||||
|   IFS=$as_save_IFS | ||||
|   test -z "$as_dir" && as_dir=. | ||||
|     for ac_exec_ext in '' $ac_executable_extensions; do | ||||
|   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||||
|     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext" | ||||
|     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||||
|     break 2 | ||||
|   fi | ||||
| done | ||||
|   done | ||||
| IFS=$as_save_IFS | ||||
|  | ||||
|   test -z "$ac_cv_path_SORT" && ac_cv_path_SORT=":" | ||||
|   ;; | ||||
| esac | ||||
| fi | ||||
| SORT=$ac_cv_path_SORT | ||||
| if test -n "$SORT"; then | ||||
|   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5 | ||||
| $as_echo "$SORT" >&6; } | ||||
| else | ||||
|   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||||
| $as_echo "no" >&6; } | ||||
| fi | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| DOWNLOAD=":" | ||||
| @@ -15616,7 +15646,7 @@ else | ||||
|     We can't simply define LARGE_OFF_T to be 9223372036854775807, | ||||
|     since some C++ compilers masquerading as C compilers | ||||
|     incorrectly reject 9223372036854775807.  */ | ||||
| #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) | ||||
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | ||||
|   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | ||||
| 		       && LARGE_OFF_T % 2147483647 == 1) | ||||
| 		      ? 1 : -1]; | ||||
| @@ -15662,7 +15692,7 @@ else | ||||
|     We can't simply define LARGE_OFF_T to be 9223372036854775807, | ||||
|     since some C++ compilers masquerading as C compilers | ||||
|     incorrectly reject 9223372036854775807.  */ | ||||
| #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) | ||||
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | ||||
|   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | ||||
| 		       && LARGE_OFF_T % 2147483647 == 1) | ||||
| 		      ? 1 : -1]; | ||||
| @@ -15686,7 +15716,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||||
|     We can't simply define LARGE_OFF_T to be 9223372036854775807, | ||||
|     since some C++ compilers masquerading as C compilers | ||||
|     incorrectly reject 9223372036854775807.  */ | ||||
| #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) | ||||
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | ||||
|   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | ||||
| 		       && LARGE_OFF_T % 2147483647 == 1) | ||||
| 		      ? 1 : -1]; | ||||
| @@ -15731,7 +15761,7 @@ else | ||||
|     We can't simply define LARGE_OFF_T to be 9223372036854775807, | ||||
|     since some C++ compilers masquerading as C compilers | ||||
|     incorrectly reject 9223372036854775807.  */ | ||||
| #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) | ||||
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | ||||
|   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | ||||
| 		       && LARGE_OFF_T % 2147483647 == 1) | ||||
| 		      ? 1 : -1]; | ||||
| @@ -15755,7 +15785,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | ||||
|     We can't simply define LARGE_OFF_T to be 9223372036854775807, | ||||
|     since some C++ compilers masquerading as C compilers | ||||
|     incorrectly reject 9223372036854775807.  */ | ||||
| #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) | ||||
| #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | ||||
|   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | ||||
| 		       && LARGE_OFF_T % 2147483647 == 1) | ||||
| 		      ? 1 : -1]; | ||||
| @@ -17020,8 +17050,6 @@ main () | ||||
|     if (*(data + i) != *(data3 + i)) | ||||
|       return 14; | ||||
|   close (fd); | ||||
|   free (data); | ||||
|   free (data3); | ||||
|   return 0; | ||||
| } | ||||
| _ACEOF | ||||
|   | ||||
| @@ -286,6 +286,7 @@ AC_PATH_PROG([PATCH], [patch], :) | ||||
| AC_PATH_PROG([SED], [sed], :) | ||||
| AC_PATH_PROG([NM], [nm], :) | ||||
| AC_PATH_PROG([REALPATH], [realpath], :) | ||||
| AC_PATH_PROG([SORT], [sort], :) | ||||
|  | ||||
|  | ||||
| DOWNLOAD=":" | ||||
|   | ||||
| @@ -48,6 +48,7 @@ CAT=@CAT@ | ||||
| CUT=@CUT@ | ||||
| REALPATH=@REALPATH@ | ||||
| DIRNAME=@DIRNAME@ | ||||
| SORT=@SORT@ | ||||
|  | ||||
| BUILD_PLATFORM=@BUILD_PLATFORM@ | ||||
| BUILD_CPU=@BUILD_CPU@ | ||||
|   | ||||
							
								
								
									
										14
									
								
								menuselect/configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								menuselect/configure
									
									
									
									
										vendored
									
									
								
							| @@ -698,7 +698,6 @@ infodir | ||||
| docdir | ||||
| oldincludedir | ||||
| includedir | ||||
| runstatedir | ||||
| localstatedir | ||||
| sharedstatedir | ||||
| sysconfdir | ||||
| @@ -782,7 +781,6 @@ datadir='${datarootdir}' | ||||
| sysconfdir='${prefix}/etc' | ||||
| sharedstatedir='${prefix}/com' | ||||
| localstatedir='${prefix}/var' | ||||
| runstatedir='${localstatedir}/run' | ||||
| includedir='${prefix}/include' | ||||
| oldincludedir='/usr/include' | ||||
| docdir='${datarootdir}/doc/${PACKAGE}' | ||||
| @@ -1035,15 +1033,6 @@ do | ||||
|   | -silent | --silent | --silen | --sile | --sil) | ||||
|     silent=yes ;; | ||||
|  | ||||
|   -runstatedir | --runstatedir | --runstatedi | --runstated \ | ||||
|   | --runstate | --runstat | --runsta | --runst | --runs \ | ||||
|   | --run | --ru | --r) | ||||
|     ac_prev=runstatedir ;; | ||||
|   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | ||||
|   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | ||||
|   | --run=* | --ru=* | --r=*) | ||||
|     runstatedir=$ac_optarg ;; | ||||
|  | ||||
|   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | ||||
|     ac_prev=sbindir ;; | ||||
|   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | ||||
| @@ -1181,7 +1170,7 @@ fi | ||||
| for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \ | ||||
| 		datadir sysconfdir sharedstatedir localstatedir includedir \ | ||||
| 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | ||||
| 		libdir localedir mandir runstatedir | ||||
| 		libdir localedir mandir | ||||
| do | ||||
|   eval ac_val=\$$ac_var | ||||
|   # Remove trailing slashes. | ||||
| @@ -1334,7 +1323,6 @@ Fine tuning of the installation directories: | ||||
|   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc] | ||||
|   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com] | ||||
|   --localstatedir=DIR     modifiable single-machine data [PREFIX/var] | ||||
|   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run] | ||||
|   --libdir=DIR            object code libraries [EPREFIX/lib] | ||||
|   --includedir=DIR        C header files [PREFIX/include] | ||||
|   --oldincludedir=DIR     C header files for non-gcc [/usr/include] | ||||
|   | ||||
							
								
								
									
										3
									
								
								third-party/apply_patches
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								third-party/apply_patches
									
									
									
									
										vendored
									
									
								
							| @@ -7,6 +7,7 @@ fi | ||||
|  | ||||
| PATCH=${PATCH:-patch} | ||||
| FIND=${FIND:-find} | ||||
| SORT=${SORT:-sort} | ||||
|  | ||||
| patchdir=${1:?You must supply a patches directory} | ||||
| sourcedir=${2?:You must supply a source directory} | ||||
| @@ -21,7 +22,7 @@ if [ ! -d "$sourcedir" ] ; then | ||||
| 	exit 1 | ||||
| fi | ||||
|  | ||||
| patches=$(${FIND} "$patchdir" -name "*.patch") | ||||
| patches=$(${FIND} "$patchdir" -name "*.patch" | ${SORT}) | ||||
| if [ x"$patches" = x"" ] ; then | ||||
| 	echo "No patches in $patchdir"  >&2 | ||||
| 	exit 0 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user