New Client Service Portal

We are pleased to announce the launch of our new Client Support Portal!

This free Portal enhances your support experience with Pantek with several features:

– Open new Expert Linux Technical Support Tickets online in minutes
– View past Technical Support Tickets from 2012 until the present
– Check account Time Balance and purchase additional Support Time
– Add and manage authorized account contacts who can open Tickets
– View past invoices, update credit card and all billing information

If you were one of our beta testers, you already have access and can continue using all features. If not, a new account login & password will be emailed to you this week.

You can access the Portal directly here: https://portal.pantek.com/

We hope you find this free Portal useful. Thank you for choosing Pantek!

Pantek Logo

Building Your Own RPM

Knowing how to build a RPM package can be useful in a number of situations. Maybe there is an important bug fix you need that will not make it into the official repositories for some time. Or maybe you want to apply your own custom patch. Or maybe you want to rebuild the package with the latest version of the software. Compiling directly from source can leave a messy system or cause conflicts with other distro provided packages.

Depending on how complex the package is, it may be a good idea to set up a separate system specifically for building packages and possibly hosting your own repositories for easier deployment of custom packages. Building packages can cause a lot of build dependencies to be installed which can clutter up the system.

Lets explore three examples: Making a package change, applying a custom patch, and packaging a new software version.

Making a Package Change

To begin with you will need some RPM tools installed.

yum install rpm-build

You never want to build rpms with the root user for security reasons, so use a regular user for building rpms.

For this example we will be using the hello package. We can use wget to get the srpm.

wget http://pkgs.repoforge.org/hello/hello-2.3-1.rf.src.rpm

Unpack the srpm.

rpm -i hello-2.3-1.rf.src.rpm

This will create a directory called rpmbuild with the contents of the srpm. For this example we will be making a simple change. We will be fixing some bad grammar in the description. The RPM .spec file contains information about the RPM and the build commands to build the package. Open the hello.spec file with your preferred editor.

vim rpmbuild/SPECS/hello.spec

First we need to bump the release number from 1%{?dist} to 2%{?dist}. Find the section called %description and we are going to delete the line that says “GNU hello supports many a lot native languages.”.

At the bottom we need to add this change to the changelog section.

%changelog
* Tue Feb 11 2014 fname lname <email@domain.tld> – 2.3-2
– Fixed bad grammar in the description

* Wed Aug 20 2008 Dag Wieers <dag@wieers.com> – 2.3-1 – 7981/dag
– Initial package.

Now we are ready to build the package. Run:

rpmbuild -ba rpmbuild/SPECS/hello.spec

-ba will make rpmbuild build a binary package as well as an srpm. Depending on your installation, you may get an error about gcc missing. You will need to install gcc.

yum install gcc

Depending on the complexity of the package you may need to repeat this step for more missing dependencies.

Rerun the rpmbuild command from above. The program should compile fine but it will fail at creating the RPM because of unpackaged files. We need to have these files included in the rpm. Open hello.spec again and find the %files section. Add the following to the end of that section.

%{_infodir}/dir

Rerun the rpmbuild command again and it should complete successfully. You will find the resulting binary RPM in rpmbuild/RPMS/i386 or rpmbuild/RPMS/x86_64 depending on your architecture. You can then use yum or RPM to install it.

yum install rpmbuild/RPMS/i386/hello-2.3-2.el6.i386.rpm
rpm -ivh rpmbuild/RPMS/i386/hello-2.3-2.el6.i386.rpm

Adding a Custom Patch

Let’s say you have a custom patch you want to apply. This assumes you already have the patch. Near the top of the spec file, add a line that says:

Patch0: hello-2.3-earth.patch
You can add more patches by listing them. Patch1: Patch2: Patch3: etc. Under the %setup section you will add the patch.

%patch0 -p1 -b .earth

See the patch man page for information on the -p option which specifies how deep to strip the prefix.

Now place the patch in rpmbuild/SOURCES. When you run rpmbuild it will apply the patch when it builds. It is best practice to apply modifications at build time through a patch than to modify the upstream source directly.

Packaging a New Software Version

If you want to rebuild a package with the latest version of the software, download the latest source archive and place it in rpmbuild/SOURCE/. Edit the spec file to update the version and release information. Follow the above instructions to build the package. Sometimes with newer versions, files may have been moved or deleted. You may have to adjust the %files section of the spec file to fix any errors that occur.

Pantek has a new office!

Same great staff, same great services! Now moved into our new office.

Pantek, Inc.
4401 Rockside Road #205
Independence, Ohio 44131

1-216-344-1614 or
Toll Free:
1-877-546-8934

Fax: 1-216-524-1522
Pantek Business Hours:
9:00am to 6:00pm Eastern Time Monday- Friday.

Technical Support Services are available 24/7/365, and you can order online.

If you would like more information about any of our professional services sent to you, please fill out our online information request form, and information will be sent within a business day.