>
> Has anyone yet seen/created RPM package for ViewVC? I am searching for Redhat
>
> I tried to create one, but it seems my rpm is not working properly. May be
> Viewvc installations script does some modifications outside installation path?
Short answer: an rpm would be unnecessary overhead IMHO and I don't see a
useful standard for install paths.
Long answer:
It's actually very easy, although you'll have to decide how automated you
want it.
Because every viewvc install is different, an RPM doesn't work well for
distributions, except to deliver files and tar balls work just fine here.
Because of the multitude of variations for the install, the path, the user,
the server, the cgi env, the repo, the cvs flavor...it'd be pointless to
write a common install script because RPMs are not interactive and rely on
logic to determine those things (which will likely be very very different
for everyone).
In my case though I like to have rpms of everything I need on my network
so after installing viewvc, I create an rpm with the specifics of MY
install, thus giving you "my" rpm wouldn't be helpful. For me, I can
rebuild my viewvc service from my kickstart files, thus the advantage of the
rpm is that it holds MY edits and automates them and I go from heater to
useful service in a few minutes when I have to migrate services or replace
hosts.
I believe there are two files that have to be edited from the default viewvc
install.
Viewvc.conf and your web server config, (in my case httpd.conf)
But if you know exactly what you want and trust your setup isn't going to
change, then you can do stuff like...
(in this example I haven't updated it to reflect the new "viewvc" name
Summary: PSI VIEWcvs
Name: psi-viewcvs
Version: 1
Release: 1
Source0: %{name}-%{version}.tar.gz
Provides: psi-viewcvs
BuildRoot: /tmp/%{name}
%description
Zac's install for viewing the CVS tree
%prep
%setup
%build
%install
if [ -f $RPM_BUILD_ROOT/etc/httpd/conf/httpd.conf ]; then
echo "ScriptAlias /cvs /usr/local/psi-viewcvs/cgi/viewcvs.cgi" >>
$RPM_BUILD_ROOT/etc/httpd/conf/httpd.conf
echo "ScriptAlias /viewcvs /usr/local/psi-viewcvs/cgi/viewcvs.cgi" >>
$RPM_BUILD_ROOT/etc/httpd/conf/httpd.conf
echo "ScriptAlias /cvsquery /usr/local/psi-viewcvs/cgi/query.cgi " >>
$RPM_BUILD_ROOT/etc/httpd/conf/httpd.conf
else
echo "no HTTPD.CONF found! ignoring append commands"
fi
install -D ./viewcvs.conf $RPM_BUILD_ROOT/usr/local/psi-viewcvs/viewcvs.conf
[...]
%files
%defattr(-,root,root)
/usr/local/psi-viewcvs/cvsdbadmin
/usr/local/psi-viewcvs/make-database
/usr/local/psi-viewcvs/loginfo-handler
/usr/local/psi-viewcvs/cgi/viewcvs.cgi
/usr/local/psi-viewcvs/cgi/query.cgi
The viewvc.conf file I deliver already has my config settings I need. The
are a hundred other ways to do the same thing. Again, it's all up to how
you want to automate it for your specific setup.
-zac
|
|