Commit 26171b6e authored by Vitaly Lipatov's avatar Vitaly Lipatov

backported to p7 as 1.7.2-alt0.M70P.1 (with rpmbph script)

parents c40930b8 f4ade02e
...@@ -51,6 +51,7 @@ pkgtype() ...@@ -51,6 +51,7 @@ pkgtype()
gentoo) echo "tbz2" ;; gentoo) echo "tbz2" ;;
windows) echo "exe" ;; windows) echo "exe" ;;
android) echo "apk" ;; android) echo "apk" ;;
alpine) echo "apk" ;;
cygwin) echo "tar.xz" ;; cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst) echo "deb" ;; debian|ubuntu|mint|runtu|mcst) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles) alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
...@@ -89,9 +90,10 @@ if distro altlinux-release ; then ...@@ -89,9 +90,10 @@ if distro altlinux-release ; then
if has Sisyphus ; then DISTRIB_RELEASE="Sisyphus" if has Sisyphus ; then DISTRIB_RELEASE="Sisyphus"
elif has "ALT Linux 7." ; then DISTRIB_RELEASE="p7" elif has "ALT Linux 7." ; then DISTRIB_RELEASE="p7"
elif has "ALT Linux 8." ; then DISTRIB_RELEASE="p8" elif has "ALT Linux 8." ; then DISTRIB_RELEASE="p8"
elif has "Simply Linux 6." ; then DISTRIB_RELEASE="p6"
elif has "Simply Linux 7." ; then DISTRIB_RELEASE="p7" elif has "Simply Linux 7." ; then DISTRIB_RELEASE="p7"
elif has "Simply Linux 8." ; then DISTRIB_RELEASE="p8" elif has "Simply Linux 8." ; then DISTRIB_RELEASE="p8"
elif has "ALT Linux 6.0" ; then DISTRIB_RELEASE="p6" elif has "ALT Linux 6." ; then DISTRIB_RELEASE="p6"
elif has "ALT Linux p8" ; then DISTRIB_RELEASE="p8" elif has "ALT Linux p8" ; then DISTRIB_RELEASE="p8"
elif has "ALT Linux p7" ; then DISTRIB_RELEASE="p7" elif has "ALT Linux p7" ; then DISTRIB_RELEASE="p7"
elif has "ALT Linux p6" ; then DISTRIB_RELEASE="p6" elif has "ALT Linux p6" ; then DISTRIB_RELEASE="p6"
...@@ -130,6 +132,11 @@ elif distro slackware-version ; then ...@@ -130,6 +132,11 @@ elif distro slackware-version ; then
DISTRIB_ID="Slackware" DISTRIB_ID="Slackware"
DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)" DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)"
elif distro os-release && which apk 2>/dev/null >/dev/null ; then
. $ROOTDIR/etc/os-release
DISTRIB_ID="$ID"
DISTRIB_RELEASE="$VERSION_ID"
elif distro arch-release ; then elif distro arch-release ; then
DISTRIB_ID="ArchLinux" DISTRIB_ID="ArchLinux"
DISTRIB_RELEASE="2010" DISTRIB_RELEASE="2010"
......
...@@ -163,6 +163,9 @@ epm_install_names() ...@@ -163,6 +163,9 @@ epm_install_names()
nix) nix)
__separate_sudocmd "nix-env --install" "nix-env --upgrade" $@ __separate_sudocmd "nix-env --install" "nix-env --upgrade" $@
return ;; return ;;
apk)
sudocmd apk add $@
return ;;
guix) guix)
__separate_sudocmd "guix package -i" "guix package -i" $@ __separate_sudocmd "guix package -i" "guix package -i" $@
return ;; return ;;
...@@ -231,6 +234,9 @@ epm_ni_install_names() ...@@ -231,6 +234,9 @@ epm_ni_install_names()
nix) nix)
sudocmd nix-env --install $@ sudocmd nix-env --install $@
return ;; return ;;
apk)
sudocmd apk add $@
return ;;
#android) #android)
# sudocmd pm install $@ # sudocmd pm install $@
# return ;; # return ;;
......
...@@ -23,6 +23,11 @@ epm_kernel_update() ...@@ -23,6 +23,11 @@ epm_kernel_update()
case $DISTRNAME in case $DISTRNAME in
ALTLinux) ALTLinux)
load_helper epm-query_package
if ! __epm_query_package kernel-image >/dev/null ; then
info "No installed kernel packages, skipping update"
return
fi
assure_exists update-kernel assure_exists update-kernel
sudocmd update-kernel $pkg_filenames sudocmd update-kernel $pkg_filenames
return ;; return ;;
......
...@@ -122,6 +122,9 @@ case $PMTYPE in ...@@ -122,6 +122,9 @@ case $PMTYPE in
ipkg) ipkg)
CMD="ipkg list" CMD="ipkg list"
;; ;;
apk)
CMD="apk info"
;;
guix) guix)
CMD="guix package -I" CMD="guix package -I"
;; ;;
......
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
load_helper epm-packages load_helper epm-packages
load_helper epm-search load_helper epm-search
__epm_query_package()
{
pkg_filenames="$@" quoted_args="$@" quiet=1 epm_query_package
}
epm_query_package() epm_query_package()
{ {
[ -n "$pkg_filenames" ] || fatal "Please, use search with some argument or run epmqa for get all packages." [ -n "$pkg_filenames" ] || fatal "Please, use search with some argument or run epmqa for get all packages."
......
...@@ -107,6 +107,9 @@ epm_remove_names() ...@@ -107,6 +107,9 @@ epm_remove_names()
nix) nix)
sudocmd nix-env --uninstall $@ sudocmd nix-env --uninstall $@
return ;; return ;;
apk)
sudocmd apk del $@
return ;;
guix) guix)
sudocmd guix package -r $@ sudocmd guix package -r $@
return ;; return ;;
......
...@@ -64,6 +64,9 @@ case $PMTYPE in ...@@ -64,6 +64,9 @@ case $PMTYPE in
mpkg) mpkg)
CMD="mpkg search" CMD="mpkg search"
;; ;;
apk)
CMD="apk search"
;;
conary) conary)
CMD="conary repquery" CMD="conary repquery"
;; ;;
......
...@@ -469,6 +469,9 @@ case $DISTRNAME in ...@@ -469,6 +469,9 @@ case $DISTRNAME in
Cygwin) Cygwin)
CMD="aptcyg" CMD="aptcyg"
;; ;;
alpine)
CMD="apk"
;;
*) *)
fatal "Have no suitable DISTRNAME $DISTRNAME" fatal "Have no suitable DISTRNAME $DISTRNAME"
;; ;;
......
...@@ -80,6 +80,9 @@ case $PMTYPE in ...@@ -80,6 +80,9 @@ case $PMTYPE in
ipkg) ipkg)
sudocmd ipkg update sudocmd ipkg update
;; ;;
apk)
sudocmd apk update
;;
pkgsrc) pkgsrc)
# portsnap extract for the first time? # portsnap extract for the first time?
sudocmd portsnap fetch update sudocmd portsnap fetch update
......
# This spec is backported to ALTLinux p7 automatically by rpmbph script from etersoft-build-utils. # This spec is backported to ALTLinux p7 automatically by rpmbph script from etersoft-build-utils.
# #
Name: eepm Name: eepm
Version: 1.7.0 Version: 1.7.2
Release: alt0.M70P.1 Release: alt0.M70P.1
Summary: Etersoft EPM package manager Summary: Etersoft EPM package manager
...@@ -67,9 +67,17 @@ chmod a+x %buildroot%_datadir/%name/{serv-,epm-}* ...@@ -67,9 +67,17 @@ chmod a+x %buildroot%_datadir/%name/{serv-,epm-}*
%_sysconfdir/bash_completion.d/cerv %_sysconfdir/bash_completion.d/cerv
%changelog %changelog
* Tue Apr 19 2016 Vitaly Lipatov <lav@altlinux.ru> 1.7.0-alt0.M70P.1 * Wed Apr 20 2016 Vitaly Lipatov <lav@altlinux.ru> 1.7.2-alt0.M70P.1
- backport to ALTLinux p7 (by rpmbph script) - backport to ALTLinux p7 (by rpmbph script)
* Wed Apr 20 2016 Vitaly Lipatov <lav@altlinux.ru> 1.7.2-alt1
- distr_info: fix os-release detection
* Wed Apr 20 2016 Vitaly Lipatov <lav@altlinux.ru> 1.7.1-alt1
- epm: added alpine apk package manager install, update, remove, qa, search commands
- fix Simply Linux 6.0 detection
- kernel_update: do not install kernel if it is not installed (for ovz containers)
* Tue Apr 19 2016 Vitaly Lipatov <lav@altlinux.ru> 1.7.0-alt1 * Tue Apr 19 2016 Vitaly Lipatov <lav@altlinux.ru> 1.7.0-alt1
- epm release-upgrade with ALT Linux p8 support - epm release-upgrade with ALT Linux p8 support
- epm-reinstall: add names filtering (to support epmqp some | epm reinstall) - epm-reinstall: add names filtering (to support epmqp some | epm reinstall)
......
...@@ -459,6 +459,9 @@ case $DISTRNAME in ...@@ -459,6 +459,9 @@ case $DISTRNAME in
Cygwin) Cygwin)
CMD="aptcyg" CMD="aptcyg"
;; ;;
alpine)
CMD="apk"
;;
*) *)
fatal "Have no suitable DISTRNAME $DISTRNAME" fatal "Have no suitable DISTRNAME $DISTRNAME"
;; ;;
...@@ -1706,6 +1709,9 @@ epm_install_names() ...@@ -1706,6 +1709,9 @@ epm_install_names()
nix) nix)
__separate_sudocmd "nix-env --install" "nix-env --upgrade" $@ __separate_sudocmd "nix-env --install" "nix-env --upgrade" $@
return ;; return ;;
apk)
sudocmd apk add $@
return ;;
guix) guix)
__separate_sudocmd "guix package -i" "guix package -i" $@ __separate_sudocmd "guix package -i" "guix package -i" $@
return ;; return ;;
...@@ -1773,6 +1779,9 @@ epm_ni_install_names() ...@@ -1773,6 +1779,9 @@ epm_ni_install_names()
nix) nix)
sudocmd nix-env --install $@ sudocmd nix-env --install $@
return ;; return ;;
apk)
sudocmd apk add $@
return ;;
#android) #android)
# sudocmd pm install $@ # sudocmd pm install $@
# return ;; # return ;;
...@@ -2088,6 +2097,11 @@ epm_kernel_update() ...@@ -2088,6 +2097,11 @@ epm_kernel_update()
case $DISTRNAME in case $DISTRNAME in
ALTLinux) ALTLinux)
load_helper epm-query_package
if ! __epm_query_package kernel-image >/dev/null ; then
info "No installed kernel packages, skipping update"
return
fi
assure_exists update-kernel assure_exists update-kernel
sudocmd update-kernel $pkg_filenames sudocmd update-kernel $pkg_filenames
return ;; return ;;
...@@ -2236,6 +2250,9 @@ case $PMTYPE in ...@@ -2236,6 +2250,9 @@ case $PMTYPE in
ipkg) ipkg)
CMD="ipkg list" CMD="ipkg list"
;; ;;
apk)
CMD="apk info"
;;
guix) guix)
CMD="guix package -I" CMD="guix package -I"
;; ;;
...@@ -2966,6 +2983,11 @@ epm_query_file() ...@@ -2966,6 +2983,11 @@ epm_query_file()
# File bin/epm-query_package: # File bin/epm-query_package:
__epm_query_package()
{
pkg_filenames="$@" quoted_args="$@" quiet=1 epm_query_package
}
epm_query_package() epm_query_package()
{ {
[ -n "$pkg_filenames" ] || fatal "Please, use search with some argument or run epmqa for get all packages." [ -n "$pkg_filenames" ] || fatal "Please, use search with some argument or run epmqa for get all packages."
...@@ -3262,6 +3284,9 @@ epm_remove_names() ...@@ -3262,6 +3284,9 @@ epm_remove_names()
nix) nix)
sudocmd nix-env --uninstall $@ sudocmd nix-env --uninstall $@
return ;; return ;;
apk)
sudocmd apk del $@
return ;;
guix) guix)
sudocmd guix package -r $@ sudocmd guix package -r $@
return ;; return ;;
...@@ -3693,6 +3718,9 @@ case $PMTYPE in ...@@ -3693,6 +3718,9 @@ case $PMTYPE in
mpkg) mpkg)
CMD="mpkg search" CMD="mpkg search"
;; ;;
apk)
CMD="apk search"
;;
conary) conary)
CMD="conary repquery" CMD="conary repquery"
;; ;;
...@@ -4194,6 +4222,9 @@ case $PMTYPE in ...@@ -4194,6 +4222,9 @@ case $PMTYPE in
ipkg) ipkg)
sudocmd ipkg update sudocmd ipkg update
;; ;;
apk)
sudocmd apk update
;;
pkgsrc) pkgsrc)
# portsnap extract for the first time? # portsnap extract for the first time?
sudocmd portsnap fetch update sudocmd portsnap fetch update
...@@ -4446,6 +4477,7 @@ pkgtype() ...@@ -4446,6 +4477,7 @@ pkgtype()
gentoo) echo "tbz2" ;; gentoo) echo "tbz2" ;;
windows) echo "exe" ;; windows) echo "exe" ;;
android) echo "apk" ;; android) echo "apk" ;;
alpine) echo "apk" ;;
cygwin) echo "tar.xz" ;; cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst) echo "deb" ;; debian|ubuntu|mint|runtu|mcst) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles) alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
...@@ -4484,9 +4516,10 @@ if distro altlinux-release ; then ...@@ -4484,9 +4516,10 @@ if distro altlinux-release ; then
if has Sisyphus ; then DISTRIB_RELEASE="Sisyphus" if has Sisyphus ; then DISTRIB_RELEASE="Sisyphus"
elif has "ALT Linux 7." ; then DISTRIB_RELEASE="p7" elif has "ALT Linux 7." ; then DISTRIB_RELEASE="p7"
elif has "ALT Linux 8." ; then DISTRIB_RELEASE="p8" elif has "ALT Linux 8." ; then DISTRIB_RELEASE="p8"
elif has "Simply Linux 6." ; then DISTRIB_RELEASE="p6"
elif has "Simply Linux 7." ; then DISTRIB_RELEASE="p7" elif has "Simply Linux 7." ; then DISTRIB_RELEASE="p7"
elif has "Simply Linux 8." ; then DISTRIB_RELEASE="p8" elif has "Simply Linux 8." ; then DISTRIB_RELEASE="p8"
elif has "ALT Linux 6.0" ; then DISTRIB_RELEASE="p6" elif has "ALT Linux 6." ; then DISTRIB_RELEASE="p6"
elif has "ALT Linux p8" ; then DISTRIB_RELEASE="p8" elif has "ALT Linux p8" ; then DISTRIB_RELEASE="p8"
elif has "ALT Linux p7" ; then DISTRIB_RELEASE="p7" elif has "ALT Linux p7" ; then DISTRIB_RELEASE="p7"
elif has "ALT Linux p6" ; then DISTRIB_RELEASE="p6" elif has "ALT Linux p6" ; then DISTRIB_RELEASE="p6"
...@@ -4525,6 +4558,11 @@ elif distro slackware-version ; then ...@@ -4525,6 +4558,11 @@ elif distro slackware-version ; then
DISTRIB_ID="Slackware" DISTRIB_ID="Slackware"
DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)" DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)"
elif distro os-release && which apk 2>/dev/null >/dev/null ; then
. $ROOTDIR/etc/os-release
DISTRIB_ID="$ID"
DISTRIB_RELEASE="$VERSION_ID"
elif distro arch-release ; then elif distro arch-release ; then
DISTRIB_ID="ArchLinux" DISTRIB_ID="ArchLinux"
DISTRIB_RELEASE="2010" DISTRIB_RELEASE="2010"
...@@ -4740,7 +4778,7 @@ $(get_help HELPOPT) ...@@ -4740,7 +4778,7 @@ $(get_help HELPOPT)
print_version() print_version()
{ {
echo "EPM package manager version 1.7.0" echo "EPM package manager version 1.7.2"
echo "Running on $($DISTRVENDOR) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)" echo "Running on $($DISTRVENDOR) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)"
echo "Copyright (c) Etersoft 2012-2016" echo "Copyright (c) Etersoft 2012-2016"
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."
......
...@@ -457,6 +457,9 @@ case $DISTRNAME in ...@@ -457,6 +457,9 @@ case $DISTRNAME in
Cygwin) Cygwin)
CMD="aptcyg" CMD="aptcyg"
;; ;;
alpine)
CMD="apk"
;;
*) *)
fatal "Have no suitable DISTRNAME $DISTRNAME" fatal "Have no suitable DISTRNAME $DISTRNAME"
;; ;;
...@@ -871,6 +874,7 @@ pkgtype() ...@@ -871,6 +874,7 @@ pkgtype()
gentoo) echo "tbz2" ;; gentoo) echo "tbz2" ;;
windows) echo "exe" ;; windows) echo "exe" ;;
android) echo "apk" ;; android) echo "apk" ;;
alpine) echo "apk" ;;
cygwin) echo "tar.xz" ;; cygwin) echo "tar.xz" ;;
debian|ubuntu|mint|runtu|mcst) echo "deb" ;; debian|ubuntu|mint|runtu|mcst) echo "deb" ;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles) alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles)
...@@ -909,9 +913,10 @@ if distro altlinux-release ; then ...@@ -909,9 +913,10 @@ if distro altlinux-release ; then
if has Sisyphus ; then DISTRIB_RELEASE="Sisyphus" if has Sisyphus ; then DISTRIB_RELEASE="Sisyphus"
elif has "ALT Linux 7." ; then DISTRIB_RELEASE="p7" elif has "ALT Linux 7." ; then DISTRIB_RELEASE="p7"
elif has "ALT Linux 8." ; then DISTRIB_RELEASE="p8" elif has "ALT Linux 8." ; then DISTRIB_RELEASE="p8"
elif has "Simply Linux 6." ; then DISTRIB_RELEASE="p6"
elif has "Simply Linux 7." ; then DISTRIB_RELEASE="p7" elif has "Simply Linux 7." ; then DISTRIB_RELEASE="p7"
elif has "Simply Linux 8." ; then DISTRIB_RELEASE="p8" elif has "Simply Linux 8." ; then DISTRIB_RELEASE="p8"
elif has "ALT Linux 6.0" ; then DISTRIB_RELEASE="p6" elif has "ALT Linux 6." ; then DISTRIB_RELEASE="p6"
elif has "ALT Linux p8" ; then DISTRIB_RELEASE="p8" elif has "ALT Linux p8" ; then DISTRIB_RELEASE="p8"
elif has "ALT Linux p7" ; then DISTRIB_RELEASE="p7" elif has "ALT Linux p7" ; then DISTRIB_RELEASE="p7"
elif has "ALT Linux p6" ; then DISTRIB_RELEASE="p6" elif has "ALT Linux p6" ; then DISTRIB_RELEASE="p6"
...@@ -950,6 +955,11 @@ elif distro slackware-version ; then ...@@ -950,6 +955,11 @@ elif distro slackware-version ; then
DISTRIB_ID="Slackware" DISTRIB_ID="Slackware"
DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)" DISTRIB_RELEASE="$(grep -Eo [0-9]+\.[0-9]+ $DISTROFILE)"
elif distro os-release && which apk 2>/dev/null >/dev/null ; then
. $ROOTDIR/etc/os-release
DISTRIB_ID="$ID"
DISTRIB_RELEASE="$VERSION_ID"
elif distro arch-release ; then elif distro arch-release ; then
DISTRIB_ID="ArchLinux" DISTRIB_ID="ArchLinux"
DISTRIB_RELEASE="2010" DISTRIB_RELEASE="2010"
...@@ -1225,7 +1235,7 @@ $(get_help HELPOPT) ...@@ -1225,7 +1235,7 @@ $(get_help HELPOPT)
print_version() print_version()
{ {
echo "Service manager version 1.7.0" echo "Service manager version 1.7.2"
echo "Running on $($DISTRVENDOR)" echo "Running on $($DISTRVENDOR)"
echo "Copyright (c) Etersoft 2012, 2013, 2016" echo "Copyright (c) Etersoft 2012, 2013, 2016"
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