Commit 830a701e authored by Vitaly Lipatov's avatar Vitaly Lipatov

eepm.conf: add allow_repack_install and allow_thirdparty_install settings

parent 87d878e1
...@@ -296,6 +296,7 @@ epm_repack() ...@@ -296,6 +296,7 @@ epm_repack()
[ -z "$pkg_files" ] && info "Empty repack list was skipped" && return 22 [ -z "$pkg_files" ] && info "Empty repack list was skipped" && return 22
if __epm_repack $pkg_files && [ -n "$repacked_pkgs" ] ; then if __epm_repack $pkg_files && [ -n "$repacked_pkgs" ] ; then
if [ -n "$install" ] ; then if [ -n "$install" ] ; then
[ "$allow_repack_install" = "0" ] && fatal "Installing repacked packages is forbidden by allow_repack_install=0 in $CONFIGDIR/eepm.conf"
epm install $repacked_pkgs epm install $repacked_pkgs
return return
fi fi
......
...@@ -109,11 +109,13 @@ __epm_print_warning_for_nonalt_packages() ...@@ -109,11 +109,13 @@ __epm_print_warning_for_nonalt_packages()
fi fi
if epm_status_thirdparty "$i" ; then if epm_status_thirdparty "$i" ; then
[ "$allow_thirdparty_install" = "0" ] && fatal "Installing package $i from third-party source is forbidden by allow_thirdparty_install=0 in $CONFIGDIR/eepm.conf"
warning '%%% You are trying install package $i from third-party software source. Use it at your own risk. %%%' warning '%%% You are trying install package $i from third-party software source. Use it at your own risk. %%%'
continue continue
fi fi
if ! epm_status_original "$i" ; then if ! epm_status_original "$i" ; then
[ "$allow_thirdparty_install" = "0" ] && fatal "Installing package $i not from official repository is forbidden by allow_thirdparty_install=0 in $CONFIGDIR/eepm.conf"
warning '%%% You are trying install package $i not from official $DISTRNAME/$DISTRVERSION repository. Use it at your own risk. %%%' warning '%%% You are trying install package $i not from official $DISTRNAME/$DISTRVERSION repository. Use it at your own risk. %%%'
continue continue
fi fi
......
...@@ -65,6 +65,12 @@ ...@@ -65,6 +65,12 @@
# Can be set with env var EPM_USE_LOCAL_REPO # Can be set with env var EPM_USE_LOCAL_REPO
#use_local_repo=1 #use_local_repo=1
# Security settings (allowed by default, set to 0 to forbid)
# Forbid epm repack --install (repack and install third-party packages)
#allow_repack_install=0
# Forbid installing packages not from official repository (thirdparty)
#allow_thirdparty_install=0
# Proxy settings (standard environment variables, exported for apt/dnf/wget/curl/eget) # Proxy settings (standard environment variables, exported for apt/dnf/wget/curl/eget)
# Note: apt uses http_proxy for both HTTP and HTTPS (https_proxy is ignored, see bug #38543) # Note: apt uses http_proxy for both HTTP and HTTPS (https_proxy is ignored, see bug #38543)
#http_proxy=http://proxy.example.com:8080 #http_proxy=http://proxy.example.com:8080
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment