OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-re, openpkg-web, openpkg-src Date: 24-Oct-2002 15:46:24
Branch: HEAD Handle: 2002102414462301
Added files:
openpkg-re/vcheck vc.tftp
openpkg-src/tftp rc.tftp tftp.spec tftpd.remap
Modified files:
openpkg-web news.txt
Log:
Initial packaging of TFTP server & client (still has a few problems)
Summary:
Revision Changes Path
1.1 +9 -0 openpkg-re/vcheck/vc.tftp
1.1 +28 -0 openpkg-src/tftp/rc.tftp
1.1 +91 -0 openpkg-src/tftp/tftp.spec
1.1 +33 -0 openpkg-src/tftp/tftpd.remap
1.1881 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
Index: openpkg-re/vcheck/vc.tftp
============================================================
$ cvs update -p -r1.1 vc.tftp
config = {
}
prog tftp = {
version = 0.31
url = http://www.kernel.org/pub/software/network/tftp/
regex = tftp-hpa-(__VER__)\.tar\.gz
}
Index: openpkg-src/tftp/rc.tftp
============================================================
$ cvs update -p -r1.1 rc.tftp
#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
##
## rc.tftp-hpa -- Run-Commands for TFTP Daemon
##
%config
tftp_enable="yes"
tftp_listen=""
tftp_flags=""
tftp_rootdir="@l_prefix@/pub"
%start -p 100 -u root
if opServiceEnabled tftp; then
opts="-l -u @l_nusr@ -m @l_prefix@/etc/tftp/tftpd.remap"
if [ ".$tftp_listen" != . ]; then
opts="$opts -a $tftp_listen"
fi
if [ ".$tftp_flags" != . ]; then
opts="$opts $tftp_flags"
fi
@l_prefix@/sbin/tftpd $opts -s $tftp_root $tftp_root
fi
%stop -p 200 -u root
if opServiceEnabled tftp; then
@l_prefix@/sbin/rndc stop
fi
Index: openpkg-src/tftp/tftp.spec
============================================================
$ cvs update -p -r1.1 tftp.spec
##
## tftp.spec -- OpenPKG RPM Specification
## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package information
Name: tftp
Summary: TFTP Client and Server
URL: http://www.kernel.org/pub/software/network/tftp/
Vendor: John Doe
Packager: The OpenPKG Project
Distribution: OpenPKG [EVAL]
Group: Networtk
License: GPL
Version: 0.31
Release: 20021024
# list of sources
Source0:
http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.gz
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206, make
PreReq: OpenPKG, openpkg >= 20020206
AutoReq: no
AutoReqProv: no
%description
This is a portable client and server for the Trivial File Transfer Protocol
(TFTP).
%prep
%setup -q -n tftp-hpa-%{version}
%build
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags}" \
LDFLAGS="%{l_ldflags}" \
./configure \
--prefix=%{l_prefix} \
--without-tcpwrappers \
--without-readline
%{l_make} %{l_mflags -O}
%install
rm -rf $RPM_BUILD_ROOT
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
$RPM_BUILD_ROOT%{l_prefix}/etc/tftp
%{l_make} %{l_mflags} install INSTALLROOT=$RPM_BUILD_ROOT
%{l_shtool} install -c -m 644 \
-e 's;@l_prefix@;%{l_prefix};g' \
-e 's;@l_nusr@;%{l_nusr};g' \
%{SOURCE rc.tftp} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
%{l_shtool} install -c -m 644 \
-e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE tftpd.remap} $RPM_BUILD_ROOT%{l_prefix}/etc/tftp/
mv $RPM_BUILD_ROOT%{l_prefix}/man/man8/in.tftpd.8 \
$RPM_BUILD_ROOT%{l_prefix}/man/man8/tftpd.8
mv $RPM_BUILD_ROOT%{l_prefix}/sbin/in.tftpd \
$RPM_BUILD_ROOT%{l_prefix}/sbin/tftpd
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT
Index: openpkg-src/tftp/tftpd.remap
============================================================
$ cvs update -p -r1.1 tftpd.remap
#
# tftpd.remap -- TFTP Daemon Path Remapping
#
# This file has three fields: operation, regex, remapping
#
# The operation is a combination of the following letters:
#
# r - rewrite the matched string with the remapping pattern
# i - case-insensitive matching
# g - repeat until no match (used with "r")
# e - exit (with success) if we match this pattern, do not process
# subsequent rules
# s - start over from the first rule if we match this pattern
# a - abort (refuse the request) if we match this rule
# G - this rule applies to TFTP GET requests only
# P - this rule applies to TFTP PUT requests only
#
# The regex is a regular expression in the style of egrep(1).
#
# The remapping is a pattern, all characters are verbatim except \
# \0 copies the full string that matched the regex
# \1..\9 copies the 9 first (..) expressions in the regex
# \\ is an escaped \
#
# "#" begins a comment, unless \-escaped
#
ri ^[a-z]: # Remove "drive letters"
rg \\ / # Convert backslashes to slashes
rg \# @ # Convert hash marks to @ signs
rg /../ /..no../ # Convert /../ to /..no../
e ^incoming/ # These are always ok
r ^[^/] @l_prefix@/pub/\0 # Convert non-absolute files
a ^\. # Reject requests for hidden files
Index: openpkg-web/news.txt
============================================================
$ cvs diff -u -r1.1880 -r1.1881 news.txt
--- openpkg-web/news.txt 24 Oct 2002 06:51:41 -0000 1.1880
+++ openpkg-web/news.txt 24 Oct 2002 13:46:23 -0000 1.1881
@@ -1,3 +1,4 @@
+24-Oct-2002: New package: P<tftp-0.31-20021024>
24-Oct-2002: Upgraded package: P<aegis-4.9-20021024>
24-Oct-2002: Upgraded package: P<libtool-1.4.3-20021024>
24-Oct-2002: Upgraded package: P<openvpn-1.3.2-20021024>
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]