Mailinglist Archive: opensuse-buildservice (233 mails)
| < Previous | Next > |
Re: [opensuse-buildservice] Bug or unimplemented?
- From: Troy Telford <ttelford.groups@xxxxxxxxx>
- Date: Fri, 25 May 2007 09:43:56 -0600
- Message-id: <200705250943.56768.ttelford.groups@xxxxxxxxx>
Sure; the program itself is LLNL's 'pdsh' (Parallel Distributed Shell; used to
execute the same command on a range of nodes in a cluster)
The .specfile is a lightly modified version of the one LLNL provides.
I use vim's code folding feature quite a bit, so if you see comments to the
extent of #{{{ or #}}}, that's just a fold marker.
If the "%{?foo:}" syntax is implemented, I'm willing to wager that the problem
isn't with the %{?foo:} syntax, but instead with the macros between line(s)
39-46 of the attached .spec.
The check(), def(), and def_machines() macros are some of the more arcane
macros I've seen. But they help make the code in %build, as well as setting
the defaults for the various '--with' options rather clean.
On Friday 25 May 2007, you wrote:
> On Thu, May 24, 2007 at 11:29:03AM -0600, Troy Telford wrote:
> > I've got a spec file (not on build.opensuse.org, though), that has the
> > following syntax:
> >
> > %{?_with_foo:BuildRequires: foo}
> >
> > With a non-buildservice RPM build, this means that if the macro
> > '_with_foo' is defined, 'foo' is a build requirement.
> >
> > It's a useful syntax; I have to provide a source RPM that can give the
> > user customization options by re-compiling the srpm with various "--with
> > foo" options (or to negate defaults by using "--without foo".)
> >
> > What I'm seeing is the following when I try to build the package using
> > the buildservice: %{_with_foo} is set in the spec file as the default
> > (so RPM sees "BuildRequires: foo")
>
> %{?xxx: } syntax actually *is* implemented. Maybe your default
> definition of %{_with_foo} can't be parsed.
>
> Can you send me your specfile?
>
> Thanks,
> Michael.
--
Troy Telford
%define compat_rel 0
%define lnxi_rel 1
%define subrel 1
Source9999: lnxi_rpmmacros
%include %{SOURCE9999}
Name: pdsh
Version: 2.11
Release: %{lnxi_release}
Summary: Parallel remote shell program.
License: GPL
Group: System Environment/Base
Source: %{name}-%{version}.tar.bz2
Patch0: %{name}-%{version}-sshpriority.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{subrel}
BuildRequires: ncurses-devel readline-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Requires: pdsh-rcmd
#{{{ Enabling and disabling pdsh options
###############################################################################
# defaults:
# enabled: readline, rsh, ssh
# disabled: rms, mrsh, qshell, mqshell, genders, nodeattr, machines,
# nodeupdown
# To build the various module subpackages, pass --with <pkg> on
# the rpmbuild command line (if your rpm is a recent enough version)
#
# Similarly, to disable various pdsh options pass --without <pkg> on
# the rpmbuild command line.
#
# This specfile also supports passing the --with and --without through
# the environment variables PDSH_WITH_OPTIONS and PDSH_WITHOUT_OPTIONS.
# e.g. PDSH_WITH_OPTIONS="qshell genders" rpmbuild ....
#
%define _without_env ${PDSH_WITHOUT_OPTIONS}
%define _with_env ${PDSH_WITH_OPTIONS}
%define dstr "%%%%"define
%define check() echo %_%{1}_env|grep -qw %%1 && echo %dstr _%{1}_%%1 --%{1}-%%1
%{expand: %%define pdsh_with() %%((%{check with})||(%{check without}))%%{nil}}
%define def() %%{!?_%{2}_%1: %%{!?_%{3}_%1: %%global _%{2}_%1 --%{2}-%1}}
# Nice little hack.
%define def_machines() %%{!?_%{2}_%1: %%{!?_%{3}_%1: %%global _%{2}_%1 --%{2}-%1=%{_sysconfdir}/pdsh/machines}}
%{expand: %pdsh_with ssh}
%{expand: %def ssh with without}
%{expand: %pdsh_with rsh}
%{expand: %def rsh with without}
%{expand: %pdsh_with readline}
%{expand: %def readline with without}
%{expand: %pdsh_with mrsh}
%{expand: %def mrsh without with}
%{expand: %pdsh_with qshell}
%{expand: %def qshell without with}
%{expand: %pdsh_with mqshell}
%{expand: %def mqshell without with}
%{expand: %pdsh_with genders}
%{expand: %def genders with without}
%{expand: %pdsh_with nodeattr}
%{expand: %def nodeattr without with}
%{expand: %pdsh_with nodeupdown}
%{expand: %def nodeupdown without with}
%{expand: %pdsh_with dshgroups}
%{expand: %def dshgroups without with}
%{expand: %pdsh_with machines}
%{expand: %def_machines machines with without}
%{expand: %pdsh_with slurm}
%{expand: %def slurm without with}
%{expand: %pdsh_with rms}
%{expand: %def rms without with}
%{expand: %pdsh_with debug}
%{expand: %def debug without with}
#
# If "--with debug" is set compile with --enable-debug
# and try not to strip binaries.
#
# (See /usr/share/doc/rpm-*/conditionalbuilds)
#
%if %{?_with_debug:1}%{!?_with_debug:0}
%define _enable_debug --enable-debug
%define __os_install_post /usr/lib/rpm/brp-compress
%endif
%{?_with_qshell:BuildRequires: qsnetlibs}
%{?_with_mqshell:BuildRequires: qsnetlibs}
%{?_with_readline:BuildRequires: readline-devel}
%{?_with_nodeupdown:BuildRequires: whatsup}
%{?_with_genders:BuildRequires: genders > 1.0}
#}}}
#{{{Package declarations & descriptions
#{{{ Pdsh description
%description
Pdsh is a multithreaded remote shell client which executes commands
on multiple remote hosts in parallel. Pdsh can use several different
remote shell services, including standard "rsh", Kerberos IV, and ssh.
#}}}
#{{{qshd
%if %{?_with_qshell:1}%{!?_with_qshell:0}
%package qshd
Summary: Remote shell daemon for pdsh/qshell/Elan3
Group: System Environment/Base
Prereq: xinetd
%description qshd
Remote shell service for running Quadrics Elan3 jobs under pdsh.
Sets up Elan capabilities and environment variables needed by Quadrics
MPICH executables.
%endif
#}}}
#{{{mqshd
%if %{?_with_mqshell:1}%{!?_with_mqshell:0}
%package mqshd
Summary: Remote shell daemon for pdsh/mqshell/Elan3
Group: System Environment/Base
Prereq: xinetd
%description mqshd
Remote shell service for running Quadrics Elan3 jobs under pdsh with
mrsh authentication. Sets up Elan capabilities and environment variables
needed by Quadrics MPICH executables.
%endif
#}}}
#{{{ Module packages:
#{{{rcmd-rsh
%if %{?_with_rsh:1}%{!?_with_rsh:0}
%package rcmd-rsh
Summary: Provides bsd rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
%description rcmd-rsh
Pdsh module for bsd rcmd functionality. Note: This module
requires that the pdsh binary be installed setuid root.
%endif
#}}}
#{{{rcmd-ssh
%if %{?_with_ssh:1}%{!?_with_ssh:0}
%package rcmd-ssh
Summary: Provides ssh rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
%description rcmd-ssh
Pdsh module for ssh rcmd functionality.
%endif
#}}}
#{{{rcmd-qshell
%if %{?_with_qshell:1}%{!?_with_qshell:0}
%package rcmd-qshell
Summary: Provides qshell rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
Conflicts: pdsh-rcmd-mqshell
%description rcmd-qshell
Pdsh module for running QsNet MPI jobs. Note: This module
requires that the pdsh binary be installed setuid root.
%endif
#}}}
#{{{rcmd-mrsh
%if %{?_with_mrsh:1}%{!?_with_mrsh:0}
%package rcmd-mrsh
Summary: Provides mrsh rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
%description rcmd-mrsh
Pdsh module for mrsh rcmd functionality.
%endif
#}}}
#{{{rcmd-mqshell
%if %{?_with_mqshell:1}%{!?_with_mqshell:0}
%package rcmd-mqshell
Summary: Provides mqshell rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
Conflicts: pdsh-rcmd-qshell
%description rcmd-mqshell
Pdsh module for mqshell rcmd functionality.
%endif
#}}}
#{{{mod-genders
%if %{?_with_genders:1}%{!?_with_genders:0}
%package mod-genders
Summary: Provides libgenders support for pdsh.
Group: System Environment/Base
Requires: genders >= 1.1
Conflicts: pdsh-mod-nodeattr
Conflicts: pdsh-mod-machines
%description mod-genders
Pdsh module for libgenders functionality.
%endif
#}}}
#{{{mod-nodeattr
%if %{?_with_nodeattr:1}%{!?_with_nodeattr:0}
%package mod-nodeattr
Summary: Provides genders support for pdsh using the nodeattr program.
Group: System Environment/Base
Requires: genders
Conflicts: pdsh-mod-genders
Conflicts: pdsh-mod-machines
%description mod-nodeattr
Pdsh module for genders functionality using the nodeattr program.
%endif
#}}}
#{{{mod-nodeupdown
%if %{?_with_nodeupdown:1}%{!?_with_nodeupdown:0}
%package mod-nodeupdown
Summary: Provides libnodeupdown support for pdsh.
Group: System Environment/Base
Requires: whatsup
%description mod-nodeupdown
Pdsh module providing -v functionality using libnodeupdown.
%endif
#}}}
#{{{mod-rms
%if %{?_with_rms:1}%{!?_with_rms:0}
%package mod-rms
Summary: Provides RMS support for pdsh.
Group: System Environment/Base
Requires: qsrmslibs
%description mod-rms
Pdsh module providing support for gathering the list of target nodes
from an allocated RMS resource.
%endif
#}}}
#{{{mod-machines
%if %{?_with_machines:1}%{!?_with_machines:0}
%package mod-machines
Summary: Pdsh module for gathering list of target nodes from a machines file.
Group: System Environment/Base
Conflicts: pdsh-mod-genders
Conflicts: pdsh-mod-nodeattr
%description mod-machines
Pdsh module for gathering list of all target nodes from a machines file.
%endif
#}}}
#{{{mod-dhsgroup
%if %{?_with_dshgroups:1}%{!?_with_dshgroups:0}
%package mod-dshgroup
Summary: Provides dsh-style group file support for pdsh.
Group: System Environment/Base
Requires: whatsup
%description mod-dshgroup
Pdsh module providing dsh (Dancer's shell) style "group" file support.
Provides -g groupname and -X groupname options to pdsh.
%endif
#}}}
#{{{mod-slurm
%if %{?_with_slurm:1}%{!?_with_slurm:0}
%package mod-slurm
Summary: Provides support for running pdsh under SLURM allocations.
Group: System Environment/Base
Requires: slurm
%description mod-slurm
Pdsh module providing support for gathering the list of target nodes
from an allocated SLURM job.
%endif
#}}}
#}}}
#}}}
%prep
%setup -q
%patch0 -p1
%build
#{{{configure
%configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \
%{?_enable_debug} \
%{?_with_rsh} \
%{?_without_rsh} \
%{?_with_ssh} \
%{?_without_ssh} \
%{?_with_qshell} \
%{?_without_qshell} \
%{?_with_readline} \
%{?_without_readline} \
%{?_with_machines} \
%{?_without_machines} \
%{?_with_genders} \
%{?_without_genders} \
%{?_with_rms} \
%{?_without_rms} \
%{?_with_nodeupdown} \
%{?_without_nodeupdown} \
%{?_with_nodeattr} \
%{?_without_nodeattr} \
%{?_with_mrsh} \
%{?_without_mrsh} \
%{?_with_mqshell} \
%{?_without_mqshell} \
%{?_with_slurm} \
%{?_without_slurm} \
%{?_with_dshgroups} \
%{?_without_dshgroups}
#}}}
#{{{Multi-job make
if [ "$SMP" != "" ] ; then
(make "MAKE=make -k -j $SMP"; exit 0)
make
else
make
fi
#}}}
%install
#{{{install
rm -rf %{buildroot}
mkdir -p %{buildroot}
DESTDIR="%{buildroot}" make install
if [ -x %{buildroot}/%{_sbindir}/in.qshd ]; then
install -D -m644 etc/qshell.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/qshell
fi
if [ -x %{buildroot}/%{_sbindir}/in.mqshd ]; then
install -D -m644 etc/mqshell.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/mqshell
fi
mkdir -p %{buildroot}%{_sysconfdir}/pdsh
touch %{buildroot}%{_sysconfdir}/pdsh/machines
#}}}
%clean
rm -rf "%{buildroot}"
#{{{Files
%files
%defattr(-,root,root)
%doc README ChangeLog NEWS DISCLAIMER README.KRB4 README.modules README.QsNet
%attr(755, root, root) %{_bindir}/pdsh
%attr(755, root, root) %{_bindir}/pdcp
%{_bindir}/dshbak
%dir %{_sysconfdir}/pdsh
%dir %{_libdir}/pdsh
%config(noreplace) %{_sysconfdir}/pdsh/machines
%{_mandir}/man1/*
#{{{rcmd-rsh
%if %{?_with_rsh:1}%{!?_with_rsh:0}
%files rcmd-rsh
%defattr(-,root,root)
%{_libdir}/pdsh/xrcmd.*
%endif
#}}}
#{{{rcmd-ssh
%if %{?_with_ssh:1}%{!?_with_ssh:0}
%files rcmd-ssh
%defattr(-,root,root)
%{_libdir}/pdsh/sshcmd.*
%endif
#}}}
#{{{rcmd-qshell
%if %{?_with_qshell:1}%{!?_with_qshell:0}
%files rcmd-qshell
%defattr(-,root,root)
%{_libdir}/pdsh/qcmd.*
%endif
#}}}
#{{{rcmd-mrsh
%if %{?_with_mrsh:1}%{!?_with_mrsh:0}
%files rcmd-mrsh
%defattr(-,root,root)
%{_libdir}/pdsh/mcmd.*
%endif
#}}}
#{{{rcmd-mqshell
%if %{?_with_mqshell:1}%{!?_with_mqshell:0}
%files rcmd-mqshell
%defattr(-,root,root)
%{_libdir}/pdsh/mqcmd.*
%endif
#}}}
#{{{mod-genders
%if %{?_with_genders:1}%{!?_with_genders:0}
%files mod-genders
%defattr(-,root,root)
%{_libdir}/pdsh/genders.*
%endif
#}}}
#{{{mod-nodeattr
%if %{?_with_nodeattr:1}%{!?_with_nodeattr:0}
%files mod-nodeattr
%defattr(-,root,root)
%{_libdir}/pdsh/nodeattr.*
%endif
#}}}
#{{{mod-nodeupdown
%if %{?_with_nodeupdown:1}%{!?_with_nodeupdown:0}
%files mod-nodeupdown
%defattr(-,root,root)
%{_libdir}/pdsh/nodeupdown.*
%endif
#}}}
#{{{mod-rms
%if %{?_with_rms:1}%{!?_with_rms:0}
%files mod-rms
%defattr(-,root,root)
%{_libdir}/pdsh/rms.*
%endif
#}}}
#{{{mod-machines
%if %{?_with_machines:1}%{!?_with_machines:0}
%files mod-machines
%defattr(-,root,root)
%{_libdir}/pdsh/machines.*
%endif
#}}}
#{{{mod-dshgroup
%if %{?_with_dshgroups:1}%{!?_with_dshgroups:0}
%files mod-dshgroup
%defattr(-,root,root)
%{_libdir}/pdsh/dshgroup.*
%endif
#}}}
#{{{mod-slurm
%if %{?_with_slurm:1}%{!?_with_slurm:0}
%files mod-slurm
%defattr(-,root,root)
%{_libdir}/pdsh/slurm.*
%endif
#}}}
#{{{qshd
%if %{?_with_qshell:1}%{!?_with_qshell:0}
%files qshd
%defattr(-,root,root)
%{_sbindir}/in.qshd
%{_sysconfdir}/xinetd.d/qshell
%post qshd
if ! grep "^qshell" %{_sysconfdir}/services >/dev/null; then
echo "qshell 523/tcp # pdsh/qshell/elan3" >>%{_sysconfdir}/services
fi
%{_sysconfdir}/init.d/xinetd reload
%endif
#}}}
#{{{mqshd
%if %{?_with_mqshell:1}%{!?_with_mqshell:0}
%files mqshd
%defattr(-,root,root)
%{_sbindir}/in.mqshd
%{_sysconfdir}/xinetd.d/mqshell
%post mqshd
if ! grep "^mqshell" %{_sysconfdir}/services >/dev/null; then
echo "mqshell 21234/tcp # pdsh/mqshell/elan3" >>%{_sysconfdir}/services
fi
%{_sysconfdir}/init.d/xinetd reload
%endif
#}}}
%post
rm -f /var/cache/man/cat1/pdsh.1.*
rm -f /var/cache/man/cat1/pdcp.1.*
#}}}
%changelog
* Fri Sep 15 2006 Troy Telford <ttelford@xxxxxxxx> 2.11-0.1.lnxi
- Rev'd to PDSH 2.11
* Tue May 16 2006 Troy Telford <ttelford@xxxxxxxx> 2.10-1.0.lnxi
- Rev'd to pdsh 2.10 (fixes bug #5377)
* Tue Apr 25 2006 Troy Telford <ttelford@xxxxxxxx> 2.9-1.3.lnxi
- SSH, RSH, and machines sub-packages were all duplicated in the main pdsh
package; this has been fixed (so the main pdsh doesn't have them)
* Mon Apr 24 2006 Troy Telford <ttelford@xxxxxxxx> 2.9-1.2.lnxi
- Fixed bug #5342; rsh used by default; changed to ssh.
* Tue Apr 18 2006 Troy Telford <ttelford@xxxxxxxx> 2.9-1.1.lnxi
- Rev'd RPM to pdsh 2.9
- Mostly based off of pdsh's spec file (LLNL), which had some rather clever
macros in it.
# vim: fdm=marker : fdc=4 : ts=8
execute the same command on a range of nodes in a cluster)
The .specfile is a lightly modified version of the one LLNL provides.
I use vim's code folding feature quite a bit, so if you see comments to the
extent of #{{{ or #}}}, that's just a fold marker.
If the "%{?foo:}" syntax is implemented, I'm willing to wager that the problem
isn't with the %{?foo:} syntax, but instead with the macros between line(s)
39-46 of the attached .spec.
The check(), def(), and def_machines() macros are some of the more arcane
macros I've seen. But they help make the code in %build, as well as setting
the defaults for the various '--with' options rather clean.
On Friday 25 May 2007, you wrote:
> On Thu, May 24, 2007 at 11:29:03AM -0600, Troy Telford wrote:
> > I've got a spec file (not on build.opensuse.org, though), that has the
> > following syntax:
> >
> > %{?_with_foo:BuildRequires: foo}
> >
> > With a non-buildservice RPM build, this means that if the macro
> > '_with_foo' is defined, 'foo' is a build requirement.
> >
> > It's a useful syntax; I have to provide a source RPM that can give the
> > user customization options by re-compiling the srpm with various "--with
> > foo" options (or to negate defaults by using "--without foo".)
> >
> > What I'm seeing is the following when I try to build the package using
> > the buildservice: %{_with_foo} is set in the spec file as the default
> > (so RPM sees "BuildRequires: foo")
>
> %{?xxx: } syntax actually *is* implemented. Maybe your default
> definition of %{_with_foo} can't be parsed.
>
> Can you send me your specfile?
>
> Thanks,
> Michael.
--
Troy Telford
%define compat_rel 0
%define lnxi_rel 1
%define subrel 1
Source9999: lnxi_rpmmacros
%include %{SOURCE9999}
Name: pdsh
Version: 2.11
Release: %{lnxi_release}
Summary: Parallel remote shell program.
License: GPL
Group: System Environment/Base
Source: %{name}-%{version}.tar.bz2
Patch0: %{name}-%{version}-sshpriority.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{subrel}
BuildRequires: ncurses-devel readline-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Requires: pdsh-rcmd
#{{{ Enabling and disabling pdsh options
###############################################################################
# defaults:
# enabled: readline, rsh, ssh
# disabled: rms, mrsh, qshell, mqshell, genders, nodeattr, machines,
# nodeupdown
# To build the various module subpackages, pass --with <pkg> on
# the rpmbuild command line (if your rpm is a recent enough version)
#
# Similarly, to disable various pdsh options pass --without <pkg> on
# the rpmbuild command line.
#
# This specfile also supports passing the --with and --without through
# the environment variables PDSH_WITH_OPTIONS and PDSH_WITHOUT_OPTIONS.
# e.g. PDSH_WITH_OPTIONS="qshell genders" rpmbuild ....
#
%define _without_env ${PDSH_WITHOUT_OPTIONS}
%define _with_env ${PDSH_WITH_OPTIONS}
%define dstr "%%%%"define
%define check() echo %_%{1}_env|grep -qw %%1 && echo %dstr _%{1}_%%1 --%{1}-%%1
%{expand: %%define pdsh_with() %%((%{check with})||(%{check without}))%%{nil}}
%define def() %%{!?_%{2}_%1: %%{!?_%{3}_%1: %%global _%{2}_%1 --%{2}-%1}}
# Nice little hack.
%define def_machines() %%{!?_%{2}_%1: %%{!?_%{3}_%1: %%global _%{2}_%1 --%{2}-%1=%{_sysconfdir}/pdsh/machines}}
%{expand: %pdsh_with ssh}
%{expand: %def ssh with without}
%{expand: %pdsh_with rsh}
%{expand: %def rsh with without}
%{expand: %pdsh_with readline}
%{expand: %def readline with without}
%{expand: %pdsh_with mrsh}
%{expand: %def mrsh without with}
%{expand: %pdsh_with qshell}
%{expand: %def qshell without with}
%{expand: %pdsh_with mqshell}
%{expand: %def mqshell without with}
%{expand: %pdsh_with genders}
%{expand: %def genders with without}
%{expand: %pdsh_with nodeattr}
%{expand: %def nodeattr without with}
%{expand: %pdsh_with nodeupdown}
%{expand: %def nodeupdown without with}
%{expand: %pdsh_with dshgroups}
%{expand: %def dshgroups without with}
%{expand: %pdsh_with machines}
%{expand: %def_machines machines with without}
%{expand: %pdsh_with slurm}
%{expand: %def slurm without with}
%{expand: %pdsh_with rms}
%{expand: %def rms without with}
%{expand: %pdsh_with debug}
%{expand: %def debug without with}
#
# If "--with debug" is set compile with --enable-debug
# and try not to strip binaries.
#
# (See /usr/share/doc/rpm-*/conditionalbuilds)
#
%if %{?_with_debug:1}%{!?_with_debug:0}
%define _enable_debug --enable-debug
%define __os_install_post /usr/lib/rpm/brp-compress
%endif
%{?_with_qshell:BuildRequires: qsnetlibs}
%{?_with_mqshell:BuildRequires: qsnetlibs}
%{?_with_readline:BuildRequires: readline-devel}
%{?_with_nodeupdown:BuildRequires: whatsup}
%{?_with_genders:BuildRequires: genders > 1.0}
#}}}
#{{{Package declarations & descriptions
#{{{ Pdsh description
%description
Pdsh is a multithreaded remote shell client which executes commands
on multiple remote hosts in parallel. Pdsh can use several different
remote shell services, including standard "rsh", Kerberos IV, and ssh.
#}}}
#{{{qshd
%if %{?_with_qshell:1}%{!?_with_qshell:0}
%package qshd
Summary: Remote shell daemon for pdsh/qshell/Elan3
Group: System Environment/Base
Prereq: xinetd
%description qshd
Remote shell service for running Quadrics Elan3 jobs under pdsh.
Sets up Elan capabilities and environment variables needed by Quadrics
MPICH executables.
%endif
#}}}
#{{{mqshd
%if %{?_with_mqshell:1}%{!?_with_mqshell:0}
%package mqshd
Summary: Remote shell daemon for pdsh/mqshell/Elan3
Group: System Environment/Base
Prereq: xinetd
%description mqshd
Remote shell service for running Quadrics Elan3 jobs under pdsh with
mrsh authentication. Sets up Elan capabilities and environment variables
needed by Quadrics MPICH executables.
%endif
#}}}
#{{{ Module packages:
#{{{rcmd-rsh
%if %{?_with_rsh:1}%{!?_with_rsh:0}
%package rcmd-rsh
Summary: Provides bsd rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
%description rcmd-rsh
Pdsh module for bsd rcmd functionality. Note: This module
requires that the pdsh binary be installed setuid root.
%endif
#}}}
#{{{rcmd-ssh
%if %{?_with_ssh:1}%{!?_with_ssh:0}
%package rcmd-ssh
Summary: Provides ssh rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
%description rcmd-ssh
Pdsh module for ssh rcmd functionality.
%endif
#}}}
#{{{rcmd-qshell
%if %{?_with_qshell:1}%{!?_with_qshell:0}
%package rcmd-qshell
Summary: Provides qshell rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
Conflicts: pdsh-rcmd-mqshell
%description rcmd-qshell
Pdsh module for running QsNet MPI jobs. Note: This module
requires that the pdsh binary be installed setuid root.
%endif
#}}}
#{{{rcmd-mrsh
%if %{?_with_mrsh:1}%{!?_with_mrsh:0}
%package rcmd-mrsh
Summary: Provides mrsh rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
%description rcmd-mrsh
Pdsh module for mrsh rcmd functionality.
%endif
#}}}
#{{{rcmd-mqshell
%if %{?_with_mqshell:1}%{!?_with_mqshell:0}
%package rcmd-mqshell
Summary: Provides mqshell rcmd capability to pdsh.
Group: System Environment/Base
Provides: pdsh-rcmd
Conflicts: pdsh-rcmd-qshell
%description rcmd-mqshell
Pdsh module for mqshell rcmd functionality.
%endif
#}}}
#{{{mod-genders
%if %{?_with_genders:1}%{!?_with_genders:0}
%package mod-genders
Summary: Provides libgenders support for pdsh.
Group: System Environment/Base
Requires: genders >= 1.1
Conflicts: pdsh-mod-nodeattr
Conflicts: pdsh-mod-machines
%description mod-genders
Pdsh module for libgenders functionality.
%endif
#}}}
#{{{mod-nodeattr
%if %{?_with_nodeattr:1}%{!?_with_nodeattr:0}
%package mod-nodeattr
Summary: Provides genders support for pdsh using the nodeattr program.
Group: System Environment/Base
Requires: genders
Conflicts: pdsh-mod-genders
Conflicts: pdsh-mod-machines
%description mod-nodeattr
Pdsh module for genders functionality using the nodeattr program.
%endif
#}}}
#{{{mod-nodeupdown
%if %{?_with_nodeupdown:1}%{!?_with_nodeupdown:0}
%package mod-nodeupdown
Summary: Provides libnodeupdown support for pdsh.
Group: System Environment/Base
Requires: whatsup
%description mod-nodeupdown
Pdsh module providing -v functionality using libnodeupdown.
%endif
#}}}
#{{{mod-rms
%if %{?_with_rms:1}%{!?_with_rms:0}
%package mod-rms
Summary: Provides RMS support for pdsh.
Group: System Environment/Base
Requires: qsrmslibs
%description mod-rms
Pdsh module providing support for gathering the list of target nodes
from an allocated RMS resource.
%endif
#}}}
#{{{mod-machines
%if %{?_with_machines:1}%{!?_with_machines:0}
%package mod-machines
Summary: Pdsh module for gathering list of target nodes from a machines file.
Group: System Environment/Base
Conflicts: pdsh-mod-genders
Conflicts: pdsh-mod-nodeattr
%description mod-machines
Pdsh module for gathering list of all target nodes from a machines file.
%endif
#}}}
#{{{mod-dhsgroup
%if %{?_with_dshgroups:1}%{!?_with_dshgroups:0}
%package mod-dshgroup
Summary: Provides dsh-style group file support for pdsh.
Group: System Environment/Base
Requires: whatsup
%description mod-dshgroup
Pdsh module providing dsh (Dancer's shell) style "group" file support.
Provides -g groupname and -X groupname options to pdsh.
%endif
#}}}
#{{{mod-slurm
%if %{?_with_slurm:1}%{!?_with_slurm:0}
%package mod-slurm
Summary: Provides support for running pdsh under SLURM allocations.
Group: System Environment/Base
Requires: slurm
%description mod-slurm
Pdsh module providing support for gathering the list of target nodes
from an allocated SLURM job.
%endif
#}}}
#}}}
#}}}
%prep
%setup -q
%patch0 -p1
%build
#{{{configure
%configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \
%{?_enable_debug} \
%{?_with_rsh} \
%{?_without_rsh} \
%{?_with_ssh} \
%{?_without_ssh} \
%{?_with_qshell} \
%{?_without_qshell} \
%{?_with_readline} \
%{?_without_readline} \
%{?_with_machines} \
%{?_without_machines} \
%{?_with_genders} \
%{?_without_genders} \
%{?_with_rms} \
%{?_without_rms} \
%{?_with_nodeupdown} \
%{?_without_nodeupdown} \
%{?_with_nodeattr} \
%{?_without_nodeattr} \
%{?_with_mrsh} \
%{?_without_mrsh} \
%{?_with_mqshell} \
%{?_without_mqshell} \
%{?_with_slurm} \
%{?_without_slurm} \
%{?_with_dshgroups} \
%{?_without_dshgroups}
#}}}
#{{{Multi-job make
if [ "$SMP" != "" ] ; then
(make "MAKE=make -k -j $SMP"; exit 0)
make
else
make
fi
#}}}
%install
#{{{install
rm -rf %{buildroot}
mkdir -p %{buildroot}
DESTDIR="%{buildroot}" make install
if [ -x %{buildroot}/%{_sbindir}/in.qshd ]; then
install -D -m644 etc/qshell.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/qshell
fi
if [ -x %{buildroot}/%{_sbindir}/in.mqshd ]; then
install -D -m644 etc/mqshell.xinetd %{buildroot}%{_sysconfdir}/xinetd.d/mqshell
fi
mkdir -p %{buildroot}%{_sysconfdir}/pdsh
touch %{buildroot}%{_sysconfdir}/pdsh/machines
#}}}
%clean
rm -rf "%{buildroot}"
#{{{Files
%files
%defattr(-,root,root)
%doc README ChangeLog NEWS DISCLAIMER README.KRB4 README.modules README.QsNet
%attr(755, root, root) %{_bindir}/pdsh
%attr(755, root, root) %{_bindir}/pdcp
%{_bindir}/dshbak
%dir %{_sysconfdir}/pdsh
%dir %{_libdir}/pdsh
%config(noreplace) %{_sysconfdir}/pdsh/machines
%{_mandir}/man1/*
#{{{rcmd-rsh
%if %{?_with_rsh:1}%{!?_with_rsh:0}
%files rcmd-rsh
%defattr(-,root,root)
%{_libdir}/pdsh/xrcmd.*
%endif
#}}}
#{{{rcmd-ssh
%if %{?_with_ssh:1}%{!?_with_ssh:0}
%files rcmd-ssh
%defattr(-,root,root)
%{_libdir}/pdsh/sshcmd.*
%endif
#}}}
#{{{rcmd-qshell
%if %{?_with_qshell:1}%{!?_with_qshell:0}
%files rcmd-qshell
%defattr(-,root,root)
%{_libdir}/pdsh/qcmd.*
%endif
#}}}
#{{{rcmd-mrsh
%if %{?_with_mrsh:1}%{!?_with_mrsh:0}
%files rcmd-mrsh
%defattr(-,root,root)
%{_libdir}/pdsh/mcmd.*
%endif
#}}}
#{{{rcmd-mqshell
%if %{?_with_mqshell:1}%{!?_with_mqshell:0}
%files rcmd-mqshell
%defattr(-,root,root)
%{_libdir}/pdsh/mqcmd.*
%endif
#}}}
#{{{mod-genders
%if %{?_with_genders:1}%{!?_with_genders:0}
%files mod-genders
%defattr(-,root,root)
%{_libdir}/pdsh/genders.*
%endif
#}}}
#{{{mod-nodeattr
%if %{?_with_nodeattr:1}%{!?_with_nodeattr:0}
%files mod-nodeattr
%defattr(-,root,root)
%{_libdir}/pdsh/nodeattr.*
%endif
#}}}
#{{{mod-nodeupdown
%if %{?_with_nodeupdown:1}%{!?_with_nodeupdown:0}
%files mod-nodeupdown
%defattr(-,root,root)
%{_libdir}/pdsh/nodeupdown.*
%endif
#}}}
#{{{mod-rms
%if %{?_with_rms:1}%{!?_with_rms:0}
%files mod-rms
%defattr(-,root,root)
%{_libdir}/pdsh/rms.*
%endif
#}}}
#{{{mod-machines
%if %{?_with_machines:1}%{!?_with_machines:0}
%files mod-machines
%defattr(-,root,root)
%{_libdir}/pdsh/machines.*
%endif
#}}}
#{{{mod-dshgroup
%if %{?_with_dshgroups:1}%{!?_with_dshgroups:0}
%files mod-dshgroup
%defattr(-,root,root)
%{_libdir}/pdsh/dshgroup.*
%endif
#}}}
#{{{mod-slurm
%if %{?_with_slurm:1}%{!?_with_slurm:0}
%files mod-slurm
%defattr(-,root,root)
%{_libdir}/pdsh/slurm.*
%endif
#}}}
#{{{qshd
%if %{?_with_qshell:1}%{!?_with_qshell:0}
%files qshd
%defattr(-,root,root)
%{_sbindir}/in.qshd
%{_sysconfdir}/xinetd.d/qshell
%post qshd
if ! grep "^qshell" %{_sysconfdir}/services >/dev/null; then
echo "qshell 523/tcp # pdsh/qshell/elan3" >>%{_sysconfdir}/services
fi
%{_sysconfdir}/init.d/xinetd reload
%endif
#}}}
#{{{mqshd
%if %{?_with_mqshell:1}%{!?_with_mqshell:0}
%files mqshd
%defattr(-,root,root)
%{_sbindir}/in.mqshd
%{_sysconfdir}/xinetd.d/mqshell
%post mqshd
if ! grep "^mqshell" %{_sysconfdir}/services >/dev/null; then
echo "mqshell 21234/tcp # pdsh/mqshell/elan3" >>%{_sysconfdir}/services
fi
%{_sysconfdir}/init.d/xinetd reload
%endif
#}}}
%post
rm -f /var/cache/man/cat1/pdsh.1.*
rm -f /var/cache/man/cat1/pdcp.1.*
#}}}
%changelog
* Fri Sep 15 2006 Troy Telford <ttelford@xxxxxxxx> 2.11-0.1.lnxi
- Rev'd to PDSH 2.11
* Tue May 16 2006 Troy Telford <ttelford@xxxxxxxx> 2.10-1.0.lnxi
- Rev'd to pdsh 2.10 (fixes bug #5377)
* Tue Apr 25 2006 Troy Telford <ttelford@xxxxxxxx> 2.9-1.3.lnxi
- SSH, RSH, and machines sub-packages were all duplicated in the main pdsh
package; this has been fixed (so the main pdsh doesn't have them)
* Mon Apr 24 2006 Troy Telford <ttelford@xxxxxxxx> 2.9-1.2.lnxi
- Fixed bug #5342; rsh used by default; changed to ssh.
* Tue Apr 18 2006 Troy Telford <ttelford@xxxxxxxx> 2.9-1.1.lnxi
- Rev'd RPM to pdsh 2.9
- Mostly based off of pdsh's spec file (LLNL), which had some rather clever
macros in it.
# vim: fdm=marker : fdc=4 : ts=8
| < Previous | Next > |