Sunday, October 31, 2010

Project Nagios Phase 1

As a continuation to my most recent blog post, I would like to announce that the first phase of Nagios implementation is pretty much at completion (e-mail alert has also been established). However, further research is required to get this project to where my colleagues I feel a high level of gratification has been achieved meeting overall expectation for this project. Moving forward we seek to integrate our present achievements, with Nagios across multiple platforms, thereby providing critical network alerts, whenever monitored systems have encountered a problem. This should be very interesting.

Thursday, October 28, 2010

Intro to Nagios System Implementation

Hello folks I am back from my brief hiatus. Well today I will embark upon setting up the Open Source network monitoring tool Nagios, which I hope will allow myself and my colleagues to do some creative things. As a collective group we plan on testing the overall capabilities of this piece of software, which until now, has been unknown to us. It should be very interesting to see how things progress into this project. I will do my best to provide enough details, covering our progress.

Thursday, October 21, 2010

Project Update: Working with Nagios

Hello folks! As a measure to offering a brief update to my current status, as far as course work goes. It has been confirmed that my new project will involve installing, configuring, and implementing monitoring capabilities to a number of different systems running on variety of architectures, within our current testing infrastructure.
Interestingly enough this project have peaked a lot of interests, and only time will tell if it can live up to the hype...ongoing developments will be updated via my blog. Stay tuned

Link to project details:Nagios

Sunday, October 17, 2010

Repositories and Distribution

In this session I will discuss signing of rpm packages, which I had the opportunity of performing. In my previous blog I talked about using koji setup with the sshguard rpm package that I built from scratch. I used sshguard as the package of choice for rpm signing as well. In an effort to briefly chronicle the steps taken. I had to first create a gpg key using the following command: gpg --gen-key - then I added my gpg key macros with e-mail address details ex %_gpg_name <"email address goes here">.

I proceeded to sign the package with the command: rpm --addsign <packagename> - below is a screenshot that exhibits the process/outcome.

The second phase saw me create a "Yum Repositorty", which was pretty cool to do. I can now say that I have been able to build a package that is capable of being served to other users, for their own purposes.

To accomplish this I placed my signed package in the /var/www/html directory, thereby making it accessible via a web browser. Once that process was completed, I then created a new rpm to contain a new repo file and GPG key. I will now be working on a project, which I will create a discussion about in the next few weeks...should be interesting. I cannot disclose at the moment what this project may involved; as it tentative at the moment. I will keep you posted regarding this development.

Monday, October 11, 2010

Testing with Mock & Koji

Well folks, I am happy to say that both my "Mock and Koji" for sshguard has gone well! A brief run down, initially I had to install the mock software using "yum", then I had to add mock to the the mock group >>>using#: usermod  -G mock <username>, and then I started building with mock using#: mock -r fedora-12-x86_64 --rebuild <src. rpm> * Note: "fedora-12 linux based OS, x86_64 is the architecture employed on my system". The resultant from the above process generated a positive output.


For Koji the process was a bit similar, however, getting Koji setup involved a process of obtaining and setting up security certs for authentication (3 in total); as it is a core dependent to testing the use of Koji, on your system. Just to backtrack for a moment, the certs setup was done via my FAS2 account, and from that point, I ran the command syntax: #koji build  dist-f12  --scratch <src.rpm>. The following screenshots reflects successful testing of both tools against my sshguard package.



Here are links that offer credible information regarding the process involved with using both "Mock & Koji"  Infolink: Mock Info   ---> Using Koji

SSHGUARD SPEC FILE CREATION

