Hi, I think my problem is related to the way i make my RPMs (i'm newbie at this). Two things: 1) the generated RPMs are only 1,5 kb size. That's inpossible. 2) The rpmbuild -ba zbr.spec indeed installs the software in the building stage. That's odd, isn't it ? Following my signature is an openssl.spec file Any help would be appreciated. Warm regards, M?rio Gamito -- Summary: OpenSSL Name: openssl Version: 0.9.8b Release: 6 Source0: %{name}-%{version}.tar.gz License: GPL Source: http://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-0.9.8b.tar.gz Group: Applications/Communications %description OpenSSL provides encryption for Apache, SMTP, POP3 and IMAP. %prep %setup -q %build ./config no-idea shared make depend make %install make install echo "\n \n Let's create the CA and the key for Apache/HTTPS: \n \n" /usr/local/ssl/bin/openssl genrsa -des3 -out /usr/local/ssl/bin/ca.key 1024 /usr/local/ssl/bin/openssl req -new -x509 -days 365 -key /usr/local/ssl/bin/ca.key -out /usr/local/ssl/bin/ca.crt /usr/local/ssl/bin/openssl genrsa -des3 -out /usr/local/ssl/bin/server.key 1024 /usr/local/ssl/bin/openssl req -new -key /usr/local/ssl/bin/server.key -out /usr/local/ssl/bin/server.csr echo "\n \n Now for POP3/SSL and IMAP/SSL: \n \n" /usr/local/ssl/bin/openssl req -new -x509 -days 365 -nodes -out /usr/local/ssl/bin/imapd.pem -keyout /usr/local/ssl/bin/imapd.pem || cleanup /usr/local/ssl/bin/openssl gendh >> /usr/local/ssl/bin/imapd.pem || cleanout /usr/local/ssl/bin/openssl x509 -subject -dates -fingerprint -noout -in /usr/local/ssl/bin/imapd.pem || cleanup cp /usr/local/ssl/lib/libcrypto.so.0.9.8 /lib %changelog * Fri Feb 02 2007 M?rio Gamito <gamito at gmail.comm> 0.9.8.b-2 - fixed to prompt for the CA and the server.key for Apache and cert for POP3/IMAP * Fri Feb 02 2007 M?rio Gamito <gamito at gmail.comm> 0.9.8.b-3 - fixed to place the CA and server files in the right place * Fri Feb 02 2007 M?rio Gamito <gamito at gmail.comm> 0.9.8.b-4 - copied libcrypto.so.0.9.8 to /lib. qmail-ldap will need that later.
> 2) The rpmbuild -ba zbr.spec indeed installs the software in the > building stage. That's odd, isn't it ?You're likely not using the appropriate macros and buildroot> Following my signature is an openssl.spec fileI would REALLY recommend not updating the openssl package on centos, as pretty much the ENTIRE ditribution is built on the version we ship. Updating that may cause your applications to cease functioning.> Any help would be appreciated.1. This would be best served on the RPM irc channel, and mailing list I think. 2. Have you looked at the spec files for the source rpms in the distro to see the differences?> Summary: OpenSSL > Name: openssl > Version: 0.9.8b > Release: 6 > Source0: %{name}-%{version}.tar.gz > License: GPLYou have no build requirements, buildroot, and no proper config statement defined. The license you list for openssl is not correct, There's no files section to actually put things on your system.> Source: > http://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-0.9.8b.tar.gz > Group: Applications/Communications > %description > OpenSSL provides encryption for Apache, SMTP, POP3 and IMAP. > %prep > %setup -q > %build > ./config no-idea shared > make depend > make > %install > make installYour install section installs because you're building as root, which is a bad thing to do. So make install is droping files on your system, but the rpm itself contains no files because there's no files section.> echo "\n \n Let's create the CA and the key for Apache/HTTPS: \n \n" > > /usr/local/ssl/bin/openssl genrsa -des3 -out /usr/local/ssl/bin/ca.key 1024 > /usr/local/ssl/bin/openssl req -new -x509 -days 365 -key > /usr/local/ssl/bin/ca.key -out /usr/local/ssl/bin/ca.crt > /usr/local/ssl/bin/openssl genrsa -des3 -out > /usr/local/ssl/bin/server.key 1024 > /usr/local/ssl/bin/openssl req -new -key /usr/local/ssl/bin/server.key > -out /usr/local/ssl/bin/server.csr > > echo "\n \n Now for POP3/SSL and IMAP/SSL: \n \n" > > /usr/local/ssl/bin/openssl req -new -x509 -days 365 -nodes -out > /usr/local/ssl/bin/imapd.pem -keyout /usr/local/ssl/bin/imapd.pem || cleanup > /usr/local/ssl/bin/openssl gendh >> /usr/local/ssl/bin/imapd.pem || cleanout > /usr/local/ssl/bin/openssl x509 -subject -dates -fingerprint -noout -in > /usr/local/ssl/bin/imapd.pem || cleanup > > cp /usr/local/ssl/lib/libcrypto.so.0.9.8 /lib >Everythign here is using hard-coded paths, and not the appropriate macros. I would really recommend reading through the fedora packaging guidlines and checking out the maximum rpm guides. -- During times of universal deceit, telling the truth becomes a revolutionary act. George Orwell
On Sat, 2007-03-03 at 15:52 +0000, M?rio Gamito wrote:> Hi, > > I think my problem is related to the way i make my RPMs (i'm newbie at > this). > > Two things: > > 1) the generated RPMs are only 1,5 kb size. That's inpossible. > > 2) The rpmbuild -ba zbr.spec indeed installs the software in the > building stage. That's odd, isn't it ? > > Following my signature is an openssl.spec file > > Any help would be appreciated.Good advice from Jim Perrin. Easy to break your system by replacing core packages. Have you started with some basics like reading the docs at http://www.rpm.org/ ? Try to google on things like rpmbuild rpm howto rpm tutorial which will yield many helpful getting-started pages. There is a section near the top of http://wiki.centos.org/HowTos/Custom_Kernel about setting up a non-root build environment on CentOS. If you just want to practice building/installing RPMS start with packages that are not part of CentOS. Study the spec files from some CentOS src.rpm files to see good examples of how it should be done. Once you get the build environment set up, as your normal non-root user do: $ rpm -i /path/to/rpm/foo-1.2.3-el4.src.rpm This will install everything under the user's directory, usually in ~/rpmbuild/... Good luck learning rpm packaging. Phil