Monday, January 24, 2011

My First RPM Build

Hello All,

Finally I have reinstalled my system resolving the many issues that i had with compilers and whatnot due to my escapades with ATI, I finally was able to build my macchanger and httptunnel. Please join me now as i take you through my adventure of my first RPM builds :). The first packaged i built was http tunnel, i created the default spec file and filled in all required fields for my package. It is a simple app so the build went very smooth, aside from one error which i had after executing rpmlint on the package:

rpmlint ../RPMS/x86_64/httptunnel-3.0.5-1.fc14.x86_64.rpm
httptunnel.x86_64: W: incoherent-version-in-changelog [3.0.5-1.fc14] ['3.0.5-1.fc14', '3.0.5-1']
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

No matter what combination i seemed to try with the version in the changelog i could not seem to get a correct one, despite all suggestions from IRC and Google :P. Rest assure i have not given up and will post my solution as soon as it is found.

So httptunnel went relatively well, so how hard can macchanger be? Well i jinxed myself with that question.

Macchanger required some extra research and tweaking of the spec file, to resolve issues with info files, and man files. Not to worry a quick Google of the following errors actually brought me to the CDOT feed where a fellow member of SBR600 was having the same issue, I followed the steps they had taken and my issue was resolved :P

RPM build errors:
    Installed (but unpackaged) file(s) found:
These errors were resolved by adding the above full path files to the %docs section of my spec files and the package built successfully but soon i ran into the follow with rpmlint
rpmlint ../RPMS/x86_64/macchanger-1.5.0-1.fc14.x86_64.rpm
macchanger.x86_64: W: no-version-in-last-changelog
macchanger.x86_64: E: info-files-without-install-info-postin /usr/share/info/
macchanger.x86_64: E: info-files-without-install-info-postun /usr/share/info/
macchanger.x86_64: E: info-dir-file /usr/share/info/dir
macchanger.x86_64: E: info-files-without-install-info-postin /usr/share/info/dir
macchanger.x86_64: E: info-files-without-install-info-postun /usr/share/info/dir
1 packages and 0 specfiles checked; 5 errors, 1 warnings.  

These errors were repaired by following these steps:
1. Add the following under the Requires section of the spec file
Requires(post): info
Requires(preun): info
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :

if [ $1 = 0 ] ; then
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
*"These two scriptlets tell install-info to add entries for the info pages
to the main index file on installation and remove them at erase time.  
The "|| :" in this case prevents failures that would typically affect 
systems that have been configured not to install any %doc files, or have
read-only mounted, %_netsharedpath /usr/share." Source

2. Add the following under %install

rm %{buildroot}/%{_datadir}/info/dir

*This removes dir file after installation

By Adding these two lines my errors were all resolved minus the One warning which i am still chipping away at.

Stay Tuned for my Koji Experiences

Sunday, January 16, 2011

Eventful Weekend, with ATI and Fedora 14 (A Short Story)

Hello All,
I know it has been a bit since my last blog post, and i should have by now updated with my packaging lab, but something occurred this weekend with my install that cause me to take some time out of experimenting with RPM packaging and Recover my Fedora 14 system. Though the mistakes i made may seem quite silly, and the steps i took to recover may seem quite simple, I often think back to when I had first entered this wonderful world of open-source and Linux OS'es; the simplest of tasks seemed very intimidating and looking back now i chuckle at myself and am surprised at how far I have come, but am also aware of how far i still have to go. But i digress, the point i am essentially trying to make is I still feel the need to post the steps i took to fix what i broke, because I know that there are others out their who are starting off just as i did, looking for a simple walk through or detailed explanation for a specific fix, to let them get their feet wet, and learn from their mistakes...though they can always happen.

As most open-source users may know, ATI support hasn't always been the best, but development for it has come quite far in the last few years providing better support for drivers be it open-source or propriety. In the previous version of fedora, the ATI drivers functioned quite well both the opensource kmod and AMD's own. With the update of Laughlin, ATI and kmod drivers ceased to work, partially and in my case fully. I attempted to install the proprietor drivers for my HD6370 card, which from what i could tell utilized the 5000M chipset, though lspci could have been mistaken, regardless i obtained the drivers from AMD's page here.

