All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: mapping centos RPM(s) to OE recipe: example involving openssl-perl
Date: Sat, 29 Oct 2016 05:09:20 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.20.1610290417080.7859@localhost.localdomain> (raw)


  finally figured out enough to ask intelligent(?) questions about how
to map CentOS RPMs to equivalent OE recipes and config settings, so
here goes -- feel free to tell me where i've screwed up, and i'll be
putting all this on a public wiki page when i'm done.

  scenario: existing x86 system based on CentOS 7 and lots of custom
RPMs to be ported to PPC using OE (actually, wind river linux, but i'm
starting with OE/YP for simplicity), have a massive list of RPMs
installed on current x86 system, so methodically going through list
and figuring out the OE equivalent. sometimes, it's obvious; sometimes
not. and while i'm doing this, trying to write a guide for how others
with little to no OE familiarity can do this.

  (side note: starting with "core-image-minimal" image so that already
sucks up a fair number of required packages.)

  first note i'm going to make -- while centos system requires
installation of individual and sometimes closely-related RPMs, a
single OE recipe has the ability to generate multiple RPMs. so if
centos system has pile of installed RPMs:

  * X
  * X-a
  * X-b
  * X-c  etc ...

it is entirely possible that those centos RPMs map to a single OE
recipe for "X" (with possibly PACKAGECONFIG settings added to generate
those subpackages). simple example -- OE recipe for dhcp:

  PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"

  FILES_${PN} = ""
  RDEPENDS_${PN}-dev = ""
  RDEPENDS_${PN}-staticdev = ""

  FILES_${PN}-server = "${sbindir}/dhcpd   ${sysconfdir}/init.d/dhcp-server"
  RRECOMMENDS_${PN}-server = "dhcp-server-config"

  FILES_${PN}-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"

  FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"

  FILES_${PN}-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"

  FILES_${PN}-omshell = "${bindir}/omshell"

so in cases like that, it should be easy to see how a set of dhcp RPMs
would map to the single OE recipe, that part seems easy.

  i was particularly interested in RPMs that represent language APIs
for a package; lots of RPMs with names like "X-perl" and "Y-python",
which would normally be installed explicitly on centos, but which in
many cases are generated by the OE recipe for "X" or "Y", depending on
the configuration. or so i thought, until i started picking on
examples.

  case in point -- centos system needs "openssl-perl" RPM, so i
queried that package on my fedora system to check its contents:

  $ rpm -ql openssl-perl
  /etc/pki/tls/misc/CA.pl
  /etc/pki/tls/misc/tsget
  /usr/bin/c_rehash
  /usr/share/man/man1/CA.pl.1ssl.gz
  /usr/share/man/man1/c_rehash.1ssl.gz
  /usr/share/man/man1/tsget.1ssl.gz
  $

ignoring docs files, apparently, that package installs three perl
scripts "for converting certificates and keys from other formats to
the formats used by the OpenSSL toolkit."

  fair enough, so i just assumed there was an openssl recipe setting
that would generate a separate "openssl-perl" rpm file if one was
requested. instead, i found this in the "openssl.inc" file:

  PACKAGECONFIG[perl] = ",,,"
  ...
  PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
  ...
  FILES_${PN}-misc = "${libdir}/ssl/misc"

and further down ...

  do_install () {

        ... snip ...

        if [ "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then
                sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
                sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget
        else
                rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget
        fi

so, rather than generating a separate "openssl-perl" package, as i
read this, the openssl recipe, by default, installs those two scripts
"CA.pl" and "tsget", then unless you explicitly add "perl" to
PACKAGECONFIG, it removes them during installation.

  it has the same effect, i guess, but it seems a bit weird. is there
a rationale for doing this? i might have a couple more questions about
this particular recipe after i read further.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



                 reply	other threads:[~2016-10-29  9:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.20.1610290417080.7859@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.