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
4873863d
Commit
4873863d
authored
Aug 19, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial repofix code, need fix regexp and test
parent
e0823f6a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
171 additions
and
0 deletions
+171
-0
epm
bin/epm
+3
-0
epm-repofix
bin/epm-repofix
+45
-0
test_sources.list
tests/test_sources.list
+55
-0
test_sources.list.reference
tests/test_sources.list.reference
+55
-0
test_sources_list.sh
tests/test_sources_list.sh
+13
-0
No files found.
bin/epm
View file @
4873863d
...
...
@@ -220,6 +220,9 @@ check_command()
repolist|sl|rl|listrepo
)
# HELPCMD: print repo list
epm_cmd
=
repolist
;;
repofix
)
# HELPCMD: fix paths in sources lists (ALT Linux only)
epm_cmd
=
repofix
;;
removerepo|rr
)
# HELPCMD: remove package repo
epm_cmd
=
removerepo
;;
...
...
bin/epm-repofix
0 → 100644
View file @
4873863d
#!/bin/sh
#
# Copyright (C) 2015 Etersoft
# Copyright (C) 2015 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
# 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/>.
#
SUBST_ALT_RULE
=
"s![/ ](ALTLinux|LINUX@Etersoft)[/ ](Sisyphus|p7[/ ]branch|p6[/ ]branch)[/ ](x86_64|i586|x86_64-i586|noarch) !
\1
/
\2
/
\3
!gi"
__fix_apt_sources_list
()
{
for
i
in
"
$@
"
;
do
[
-s
"
$i
"
]
||
continue
sudocmd perl
-i
.bak
-pe
"
$SUBST_ALT_RULE
"
$i
done
}
epm_repolist
()
{
case
$PMTYPE
in
apt-rpm
)
assure_exists apt-repo
docmd apt-repo list
__fix_apt_sources_list /etc/apt/sources.list
__fix_apt_sources_list /etc/apt/sources.list.d/
*
.list
;;
*
)
fatal
"Have no suitable command for
$PMTYPE
"
;;
esac
}
tests/test_sources.list
0 → 100644
View file @
4873863d
# Local package resource list for APT goes here.
# To inspect package defined part, see /etc/apt/sources.list.d/*.list
#rpm ftp://server/pub/ALTLinux/Sisyphus x86_64 classic games media
#rpm ftp://server/pub/ALTLinux/Sisyphus x86_32 classic
#rpm ftp://server/pub/ALTLinux/Sisyphus noarch classic games media
#rpm file:/var/ftp/pub/ALTLinux i586 bonus
rpm file:/var/ftp/pub/ALTLinux/Sisyphus x86_64 classic debuginfo
rpm file:/var/ftp/pub/ALTLinux/Sisyphus x86_64-i586 classic
rpm file:/var/ftp/pub/ALTLinux/Sisyphus noarch classic
rpm file:/var/ftp/pub/Etersoft/LINUX@Etersoft/Sisyphus x86_64 addon nonfree
rpm file:/var/ftp/pub/Etersoft/LINUX@Etersoft/Sisyphus x86_64-i586 addon
rpm file:/var/ftp/pub/Etersoft/LINUX@Etersoft/Sisyphus noarch addon nonfree
rpm file:/var/ftp/pub/Etersoft/WINE@Etersoft/2.1-testing/WINE/ALTLinux Sisyphus main
rpm file:/var/ftp/pub/Etersoft/WINE@Etersoft/2.1-testing/WINE/ALTLinux Sisyphus/extra main
#rpm file:/var/ftp/pub/Etersoft/LINUX@Etersoft/Sisyphus i586 addon nonfree
#rpm file:/var/ftp/pub/Etersoft/LINUX@Etersoft/Sisyphus x86_64 nonfree
#rpm file:/var/ftp/pub/Etersoft/LINUX@Etersoft/Sisyphus noarch nonfree
#rpm http://git.altlinux.org/repo/81290/ x86_64 task
rpm http://download.etersoft.ru/pub/Etersoft/RX@Etersoft/testing x86_64/ALTLinux/Sisyphus main
rpm http://download.etersoft.ru/pub/Etersoft/RX@Etersoft/unstable x86_64/ALTLinux/Sisyphus main
#rpm http://git.altlinux.org/repo/125605/ x86_64-i586 task
# ftp.altlinux.org (ALT Linux, Moscow)
# ALT Linux Sisyphus
rpm [alt] ftp://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic
rpm [alt] ftp://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic
rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux p7/branch/x86_64 classic
rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux p7/branch/noarch classic
rpm [alt] rsync://ftp.altlinux.org/ALTLinux/Sisyphus x86_64 classic
rpm [alt] rsync://ftp.altlinux.org/ALTLinux/Sisyphus noarch classic
# possible it will be in apt-conf-etersoft?
rpm file:/var/ftp/pub/Etersoft/LINUX@Etersoft Sisyphus/i586 addon nonfree
rpm file:/var/ftp/pub/Etersoft/LINUX@Etersoft Sisyphus/noarch addon nonfree
# mirror.yandex.ru (Yandex, Moscow)
# ALT Linux Sisyphus
rpm [alt] ftp://mirror.yandex.ru/altlinux/Sisyphus x86_64 classic
rpm [alt] ftp://mirror.yandex.ru/altlinux/Sisyphus noarch classic
rpm [alt] http://mirror.yandex.ru/altlinux/Sisyphus x86_64 classic
rpm [alt] http://mirror.yandex.ru/altlinux/Sisyphus noarch classic
rpm [alt] rsync://mirror.yandex.ru/altlinux/Sisyphus x86_64 classic
rpm [alt] rsync://mirror.yandex.ru/altlinux/Sisyphus noarch classic
tests/test_sources.list.reference
0 → 100644
View file @
4873863d
# Local package resource list for APT goes here.
# To inspect package defined part, see /etc/apt/sources.list.d/*.list
#rpm ftp://server/pub/ALTLinux/Sisyphus x86_64 classic games media
#rpm ftp://server/pub/ALTLinux/Sisyphus x86_32 classic
#rpm ftp://server/pub/ALTLinux/Sisyphus noarch classic games media
#rpm file:/var/ftp/pub/ALTLinux i586 bonus
rpm file:/var/ftp/pub ALTLinux/Sisyphus/x86_64 classic debuginfo
rpm file:/var/ftp/pub ALTLinux/Sisyphus/x86_64-i586 classic
rpm file:/var/ftp/pub ALTLinux/Sisyphus/noarch classic
rpm file:/var/ftp/pub/Etersoft LINUX@Etersoft/Sisyphus/x86_64 addon nonfree
rpm file:/var/ftp/pub/Etersoft LINUX@Etersoft/Sisyphus/x86_64-i586 addon
rpm file:/var/ftp/pub/Etersoft LINUX@Etersoft/Sisyphus/noarch addon nonfree
rpm file:/var/ftp/pub/Etersoft WINE@Etersoft/2.1-testing/WINE/ALTLinux/Sisyphus main
rpm file:/var/ftp/pub/Etersoft WINE@Etersoft/2.1-testing/WINE/ALTLinux/Sisyphus/extra main
#rpm file:/var/ftp/pub/Etersoft LINUX@Etersoft/Sisyphus/i586 addon nonfree
#rpm file:/var/ftp/pub/Etersoft LINUX@Etersoft/Sisyphus/x86_64 nonfree
#rpm file:/var/ftp/pub/Etersoft LINUX@Etersoft/Sisyphus/noarch nonfree
#rpm http://git.altlinux.org/repo/81290/ x86_64 task
rpm http://download.etersoft.ru/pub/Etersoft RX@Etersoft/testing/x86_64/ALTLinux/Sisyphus main
rpm http://download.etersoft.ru/pub/Etersoft RX@Etersoft/unstable/x86_64/ALTLinux/Sisyphus main
#rpm http://git.altlinux.org/repo/125605/ x86_64-i586 task
# ftp.altlinux.org (ALT Linux, Moscow)
# ALT Linux Sisyphus
rpm [alt] ftp://ftp.altlinux.org/pub/distributions ALTLinux/Sisyphus/x86_64 classic
rpm [alt] ftp://ftp.altlinux.org/pub/distributions ALTLinux/Sisyphus/noarch classic
rpm [alt] http://ftp.altlinux.org/pub/distributions ALTLinux/Sisyphus/x86_64 classic
rpm [alt] http://ftp.altlinux.org/pub/distributions ALTLinux/Sisyphus/noarch classic
rpm [alt] rsync://ftp.altlinux.org ALTLinux/Sisyphus/x86_64 classic
rpm [alt] rsync://ftp.altlinux.org ALTLinux/Sisyphus/noarch classic
# possible it will be in apt-conf-etersoft?
rpm file:/var/ftp/pub/Etersoft LINUX@Etersoft/Sisyphus/i586 addon nonfree
rpm file:/var/ftp/pub/Etersoft LINUX@Etersoft/Sisyphus/noarch addon nonfree
# mirror.yandex.ru (Yandex, Moscow)
# ALT Linux Sisyphus
rpm [alt] ftp://mirror.yandex.ru altlinux/Sisyphus/x86_64 classic
rpm [alt] ftp://mirror.yandex.ru altlinux/Sisyphus/noarch classic
rpm [alt] http://mirror.yandex.ru altlinux/Sisyphus/x86_64 classic
rpm [alt] http://mirror.yandex.ru altlinux/Sisyphus/noarch classic
rpm [alt] rsync://mirror.yandex.ru altlinux/Sisyphus/x86_64 classic
rpm [alt] rsync://mirror.yandex.ru altlinux/Sisyphus/noarch classic
tests/test_sources_list.sh
0 → 100755
View file @
4873863d
#!/bin/sh
.
../bin/epm-repofix
#__fix_apt_sources_list
perl
-pe
"
$SUBST_ALT_RULE
"
<test_sources.list
>
test_sources.list.out
#echo "Fixes:"
#diff -u test_sources.list test_sources.list.out
echo
"==========="
echo
"Diffs:"
diff
-u
test_sources.list.reference test_sources.list.out
&&
echo
DONE
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