summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-03-19 12:37:09 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-25 09:41:12 +0100
commite5702bce4a741d47c169509f7ee01cab89da372e (patch)
tree5e5c7960c46ecff1861b4cd9ed87cc0bc8fb5175 /documentation
parent8986a6f589412b1b0556364331bc8c2befaa44c9 (diff)
downloadpoky-e5702bce4a741d47c169509f7ee01cab89da372e.tar.gz
dev-manual: Completed rewrite of runtime package management
Fixes [YOCTO #12419] This section was unclear and needed some work. I added text to help clear things up. (From yocto-docs rev: 54358a39a5710dbd0cbcfe8dafd2f641ec3863ef) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml285
1 files changed, 197 insertions, 88 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 670b01a4e8..3b8e091963 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -34,11 +34,11 @@
34 <para> 34 <para>
35 It is very easy to create your own layers to use with the 35 It is very easy to create your own layers to use with the
36 OpenEmbedded build system. 36 OpenEmbedded build system.
37 The Yocto Project ships with scripts that speed up creating 37 The Yocto Project ships with tools that speed up creating
38 general layers and BSP layers. 38 layers.
39 This section describes the steps you perform by hand to create 39 This section describes the steps you perform by hand to create
40 a layer so that you can better understand them. 40 a layer so that you can better understand them.
41 For information about the layer-creation scripts, see the 41 For information about the layer-creation tools, see the
42 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</ulink>" 42 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
43 section in the Yocto Project Board Support Package (BSP) 43 section in the Yocto Project Board Support Package (BSP)
44 Developer's Guide and the 44 Developer's Guide and the
@@ -47,9 +47,11 @@
47 </para> 47 </para>
48 48
49 <para> 49 <para>
50 Follow these general steps to create your layer without the aid of a script: 50 Follow these general steps to create your layer without using
51 tools:
51 <orderedlist> 52 <orderedlist>
52 <listitem><para><emphasis>Check Existing Layers:</emphasis> 53 <listitem><para>
54 <emphasis>Check Existing Layers:</emphasis>
53 Before creating a new layer, you should be sure someone 55 Before creating a new layer, you should be sure someone
54 has not already created a layer containing the Metadata 56 has not already created a layer containing the Metadata
55 you need. 57 you need.
@@ -57,19 +59,31 @@
57 <ulink url='http://layers.openembedded.org/layerindex/layers/'><filename>OpenEmbedded Metadata Index</filename></ulink> 59 <ulink url='http://layers.openembedded.org/layerindex/layers/'><filename>OpenEmbedded Metadata Index</filename></ulink>
58 for a list of layers from the OpenEmbedded community 60 for a list of layers from the OpenEmbedded community
59 that can be used in the Yocto Project. 61 that can be used in the Yocto Project.
62 You could find a layer that is identical or close to
63 what you need.
60 </para></listitem> 64 </para></listitem>
61 <listitem><para><emphasis>Create a Directory:</emphasis> 65 <listitem><para>
66 <emphasis>Create a Directory:</emphasis>
62 Create the directory for your layer. 67 Create the directory for your layer.
63 While not strictly required, prepend the name of the 68 While not strictly required, prepend the name of the
64 folder with the string <filename>meta-</filename>. 69 directory with the string "meta-".
65 For example: 70 For example:
66 <literallayout class='monospaced'> 71 <literallayout class='monospaced'>
67 meta-mylayer 72 meta-mylayer
68 meta-GUI_xyz 73 meta-GUI_xyz
69 meta-mymachine 74 meta-mymachine
70 </literallayout> 75 </literallayout>
76 Realize that the name of your layer does not include
77 the "meta-" string.
78 For example, the names of the previous three layers
79 are "mylayer", "GUI_xyz", and "mymachine".
80 Following this layer directory naming convention can
81 save you trouble later when tools or components
82 "assume" your layer resides in a directory whose name
83 starts with "meta-".
71 </para></listitem> 84 </para></listitem>
72 <listitem><para><emphasis>Create a Layer Configuration 85 <listitem><para>
86 <emphasis>Create a Layer Configuration
73 File:</emphasis> 87 File:</emphasis>
74 Inside your new layer folder, you need to create a 88 Inside your new layer folder, you need to create a
75 <filename>conf/layer.conf</filename> file. 89 <filename>conf/layer.conf</filename> file.
@@ -77,9 +91,14 @@
77 file and copy that to your layer's 91 file and copy that to your layer's
78 <filename>conf</filename> directory and then modify the 92 <filename>conf</filename> directory and then modify the
79 file as needed.</para> 93 file as needed.</para>
94
80 <para>The 95 <para>The
81 <filename>meta-yocto-bsp/conf/layer.conf</filename> file 96 <filename>meta-yocto-bsp/conf/layer.conf</filename> file
82 demonstrates the required syntax: 97 in the Yocto Project
98 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
99 demonstrates the required syntax.
100 For your layer, you need to replace "yoctobsp" with the
101 root name of your layer:
83 <literallayout class='monospaced'> 102 <literallayout class='monospaced'>
84 # We have a conf and classes directory, add to BBPATH 103 # We have a conf and classes directory, add to BBPATH
85 BBPATH .= ":${LAYERDIR}" 104 BBPATH .= ":${LAYERDIR}"
@@ -91,35 +110,41 @@
91 BBFILE_COLLECTIONS += "yoctobsp" 110 BBFILE_COLLECTIONS += "yoctobsp"
92 BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/" 111 BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/"
93 BBFILE_PRIORITY_yoctobsp = "5" 112 BBFILE_PRIORITY_yoctobsp = "5"
94 LAYERVERSION_yoctobsp = "3" 113 LAYERVERSION_yoctobsp = "4"
114 LAYERSERIES_COMPAT_yoctobsp = "&DISTRO_NAME_NO_CAP;"
95 </literallayout></para> 115 </literallayout></para>
116
96 <para>Here is an explanation of the example: 117 <para>Here is an explanation of the example:
97 <itemizedlist> 118 <itemizedlist>
98 <listitem><para>The configuration and 119 <listitem><para>
99 classes directory is appended to 120 The configuration and classes directory is
121 appended to
100 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>. 122 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>.
101 <note> 123 <note>
102 All non-distro layers, which include all BSP 124 All non-distro layers, which include all BSP
103 layers, are expected to append the layer 125 layers, are expected to append the layer
104 directory to the 126 directory to <filename>BBPATH</filename>.
105 <filename>BBPATH</filename>.
106 On the other hand, distro layers, such as 127 On the other hand, distro layers, such as
107 <filename>meta-poky</filename>, can choose 128 <filename>meta-poky</filename>, can choose
108 to enforce their own precedence over 129 to enforce their own precedence over
109 <filename>BBPATH</filename>. 130 <filename>BBPATH</filename>.
110 For an example of that syntax, see the 131 For an example of that syntax, see the
111 <filename>layer.conf</filename> file for 132 <filename>meta-poky/conf/layer.conf</filename>
112 the <filename>meta-poky</filename> layer. 133 file for in the Source Repositories.
113 </note></para></listitem> 134 </note>
114 <listitem><para>The recipes for the layers are 135 </para></listitem>
115 appended to 136 <listitem><para>
137 The recipes for the layers are appended to
116 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'>BBFILES</ulink></filename>. 138 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'>BBFILES</ulink></filename>.
117 </para></listitem> 139 </para></listitem>
118 <listitem><para>The 140 <listitem><para>
141 The
119 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</ulink></filename> 142 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</ulink></filename>
120 variable is then appended with the layer name. 143 variable is then appended with the layer name,
144 which is "yoctobsp" in this example.
121 </para></listitem> 145 </para></listitem>
122 <listitem><para>The 146 <listitem><para>
147 The
123 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PATTERN'>BBFILE_PATTERN</ulink></filename> 148 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PATTERN'>BBFILE_PATTERN</ulink></filename>
124 variable is set to a regular expression and is 149 variable is set to a regular expression and is
125 used to match files from 150 used to match files from
@@ -127,24 +152,34 @@
127 layer. 152 layer.
128 In this case, 153 In this case,
129 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename> 154 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename>
130 is used to make <filename>BBFILE_PATTERN</filename> match within the 155 is used to make
131 layer's path.</para></listitem> 156 <filename>BBFILE_PATTERN</filename> match
132 <listitem><para>The 157 within the layer's path.
158 </para></listitem>
159 <listitem><para>
160 The
133 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename> 161 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename>
134 variable then assigns a priority to the layer. 162 variable then assigns a priority to the layer.
135 Applying priorities is useful in situations 163 Applying priorities is useful in situations
136 where the same recipe might appear in multiple 164 where the same recipe might appear in multiple
137 layers and allows you to choose the layer 165 layers.
138 that takes precedence.</para></listitem> 166 A priority allows you to choose the layer
139 <listitem><para>The 167 that takes precedence.
168 </para></listitem>
169 <listitem><para>
170 The
140 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERVERSION'>LAYERVERSION</ulink></filename> 171 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERVERSION'>LAYERVERSION</ulink></filename>
141 variable optionally specifies the version of a 172 variable optionally specifies the version of a
142 layer as a single number.</para></listitem> 173 layer as a single number.
174 </para></listitem>
175 <listitem><para>
176 The
177 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename>
178 variable expands to the directory of the
179 current layer
180 </list></listitem>
143 </itemizedlist></para> 181 </itemizedlist></para>
144 <para>Note the use of the 182
145 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename>
146 variable, which expands to the directory of the current
147 layer.</para>
148 <para>Through the use of the <filename>BBPATH</filename> 183 <para>Through the use of the <filename>BBPATH</filename>
149 variable, BitBake locates class files 184 variable, BitBake locates class files
150 (<filename>.bbclass</filename>), 185 (<filename>.bbclass</filename>),
@@ -156,10 +191,11 @@
156 This is similar to the way the <filename>PATH</filename> 191 This is similar to the way the <filename>PATH</filename>
157 variable is used for binaries. 192 variable is used for binaries.
158 It is recommended, therefore, that you use unique 193 It is recommended, therefore, that you use unique
159 class and configuration 194 class and configuration filenames in your custom layer.
160 filenames in your custom layer.</para></listitem> 195 </para></listitem>
161 <listitem><para><emphasis>Add Content:</emphasis> Depending 196 <listitem><para>
162 on the type of layer, add the content. 197 <emphasis>Add Content:</emphasis>
198 Depending on the type of layer, add the content.
163 If the layer adds support for a machine, add the machine 199 If the layer adds support for a machine, add the machine
164 configuration in a <filename>conf/machine/</filename> 200 configuration in a <filename>conf/machine/</filename>
165 file within the layer. 201 file within the layer.
@@ -169,7 +205,8 @@
169 If the layer introduces new recipes, put the recipes 205 If the layer introduces new recipes, put the recipes
170 you need in <filename>recipes-*</filename> 206 you need in <filename>recipes-*</filename>
171 subdirectories within the layer. 207 subdirectories within the layer.
172 <note>In order to be compliant with the Yocto Project, 208 <note>
209 In order to be compliant with the Yocto Project,
173 a layer must contain a 210 a layer must contain a
174 <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-readme'>README file.</ulink> 211 <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-readme'>README file.</ulink>
175 </note> 212 </note>
@@ -8835,11 +8872,13 @@ Some notes from Cal:
8835 During a build, BitBake always transforms a recipe into one or 8872 During a build, BitBake always transforms a recipe into one or
8836 more packages. 8873 more packages.
8837 For example, BitBake takes the <filename>bash</filename> recipe 8874 For example, BitBake takes the <filename>bash</filename> recipe
8838 and currently produces the <filename>bash-dbg</filename>, 8875 and produces a number of packages (e.g.
8839 <filename>bash-staticdev</filename>, 8876 <filename>bash</filename>, <filename>bash-bashbug</filename>,
8840 <filename>bash-dev</filename>, <filename>bash-doc</filename>, 8877 <filename>bash-completion</filename>,
8841 <filename>bash-locale</filename>, and 8878 <filename>bash-completion-dbg</filename>,
8842 <filename>bash</filename> packages. 8879 <filename>bash-completion-dev</filename>,
8880 <filename>bash-completion-extra</filename>,
8881 <filename>bash-dbg</filename>, and so forth).
8843 Not all generated packages are included in an image. 8882 Not all generated packages are included in an image.
8844 </para> 8883 </para>
8845 8884
@@ -8883,7 +8922,7 @@ Some notes from Cal:
8883 8922
8884 <para> 8923 <para>
8885 In order to use runtime package management, you 8924 In order to use runtime package management, you
8886 need a host/server machine that serves up the pre-compiled 8925 need a host or server machine that serves up the pre-compiled
8887 packages plus the required metadata. 8926 packages plus the required metadata.
8888 You also need package manipulation tools on the target. 8927 You also need package manipulation tools on the target.
8889 The build machine is a likely candidate to act as the server. 8928 The build machine is a likely candidate to act as the server.
@@ -8891,6 +8930,10 @@ Some notes from Cal:
8891 package server. 8930 package server.
8892 The build machine could push its artifacts to another machine 8931 The build machine could push its artifacts to another machine
8893 that acts as the server (e.g. Internet-facing). 8932 that acts as the server (e.g. Internet-facing).
8933 In fact, doing so is advantageous for a production
8934 environment as getting the packages away from the
8935 development system's build directory prevents accidental
8936 overwrites.
8894 </para> 8937 </para>
8895 8938
8896 <para> 8939 <para>
@@ -8900,11 +8943,11 @@ Some notes from Cal:
8900 out into a couple of different package groupings based on 8943 out into a couple of different package groupings based on
8901 criteria such as the target's CPU architecture, the target 8944 criteria such as the target's CPU architecture, the target
8902 board, or the C library used on the target. 8945 board, or the C library used on the target.
8903 For example, a build targeting the <filename>qemuarm</filename> 8946 For example, a build targeting the <filename>qemux86</filename>
8904 device produces the following three package databases: 8947 device produces the following three package databases:
8905 <filename>all</filename>, <filename>armv5te</filename>, and 8948 <filename>noarch</filename>, <filename>i586</filename>, and
8906 <filename>qemuarm</filename>. 8949 <filename>qemux86</filename>.
8907 If you wanted your <filename>qemuarm</filename> device to be 8950 If you wanted your <filename>qemux86</filename> device to be
8908 aware of all the packages that were available to it, 8951 aware of all the packages that were available to it,
8909 you would need to point it to each of these databases 8952 you would need to point it to each of these databases
8910 individually. 8953 individually.
@@ -8950,10 +8993,10 @@ Some notes from Cal:
8950 PACKAGE_CLASSES ?= “package_<replaceable>packageformat</replaceable>” 8993 PACKAGE_CLASSES ?= “package_<replaceable>packageformat</replaceable>”
8951 </literallayout> 8994 </literallayout>
8952 where <replaceable>packageformat</replaceable> 8995 where <replaceable>packageformat</replaceable>
8953 can be "ipk", "rpm", and "deb", which are the 8996 can be "ipk", "rpm", "deb", or "tar" which are the
8954 supported package formats. 8997 supported package formats.
8955 <note> 8998 <note>
8956 Because the Yocto Project supports three 8999 Because the Yocto Project supports four
8957 different package formats, you can set the 9000 different package formats, you can set the
8958 variable with more than one argument. 9001 variable with more than one argument.
8959 However, the OpenEmbedded build system only 9002 However, the OpenEmbedded build system only
@@ -8972,12 +9015,12 @@ Some notes from Cal:
8972 "package-management" in the 9015 "package-management" in the
8973 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink> 9016 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
8974 variable. 9017 variable.
8975 Including "package-management" in this 9018 Including "package-management" in this configuration
8976 configuration variable ensures that when the image 9019 variable ensures that when the image is assembled for your
8977 is assembled for your target, the image includes 9020 target, the image includes the currently-known package
8978 the currently-known package databases as well as 9021 databases as well as the target-specific tools required
8979 the target-specific tools required for runtime 9022 for runtime package management to be performed on the
8980 package management to be performed on the target. 9023 target.
8981 However, this is not strictly necessary. 9024 However, this is not strictly necessary.
8982 You could start your image off without any databases 9025 You could start your image off without any databases
8983 but only include the required on-target package 9026 but only include the required on-target package
@@ -8991,21 +9034,26 @@ Some notes from Cal:
8991 9034
8992 <para> 9035 <para>
8993 Whenever you perform any sort of build step that can 9036 Whenever you perform any sort of build step that can
8994 potentially generate a package or modify an existing 9037 potentially generate a package or modify existing
8995 package, it is always a good idea to re-generate the 9038 package, it is always a good idea to re-generate the
8996 package index with: 9039 package index after the build by using the following
9040 command:
8997 <literallayout class='monospaced'> 9041 <literallayout class='monospaced'>
8998 $ bitbake package-index 9042 $ bitbake package-index
8999 </literallayout> 9043 </literallayout>
9000 Realize that it is not sufficient to simply do the 9044 It might be tempting to build the package and the
9001 following: 9045 package index at the same time with a command such as
9046 the following:
9002 <literallayout class='monospaced'> 9047 <literallayout class='monospaced'>
9003 $ bitbake <replaceable>some-package</replaceable> package-index 9048 $ bitbake <replaceable>some-package</replaceable> package-index
9004 </literallayout> 9049 </literallayout>
9005 The reason for this restriction is because BitBake does not 9050 Do not do this as BitBake does not schedule the package
9006 properly schedule the <filename>package-index</filename> 9051 index for after the completion of the package you are
9007 target fully after any other target has completed. 9052 building.
9008 Thus, be sure to run the package update step separately. 9053 Consequently, you cannot be sure of the package index
9054 including information for the package you just built.
9055 Thus, be sure to run the package update step separately
9056 after building any packages.
9009 </para> 9057 </para>
9010 9058
9011 <para> 9059 <para>
@@ -9030,8 +9078,8 @@ Some notes from Cal:
9030 For example, if 9078 For example, if
9031 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink><filename>}</filename> 9079 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink><filename>}</filename>
9032 is <filename>tmp</filename> and your selected package type 9080 is <filename>tmp</filename> and your selected package type
9033 is IPK, then your IPK packages are available in 9081 is RPM, then your RPM packages are available in
9034 <filename>tmp/deploy/ipk</filename>. 9082 <filename>tmp/deploy/rpm</filename>.
9035 </para> 9083 </para>
9036 </section> 9084 </section>
9037 9085
@@ -9086,17 +9134,39 @@ Some notes from Cal:
9086 <title>Using RPM</title> 9134 <title>Using RPM</title>
9087 9135
9088 <para> 9136 <para>
9089 The <filename>dnf</filename> application performs 9137 The
9090 runtime package management of RPM packages. 9138 <ulink url='https://en.wikipedia.org/wiki/DNF_(software)'>Dandified Packaging Tool</ulink>
9091 You must perform an initial setup for 9139 (DNF) performs runtime package management of RPM
9092 <filename>dnf</filename> on the target machine 9140 packages.
9093 if the 9141 In order to use DNF for runtime package management,
9094 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></ulink>, 9142 you must perform an initial setup on the target
9095 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></ulink>, 9143 machine for cases where the
9096 and 9144 <filename>PACKAGE_FEED_*</filename> variables were not
9097 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></ulink> 9145 set as part of the image that is running on the
9098 variables have not been set or the target image was 9146 target.
9099 built before the variables were set. 9147 This means if you built your image and did not not use
9148 these variables as part of the build and your image is
9149 now running on the target, you need to perform the
9150 steps in this section if you want to use runtime
9151 package management.
9152 <note>
9153 For information on the
9154 <filename>PACKAGE_FEED_*</filename> variables, see
9155 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></ulink>,
9156 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></ulink>,
9157 and
9158 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></ulink>
9159 in the Yocto Project Reference Manual variables
9160 glossary.
9161 </note>
9162 </para>
9163
9164 <para>
9165 On the target, you must inform DNF that package
9166 databases are available.
9167 You do this by creating a file named
9168 <filename>/etc/yum.repos.d/oe-packages.repo</filename>
9169 and defining the <filename>oe-packages</filename>.
9100 </para> 9170 </para>
9101 9171
9102 <para> 9172 <para>
@@ -9105,21 +9175,60 @@ Some notes from Cal:
9105 <filename>all</filename>, <filename>i586</filename>, 9175 <filename>all</filename>, <filename>i586</filename>,
9106 and <filename>qemux86</filename> from a server named 9176 and <filename>qemux86</filename> from a server named
9107 <filename>my.server</filename>. 9177 <filename>my.server</filename>.
9108 You must inform <filename>dnf</filename> of the 9178 The specifics for setting up the web server are up to
9109 availability of these databases by creating a 9179 you.
9110 <filename>/etc/yum.repos.d/oe-packages.repo</filename> 9180 The critical requirement is that the URIs in the
9111 file with the following content: 9181 target repository configuration point to the
9112 <literallayout class='monospaced'> 9182 correct remote location for the feeds.
9183 This example uses a location outside of the build
9184 system's <filename>deploy</filename> directory.
9185 Realize that it is possible to run a web server
9186 that gets the databases from
9187 <filename>deploy</filename> directory where the image
9188 was built.
9189 </para>
9190
9191 <para>
9192 When telling DNF where to look for the package
9193 databases, you must declare individual locations
9194 per architecture or a single location used for all
9195 architectures.
9196 You cannot do both:
9197 <itemizedlist>
9198 <listitem><para>
9199 <emphasis>Create an Explicit List of Architectures:</emphasis>
9200 Define individual base URLs to identify where
9201 each package database is located:
9202 <literallayout class='monospaced'>
9113 [oe-packages] 9203 [oe-packages]
9114 baseurl=http://my.server http://my.server/rpm/qemux86 http://my.server/rpm/all 9204 baseurl=http://my.server/rpm/i586 http://my.server/rpm/qemux86 http://my.server/rpm/all
9115 </literallayout> 9205 </literallayout>
9116 From the target machine, fetch the repository: 9206 This example informs DNF about individual
9207 package databases for all three architectures.
9208 </para></listitem>
9209 <listitem><para>
9210 <emphasis>Create a Single (Full) Package Index:</emphasis>
9211 Define a single base URL that identifies where
9212 a full package database is located:
9213 <literallayout class='monospaced'>
9214 [oe-packages]
9215 baseurl=http://my.server/rpm
9216 </literallayout>
9217 This example informs DNF about a single package
9218 database that contains all the package index
9219 information for all supported architectures.
9220 </para></listitem>
9221 </itemizedlist>
9222 </para>
9223
9224 <para>
9225 Once you have informed DNF where to find the package
9226 databases, you need to fetch them:
9117 <literallayout class='monospaced'> 9227 <literallayout class='monospaced'>
9118 # dnf makecache 9228 # dnf makecache
9119 </literallayout> 9229 </literallayout>
9120 After everything is set up, <filename>dnf</filename> 9230 DNF is now able to find, install, and upgrade packages
9121 is able to find, install, and upgrade packages from 9231 from the specified repository or repositories.
9122 the specified repository.
9123 <note> 9232 <note>
9124 See the 9233 See the
9125 <ulink url='http://dnf.readthedocs.io/en/latest/'>DNF documentation</ulink> 9234 <ulink url='http://dnf.readthedocs.io/en/latest/'>DNF documentation</ulink>