Browse Source

add fsl support

master
Thomas Lotterer 23 years ago committed by Ralf S. Engelschall
parent
commit
2c965782e3
  1. 25
      cvs/cvs.patch
  2. 43
      cvs/cvs.spec
  3. 16
      cvs/fsl.cvs
  4. 15
      cvs/rc.cvs

25
cvs/cvs.patch

@ -0,0 +1,25 @@
--- src/main.c.orig Tue May 20 00:52:58 2003
+++ src/main.c Thu Jun 26 15:42:16 2003
@@ -14,6 +14,10 @@
#include <assert.h>
#include "cvs.h"
+#ifdef SERVER_SUPPORT && HAVE_SYSLOG_H
+#include <syslog.h>
+#include <stdarg.h>
+#endif
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
@@ -424,6 +428,11 @@
/* `getopt_long' stores the option index here, but right now we
don't use it. */
int option_index = 0;
+
+#ifdef SERVER_SUPPORT && HAVE_SYSLOG_H
+ /* fsl identification */
+ openlog("cvs", 0, LOG_DAEMON);
+#endif
#ifdef SYSTEM_INITIALIZE
/* Hook for OS-specific behavior, for example socket subsystems on

43
cvs/cvs.spec

@ -37,9 +37,10 @@ Distribution: OpenPKG [CORE]
Group: SCM
License: GPL
Version: %{V_cvs}
Release: 20030527
Release: 20030630
# optional support for applying the RSE patches
%option with_fsl yes
%option with_rse_patches no
%option with_rse_patch_cvsuser_caller cvs
@ -48,12 +49,18 @@ Source0: http://www.cvshome.org/files/19/10/cvs-%{V_cvs}.tar.bz2
Source1: ftp://riemann.iam.uni-bonn.de/pub/users/roessler/cvslock/cvslock-%{V_cvslock}.tar.gz
Source2: cvs.patches.rse
Source3: rc.cvs
Source4: fsl.cvs
Patch0: cvs.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20030103, perl, patch
PreReq: OpenPKG, openpkg >= 20030103, perl, patch
BuildPreReq: OpenPKG, openpkg >= 20030415, perl, patch
PreReq: OpenPKG, openpkg >= 20030415, perl, patch
%if "%{with_fsl}" == "yes"
BuildPreReq: fsl
PreReq: fsl
%endif
AutoReq: no
AutoReqProv: no
@ -84,13 +91,14 @@ AutoReqProv: no
%prep
%setup0 -q -c
%setup1 -q -T -D -a 1
%if "%{with_rse_patches}" == "yes"
( cd cvs-%{V_cvs}
%if "%{with_rse_patches}" == "yes"
cat %{SOURCE cvs.patches.rse} |\
sed -e 's;\(#define RSE_PATCH_CVSUSER_CALLER "\)cvs\("\);\1%{with_rse_patch_cvsuser_caller}\2;' |\
%{l_patch} -p0
)
%endif
%patch -p0
)
%build
( cd cvs-%{V_cvs}
@ -100,6 +108,8 @@ AutoReqProv: no
%else
CFLAGS="%{l_cflags -O}" \
%endif
LDFLAGS="%{l_fsl_ldflags}" \
LIBS="%{l_fsl_libs}" \
./configure \
--prefix=%{l_prefix} \
--with-patch=%{l_prefix}/bin/patch \
@ -120,6 +130,8 @@ AutoReqProv: no
%install
rm -rf $RPM_BUILD_ROOT
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/var
( cd cvs-%{V_cvs}
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/rcs2log
@ -134,18 +146,29 @@ AutoReqProv: no
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/var/cvs/tmp
%if "%{with_rse_patches}" == "yes"
# Creating run-command script
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
%{l_shtool} install -c -m 755 \
-e 's;@l_prefix@;%{l_prefix};g' \
-e 's;@l_susr@;%{l_susr};g' \
-e 's;@l_musr@;%{l_musr};g' \
-e 's;@l_mgrp@;%{l_mgrp};g' \
%{SOURCE rc.cvs} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
%endif
-e 's;@l_rusr@;%{l_rusr};g' \
-e 's;@l_rgrp@;%{l_rgrp};g' \
%{SOURCE rc.%{name}} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
# OSSP fake syslog library
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
%{l_shtool} install -c -m 644 \
-e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE fsl.%{name}} \
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%not %dir %{l_prefix}/etc/fsl' \
'%config %{l_prefix}/etc/fsl/fsl.%{name}' \
'%attr(1777,-,-) %{l_prefix}/var/cvs/tmp'
%files -f files

16
cvs/fsl.cvs

@ -0,0 +1,16 @@
##
## fsl.cvs -- OSSP fsl configuration
##
ident (cvs)/.+ q{
prefix(
prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
)
-> {
debug: file(
path="@l_prefix@/var/cvs/cvs.log",
append=1, perm=0644
)
}
};

15
cvs/rc.cvs

@ -8,6 +8,11 @@
cvs_pserverd_gflags=""
cvs_pserverd_lflags=""
cvs_pserverd_listen="127.0.0.1:2401"
cvs_log_prolog="true"
cvs_log_epilog="true"
cvs_log_numfiles="10"
cvs_log_minsize="1M"
cvs_log_complevel="9"
%common
cvs_pserverd_pidfile="@l_prefix@/var/cvs/pserverd.pid"
@ -30,3 +35,13 @@
fi
fi
%daily -u @l_susr@
opServiceEnabled cvs || exit 0
# rotate logfile
shtool rotate -f \
-n${cvs_log_numfiles} -s${cvs_log_minsize} -d \
-z${cvs_log_complevel} -o@l_rusr@ -g@l_rgrp@ -m644 \
-P "${cvs_log_prolog}" \
-E "${cvs_log_epilog}" \
@l_prefix@/var/cvs/cvs.log

Loading…
Cancel
Save