Commit 37ab677a authored by Vitaly Lipatov's avatar Vitaly Lipatov

backported to p8 as 2.0.8-alt0.M80P.1 (with rpmbph script)

parents e1113090 2ada85a2
eon sf - скачивание через rsync -z для компактности?
get system checking
https://github.com/gwicke/mediawiki-containers
list перехватывается:
# serv openvpn
# service openvpn
Usage: openvpn {start|stop|reload|restart|reopen|condstop|condrestart|condreload|status|list|help}
[root@priv etc]# serv openvpn list
# chkconfig --list
# anyservice --quiet list
epmqf - если каталог есть, искать полный /usr/share/node
TODO: yaourt (pacman frontend), need we? TODO: yaourt (pacman frontend), need we?
https://archlinux.fr/man/yaourt.8.html https://archlinux.fr/man/yaourt.8.html
......
...@@ -33,7 +33,7 @@ rpmvendor() ...@@ -33,7 +33,7 @@ rpmvendor()
[ "$DISTRIB_ID" = "LinuxXP" ] && echo "lxp" && return [ "$DISTRIB_ID" = "LinuxXP" ] && echo "lxp" && return
[ "$DISTRIB_ID" = "TinyCoreLinux" ] && echo "tcl" && return [ "$DISTRIB_ID" = "TinyCoreLinux" ] && echo "tcl" && return
[ "$DISTRIB_ID" = "VoidLinux" ] && echo "void" && return [ "$DISTRIB_ID" = "VoidLinux" ] && echo "void" && return
echo "$DISTRIB_ID" | tr "[A-Z]" "[a-z]" echo "$DISTRIB_ID" | tr "A-Z" "a-z"
} }
# Translate DISTRIB_ID name to package manner (like in the package release name) # Translate DISTRIB_ID name to package manner (like in the package release name)
......
...@@ -356,7 +356,7 @@ check_option() ...@@ -356,7 +356,7 @@ check_option()
check_filenames() check_filenames()
{ {
local opt local opt
for opt in $* ; do for opt in "$@" ; do
# files can be with full path or have extension via . # files can be with full path or have extension via .
if [ -f "$opt" ] && echo "$opt" | grep -q "[/\.]" ; then if [ -f "$opt" ] && echo "$opt" | grep -q "[/\.]" ; then
pkg_files="$pkg_files $opt" pkg_files="$pkg_files $opt"
...@@ -406,7 +406,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names") ...@@ -406,7 +406,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
if [ -z "$epm_cmd" ] ; then if [ -z "$epm_cmd" ] ; then
print_version print_version
echo echo
fatstr="Unknown command in $@ arg(s)" fatstr="Unknown command in $* arg(s)"
[ -n "$*" ] || fatstr="That program needs be running with some command" [ -n "$*" ] || fatstr="That program needs be running with some command"
fatal "$fatstr. Run $ $PROGNAME --help to get help." fatal "$fatstr. Run $ $PROGNAME --help to get help."
fi fi
......
...@@ -33,7 +33,7 @@ epm_Install() ...@@ -33,7 +33,7 @@ epm_Install()
yum-rpm) yum-rpm)
;; ;;
*) *)
pkg_filenames= epm_update || return pkg_filenames='' epm_update || return
;; ;;
esac esac
......
...@@ -26,7 +26,7 @@ epm_Upgrade() ...@@ -26,7 +26,7 @@ epm_Upgrade()
yum-rpm) yum-rpm)
;; ;;
*) *)
pkg_filenames= epm_update || return pkg_filenames='' epm_update || return
;; ;;
esac esac
......
...@@ -46,7 +46,7 @@ case $DISTRNAME in ...@@ -46,7 +46,7 @@ case $DISTRNAME in
;; ;;
autoimports) autoimports)
[ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION" [ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
repo="$repo.$(echo "$DISTRVERSION" | tr "[A-Z]" "[a-z]")" repo="$repo.$(echo "$DISTRVERSION" | tr "A-Z" "a-z")"
esac esac
assure_exists apt-repo assure_exists apt-repo
......
...@@ -43,7 +43,7 @@ case $PMTYPE in ...@@ -43,7 +43,7 @@ case $PMTYPE in
apt-dpkg|aptitude-dpkg) apt-dpkg|aptitude-dpkg)
assure_exists deborphan assure_exists deborphan
showcmd deborphan showcmd deborphan
a= deborphan | docmd epm remove a='' deborphan | docmd epm remove
;; ;;
#aura) #aura)
# sudocmd aura -Oj # sudocmd aura -Oj
......
...@@ -61,7 +61,7 @@ update_repo_if_needed() ...@@ -61,7 +61,7 @@ update_repo_if_needed()
cd / cd /
if ! __is_repo_info_downloaded || ! __is_repo_info_uptodate ; then if ! __is_repo_info_downloaded || ! __is_repo_info_uptodate ; then
load_helper epm-update load_helper epm-update
pkg_filenames= epm_update pkg_filenames='' epm_update
fi fi
cd - >/dev/null cd - >/dev/null
......
...@@ -26,7 +26,7 @@ epm_checksystem_ALTLinux() ...@@ -26,7 +26,7 @@ epm_checksystem_ALTLinux()
touch $TDIR/added touch $TDIR/added
for ft in $(ls /usr/lib/rpm/*.filetrigger | sort) ; do for ft in $(ls /usr/lib/rpm/*.filetrigger | sort) ; do
echo "Try run $ft ..." echo "Try run $ft ..."
echo $TDIR/added $TDIR/removed | a= time $ft echo $TDIR/added $TDIR/removed | a='' time $ft
done done
rm -f $TDIR/added fatal rm -f $TDIR/added fatal
rmdir $TDIR || fatal rmdir $TDIR || fatal
......
...@@ -70,7 +70,7 @@ case $PMTYPE in ...@@ -70,7 +70,7 @@ case $PMTYPE in
# FIXME: need fix for a few names case # FIXME: need fix for a few names case
if is_installed $pkg_names ; then if is_installed $pkg_names ; then
showcmd dpkg -s $pkg_names showcmd dpkg -s $pkg_names
a= dpkg -s $pkg_names | grep "^Conflicts:" | sed "s|^Conflicts:||g" a='' dpkg -s $pkg_names | grep "^Conflicts:" | sed "s|^Conflicts:||g"
return return
else else
EXTRA_SHOWDOCMD=' | grep "Conflicts:"' EXTRA_SHOWDOCMD=' | grep "Conflicts:"'
......
...@@ -44,7 +44,7 @@ __alt_local_content_filelist() ...@@ -44,7 +44,7 @@ __alt_local_content_filelist()
__deb_local_content_filelist() __deb_local_content_filelist()
{ {
showcmd "apt-file list $1 | grep '^$1: ' | sed -e 's|$1: ||g'" showcmd "apt-file list $1 | grep '^$1: ' | sed -e 's|$1: ||g'"
a= apt-file list "$1" | grep "^$1: " | sed -e "s|$1: ||g" a='' apt-file list "$1" | grep "^$1: " | sed -e "s|$1: ||g"
} }
......
...@@ -28,19 +28,25 @@ __epm_info_rpm_low() ...@@ -28,19 +28,25 @@ __epm_info_rpm_low()
is_installed $pkg_names && docmd rpm -qi $pkg_names && return is_installed $pkg_names && docmd rpm -qi $pkg_names && return
} }
# TODO: separate to _files and _names parts __epm_info_by_pkgtype()
# implement _files part per package, not by PMTYPE (see filelist)
epm_info()
{ {
[ -n "$pkg_files" ] || return 1
# if possible, it will put pkg_urls into pkg_files or pkg_names case $(get_package_type $pkg_files) in
if [ -n "$pkg_urls" ] ; then rpm)
load_helper epm-download __epm_info_rpm_low && return
__handle_pkg_urls_to_checking ;;
fi deb)
docmd dpkg -I $pkg_files
[ -n "$pkg_filenames" ] || fatal "Info: missing package(s) name" ;;
*)
return 1
;;
esac
}
__epm_info_by_pmtype()
{
case $PMTYPE in case $PMTYPE in
apt-rpm) apt-rpm)
__epm_info_rpm_low && return __epm_info_rpm_low && return
...@@ -122,6 +128,23 @@ case $PMTYPE in ...@@ -122,6 +128,23 @@ case $PMTYPE in
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
;; ;;
esac esac
}
# TODO: separate to _files and _names parts
# implement _files part per package, not by PMTYPE (see filelist)
epm_info()
{
# if possible, it will put pkg_urls into pkg_files or pkg_names
if [ -n "$pkg_urls" ] ; then
load_helper epm-download
__handle_pkg_urls_to_checking
fi
[ -n "$pkg_filenames" ] || fatal "Info: missing package(s) name"
__epm_info_by_pkgtype || __epm_info_by_pmtype
local RETVAL=$? local RETVAL=$?
......
...@@ -47,7 +47,7 @@ filter_out_installed_packages() ...@@ -47,7 +47,7 @@ filter_out_installed_packages()
# for zypper before SUSE/11.0 # for zypper before SUSE/11.0
__use_zypper_no_gpg_checks() __use_zypper_no_gpg_checks()
{ {
a= zypper install --help 2>&1 | grep -q -- "--no-gpg-checks" && echo "--no-gpg-checks" a='' zypper install --help 2>&1 | grep -q -- "--no-gpg-checks" && echo "--no-gpg-checks"
} }
# args: cmd_reinstall, cmd_install, packages # args: cmd_reinstall, cmd_install, packages
......
...@@ -25,7 +25,7 @@ __repack_rpm_base() ...@@ -25,7 +25,7 @@ __repack_rpm_base()
cd /var/lib/rpm || fatal cd /var/lib/rpm || fatal
mv Packages Packages.BACKUP || fatal mv Packages Packages.BACKUP || fatal
# mask dependencies with a= # mask dependencies with a=
a= db_dump Packages.BACKUP | a= db_load Packages || fatal a='' db_dump Packages.BACKUP | a= db_load Packages || fatal
rm Packages.BACKUP rm Packages.BACKUP
} }
......
...@@ -76,7 +76,7 @@ print_pkgname() ...@@ -76,7 +76,7 @@ print_pkgname()
print_srcname() print_srcname()
{ {
print_name $(print_srcpkgname "$@") print_name "$(print_srcpkgname "$@")"
} }
print_specname() print_specname()
...@@ -137,7 +137,7 @@ EOF ...@@ -137,7 +137,7 @@ EOF
"name") "name")
[ -n "$1" ] || fatal "Arg is missed" [ -n "$1" ] || fatal "Arg is missed"
if [ -n "$FNFLAG" ] ; then if [ -n "$FNFLAG" ] ; then
print_name $(print_pkgname "$@") print_name "$(print_pkgname "$@")"
elif [ -n "$PKFLAG" ] ; then elif [ -n "$PKFLAG" ] ; then
query_package_field "name" "$@" query_package_field "name" "$@"
else else
...@@ -147,7 +147,7 @@ EOF ...@@ -147,7 +147,7 @@ EOF
"version") "version")
[ -n "$1" ] || fatal "Arg is missed" [ -n "$1" ] || fatal "Arg is missed"
if [ -n "$FNFLAG" ] ; then if [ -n "$FNFLAG" ] ; then
print_version $(print_pkgname "$@") print_version "$(print_pkgname "$@")"
elif [ -n "$PKFLAG" ] ; then elif [ -n "$PKFLAG" ] ; then
query_package_field "version" "$@" query_package_field "version" "$@"
else else
...@@ -157,7 +157,7 @@ EOF ...@@ -157,7 +157,7 @@ EOF
"release") "release")
[ -n "$1" ] || fatal "Arg is missed" [ -n "$1" ] || fatal "Arg is missed"
if [ -n "$FNFLAG" ] ; then if [ -n "$FNFLAG" ] ; then
print_release $(print_pkgname "$@") print_release "$(print_pkgname "$@")"
elif [ -n "$PKFLAG" ] ; then elif [ -n "$PKFLAG" ] ; then
query_package_field "release" "$@" query_package_field "release" "$@"
else else
...@@ -222,6 +222,6 @@ epm_print() ...@@ -222,6 +222,6 @@ epm_print()
{ {
[ -n "$pkg_filenames" ] || fatal "Missed args. Use epm print help for get help." [ -n "$pkg_filenames" ] || fatal "Missed args. Use epm print help for get help."
__epm_print $(eval echo $quoted_args) __epm_print "$(eval echo $quoted_args)"
} }
...@@ -120,11 +120,12 @@ __epm_get_hilevel_name() ...@@ -120,11 +120,12 @@ __epm_get_hilevel_name()
for i in $@ ; do for i in $@ ; do
local pkg local pkg
# get short form in pkg # get short form in pkg
quiet=1 pkg=$(__epm_query_shortname $i) || continue # drop not installed packages # FIXME: where we use it? continue or pkg=$i?
quiet=1 pkg=$(__epm_query_shortname "$i") || pkg="$i" #continue # drop not installed packages
# if already short form, skipped # if already short form, skipped
[ "$pkg" = "$i" ] && echo "$i" && continue [ "$pkg" = "$i" ] && echo "$i" && continue
# try get long form or use short form # try get long form or use short form
__epm_get_hilevel_nameform $i || echo $pkg __epm_get_hilevel_nameform "$i" || echo $pkg
done done
} }
...@@ -156,7 +157,7 @@ __epm_query_dpkg_check() ...@@ -156,7 +157,7 @@ __epm_query_dpkg_check()
{ {
local i local i
for i in $@ ; do for i in $@ ; do
a= dpkg -s $i >/dev/null 2>/dev/null || return a='' dpkg -s $i >/dev/null 2>/dev/null || return
done done
return 0 return 0
} }
...@@ -189,6 +190,10 @@ __epm_query_name() ...@@ -189,6 +190,10 @@ __epm_query_name()
docmd brew info "$1" >/dev/null 2>/dev/null && echo "$1" && return docmd brew info "$1" >/dev/null 2>/dev/null && echo "$1" && return
return 1 return 1
;; ;;
pacman)
docmd pacman -Q $@
return
;;
# TODO: need to print name if exists # TODO: need to print name if exists
#pkgng) #pkgng)
# CMD="pkg info -e" # CMD="pkg info -e"
...@@ -231,6 +236,12 @@ __epm_query_shortname() ...@@ -231,6 +236,12 @@ __epm_query_shortname()
docmd brew info "$1" >/dev/null 2>/dev/null && echo "$1" && return docmd brew info "$1" >/dev/null 2>/dev/null && echo "$1" && return
return 1 return 1
;; ;;
# TODO: check status
#pacman)
# docmd pacman -Q $@ | sed -e "s| .*||g"
# return
# ;;
# TODO: need to print name if exists # TODO: need to print name if exists
#pkgng) #pkgng)
# CMD="pkg info -e" # CMD="pkg info -e"
...@@ -249,7 +260,7 @@ __epm_query_shortname() ...@@ -249,7 +260,7 @@ __epm_query_shortname()
# check if pkg is installed # check if pkg is installed
is_installed() is_installed()
{ {
__epm_query_shortname $pkg_names >/dev/null 2>/dev/null __epm_query_shortname "$@" >/dev/null 2>/dev/null
# broken way to recursive call here (overhead!) # broken way to recursive call here (overhead!)
#epm installed $@ >/dev/null 2>/dev/null #epm installed $@ >/dev/null 2>/dev/null
} }
......
...@@ -33,5 +33,5 @@ epm_query_package() ...@@ -33,5 +33,5 @@ epm_query_package()
MGS=$(eval __epm_search_make_grep $quoted_args) MGS=$(eval __epm_search_make_grep $quoted_args)
EXTRA_SHOWDOCMD=$MGS EXTRA_SHOWDOCMD=$MGS
# Note: get all packages list and do grep # Note: get all packages list and do grep
eval "pkg_filenames= epm_packages \"$(eval get_firstarg $quoted_args)\" $MGS" eval "pkg_filenames='' epm_packages \"$(eval get_firstarg $quoted_args)\" $MGS"
} }
...@@ -65,7 +65,7 @@ __replace_alt_version_in_repo() ...@@ -65,7 +65,7 @@ __replace_alt_version_in_repo()
#echo "Upgrading $DISTRNAME from $1 to $2 ..." #echo "Upgrading $DISTRNAME from $1 to $2 ..."
docmd apt-repo list | sed -e "s|\($1\)|{\1}->{$2}|g" | egrep --color -- "$1" docmd apt-repo list | sed -e "s|\($1\)|{\1}->{$2}|g" | egrep --color -- "$1"
# ask and replace only we will have changes # ask and replace only we will have changes
if a= apt-repo list | egrep -q -- "$1" ; then if a='' apt-repo list | egrep -q -- "$1" ; then
confirm "Are these correct changes? [y/N]" || fatal "Exiting" confirm "Are these correct changes? [y/N]" || fatal "Exiting"
__replace_text_in_alt_repo "/^ *#/! s!$1!$2!g" __replace_text_in_alt_repo "/^ *#/! s!$1!$2!g"
fi fi
...@@ -76,7 +76,7 @@ __alt_repofix() ...@@ -76,7 +76,7 @@ __alt_repofix()
{ {
load_helper epm-repofix load_helper epm-repofix
showcmd epm repofix showcmd epm repofix
quiet=1 pkg_filenames= epm_repofix >/dev/null quiet=1 pkg_filenames='' epm_repofix >/dev/null
__replace_text_in_alt_repo "/^ *#/! s!\[p[6-9]\]![updates]!g" __replace_text_in_alt_repo "/^ *#/! s!\[p[6-9]\]![updates]!g"
} }
......
...@@ -27,7 +27,7 @@ case $DISTRNAME in ...@@ -27,7 +27,7 @@ case $DISTRNAME in
autoimports) autoimports)
info "remove autoimports repo" info "remove autoimports repo"
[ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION" [ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
repo="$repo.$(echo "$DISTRVERSION" | tr "[A-Z]" "[a-z]")" repo="$repo.$(echo "$DISTRVERSION" | tr "A-Z" "a-z")"
;; ;;
esac esac
......
...@@ -34,7 +34,7 @@ epm_requires_files() ...@@ -34,7 +34,7 @@ epm_requires_files()
;; ;;
deb) deb)
assure_exists dpkg assure_exists dpkg
a= docmd dpkg -I $pkg_files | grep "^ *Depends:" | sed "s|^ *Depends:||g" a='' docmd dpkg -I $pkg_files | grep "^ *Depends:" | sed "s|^ *Depends:||g"
;; ;;
*) *)
fatal "Have no suitable command for $PKGTYPE" fatal "Have no suitable command for $PKGTYPE"
...@@ -44,7 +44,7 @@ epm_requires_files() ...@@ -44,7 +44,7 @@ epm_requires_files()
epm_requires_names() epm_requires_names()
{ {
local pkg_names="$@" local pkg_names="$*"
local CMD local CMD
[ -n "$pkg_names" ] || return [ -n "$pkg_names" ] || return
...@@ -91,7 +91,7 @@ case $PMTYPE in ...@@ -91,7 +91,7 @@ case $PMTYPE in
# FIXME: need fix for a few names case # FIXME: need fix for a few names case
if is_installed $pkg_names ; then if is_installed $pkg_names ; then
showcmd dpkg -s $pkg_names showcmd dpkg -s $pkg_names
a= dpkg -s $pkg_names | grep "^Depends:" | sed "s|^Depends:||g" a='' dpkg -s $pkg_names | grep "^Depends:" | sed "s|^Depends:||g"
return return
else else
CMD="apt-cache depends" CMD="apt-cache depends"
......
...@@ -132,7 +132,7 @@ __epm_search_make_grep() ...@@ -132,7 +132,7 @@ __epm_search_make_grep()
#list=$(strip_spaces $list | sed -e "s/ /|/g") #list=$(strip_spaces $list | sed -e "s/ /|/g")
listN=$(strip_spaces $listN | sed -e "s/ /|/g" | sed -e "s/\^//g") listN=$(strip_spaces $listN | sed -e "s/ /|/g" | sed -e "s/\^//g")
if [ "$short" ] ; then if [ -n "$short" ] ; then
echon " | sed -e \"s| .*||g\"" echon " | sed -e \"s| .*||g\""
fi fi
......
...@@ -41,10 +41,10 @@ __local_ercat() ...@@ -41,10 +41,10 @@ __local_ercat()
for i in $* ; do for i in $* ; do
case "$i" in case "$i" in
*.xz) *.xz)
a= xzcat $i a='' xzcat $i
;; ;;
*.lz4) *.lz4)
a= lz4cat $i a='' lz4cat $i
;; ;;
*.failed) *.failed)
# just ignore # just ignore
...@@ -63,11 +63,11 @@ compress_file_inplace() ...@@ -63,11 +63,11 @@ compress_file_inplace()
if epm assure lz4 </dev/null ; then if epm assure lz4 </dev/null ; then
#docmd lz4 --rm "$OFILE" "$OFILE.lz4" || return #docmd lz4 --rm "$OFILE" "$OFILE.lz4" || return
# due old lz4 # due old lz4
docmd lz4 "$OFILE" "$OFILE.lz4" || return docmd lz4 -f "$OFILE" "$OFILE.lz4" || return
rm -fv "$OFILE" rm -fv "$OFILE"
else else
epm assure xz </dev/null || return epm assure xz </dev/null || return
docmd xz "$OFILE" || return docmd xz -f "$OFILE" || return
fi fi
return 0 return 0
} }
...@@ -91,11 +91,12 @@ download_alt_contents_index() ...@@ -91,11 +91,12 @@ download_alt_contents_index()
if echo "$URL" | grep -q "^file:/" ; then if echo "$URL" | grep -q "^file:/" ; then
URL=$(echo "$URL" | sed -e "s|^file:||") URL=$(echo "$URL" | sed -e "s|^file:||")
[ -s "$URL" ] || { touch $OFILE.failed ; return 1; } [ -s "$URL" ] || { touch $OFILE.failed ; return 1; }
ln -s "$URL" "$OFILE" || { touch $OFILE.failed ; return 1; } ln -sf "$URL" "$OFILE" || { touch $OFILE.failed ; return 1; }
else else
docmd eget -O "$OFILE" "$URL" || { rm -fv $OFILE ; touch $OFILE.failed ; return 1; } docmd eget -O "$OFILE" "$URL" || { rm -fv $OFILE ; touch $OFILE.failed ; return 1; }
fi fi
rm -f $OFILE.failed
compress_file_inplace "$OFILE" compress_file_inplace "$OFILE"
} }
......
...@@ -522,7 +522,7 @@ is_active_systemd() ...@@ -522,7 +522,7 @@ is_active_systemd()
SYSTEMD_CGROUP_DIR=/sys/fs/cgroup/systemd SYSTEMD_CGROUP_DIR=/sys/fs/cgroup/systemd
[ -x "$SYSTEMCTL" ] || return [ -x "$SYSTEMCTL" ] || return
[ -d "$SYSTEMD_CGROUP_DIR" ] || return [ -d "$SYSTEMD_CGROUP_DIR" ] || return
a= mountpoint -q "$SYSTEMD_CGROUP_DIR" || return a='' mountpoint -q "$SYSTEMD_CGROUP_DIR" || return
readlink /sbin/init | grep -q 'systemd' || return readlink /sbin/init | grep -q 'systemd' || return
# some hack # some hack
ps ax | grep '[s]ystemd' | grep -q -v 'systemd-udev' ps ax | grep '[s]ystemd' | grep -q -v 'systemd-udev'
......
...@@ -23,12 +23,12 @@ load_helper epm-search ...@@ -23,12 +23,12 @@ load_helper epm-search
# for zypper before SUSE/11.0 # for zypper before SUSE/11.0
__use_zypper_dry_run() __use_zypper_dry_run()
{ {
a= zypper install --help 2>&1 | grep -q -- "--dry-run" && echo "--dry-run" a='' zypper install --help 2>&1 | grep -q -- "--dry-run" && echo "--dry-run"
} }
__use_yum_assumeno() __use_yum_assumeno()
{ {
a= yum --help 2>&1 | grep -q -- "--assumeno" a='' yum --help 2>&1 | grep -q -- "--assumeno"
} }
......
...@@ -27,7 +27,7 @@ paoapi() ...@@ -27,7 +27,7 @@ paoapi()
# http://petstore.swagger.io/?url=http://packages.altlinux.org/api/docs # http://petstore.swagger.io/?url=http://packages.altlinux.org/api/docs
epm assure curl || return 1 epm assure curl || return 1
showcmd curl "$PAOURL/api/$1" showcmd curl "$PAOURL/api/$1"
a= curl -s --header "Accept: application/json" "$PAOURL/api/$1" a='' curl -s --header "Accept: application/json" "$PAOURL/api/$1"
} }
# TODO: use /home/lav/Projects/git/JSON.sh # TODO: use /home/lav/Projects/git/JSON.sh
...@@ -87,7 +87,7 @@ query_package_url() ...@@ -87,7 +87,7 @@ query_package_url()
get_locale() get_locale()
{ {
local loc local loc
loc=$(a= natspec --locale 2>/dev/null) loc=$(a='' natspec --locale 2>/dev/null)
[ -n "$loc" ] || loc=$LANG [ -n "$loc" ] || loc=$LANG
echo $loc echo $loc
} }
......
...@@ -81,7 +81,7 @@ epm_upgrade() ...@@ -81,7 +81,7 @@ epm_upgrade()
;; ;;
homebrew) homebrew)
#CMD="brew upgrade" #CMD="brew upgrade"
docmd "brew upgrade `brew outdated`" docmd "brew upgrade $(brew outdated)"
return return
;; ;;
ipkg) ipkg)
......
...@@ -61,13 +61,13 @@ is_service_autostart() ...@@ -61,13 +61,13 @@ is_service_autostart()
LANG=C $SUDO chkconfig $1 --list | grep -q "[35]:on" LANG=C $SUDO chkconfig $1 --list | grep -q "[35]:on"
;; ;;
service-initd|service-update) service-initd|service-update)
test -L $(echo /etc/rc5.d/S??$1) test -L "$(echo /etc/rc5.d/S??$1)"
;; ;;
systemd) systemd)
$SUDO systemctl is-enabled $1 $SUDO systemctl is-enabled $1
;; ;;
runit) runit)
test -L /var/service/$SERVICE test -L "/var/service/$SERVICE"
;; ;;
*) *)
fatal "Have no suitable command for $SERVICETYPE" fatal "Have no suitable command for $SERVICETYPE"
...@@ -94,7 +94,7 @@ serv_status() ...@@ -94,7 +94,7 @@ serv_status()
sudocmd $INITDIR/$SERVICE status "$@" sudocmd $INITDIR/$SERVICE status "$@"
;; ;;
systemd) systemd)
sudocmd systemctl status $SERVICE "$@" sudocmd systemctl -l status $SERVICE "$@"
;; ;;
runit) runit)
sudocmd sv status "$SERVICE" sudocmd sv status "$SERVICE"
......
...@@ -3,5 +3,15 @@ ...@@ -3,5 +3,15 @@
# http://mywiki.wooledge.org/Bashism # http://mywiki.wooledge.org/Bashism
# https://wiki.ubuntu.com/DashAsBinSh # https://wiki.ubuntu.com/DashAsBinSh
EXCL=-eSC2086,SC2039,SC2034,SC2068,SC2155
if [ -n "$1" ] ; then
shellcheck $EXCL "$1"
exit
fi
checkbashisms -f bin/* checkbashisms -f bin/*
checkbashisms -f Makefile checkbashisms -f Makefile
shellcheck $EXCL \
bin/epm bin/distr_info bin/epm-* bin/serv-* bin/tools_*
# This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils. # This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils.
# #
Name: eepm Name: eepm
Version: 2.0.6 Version: 2.0.8
Release: alt0.M80P.1 Release: alt0.M80P.1
Summary: Etersoft EPM package manager Summary: Etersoft EPM package manager
...@@ -68,9 +68,20 @@ chmod a+x %buildroot%_datadir/%name/tools_* ...@@ -68,9 +68,20 @@ chmod a+x %buildroot%_datadir/%name/tools_*
%_sysconfdir/bash_completion.d/cerv %_sysconfdir/bash_completion.d/cerv
%changelog %changelog
* Mon Mar 13 2017 Vitaly Lipatov <lav@altlinux.ru> 2.0.6-alt0.M80P.1 * Thu Jun 15 2017 Vitaly Lipatov <lav@altlinux.ru> 2.0.8-alt0.M80P.1
- backport to ALTLinux p8 (by rpmbph script) - backport to ALTLinux p8 (by rpmbph script)
* Thu Jun 15 2017 Vitaly Lipatov <lav@altlinux.ru> 2.0.8-alt1
- make shellcheck more happy
- improve epm query
- epm-search-file: force overwrite list file
- epm-info: add support for local rpm and deb files
* Wed Apr 05 2017 Vitaly Lipatov <lav@altlinux.ru> 2.0.7-alt1
- serv-status: use -l for systemd status
- emp-query: improve for pacman
- epm-query: fix is_installed
* Mon Mar 13 2017 Vitaly Lipatov <lav@altlinux.ru> 2.0.6-alt1 * Mon Mar 13 2017 Vitaly Lipatov <lav@altlinux.ru> 2.0.6-alt1
- epm-packages: improve sort output - epm-packages: improve sort output
- hack to support old lz4 - hack to support old lz4
......
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