1 |
grobian 08/09/04 09:07:54 |
2 |
|
3 |
Added: ecopy.xml |
4 |
Log: |
5 |
Add document on ecopy, based on darkside's text from bug #234006 |
6 |
|
7 |
Revision Changes Path |
8 |
1.1 xml/htdocs/proj/en/gentoo-alt/prefix/ecopy.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/ecopy.xml?rev=1.1&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/ecopy.xml?rev=1.1&content-type=text/plain |
12 |
|
13 |
Index: ecopy.xml |
14 |
=================================================================== |
15 |
<?xml version="1.0" encoding="UTF-8"?> |
16 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
17 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/gentoo-alt/prefix/ecopy.xml,v 1.1 2008/09/04 09:07:53 grobian Exp $ --> |
18 |
|
19 |
<guide link="/proj/en/gentoo-alt/prefix/ecopy.xml" lang="en"> |
20 |
<title>Importing ebuilds in Gentoo Prefix</title> |
21 |
|
22 |
<author title="Author"> |
23 |
<mail link="darkside@g.o">Jeremy Olexa</mail> |
24 |
</author> |
25 |
|
26 |
<abstract> |
27 |
How to import ebuilds from main Gentoo into Gentoo Prefix |
28 |
</abstract> |
29 |
|
30 |
|
31 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
32 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
33 |
<license/> |
34 |
|
35 |
<version>1.0</version> |
36 |
<date>2008-09-04</date> |
37 |
|
38 |
<chapter> |
39 |
<title>Importing ebuilds with ecopy</title> |
40 |
|
41 |
<section><!-- {{{ introduction --> |
42 |
<title>Introduction</title> |
43 |
<body> |
44 |
<p> |
45 |
Ebuilds for Gentoo Prefix need some minor modifications from |
46 |
those that exist in the "regular" Gentoo tree (known as the |
47 |
gentoo-x86 tree). Spelling out those modifications is out of |
48 |
scope for this document, feel free to browse here: |
49 |
<uri>http://www.gentoo.org/proj/en/gentoo-alt/prefix/techdocs.xml</uri> |
50 |
</p> |
51 |
</body> |
52 |
</section><!-- }}} --> |
53 |
|
54 |
<section><!-- {{{ ecopy --> |
55 |
<title>The ecopy script</title> |
56 |
<body> |
57 |
<p> |
58 |
<c>ecopy</c> |
59 |
is a script created by the Gentoo Prefix team, and located in |
60 |
<c>${EPREFIX}/usr/portage/scripts</c>. Its intention is to |
61 |
save people time and is mainly a wrapper for other scripts |
62 |
which will be discussed later. Its usage can be described by |
63 |
running: <c>ecopy</c>. |
64 |
</p> |
65 |
<p><c>ecopy</c> expects the following:</p> |
66 |
<ul> |
67 |
<li> |
68 |
Expects to be ran from the root of your overlay If you do |
69 |
not know about overlays then please see: |
70 |
<uri>http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds</uri> |
71 |
(unofficial documentation). |
72 |
</li> |
73 |
<li> |
74 |
Expects to have one and only one valid category and package |
75 |
as an argument. It should be in the form of "/" ie. |
76 |
<c>app-office/openoffice</c>. |
77 |
</li> |
78 |
<li> |
79 |
Expects <c>${EPREFIX}/usr/portage/scripts</c> to be in your |
80 |
path. |
81 |
</li> |
82 |
<li> |
83 |
Expects an up-to-date Prefix tree to reliably have the |
84 |
latest scripts. |
85 |
</li> |
86 |
</ul> |
87 |
<p> |
88 |
The use of <c>ecopy</c> is best explained by a simple example. |
89 |
</p> |
90 |
<pre caption="ecopy example">% <i>export PATH="${PATH}:${EPREFIX}/usr/portage/scripts"</i> |
91 |
% <i>cd "${EPREFIX}"/usr/local/portage/my-overlay</i> |
92 |
% <i>ecopy app-office/openoffice</i> |
93 |
openoffice-3.0.0_beta2.ebuild |
94 |
2008-09-03 08:36:39 URL:http://prefix.gentooexperimental.org/rsync-gentoo-x86/app-office/openoffice/ChangeLog [85281/85281] -> "ChangeLog" [1] |
95 |
2008-09-03 08:36:40 URL:http://prefix.gentooexperimental.org/rsync-gentoo-x86/app-office/openoffice/metadata.xml [635/635] -> "metadata.xml" [1] |
96 |
2008-09-03 08:36:40 URL:http://prefix.gentooexperimental.org/rsync-gentoo-x86/app-office/openoffice/Manifest [8510/8510] -> "Manifest" [1] |
97 |
2008-09-03 08:36:40 URL:http://prefix.gentooexperimental.org/rsync-gentoo-x86/app-office/openoffice/openoffice-3.0.0_beta2.ebuild [12662/12662] -> "openoffice-3.0.0_beta2.ebuild" [1] |
98 |
2008-09-03 08:36:41 URL:http://prefix.gentooexperimental.org/rsync-gentoo-x86/app-office/openoffice/files/gentoo-3.0.0_beta2.diff [1217/1217] -> "files/gentoo-3.0.0_beta2.diff" [1] |
99 |
2008-09-03 08:36:41 URL:http://prefix.gentooexperimental.org/rsync-gentoo-x86/app-office/openoffice/files/ooo-env_log.diff [617/617] -> "files/ooo-env_log.diff" [1] |
100 |
Processing openoffice-3.0.0_beta2.ebuild |
101 |
EAPI ... added EAPI="prefix" |
102 |
replacing ${D} -> ${ED} ... 2 occurences |
103 |
replacing ${ROOT} -> ${EROOT} ... not found |
104 |
Processing openoffice-3.0.0_beta2.ebuild ... ~amd64-linux ~x86-linux |
105 |
openoffice-3.0.0_beta2.ebuild |
106 |
>>> Creating Manifest for usr/local/portage/my-overlay/app-office/openoffice |
107 |
<snip for brevity></pre> |
108 |
<p> |
109 |
What is <c>ecopy</c> doing? In that above code snippet, |
110 |
<c>ecopy</c> first directly downloads the required files from |
111 |
<c>gentooexperimental.org</c> (ge.o). This is intended and an |
112 |
appreciated service from the ge.o admins. Then, <c>ecopy</c> |
113 |
runs <c>eapify</c> on the ebuild. <c>eapify</c> basically |
114 |
does the needed gentoo-x86 -> Prefix conversion. This can |
115 |
generally be automated and works right the first time about |
116 |
85% of the time. After <c>eapify</c>, some keyword cleanup is |
117 |
done by <c>ecleankw</c> to make it match the Prefix keywords. |
118 |
The Prefix keywords are more strictly defined than those of |
119 |
the gentoo-x86 tree. For more information on that see <uri |
120 |
link="http://www.gentoo.org/proj/en/glep/glep-0053.html">GLEP |
121 |
53</uri>. Last, <c>ecopy</c> re-digests the ebuild to |
122 |
accomandate any changes. Let it be known that you can do all |
123 |
this manually as well. |
124 |
</p> |
125 |
<p> |
126 |
While <c>eapfiy</c> (the tool that does the actual |
127 |
transformation of the ebuild) succeeds doing its job in many |
128 |
cases, it cannot be trusted to always do the right thing. |
129 |
Common mistakes made by <c>eapify</c> are related to either |
130 |
adding or omission of the <c>${EPREFIX}</c> for some component |
131 |
in the ebuild. <c>eapify</c> doesn't catch all instances of |
132 |
what needs to be changed. If there is e.g. any path hardcoded |
133 |
in the configure call you will need to prepend |
134 |
<c>${EPREFIX}</c> to it. Also, <c>${D}</c> can be improperly |
135 |
expanded to <c>${ED}</c> in certain cases. Manual review is |
136 |
always necessary. For more details on these issues see the |
137 |
<e>Ebuild modifications</e> chapter of the <uri |
138 |
link="http://www.gentoo.org/proj/en/gentoo-alt/prefix/techdocs.xml#doc_chap2">Gentoo |
139 |
Prefix Techdocs</uri> page. |
140 |
</p> |
141 |
</body> |
142 |
</section><!-- }}} --> |
143 |
|
144 |
</chapter> |
145 |
|
146 |
</guide> |
147 |
|
148 |
<!-- vim: set expandtab ts=2 sw=2 foldmethod=marker foldenable: --> |
149 |
<!-- kate: space-indent on; indent-width 2; replace-tabs on; --> |