The install is relatively straight forward a simple sh, the drivers appeared to compile and install just fine, even the catalyst control center appeared in my preferences menu; after a restart my smile turned to a frown as the drivers seemed to not have worked at all, and to boot catalyst reported no hardware present, after viewing this error i did what everyone does, opened firefox and began to google. I found that many people were having this issue with ATI and Fedora 14, some had reported the kmod drivers working, so i gave them a shot. I first uninstalled AMD's drivers and ran a yum install kmod-catalyst which installed the kmod ati drivers and the dependent xorg drivers and libraries, after the install i rebooted.


After my system restarted OH NO i received a prompt a scary prompt, and intimidating prompt but a fixable one it was not a menu it was grub>. I promptly tossed in my fedora 14 install disc and booted up a recovery terminal from it, after logging into my install i noticed my grub.conf was wiped (let this be a lesson in frequent critical config backups). OH NO i thought, well not to worry; i remembered a trick, one simpler than manually re-editing my grub.conf. I started an upgrade install from the disc and had a new grub.conf generated, bless the developers who implemented this godsend of a feature so novice worshipers of the great penguin could have an easy way out :P. After booting up, the drivers ceased to function and i was presented with a flgrx64 kernel module not found error.

"What did you do?" you ask, well I yum removed kmod-catalyst which did indeed remove the kmod drivers. Upon restart once again I still had no GUI, hmmm it seemed any and all graphic drivers had been removed, now i am somewhat of a lazy person and if it's possible I will take the easy way out, then again who wouldn't? At this point i was done tinkering I'd broken enough so i issued a yum reinstall xorg* and to my amazement the godsend that is yum reinstalled my xorg including the native nouveau and ati drivers which allowed my system to function, i rebooted and am now writing this blog. Yes a long story, hopefully not boring but i felt the need to tell my open-source eventful weekend to the community, not only to explain that I now know I must wait for a fix to ATI drivers for laughlin, but just to share my various experiences in Open-source, like i have stated before through good and bad successes and failures.

Thanks for reading, and stay tuned for my next post on my experience with my introduction to rpm that I have a functioning system i can get to work :P

Thursday, January 13, 2011



SHARPY here a.k.a Anthony Boccia. I am currently a student at seneca@york. I enjoy the admin side of fedora more since i am not the greatest at programming, all in all i find it to be one of the most fun, interesting, and well developed distro's. I have a few machines which i tinker with from time to time, and plan to post my experiences here to share with the community. Aside from my Tech life, i enjoy gaming, paintball, and sleep :P. Stay tuned and I hope you enjoy.

My Fedora Wiki Page

My CDOT wiki

Seneca learnID: aeboccia


