cvsd.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## cvsd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: cvsd
  27. Summary: CVS PServer Daemon
  28. URL: http://tiefighter.et.tudelft.nl/~arthur/cvsd/
  29. Vendor: Arthur de Jong
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [PLUS]
  32. Group: SCM
  33. License: GPL
  34. Version: 0.9.11
  35. Release: 20020825
  36. # list of sources
  37. Source0: http://tiefighter.et.tudelft.nl/~arthur/cvsd/cvsd-%{version}.tar.gz
  38. Source1: cvsd.conf
  39. Source2: rc.cvsd
  40. Patch0: cvsd.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020206, cvs, gcc
  45. PreReq: OpenPKG, openpkg >= 20020206, cvs
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. cvsd is a wrapper program for cvs in pserver mode. It will run
  50. 'cvs pserver' under a special uid/gid in a chroot jail. cvsd is
  51. run as a daemon and is controlled through a configuration file. It
  52. is relatively easy to configure and tools are provided for setting
  53. up a rootjail. This server can be useful if you want to run a
  54. public cvs pserver. You should however be aware of the security
  55. limitations of running a cvs pserver. If you want any kind of
  56. authentication you should really consider using secure shell as a
  57. secure authentication mechanism and transport. Passwords used in cvs
  58. pserver are transmitted in plaintext and this wrapper won't change
  59. that. This server adds a layer of security to cvs. cvs is a very
  60. powerful tool and is capable of running scripts and other things.
  61. By running cvs in a rootjail it is possible to limit the amount of
  62. "damage" cvs can do if it is exploited. It is generally a good idea
  63. to run cvsd without any write permissions to any directory on the
  64. system.
  65. %prep
  66. %setup -q
  67. %patch -p0
  68. %build
  69. # configure program
  70. PATH="%{l_prefix}/bin:$PATH"; export PATH
  71. CC="%{l_cc}" \
  72. CFLAGS="%{l_cflags -O}" \
  73. ./configure \
  74. --prefix=%{l_prefix}
  75. # build program
  76. %{l_make} %{l_mflags -O}
  77. %install
  78. rm -rf $RPM_BUILD_ROOT
  79. # perform standard installation procedure
  80. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  81. rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/init.d
  82. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  83. # install additional data
  84. %{l_shtool} mkdir -f -p -m 755 \
  85. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  86. $RPM_BUILD_ROOT%{l_prefix}/var/cvsd
  87. %{l_shtool} install -c -m 755 \
  88. -e 's;@l_prefix@;%{l_prefix};g' \
  89. -e 's;@l_musr@;%{l_musr};g' \
  90. -e 's;@l_mgrp@;%{l_mgrp};g' \
  91. %{SOURCE rc.cvsd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  92. %{l_shtool} install -c -m 755 \
  93. -e 's;@l_prefix@;%{l_prefix};g' \
  94. -e 's;@l_nusr@;%{l_nusr};g' \
  95. -e 's;@l_ngrp@;%{l_ngrp};g' \
  96. %{SOURCE cvsd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/cvsd/cvsd.conf
  97. # determine installation extend
  98. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  99. %files -f files
  100. %clean
  101. rm -rf $RPM_BUILD_ROOT