Archive

Archive for September, 2011

RPM-Writing

September 29, 2011 Leave a comment

In this lab my goal is to create an RPM package from source. Essentially the opposite of what I did in my previous blog post (Download and install an RPM package).

My first step was to ensure I had the required packages in order to perform the building commands.

[root@localhost tarBalls]# yum groupinstall “Fedora Packager” -y

Installed:
bodhi-client.noarch 0:0.8.0-1.fc15
bzr.i686 0:2.3.4-1.fc15
fedora-easy-karma.noarch 0:0-0.15.20110825git36efb338.fc15
fedora-packager.noarch 0:0.5.9.2-2.fc15
koji.noarch 0:1.6.0-2.fc15
mercurial.i686 0:1.9.1-1.fc15
mock.noarch 0:1.1.12-1.fc15
plague-client.noarch 0:0.4.5.8-2.fc15

Dependency Installed:
GitPython.noarch 0:0.2.0-0.6.beta1.fc15
fedora-cert.noarch 0:0.5.9.2-2.fc15
fedpkg.noarch 0:0.5.9.2-2.fc15
libyubikey.i686 0:1.7-1.fc15
pigz.i686 0:2.1.6-2.fc15
plague-common.noarch 0:0.4.5.8-2.fc15
python-bunch.noarch 0:1.0.0-3.fc15
python-decoratortools.noarch 0:1.8-2.fc15
python-enchant.i686 0:1.3.1-8.fc15
python-fedora.noarch 0:0.3.24-3.fc15
python-krbV.i686 0:1.0.90-4.fc15
python-magic.i686 0:5.07-4.fc15
python-offtrac.noarch 0:0.0.3-3.fc15
python-paramiko.noarch 0:1.7.7.1-1.fc15
rpmlint.noarch 0:1.2-1.fc15
ykpers.i686 0:1.4.1-1.fc15

Complete!,

[root@localhost tarBalls]# yum install rpmlint yum-utils -y
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Package rpmlint-1.2-1.fc15.noarch already installed and latest version
Package yum-utils-1.1.31-2.fc15.noarch already installed and latest version
Nothing to do

After installation of those packages I have to create the build environment with ‘rpmbuild-setuptree’ which creates the ~/rpmbuild and ~/.rpmmacros directories.

Now I’m able to begin the actual package building. I copy the previously downloaded tarballs to the ~/rpmbuild/SOURCES directory.

I move to the ~/rpmbuild/SPECS directory and create a new spec file for my tarball:

[root@localhost SPECS]# rpmdev-newspec spell-1.1

Now I edit the spell.spec file and fill in the meta data

Here’s a snippet of my spell.spec file:

Name:           spell
Version:        1.1
Release:        1%{?dist}
Summary:        Linguistics checking program

License:        GPLv3+
URL:            http://savannah.gnu.org/projects/spell/
Source0:        http://ftp.gnu.org/gnu/spell/spell-1.1.tar.gz

#BuildRequires:
#Requires:
BuildArchitectures: noarch

%description
A spell checking program which prints each misspelled word on a new line.

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
#rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%files
%doc README COPYING INSTALL

%changelog
* Fri Sep 23 2011 Nick Lambert <nlambert@learn.senecac.on.ca> – 1.1-1
– Built source as an RPM.

