Commit aa9506af authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.34.1

parent 5becad60
...@@ -31,7 +31,7 @@ SHAREDIR=$PROGDIR ...@@ -31,7 +31,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.34.0" EPMVERSION="3.34.1"
load_helper() load_helper()
{ {
...@@ -3777,15 +3777,34 @@ epm_print_install_names_command() ...@@ -3777,15 +3777,34 @@ epm_print_install_names_command()
esac esac
} }
apt_repo_prepare()
{
assure_exists apt-repo
[ -n "$non_interactive" ] || return
set_sudo
trap "$SUDO rm /etc/apt/apt.conf.d/eepm-apt-noninteractive.conf 2>/dev/null" EXIT
echo 'APT::Get::Assume-Yes "true";' | $SUDO tee /etc/apt/apt.conf.d/eepm-apt-noninteractive.conf >/dev/null
}
apt_repo_after()
{
[ -n "$non_interactive" ] || return
$SUDO rm /etc/apt/apt.conf.d/eepm-apt-noninteractive.conf 2>/dev/null
}
epm_install() epm_install()
{ {
if [ "$BASEDISTRNAME" = "alt" ] ; then if [ "$BASEDISTRNAME" = "alt" ] ; then
if tasknumber "$pkg_names" >/dev/null ; then if tasknumber "$pkg_names" >/dev/null ; then
assure_exists apt-repo local res
# TODO: add --auto support # TODO: don't use apt-repo
apt_repo_prepare
sudocmd_foreach "apt-repo test" $(tasknumber $pkg_names) sudocmd_foreach "apt-repo test" $(tasknumber $pkg_names)
return res=$?
apt_repo_after
return $res
fi fi
fi fi
...@@ -4319,6 +4338,22 @@ esac ...@@ -4319,6 +4338,22 @@ esac
} }
# File bin/epm-moo:
epm_moo()
{
local figlet cowsay docmd
epm assure figlet && figlet="figlet"
epm assure cowsay cowsay-soft && cowsay="cowsay"
[ -n "$verbose" ] && docmd="docmd"
[ -n "$figlet" ] && $docmd $figlet "EPM"
[ -n "$cowsay" ] && $docmd $cowsay "EPM from Etersoft"
[ -n "$figlet" ] && $docmd $figlet "Etersoft"
}
# File bin/epm-optimize: # File bin/epm-optimize:
__repack_rpm_base() __repack_rpm_base()
...@@ -7467,8 +7502,13 @@ EOF ...@@ -7467,8 +7502,13 @@ EOF
__set_version_pkgname() __set_version_pkgname()
{ {
local alpkg="$1" local alpkg="$1"
VERSION="$(echo "$alpkg" | grep -o -P "[-_.]([0-9])([0-9])*(\.[0-9])*" | head -n1 | sed -e 's|^[-_.]||')" #" VERSION="$(echo "$alpkg" | grep -o -P '[-_.][0-9][0-9]*([.]*[0-9])*' | head -n1 | sed -e 's|^[-_.]||')" #"
[ -n "$VERSION" ] && PKGNAME="$(echo "$alpkg" | sed -e "s|[-_.]$VERSION.*||")" [ -n "$VERSION" ] && PKGNAME="$(echo "$alpkg" | sed -e "s|[-_.]$VERSION.*||")"
# set version as all between name and extension
#local woext="$(echo "alpkg" | sed -e 's|\.tar.*||')"
#if [ "$woext" != "$alpkg" ] ; then
# VERSION="$(echo "$woext" " | sed -e "s|^$PKGNAME[-_.]||")"
#fi
} }
...@@ -7523,9 +7563,12 @@ __prepare_source_package() ...@@ -7523,9 +7563,12 @@ __prepare_source_package()
newalpkg=$PKGNAME-$VERSION.$pkgtype newalpkg=$PKGNAME-$VERSION.$pkgtype
#[ -n "$PKGNAME" ] || PKGNAME=$(basename $alpkg .$pkgtype) #[ -n "$PKGNAME" ] || PKGNAME=$(basename $alpkg .$pkgtype)
if [ "$pkgtype" = "tar" ] || [ "$pkgtype" = "tar.gz" ] || [ "$pkgtype" = "tgz" ] ; then if [ "$pkgtype" = "tar" ] || [ "$pkgtype" = "tar.gz" ] || [ "$pkgtype" = "tgz" ] ; then
# just rename supported formats
if [ "$alpkg" != "$newalpkg" ] ; then
mv $alpkg $newalpkg mv $alpkg $newalpkg
: fi
else else
# converts directly unsupported formats
newalpkg=$PKGNAME-$VERSION.tar newalpkg=$PKGNAME-$VERSION.tar
#newalpkg=$(basename $alpkg .$pkgtype).tar #newalpkg=$(basename $alpkg .$pkgtype).tar
assure_exists erc || epm ei erc || fatal assure_exists erc || epm ei erc || fatal
...@@ -11414,13 +11457,13 @@ sget() ...@@ -11414,13 +11457,13 @@ sget()
if [ "$2" = "/dev/stdout" ] || [ "$2" = "-" ] ; then if [ "$2" = "/dev/stdout" ] || [ "$2" = "-" ] ; then
scat "$1" scat "$1"
elif [ -n "$2" ] ; then elif [ -n "$2" ] ; then
docmd __wget -O "$2" "$1" __wget -O "$2" "$1"
else else
# TODO: поддержка rsync для известных хостов? # TODO: поддержка rsync для известных хостов?
# Не качать, если одинаковый размер и дата # Не качать, если одинаковый размер и дата
# -nc # -nc
# TODO: overwrite always # TODO: overwrite always
docmd __wget $WGETNAMEOPTIONS "$1" __wget $WGETNAMEOPTIONS "$1"
fi fi
} }
...@@ -12560,6 +12603,10 @@ check_command() ...@@ -12560,6 +12603,10 @@ check_command()
repack) # HELPCMD: repack rpm to local compatibility repack) # HELPCMD: repack rpm to local compatibility
epm_cmd=repack epm_cmd=repack
;; ;;
moo)
epm_cmd=moo
direct_args=1
;;
prescription|recipe) # HELPCMD: run prescription (a script to achieving the goal), run without args to get list prescription|recipe) # HELPCMD: run prescription (a script to achieving the goal), run without args to get list
epm_cmd=prescription epm_cmd=prescription
direct_args=1 direct_args=1
......
...@@ -2376,7 +2376,7 @@ print_version() ...@@ -2376,7 +2376,7 @@ print_version()
local on_text="(host system)" local on_text="(host system)"
local virt="$($DISTRVENDOR -i)" local virt="$($DISTRVENDOR -i)"
[ "$virt" = "(unknown)" ] || [ "$virt" = "(host system)" ] || on_text="(under $virt)" [ "$virt" = "(unknown)" ] || [ "$virt" = "(host system)" ] || on_text="(under $virt)"
echo "Service manager version 3.34.0 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.34.1 https://wiki.etersoft.ru/Epm"
echo "Running on $($DISTRVENDOR -e) $on_text with $SERVICETYPE" echo "Running on $($DISTRVENDOR -e) $on_text with $SERVICETYPE"
echo "Copyright (c) Etersoft 2012-2021" echo "Copyright (c) Etersoft 2012-2021"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
......
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