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
1763d17c
Commit
1763d17c
authored
Aug 03, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-release_upgrade: add support for p10
parent
06c1e053
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
5 deletions
+36
-5
epm-release_upgrade
bin/epm-release_upgrade
+36
-5
No files found.
bin/epm-release_upgrade
View file @
1763d17c
#!/bin/sh
#
# Copyright (C) 2013, 2016, 2017, 2019, 2020 Etersoft
# Copyright (C) 2013, 2016, 2017, 2019, 2020 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2013, 2016, 2017, 2019, 2020
, 2021
Etersoft
# Copyright (C) 2013, 2016, 2017, 2019, 2020
, 2021
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
...
...
@@ -88,6 +88,7 @@ __alt_replace_sign_name()
__replace_text_in_alt_repo
"/^ *#/! s!
\[
sisyphus
\]
!
$TO
!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
updates
\]
!
$TO
!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
cert[789]
\]
!
$TO
!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
p10
\.
?[0-9]?
\]
!
$TO
!g"
__replace_text_in_alt_repo
"/^ *#/! s!
\[
[tpc][6-9]
\.
?[0-9]?
\]
!
$TO
!g"
}
...
...
@@ -173,6 +174,7 @@ __switch_repo_to()
local
TO
=
"
$1
"
__replace_alt_version_in_repo
"Sisyphus/"
"
$TO
/branch/"
__replace_alt_version_in_repo
"[tpc][5-9]
\.
?[0-9]?/branch/"
"
$TO
/branch/"
__replace_alt_version_in_repo
"p10
\.
?[0-9]?/branch/"
"
$TO
/branch/"
__alt_repofix
$TO
}
...
...
@@ -213,6 +215,8 @@ get_next_release()
echo
"p8"
;;
"p8"
)
echo
"p9"
;;
"p9"
)
echo
"p10"
;;
"c6"
)
echo
"c7"
;;
"c7"
)
...
...
@@ -300,6 +304,19 @@ __switch_alt_to_distro()
docmd epm update-kernel
||
fatal
info
"Done."
;;
"p9"
|
"p9 p10"
|
"p10 p10"
)
confirm_info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__switch_repo_to
$TO
__epm_ru_update
||
fatal
echo
'%_priority_distbranch p10'
>
/etc/rpm/macros.d/p10
# TODO: update-kernel -t std-def
docmd epm upgrade
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
--force
"
$TO
"
)
"
||
fatal
"Check an error and run epm release-upgrade again"
__check_system
docmd epm update-kernel
||
fatal
info
"Done."
;;
"p9 p8"
|
"c8.1 c8"
|
"c8.1 p8"
|
"p8 p8"
)
confirm_info
"Downgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
...
...
@@ -330,24 +347,38 @@ __switch_alt_to_distro()
docmd epm upgrade
||
fatal
info
"Done."
;;
"Sisyphus p8"
|
"Sisyphus p9"
|
"Sisyphus c8"
|
"Sisyphus c8.1"
)
"p10 p9"
)
confirm_info
"Downgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__switch_repo_to
$TO
__epm_ru_update
||
fatal
rm
-fv
/etc/rpm/macros.d/p10
docmd epm downgrade rpm apt
"
$(
get_fix_release_pkg
--force
"
$TO
"
)
"
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm downgrade
__check_system
docmd epm upgrade
||
fatal
info
"Done."
;;
"Sisyphus p8"
|
"Sisyphus p9"
|
"Sisyphus p10"
|
"Sisyphus c8"
|
"Sisyphus c8.1"
)
confirm_info
"Downgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
__switch_repo_to
$TO
__epm_ru_update
||
fatal
[
"
$TO
"
=
"p10"
]
&&
echo
'%_priority_distbranch p10'
>
/etc/rpm/macros.d/p10
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
--force
"
$TO
"
)
"
||
fatal
"Check an error and run epm release-upgrade again"
docmd epm downgrade
__check_system
docmd epm upgrade
||
fatal
info
"Done."
;;
"p8 Sisyphus"
|
"p9 Sisyphus"
|
"Sisyphus Sisyphus"
)
"p8 Sisyphus"
|
"p9 Sisyphus"
|
"
p10 Sisyphus"
|
"
Sisyphus Sisyphus"
)
confirm_info
"Upgrade
$DISTRNAME
from
$FROM
to
$TO
..."
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
"
$FROM
"
)
"
||
fatal
docmd epm upgrade
||
fatal
__replace_alt_version_in_repo
"
$FROM
/branch/"
"
$TO
/"
__alt_repofix
"alt"
__epm_ru_update
||
fatal
[
-s
/etc/rpm/macros.d/p10
]
&&
rm
-fv
/etc/rpm/macros.d/p10
docmd epm
install
rpm apt
"
$(
get_fix_release_pkg
--force
"
$TO
"
)
"
||
fatal
"Check an error and run epm release-upgrade again"
#local ADDPKG
#ADDPKG=$(epm -q --short make-initrd sssd-ad 2>/dev/null)
...
...
@@ -363,7 +394,7 @@ __switch_alt_to_distro()
else
warning
"Have no idea how to switch from
$DISTRNAME
$FROM
to
$DISTRNAME
$TO
."
fi
info
"Try run f.i. # epm release-upgrade p
8
or # epm release-upgrade Sisyphus"
info
"Try run f.i. # epm release-upgrade p
10
or # epm release-upgrade Sisyphus"
info
"Also possible you need install altlinux-release-p? package for correct distro version detecting"
return
1
esac
...
...
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