Package deployments

I have a task to formalize process of our package deployments. We need to create a sprm containing libcurl and a corresponding rpm of srpm. I found that this site has required downloadable packages - Index of /download and should be build for 32 bit architecture applications. Since I am new to this kind of approach I am not sure what next I have to do. Any help would be highly appreciated.

tell us your current env, such as the OS (Linux?) give us the output by below command.

uname -a

First, if possible use a source RPM (srpm) provided by your distribution, if possible. You can even use that if you need a newer version not yet available through your repositories.

To create a RPM from a SRPM, use the rpmbuild tool. What this, basically, does is automate the whole configure-make-(make test)-make install sequence, and packs it into an archive, plus some installation/configuration scripts.

Best would be to install a SRPM (rpm -i file.rpm), and check the packaged specification file in /usr/src/packages/SPECS/.

Yes I am trying to install on Linux RHEL 5.4 OS.

When I issue the command : rpm -i file.rpm I get the following error: error: cannot write to %sourcedir /usr/src/redhat/SOURCES. When I checked the dir /usr/src/redhat/SOURCES - I found that it is owned by ROOT. So how can I install using my id

If you can, change the permissions of the directories below /usr/src/redhat using chmod a+t. That will allow any user to create a file there.

$ pwd
/usr/src/redhat

$ ls -ld .
drwxr-xr-x 7 root root 4096 Jan 27 11:36 .
$

$ chmod -R a+t .
chmod: changing permissions of `.': Operation not permitted
chmod: changing permissions of `./SRPMS': Operation not permitted
chmod: changing permissions of `./SPECS': Operation not permitted
chmod: changing permissions of `./RPMS': Operation not permitted
chmod: changing permissions of `./RPMS/noarch': Operation not permitted
chmod: changing permissions of `./RPMS/x86_64': Operation not permitted
chmod: changing permissions of `./BUILD': Operation not permitted
chmod: changing permissions of `./SOURCES': Operation not permitted
$

It does not allows me todo so.

You do know that only the owner of a directory may change the permissions? So you'd have to do it as root, or ask your admin to do so.

Thanks I will do that. But actually I want to know what I have to do next. My requirement is:

an srpm containing libcurl
an rpm built from the corresponding srpm
developmental rpm from the same srpm for build purposes (developmental rpm has include headers and or .a's)
the package should be self contained. (should not download sources when you are rebuilding the rpm)

I have downloaded curl-devel-7.19.4.pp.i386.rpm from Index of /download. I would approach admin to deploy the same.

The package needs to default get install location /opt/pp and build using openssl @ /opt/pp for 32 bit arch.

I am quiet unsure how to configure those values and what is openssl.

Please help

OK, first of all, you need the curl-7.19.4-1.src.rpm as that's the one containing the sources. The one you downloaded contains the already compiled version.

Second, before you start breaking systems with malformed packages, get comfortable with the build-process of the software first. Get a feel for the various configure switches, the build process itself, ...
Then, and only then, apply that knowledge to the spec file for rpmbuild.

OR you can use the source RPM from CentOS (linky), a 100% RHEL compatible distribution.