summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-04-02 13:16:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-04 14:13:45 +0100
commit0e0ee9618656797cbeb3322a1ab2b96e196f5d9e (patch)
tree69cc9004e0a8800a9b6dc12aa42f286d2e70fcc2 /documentation
parent4ce46de598ffbafad6dae91e814ab6168e9654a9 (diff)
downloadpoky-0e0ee9618656797cbeb3322a1ab2b96e196f5d9e.tar.gz
dev-manual, ref-manual: Changes to support runtime management
Created the first draft of the new "Setting Up Runtime Package Management" section in the dev-manual's common tasks chapter. Updated the "Packaging - package*.bbclass" section in the ref-manual to mention this capability and point off to the dev-manual's new section. (From yocto-docs rev: d91c8530dba20839f36c5e247cc447adbedac7fd) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml136
-rw-r--r--documentation/ref-manual/ref-classes.xml3
2 files changed, 138 insertions, 1 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 66444e18fb..9096ea61a4 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -2593,6 +2593,8 @@
2593 </para></listitem> 2593 </para></listitem>
2594 <listitem><para>Handling optional module packaging 2594 <listitem><para>Handling optional module packaging
2595 </para></listitem> 2595 </para></listitem>
2596 <listitem><para>Setting up Runtime Package Management
2597 </para></listitem>
2596 </itemizedlist> 2598 </itemizedlist>
2597 </para> 2599 </para>
2598 2600
@@ -3072,6 +3074,140 @@
3072 </para> 3074 </para>
3073 </section> 3075 </section>
3074 </section> 3076 </section>
3077
3078 <section id='setting-up-runtime-package-management'>
3079 <title>Setting Up Runtime Package Management</title>
3080
3081 <para>
3082 It is possible to set up a repository that is a host-based
3083 package feed from which you can install packages on the
3084 target system during runtime.
3085 Doing so is optional and depends on the following:
3086 <itemizedlist>
3087 <listitem><para>
3088 You take specific steps to set up the feed.
3089 </para></listitem>
3090 <listitem><para>
3091 When you build your image, you select to use the
3092 RPM package manager by setting the
3093 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
3094 variable.
3095 </para></listitem>
3096 <listitem><para>
3097 You have Apache 2 installed and configured on the
3098 development host.
3099 </para></listitem>
3100 <listitem><para>
3101 You have <filename>createrepo</filename> installed on
3102 the development host.
3103 </para></listitem>
3104 </itemizedlist>
3105 </para>
3106
3107 <para>
3108 Here are the steps to set up this optional package feed:
3109 <orderedlist>
3110 <listitem><para>
3111 Add the directory to your Apache configuration, which
3112 you can find at
3113 <filename>/etc/httpd/conf/httpd.conf</filename>.
3114 Use commands similar to these on the development system.
3115 These example commands assume a top-level
3116 <link linkend='source-directory'>Source Directory</link>
3117 named <filename>poky</filename> in your home directory:
3118 <literallayout class='monospaced'>
3119 &lt;VirtualHost *:80&gt;
3120 ....
3121 Alias /rpm ~/poky/build/tmp/deploy/rpm
3122 &lt;Directory "~/poky/build/tmp/deploy/rpm"&gt;
3123 Options +Indexes
3124 &lt;/Directory&gt;
3125 &lt;/VirtualHost&gt;
3126 </literallayout>
3127 </para></listitem>
3128 <listitem><para>
3129 Reload the Apache configuration as follows.
3130 For all commands, be sure you have root privileges.
3131 </para>
3132 <para>
3133 If your development system is using Fedora or
3134 CentOS, use the following:
3135 </para>
3136 <note>
3137 <emphasis>Note to Self:</emphasis> Paul says that
3138 some of the distros (Fedora and CentOS in
3139 particular) might have different commands based
3140 on the distro version.
3141 We need links for the reader to follow for the
3142 specifics.
3143 We don't want to have to document all this
3144 distro-specific stuff.
3145 </note>
3146 <para>
3147 <literallayout class='monospaced'>
3148 service httpd reload
3149 </literallayout>
3150 For Ubuntu, use the following:
3151 <literallayout class='monospaced'>
3152 /etc/init.d/apache2 reload
3153 </literallayout>
3154 For OpenSUSE, use the following:
3155 <literallayout class='monospaced'>
3156 /etc/init.d/apache2 reload
3157 </literallayout>
3158 </para></listitem>
3159 <listitem><para>
3160 Change your working directory to
3161 <filename>tmp/deploy/rpm</filename> in the
3162 <link linkend='build-directory'>Build Directory</link>.
3163 </para></listitem>
3164 <listitem><para>
3165 Create the repository data on the host using
3166 this command:
3167 <literallayout class='monospaced'>
3168 createrepo .
3169 </literallayout>
3170 </para>
3171 <para>
3172 <note>
3173 If you're updating, add
3174 <filename>&dash;&dash;update</filename> to save some time.
3175 </note>
3176 </para></listitem>
3177 <listitem><para>
3178 If you are using Security-Enhanced Linux (SELinux),
3179 you need to label the files as being accessible
3180 through Apache.
3181 Use the following command from the development host:
3182 <literallayout class='monospaced'>
3183 chcon -R -h -t httpd_sys_content_t .
3184 </literallayout>
3185 </para></listitem>
3186 <listitem><para>
3187 On the target machine, add the repository to Smart.
3188 For <filename>somealias</filename>, provide a local
3189 alias for the repository:
3190 <literallayout class='monospaced'>
3191 smart channel &dash;&dash;add &lt;somealias&gt; type=rpm-md baseurl=http://server.name/rpm
3192 </literallayout>
3193 </para></listitem>
3194 <listitem><para>
3195 Also from the target machine, fetch the repository
3196 information using this command:
3197 <literallayout class='monospaced'>
3198 smart update
3199 </literallayout>
3200 </para></listitem>
3201 </orderedlist>
3202 </para>
3203
3204 <para>
3205 After taking these steps and making sure that the other
3206 requirements mentioned at the beginning of the section are met,
3207 reboot the target device to take advantage of runtime package
3208 installations.
3209 </para>
3210 </section>
3075 </section> 3211 </section>
3076 3212
3077 <section id="building-software-from-an-external-source"> 3213 <section id="building-software-from-an-external-source">
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
index 36f72b85b0..e2f1611b5b 100644
--- a/documentation/ref-manual/ref-classes.xml
+++ b/documentation/ref-manual/ref-classes.xml
@@ -365,7 +365,8 @@
365 install packages from the feed while you are running the image 365 install packages from the feed while you are running the image
366 on the target (i.e. runtime installation of packages). 366 on the target (i.e. runtime installation of packages).
367 For information on how to set up this repository, see the 367 For information on how to set up this repository, see the
368 "NEED LINK" section in the Yocto Project Development Manual. 368 "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-runtime-package-management'>Setting Up Runtime Package Management</ulink>"
369 in the Yocto Project Development Manual.
369 </para></listitem> 370 </para></listitem>
370 </itemizedlist> 371 </itemizedlist>
371 </para> 372 </para>