[] Home
[] The Labyrinth
[] Social Media
[] Terms
[] Contact

get in shape
Hits: 81657

random hull


social media
the labyrinth


Roll your own Fedora RPMs

What is an RPM? RPM stands for Redhat Package Manager. Fedora Core is a fully open-source operating system, started by Redhat Inc. Fedora Core contains the best of the best free open source software on the planet, in my opinion. It is distributed free of charge in little packages, called rpms. What we refer to as an RPM (or rpm) is kind of like a .CAB file in windows. To find out more about rpm, open up the Terminal from your Applications menu and type man rpm.

How to create signed .rpm files: If you plan to create your own rpm files, you will of course want to sign them. What good is an rpm if it isn't signed? A lenghly howto can be found here but it is far simpler to just log in as your normal non-priviliged user, fire up kgpg and let the wizard walk you through creating a key. Use the default values, enter your Linux username (not your real name) and email address and press enter a few times. Drink some tea while you wait for the key to be generated.

Export public key: Should be self-explanatory. There is a menu option for it: Keys - Export Public Key [Ctrl-C].

Import key: Now you need to import the key to the rpm database. Open a terminal window and type:

$ su
# rpm --import key.asc
# exit
$ gedit ~/.rpmmacros

Configure: Edit your ~/.rpmmacros file: Change "username" to your Linux username:

%_signature gpg
%_gpg_name username

You can look at a summary of keys in the rpm database with a command like the following:

rpm -qa gpg* | xargs rpm -qi | grep Summary

For more info: man rpm or visit http://www.rpm.org/max-rpm

AMD64: Add the following line to ~/.rpmmacros to have rpm -qa show .i386 or x86_64 at the end of package names (handy!).

%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

Set up build environment: Here's how to set up your non-priviliged rpm build environment:

$ su
# yum install rpmdevtools
# exit
$ rpmdev-setuptree

Get development tools: If you have the hard drive space:

# yum grouplist
# yum groupinstall "X Software Development"
# yum groupinstall "Development Tools"
# yum groupinstall "Development Libraries"

How to build: Be sure to install the src rpm as your non-priviliged user and it will go to your non-priviliged build tree. To build a freshly installed foo.src.rpm, go to ~/rpmbuild/SPECS and type:

$ rpmbuild -ba foo.spec --sign

-- force 64 bit compile on 64 bit system. move libraries to /usr/lib64 --

$ PREFIX=/usr LIBDIR=$PREFIX/lib64 LDFLAGS=-L$LIBDIR rpmbuild -ba foo.spec --target=x86_64 --sign

-- force 32 bit compile on 64 bit system. If this fails, use mock --

$ PREFIX=/usr LIBDIR=$PREFIX/lib rpmbuild -ba foo.spec --target=i386 --sign

If you have any questions, refer to the manual:

$ man rpmbuild

A particularly useful option is --nobuild or -bi --short-circuit to skip building and test unpackaged files.

Obtaining sources: Let's get a source package of wine to play with. Wine is available from http://rpm.livna.org so just go there and install the repo.

$ su -c "yum -y install yum-utils"
$ rpm -q --filesbypkg yum-utils-1.0-2.fc6 | grep bin
$ yumdownloader --source wine
$ rpm -ivh wine*
$ yum-builddep wine* #get everything needed to build wine rpm
$ cd ~/rpmbuild/SPECS
$ PREFIX=/usr LIBDIR=/usr/lib rpmbuild -ba wine.spec --target=i386 --sign

Turbo build: To speed build time, I usually route the output of configure and make to /dev/null in the .spec file, something like this:

configure > /dev/null
make -j3 -s > /dev/null

This seems to speed up the build considerably on a slow terminal Alternatively, use a faster terminal with unaliased fonts, like a text terminal or xterm. If there are errors and you want to see them, you can always go to the BUILD/ directory and re-run make. If you find yourself constantly typing in the same commands, optionally add them to .bashrc

$ gedit ~/.bashrc

alias yd='yumdownloader'
alias yi='sudo yum install'
alias yl='sudo yum -C list'
alias yp='sudo yum provides'
alias yr='sudo yum -C remove'
alias ys='sudo yum -C search'
alias yu='sudo yum update'

Building Kernel RPMs requires a slightly different procedure.

Further study: rpmdevtools contains a bunch of goodies. Let's find out what we can do with them.

$ rpm -q --filesbypkg rpmdevtools | grep /bin

Now, if you have the time, go down the list and acquaint yourself with the tools.

This page edited conveniently in Firefox or Ineternet Explorer thanks to my Anchorage Net Community Hosting project.

  • kids in domeConsulting, data recovery & computer help
  • Electronic repair, monitor and TV repair
  • Data recovery, security and backup solutions
  • Networking, cable installation, electronics
  • Cash register programming, set prices, etc.
  • Audio installation, entertainment centers, studio rig
  • Free & donation-based web hosting
  • Web site design, e-commerce
  • Removal of new, undetected virusesimage
  • Safe shopping: Identity theft prevention
  • Antispam, antivirus, spyware and adware removal
  • MySQL, Postgres database development
  • Applications programming, interfaces
  • Graphical, structural and 3D programming
  • Technical proofreading
  • Tutoring, lectures, talk shows
Custom Programming by Henry Kroll III

Dynamic web content:

Your_Name.ANCH.ORG - Anchorage Net Community Hosting, Non-Commercial Hosting, CMS
Your_Name.EQ2.US - No Equal 2 Us! - No Limits Hosting - Custom MySQL, PHP Content Management
3-D stock charts live, in the browser (requires vrml plugin)
3-D graphing calculator in the browser (requires vrml plugin)
1,000,000 digit calculator in the browser
Stock chart comparison in the browser
On-line maze generator

3-D graphics plug-ins for Moray 3.5

Geodesic Dome Design
Triangle Mesh Import
C Programs and Libraries

dictionary.c: dynamic "variable variables" for C with "string" as variable name
: a decal-like macro plug-in for games like Asheron's Call™ on Linux™!
gcf: Find the greatest common factor among a bunch of numbers.

[   ] gcf.exe 14-Oct-2009 15:49 24K

Installable Windows programs:

SafeTasks antivirus / spyware removal
FoznerEdit notepad replacement
Computer-generated music:


Hosted Sites

Founding Members

Dry Cleaning by Mayfield's Quality Cleaners
Technical Services provided by CompTune.com
Programming by TheNerdShow.com
Graphic Design by Business Card Express
DNS and Server Hardware by eq2.us
BriarLarkson.com Author, Historical Romance Novels
Alaska Snow Removal
Pye' Wackets (Coming Soon!)

Free Members

North Wind Traders
Kenai / Seldovia Museum
Church of Scientology
New Alliance for the future of CIRI

See some artwork by my sister, Rachel Kroll

Support free software development. Annual membership:

Windows is a registered trademark of The Microsoft Corporation

Page content subject to change.
Please review our Terms of Service

Fedora LogoValid HTML 4.01 Transitional