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
3606448b
Commit
3606448b
authored
May 20, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Plain Diff
backported to p8 as 1.8.2-alt0.M80P.1 (with rpmbph script)
parents
816e71fb
d80216dc
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
183 additions
and
49 deletions
+183
-49
distr_info
bin/distr_info
+1
-1
epm
bin/epm
+7
-0
epm-assure
bin/epm-assure
+1
-1
epm-autoorphans
bin/epm-autoorphans
+13
-9
epm-autoremove
bin/epm-autoremove
+26
-9
epm-download
bin/epm-download
+7
-2
epm-epm_install
bin/epm-epm_install
+33
-0
epm-upgrade
bin/epm-upgrade
+1
-1
eepm.spec
eepm.spec
+11
-2
epm.sh
packed/epm.sh
+81
-22
serv.sh
packed/serv.sh
+2
-2
No files found.
bin/distr_info
View file @
3606448b
...
...
@@ -156,7 +156,7 @@ elif [ "$DISTRIB_ID" = "Ubuntu" ] && [ -n "$DISTRIB_RELEASE" ]; then
# Debian based
elif
distro debian_version
;
then
DISTRIB_ID
=
"Debian"
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
`
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
|
sed
-e
"s/
\.
.*//g"
)
# Mandriva based
...
...
bin/epm
View file @
3606448b
...
...
@@ -72,6 +72,7 @@ Descr="epm - EPM package manager"
verbose
=
quiet
=
nodeps
=
noremove
=
force
=
short
=
sort
=
...
...
@@ -268,6 +269,9 @@ check_command()
site|url
)
# HELPCMD: open package's site in a browser (use -p for open packages.altlinux.org site)
epm_cmd
=
site
;;
ei|epminstall|selfinstall
)
# HELPCMD: install or update eepm from all in one script
epm_cmd
=
epm_install
;;
print
)
# HELPCMD: print various info, run epm print help for details
epm_cmd
=
print
;;
...
...
@@ -311,6 +315,9 @@ check_option()
--force
)
# HELPOPT: force install/remove package (f.i., override)
force
=
"--force"
;;
--noremove
|
--no-remove
)
# HELPOPT: exit if any packages are to be removed during upgrade
noremove
=
"--no-remove"
;;
--short
)
# HELPOPT: short output (just 'package' instead 'package-version-release')
short
=
"--short"
;;
...
...
bin/epm-assure
View file @
3606448b
...
...
@@ -75,7 +75,7 @@ __epm_assure_checking()
fi
[
-n
"
$PACKAGE
"
]
||
fatal
"You need run with package name param when use with absolute path"
return
0
return
1
fi
if
__check_command_in_path
"
$CMD
"
>
/dev/null
;
then
...
...
bin/epm-autoorphans
View file @
3606448b
#!/bin/sh
#
# Copyright (C) 2015 Etersoft
# Copyright (C) 2015 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2015
, 2016
Etersoft
# Copyright (C) 2015
, 2016
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -17,6 +17,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__epm_orphan_altrpm
()
{
docmd
"apt-cache list-extras"
}
epm_autoorphans
()
{
...
...
@@ -24,14 +29,13 @@ epm_autoorphans()
case
$PMTYPE
in
#
apt-rpm)
apt-rpm
)
# ALT Linux only
#__epm_autoremove_altrpm
# ALT Linux only
#assure_exists remove-old-kernels
#sudocmd remove-old-kernels
# ;;
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
__epm_orphan_altrpm
info
"TODO: this was just a list of orphans"
# | sudocmd epm remove
;;
apt-dpkg|aptitude-dpkg
)
assure_exists deborphan
showcmd deborphan
...
...
bin/epm-autoremove
View file @
3606448b
#!/bin/sh
#
# Copyright (C) 2012 Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012
, 2016
Etersoft
# Copyright (C) 2012
, 2016
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -20,16 +20,33 @@
__epm_autoremove_altrpm
()
{
local
pkg
local
flag
=
load_helper epm-packages
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
info
info
"Just removing all non -devel libs packages not need by anything"
for
pkg
in
$(
short
=
1
pkg_filenames
=
epm_packages |
grep
--
"^lib"
|
grep
-v
--
"-devel$"
|
grep
-v
--
"-debuginfo$"
|
grep
-v
--
^libreoffice |
grep
-v
--
libnss-
)
;
do
sudocmd rpm
-v
-e
$pkg
&&
flag
=
1
done
info
"Just removing all non -devel libs packages not need by anything..."
local
flag
=
local
libexclude
=
'^lib'
[
-n
"
$force
"
]
||
libexclude
=
$libexclude
'[^-]*$'
# call again for next cycle until all libs will removed
[
-n
"
$flag
"
]
&&
__epm_autoremove_altrpm
# https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps
showcmd
"apt-cache list-nodeps | grep --
\"
$libexclude
\"
"
pkgs
=
$(
apt-cache list-nodeps |
grep
--
"
$libexclude
"
|
\
grep
-v
--
"-devel$"
|
grep
-v
--
"-debuginfo$"
|
\
grep
-v
--
"-util"
|
grep
-v
--
"-tool"
|
grep
-v
--
"-plugin"
|
\
grep
-v
--
^libreoffice |
grep
-v
--
libnss-
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
libexclude
=
'^(python-module-|python3-module-|python-modules-|python3-modules|perl-)'
[
-n
"
$force
"
]
||
libexclude
=
$libexclude
'[^-]*$'
showcmd
"apt-cache list-nodeps | grep -E --
\"
$libexclude
\"
"
pkgs
=
$(
apt-cache list-nodeps |
grep
-E
--
"
$libexclude
"
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
if
[
-n
"
$flag
"
]
;
then
info
"call again for next cycle until all libs will removed"
__epm_autoremove_altrpm
fi
return
0
}
...
...
bin/epm-download
View file @
3606448b
#!/bin/sh
#
# Copyright (C) 201
5
Etersoft
# Copyright (C) 201
5
Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 201
6
Etersoft
# Copyright (C) 201
6
Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -28,6 +28,11 @@ epm_download()
aptcyg
)
sudocmd apt-cyg download
$pkg_filenames
;;
yum-rpm
)
# TODO: check yum install --downloadonly --downloaddir=/tmp <package-name>
assure_exists yumdownloader yum-utils
sudo
yumdownloader
$pkg_filenames
;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
;;
...
...
bin/epm-epm_install
0 → 100644
View file @
3606448b
#!/bin/sh
# Copyright (C) 2016 Etersoft
# Copyright (C) 2016 Danil Mikhailov <danil@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
etersoft_updates_site
=
"http://updates.etersoft.ru/pub/Etersoft/Sisyphus/
$(
$DISTRVENDOR
-e
)
/"
download_dir
=
"/tmp"
download_epm
(){
download_link
=
$etersoft_updates_site
$(
wget
-qO-
$etersoft_updates_site
/ |
grep
-m1
-Eo
"eepm[^
\"
]+
\.
$(
$DISTRVENDOR
-p
)
"
|
tail
-n1
)
#"
eepm_package
=
"
$download_dir
/
$(
basename
$download_link
)
"
wget
-O
$eepm_package
$download_link
}
epm_epm_install
(){
download_epm
||
fatal
"Error. Check download link:
$download_link
"
epm i
$eepm_package
||
fatal
rm
-fv
$eepm_package
}
bin/epm-upgrade
View file @
3606448b
...
...
@@ -34,7 +34,7 @@ epm_upgrade()
apt-rpm|apt-dpkg
)
# non_interactive
# Функцию добавления параметра при условии
CMD
=
"apt-get dist-upgrade"
CMD
=
"apt-get dist-upgrade
$noremove
"
;;
aptitude-dpkg
)
CMD
=
"aptitude dist-upgrade"
...
...
eepm.spec
View file @
3606448b
# This spec is backported to ALTLinux p8 automatically by rpmbph script from etersoft-build-utils.
#
Name: eepm
Version: 1.8.
1
Version: 1.8.
2
Release: alt0.M80P.1
Summary: Etersoft EPM package manager
...
...
@@ -67,9 +67,18 @@ chmod a+x %buildroot%_datadir/%name/{serv-,epm-}*
%_sysconfdir/bash_completion.d/cerv
%changelog
*
Thu Apr 28 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.1
-alt0.M80P.1
*
Fri May 20 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.2
-alt0.M80P.1
- backport to ALTLinux p8 (by rpmbph script)
* Fri May 20 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.2-alt1
- epm_install: added command for install or update eepm package from all in one script
- add --no-remove support during upgrade
- epm-download: add yumdownloader support
- epm-autoorphans: realize print list
- epm-autoremove: realize with apt-cache list-nodeps from apt-scripts
- epm-assure: fix for existing path checking
- distr_info: drop subversion from Debian distro version
* Thu Apr 28 2016 Vitaly Lipatov <lav@altlinux.ru> 1.8.1-alt1
- release-upgrade: install altlinux-release-p? only if /etc/altlinux-release belongs to sisyphus
...
...
packed/epm.sh
View file @
3606448b
...
...
@@ -581,7 +581,7 @@ __epm_assure_checking()
fi
[
-n
"
$PACKAGE
"
]
||
fatal
"You need run with package name param when use with absolute path"
return
0
return
1
fi
if
__check_command_in_path
"
$CMD
"
>
/dev/null
;
then
...
...
@@ -647,6 +647,11 @@ esac
# File bin/epm-autoorphans:
__epm_orphan_altrpm
()
{
docmd
"apt-cache list-extras"
}
epm_autoorphans
()
{
...
...
@@ -654,14 +659,13 @@ epm_autoorphans()
case
$PMTYPE
in
#apt-rpm)
# ALT Linux only
#__epm_autoremove_altrpm
apt-rpm
)
# ALT Linux only
#assure_exists remove-old-kernels
#sudocmd remove-old-kernels
# ;;
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
__epm_orphan_altrpm
info
"TODO: this was just a list of orphans"
# | sudocmd epm remove
;;
apt-dpkg|aptitude-dpkg
)
assure_exists deborphan
showcmd deborphan
...
...
@@ -712,16 +716,33 @@ esac
__epm_autoremove_altrpm
()
{
local
pkg
local
flag
=
load_helper epm-packages
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
info
info
"Just removing all non -devel libs packages not need by anything"
for
pkg
in
$(
short
=
1
pkg_filenames
=
epm_packages |
grep
--
"^lib"
|
grep
-v
--
"-devel$"
|
grep
-v
--
"-debuginfo$"
|
grep
-v
--
^libreoffice |
grep
-v
--
libnss-
)
;
do
sudocmd rpm
-v
-e
$pkg
&&
flag
=
1
done
info
"Just removing all non -devel libs packages not need by anything..."
# call again for next cycle until all libs will removed
[
-n
"
$flag
"
]
&&
__epm_autoremove_altrpm
local
flag
=
local
libexclude
=
'^lib'
[
-n
"
$force
"
]
||
libexclude
=
$libexclude
'[^-]*$'
# https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps
showcmd
"apt-cache list-nodeps | grep --
\"
$libexclude
\"
"
pkgs
=
$(
apt-cache list-nodeps |
grep
--
"
$libexclude
"
|
\
grep
-v
--
"-devel$"
|
grep
-v
--
"-debuginfo$"
|
\
grep
-v
--
"-util"
|
grep
-v
--
"-tool"
|
grep
-v
--
"-plugin"
|
\
grep
-v
--
^libreoffice |
grep
-v
--
libnss-
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
libexclude
=
'^(python-module-|python3-module-|python-modules-|python3-modules|perl-)'
[
-n
"
$force
"
]
||
libexclude
=
$libexclude
'[^-]*$'
showcmd
"apt-cache list-nodeps | grep -E --
\"
$libexclude
\"
"
pkgs
=
$(
apt-cache list-nodeps |
grep
-E
--
"
$libexclude
"
)
[
-n
"
$pkgs
"
]
&&
sudocmd rpm
-v
-e
$pkgs
&&
flag
=
1
if
[
-n
"
$flag
"
]
;
then
info
"call again for next cycle until all libs will removed"
__epm_autoremove_altrpm
fi
return
0
}
...
...
@@ -1369,12 +1390,35 @@ epm_download()
aptcyg
)
sudocmd apt-cyg download
$pkg_filenames
;;
yum-rpm
)
# TODO: check yum install --downloadonly --downloaddir=/tmp <package-name>
assure_exists yumdownloader yum-utils
sudo
yumdownloader
$pkg_filenames
;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
;;
esac
}
# File bin/epm-epm_install:
etersoft_updates_site
=
"http://updates.etersoft.ru/pub/Etersoft/Sisyphus/
$(
$DISTRVENDOR
-e
)
/"
download_dir
=
"/tmp"
download_epm
(){
download_link
=
$etersoft_updates_site
$(
wget
-qO-
$etersoft_updates_site
/ |
grep
-m1
-Eo
"eepm[^
\"
]+
\.
$(
$DISTRVENDOR
-p
)
"
|
tail
-n1
)
#"
eepm_package
=
"
$download_dir
/
$(
basename
$download_link
)
"
wget
-O
$eepm_package
$download_link
}
epm_epm_install
(){
download_epm
||
fatal
"Error. Check download link:
$download_link
"
epm i
$eepm_package
||
fatal
rm
-fv
$eepm_package
}
# File bin/epm-filelist:
...
...
@@ -3166,13 +3210,21 @@ __alt_repofix()
__replace_text_in_alt_repo
"/^ *#/! s!
\[
p[6-9]
\]
![updates]!g"
}
get_fix_release_pkg
()
{
# TODO: check for version incompatibilities
if
epmqf /etc/altlinux-release |
grep
-q
sisyphus
;
then
echo
altlinux-release-
$1
fi
}
__update_to_the_distro
()
{
__alt_repofix
case
"
$1
"
in
p7
)
docmd epm update
||
fatal
docmd epm
install
apt rpm apt-conf-branch
altlinux-release-p7
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm
install
apt rpm apt-conf-branch
$(
get_fix_release_pkg p7
)
||
fatal
"Check an error and run epm release-upgrade again"
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![p7]!g"
docmd epm update
||
fatal
...
...
@@ -3180,10 +3232,10 @@ __update_to_the_distro()
;;
p8
)
docmd epm update
||
fatal
if
!
docmd epm
install
apt rpm apt-conf-branch
altlinux-release-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
docmd epm erase glibc-core-2.17
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm
install
apt rpm apt-conf-branch
altlinux-release-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
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![p8]!g"
...
...
@@ -3218,7 +3270,7 @@ __update_alt_to_next_distro()
;;
"p7"
|
"p7 p8"
)
info
"Upgrade
$DISTRNAME
from p7 to p8 ..."
docmd epm
install
apt-conf-branch
altlinux-release-p7
||
fatal
docmd epm
install
apt-conf-branch
$(
get_fix_release_pkg p7
)
||
fatal
__replace_alt_version_in_repo p7/branch/ p8/branch/
__update_to_the_distro p8
docmd epm update-kernel
||
fatal
...
...
@@ -4400,7 +4452,7 @@ epm_upgrade()
apt-rpm|apt-dpkg
)
# non_interactive
# Функцию добавления параметра при условии
CMD
=
"apt-get dist-upgrade"
CMD
=
"apt-get dist-upgrade
$noremove
"
;;
aptitude-dpkg
)
CMD
=
"aptitude dist-upgrade"
...
...
@@ -4725,7 +4777,7 @@ elif [ "$DISTRIB_ID" = "Ubuntu" ] && [ -n "$DISTRIB_RELEASE" ]; then
# Debian based
elif
distro debian_version
;
then
DISTRIB_ID
=
"Debian"
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
`
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
|
sed
-e
"s/
\.
.*//g"
)
# Mandriva based
...
...
@@ -4921,7 +4973,7 @@ $(get_help HELPOPT)
print_version
()
{
echo
"EPM package manager version 1.8.
0
"
echo
"EPM package manager version 1.8.
2
"
echo
"Running on
$(
$DISTRVENDOR
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Copyright (c) Etersoft 2012-2016"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
...
@@ -4935,6 +4987,7 @@ Descr="epm - EPM package manager"
verbose
=
quiet
=
nodeps
=
noremove
=
force
=
short
=
sort
=
...
...
@@ -5131,6 +5184,9 @@ check_command()
site|url
)
# HELPCMD: open package's site in a browser (use -p for open packages.altlinux.org site)
epm_cmd
=
site
;;
ei|epminstall|selfinstall
)
# HELPCMD: install or update eepm from all in one script
epm_cmd
=
epm_install
;;
print
)
# HELPCMD: print various info, run epm print help for details
epm_cmd
=
print
;;
...
...
@@ -5174,6 +5230,9 @@ check_option()
--force
)
# HELPOPT: force install/remove package (f.i., override)
force
=
"--force"
;;
--noremove
|
--no-remove
)
# HELPOPT: exit if any packages are to be removed during upgrade
noremove
=
"--no-remove"
;;
--short
)
# HELPOPT: short output (just 'package' instead 'package-version-release')
short
=
"--short"
;;
...
...
packed/serv.sh
View file @
3606448b
...
...
@@ -981,7 +981,7 @@ elif [ "$DISTRIB_ID" = "Ubuntu" ] && [ -n "$DISTRIB_RELEASE" ]; then
# Debian based
elif
distro debian_version
;
then
DISTRIB_ID
=
"Debian"
DISTRIB_RELEASE
=
`
cat
$DISTROFILE
`
DISTRIB_RELEASE
=
$(
cat
$DISTROFILE
|
sed
-e
"s/
\.
.*//g"
)
# Mandriva based
...
...
@@ -1237,7 +1237,7 @@ $(get_help HELPOPT)
print_version
()
{
echo
"Service manager version 1.8.
0
"
echo
"Service manager version 1.8.
2
"
echo
"Running on
$(
$DISTRVENDOR
)
"
echo
"Copyright (c) Etersoft 2012, 2013, 2016"
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