<SHARPY> getting this output when attempting to run configure on macchanger: configure: error: C compiler cannot create executables
<billings> you probably need a C compiler.
<SHARPY> I have one gcc and g++ installed not sure, if its a config issue
* jsmith is now known as jsmith-busy
<billings> do yourself a favour and just install the development-tools group
<SHARPY> i have that as well
<billings> yum groupinstall development-tools?
<SHARPY> yep
<billings> well
<billings> then the next thing I'd suggest is that you fpaste the config.log
<SHARPY> will do
<billings> 'fpaste config.log' should work
* kc8hfi (~kc8hfi@ has joined #fedora
<CosmicDJ> SHARPY: /tmp mounted noexec?
<mosno> nice, epel has fpaste
<billings> probably the best way to diagnose it is to look at the config.log in the same directory as the autoconf stuff
<SHARPY> im a noob, and did not fully understand what i was looking for
<billings> hah, it's /usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64/crt1.o: file not recognized: File truncated
<SHARPY> well then....
* fenrus02 directs billings  to run:  su -c 'yum install @development-tools @fedora-packager'
<billings> something odd is going on here
<billings> not me!
<fenrus02> billings, 'rpm -V' your way to finding out which packages are munged?
<jwildeboer> spot: error console says Warning: WebGL: Can't get a usable WebGL context
<jwildeboer> Source File:
<DiscordianUK> Uggh why are all these people asking questions about compiling stuff
<billings> because some people actually compile code in fedora?
* DiscordianUK notes this is Fedora 13 and 14 end user support
* giarc (~cwt@fedora/giarc) has joined #fedora
<billings> yeah, well, in this case, I think there's something wrong witht he packages
<SHARPY> I shall direct my question elsewhere then, I appreciate the assitance billings, i'll look further into the packages. Thank You.
<DiscordianUK> billings : as do I but I don't bother here with questions I ask where I got the code from
* carl- has quit (Remote host closed the connection)
* rws (~rws@nat/ti/x-cjkohtspafczhgww) has joined #fedora
<billings> SHARPY: I *suspect* that you're going to need to look into why it's saying "crt1.o: file not recognized: File truncated"

Wednesday, January 12, 2011

Compiling GNU goodies (macchanger and httptunnel)

Hello fellow OpenSource Guru's and Sheru's

Today's post will be outlining a few vanilla compiles of GNU apps i preformed and the steps i took to accomplish them; yes it may seem like simple stuff but it's always good to practice practice practice. Here we go.

1) I started off by first visiting the GNU software collection, to read up on some interesting apps and decide which to compile. The two which i decided on were httptunnel which is a handy simple app which allows for tunneling of data through a bidirectional virtual data connection disguised in HTTP requests. The second you are wondering, yes i like to try and remain as anonymous as possible on networks :P.

2) I acquired the tarballs from their developer's site which i found through the GNU page, the following are the commands taken for each compile.

[SHARPY@localhost tarballs]$ tar xzfv macchanger-1.5.0.tar.gz
real    0m0.016s
user    0m0.010s
sys    0m0.009s
[SHARPY@localhost tarballs]$ cd macchanger-1.5.0
[SHARPY@localhost macchanger-1.5.0]$ ./configure
real    0m2.436s
user    0m0.373s
sys    0m0.839s

[SHARPY@localhost macchanger-1.5.0]$ make
real    0m0.367s
user    0m0.238s
sys    0m0.112s

I attempted to run the compiled binary from then src/ dir where it compiled to, however i received this error:

[SHARPY@localhost src]$ ./macchanger
ERROR: Can't read MAC list file "/usr/local/share/macchanger/OUI.list", It looks like a bad installation
ERROR: Can't read MAC list file "/usr/local/share/macchanger/wireless.list", It looks like a bad installation

As a fix i switched to root and ran make install, as the install creates two files which are required for the application to function.

[SHARPY@localhost macchanger-1.5.0]$ su
[root@localhost macchanger-1.5.0]$ make install
real    0m0.440s
user    0m0.263s
sys    0m0.152s

The app then ran just fine:

[SHARPY@localhost macchanger-1.5.0]$ macchanger
GNU MAC Changer
Usage: macchanger [options] device

Try `macchanger --help' for more options.

Next I set out to compile httptunnel

[SHARPY@localhost tarballs]$ tar xzfv httptunnel-3.0.5.tar.gz
real    0m0.035s
user    0m0.024s
sys    0m0.018s
[SHARPY@localhost tarballs]$ cd httptunnel-3.0.5
[SHARPY@localhost httptunnel-3.0.5]$ ./configure
real    0m2.014s
user    0m0.428s
sys    0m0.443s
[SHARPY@localhost httptunnel-3.0.5]$ make
real    0m1.155s
user    0m0.850s
sys    0m0.275s
[SHARPY@localhost httptunnel-3.0.5]$ ./htc
./htc: the destination of the tunnel must be specified.
./htc: try './htc --help' for help.

The Binary compiled within the directory and i was able to execute and use it without installing it.

All in all it took about 5 minutes total from download to working binary, a fast fun and simple experience.

That concludes my Vanilla compiles, See you next time.