cvsd.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ##
  2. ## cvsd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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.19
  35. Release: 20030708
  36. # package options
  37. %option with_fsl yes
  38. # list of sources
  39. Source0: http://tiefighter.et.tudelft.nl/~arthur/cvsd/cvsd-%{version}.tar.gz
  40. Source1: cvsd.conf
  41. Source2: rc.cvsd
  42. Source3: fsl.cvsd
  43. Patch0: cvsd.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20030415, cvs, gcc
  48. PreReq: OpenPKG, openpkg >= 20030415, cvs
  49. %if "%{with_fsl}" == "yes"
  50. BuildPreReq: fsl
  51. PreReq: fsl
  52. %endif
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. cvsd is a wrapper program for cvs in pserver mode. It will run
  57. 'cvs pserver' under a special uid/gid in a chroot jail. cvsd is
  58. run as a daemon and is controlled through a configuration file. It
  59. is relatively easy to configure and tools are provided for setting
  60. up a rootjail. This server can be useful if you want to run a
  61. public cvs pserver. You should however be aware of the security
  62. limitations of running a cvs pserver. If you want any kind of
  63. authentication you should really consider using secure shell as a
  64. secure authentication mechanism and transport. Passwords used in cvs
  65. pserver are transmitted in plaintext and this wrapper won't change
  66. that. This server adds a layer of security to cvs. cvs is a very
  67. powerful tool and is capable of running scripts and other things.
  68. By running cvs in a rootjail it is possible to limit the amount of
  69. "damage" cvs can do if it is exploited. It is generally a good idea
  70. to run cvsd without any write permissions to any directory on the
  71. system.
  72. %prep
  73. %setup -q
  74. %patch -p0
  75. %build
  76. # configure program
  77. CC="%{l_cc}" \
  78. CFLAGS="%{l_cflags -O}" \
  79. LDFLAGS="%{l_fsl_ldflags}" \
  80. LIBS="%{l_fsl_libs}" \
  81. ./configure \
  82. --prefix=%{l_prefix}
  83. # build program
  84. %{l_make} %{l_mflags -O}
  85. %install
  86. rm -rf $RPM_BUILD_ROOT
  87. %{l_shtool} mkdir -f -p -m 755 \
  88. $RPM_BUILD_ROOT%{l_prefix}/var/cvsd \
  89. $RPM_BUILD_ROOT%{l_prefix}/etc/cvsd \
  90. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  91. # perform standard installation procedure
  92. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  93. rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/init.d
  94. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  95. # creating configuration
  96. %{l_shtool} install -c -m 755 \
  97. -e 's;@l_prefix@;%{l_prefix};g' \
  98. -e 's;@l_nusr@;%{l_nusr};g' \
  99. -e 's;@l_ngrp@;%{l_ngrp};g' \
  100. %{SOURCE cvsd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/cvsd/cvsd.conf
  101. # install run-command script
  102. %{l_shtool} mkdir -f -p -m 755 \
  103. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  104. %{l_shtool} install -c -m 755 \
  105. -e 's;@l_prefix@;%{l_prefix};g' \
  106. -e 's;@l_susr@;%{l_susr};g' \
  107. -e 's;@l_rusr@;%{l_rusr};g' \
  108. -e 's;@l_rgrp@;%{l_rgrp};g' \
  109. %{SOURCE rc.cvsd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  110. # install OSSP fsl configuration
  111. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  112. %{l_shtool} install -c -m 644 \
  113. -e 's;@l_prefix@;%{l_prefix};g' \
  114. %{SOURCE fsl.cvsd} \
  115. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  116. # determine installation files
  117. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  118. %{l_files_std} \
  119. '%not %dir %{l_prefix}/etc/fsl' \
  120. '%config %{l_prefix}/etc/fsl/fsl.cvsd'
  121. %files -f files
  122. %clean
  123. rm -rf $RPM_BUILD_ROOT