]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
dev-manual: Edits to the "Setting Up Runtime Package Management" section.
authorScott Rifenbark <scott.m.rifenbark@intel.com>
Thu, 26 Sep 2013 21:16:36 +0000 (14:16 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Oct 2013 21:52:54 +0000 (22:52 +0100)
Paul Eggleton sent me corrected procedure.  I implemented his
changes.

(From yocto-docs rev: 581778c52493b662f449bbbed36453f161501c18)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
documentation/dev-manual/dev-manual-common-tasks.xml

index 7ab10df4830a7b220bd7cc6ffbfbd8e56408e77b..bc78a08adc0a8407bf8a8aaafac10e497f23015f 100644 (file)
                         You have a web server, such as Apache 2,
                         installed and configured on the development host.
                         </para></listitem>
-                    <listitem><para>
-                        You have <filename>createrepo</filename> installed on
-                        the development host.
-                        </para></listitem>
                     <listitem><para>
                         You enable package management on the target by
                         listing "package-management" in the
                 </itemizedlist>
             </para>
 
-            <para>
-                Following are the steps to set up the optional repository.
-                This example assumes you are using RPM and the Apache 2
-                server:
-                <orderedlist>
-                    <listitem><para>
-                        Add the directory to your Apache configuration, which
-                        you can find at
-                        <filename>/etc/httpd/conf/httpd.conf</filename>.
-                        Use commands similar to these on the development system.
-                        These example commands assume a top-level
-                        <link linkend='source-directory'>Source Directory</link>
-                        named <filename>poky</filename> in your home directory:
-                        <literallayout class='monospaced'>
+            <section id='runtime-package-management-deb-rpm'>
+                <title>Using DEB and RPM</title>
+
+                <para>
+                    Following are the steps to set up the optional repository.
+                    This example assumes you are using RPM and the Apache 2
+                    server:
+                    <orderedlist>
+                        <listitem><para>
+                            Add the directory to your Apache configuration, which
+                            you can find at
+                            <filename>/etc/httpd/conf/httpd.conf</filename>.
+                            Use commands similar to these on the development system.
+                            These example commands assume a top-level
+                            <link linkend='source-directory'>Source Directory</link>
+                            named <filename>poky</filename> in your home directory:
+                            <literallayout class='monospaced'>
      &lt;VirtualHost *:80&gt;
        ....
          Alias /rpm ~/poky/build/tmp/deploy/rpm
            Options +Indexes
          &lt;/Directory&gt;
      &lt;/VirtualHost&gt;
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Reload the Apache configuration as follows.
-                        For all commands, be sure you have root privileges.
-                        </para>
-                        <para>
-                        If your development system is using Fedora or
-                        CentOS, use the following:
-                        <literallayout class='monospaced'>
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>
+                            Reload the Apache configuration as follows.
+                            For all commands, be sure you have root privileges.
+                            </para>
+                            <para>
+                            If your development system is using Fedora or
+                            CentOS, use the following:
+                            <literallayout class='monospaced'>
      service httpd reload
-                        </literallayout>
-                        For Ubuntu and Debian, use the following:
-                        <literallayout class='monospaced'>
+                            </literallayout>
+                            For Ubuntu and Debian, use the following:
+                            <literallayout class='monospaced'>
      /etc/init.d/apache2 reload
-                        </literallayout>
-                        For OpenSUSE, use the following:
-                        <literallayout class='monospaced'>
+                            </literallayout>
+                            For OpenSUSE, use the following:
+                            <literallayout class='monospaced'>
      /etc/init.d/apache2 reload
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Change your working directory to
-                        <filename>tmp/deploy/rpm</filename> in the
-                        <link linkend='build-directory'>Build Directory</link>.
-                        </para></listitem>
-                    <listitem><para>
-                        Create the repository data on the host using
-                        this command:
-                        <literallayout class='monospaced'>
-     createrepo .
-                        </literallayout>
-                        </para>
-                        <para>
-                            <note>
-                                If you're updating, add
-                                <filename>&dash;&dash;update</filename> to save some time.
-                            </note>
-                        </para></listitem>
-                    <listitem><para>
-                        If you are using Security-Enhanced Linux (SELinux),
-                        you need to label the files as being accessible
-                        through Apache.
-                        Use the following command from the development host:
-                        <literallayout class='monospaced'>
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>
+                            Run BitBake on <filename>package-index</filename>
+                            on the host
+                            <literallayout class='monospaced'>
+     bitbake package-index
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>
+                            Change your working directory to
+                            <filename>tmp/deploy/rpm</filename> in the
+                            <link linkend='build-directory'>Build Directory</link>.
+                            </para></listitem>
+                        <listitem><para>
+                            If you are using Security-Enhanced Linux (SELinux),
+                            you need to label the files as being accessible
+                            through Apache.
+                            Use the following command from the development host:
+                            <literallayout class='monospaced'>
      chcon -R -h -t httpd_sys_content_t .
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        On the target machine, add the repository to Smart.
-                        For <filename>somealias</filename>, provide a local
-                        alias for the repository:
-                        <literallayout class='monospaced'>
-     smart channel &dash;&dash;add &lt;somealias&gt; type=rpm-md baseurl=http://server.name/rpm
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Also from the target machine, fetch the repository
-                        information using this command:
-                        <literallayout class='monospaced'>
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>
+                            On the target machine, add the repository to Smart 
+                            for every package architecture.
+                            To see the list of package architectures, just list 
+                            the contents of the directory.</para>
+                            <para>
+                            As an example, suppose you list the contents of the 
+                            directory and discover three architectures:
+                            <filename>all</filename>, <filename>i586</filename>, 
+                            and <filename>qemux86</filename>.
+                            Given this example, use the following commands:
+                            <literallayout class='monospaced'>
+     smart channel &dash;&dash;add all type=rpm-md baseurl=http:server.name/rpm/all
+     smart channel &dash;&dash;add i585 type=rpm-md baseurl=http://server.name/rpm/i586
+     smart channel &dash;&dash;add qemux86 type=rpm-md baseurl=http://server.name/rpm/qemux86
+                            </literallayout>
+                            </para></listitem>
+                        <listitem><para>
+                            Also from the target machine, fetch the repository
+                            information using this command:
+                            <literallayout class='monospaced'>
      smart update
-                        </literallayout>
-                        </para></listitem>
-                </orderedlist>
-            </para>
+                            </literallayout>
+                            </para></listitem>
+                    </orderedlist>
+                </para>
+            </section>
 
-            <para>
-                After taking these steps and making sure that the other
-                requirements mentioned at the beginning of the section are met,
-                reboot the target device to take advantage of runtime package
-                installations.
-            </para>
+            <section id='runtime-package-management-ipk'>
+                <title>Using IPK</title>
 
-            <para>
-                If your packages are IPK, you can install packages onto an
-                existing running system by first sharing the
-                <filename>tmp/deploy/ipk/</filename> directory
-                through a web server and then by changing
-                <filename>/etc/opkg/base-feeds.conf</filename>
-                to point at the shared server.
-                Following is an example:
-                <literallayout class='monospaced'>
+                <para>
+                    If your packages are IPK, you can install packages onto an
+                    existing running system by first sharing the
+                    <filename>tmp/deploy/ipk/</filename> directory
+                    through a web server and then by changing
+                    <filename>/etc/opkg/base-feeds.conf</filename>
+                    to point at the shared server.
+                    Following is an example:
+                    <literallayout class='monospaced'>
      $ src/gz all http://www.mysite.com/somedir/deploy/ipk/all
      $ src/gz armv7a http://www.mysite.com/somedir/deploy/ipk/armv7a
      $ src/gz beagleboard http://www.mysite.com/somedir/deploy/ipk/beagleboard
-                </literallayout>
-            </para>
+                    </literallayout>
+                </para>
+            </section>
         </section>
 
         <section id='testing-packages-with-ptest'>