Commit ca3c2414 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.52.1

parent 0ef69b54
...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR ...@@ -33,7 +33,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.52.0" EPMVERSION="3.52.1"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -1271,6 +1271,9 @@ case $PMTYPE in ...@@ -1271,6 +1271,9 @@ case $PMTYPE in
winget) winget)
sudocmd winget source add "$repo" sudocmd winget source add "$repo"
;; ;;
nix)
sudocmd nix-channel --add "$repo"
;;
termux-pkg) termux-pkg)
sudocmd pkg install "$repo" sudocmd pkg install "$repo"
;; ;;
...@@ -3697,6 +3700,10 @@ epm_install_names() ...@@ -3697,6 +3700,10 @@ epm_install_names()
xbps) xbps)
sudocmd xbps-install $@ sudocmd xbps-install $@
return ;; return ;;
nix)
info "When you ask Nix to install a package, it will first try to get it in pre-compiled form from a binary cache. By default, Nix will use the binary cache https://cache.nixos.org; it contains binaries for most packages in Nixpkgs. Only if no binary is available in the binary cache, Nix will build the package from source."
sudocmd nix-env -iA $@
return ;;
appget|winget) appget|winget)
sudocmd $PMTYPE install $@ sudocmd $PMTYPE install $@
return ;; return ;;
...@@ -4592,6 +4599,9 @@ case $PMTYPE in ...@@ -4592,6 +4599,9 @@ case $PMTYPE in
apk) apk)
CMD="apk list --available" CMD="apk list --available"
;; ;;
nix)
CMD="nix-env -qaP"
;;
appget) appget)
CMD="appget search" CMD="appget search"
;; ;;
...@@ -4998,6 +5008,7 @@ __epm_pack() ...@@ -4998,6 +5008,7 @@ __epm_pack()
{ {
local packname="$1" local packname="$1"
local tarname="$2" local tarname="$2"
local packversion="$3"
returntarname='' returntarname=''
local repackcode="$EPM_PACK_SCRIPTS_DIR/$packname.sh" local repackcode="$EPM_PACK_SCRIPTS_DIR/$packname.sh"
...@@ -5017,7 +5028,7 @@ __epm_pack() ...@@ -5017,7 +5028,7 @@ __epm_pack()
local bashopt='' local bashopt=''
[ -n "$verbose" ] && bashopt='-x' [ -n "$verbose" ] && bashopt='-x'
#info "Running $($script --description 2>/dev/null) ..." #info "Running $($script --description 2>/dev/null) ..."
( unset EPMCURDIR ; docmd $CMDSHELL $bashopt $repackcode "$tarname" "$filefortarname" ) || fatal ( unset EPMCURDIR ; docmd $CMDSHELL $bashopt $repackcode "$tarname" "$filefortarname" "$packversion" ) || fatal
returntarname="$(cat "$filefortarname")" || fatal "pack script $repackcode didn't set tarname" returntarname="$(cat "$filefortarname")" || fatal "pack script $repackcode didn't set tarname"
rm -rf $tmpdir rm -rf $tmpdir
...@@ -5070,11 +5081,12 @@ epm_pack_help() ...@@ -5070,11 +5081,12 @@ epm_pack_help()
{ {
cat <<EOF cat <<EOF
epm pack - create rpm package from files epm pack - create rpm package from files
Usage: epm pack [options] <packname> <tar|url|dir> Usage: epm pack [options] <packname> <tar|url|dir> [version]
Options: Options:
<packname> - receipt <packname> - receipt
<dir> - create tarball from the dir before <dir> - create tarball from the dir before
<url> - download tar from url <url> - download tar from url
[version] - force version for unversioned sources
--install - install after pack result --install - install after pack result
--repack - force repack ever if returned package can be installed without repack --repack - force repack ever if returned package can be installed without repack
--download-only - save pack result and exit --download-only - save pack result and exit
...@@ -5095,6 +5107,7 @@ epm_pack() ...@@ -5095,6 +5107,7 @@ epm_pack()
local packname="$1" local packname="$1"
local tarname="$2" local tarname="$2"
local packversion="$3"
[ -n "$packname" ] || fatal "run with packname, see --help" [ -n "$packname" ] || fatal "run with packname, see --help"
...@@ -5114,7 +5127,7 @@ epm_pack() ...@@ -5114,7 +5127,7 @@ epm_pack()
true true
fi fi
__epm_pack "$packname" "$tarname" __epm_pack "$packname" "$tarname" "$packversion"
} }
...@@ -5249,6 +5262,9 @@ case $PMTYPE in ...@@ -5249,6 +5262,9 @@ case $PMTYPE in
apk) apk)
CMD="apk list --installed" CMD="apk list --installed"
;; ;;
nix)
CMD="nix-env -q"
;;
tce) tce)
CMD="ls -1 /usr/local/tce.installed" CMD="ls -1 /usr/local/tce.installed"
;; ;;
...@@ -11402,6 +11418,9 @@ case $PMTYPE in ...@@ -11402,6 +11418,9 @@ case $PMTYPE in
apk) apk)
sudocmd apk update sudocmd apk update
;; ;;
nix)
sudocmd nix-channel --update
;;
pkgsrc) pkgsrc)
# portsnap extract for the first time? # portsnap extract for the first time?
sudocmd portsnap fetch update sudocmd portsnap fetch update
...@@ -11576,6 +11595,9 @@ epm_upgrade() ...@@ -11576,6 +11595,9 @@ epm_upgrade()
xbps) xbps)
CMD="xbps-install -Su" CMD="xbps-install -Su"
;; ;;
nix)
CMD="nix-env -u $dryrun"
;;
termux-pkg) termux-pkg)
CMD="pkg upgrade" CMD="pkg upgrade"
;; ;;
...@@ -11909,6 +11931,9 @@ case $DISTRIB_ID in ...@@ -11909,6 +11931,9 @@ case $DISTRIB_ID in
GNU/Linux/Guix) GNU/Linux/Guix)
CMD="guix" CMD="guix"
;; ;;
NixOS)
CMD="nix"
;;
Android) Android)
CMD="android" CMD="android"
# TODO: CMD="termux-pkg" # TODO: CMD="termux-pkg"
...@@ -11944,7 +11969,7 @@ case $DISTRIB_ID in ...@@ -11944,7 +11969,7 @@ case $DISTRIB_ID in
is_command "apt-get" && echo "apt-dpkg" && return is_command "apt-get" && echo "apt-dpkg" && return
fi fi
echo "We don't support yet DISTRIB_ID $DISTRIB_ID" >&2 echo "pkgmanager(): We don't support yet DISTRIB_ID $DISTRIB_ID" >&2
;; ;;
esac esac
echo "$CMD" echo "$CMD"
...@@ -11975,7 +12000,7 @@ pkgtype() ...@@ -11975,7 +12000,7 @@ pkgtype()
*-rpm) *-rpm)
echo "rpm" ;; echo "rpm" ;;
*) *)
echo "rpm" ;; echo "" ;;
esac esac
esac esac
} }
......
...@@ -1649,6 +1649,9 @@ case $DISTRIB_ID in ...@@ -1649,6 +1649,9 @@ case $DISTRIB_ID in
GNU/Linux/Guix) GNU/Linux/Guix)
CMD="guix" CMD="guix"
;; ;;
NixOS)
CMD="nix"
;;
Android) Android)
CMD="android" CMD="android"
# TODO: CMD="termux-pkg" # TODO: CMD="termux-pkg"
...@@ -1684,7 +1687,7 @@ case $DISTRIB_ID in ...@@ -1684,7 +1687,7 @@ case $DISTRIB_ID in
is_command "apt-get" && echo "apt-dpkg" && return is_command "apt-get" && echo "apt-dpkg" && return
fi fi
echo "We don't support yet DISTRIB_ID $DISTRIB_ID" >&2 echo "pkgmanager(): We don't support yet DISTRIB_ID $DISTRIB_ID" >&2
;; ;;
esac esac
echo "$CMD" echo "$CMD"
...@@ -1715,7 +1718,7 @@ pkgtype() ...@@ -1715,7 +1718,7 @@ pkgtype()
*-rpm) *-rpm)
echo "rpm" ;; echo "rpm" ;;
*) *)
echo "rpm" ;; echo "" ;;
esac esac
esac esac
} }
...@@ -2574,7 +2577,7 @@ print_version() ...@@ -2574,7 +2577,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.52.0 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.52.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