Re: building an RPM of the rssh source.
Brought to you by:
xystrus
From: Chris B. <chr...@gm...> - 2012-12-04 18:23:47
|
All, having been suitably and correctly chastised off list for the poor practice I displayed in my previous post, Here is an improved approach. Approach run on CENTOS 6.3 as a NON ROOT user. rpmbuild will not build directly from the SPEC file included in the tar.gz file :-( The issue appears to be wholly limited to the handling of the RSSH.conf file. The spec file needs to be patched to work correctly, the below is the recommended patch: $ diff -u BUILD/rssh-2.3.4/rssh.spec SPECS/rssh.spec --- BUILD/rssh-2.3.4/rssh.spec 2012-12-03 18:08:34.245272000 -0500 +++ SPECS/rssh.spec 2012-12-03 18:08:22.560241000 -0500 @@ -32,11 +32,13 @@ %install %{__rm} -rf %{buildroot} %makeinstall +%{__mv} %{buildroot}/%{_sysconfdir}/rssh.conf.default %{buildroot}/%{_sysconfdir}/rssh.conf %files %defattr(644, root, root, 0755) %doc AUTHORS ChangeLog CHROOT COPYING README SECURITY TODO conf_convert.sh mkchroot.sh %doc %{_mandir}/man?/* +%doc rssh.conf.default %config(noreplace) %{_sysconfdir}/rssh.conf %attr(755, root, root) %{_bindir}/rssh %attr(4755, root, root) %{_libexecdir}/rssh_chroot_helper either replace the spec file within the tar.gz file with the patched version and run rpmbuild -ta (or tb) <updated tar.gz file> or place an unmodified version of the tar.gz file within ~/rpmbuild/SOURCES and run rpmbuild -bb (or ba if you want an SRPM) <patched spec file> Commentary on issues with my previous instructions: (Thanks to Nico Kade-Garcia) Not good. This leaves a "noreplace" configuration file of rssh.conf.default, which is completely useless. This change also stores a copy of the default rssh.conf file in /usr/share/doc, which is reasonable. Regards Chris |