{"id":41,"date":"2015-01-06T10:24:35","date_gmt":"2015-01-06T10:24:35","guid":{"rendered":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=41"},"modified":"2015-01-06T11:03:26","modified_gmt":"2015-01-06T11:03:26","slug":"build-an-rpm-package-redhat","status":"publish","type":"page","link":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=41","title":{"rendered":"Build an RPM package"},"content":{"rendered":"<p>Create a file <tt>~\/.rpmmacros<\/tt> (<a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/wp-content\/uploads\/2015\/01\/rpmmacros.zip\">download<\/a>) in your home directory containing:<\/p>\n<pre class=\"wiki\">%_topdir %(echo $HOME)\/rpmbuild\r\n%debug_package %{nil}\r\n<\/pre>\n<p>Create the following directories:<\/p>\n<pre class=\"wiki\">mkdir -p ~\/rpmbuild\/{BUILD,RPMS,SOURCES,SPECS,SRPMS}\r\n<\/pre>\n<p>Architecture-specific directories will be created automatically.\u00a0 They can also be created manually with the command:<\/p>\n<pre class=\"wiki\">mkdir -p ~\/rpmbuild\/RPMS\/{athlon,i386,i486,i586,i686,noarch}\r\n<\/pre>\n<p>Alternatively, you can replace the last two steps by invoking the <code>rpmdev-setuptree<\/code>; you need to install <a class=\"ext-link\" href=\"https:\/\/fedorahosted.org\/rpmdevtools\/\"><span class=\"icon\">\u200b<\/span>rpmdevtools<\/a> first.<\/p>\n<p>To build a RPM package from the latest SVN revision, you need to build a source package (<code>$OSVN<\/code> holds the URL of the <code>svn<\/code> repository, see <a title=\"Download Orchids sources\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=21\">download<\/a>), as follows:<\/p>\n<pre class=\"wiki\">svn co $OSVN \/tmp\/orchids\r\ncd \/tmp\/orchids\r\nautoreconf -vfi\r\n.\/configure\r\nmake dist\r\n<\/pre>\n<p>Oops.\u00a0 Before you type <code>make dist<\/code>, you may wish to configure the parameters, modules, and rules of Orchids.\u00a0 Do it just as you <a title=\"Configure\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=48\">configure<\/a> Orchids, except for two points:<\/p>\n<ul>\n<li>you should set <code>$OCONF<\/code> to <code>\/tmp\/orchids\/dist now,<\/code><\/li>\n<li>you should edit the files that end in .<tt>conf.dist<\/tt>, not .<tt>conf<\/tt>.\u00a0 The only difference is that you are now allowed to use the following metavariables instead:\n<ul>\n<li><code>@@VARDIR@@<\/code>, standing for your installation&#8217;s <code>var<\/code> subdirectory (default <code>\/usr\/local\/var\/<\/code>)<\/li>\n<li><code>@@ETCDIR@@<\/code>, standing for your installation&#8217;s <code>etc<\/code> subdirectory (default <code>\/usr\/local\/etc\/<\/code>)<\/li>\n<li><code>@@LIBDIR@@<\/code>, standing for your installation&#8217;s <code>lib<\/code> subdirectory (default <code>\/usr\/local\/lib\/<\/code>)<\/li>\n<li><code>@@RUNUSER@@<\/code>, standing for the user id that Orchids will assume while running (default <code>nobody<\/code>, see the <code>--with-runtime-user<\/code> option to <code>configure<\/code> on the compilation page)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Put the Orchids source archive in <tt>~\/rpmbuild\/SOURCES<\/tt> and the file <tt>misc\/orchids.spec<\/tt> in <tt>~\/rpmbuild\/SPECS<\/tt>.<\/p>\n<pre class=\"wiki\">mv -v .\/orchids-[0-9.]*.tar.gz ~\/rpmbuild\/SOURCES\/\r\nmv -v .\/misc\/orchids.spec ~\/rpmbuild\/SPECS\/\r\n<\/pre>\n<p>Then, build the binary package with the following command:<\/p>\n<pre class=\"wiki\">rpmbuild -ba ~\/rpmbuild\/SPECS\/orchids.spec\r\n<\/pre>\n<p>Be aware that the binary package will not be cryptographically signed! (For creating signed packages, check the <a class=\"wiki\" href=\"https:\/\/juju.sh\/trac\/orchids\/wiki\/RPMSignature\">Signed RPM Tutorial<\/a>).<\/p>\n<p>Finally, the package can be installed or updated with following command:<\/p>\n<pre class=\"wiki\">rpm -Uvf ~\/rpmbuild\/RPMS\/i386\/orchids-*.rpm\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Create a file ~\/.rpmmacros (download) in your home directory containing: %_topdir %(echo $HOME)\/rpmbuild %debug_package %{nil} Create the following directories: mkdir -p ~\/rpmbuild\/{BUILD,RPMS,SOURCES,SPECS,SRPMS} Architecture-specific directories will be created automatically.\u00a0 They can also be created manually with the command: mkdir -p ~\/rpmbuild\/RPMS\/{athlon,i386,i486,i586,i686,noarch} Alternatively, you can replace the last two steps by invoking the rpmdev-setuptree; you need to &hellip; <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=41\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Build an RPM package<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-41","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/41","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=41"}],"version-history":[{"count":8,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/41\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/41\/revisions\/67"}],"wp:attachment":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}