Building my first packages.

I downloaded two packages: hello and wget

You can get them from this page: http://www.gnu.org/software/software.html#allgnupkgs

First package: hello

This is a simple package that will print out “Hello world!” when run. It’s designed for people to get familiar with building packages (like me).

Let’s begin!

After downloading it, I extracted the tarball:

tar -xvzf hello-2.8.tar.gz

Which left me with a folder called hello-2.8

Here are the contents of that folder:

ABOUT-NLS
AUTHORS
ChangeLog
config.in 
configure.ac 
COPYING
GNU
makefile
lib
maint.mk
Makefile.in
NEWS
README 
src 
THANKS 
aclocal.m4 
build-aux 
ChangeLog.O 
configure 
contrib 
doc 
INSTALL 
m4 
Makefile.am 
man 
po 
README-release 
tests 
TODO

I opened up the README file, then the INSTALL file to read instructions on how to build this package.

From the instructions, it seemed like a simple process.. ./configure, make, then make install.

Let’s do it. When doing these commands, I’m going to append the time command in front so I can see how long each step takes. I’ll snip out most of the output.

$ time ./configure

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes

~snip~

config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile

real    0m14.678s
user    0m5.160s
sys    0m6.559s

As we can see, it took about 15 seconds to run the configure script. Next is make. I did not include most of the output as it was far too long.

$ time make

~snip~

Making all in src
make[2]: Entering directory `/home/rudolf/Downloads/hello-2.8/src'
gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I..  -I../lib -I../lib   -g -O2 -MT hello.o -MD -MP -MF .deps/hello.Tpo -c -o hello.o hello.c
mv -f .deps/hello.Tpo .deps/hello.Po
gcc  -g -O2   -o hello hello.o  ../lib/libhello.a 
make[2]: Leaving directory `/home/rudolf/Downloads/hello-2.8/src'
Making all in doc
make[2]: Entering directory `/home/rudolf/Downloads/hello-2.8/doc'
make[2]: Nothing to be done for `all'....

~snip~

real 0m0.878s
user 0m0.531s
sys 0m0.362s

This command took less than a second.

Finally, we’ll finish with make install. This step requires root privileges.

$ sudo time make install

~snip~

Making install in man
make[1]: Entering directory `/home/rudolf/Downloads/hello-2.8/man'
make[2]: Entering directory `/home/rudolf/Downloads/hello-2.8/man'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/share/man/man1" || /usr/bin/mkdir -p "/usr/local/share/man/man1"
 /usr/bin/install -c -m 644 hello.1 '/usr/local/share/man/man1'
make[2]: Leaving directory `/home/rudolf/Downloads/hello-2.8/man'
make[1]: Leaving directory `/home/rudolf/Downloads/hello-2.8/man'
Making install in tests
make[1]: Entering directory `/home/rudolf/Downloads/hello-2.8/tests'
make[2]: Entering directory `/home/rudolf/Downloads/hello-2.8/tests'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/rudolf/Downloads/hello-2.8/tests'
make[1]: Leaving directory `/home/rudolf/Downloads/hello-2.8/tests'
make[1]: Entering directory `/home/rudolf/Downloads/hello-2.8'
make[2]: Entering directory `/home/rudolf/Downloads/hello-2.8'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/rudolf/Downloads/hello-2.8'
make[1]: Leaving directory `/home/rudolf/Downloads/hello-2.8'

3.35user 1.78system 0:05.27elapsed 97%CPU (0avgtext+0avgdata 23000maxresident)k
0inputs+664outputs (0major+347690minor)pagefaults 0swaps

No problems installing, but the time function didn’t seem to output correctly. Looks like it took about 5.27 seconds.

Now, let’s test out the program!

To do that, all I have to type is hello in the terminal.

[rudolf@rudolf-netbook]$ hello
Hello, world!

Success!

The next package is wget.

Second package: wget

Building this package is exactly the same as hello.

Here are the commands I used in order:

tar -xzvf wget-1.14.tar.gz
cd wget-1.14
./configure
make
make install

