View | Details | Raw Unified | Return to bug 4570
Collapse All | Expand All

(-)sisyphus_check-0.7.13/sisyphus_check.fix1 (-1 / +22 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_locales=
475
check_locales()
476
{
477
	[ -z "$no_check_locale" ] || return 0
478
	local f="$1" && shift || return 1
479
	[ "$f" = "${f#glibc-locales-}" ] || return 0
480
481
	local locales
482
	if locales="$(printf %s "$rpm_filelist" | grep -qs '^/usr/share/locale\(/[^/]\+\)\?$')"; then 
483
		FileError "glibc-locales mismatch: $(printf %s "$locales")" "$f"
484
		return 1
485
	fi
486
}
487
473
fs_list=
488
fs_list=
474
exit_handler()
489
exit_handler()
475
{
490
{
476
	local rc=$?
491
	local rc=$?
477
	trap - EXIT
492
	trap - EXIT
478
	[ -z "$fs_list" ] || rm -f -- "$fs_list"
493
	[ -z "$fs_list" ] || rm -f -- "$fs_list"
479
	exit $rc
494
	exit $rc
480
}
495
}
Lines 685-700 rpm_version=%{version:shescape}; Link Here
685
			[ -z "$fast_check" ] || continue
700
			[ -z "$fast_check" ] || continue
686
		fi
701
		fi
687
	
702
	
688
		if ! check_intersects "$f"; then
703
		if ! check_intersects "$f"; then
689
			Message "ERROR: you have package intersections"
704
			Message "ERROR: you have package intersections"
690
			rc=1
705
			rc=1
691
			[ -z "$fast_check" ] || continue
706
			[ -z "$fast_check" ] || continue
692
		fi
707
		fi
708
709
		if ! check_locales "$f"; then
710
			Message "ERROR: you have files which do not belong to the glibc-locales"
711
			rc=1
712
			[ -z "$fast_check" ] || continue
713
		fi
693
	done
714
	done
694
715
695
	return $rc
716
	return $rc
696
}
717
}
697
718
698
719
699
check_dirs()
720
check_dirs()
700
{
721
{

Return to bug 4570