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
fafbe331
Commit
fafbe331
authored
Jul 21, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for ALT Linux t7
parent
53533046
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
30 deletions
+37
-30
distr_info
bin/distr_info
+1
-0
epm-release_upgrade
bin/epm-release_upgrade
+35
-29
epm-repofix
bin/epm-repofix
+1
-1
No files found.
bin/distr_info
View file @
fafbe331
...
@@ -96,6 +96,7 @@ if distro altlinux-release ; then
...
@@ -96,6 +96,7 @@ if distro altlinux-release ; then
DISTRIB_ID
=
"ALTLinux"
DISTRIB_ID
=
"ALTLinux"
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 t7."
;
then
DISTRIB_RELEASE
=
"t7"
elif
has
"ALT Linux 8."
;
then
DISTRIB_RELEASE
=
"p8"
elif
has
"ALT Linux 8."
;
then
DISTRIB_RELEASE
=
"p8"
elif
has
"ALT .*8.[0-9]"
;
then
DISTRIB_RELEASE
=
"p8"
elif
has
"ALT .*8.[0-9]"
;
then
DISTRIB_RELEASE
=
"p8"
elif
has
"Simply Linux 6."
;
then
DISTRIB_RELEASE
=
"p6"
elif
has
"Simply Linux 6."
;
then
DISTRIB_RELEASE
=
"p6"
...
...
bin/epm-release_upgrade
View file @
fafbe331
#!/bin/sh
#!/bin/sh
#
#
# Copyright (C) 2013, 2016 Etersoft
# Copyright (C) 2013, 2016
, 2017
Etersoft
# Copyright (C) 2013, 2016 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2013, 2016
, 2017
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# 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
# it under the terms of the GNU Affero General Public License as published by
...
@@ -37,8 +37,8 @@ __detect_alt_release_by_repo()
...
@@ -37,8 +37,8 @@ __detect_alt_release_by_repo()
{
{
local
BRD
=
$(
cat
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list
\
local
BRD
=
$(
cat
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list
\
|
grep
-v
"^#"
\
|
grep
-v
"^#"
\
|
grep
"
p
[5-9]/branch/"
\
|
grep
"
[tp]
[5-9]/branch/"
\
|
sed
-e
"s|.*
\(
p
[5-9]
\)
/branch.*|
\1
|g"
\
|
sed
-e
"s|.*
\(
[tp]
[5-9]
\)
/branch.*|
\1
|g"
\
|
sort
-u
)
|
sort
-u
)
if
[
$(
__wcount
$BRD
)
=
"1"
]
;
then
if
[
$(
__wcount
$BRD
)
=
"1"
]
;
then
echo
"
$BRD
"
echo
"
$BRD
"
...
@@ -77,7 +77,7 @@ __alt_repofix()
...
@@ -77,7 +77,7 @@ __alt_repofix()
load_helper epm-repofix
load_helper epm-repofix
showcmd epm repofix
showcmd epm repofix
quiet
=
1
pkg_filenames
=
''
epm_repofix
>
/dev/null
quiet
=
1
pkg_filenames
=
''
epm_repofix
>
/dev/null
__replace_text_in_alt_repo
"/^ *#/! s!
\[
p
[6-9]
\]
![updates]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
[tp]
[6-9]
\]
![updates]!g"
}
}
get_fix_release_pkg
()
get_fix_release_pkg
()
...
@@ -90,25 +90,26 @@ get_fix_release_pkg()
...
@@ -90,25 +90,26 @@ get_fix_release_pkg()
__update_to_the_distro
()
__update_to_the_distro
()
{
{
local
TO
=
"
$1
"
__alt_repofix
__alt_repofix
case
"
$
1
"
in
case
"
$
TO
"
in
p7
)
p7
)
docmd epm update
||
fatal
docmd epm update
||
fatal
docmd epm
install
apt rpm apt-conf-branch
$(
get_fix_release_pkg
p7
)
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm
install
apt rpm apt-conf-branch
$(
get_fix_release_pkg
$TO
)
||
fatal
"Check an error and run epm release-upgrade again"
__alt_repofix
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![
p7
]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![
$TO
]!g"
docmd epm update
||
fatal
docmd epm update
||
fatal
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade again"
;;
;;
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
$TO
)
;
then
# Hack for 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 rpm
-ev
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
$TO
)
||
fatal
"Check an error and run epm release-upgrade again"
fi
fi
__alt_repofix
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![
p8
]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![
$TO
]!g"
docmd epm update
||
fatal
docmd epm update
||
fatal
if
is_installed systemd
&&
is_active_systemd systemd
;
then
if
is_installed systemd
&&
is_active_systemd systemd
;
then
docmd epm
install
systemd
||
fatal
docmd epm
install
systemd
||
fatal
...
@@ -126,48 +127,53 @@ __update_to_the_distro()
...
@@ -126,48 +127,53 @@ __update_to_the_distro()
__update_alt_to_next_distro
()
__update_alt_to_next_distro
()
{
{
local
FROMTO
=
$(
echo
"
$*
"
|
sed
-e
"s| | to |"
)
local
TO
=
""
local
FROM
=
"
$1
"
info
info
case
"
$*
"
in
case
"
$*
"
in
"p6"
|
"p6 p7"
)
"p6"
|
"p6 p7"
|
"t6 p7"
)
info
"Upgrade
$DISTRNAME
from p6 to p7 ..."
TO
=
"p7"
info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
apt-conf-branch
||
fatal
__replace_alt_version_in_repo
p6/branch/ p7/branch/
__replace_alt_version_in_repo
"
$FROM
/branch/"
"
$TO
/branch/"
__update_to_the_distro
p7
__update_to_the_distro
"
$TO
"
docmd epm update-kernel
docmd epm update-kernel
info
"Done."
info
"Done."
info
"Run epm release-upgrade again for update to p8"
info
"Run epm release-upgrade again for update to p8"
;;
;;
"p7"
|
"p7 p8"
)
"p7"
|
"p7 p8"
|
"t7 p8"
)
info
"Upgrade
$DISTRNAME
from p7 to p8 ..."
TO
=
"p8"
docmd epm
install
apt-conf-branch
$(
get_fix_release_pkg p7
)
||
fatal
info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
__replace_alt_version_in_repo p7/branch/ p8/branch/
docmd epm
install
apt-conf-branch
$(
get_fix_release_pkg
$FROM
)
||
fatal
__update_to_the_distro p8
__replace_alt_version_in_repo
$FROM
/branch/
$TO
/branch/
__update_to_the_distro
$TO
docmd epm update-kernel
||
fatal
docmd epm update-kernel
||
fatal
info
"Done."
info
"Done."
;;
;;
"Sisyphus p8"
)
"Sisyphus p8"
)
info
"Downgrade
$DISTRNAME
from Sisyphus to p8 ..."
TO
=
"p8"
info
"Downgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
apt-conf-branch
||
fatal
__replace_alt_version_in_repo
Sisyphus/ p8/branch/
__replace_alt_version_in_repo
"
$FROM
/"
"
$FROM
/branch/"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
alt
\]
![
p8
]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
alt
\]
![
$TO
]!g"
__update_to_the_distro
p8
__update_to_the_distro
$TO
docmd epm downgrade
||
fatal
docmd epm downgrade
||
fatal
info
"Done."
info
"Done."
;;
;;
"p8 Sisyphus"
)
"p8 Sisyphus"
)
info
"Upgrade
$DISTRNAME
from p8 to Sisyphus ..."
TO
=
"Sisyphus"
info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
apt-conf-branch
||
fatal
docmd epm
install
apt-conf-branch
||
fatal
docmd epm upgrade
||
fatal
docmd epm upgrade
||
fatal
__replace_alt_version_in_repo
p8/branch/ Sisyphus/
__replace_alt_version_in_repo
"
$FROM
/branch/"
"
$TO
/"
__alt_repofix
__alt_repofix
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![alt]!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
![alt]!g"
__update_to_the_distro
Sisyphus
__update_to_the_distro
$TO
docmd epm update-kernel
||
fatal
docmd epm update-kernel
||
fatal
info
"Done."
info
"Done."
;;
;;
*
)
*
)
warning
"Have no idea how to update from
$DISTRNAME
$
DISTRVERSION
."
warning
"Have no idea how to update from
$DISTRNAME
$
FROM
to
$DISTRNAME
$TO
."
info
"Try run f.i. # epm release-upgrade p8 or # epm release-upgrade Sisyphus"
info
"Try run f.i. # epm release-upgrade p8 or # epm release-upgrade Sisyphus"
info
"Also possible you need install altlinux-release-p? package for correct distro version detecting"
info
"Also possible you need install altlinux-release-p? package for correct distro version detecting"
return
1
return
1
...
...
bin/epm-repofix
View file @
fafbe331
...
@@ -49,7 +49,7 @@ __try_fix_apt_source_list()
...
@@ -49,7 +49,7 @@ __try_fix_apt_source_list()
__fix_apt_sources_list
()
__fix_apt_sources_list
()
{
{
# for beauty spaces
# for beauty spaces
local
SUBST_ALT_RULE
=
's!^(.*)[/ ](ALTLinux|LINUX\@Etersoft)[/ ](Sisyphus|p8[/ ]branch|p7[/ ]branch|
p
6[/ ]branch)[/ ](x86_64|i586|x86_64-i586|noarch) !\1 \2/\3/\4 !gi'
local
SUBST_ALT_RULE
=
's!^(.*)[/ ](ALTLinux|LINUX\@Etersoft)[/ ](Sisyphus|p8[/ ]branch|p7[/ ]branch|
t7[/ ]branch|c7[/ ]branch|p6[/ ]branch|t
6[/ ]branch)[/ ](x86_64|i586|x86_64-i586|noarch) !\1 \2/\3/\4 !gi'
local
i
local
i
assure_root
assure_root
for
i
in
"
$@
"
;
do
for
i
in
"
$@
"
;
do
...
...
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