And thankfully, no problems during the build process! To test the program:

$ wget
wget: missing URL
Usage: wget [OPTION]... [URL]...
Try `wget --help' for more options.

Looks like it installed OK.

That’s it for these two!

A beefy miracle (Fedora installation)

So, I decided to install Fedora onto my netbook.

Here are its specs:

CPU: Intel Celeron SU2300 (dual core, @ 1.2Ghz)
Memory: 2GB
Storage: 250GB HDD
Screen size: 11.6″ LED LCD

While not as powerful as a full laptop, this netbook is still way better than the typical netbook running the underpowered Intel Atom processor and tiny <10″ screens. It’s served me well the past 2 years.

Anyhow, before installing Fedora, I decided to purchase a 128GB SSD and swap out the old hard drive. That hard drive is now being used in my external hard drive chassis for another class, meanwhile my netbook gets ultra-fast wakeup times and slightly better performance. 🙂

Unfortunately installing Fedora wasn’t so simple. Being a netbook, there’s no optical drive from which to load a live CD. No problem I thought, I’ll just install it from a USB drive. I downloaded a tool called liveUSB-creator, which is an official tool to create Live USBs of operating systems. I used it to create a live USB with a copy of Fedora 17 64-bit and tried to boot it from my netbook.

As soon as it started booting I was met with an error that I don’t remember off the top of my head. Something to do with the screen, or something. Either way, Google searches provided very few results, and nothing really helpful.

Okay, let’s try another method.

This time I created a live USB with.. Fedora 16! Lo and behold, it worked. After installing it to my drive, I made sure everything was up to date before upgrading by typing the following command:

yum update

After everything was up to date, I typed in a few commands to start the upgrade process:

yum install preupgrade
preupgrade

After that, an upgrade wizard appeared on my desktop. I followed the instructions and after a reboot or two, I was running Fedora 17, Beefy Miracle!

First blog post.

Here is my first blog post for SBR600!

Let me introduce myself.

My name is Rudolf and I’m in the 5th semester of CTY at Seneca College. I guess you could say I’m your typical geek; interested in IT, gadgets, video games plus Japanese anime and manga (comics).

The name of the blog (Software Build Run) is a play on the name of the course (Software Build and Release) and the name of a story arc from one of my favourite manga (JoJo’s Bizarre Adventure part 7: Steel Ball Run).

Here’s a snippit from the #fedora IRC channel on the freenode server:

[14:34] == rjanns [cfdb45eb@gateway/web/freenode/ip.207.219.69.235] has joined #fedora-devel
[14:35] == schlobinux_ [~xavierb@fedora/schlobinux] has joined #fedora-devel
[14:36] == laine [~laine@ip24-254-239-173.hr.hr.cox.net] has joined #fedora-devel
[14:37] == siwinski [siwinski@nat/redhat/x-tgzedspnarxfuazj] has quit [Quit: Leaving]
[14:37] <mjg59> nirik: Ok because pcsc is fucking dreadful we’re going to need an updated package for the host side of the builders. Any problem with that?
[14:37] <nirik> it’s not something we enjoy, but doable.
[14:37] == gnat42 [~gnat42@S0106c0c1c0f4a322.cg.shawcable.net] has left #fedora-devel []
[14:37] <mjg59> nirik: I can do the package
[14:38] == jskarvad [~jskarvad@ip4-83-240-127-204.cust.nbox.cz] has joined #fedora-devel
[14:38] == jskarvad [~jskarvad@ip4-83-240-127-204.cust.nbox.cz] has quit [Changing host]
[14:38] == jskarvad [~jskarvad@redhat/jskarvad] has joined #fedora-devel
[14:39] <nirik> mjg59: ok. This is for the signing stuff I assume? might make sure with dgilmore whatever you are whipping up works with koji. 😉
[14:39] == willb_ [~willb@h184-61-135-254.mdsnwi.dedicated.static.tds.net] has joined #fedora-devel
[14:39] <mjg59> nirik: Yeah