schema/spacewalk/spacewalk-schema.spec | 3 ++ schema/spacewalk/spacewalk-sql | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+)
New commits: commit 6f83d5a63b1455f25a8a836be614b36ea332d2ce Author: Jan Pazdziora jpazdziora@redhat.com Date: Tue Jan 11 13:28:55 2011 +0100
Man page for spacewalk-sql.
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec index 61a235c..3de8ebb 100644 --- a/schema/spacewalk/spacewalk-schema.spec +++ b/schema/spacewalk/spacewalk-schema.spec @@ -32,6 +32,7 @@ Oracle tablespace name conversions have NOT been applied. %build make -f Makefile.schema SCHEMA=%{name} VERSION=%{version} RELEASE=%{release} pod2man spacewalk-schema-upgrade spacewalk-schema-upgrade.1 +pod2man spacewalk-sql spacewalk-sql.1
%install rm -rf $RPM_BUILD_ROOT @@ -47,6 +48,7 @@ install -m 0755 -d $RPM_BUILD_ROOT%{rhnroot}/schema-upgrade cp -r upgrade/* $RPM_BUILD_ROOT%{rhnroot}/schema-upgrade mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 cp -p spacewalk-schema-upgrade.1 $RPM_BUILD_ROOT%{_mandir}/man1 +cp -p spacewalk-sql.1 $RPM_BUILD_ROOT%{_mandir}/man1
%clean rm -rf $RPM_BUILD_ROOT @@ -59,6 +61,7 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/%{name}-upgrade %{_bindir}/spacewalk-sql %{_mandir}/man1/spacewalk-schema-upgrade* +%{_mandir}/man1/spacewalk-sql*
%changelog * Fri Jan 07 2011 Michael Mraka michael.mraka@redhat.com 1.3.9-1 diff --git a/schema/spacewalk/spacewalk-sql b/schema/spacewalk/spacewalk-sql index 297ceb5..ca634c4 100755 --- a/schema/spacewalk/spacewalk-sql +++ b/schema/spacewalk/spacewalk-sql @@ -69,3 +69,48 @@ if ($?) { } exit;
+__END__ + +=head1 NAME + +spacewalk-sql - utility for feeding SQL to Spacewalk's database + +=head1 SYNOPSIS + +B<spacewalk-sql> sql-file-to-use.sql + +=head1 DESCRIPTION + +Depending on the database backend of Spacewalk, PostgreSQL or +Oracle RDBMS, different client tools have to be used when feeding +native SQL to the databases -- B<psql> or B<sqlplus>. They have +different invocation options. + +The B<spacewalk-sql> does the right thing for both database backends. +It fetches the database backend type and the connect information from +Spacewalk config files, selects the correct command line tool, runs it +and feeds it the SQL from file specified as parameter. + +No output is printed upon successful operation. If any error is +reported, the error message and all output generated is printed on the +standard output. + +The exit value is the exit value of the B<psql> or B<sqlplus>. + +=head1 FILES + +=over 5 + +=item F</etc/rhn/rhn.conf> + +File which holds connect information for the Spacewalk database backend. + +=back + +=head1 AUTHORS + +Jan Pazdziora + +=cut + +
spacewalk-commits@lists.fedorahosted.org