From 988f9b104087022ecf08ed881aa723fcb33a46b6 Mon Sep 17 00:00:00 2001 From: Nate Straz Date: Tue, 13 Sep 2005 19:31:26 +0000 Subject: - Split qarshd and btimed into their own package with their xinetd files. - Don't link btimec and btimed against libxml2. --- Makefile | 13 +++++++++---- qarsh.spec | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3d5d02d..ca4f0bd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ .PHONY: clean clobber uninstall CFLAGS := -Wall -g -I/usr/include/libxml2 -LOADLIBES := -lxml2 COMMON := qarsh_packet.c sockutil.c @@ -10,9 +9,9 @@ TARGETS := qarshd qarsh qacp btimed btimec all: $(TARGETS) -qarshd: qarshd.c $(COMMON) -qarsh: qarsh.c $(COMMON) -qacp: qacp.c $(COMMON) +qarshd: qarshd.c $(COMMON) -lxml2 +qarsh: qarsh.c $(COMMON) -lxml2 +qacp: qacp.c $(COMMON) -lxml2 btimed: btimed.c btimec: btimec.c btime.c @@ -20,8 +19,10 @@ install: all install -D qacp $(INSTROOT)/usr/bin/qacp install -D qarsh $(INSTROOT)/usr/bin/qarsh install -D qarshd $(INSTROOT)/usr/sbin/qarshd + install -D qarsh.xinetd $(INSTROOT)/etc/xinetd.d/qarsh install -D btimed $(INSTROOT)/usr/sbin/btimed install -D btimec $(INSTROOT)/usr/bin/btimec + install -D btimed.xinetd $(INSTROOT)/etc/xinetd.d/btimed clean: $(RM) $(TARGETS) @@ -31,3 +32,7 @@ qarsh.tar.bz2: qarsh.spec rpm: qarsh.tar.bz2 qarsh.spec rpmbuild -ta $< + +# Redefine the default compile rule to include target specific parts +%: %.c + $(LINK.c) $(CFLAGS_$@) $^ $(LIBS_$@) $(LOADLIBES) -o $@ diff --git a/qarsh.spec b/qarsh.spec index 9f2003c..7b05ff0 100644 --- a/qarsh.spec +++ b/qarsh.spec @@ -5,6 +5,7 @@ Release: 1 Group: QA License: GPL Buildroot: %{_tmppath}/%{name}-%{version}-root +Packager: Nathan Straz Source0: qarsh.tar.bz2 @@ -12,7 +13,23 @@ Source0: qarsh.tar.bz2 qarsh is an rsh/ssh replacement designed for a testing environment. That means no encryption and no authentication. It also means that the return code is the same as the remote process and some signals are propogated to the remote -process. +process. The qarsh package provides the client side programs for +copying files and starting remote commands. Qarsh is not fit for +interactive commands. + +%package server +Group: QA +Summary: QA Remote Shell Server +Requires: xinetd + +%description server +qarsh is an rsh/ssh replacement designed for a testing environment. That means +no encryption and no authentication. It also means that the return code is the +same as the remote process and some signals are propogated to the remote +process. The qarsh-server package provides the server for qarsh, which +allows anyone to connect to the host as any user and do any thing. + +WARNING: THIS PACKAGE PROVIDES REMOTE ROOT ACCESS WITHOUT AUTHENTICATION %prep @@ -29,15 +46,31 @@ make install INSTROOT=$RPM_BUILD_ROOT %clean [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; +%post server +/sbin/service xinetd reload > /dev/null 2>&1 || : + +%postun server +if [ $1 = 0 ]; then + /sbin/service xinetd reload > /dev/null 2>&1 || : +fi %files %defattr(-,root,root) /usr/bin/qarsh /usr/bin/qacp /usr/bin/btimec + +%files server +%defattr(-,root,root) /usr/sbin/qarshd /usr/sbin/btimed +%config /etc/xinetd.d/qarsh +%config /etc/xinetd.d/btimed %changelog +* Tue Sep 13 2005 Nathan Straz 1.0-1 +- Add xinetd files +- Split package into client and server parts + * Thu Sep 13 2005 Nathan Straz - Initial packaging -- cgit