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
cf6d4cf5
Commit
cf6d4cf5
authored
Mar 07, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move install emerge to the separate file
parent
ec70fd08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
73 deletions
+106
-73
epm-install
bin/epm-install
+9
-73
epm-install-emerge
bin/epm-install-emerge
+97
-0
No files found.
bin/epm-install
View file @
cf6d4cf5
#!/bin/sh
#!/bin/sh
#
#
# Copyright (C) 2012-13 Etersoft
# Copyright (C) 2012-
20
13 Etersoft
# Copyright (C) 2012-13 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-
20
13 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
...
@@ -41,72 +41,7 @@ filter_out_installed_packages()
...
@@ -41,72 +41,7 @@ filter_out_installed_packages()
esac
|
sed
-e
"s|rpm-build-altlinux-compat[^ ]*||g"
| filter_strip_spaces
esac
|
sed
-e
"s|rpm-build-altlinux-compat[^ ]*||g"
| filter_strip_spaces
}
}
# http://ru.gentoo-wiki.com/wiki/Portage_Overlay
# http://kb.etersoft.ru/Gentoo:_Установка_продуктов_Etersoft
# http://linuxreviews.org/gentoo/ebuilds/
#
# install one ebuild
__emerge_install_ebuild
()
{
local
EBUILD
=
"
$1
"
[
-s
"
$EBUILD
"
]
||
fatal
".ebuild file '
$EBUILD
' is missing"
# load ebuild and get vars
.
$EBUILD
[
-n
"
$SRC_URI
"
]
||
fatal
"Can't load SRC_URI from
$EBUILD
"
# try to detect tarballs
local
TARBALLS
=
local
BASEDIR
=
$(
dirname
$EBUILD
)
for
i
in
$SRC_URI
;
do
[
-s
"
$BASEDIR
/
$(
basename
$i
)
"
]
||
continue
TARBALLS
=
"
$TARBALLS
$BASEDIR
/
$(
basename
$i
)
"
done
local
PORTAGENAME
=
epm
local
LP
=
/usr/local/portage/
$PORTAGENAME
sudocmd
mkdir
-p
$LP
/
if
!
grep
-v
"^#"
/etc/make.conf |
grep
-q
$LP
;
then
sudocmd
echo
'PORTDIR_OVERLAY="$LP \${PORTDIR_OVERLAY}"'
>>
/etc/make.conf
# Overlay name
sudocmd
mkdir
-p
$LP
/profiles/
sudocmd
echo
"
$PORTAGENAME
"
>
$LP
/profiles/repo_name
fi
# copy tarballs
local
DDIR
=
/usr/portage/distfiles
[
-d
/var/calculate/remote/distfiles
]
&&
DDIR
=
/var/calculate/remote/distfiles
sudocmd
cp
-f
$TARBALLS
$DDIR
/
||
return
# copy ebuild
sudocmd
cp
-f
$EBUILD
$LP
/
||
return
cd
$LP
sudocmd ebuild
$(
basename
$EBUILD
)
digest
cd
-
# FIXME: more correcty get name
local
PKGNAME
=
$(
echo
$EBUILD
|
sed
-e
"s|-[0-9].*||g"
)
sudocmd emerge
-av
$PKGNAME
||
return
}
# install ebuild list
__emerge_install
()
{
local
EBUILD
=
#local TARBALLS=
local
i
# search ebuild in the args
for
i
in
$*
;
do
if
echo
$i
|
grep
-q
ebuild
;
then
[
-s
"
$EBUILD
"
]
||
fatal
"Can't find .ebuild file in
$*
"
__emerge_install_ebuild
$i
continue
# else
# TARBALLS="$TARBALLS $i"
fi
done
}
# copied from etersoft-build-utils/share/eterbuild/functions/rpmpkg
# copied from etersoft-build-utils/share/eterbuild/functions/rpmpkg
epm_install_names
()
epm_install_names
()
...
@@ -279,7 +214,7 @@ epm_install_files()
...
@@ -279,7 +214,7 @@ epm_install_files()
# if run with --nodeps, do not fallback on hi level
# if run with --nodeps, do not fallback on hi level
[
-n
"
$nodeps
"
]
&&
return
[
-n
"
$nodeps
"
]
&&
return
ZYPPEROPTIONS
=
--no-gpg-checks
ZYPPEROPTIONS
=
$(
__use_zypper_no_gpg_checks
)
# use install_names
# use install_names
;;
;;
urpm-rpm
)
urpm-rpm
)
...
@@ -294,7 +229,8 @@ epm_install_files()
...
@@ -294,7 +229,8 @@ epm_install_files()
sudocmd pkg_add
$@
sudocmd pkg_add
$@
return
;;
return
;;
emerge
)
emerge
)
__emerge_install
$@
load_helper epm-install-emerge
sudocmd epm_install_emerge
$@
return
;;
return
;;
pacman
)
pacman
)
sudocmd pacman
-U
--noconfirm
$force
$nodeps
$@
&&
return
sudocmd pacman
-U
--noconfirm
$force
$nodeps
$@
&&
return
...
@@ -322,10 +258,10 @@ epm_print_install_command()
...
@@ -322,10 +258,10 @@ epm_print_install_command()
pkgsrc
)
pkgsrc
)
echo
"pkg_add
$@
"
echo
"pkg_add
$@
"
;;
;;
#
emerge)
emerge
)
# # it is better to use epm
# need be placed in /usr/portage/packages/somewhere
# echo "tar xvfj $@ -C /
"
echo
"emerge --usepkg
$@
"
#
;;
;;
pacman
)
pacman
)
echo
"pacman -U --noconfirm --force
$nodeps
$@
"
echo
"pacman -U --noconfirm --force
$nodeps
$@
"
;;
;;
...
...
bin/epm-install-emerge
0 → 100644
View file @
cf6d4cf5
#!/bin/sh
#
# Copyright (C) 2012-2013 Etersoft
# Copyright (C) 2012-2013 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/>.
#
# This functions already run as root
# http://ru.gentoo-wiki.com/wiki/Portage_Overlay
# http://kb.etersoft.ru/Gentoo:_Установка_продуктов_Etersoft
# http://linuxreviews.org/gentoo/ebuilds/
# install one ebuild
__emerge_install_ebuild
()
{
local
EBUILD
=
"
$1
"
[
-s
"
$EBUILD
"
]
||
fatal
".ebuild file '
$EBUILD
' is missing"
# load ebuild and get vars
.
$(
pwd
)
/
$EBUILD
[
-n
"
$SRC_URI
"
]
||
fatal
"Can't load SRC_URI from
$EBUILD
"
# try to detect tarballs
local
TARBALLS
=
local
BASEDIR
=
$(
dirname
$EBUILD
)
for
i
in
$SRC_URI
;
do
[
-s
"
$BASEDIR
/
$(
basename
$i
)
"
]
||
continue
TARBALLS
=
"
$TARBALLS
$BASEDIR
/
$(
basename
$i
)
"
done
local
PORTAGENAME
=
epm
local
LP
=
/usr/local/portage/
$PORTAGENAME
docmd
mkdir
-p
$LP
/
MAKECONF
=
/etc/portage/make.conf
[
-r
"
$MAKECONF
"
]
||
MAKECONF
=
/etc/make.conf
if
!
grep
-v
"^#"
$MAKECONF
|
grep
-q
$LP
;
then
echo
"PORTDIR_OVERLAY=
\"
$LP
\$
{PORTDIR_OVERLAY}
\"
"
>>
$MAKECONF
# Overlay name
mkdir
-p
$LP
/profiles/
echo
"
$PORTAGENAME
"
>
$LP
/profiles/repo_name
fi
# copy tarballs
local
DDIR
=
/usr/portage/distfiles
[
-d
/var/calculate/remote/distfiles
]
&&
DDIR
=
/var/calculate/remote/distfiles
docmd
cp
-f
$TARBALLS
$DDIR
/
||
return
# copy ebuild
docmd
cp
-f
$EBUILD
$LP
/
||
return
cd
$LP
docmd ebuild
$(
basename
$EBUILD
)
digest
cd
-
# FIXME: more correcty get name
local
PKGNAME
=
$(
echo
$EBUILD
|
sed
-e
"s|-[0-9].*||g"
)
docmd emerge
-av
$PKGNAME
||
return
}
# install one ebuild
__emerge_install_tbgz2
()
{
local
TGDIR
=
/usr/portage/packages/app-arch
mkdir
-p
$TGDIR
cp
$i
$TGDIR
||
return
docmd emerge
--usepkg
$TGDIR
/
$(
basename
$i
)
||
return
}
# install ebuild list
epm_install_emerge
()
{
local
EBUILD
=
#local TARBALLS=
local
i
# search ebuild in the args
for
i
in
$*
;
do
if
echo
$i
|
grep
-q
ebuild
;
then
__emerge_install_ebuild
$i
||
return
elif
echo
$i
|
grep
-q
"
\.
tbz2$"
;
then
__emerge_install_tbz2
$i
||
return
# else
# TARBALLS="$TARBALLS $i"
fi
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