Some issues I had while altering this spec file were:

  • The summary could not contain the name of the program itself, so I opted to call it a “Linguistics checking program”.
  • I originally entered GPLv2 as the license which I learned was incorrect. I promptly changed that to GPLv3+.
  • My first build attempt failed because of the following error: “find: `/root/rpmbuild/BUILDROOT/spell-1.1-1.fc15.i386′: No such file or directory” To remedy this I simply commented out the “#rm -rf $RPM_BUILD_ROOT” line thus ensuring that directory would exist. I’m not certain if this was the correct way to correct this error, though it did work..

Next I moved to testing with rpmlint:

My first test with rpmlint returned with some errors and warnings

[root@localhost SPECS]# rpmlint ../SRPMS/spell-1.1-1.fc15.src.rpm
spell.src: E: no-changelogname-tag
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

To fix this I added the %changelog section to my spec file and then re-built it.

Running rpmlint on the SRPM file returns no warnings..

Running rpmlint on the RPMS file returned 1 warning:

[root@localhost SPECS]# rpmlint ../RPMS/noarch/spell-1.1-1.fc15.noarch.rpm
spell.noarch: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

To remedy this, I added the documation portion to the spec file.

 

To download my SRPMS of spell go here: http://matrix.senecac.on.ca/~nlambert/spell-1.1-1.fc15.noarch.rpm

To download my RPMS of spell go here: http://matrix.senecac.on.ca/~nlambert/spell-1.1-1.fc15.src.rpm

 

Categories: Uncategorized

Built From Source

September 14, 2011 Leave a comment

The purpose of the Build from Source lab is to become familiar with the building from source process and to create a basis on which the subsequent labs will build upon.

The two pieces of software I have chosen to work with are:

Spell and GNUmp3d

Here’s a snippet of the downloaded tarballs:

[nick@localhost tarBalls]$ ls
gnump3d-3.0.tar.gz  spell-1.1.tar.gz

Here are the unpackaged( using tar -zxf) tarballs:

[nick@localhost tarBalls]$ tar zxf gnump3d-3.0.tar.gz
[nick@localhost tarBalls]$ tar zxf spell-1.1.tar.gz
[nick@localhost tarBalls]$ ls
gnump3d-3.0  gnump3d-3.0.tar.gz  spell-1.1  spell-1.1.tar.gz

After unpacking the tarballs, I then decended into the newly created subdirectories(1 for each application) and installed each program.

GNUmp3d only requires a working Perl installation therefore I didn’t need to run ./configure in order to configure the installation for my system.

Spell on the other hand needed to be configured:

[root@localhost spell-1.1]# ./configure
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o

After configuration just a simple ‘make && make install’ to complete the installation of each program.

Here are the two programs run with the help options:

[root@localhost spell-1.1]# spell -h
Usage: spell [OPTION]… [FILE]…
This is GNU Spell, a Unix spell emulator.

-I, –ispell-version        Print Ispell’s version.
-V, –version            Print the version number.
-b, –british            Use the British dictionary.
-d, –dictionary=FILE        Use FILE to look up words.
-h, –help            Print a summary of the options.
-i, –ispell=PROGRAM        Calls PROGRAM as Ispell.
-l, –all-chains        Ignored; for compatibility.
-n, –number            Print line numbers before lines.
-o, –print-file-name        Print file names before lines.
-s, –stop-list=FILE        Ignored; for compatibility.
-v, –verbose            Print words not literally found.
-x, –print-stems        Ignored; for compatibility.

Please use Info to read more (type `info spell’).
Report bugs to: cate@gnu.org
spell home page: <http://www.gnu.org/software/spell/&gt;
General help using GNU software: <http://www.gnu.org/gethelp/&gt;

[root@localhost spell-1.1]# gnump3d -h
GNUMP3d v3.0 (Perl v5.012004) – A portable(ish) MP3/OGG/HTTP streaming server.
– See http://www.gnump3d.org/ for more details.

Usage: gnump3d [options]

–background            Detatch from the console after starting.
–config filename       Read options from the named configuration file.
–debug                 Dump debug output to the console, not the error log.
–dump-plugins          Display all plugins that have been found.
–fast                  Start quickly without indexing the audio files first.
–help                  Display this usage information.
–lang XX               Load the strings from the given language file.
–plugin-dir directory  Load the plugins from the given directory.
–port number           Listen and serve upon the given port number.
–quiet                 Do not display the startup banner.
–root directory        Serve music from the given directory.
–test                  Allow config variables to come from the environment.
–theme-dir directory   Load the theme files from the given directory.
–version               Displays the version of this software.

Report bugs to : Steve Kemp <steve@steve.org.uk>

Categories: Uncategorized

SBR Introduction!

September 9, 2011 Leave a comment

HELLO WORLD

My name is Nicholas Lambert, I’m in my final semester at Seneca College’s CTY program. One of of my courses this semester is SBR600(Software build and release) where I’m going to learn about the building (compiling, testing, and packaging) of software. I’m looking forward to working directly with the Fedora Project especially getting to tinker with the ARM processors.

This is my very first time writing a blog and I must say that it’s certainly feels weird to put my thoughts and opinions on a page for the whole world to see… I don’t know if I’ll ever feel comfortable doing so.

Here are some links to various profiles of mine on other websites:

CDOT: Nlambert

Fedora Project: Nlambert

And here is a fun desktop background I had not too long ago: BlueOrange

Categories: Uncategorized