I have a couple of questions regarding openssh.spec and the rpm that gets generated from it. I am using 2.3.0p1 1. Why is openssl a prereq? openssh statically links to openssl during build by default (rightfully so, you don't want your security library a shared object if possible) 2. I don't understand the following line in the spec file during the install step (it makes it not build for me): %{makeinstall} \ sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir}/ssh \ libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \ DESTDIR=/ # Hack to disable key generation The problem here is that make install will then put everything in the root directory (/usr/bin, etc.) instead of /usr/src/redhat/INSTALL/usr/bin, etc. (depends on RPM_ROOT) and thus in later stages of the RPM build, it won't find those files. Shouldn't DEST be $RPM_BUILD_ROOT and the others blank? One thing that might have affected stuff was i changed in the spec from %{makeinstall} to "make install". With rpm 3.0.3, i guess doesn't have that defined by default (i doubt this affects anything though). 3. Why is openssl-devel a BuildPreReq?
On Wed, 10 Jan 2001, Rachit Siamwalla wrote:> 1. Why is openssl a prereq? openssh statically links to openssl during > build by default (rightfully so, you don't want your security library a > shared object if possible)No, openssl is linked dynamically: $ ldd /usr/bin/ssh | grep crypto libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x4004d000)> 2. I don't understand the following line in the spec file during the > install step (it makes it not build for me): > > %{makeinstall} \ > sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir}/ssh \ > libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \ > DESTDIR=/ # Hack to disable key generation > > The problem here is that make install will then put everything in the > root directory (/usr/bin, etc.) instead of > /usr/src/redhat/INSTALL/usr/bin, etc. (depends on RPM_ROOT) and thus in > later stages of the RPM build, it won't find those files. Shouldn't DEST > be $RPM_BUILD_ROOT and the others blank? > > One thing that might have affected stuff was i changed in the spec from > %{makeinstall} to "make install". With rpm 3.0.3, i guess doesn't have > that defined by default (i doubt this affects anything though).Upgrade to RPM 3.0.5. Do you still see the problem? %{makeinstall} is crucial. It's entirely different from make install; several install directory options are passed, for example. If you replace it with something like: %makeinstall \ make \\\ prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\ exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\ bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\ sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\ sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\ datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\ includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\ libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\ libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\ localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\ sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\ mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\ infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\ install you get ~similar behaviour.> 3. Why is openssl-devel a BuildPreReq?Because openssl headers are required to build OpenSSH. -- Pekka Savola "Tell me of difficulties surmounted, Netcore Oy not those you stumble over and fall" Systems. Networks. Security. -- Robert Jordan: A Crown of Swords
On Wed, 10 Jan 2001, Rachit Siamwalla wrote:> > I have a couple of questions regarding openssh.spec and the rpm that > gets generated from it. I am using 2.3.0p1 > > 1. Why is openssl a prereq? openssh statically links to openssl during > build by default (rightfully so, you don't want your security library a > shared object if possible)OpenSSL is usually dynamically linked - I don't see why this is a problem libc is usually dynamically linked too and it is even more critical.> 2. I don't understand the following line in the spec file during the > install step (it makes it not build for me): > > %{makeinstall} \ > sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir}/ssh \ > libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \ > DESTDIR=/ # Hack to disable key generation%{makeinstall} is an RPM macro which tries to put things in the right spot by overriding prefix, etc.> One thing that might have affected stuff was i changed in the spec from > %{makeinstall} to "make install". With rpm 3.0.3, i guess doesn't have > that defined by default (i doubt this affects anything though).%{makeinstall} != make install. If you want use make install you probably want to do something like: make install \ prefix=$RPM_BUILD_ROOT%/usr \ sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir}/ssh \ libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \ DESTDIR=/ # Hack to disable key generation> 3. Why is openssl-devel a BuildPreReq?The headers are required for compilation. -d -- | ``We've all heard that a million monkeys banging on | Damien Miller - | a million typewriters will eventually reproduce the | <djm at mindrot.org> | works of Shakespeare. Now, thanks to the Internet, / | we know this is not true.'' - Robert Wilensky UCB / http://www.mindrot.org