From Fedora Project Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 34: Line 34:
* configure opts
* configure opts
* patches++ (secondary target)
* patches++ (secondary target)
* update cycles


The end-result should be a proper, closed RPMDB with no missing dependencies or false provides, while runtime has modified binary versions of the packages installed.
The end-result should be a proper, closed RPMDB with no missing dependencies or false provides, while runtime has modified binary versions of the packages installed.
== Interested People ==
* Appliance people (yum install appliance-people *grin*)
* [[User:Baard|Stefan Hartsuiker]]
* [[User:Kanarip|Jeroen van Meeuwen]]
* you?
== Means ==
* et-mgmt-tools mailing list
* fedorahosted.org repository for yum emerge plugin
* some custom repository somewhere to host the yum emerge plugin package while development is still ongoing, and the yum emerge package has not been reviewed yet
* an audience
* some contributors


= Milestones in pursuing this endeavour =
= Milestones in pursuing this endeavour =
Line 93: Line 109:
* continue with '''ms #5'''
* continue with '''ms #5'''


= oneliners =
= Oneliners =
 
A couple of one-liners you do not want to execute unless you have a shower to take or a cup of coffee to make ;-)


== Find required packages using a spec file (given a sub-package) ==
== Find required packages using a spec file (given a sub-package) ==

Latest revision as of 22:33, 26 January 2009

This is a draft

The Goal

For appliance operating systems rebuilding RPMs with modified capabilities and dependencies is mandatory.

The idea is to rebuild SRPMs on the fly, and modify them just before dispatching a mock or koji build for said SRPMs, so that the resulting binary RPM only links against libfoo.so but not libbar.so.

This allows for truely optimized binaries to be installed on the consumer side, but primarily allows for true appliance .rom based operating systems.

Brief Overview

A brief, general overview of the process of emerging a SRPM into a modified binary RPM being installed on the actual system.

The user types:

# yum emerge foo

The process continues with:

  • downloading the SRPM for package foo,
  • rebuilding the foo SRPM with modified Requires:, BuildRequires, Provides, and possibly modified Obsoletes: RPM headers.
    • The rebuilding and modifying uses a "global" make options repository (either flat file MYSQL=0|1 or whatever)
  • The resulting binary RPM is then installed.

Things to worry about

Things to worry about include, and are not limited to:

  • kernel .config files
  • sub-packages
  • requires (strip)
  • buildrequires (strip)
  • configure opts
  • patches++ (secondary target)
  • update cycles

The end-result should be a proper, closed RPMDB with no missing dependencies or false provides, while runtime has modified binary versions of the packages installed.

Interested People

Means

  • et-mgmt-tools mailing list
  • fedorahosted.org repository for yum emerge plugin
  • some custom repository somewhere to host the yum emerge plugin package while development is still ongoing, and the yum emerge package has not been reviewed yet
  • an audience
  • some contributors

Milestones in pursuing this endeavour

Milestone #1

First, write a yum plugin that does the following:

  • Upon a command such as:
    # yum emerge foo
    perform the following actions:
    • Download foo's SRPM
    • Rebuild the foo SRPM
    • Install the new binary foo RPM

Milestone #2

  • yum emerge foo
    • rebuild foo in mock
    • install foo

Milestone #3

  • yum emerge foo
    • rebuild foo --without-bar
      • strip requires
      • strip buildrequires
      • rebuild srpm
      • build in mock
    • install foo

Milestone #4

  • yum emerge foo
    • download srpm
    • install srpm
    • edit spec to include Patchx: header and %PatchX macro
    • rebuild foo (like ms #3)
    • install foo

Milestone #5

  • yum emerge foo
    • download srpm
    • install srpm
    • edit foo
    • rebuild (like ms#4)
    • use new binary rpm to resolve immediate deps
    • for dep in deps: (first search relevant srpm,misc.unique())
      • download srpm
      • edit rebuild
      • for dep in deps: ...

Milestone #6

  • yum emerge foo where foo has subpackages
    • handle them somehow ...

Milestone #7

  • dispatch build of srpm to koji,
  • download resulting binary rpms
  • continue with ms #5

Oneliners

A couple of one-liners you do not want to execute unless you have a shower to take or a cup of coffee to make ;-)

Find required packages using a spec file (given a sub-package)

This is an example to find the packages required by the wireshark package (which has the wireshark-gnome as a sub-package) directly (e.g. non-recursive dependencies)

rpmquery --specfile --qf="%{NAME}\n" wireshark.spec | grep -E "^wireshark$" | xargs -n 1 -I{} repoquery --requires --qf="%{NAME}\n" "{}" | xargs -n 1 -I{} repoquery --whatprovides --qf="%{NAME}\n" "{}" | sort | uniq