I have finally conquered the first phase of my spec file creation, using a different approach. Consequently, as a result I had to place irssi spec file creation on the back burner. To briefly bring you up to speed, as to my quest in getting to this point. After series of thorough searching for packages to use for my spec file creation, I stumbled upon "SSHGUARD." My initial creation of an sshguard spec file from 'scratch', saw me encounter some problems. I tried building a spec file from an sshguard (sshguard-1.5rc4) release candidate version, which proved to be very unstable. By this, I mean I had a lot issues with error messages, such as incoherent version in %changelog section of spec file, which I wasn't able to resolve on my own, nor with the courteous assistance of my colleagues. So after consulting with one of my aforementioned colleagues, I was advised to try creating the spec file from a more stable version of  sshguard.
So I tried creating a specfile from earlier version of sshguard --> sshguard-1.4-1, but this package also had some hidden bugs with the man page. After running rpmlint -i <spec file>, I was prompted with an warning message >>warning: /usr/share/man/man8/sshguard.8.gz  `." not defined. With some additional text, which indicated that "This man page may contain problems that can cause it not to be formatted as intended."
At this point I was ready to try another package that might produce better outcome. However, in this instance persistency paid off! I decided to revert to an even earlier version of the aformentioned package, and fortunately for my efforts the results were finally favourable. Below are a couple screenshots that seeks to render the outcome mention previously.




I aim to keep you fully informed; as to my progress moving forward. Hopefully this stage will prove to be a much smoother ride.
Additional Information on sshguard can be found here: SSHGUARD

Wednesday, October 6, 2010

Rpmlint: Strip binaries and remove .packlist file

Upon posting my most recent blog post, which highlighted my current status, as far as building my irssi spec file goes. One of my colleagues, came across my post, and offered a viable solution to resolving the issues, to which I am currently encountering. Finally, I felt the turning point was near, as he (meaning my colleague) coincidentally ran into the same issue as I am during his spec file build for a different package. I was confident that this would be the turning point that would allow me to resolve all my issues, related to warnings, which I have been receiving...wishful thinking. However, to the credit of my colleague I was able to make the "Enchant library" happy, as it was able to employ hunspell (which is a dictionary) as a means to decipehering the language in the info message. So that is "fixed", but most of my warnings (14 of them) still lingers on.

At this time most of the warnings indicate that there are unstripped binaries/objects, and hidden files that should be deleted ".packlist."
Even after utilizing the -i switch with rpmlint, which is suppose to offer helpful information to resolving, some common issues, I am hindered from making any motivating progress. I can't believe it is taking this long to get past this point. :(

Sunday, October 3, 2010

Rpmlint test warnings

Unfortunately, I am not the bearer of good news tonight. I have been shuffling between different tasks to resolve a number of warning messages, served by rpmlint. The interesting thing is that one of the warnings clearly indicates that there is a hidden file in /usr/lib64 directory path. However, whenever I issue the  rm -f command to remove the hidden file, rpmbuild -ba command is not happy. So I am back to square one, aggressively designating some research time to finish this phase of the build. At this point I am a bit concern that I maybe falling behind in getting my assigned task completed...mayday...mayday. Below is a screenshot, which renders my current warning messages.


I will be devoting some more time to see this assigned task through. Stay tuned.

Wednesday, September 29, 2010

Mozilla Discussion

To briefly digress from the success and failures of my current Irssi build, I will like to take this time to acknowledge the guys, who are doing a great job on the Mozilla Project. I wanted to touch on this; due to my most recent sit-in, with two gentlemen, who are currently working on a number different things related to Mozilla Firefox. These two individuals go by the name of Armen and John. I found their lecture to be very informative in terms of highlighting a number of different processes, and Regression testing, which are employed on  a daily basis. This includes the monitoring of builds, and various stages of testing that come in to play before the product is released to the end--user and tools used to ensure the build follows a specific criterion.

I was particularly impressed with how the Mozilla team, has achieved great success, with their streamlined automation and monitoring of package builds. Automation of processes seems like the best way to go, when you have an overwhelming number tasks to accomplish within a very narrow window (of time). Once again, thanks for insightful information session...great job!

Tuesday, September 28, 2010

Rpmlint Error Messages

Well I ran rpmlint on the spec file, RPMS and SRPMS directory, and crossed my fingers hoping for no errors. Unfortunately today wasn't the day that would see me successfully finish my build of irssi. I provided a view of the error message received, when I executed the rpmlint command (below). The result of the test 8 errors and 33 warnings. Not the outcome I wanted.


My course of action now involves determining what these errors mean, and find a way to safely fix them.

With some assistance from Chris Tyler I was able to reduce my rpmlint error msg's to a count of 4. Slowly working my way down to reducing and eliminating the total error count. A screen capture has been made available to corroborate this latest occurence.

I will continue to offer new developments as they become available.

Well folks, I have made some needed progress after toiling for some hours, trying to reduce my error count to zero. Due to the zero length error messages that I received, I had to employ the correct command, which allowed me to delete all the files in /usr/lib64 directory path, which qualified as useless to this build. As the saying applies "Rome was not built in one day." That being said, my new objective revolves around resolving all of the 35 warnings that still remains. Below is a screen capture that helps to confirm my current status with this build.


I will attempt to continue this discussion sometime tomorrow, hopefully I can get this build done and wrapped up!

Friday, September 24, 2010

Building IRSSI spec file

This session my goal is to delve into the creation of a spec file from the ground up (scratch). In the initial stages of this file creation process I have encountered a few errors, due to a few typos that were made in the spec file...fixed. Now another issue has poked its head, I continue to receive rpm build errors, such as the following:

Making install in fe-text
make[3]: Entering directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[4]: Entering directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
test -z "/usr/bin" || /bin/mkdir -p "irssi/usr/bin"
/bin/mkdir: cannot create directory `irssi': Not a directory
make[4]: *** [install-binPROGRAMS] Error 1
make[4]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15'
make: *** [install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.Fe7ScR (%install)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.Fe7ScR (%install)

Well I was stumped for a bit , upon encountering  a number of build errors. However, I reached out to Chris Tyler for some assistance with the problem, I was facing.  It so happen that as the build error states - # /bin/mkdir: cannot create directory `irssi': Not a directory, as Chris Tyler pointed out to me, the make install line  spec file was pointed to the wrong path. At the time of the build my make install path was set as DESTDIR=irssi (which obviously is not the correct directory). What the path was changed to reflect, and should have been from the beginning is DESTDIR=$RPM_BUILD_ROOT. Once I change to the correct path, I had some issues regarding missing macros in my spec file...please stay tuned for future details regardiing my progression with this build.

As a continuation to my ongoing learning curve. I interestingly enough came across an issue, where I was prompted with an error message of "error: Installed  (but unpackaged) file(s) found:"  ---> followed by a long listing of files that needed to be identified in the spec file based on the proper file path or predefined macros eg. %{_bindir}/* specifies files for /usr/bin directory. My concern was with the setting of the path in my spec file to reflect /usr/share/doc/irssi and /usr/share/irssi (not knowing the problems it may or may not create). As you can see irssi reside in the same path for both directories.
However, I was able to resolve that issue with the assistance of Chris Tyler who offered a number of strategic steps to overcome and/or prevent any potential problems in the unforseen future.  I added the following lines to my spec file and everything checked out good as illustrated by the results below: (1) Spec changes (2) Recent outputted results after making the changes and running rpmbuild -ba <specfile name>


Snippet of recent output
libpthread.so.0(GLIBC_2.2.5)(64bit) libresolv.so.2()(64bit) libtinfo.so.5()(64bit) libutil.so.1()(64bit) perl(Carp) perl(DynaLoader) perl(Exporter) perl(strict) perl(vars) rtld(GNU_HASH)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/sbr/rpmbuild/BUILDROOT/irssi-0.8.15-1.fc12.x86_64
Wrote: /home/sbr/rpmbuild/SRPMS/irssi-0.8.15-1.fc12.src.rpm
Wrote: /home/sbr/rpmbuild/RPMS/x86_64/irssi-0.8.15-1.fc12.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.4OqPri
+ umask 022
+ cd /home/sbr/rpmbuild/BUILD
+ cd irssi-0.8.15
+ rm -rf /home/sbr/rpmbuild/BUILDROOT/irssi-0.8.15-1.fc12.x86_64
+ exit 0

As mentioned the latest output above occured since I made a few changes to my spec file with the assistance of Chris and one of my other colleagues...looks good...moving on to running the rpmlint command to test for errors with the rpm package created...will let you know how that goes.

Well I ran rpmlint on the spec file, RPMS and SRPMS directory, and crossed my fingers hoping for no errors. Unfortunately today wasn't the day that would see me successfully finish my build of irssi. I provided a view of the error message received, when I executed the rpmlint command (below). The result of the test 8 errors and 33 warnings. Not the outcome I wanted.


My course of action now involves determining what these errors mean, and find a way to safely fix them.

Wednesday, September 22, 2010

J value testing

I had the opportunity to run a series j value testing on my system. In hope of defining which value(s) will afford me the most optimal performance during builds. My initial j value (by default) was set at 3, which I modified to a j value of 4. The time taken for my vim build to complete at this settings, was much better than the previous build, which had a setting of j3.


                               
                               

Out of curiosity I wanted to see what the performance would be like if I increased my j value to 5. Once I changed the j value to 5, I built an rpm for vim again! Here the vim built to a bit longer to complete, and the same can be said for a j value of 6. I then concluded that the best j value settings for my machine is j4. As an added piece of feedback I was a bit surprised that the performance level for my vim build dropped, when I changed my j value to 5.

Sunday, September 19, 2010

Building packages for VIM Editor using RPM

Today the objective of my task was to build the Vim editor on my Fedora Machine. After installing all the required rpm tools, such as rpmdevtools, rpmlint, rpmbuild, rpm, and yum-utils. I Then proceeded to commence the build process with the rpm utilities.

After downloading the source file, I had to verify what the building of vim requires, to gain this information, I had to go the .spec file for vim. The vim.spec file indicated that this BuildRequires: hunspell-devel (header package). So I install the header package. However, after running rpmbuild -ba  *.spec command (as a regular user), I received an error message indicating there are additional dependencies needed to build Vim. So to solve this problem I proceeded to install all the required packages, using the yum command as root.
                                  Some required dependencies

The previous error message indicated that one of the dependencies that I needed to build was perl. Simple right just run the command yum install perl, and you're done...wrong!!! Did it. I had to pay careful attention to what the error message said the required dependency was, the perl dependency in this case is actually perl -ExtUtils-Embed (actual rendering perl-ExtUtils::Embed).
                                      Perl dependency install

It was pretty much a smooth ride to comlete the build after the previously mentioned minor hindrance. The entire build took over 1 hour to complete, although the time in the screen capture seems to dictate a different sequence of time taken for completion (ignore).
                                          Build Completion

This concludes the building of Vim Editor...to be continued!!!

Thursday, September 16, 2010

Building packages for IRSSI Relay Chat

Irssi compile and install
For this build I downloaded the tar ball file, and untarred it into my home directory, as per build requirement. Upon execution of the configure script, I encountered a few errors, as is common with some builds. The following are snippets of the program preparation for compile:

1.  checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for socket... yes
checking for inet_addr... yes
checking for socklen_t... yes
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of off_t... 8
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.7... yes
checking for GLIB - version >= 2.6.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
*** trying without -lgmodule
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.7... yes
checking for GLIB - version >= 2.6.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.

*** If you don't have GLIB, you can get it from ftp://ftp.gtk.org/pub/glib/
*** We recommend you get the latest stable GLIB 2 version.
*** Compile and install it, and make sure pkg-config finds it,
*** by adding the path where the .pc file is located to PKG_CONFIG_PATH

configure: error: GLIB is required to build irssi.
As you can see glib package stalled the configure process of the build. I proceeded to yum install the glib package, which was successfully installed. However, my second attempt at running the configure command unfortunately did not yield a positive result.  My research via the web did eventually generate the outcome I anticipated. Thanks to the information posted on the following website: http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,37/func,view/id,17120/

More snippets
config.status: creating src/perl/Makefile
config.status: creating src/perl/common/Makefile.PL
config.status: creating src/perl/irc/Makefile.PL
config.status: creating src/perl/ui/Makefile.PL
config.status: creating src/perl/textui/Makefile.PL
config.status: creating scripts/Makefile
config.status: creating scripts/examples/Makefile
config.status: creating docs/Makefile
config.status: creating docs/help/Makefile
config.status: creating docs/help/in/Makefile
config.status: creating irssi-config
config.status: creating irssi-config.h
config.status: executing depfiles commands

Building text frontend ........... : yes, using terminfo
Building irssi bot ............... : no
Building irssi proxy ............. : no
Building with module support ..... : yes
Building with Perl support ....... : no
Install prefix ................... : /usr/local

Building with IPv6 support ....... : yes
Building with SSL support ........ : no
Building with 64bit DCC support .. : yes
Building with garbage collector .. : no
If there are any problems, read the INSTALL file.

2. Here the compilation process of Irssi is completed
make[3]: Leaving directory `/home/sbr/Desktop/irssi-0.8.13/scripts'
make[2]: Leaving directory `/home/sbr/Desktop/irssi-0.8.13/scripts'
make[2]: Entering directory `/home/sbr/Desktop/irssi-0.8.13'
./irssi-version.sh . > irssi-version.h.tmp
cmp -s irssi-version.h.tmp irssi-version.h || mv irssi-version.h.tmp irssi-version.h
rm -f irssi-version.h.tmp
make[2]: Leaving directory `/home/sbr/Desktop/irssi-0.8.13'
make[1]: Leaving directory `/home/sbr/Desktop/irssi-0.8.13'

  










Conclusion
From the root environment I executed the command make install, which completed the build process. The entire build process took just over an hour.

Sunday, September 12, 2010

Nagios Software Build

Background Information

Nagios  is powerful , enterprise-class host, service, application, and unique network monitoring program.  Designed to be fast, flexible, and stable. This tool is compatible with a variety of commonly used platforms.  The content offers a brief view of the outcome from this software build. The following link will corroborate the information previously mentioned. http://sourceforge.net/projects/nagios/

Here is a brief view of the nagios directory after unpacking the package

[SBR600@localhost nagios-3.2.2]$ ls
base          contrib         LICENSE        pkginfo.in     t-tap
cgi           daemon-init.in  Makefile.in    README         update-version
Changelog     functions       make-tarball   sample-config  UPGRADING
common        html            mkpackage      subst.in       xdata
config.guess  include         module         t
config.sub    INSTALLING      nagios.spec    tap
configure     install-sh      OutputTrap.pm  THANKS
configure.in  LEGAL           p1.pl          tools

Screen capture of build completion














Additional dependencies were needed, and installed using the yum install utility, according to specifications set out in the instruction file. The build was pretty straight forward and took approximately 35 minutes to complete.

Wednesday, September 8, 2010

My First Blog Post

Brief Introduction

Hello! My name is Kerry Taylor, I am a 7th semester student on the tail end of the CTY program. I view anything to do with OpenSource as innovative, unique; as it helps to enhance the continuous evolution of cutting-edge technology in the IT industry.

IRC Forum Chat

<platform_>  there is an underscore after the name
<BoChao> yeah
<platform_> I am not sure if that is actually me very strange to say the least
<BoChao> you will probably time out
<BoChao> what you can do is right click on platform  (in irc) and ping the other account
<platform_> looks like a duplicate with
* Looking up platform user info...
-> [platform] PING
<BoChao> i think you might have another session running somewhere
<platform_> I think that might be the case but I have no clue where that might be I will shutdown my laptop.
<platform_> That is a conundrum to me lol!
<BoChao> lol
<platform_> I guess I should not worry about it. It might resolve itself when I shutdown this PC.
<platform_> We can call it a wrap until tomorrow. <BoChao> ok
<platform_> Thanks lol!
>>>This concludes my first posting.

Seneca Wiki
Fedora Wiki