View | Details | Raw Unified
Collapse All | Expand All

(-)sisyphus_check-0.7.13/sisyphus_check.fix1 (-1 / +20 lines)
 Lines 78-93   FileError() Link Here 
78
78
79
rpm_signature=
79
rpm_signature=
80
skip_check_gpgname=
80
skip_check_gpgname=
81
trust_gpg_names='security incominger'
81
trust_gpg_names='security incominger'
82
no_gpgname_packagers='kernel@packages.altlinux.org'
82
no_gpgname_packagers='kernel@packages.altlinux.org'
83
package_type=
83
package_type=
84
recurse_subdir=
84
recurse_subdir=
85
files=
85
files=
86
fhs_file="/etc/sisyphus_check/fhs"
86
87
87
# check changelog format
88
# check changelog format
88
export no_check_changelog=
89
export no_check_changelog=
89
check_changelog()
90
check_changelog()
90
{
91
{
91
	[ -z "$no_check_changelog" ] || return 0
92
	[ -z "$no_check_changelog" ] || return 0
92
	local f="$1" && shift || return 1
93
	local f="$1" && shift || return 1
93
	local rc=0
94
	local rc=0
 Lines 396-412   check_fhs() Link Here 
396
	local list pattern bad
397
	local list pattern bad
397
398
398
	# Do not check filesystem package.
399
	# Do not check filesystem package.
399
	[ "$rpm_name" != filesystem ] || return 0
400
	[ "$rpm_name" != filesystem ] || return 0
400
401
401
	list=$(printf %s "$rpm_filelist" |grep -e '^/')
402
	list=$(printf %s "$rpm_filelist" |grep -e '^/')
402
	[ -n "$list" ] || return 0
403
	[ -n "$list" ] || return 0
403
404
404
	pattern="$(grep '^[^#]' /etc/sisyphus_check/fhs |
405
	pattern="$(grep '^[^#]' $fhs_file |
405
		while read -r n v; do
406
		while read -r n v; do
406
			[ -n "$n" -a -n "$v" -a -z "${rpm_name##$n}" ] || continue
407
			[ -n "$n" -a -n "$v" -a -z "${rpm_name##$n}" ] || continue
407
			printf %s\\n "$v"
408
			printf %s\\n "$v"
408
		done |LC_COLLATE=C sort -u)" || return 1
409
		done |LC_COLLATE=C sort -u)" || return 1
409
	pattern="$(printf %s "$pattern" |tr -s '\n' '|')"
410
	pattern="$(printf %s "$pattern" |tr -s '\n' '|')"
410
	[ "$pattern" != '' ] || pattern='^$'
411
	[ "$pattern" != '' ] || pattern='^$'
411
412
412
	list="$(printf %s "$list" |egrep -v "$pattern")" ||
413
	list="$(printf %s "$list" |egrep -v "$pattern")" ||
 Lines 465-480   check_intersects() Link Here 
465
	if [ -n "$text" ]; then
466
	if [ -n "$text" ]; then
466
		FileError "filesystem intersections: $(printf %s "$text" |tr -s '[:space:]' ' ')" "$f"
467
		FileError "filesystem intersections: $(printf %s "$text" |tr -s '[:space:]' ' ')" "$f"
467
		rc=1
468
		rc=1
468
	fi
469
	fi
469
470
470
	return $rc
471
	return $rc
471
}
472
}
472
473
474
export no_check_locale=
475
check_locale()
476
{
477
	[ -z "$no_check_locale" ] || return 0
478
479
	local locales
480
	if locales="$(printf %s "$rpm_filelist" | grep -qs '^/usr/share/locale\(/[^/]\+\)\?$')"; then 
481
		FileError "glibc-locales mismatch: $(printf %s "$locales")" "$f"
482
		return 1
483
	fi
484
}
485
473
fs_list=
486
fs_list=
474
exit_handler()
487
exit_handler()
475
{
488
{
476
	local rc=$?
489
	local rc=$?
477
	trap - EXIT
490
	trap - EXIT
478
	[ -z "$fs_list" ] || rm -f -- "$fs_list"
491
	[ -z "$fs_list" ] || rm -f -- "$fs_list"
479
	exit $rc
492
	exit $rc
480
}
493
}
 Lines 685-700   rpm_version=%{version:shescape}; Link Here 
685
			[ -z "$fast_check" ] || continue
698
			[ -z "$fast_check" ] || continue
686
		fi
699
		fi
687
	
700
	
688
		if ! check_intersects "$f"; then
701
		if ! check_intersects "$f"; then
689
			Message "ERROR: you have package intersections"
702
			Message "ERROR: you have package intersections"
690
			rc=1
703
			rc=1
691
			[ -z "$fast_check" ] || continue
704
			[ -z "$fast_check" ] || continue
692
		fi
705
		fi
706
707
		if ! check_locales "$f"; then
708
			Message "ERROR: you have files which do not belong to the glibc-locales"
709
			rc=1
710
			[ -z "$fast_check" ] || continue
711
		fi
693
	done
712
	done
694
713
695
	return $rc
714
	return $rc
696
}
715
}
697
716
698
717
699
check_dirs()
718
check_dirs()
700
{
719
{