local rpmversion="$(epm print field Version for"$pkg" 2>/dev/null)"
[-n"$rpmversion"]||return
epm print field Vendor for"$pkg" 2>/dev/null
}
__epm_print_warning_for_nonalt_packages()
{
# only ALT
["$BASEDISTRNAME"="alt"]||return 0
local i
for i in$*;do
local vendor
# TODO: check only for rpm
vendor="$(__epm_get_rpm_pkgvendor "$i")"
local packager="$(epm print field Packager for"$i" 2>/dev/null)"
if epm_status_repacked "$i";then
warning "%%% You are trying install package $i repacked from third-party software source. Use it at your own discretion. %%%"
continue
fi
# TODO: check GPG or some other mark
echo"$packager" | grep-q"@altlinux"&&["$vendor"="ALT Linux Team"]&&return 0
if epm_status_thirdparty "$i";then
warning "%%% You are trying install package $i from third-party software source. Use it at your own discretion. %%%"
continue
fi
warning "%%% You are trying install package $i from third-party software source. Use it at your own discretion. %%%"
if! epm_status_original "$i";then
warning "%%% You are trying install package $i not from official $DISTRNAME/$DISTRVERSION repository. Use it at your own discretion. %%%"
continue
fi
done
}
...
...
@@ -11006,10 +10988,20 @@ __epm_check_vendor()
# only ALT
["$BASEDISTRNAME"="alt"]||return 0
local i
for i in$*;do
if! epm_status_validate "$i";then
# it is missed package probably (package remove case)
if is_installed "$i";then
warning "Can't get any info for $i package. Scripts are DISABLED for package $i. Use --scripts if you need run scripts from such packages."
fi
noscripts="--noscripts"
continue
fi
local vendor
vendor="$(__epm_get_rpm_pkgvendor "$i")"
vendor="$(epm print field Vendor for"$i")"
if[-z"$vendor"];then
warning "Can't get info about vendor for $i package. Scripts are DISABLED for package $i. Use --scripts if you need run scripts from such packages."
...
...
@@ -11017,9 +11009,8 @@ __epm_check_vendor()
continue
fi
# TODO: check GPG
# check separately to be quiet
["$vendor"="ALT Linux Team"]&&continue
epm_status_original "$i"&&continue
epm_status_repacked "$i"&&continue
if __epm_vendor_ok_scripts "$vendor";then
warning "Scripts are ENABLED for package $i from outside vendor '$vendor' (this vendor is listed in $CONFIGDIR/vendorallowscripts.list). Use --noscripts if you need disable scripts in such packages."
...
...
@@ -11400,6 +11391,12 @@ epm_stats()
# File bin/epm-status:
epm_status_validate()
{
local pkg="$1"
local rpmversion="$(epm print field Version for"$pkg" 2>/dev/null)"
[-n"$rpmversion"]
}
epm_status_original()
{
...
...
@@ -11409,9 +11406,25 @@ epm_status_original()
case$DISTRNAMEin
ALTLinux|ALTServer)
#[ "$(epm print field Vendor for package $pkg)" = "ALT Linux Team" ] && return
epm_status_validate $pkg||return 1
epm_status_repacked $pkg&&return 1
__epm_check_if_package_from_repo $pkg&&return
# not for all packages
#[ "$(epm print field Vendor for package $pkg)" = "ALT Linux Team" ] || return
local distribution
distribution="$(epm print field Distribution for"$pkg" 2>/dev/null )"
echo"$distribution" | grep-q"^ALT"||return 1
# mc in Sisyphus has not a signature
#local sig
#sig="$(epm print field sigpgp for "$pkg" 2>/dev/null )"
#[ "$sig" = "(none)" ] && return 1
# FIXME: how to check if the package is from ALT repo (verified)?
local release="$(epm print release from package "$pkg" 2>/dev/null )"
echo"$release" | grep-q"^alt"||return 1
return 0
;;
*)
fatal "Unsupported $DISTRNAME"
...
...
@@ -11428,6 +11441,7 @@ epm_status_repacked()
case$BASEDISTRNAMEin
alt)
epm_status_validate $pkg||return
local packager="$(epm print field Packager for"$1" 2>/dev/null)"