User:DanielDrake/Notes: Difference between revisions

From OLPC
Jump to navigation Jump to search
(New page: install git, fedora-rpmdevtools run rpmdev-setuptree install custom kernel: http://fedoraproject.org/wiki/Docs/CustomKernel)
 
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= RPM dev =
install git, fedora-rpmdevtools
== initial setup ==
* install packages: rpmdevtools yum-utils fedora-packager
* run rpmdev-setuptree to create ~/rpmbuild hierarchy and .rpmmacros settings


== obtaining/unpacking source and preparing build env ==
run rpmdev-setuptree
* Find the source RPM either [http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Fedora/source/SRPMS/ in the fedora archives] or run <tt>yumdownloader --source <package></tt>
* install build-dependencies: <tt>sudo yum-builddep foo.src.rpm</tt>
* unpack the sources: <tt>rpm -Uvh foo.src.rpm</tt>


== unpacking sources ==
install custom kernel: http://fedoraproject.org/wiki/Docs/CustomKernel
* only if you want to generate new patches or whatever: <tt>cd ~/SPECS; rpmbuild -bp --target=`uname -m` foo.spec</tt>

== building ==
* <tt>cd ~/SPECS; rpmbuild -bb --target=`uname -m foo.spec</tt>
* output is in ~/RPMS/<arch>

== installing ==
* sudo rpm -ivh --force ../RPMS/foo.rpm

= links =
* install custom kernel: http://fedoraproject.org/wiki/Docs/CustomKernel
** includes some of the above
* how to use rpm: http://www.rpm.org/max-rpm/
* [http://koti.welho.com/vskytta/packagers-handbook/packagers-handbook.html fedora packager's handbook]
* [http://fedoraproject.org/wiki/Docs/Drafts/BuildingPackagesGuide building packages guide]
* [https://fedoraproject.org/wiki/UsingCvs fedora package cvs]
* [http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo creating package howto]

= misc =
* query installed sofware version: rpm -q <package>

= additional notes for XO devel =
* other packages needed: git
* other development utils I use: quilt

= easy flashing from USB =
* download osXYZ.img and osXYZ.crc to usb drive
* plug usb drive into XO
* press esc during boot to reach openfirmware prompt
* run <tt>copy-nand u:\osXYZ.img</tt>?
* this wipes everything
* run <tt>boot</tt>

= reverse dependencies =
* what requires libgnome?
** <tt>rpm -q --provides libgnome</tt>
** for each line of output: <tt>rpm -q --whatrequires FOO</tt>
* what does libgnome require?
** <tt>rpm -q -R libgnome</tt>

Latest revision as of 11:21, 4 June 2009

RPM dev

initial setup

  • install packages: rpmdevtools yum-utils fedora-packager
  • run rpmdev-setuptree to create ~/rpmbuild hierarchy and .rpmmacros settings

obtaining/unpacking source and preparing build env

  • Find the source RPM either in the fedora archives or run yumdownloader --source <package>
  • install build-dependencies: sudo yum-builddep foo.src.rpm
  • unpack the sources: rpm -Uvh foo.src.rpm

unpacking sources

  • only if you want to generate new patches or whatever: cd ~/SPECS; rpmbuild -bp --target=`uname -m` foo.spec

building

  • cd ~/SPECS; rpmbuild -bb --target=`uname -m foo.spec
  • output is in ~/RPMS/<arch>

installing

  • sudo rpm -ivh --force ../RPMS/foo.rpm

links

misc

  • query installed sofware version: rpm -q <package>

additional notes for XO devel

  • other packages needed: git
  • other development utils I use: quilt

easy flashing from USB

  • download osXYZ.img and osXYZ.crc to usb drive
  • plug usb drive into XO
  • press esc during boot to reach openfirmware prompt
  • run copy-nand u:\osXYZ.img?
  • this wipes everything
  • run boot

reverse dependencies

  • what requires libgnome?
    • rpm -q --provides libgnome
    • for each line of output: rpm -q --whatrequires FOO
  • what does libgnome require?
    • rpm -q -R libgnome