LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to configure a source package before creating an rpm (http://www.linuxquestions.org/questions/linux-software-2/how-to-configure-a-source-package-before-creating-an-rpm-4175413720/)

breds 06-27-2012 04:17 PM

How to configure a source package before creating an rpm
 
Hi everyone,

I am trying to configure a pam_pkcs11 source package without NSS on RHEL 5.4. I have unpacked the source rpm and I have all the necessary directories in /usr/src/redhat/. What I have been doing is

cd BUILD/pam_pkcs11-0.6.2/
./configure --without-nss

This works fine but when I try to create the rpm with the SPECS/ file

rpmbuild -bb pam_pkcs11.spec

it adds NSS back to the package. I have researched it for a couple days and am missing the conection. All input is appreciated.

Thanks,

breds

unSpawn 06-27-2012 05:20 PM

Quote:

Originally Posted by breds (Post 4713583)
I am trying to configure a pam_pkcs11 source package without NSS on RHEL 5.4. I have unpacked the source rpm and

Which source RPM?


Quote:

Originally Posted by breds (Post 4713583)
I have all the necessary directories in /usr/src/redhat/.

You should not need to be root to build packages. To minimize risks use an unprivileged account instead.


Quote:

Originally Posted by breds (Post 4713583)
when I try to create the rpm with the SPECS/ file
rpmbuild -bb pam_pkcs11.spec
it adds NSS back to the package.

Running configure only configures the source for building and doesn't link and compile anything. If you want to assess the build process continue by running 'make 2>&1 | tee /path/to/make.log;'. (Running 'tee' here is for convenience as you don't have to rely on a humongous scroll buffer or re-run make to trace back and read errors.) If that runs OK then add the "--without-nss" flag to the %configure section in pam_pkcs11.spec, change the "Vendor" (and packager) tag, increment the package release number and update the %changelog section to reflect your changes. (Wrt changes read them as AND, not OR.) When you're ready to build the package run 'rpmbuild -bb pam_pkcs11.spec 2>&1 | tee pam_pkcs11.spec.log' and please attach the plain text file "pam_pkcs11.spec.log" for inspection if it still picks up NSS as dependency.

breds 06-28-2012 12:41 PM

I am using the pam_pkcs11-0.6.2-11.1.el6.src.rpm source package. I changed the pam_pkcs11.spec file to configure --without-nss. I also changed the release number and the package built a new rpm without a problem. I installed the package and when I run "pkcs11_inspect debug", the pkcs11_lib.c file still initializes NSS because of the "#HAVE NSS" directive. Any ideas?

Thanks,

breds

unSpawn 06-28-2012 02:44 PM

Quote:

Originally Posted by breds (Post 4714268)
pkcs11_lib.c file still initializes NSS because of the "#HAVE NSS" directive. Any ideas?

If that's all it takes maybe run %configure and patch the directive before you run 'make'?


All times are GMT -5. The time now is 07:14 AM.