diff options
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r-- | documentation/dev-manual/dev-manual-common-tasks.xml | 136 |
1 files changed, 136 insertions, 0 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 | <VirtualHost *:80> | ||
3120 | .... | ||
3121 | Alias /rpm ~/poky/build/tmp/deploy/rpm | ||
3122 | <Directory "~/poky/build/tmp/deploy/rpm"> | ||
3123 | Options +Indexes | ||
3124 | </Directory> | ||
3125 | </VirtualHost> | ||
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>‐‐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 ‐‐add <somealias> 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"> |