Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
e8e5c0b7
Commit
e8e5c0b7
authored
Jul 19, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Plain Diff
backported to p7 as 1.8.6-alt0.M70P.1 (with rpmbph script)
parents
ee51b229
3285b495
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
159 additions
and
38 deletions
+159
-38
TODO
TODO
+1
-0
distr_info
bin/distr_info
+10
-1
epm
bin/epm
+3
-0
epm-autoremove
bin/epm-autoremove
+12
-5
epm-sh-functions
bin/epm-sh-functions
+3
-3
epmrl
bin/epmrl
+2
-0
eepm.spec
eepm.spec
+10
-2
epm.sh
packed/epm.sh
+94
-22
serv.sh
packed/serv.sh
+24
-5
No files found.
TODO
View file @
e8e5c0b7
FIXME: epm-install need realpath, missed on some systems
[18:21:12] <danil> Вот так можно:
[18:21:12] <danil> Вот так можно:
RED='\033[0;31m' ; NC='\033[0m' b="b" ; echo -e "aba" | sed -e "s|${b}|\\${RED}${b}\\${NC}|g" | xargs -0 printf
RED='\033[0;31m' ; NC='\033[0m' b="b" ; echo -e "aba" | sed -e "s|${b}|\\${RED}${b}\\${NC}|g" | xargs -0 printf
...
...
bin/distr_info
View file @
e8e5c0b7
...
@@ -29,6 +29,7 @@ has()
...
@@ -29,6 +29,7 @@ has()
rpmvendor
()
rpmvendor
()
{
{
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"AstraLinux"
]
&&
echo
"astra"
&&
return
[
"
$DISTRIB_ID
"
=
"LinuxXP"
]
&&
echo
"lxp"
&&
return
[
"
$DISTRIB_ID
"
=
"LinuxXP"
]
&&
echo
"lxp"
&&
return
[
"
$DISTRIB_ID
"
=
"TinyCoreLinux"
]
&&
echo
"tcl"
&&
return
[
"
$DISTRIB_ID
"
=
"TinyCoreLinux"
]
&&
echo
"tcl"
&&
return
echo
"
$DISTRIB_ID
"
|
tr
"[A-Z]"
"[a-z]"
echo
"
$DISTRIB_ID
"
|
tr
"[A-Z]"
"[a-z]"
...
@@ -55,7 +56,7 @@ pkgtype()
...
@@ -55,7 +56,7 @@ pkgtype()
alpine
)
echo
"apk"
;;
alpine
)
echo
"apk"
;;
tinycorelinux
)
echo
"tcz"
;;
tinycorelinux
)
echo
"tcz"
;;
cygwin
)
echo
"tar.xz"
;;
cygwin
)
echo
"tar.xz"
;;
debian|ubuntu|mint|runtu|mcst
)
echo
"deb"
;;
debian|ubuntu|mint|runtu|mcst
|astra
)
echo
"deb"
;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles
)
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles
)
echo
"rpm"
;;
echo
"rpm"
;;
fedora|redhat|scientific|centos|rhel
)
fedora|redhat|scientific|centos|rhel
)
...
@@ -79,11 +80,13 @@ get_major_version()
...
@@ -79,11 +80,13 @@ get_major_version()
# Default values
# Default values
DISTRIB_ID
=
"Generic"
DISTRIB_ID
=
"Generic"
DISTRIB_RELEASE
=
""
DISTRIB_RELEASE
=
""
DISTRIB_CODENAME
=
""
# Default with LSB
# Default with LSB
if
distro lsb-release
;
then
if
distro lsb-release
;
then
DISTRIB_ID
=
`
cat
$DISTROFILE
| get_var DISTRIB_ID
`
DISTRIB_ID
=
`
cat
$DISTROFILE
| get_var DISTRIB_ID
`
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
`
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
`
DISTRIB_CODENAME
=
`
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
`
fi
fi
# ALT Linux based
# ALT Linux based
...
@@ -155,6 +158,12 @@ elif distro mcst_version ; then
...
@@ -155,6 +158,12 @@ elif distro mcst_version ; then
DISTRIB_ID
=
"MCST"
DISTRIB_ID
=
"MCST"
DISTRIB_RELEASE
=
$(
cat
"
$DISTROFILE
"
|
grep
"release"
|
sed
-e
"s|.*release
\(
[0-9]*
\)
.*|
\1
|g"
)
DISTRIB_RELEASE
=
$(
cat
"
$DISTROFILE
"
|
grep
"release"
|
sed
-e
"s|.*release
\(
[0-9]*
\)
.*|
\1
|g"
)
elif
distro astra_version
;
then
#DISTRIB_ID=`cat $DISTROFILE | get_var DISTRIB_ID`
DISTRIB_ID
=
"AstraLinux"
#DISTRIB_RELEASE=$(cat "$DISTROFILE" | head -n1 | sed -e "s|.* \([a-z]*\).*|\1|g")
DISTRIB_RELEASE
=
$DISTRIB_CODENAME
# for Ubuntu use standard LSB info
# for Ubuntu use standard LSB info
elif
[
"
$DISTRIB_ID
"
=
"Ubuntu"
]
&&
[
-n
"
$DISTRIB_RELEASE
"
]
;
then
elif
[
"
$DISTRIB_ID
"
=
"Ubuntu"
]
&&
[
-n
"
$DISTRIB_RELEASE
"
]
;
then
# use LSB version
# use LSB version
...
...
bin/epm
View file @
e8e5c0b7
...
@@ -128,6 +128,9 @@ case $progname in
...
@@ -128,6 +128,9 @@ case $progname in
epmql
)
epmql
)
epm_cmd
=
filelist
epm_cmd
=
filelist
;;
;;
epmrl
)
epm_cmd
=
repolist
;;
epmu
)
epmu
)
epm_cmd
=
update
epm_cmd
=
update
;;
;;
...
...
bin/epm-autoremove
View file @
e8e5c0b7
...
@@ -61,16 +61,23 @@ epm_autoremove()
...
@@ -61,16 +61,23 @@ epm_autoremove()
[
-z
"
$pkg_filenames
"
]
||
fatal
"No arguments are allowed here"
[
-z
"
$pkg_filenames
"
]
||
fatal
"No arguments are allowed here"
case
$DISTRNAME
in
case
$PMTYPE
in
ALTLinux
)
apt-rpm
)
# ALT Linux only
__epm_autoremove_altrpm
__epm_autoremove_altrpm
# ALT Linux only
assure_exists remove-old-kernels update-kernel 0.9.9
assure_exists remove-old-kernels update-kernel 0.9.9
sudocmd remove-old-kernels
sudocmd remove-old-kernels
if
which nvidia-clean-driver 2>/dev/null
;
then
sudocmd nvidia-clean-driver
fi
return
;;
*
)
;;
;;
esac
case
$PMTYPE
in
apt-dpkg|aptitude-dpkg
)
apt-dpkg|aptitude-dpkg
)
sudocmd apt-get autoremove
sudocmd apt-get autoremove
;;
;;
...
...
bin/epm-sh-functions
View file @
e8e5c0b7
...
@@ -263,8 +263,8 @@ set_sudo()
...
@@ -263,8 +263,8 @@ set_sudo()
# use sudo if possible
# use sudo if possible
if
which
sudo
>
/dev/null 2>/dev/null
;
then
if
which
sudo
>
/dev/null 2>/dev/null
;
then
SUDO
=
"sudo --"
SUDO
=
"sudo --"
# check for < 1.7 version which do not support --
# check for < 1.7 version which do not support --
(and --help possible too)
sudo
-
-help
|
grep
-q
" --"
||
SUDO
=
"sudo"
sudo
-
h
|
grep
-q
" --"
||
SUDO
=
"sudo"
return
return
fi
fi
...
@@ -431,7 +431,7 @@ case $DISTRNAME in
...
@@ -431,7 +431,7 @@ case $DISTRNAME in
PCLinux
)
PCLinux
)
CMD
=
"apt-rpm"
CMD
=
"apt-rpm"
;;
;;
Ubuntu|Debian|Mint
)
Ubuntu|Debian|Mint
|AstraLinux|Elbrus
)
CMD
=
"apt-dpkg"
CMD
=
"apt-dpkg"
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
which snappy 2>/dev/null
>
/dev/null
&&
CMD
=
snappy
which snappy 2>/dev/null
>
/dev/null
&&
CMD
=
snappy
...
...
bin/epmrl
0 → 120000
View file @
e8e5c0b7
epm
\ No newline at end of file
eepm.spec
View file @
e8e5c0b7
# 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.8.
5
Version: 1.8.
6
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
*
Sat Jul 16 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.5
-alt0.M70P.1
*
Tue Jul 19 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.6
-alt0.M70P.1
- backport to ALTLinux p7 (by rpmbph script)
- backport to ALTLinux p7 (by rpmbph script)
* Tue Jul 19 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.6-alt1
- epm-sh-functions: fix sudo -- detection
- distr_info: add AstraLinux support
- epm-sh: add AstraLinux and Elbrus support
- add epmrl alias for epm rl
- epm-autoremove: add nvidia-clean-driver
- epm-autoremove: use ALTLinux case instead apt-rpm
* Sat Jun 25 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.5-alt1
* Sat Jun 25 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.5-alt1
- add Tiny Core Linux support (tcl, tce)
- add Tiny Core Linux support (tcl, tce)
- improve dnf support: add release-upgrade
- improve dnf support: add release-upgrade
...
...
packed/epm.sh
View file @
e8e5c0b7
...
@@ -265,8 +265,8 @@ set_sudo()
...
@@ -265,8 +265,8 @@ set_sudo()
# use sudo if possible
# use sudo if possible
if
which
sudo
>
/dev/null 2>/dev/null
;
then
if
which
sudo
>
/dev/null 2>/dev/null
;
then
SUDO
=
"sudo --"
SUDO
=
"sudo --"
# check for < 1.7 version which do not support --
# check for < 1.7 version which do not support --
(and --help possible too)
sudo
-
-help
|
grep
-q
" --"
||
SUDO
=
"sudo"
sudo
-
h
|
grep
-q
" --"
||
SUDO
=
"sudo"
return
return
fi
fi
...
@@ -423,7 +423,7 @@ case $DISTRNAME in
...
@@ -423,7 +423,7 @@ case $DISTRNAME in
PCLinux
)
PCLinux
)
CMD
=
"apt-rpm"
CMD
=
"apt-rpm"
;;
;;
Ubuntu|Debian|Mint
)
Ubuntu|Debian|Mint
|AstraLinux|Elbrus
)
CMD
=
"apt-dpkg"
CMD
=
"apt-dpkg"
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
which snappy 2>/dev/null
>
/dev/null
&&
CMD
=
snappy
which snappy 2>/dev/null
>
/dev/null
&&
CMD
=
snappy
...
@@ -475,6 +475,9 @@ case $DISTRNAME in
...
@@ -475,6 +475,9 @@ case $DISTRNAME in
alpine
)
alpine
)
CMD
=
"apk"
CMD
=
"apk"
;;
;;
TinyCoreLinux
)
CMD
=
"tce"
;;
*
)
*
)
fatal
"Have no suitable DISTRNAME
$DISTRNAME
"
fatal
"Have no suitable DISTRNAME
$DISTRNAME
"
;;
;;
...
@@ -677,6 +680,7 @@ case $PMTYPE in
...
@@ -677,6 +680,7 @@ case $PMTYPE in
warning
"Use with caution!"
warning
"Use with caution!"
local
PKGLIST
=
$(
__epm_orphan_altrpm
\
local
PKGLIST
=
$(
__epm_orphan_altrpm
\
|
sed
-e
"s/
\.
32bit//g"
\
|
sed
-e
"s/
\.
32bit//g"
\
|
grep
-v
--
"^eepm$"
\
|
grep
-v
--
"^kernel"
)
|
grep
-v
--
"^kernel"
)
docmd epm remove
$PKGLIST
docmd epm remove
$PKGLIST
;;
;;
...
@@ -690,7 +694,13 @@ case $PMTYPE in
...
@@ -690,7 +694,13 @@ case $PMTYPE in
# ;;
# ;;
yum-rpm
)
yum-rpm
)
showcmd package-cleanup
--orphans
showcmd package-cleanup
--orphans
local
PKGLIST
=
$(
package-cleanup
--orphans
)
local
PKGLIST
=
$(
package-cleanup
--orphans
|
grep
-v
"^eepm$"
)
docmd epm remove
$PKGLIST
;;
dnf-rpm
)
# TODO: dnf list extras
showcmd package-cleanup
--orphans
local
PKGLIST
=
$(
package-cleanup
--orphans
|
grep
-v
"^eepm$"
)
docmd epm remove
$PKGLIST
docmd epm remove
$PKGLIST
;;
;;
urpm-rpm
)
urpm-rpm
)
...
@@ -745,7 +755,7 @@ __epm_autoremove_altrpm()
...
@@ -745,7 +755,7 @@ __epm_autoremove_altrpm()
|
grep
-E
-v
--
"-(devel|debuginfo)$"
\
|
grep
-E
-v
--
"-(devel|debuginfo)$"
\
|
grep
-E
-v
--
"-(util|tool|plugin|daemon)"
\
|
grep
-E
-v
--
"-(util|tool|plugin|daemon)"
\
|
sed
-e
"s/
\.
32bit
$/
/g"
\
|
sed
-e
"s/
\.
32bit
$/
/g"
\
|
grep
-E
-v
--
"^(libsystemd|libreoffice|libnss)"
)
|
grep
-E
-v
--
"^(libsystemd|libreoffice|libnss
|eepm
)"
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
info
"Removing unused python/perl modules..."
info
"Removing unused python/perl modules..."
...
@@ -764,22 +774,28 @@ __epm_autoremove_altrpm()
...
@@ -764,22 +774,28 @@ __epm_autoremove_altrpm()
return
0
return
0
}
}
epm_autoremove
()
epm_autoremove
()
{
{
[
-z
"
$pkg_filenames
"
]
||
fatal
"No arguments are allowed here"
[
-z
"
$pkg_filenames
"
]
||
fatal
"No arguments are allowed here"
case
$DISTRNAME
in
case
$PMTYPE
in
ALTLinux
)
apt-rpm
)
# ALT Linux only
__epm_autoremove_altrpm
__epm_autoremove_altrpm
# ALT Linux only
assure_exists remove-old-kernels update-kernel 0.9.9
assure_exists remove-old-kernels update-kernel 0.9.9
sudocmd remove-old-kernels
sudocmd remove-old-kernels
if
which nvidia-clean-driver 2>/dev/null
;
then
sudocmd nvidia-clean-driver
fi
return
;;
;;
*
)
;;
esac
case
$PMTYPE
in
apt-dpkg|aptitude-dpkg
)
apt-dpkg|aptitude-dpkg
)
sudocmd apt-get autoremove
sudocmd apt-get autoremove
;;
;;
...
@@ -791,7 +807,7 @@ case $PMTYPE in
...
@@ -791,7 +807,7 @@ case $PMTYPE in
while
true
;
do
while
true
;
do
docmd package-cleanup
--leaves
$(
subst_option non_interactive
--assumeyes
)
docmd package-cleanup
--leaves
$(
subst_option non_interactive
--assumeyes
)
# FIXME: package-cleanup have to use stderr for errors
# FIXME: package-cleanup have to use stderr for errors
local
PKGLIST
=
$(
package-cleanup
--leaves
|
grep
-v
"Loaded plugins"
|
grep
-v
"Unable to"
)
local
PKGLIST
=
$(
package-cleanup
--leaves
|
grep
-v
"Loaded plugins"
|
grep
-v
"Unable to"
|
grep
-v
"^eepm$"
)
[
-n
"
$PKGLIST
"
]
||
break
[
-n
"
$PKGLIST
"
]
||
break
sudocmd yum remove
$PKGLIST
sudocmd yum remove
$PKGLIST
done
done
...
@@ -1410,7 +1426,13 @@ epm_download()
...
@@ -1410,7 +1426,13 @@ epm_download()
yum-rpm
)
yum-rpm
)
# TODO: check yum install --downloadonly --downloaddir=/tmp <package-name>
# TODO: check yum install --downloadonly --downloaddir=/tmp <package-name>
assure_exists yumdownloader yum-utils
assure_exists yumdownloader yum-utils
sudo
yumdownloader
$pkg_filenames
sudocmd yumdownloader
$pkg_filenames
;;
dnf-rpm
)
sudocmd dnf download
$pkg_filenames
;;
tce
)
sudocmd tce-load
-w
$pkg_filenames
;;
;;
*
)
*
)
fatal
"Have no suitable command for
$PMTYPE
"
fatal
"Have no suitable command for
$PMTYPE
"
...
@@ -1809,6 +1831,9 @@ epm_install_names()
...
@@ -1809,6 +1831,9 @@ epm_install_names()
apk
)
apk
)
sudocmd apk add
$@
sudocmd apk add
$@
return
;;
return
;;
tce
)
sudocmd tce-load
-wi
$@
return
;;
guix
)
guix
)
__separate_sudocmd
"guix package -i"
"guix package -i"
$@
__separate_sudocmd
"guix package -i"
"guix package -i"
$@
return
;;
return
;;
...
@@ -1879,6 +1904,9 @@ epm_ni_install_names()
...
@@ -1879,6 +1904,9 @@ epm_ni_install_names()
apk
)
apk
)
sudocmd apk add
$@
sudocmd apk add
$@
return
;;
return
;;
tce
)
sudocmd tce-load
-wi
$@
return
;;
#android)
#android)
# sudocmd pm install $@
# sudocmd pm install $@
# return ;;
# return ;;
...
@@ -2110,6 +2138,9 @@ epm_print_install_command()
...
@@ -2110,6 +2138,9 @@ epm_print_install_command()
aptcyg
)
aptcyg
)
echo
"apt-cyg install
$@
"
echo
"apt-cyg install
$@
"
;;
;;
tce
)
echo
"tce-load -wi
$@
"
;;
*
)
*
)
fatal
"Have no suitable appropriate install command for
$PMTYPE
"
fatal
"Have no suitable appropriate install command for
$PMTYPE
"
;;
;;
...
@@ -2413,6 +2444,9 @@ case $PMTYPE in
...
@@ -2413,6 +2444,9 @@ case $PMTYPE in
apk
)
apk
)
CMD
=
"apk info"
CMD
=
"apk info"
;;
;;
tce
)
CMD
=
"ls -1 /usr/local/tce.installed"
;;
guix
)
guix
)
CMD
=
"guix package -I"
CMD
=
"guix package -I"
;;
;;
...
@@ -3340,8 +3374,8 @@ __update_to_the_distro()
...
@@ -3340,8 +3374,8 @@ __update_to_the_distro()
p8
)
p8
)
docmd epm update
||
fatal
docmd epm update
||
fatal
if
!
docmd epm
install
apt rpm apt-conf-branch
$(
get_fix_release_pkg p8
)
;
then
if
!
docmd epm
install
apt rpm apt-conf-branch
$(
get_fix_release_pkg p8
)
;
then
# error: execution of %post scriptlet from glibc-core-2.23-alt1.eter1
#
Hack for
error: execution of %post scriptlet from glibc-core-2.23-alt1.eter1
docmd
epm erase
glibc-core-2.17
||
fatal
"Check an error and run epm release-upgrade again"
docmd
rpm
-ev
glibc-core-2.17
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm
install
apt rpm apt-conf-branch
$(
get_fix_release_pkg p8
)
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm
install
apt rpm apt-conf-branch
$(
get_fix_release_pkg p8
)
||
fatal
"Check an error and run epm release-upgrade again"
fi
fi
__alt_repofix
__alt_repofix
...
@@ -3424,8 +3458,12 @@ epm_release_upgrade()
...
@@ -3424,8 +3458,12 @@ epm_release_upgrade()
# try to detect current release by repo
# try to detect current release by repo
if
[
"
$DISTRVERSION
"
=
"Sisyphus"
]
||
[
-z
"
$DISTRVERSION
"
]
;
then
if
[
"
$DISTRVERSION
"
=
"Sisyphus"
]
||
[
-z
"
$DISTRVERSION
"
]
;
then
DISTRVERSION
=
"
$(
__detect_alt_release_by_repo
)
"
local
dv
[
"
$DISTRVERSION
"
!=
"Sisyphus"
]
&&
info
"Detected running
$DISTRNAME
$DISTRVERSION
(according to using repos)"
dv
=
"
$(
__detect_alt_release_by_repo
)
"
if
[
-n
"
$dv
"
]
&&
[
"
$dv
"
!=
"
$DISTRVERSION
"
]
;
then
DISTRVERSION
=
"
$dv
"
info
"Detected running
$DISTRNAME
$DISTRVERSION
(according to using repos)"
fi
fi
fi
__alt_repofix
__alt_repofix
...
@@ -3444,7 +3482,7 @@ epm_release_upgrade()
...
@@ -3444,7 +3482,7 @@ epm_release_upgrade()
case
$PMTYPE
in
case
$PMTYPE
in
apt-rpm
)
apt-rpm
)
docmd epm update
#
docmd epm update
info
"Have no idea how to upgrade
$DISTRNAME
"
info
"Have no idea how to upgrade
$DISTRNAME
"
;;
;;
*
-dpkg
)
*
-dpkg
)
...
@@ -3458,6 +3496,18 @@ epm_release_upgrade()
...
@@ -3458,6 +3496,18 @@ epm_release_upgrade()
showcmd rpm
-Uvh
http://mirror.yandex.ru/fedora/linux/releases/16/Fedora/x86_64/os/Packages/fedora-release-16-1.noarch.rpm
showcmd rpm
-Uvh
http://mirror.yandex.ru/fedora/linux/releases/16/Fedora/x86_64/os/Packages/fedora-release-16-1.noarch.rpm
docmd epm Upgrade
docmd epm Upgrade
;;
;;
dnf-rpm
)
info
"Check https://fedoraproject.org/wiki/DNF_system_upgrade for an additional info"
docmd epm
install
dnf
sudocmd dnf clean all
assure_exists dnf-plugin-system-upgrade
sudocmd dnf system-upgrade
local
RELEASEVER
=
"
$pkg_filenames
"
[
-n
"
$RELEASEVER
"
]
||
fatal
"Run me with new version"
sudocmd dnf system-upgrade download
--refresh
--releasever
=
$RELEASEVER
sudocmd dnf system-upgrade
info
"Run epm autoorphans to remove orphaned packages"
;;
urpm-rpm
)
urpm-rpm
)
sudocmd urpmi.removemedia
-av
sudocmd urpmi.removemedia
-av
# TODO
# TODO
...
@@ -4053,6 +4103,9 @@ case $PMTYPE in
...
@@ -4053,6 +4103,9 @@ case $PMTYPE in
apk
)
apk
)
CMD
=
"apk search"
CMD
=
"apk search"
;;
;;
tce
)
CMD
=
"tce-ab"
;;
conary
)
conary
)
CMD
=
"conary repquery"
CMD
=
"conary repquery"
;;
;;
...
@@ -4599,7 +4652,7 @@ epm_upgrade()
...
@@ -4599,7 +4652,7 @@ epm_upgrade()
CMD
=
"yum update"
CMD
=
"yum update"
;;
;;
dnf-rpm
)
dnf-rpm
)
CMD
=
"dnf
update
"
CMD
=
"dnf
distro-sync
"
;;
;;
snappy
)
snappy
)
CMD
=
"snappy update"
CMD
=
"snappy update"
...
@@ -4787,7 +4840,9 @@ has()
...
@@ -4787,7 +4840,9 @@ has()
rpmvendor
()
rpmvendor
()
{
{
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"AstraLinux"
]
&&
echo
"astra"
&&
return
[
"
$DISTRIB_ID
"
=
"LinuxXP"
]
&&
echo
"lxp"
&&
return
[
"
$DISTRIB_ID
"
=
"LinuxXP"
]
&&
echo
"lxp"
&&
return
[
"
$DISTRIB_ID
"
=
"TinyCoreLinux"
]
&&
echo
"tcl"
&&
return
echo
"
$DISTRIB_ID
"
|
tr
"[A-Z]"
"[a-z]"
echo
"
$DISTRIB_ID
"
|
tr
"[A-Z]"
"[a-z]"
}
}
...
@@ -4810,8 +4865,9 @@ pkgtype()
...
@@ -4810,8 +4865,9 @@ pkgtype()
windows
)
echo
"exe"
;;
windows
)
echo
"exe"
;;
android
)
echo
"apk"
;;
android
)
echo
"apk"
;;
alpine
)
echo
"apk"
;;
alpine
)
echo
"apk"
;;
tinycorelinux
)
echo
"tcz"
;;
cygwin
)
echo
"tar.xz"
;;
cygwin
)
echo
"tar.xz"
;;
debian|ubuntu|mint|runtu|mcst
)
echo
"deb"
;;
debian|ubuntu|mint|runtu|mcst
|astra
)
echo
"deb"
;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles
)
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles
)
echo
"rpm"
;;
echo
"rpm"
;;
fedora|redhat|scientific|centos|rhel
)
fedora|redhat|scientific|centos|rhel
)
...
@@ -4835,11 +4891,13 @@ get_major_version()
...
@@ -4835,11 +4891,13 @@ get_major_version()
# Default values
# Default values
DISTRIB_ID
=
"Generic"
DISTRIB_ID
=
"Generic"
DISTRIB_RELEASE
=
""
DISTRIB_RELEASE
=
""
DISTRIB_CODENAME
=
""
# Default with LSB
# Default with LSB
if
distro lsb-release
;
then
if
distro lsb-release
;
then
DISTRIB_ID
=
`
cat
$DISTROFILE
| get_var DISTRIB_ID
`
DISTRIB_ID
=
`
cat
$DISTROFILE
| get_var DISTRIB_ID
`
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
`
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
`
DISTRIB_CODENAME
=
`
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
`
fi
fi
# ALT Linux based
# ALT Linux based
...
@@ -4895,6 +4953,11 @@ elif distro os-release && which apk 2>/dev/null >/dev/null ; then
...
@@ -4895,6 +4953,11 @@ elif distro os-release && which apk 2>/dev/null >/dev/null ; then
DISTRIB_ID
=
"
$ID
"
DISTRIB_ID
=
"
$ID
"
DISTRIB_RELEASE
=
"
$VERSION_ID
"
DISTRIB_RELEASE
=
"
$VERSION_ID
"
elif
distro os-release
&&
which tce-ab 2>/dev/null
>
/dev/null
;
then
.
$ROOTDIR
/etc/os-release
DISTRIB_ID
=
"TinyCoreLinux"
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"
...
@@ -4906,6 +4969,12 @@ elif distro mcst_version ; then
...
@@ -4906,6 +4969,12 @@ elif distro mcst_version ; then
DISTRIB_ID
=
"MCST"
DISTRIB_ID
=
"MCST"
DISTRIB_RELEASE
=
$(
cat
"
$DISTROFILE
"
|
grep
"release"
|
sed
-e
"s|.*release
\(
[0-9]*
\)
.*|
\1
|g"
)
DISTRIB_RELEASE
=
$(
cat
"
$DISTROFILE
"
|
grep
"release"
|
sed
-e
"s|.*release
\(
[0-9]*
\)
.*|
\1
|g"
)
elif
distro astra_version
;
then
#DISTRIB_ID=`cat $DISTROFILE | get_var DISTRIB_ID`
DISTRIB_ID
=
"AstraLinux"
#DISTRIB_RELEASE=$(cat "$DISTROFILE" | head -n1 | sed -e "s|.* \([a-z]*\).*|\1|g")
DISTRIB_RELEASE
=
$DISTRIB_CODENAME
# for Ubuntu use standard LSB info
# for Ubuntu use standard LSB info
elif
[
"
$DISTRIB_ID
"
=
"Ubuntu"
]
&&
[
-n
"
$DISTRIB_RELEASE
"
]
;
then
elif
[
"
$DISTRIB_ID
"
=
"Ubuntu"
]
&&
[
-n
"
$DISTRIB_RELEASE
"
]
;
then
# use LSB version
# use LSB version
...
@@ -5110,7 +5179,7 @@ $(get_help HELPOPT)
...
@@ -5110,7 +5179,7 @@ $(get_help HELPOPT)
print_version
()
print_version
()
{
{
echo
"EPM package manager version 1.8.
4
"
echo
"EPM package manager version 1.8.
6
"
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."
...
@@ -5177,6 +5246,9 @@ case $progname in
...
@@ -5177,6 +5246,9 @@ case $progname in
epmql
)
epmql
)
epm_cmd
=
filelist
epm_cmd
=
filelist
;;
;;
epmrl
)
epm_cmd
=
repolist
;;
epmu
)
epmu
)
epm_cmd
=
update
epm_cmd
=
update
;;
;;
...
@@ -5291,7 +5363,7 @@ check_command()
...
@@ -5291,7 +5363,7 @@ check_command()
clean
)
# HELPCMD: clean local package cache
clean
)
# HELPCMD: clean local package cache
epm_cmd
=
clean
epm_cmd
=
clean
;;
;;
autoremove
)
# HELPCMD: auto remove unneeded package(s)
autoremove
|package-cleanup
)
# HELPCMD: auto remove unneeded package(s)
epm_cmd
=
autoremove
epm_cmd
=
autoremove
;;
;;
autoorphans|--orphans
)
# HELPCMD: remove all packages not from the repository
autoorphans|--orphans
)
# HELPCMD: remove all packages not from the repository
...
...
packed/serv.sh
View file @
e8e5c0b7
...
@@ -260,8 +260,8 @@ set_sudo()
...
@@ -260,8 +260,8 @@ set_sudo()
# use sudo if possible
# use sudo if possible
if
which
sudo
>
/dev/null 2>/dev/null
;
then
if
which
sudo
>
/dev/null 2>/dev/null
;
then
SUDO
=
"sudo --"
SUDO
=
"sudo --"
# check for < 1.7 version which do not support --
# check for < 1.7 version which do not support --
(and --help possible too)
sudo
-
-help
|
grep
-q
" --"
||
SUDO
=
"sudo"
sudo
-
h
|
grep
-q
" --"
||
SUDO
=
"sudo"
return
return
fi
fi
...
@@ -418,7 +418,7 @@ case $DISTRNAME in
...
@@ -418,7 +418,7 @@ case $DISTRNAME in
PCLinux
)
PCLinux
)
CMD
=
"apt-rpm"
CMD
=
"apt-rpm"
;;
;;
Ubuntu|Debian|Mint
)
Ubuntu|Debian|Mint
|AstraLinux|Elbrus
)
CMD
=
"apt-dpkg"
CMD
=
"apt-dpkg"
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
which snappy 2>/dev/null
>
/dev/null
&&
CMD
=
snappy
which snappy 2>/dev/null
>
/dev/null
&&
CMD
=
snappy
...
@@ -470,6 +470,9 @@ case $DISTRNAME in
...
@@ -470,6 +470,9 @@ case $DISTRNAME in
alpine
)
alpine
)
CMD
=
"apk"
CMD
=
"apk"
;;
;;
TinyCoreLinux
)
CMD
=
"tce"
;;
*
)
*
)
fatal
"Have no suitable DISTRNAME
$DISTRNAME
"
fatal
"Have no suitable DISTRNAME
$DISTRNAME
"
;;
;;
...
@@ -858,7 +861,9 @@ has()
...
@@ -858,7 +861,9 @@ has()
rpmvendor
()
rpmvendor
()
{
{
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"AstraLinux"
]
&&
echo
"astra"
&&
return
[
"
$DISTRIB_ID
"
=
"LinuxXP"
]
&&
echo
"lxp"
&&
return
[
"
$DISTRIB_ID
"
=
"LinuxXP"
]
&&
echo
"lxp"
&&
return
[
"
$DISTRIB_ID
"
=
"TinyCoreLinux"
]
&&
echo
"tcl"
&&
return
echo
"
$DISTRIB_ID
"
|
tr
"[A-Z]"
"[a-z]"
echo
"
$DISTRIB_ID
"
|
tr
"[A-Z]"
"[a-z]"
}
}
...
@@ -881,8 +886,9 @@ pkgtype()
...
@@ -881,8 +886,9 @@ pkgtype()
windows
)
echo
"exe"
;;
windows
)
echo
"exe"
;;
android
)
echo
"apk"
;;
android
)
echo
"apk"
;;
alpine
)
echo
"apk"
;;
alpine
)
echo
"apk"
;;
tinycorelinux
)
echo
"tcz"
;;
cygwin
)
echo
"tar.xz"
;;
cygwin
)
echo
"tar.xz"
;;
debian|ubuntu|mint|runtu|mcst
)
echo
"deb"
;;
debian|ubuntu|mint|runtu|mcst
|astra
)
echo
"deb"
;;
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles
)
alt|asplinux|suse|mandriva|rosa|mandrake|pclinux|sled|sles
)
echo
"rpm"
;;
echo
"rpm"
;;
fedora|redhat|scientific|centos|rhel
)
fedora|redhat|scientific|centos|rhel
)
...
@@ -906,11 +912,13 @@ get_major_version()
...
@@ -906,11 +912,13 @@ get_major_version()
# Default values
# Default values
DISTRIB_ID
=
"Generic"
DISTRIB_ID
=
"Generic"
DISTRIB_RELEASE
=
""
DISTRIB_RELEASE
=
""
DISTRIB_CODENAME
=
""
# Default with LSB
# Default with LSB
if
distro lsb-release
;
then
if
distro lsb-release
;
then
DISTRIB_ID
=
`
cat
$DISTROFILE
| get_var DISTRIB_ID
`
DISTRIB_ID
=
`
cat
$DISTROFILE
| get_var DISTRIB_ID
`
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
`
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
| get_var DISTRIB_RELEASE
`
DISTRIB_CODENAME
=
`
cat
$DISTROFILE
| get_var DISTRIB_CODENAME
`
fi
fi
# ALT Linux based
# ALT Linux based
...
@@ -966,6 +974,11 @@ elif distro os-release && which apk 2>/dev/null >/dev/null ; then
...
@@ -966,6 +974,11 @@ elif distro os-release && which apk 2>/dev/null >/dev/null ; then
DISTRIB_ID
=
"
$ID
"
DISTRIB_ID
=
"
$ID
"
DISTRIB_RELEASE
=
"
$VERSION_ID
"
DISTRIB_RELEASE
=
"
$VERSION_ID
"
elif
distro os-release
&&
which tce-ab 2>/dev/null
>
/dev/null
;
then
.
$ROOTDIR
/etc/os-release
DISTRIB_ID
=
"TinyCoreLinux"
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"
...
@@ -977,6 +990,12 @@ elif distro mcst_version ; then
...
@@ -977,6 +990,12 @@ elif distro mcst_version ; then
DISTRIB_ID
=
"MCST"
DISTRIB_ID
=
"MCST"
DISTRIB_RELEASE
=
$(
cat
"
$DISTROFILE
"
|
grep
"release"
|
sed
-e
"s|.*release
\(
[0-9]*
\)
.*|
\1
|g"
)
DISTRIB_RELEASE
=
$(
cat
"
$DISTROFILE
"
|
grep
"release"
|
sed
-e
"s|.*release
\(
[0-9]*
\)
.*|
\1
|g"
)
elif
distro astra_version
;
then
#DISTRIB_ID=`cat $DISTROFILE | get_var DISTRIB_ID`
DISTRIB_ID
=
"AstraLinux"
#DISTRIB_RELEASE=$(cat "$DISTROFILE" | head -n1 | sed -e "s|.* \([a-z]*\).*|\1|g")
DISTRIB_RELEASE
=
$DISTRIB_CODENAME
# for Ubuntu use standard LSB info
# for Ubuntu use standard LSB info
elif
[
"
$DISTRIB_ID
"
=
"Ubuntu"
]
&&
[
-n
"
$DISTRIB_RELEASE
"
]
;
then
elif
[
"
$DISTRIB_ID
"
=
"Ubuntu"
]
&&
[
-n
"
$DISTRIB_RELEASE
"
]
;
then
# use LSB version
# use LSB version
...
@@ -1241,7 +1260,7 @@ $(get_help HELPOPT)
...
@@ -1241,7 +1260,7 @@ $(get_help HELPOPT)
print_version
()
print_version
()
{
{
echo
"Service manager version 1.8.
4
"
echo
"Service manager version 1.8.
6
"
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."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment