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
Nurlan
eepm
Commits
73ebc549
Commit
73ebc549
authored
Mar 30, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed 3.16.6
parent
f78f458a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
55 deletions
+73
-55
epm.sh
packed/epm.sh
+37
-28
serv.sh
packed/serv.sh
+36
-27
No files found.
packed/epm.sh
View file @
73ebc549
...
...
@@ -8801,8 +8801,8 @@ override_distrib()
DISTRIB_RELEASE
=
"
$(
echo
"
$1
"
|
sed
-e
's|.*/||'
)
"
}
# Translate DISTRIB_ID to vendor name (like %_vendor does), uses VENDOR_ID by default
rpm
vendor
()
# Translate DISTRIB_ID to vendor name (like %_vendor does
or package release name uses
), uses VENDOR_ID by default
pkg
vendor
()
{
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTServer"
]
&&
echo
"alt"
&&
return
...
...
@@ -8813,17 +8813,14 @@ rpmvendor()
[
"
$DISTRIB_ID
"
=
"OpenSUSE"
]
&&
echo
"suse"
&&
return
[
"
$DISTRIB_ID
"
=
"openSUSETumbleweed"
]
&&
echo
"suse"
&&
return
[
"
$DISTRIB_ID
"
=
"openSUSELeap"
]
&&
echo
"suse"
&&
return
[
-n
"
$VENDOR_ID
"
]
&&
echo
"
$VENDOR_ID
"
&&
return
if
[
-n
"
$VENDOR_ID
"
]
;
then
[
"
$VENDOR_ID
"
=
"altlinux"
]
&&
echo
"alt"
&&
return
echo
"
$VENDOR_ID
"
return
fi
tolower
"
$DISTRIB_ID
"
}
# Translate DISTRIB_ID name to package manner (like in the package release name)
pkgvendor
()
{
[
"
$DISTRIB_ID
"
=
"Mandriva"
]
&&
echo
"mdv"
&&
return
rpmvendor
}
# TODO: in more appropriate way
#which pkcon 2>/dev/null >/dev/null && info "You can run $ PMTYPE=packagekit epm to use packagekit backend"
...
...
@@ -8862,7 +8859,7 @@ case $DISTRIB_ID in
ArchLinux
)
CMD
=
"pacman"
;;
Fedora|
FedoraLinux|LinuxXP|ASPLinux|
CentOS|OracleLinux|RockyLinux|AlmaLinux|RHEL|Scientific|GosLinux|Amzn|RedOS
)
Fedora|CentOS|OracleLinux|RockyLinux|AlmaLinux|RHEL|Scientific|GosLinux|Amzn|RedOS
)
CMD
=
"dnf-rpm"
hascommand dnf
||
CMD
=
yum-rpm
[
"
$DISTRIB_ID
/
$DISTRIB_RELEASE
"
=
"CentOS/7"
]
&&
CMD
=
yum-rpm
...
...
@@ -8967,13 +8964,21 @@ get_major_version()
normalize_name
()
{
[
"
$1
"
=
"RED OS"
]
&&
echo
"RedOS"
&&
return
[
"
$1
"
=
"CentOS Linux"
]
&&
echo
"CentOS"
&&
return
[
"
$1
"
=
"Rocky Linux"
]
&&
echo
"RockyLinux"
&&
return
[
"
$1
"
=
"Oracle Linux"
]
&&
echo
"OracleLinux"
&&
return
[
"
$1
"
=
"Alma Linux"
]
&&
echo
"AlmaLinux"
&&
return
case
"
$1
"
in
"RED OS"
)
echo
"RedOS"
;;
"CentOS Linux"
)
echo
"CentOS"
;;
"Fedora Linux"
)
echo
"Fedora"
;;
*
)
#echo "${1// /}"
echo
"
$1
"
|
sed
-e
"s/ //g"
;;
esac
}
# Default values
...
...
@@ -9053,6 +9058,17 @@ elif distro gentoo-release ; then
elif
[
"
$DISTRIB_ID
"
=
"ALTServer"
]
;
then
DISTRIB_RELEASE
=
$(
echo
$DISTRIB_RELEASE
|
sed
-e
"s/
\.
.*//g"
)
elif
[
"
$DISTRIB_ID
"
=
"ALTSPWorkstation"
]
;
then
DISTRIB_ID
=
"ALTLinux"
case
"
$DISTRIB_RELEASE
"
in
8.0|8.1
)
;;
8.
*
)
DISTRIB_RELEASE
=
"c9"
;;
esac
DISTRIB_RELEASE
=
$(
echo
$DISTRIB_RELEASE
|
sed
-e
"s/
\.
.*//g"
)
elif
distro slackware-version
;
then
DISTRIB_ID
=
"Slackware"
DISTRIB_RELEASE
=
"
$(
grep
-Eo
'[0-9]+\.[0-9]+'
$DISTROFILE
)
"
...
...
@@ -9471,8 +9487,7 @@ Pretty distro name (--pretty): $(print_pretty_name)
CPU norm register size (-b):
$(
get_bit_size
)
System memory size (MB) (-m):
$(
get_memory_size
)
Base OS name (-o):
$(
get_base_os_name
)
Build system distro name (-s):
$(
pkgvendor
)
Build system vendor name (-n):
$(
rpmvendor
)
Base distro name (-s|-n):
$(
pkgvendor
)
(run with -h to get help)
EOF
...
...
@@ -9493,11 +9508,10 @@ case $1 in
echo
" -i - print virtualization type"
echo
" -h - this help"
echo
" -m - print system memory size (in MB)"
echo
" -n [SystemName] - print vendor name (as _vendor macros in rpm)"
echo
" -o - print base OS name"
echo
" -p [SystemName] - print type of the packaging system"
echo
" -g [SystemName] - print name of the packaging system"
echo
" -s
[SystemName] - print name of distro for build system (like in the package release name
)"
echo
" -s
|-n [SystemName] - print base name of the distro (ubuntu for all Ubuntu family, alt for all ALT family) (as _vendor macros in rpm
)"
echo
" -y - print running service manager"
echo
" --pretty - print pretty distro name"
echo
" -v - print version of distro"
...
...
@@ -9555,16 +9569,11 @@ case $1 in
-v
)
echo
$DISTRIB_RELEASE
;;
-s
)
-s
|
-n
)
override_distrib
"
$2
"
pkgvendor
exit
0
;;
-n
)
override_distrib
"
$2
"
rpmvendor
exit
0
;;
-y
)
get_service_manager
;;
...
...
@@ -10381,7 +10390,7 @@ Examples:
print_version
()
{
echo
"EPM package manager version 3.16.
5
https://wiki.etersoft.ru/Epm"
echo
"EPM package manager version 3.16.
6
https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Copyright (c) Etersoft 2012-2021"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
...
@@ -10391,7 +10400,7 @@ print_version()
Usage
=
"Usage: epm [options] <command> [package name(s), package files]..."
Descr
=
"epm - EPM package manager"
EPMVERSION
=
3.16.
5
EPMVERSION
=
3.16.
6
verbose
=
$EPM_VERBOSE
quiet
=
nodeps
=
...
...
packed/serv.sh
View file @
73ebc549
...
...
@@ -1337,8 +1337,8 @@ override_distrib()
DISTRIB_RELEASE
=
"
$(
echo
"
$1
"
|
sed
-e
's|.*/||'
)
"
}
# Translate DISTRIB_ID to vendor name (like %_vendor does), uses VENDOR_ID by default
rpm
vendor
()
# Translate DISTRIB_ID to vendor name (like %_vendor does
or package release name uses
), uses VENDOR_ID by default
pkg
vendor
()
{
[
"
$DISTRIB_ID
"
=
"ALTLinux"
]
&&
echo
"alt"
&&
return
[
"
$DISTRIB_ID
"
=
"ALTServer"
]
&&
echo
"alt"
&&
return
...
...
@@ -1349,17 +1349,14 @@ rpmvendor()
[
"
$DISTRIB_ID
"
=
"OpenSUSE"
]
&&
echo
"suse"
&&
return
[
"
$DISTRIB_ID
"
=
"openSUSETumbleweed"
]
&&
echo
"suse"
&&
return
[
"
$DISTRIB_ID
"
=
"openSUSELeap"
]
&&
echo
"suse"
&&
return
[
-n
"
$VENDOR_ID
"
]
&&
echo
"
$VENDOR_ID
"
&&
return
if
[
-n
"
$VENDOR_ID
"
]
;
then
[
"
$VENDOR_ID
"
=
"altlinux"
]
&&
echo
"alt"
&&
return
echo
"
$VENDOR_ID
"
return
fi
tolower
"
$DISTRIB_ID
"
}
# Translate DISTRIB_ID name to package manner (like in the package release name)
pkgvendor
()
{
[
"
$DISTRIB_ID
"
=
"Mandriva"
]
&&
echo
"mdv"
&&
return
rpmvendor
}
# TODO: in more appropriate way
#which pkcon 2>/dev/null >/dev/null && info "You can run $ PMTYPE=packagekit epm to use packagekit backend"
...
...
@@ -1398,7 +1395,7 @@ case $DISTRIB_ID in
ArchLinux
)
CMD
=
"pacman"
;;
Fedora|
FedoraLinux|LinuxXP|ASPLinux|
CentOS|OracleLinux|RockyLinux|AlmaLinux|RHEL|Scientific|GosLinux|Amzn|RedOS
)
Fedora|CentOS|OracleLinux|RockyLinux|AlmaLinux|RHEL|Scientific|GosLinux|Amzn|RedOS
)
CMD
=
"dnf-rpm"
hascommand dnf
||
CMD
=
yum-rpm
[
"
$DISTRIB_ID
/
$DISTRIB_RELEASE
"
=
"CentOS/7"
]
&&
CMD
=
yum-rpm
...
...
@@ -1503,13 +1500,21 @@ get_major_version()
normalize_name
()
{
[
"
$1
"
=
"RED OS"
]
&&
echo
"RedOS"
&&
return
[
"
$1
"
=
"CentOS Linux"
]
&&
echo
"CentOS"
&&
return
[
"
$1
"
=
"Rocky Linux"
]
&&
echo
"RockyLinux"
&&
return
[
"
$1
"
=
"Oracle Linux"
]
&&
echo
"OracleLinux"
&&
return
[
"
$1
"
=
"Alma Linux"
]
&&
echo
"AlmaLinux"
&&
return
case
"
$1
"
in
"RED OS"
)
echo
"RedOS"
;;
"CentOS Linux"
)
echo
"CentOS"
;;
"Fedora Linux"
)
echo
"Fedora"
;;
*
)
#echo "${1// /}"
echo
"
$1
"
|
sed
-e
"s/ //g"
;;
esac
}
# Default values
...
...
@@ -1589,6 +1594,17 @@ elif distro gentoo-release ; then
elif
[
"
$DISTRIB_ID
"
=
"ALTServer"
]
;
then
DISTRIB_RELEASE
=
$(
echo
$DISTRIB_RELEASE
|
sed
-e
"s/
\.
.*//g"
)
elif
[
"
$DISTRIB_ID
"
=
"ALTSPWorkstation"
]
;
then
DISTRIB_ID
=
"ALTLinux"
case
"
$DISTRIB_RELEASE
"
in
8.0|8.1
)
;;
8.
*
)
DISTRIB_RELEASE
=
"c9"
;;
esac
DISTRIB_RELEASE
=
$(
echo
$DISTRIB_RELEASE
|
sed
-e
"s/
\.
.*//g"
)
elif
distro slackware-version
;
then
DISTRIB_ID
=
"Slackware"
DISTRIB_RELEASE
=
"
$(
grep
-Eo
'[0-9]+\.[0-9]+'
$DISTROFILE
)
"
...
...
@@ -2007,8 +2023,7 @@ Pretty distro name (--pretty): $(print_pretty_name)
CPU norm register size (-b):
$(
get_bit_size
)
System memory size (MB) (-m):
$(
get_memory_size
)
Base OS name (-o):
$(
get_base_os_name
)
Build system distro name (-s):
$(
pkgvendor
)
Build system vendor name (-n):
$(
rpmvendor
)
Base distro name (-s|-n):
$(
pkgvendor
)
(run with -h to get help)
EOF
...
...
@@ -2029,11 +2044,10 @@ case $1 in
echo
" -i - print virtualization type"
echo
" -h - this help"
echo
" -m - print system memory size (in MB)"
echo
" -n [SystemName] - print vendor name (as _vendor macros in rpm)"
echo
" -o - print base OS name"
echo
" -p [SystemName] - print type of the packaging system"
echo
" -g [SystemName] - print name of the packaging system"
echo
" -s
[SystemName] - print name of distro for build system (like in the package release name
)"
echo
" -s
|-n [SystemName] - print base name of the distro (ubuntu for all Ubuntu family, alt for all ALT family) (as _vendor macros in rpm
)"
echo
" -y - print running service manager"
echo
" --pretty - print pretty distro name"
echo
" -v - print version of distro"
...
...
@@ -2091,16 +2105,11 @@ case $1 in
-v
)
echo
$DISTRIB_RELEASE
;;
-s
)
-s
|
-n
)
override_distrib
"
$2
"
pkgvendor
exit
0
;;
-n
)
override_distrib
"
$2
"
rpmvendor
exit
0
;;
-y
)
get_service_manager
;;
...
...
@@ -2985,7 +2994,7 @@ print_version()
local
on_text
=
"(host system)"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
echo
"Service manager version 3.16.
5
https://wiki.etersoft.ru/Epm"
echo
"Service manager version 3.16.
6
https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Copyright (c) Etersoft 2012-2021"
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