Skip navigation

Monthly Archives: January 2011

I built RPM’s for the this course where macchanger and wget. The RPM’s are for 64bit machines and where not built or tested on 32 bit machines. To build the sources as a regular user I needed to add myself to the /etc/sudoers file. This was done by switching to root, running the visudo command and adding the following line to the end of the file.

stephen ALL=(ALL) ALL

After adding the line I then saved the file and exited the root shell.

 

The next step was to create the build environment using the rpmdev-setuptree command. Since I knew which programs I wanted to build into RPM’s I moved to the directory ~/rpmbuild/SOURCES and then downloaded the sources file into there with the commands below.

wget ftp://ftp.gnu.org/gnu/macchanger/macchanger-1.5.0.tar.gz

wget http://ftp.gnu.org/gnu/wget/wget-1.9.tar.gz

 

I then moved into the SPECS directory and created the spec file for each application. The macchanger spec file was pretty straight forward to build with a few simply fixed errors during the rpmbuild stage and the rpmlint stage.

Build Errors encountered during rpmbuild -ba macchanger.spec

Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/stephen/rpmbuild/BUILDROOT/macchanger-1.5.0-1.fc13.x86_64

error: Installed (but unpackaged) file(s) found:

/usr/bin/macchanger

/usr/share/info/macchanger.info.gz

/usr/share/macchanger/OUI.list

/usr/share/macchanger/wireless.list

/usr/share/man/man1/macchanger.1.gz

 

Fixed error by adding under the %file directive

%{_infodir}/*

%{_bindir}/macchanger

%{_mandir}/man1/macchanger*

%{_bindir}/../share/macchanger/*

 

Errors encountered with the rpmlint -i  RPMS/x86_64/macchanger-1.5.0-1.fc13.x86_64.rpm

 

macchanger.x86_64: E: no-changelogname-tag

macchanger.x86_64: E: info-files-without-install-info-postin /usr/share/info/macchanger.info.gz

macchanger.x86_64: E: info-files-without-install-info-postun /usr/share/info/macchanger.info.gz

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

————

 

The 6 errors where fixed by adding the information below  to the spec file. The first 2 line where added to the header of the spec file and the rest of the lines where added after the %install directive and these lines fixed errors 2, 3, 5, and 6

Requires(post): /sbin/install-info

Requires(preun): /sbin/install-info

 

%post

/sbin/install-info %{_infodir}/macchanger.info.gz %{_infodir}/dir || :0

 

%preun

if [ “$1” = 0 ]; then

/sbin/install-info –delete %{_infodir}/macchanger.info.gz %{_infodir}/dir || :

fi

 

Adding the following line to the end of commands under the %install directive fixed the 4th error

rm -f $RPM_BUILD_ROOT/%{_infodir}/dir

 

Adding the following lines below the %changelog section fixed the 1st error

* Sat Jan 15 2011  <sahall3@learn.senecac.on.ca> 1.5.0-1

– Initial Packaging of macchanger

 

The process was pretty much the same for the wget program as well, there were less errors during the process because I modified the wget.spec file to fix the same errors that I ran into with macchanger program before trying to build. I also used the spec file from the wget SPRM to determine what the build requires because I had not learnt about mock at the time. The only other thing that I had to do was add the line below to the spec file under the %file directive so that it could build with the language files.

 

/usr/share/locale/*/*/wget.mo

 

The RPM’s and SRPM’s are available for download from the links below.

MACCHANGER

WGET

 

Advertisements

Hello,
I am Stephen a 6th semester student i the CTY program at Seneca. I am mainly interested in security and networking, but I believe this course will be useful and an interesting learning experience.
Email: sahall3[at]learn. senecac. on .ca
IRC Nickname:  sahall3
Seneca Wiki
Fedora Wiki

IRC Chat Excerpt:
<sahall3> perfect they upgrade the wireless network in time for us to graduate.
<ThaFuzz> perfect timing, just as we finish our final semester york will be getting a subway stop and new wireless
<ctyler> I’ve wondered if all this is temporary, that the idea of the school providing wireless will be as obsolete as the fact that the school used to provide dial-up networking — I think in a few years everyone might just be on 4G (or 5G?)
<sahall3> i will believe that when it happens
<t0mmyw> just in time for next years FSOSS.  🙂
<{{localhost}}> sahall3: what did they upgraded it to? 802.11g?

Software chosen to build from source was macchanger, I had to install gcc with yum install to be able to compile macchanger