Update of /cvsroot/leaf/devel/davidmbrooke/src/bering-uclibc/apps/portmap
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2156/portmap
Added Files:
buildtool.cfg buildtool.mk portmap-6.0.tgz portmap.default
portmap.init README
Log Message:
NFS Server Package for Werner van Staden
--- NEW FILE: portmap-6.0.tgz ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: buildtool.mk ---
#############################################################
#
# buildtool makefile for portmap
#
#############################################################
include $(MASTERMAKEFILE)
PORTMAP_DIR:=portmap_6.0
PORTMAP_TARGET_DIR:=$(BT_BUILD_DIR)/portmap
$(PORTMAP_DIR)/.source:
zcat $(PORTMAP_SOURCE) | tar -xvf -
# -fpie / -pie are GCC v4-specific so comment them out
( cd $(PORTMAP_DIR) ; sed -i -e "/pie/s/^/#LEAF /" Makefile )
# omit "-o root -g root" arguments from "install", so can run "make install"
# without being "root"; will get corrected as part of LRP installation
( cd $(PORTMAP_DIR) ; sed -i -e "/-o root -g root /s///" Makefile )
touch $(PORTMAP_DIR)/.source
source: $(PORTMAP_DIR)/.source
build: source
mkdir -p $(PORTMAP_TARGET_DIR)/sbin
mkdir -p $(PORTMAP_TARGET_DIR)/usr/share/man/man8
$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(PORTMAP_DIR)
$(MAKE) -C $(PORTMAP_DIR) BASEDIR=$(PORTMAP_TARGET_DIR) install
#
$(BT_STRIP) $(BT_STRIP_BINOPTS) $(PORTMAP_TARGET_DIR)/sbin/portmap
cp -f $(PORTMAP_TARGET_DIR)/sbin/portmap $(BT_STAGING_DIR)/sbin
$(BT_STRIP) $(BT_STRIP_BINOPTS) $(PORTMAP_TARGET_DIR)/sbin/pmap_set
cp -f $(PORTMAP_TARGET_DIR)/sbin/pmap_set $(BT_STAGING_DIR)/sbin
$(BT_STRIP) $(BT_STRIP_BINOPTS) $(PORTMAP_TARGET_DIR)/sbin/pmap_dump
cp -f $(PORTMAP_TARGET_DIR)/sbin/pmap_dump $(BT_STAGING_DIR)/sbin
mkdir -p $(BT_STAGING_DIR)/etc/default/
mkdir -p $(BT_STAGING_DIR)/etc/init.d/
cp -a portmap.default $(BT_STAGING_DIR)/etc/default/portmap
cp -a portmap.init $(BT_STAGING_DIR)/etc/init.d/portmap
clean:
rm -rf $(PORTMAP_TARGET_DIR)
$(MAKE) -C $(PORTMAP_DIR) clean
srcclean: clean
rm -rf $(PORTMAP_DIR)
--- NEW FILE: portmap.default ---
# Defaults for portmap initscript (/etc/init.d/portmap)
# This is a POSIX shell fragment
#
# Command-line options for portmap
# Select from:
# -d: debugging mode
# -f: don't daemonize, log to standard error
# -t dir: chroot into dir
# -v: verbose logging
# -i address: bind to address
# -l: same as -i 127.0.0.1
# -u uid : setuid to this uid
# -g uid : setgid to this gid
PORTMAPOPTS=""
--- NEW FILE: README ---
README file for Bering-uClibc contrib package "portmap"
1. Introduction
This directory contains the Bering-uClibc package source for "portmap".
It provides an ONCRPC port mapper as used by e.g. an NFS file server.
See buildtool.cfg for more information.
These notes are written against Bering-uClibc version 3.1, hence uClibc
version 0.9.28 and Linux kernel version 2.4.34.
WARNING: This package DOES NOT work with standard Bering-uClibc.
A custom uClibc library is required. See below.
2. Building the package
2.1 Customize the build environment
This package requires "full" RPC support from uClibc. As of Bering-uClibc
3.1, the standard uClibc library does not include this. A custom uClibc
library is required.
The following assumes that a working buildtool environment is already
installed. See http://leaf.sourceforge.net/doc/buc-buildtool.html for
more information on the Bering-uClibc buildtool.
Full RPC support is selected by a one-line change to the uClibc .config
file:
$ cd source/buildenv/uClibc-0.9.28
$ patch .config << EOF
99c99
< # UCLIBC_HAS_FULL_RPC is not set
---
> UCLIBC_HAS_FULL_RPC=y
EOF
$ cd ../../..
Assuming that the buildenv has already been built, need to tell
buildtool that it should be re-built with "-f" (force):
$ ./buildtool.pl -f build buildenv
The custom uClibc library should now be: staging/lib/libuClibc-0.9.28.so.
File size should be 263064 bytes, compared with 246360 for the library
without full RPC support.
2.2 Build the portmap source
Add the following lines to conf/sources.conf:
<Server cvs-sourceforge-devel-davidmbrooke>
Type = viewcvs
Name = leaf.cvs.sourceforge.net
Serverpath = /leaf/devel/davidmbrooke/src/bering-uclibc/apps
</Server>
<Package portmap>
Server = cvs-sourceforge-devel-davidmbrooke
Directory = portmap
Description = Linux ONCRPC Portmapper
<Requires>
Name = buildenv
Name = tcp_wrappers
</Requires>
</Package>
Download and build the portmap files with the following command:
$ ./buildtool.pl build portmap
2.3. Build the LRP with buildpacket
$ fakeroot -- ./buildpacket.pl --packager="YOURNAME" --package=portmap
3. Installation
3.1 Installation of custom uClibc
File staging/lib/libuClibc-0.9.28.so needs to be incorporated into
initrd.lrp for installation. Starting with your normal initrd.lrp run
the following commands:
$ zcat initrd.lrp > initrd
$ su
# mount -o loop initrd /mnt
# cp libuClibc-0.9.28.so /mnt/lib
# umount /mnt
# exit
$ gzip -9 --suffix .lrp initrd
Copy the new initrd.lrp to the Bering-uClibc boot disk.
3.2 Installation of portmap.lrp
Copy package/portmap.lrp to the Bering-uClibc boot disk.
4. Usage notes
The only configuration file is /etc/default/portmap, which allows the
command-line options for the portmap daemon to be modified.
Error messages like "Can't resolve symbol 'svcudp_create'" mean that the
custom uClibc library with "UCLIBC_HAS_RPC=y" has not been installed.
If Shorewall is running then ports will need to be opened to allow
portmap to operate. I don't run Shorewall on my fileserver.
david M brooke, 24 March 2008
mailto: davidmbrooke at users dot sourceforge dot net
--- NEW FILE: buildtool.cfg ---
<File buildtool.mk>
Server = cvs-contrib-sourceforge
Directory = portmap
Revision = HEAD
</File>
<File portmap-6.0.tgz>
Server = cvs-contrib-sourceforge
Directory = portmap
Revision = HEAD
envname = PORTMAP_SOURCE
</File>
<File portmap.default>
Server = cvs-contrib-sourceforge
Directory = portmap
Revision = HEAD
</File>
<File portmap.init>
Server = cvs-contrib-sourceforge
Directory = portmap
Revision = HEAD
</File>
<Package>
<portmap>
Version = 6.0
Revision = 1
Help <<EOF
The ONCRPC port mapper utility, required by other utilities which
rely on RPC (like the NFS server daemons).
Demands a variant of uClibc compiled with "UCLIBC_HAS_RPC=y".
See http://neil.brown.name/portmap/
LRP package by __PACKAGER__, __BUILDDATE__
EOF
PackageType = lrp
PackageName = portmap
<Permissions>
Files = 644
Directories = 755
</Permissions>
<Owner>
Files = root:root
Directories = root:root
</Owner>
<Contents>
<File>
Filename = sbin/portmap
Source = sbin/portmap
Type = binary
Permissions = 755
</File>
<File>
Filename = sbin/pmap_set
Source = sbin/pmap_set
Type = binary
Permissions = 755
</File>
<File>
Filename = sbin/pmap_dump
Source = sbin/pmap_dump
Type = binary
Permissions = 755
</File>
<File>
Filename = etc/default/portmap
Source = etc/default/portmap
Description = portmap daemon configuration
Type = binary
Type = conf
Type = local
</File>
<File>
Filename = etc/init.d/portmap
Source = etc/init.d/portmap
Type = binary
Permissions = 755
</File>
</Contents>
</portmap>
</Package>
--- NEW FILE: portmap.init ---
#!/bin/sh
#
# /etc/init.d/portmap: start and stop RPC port mapper daemon
#
RCDLINKS="0,K11 2,S89"
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Check for existence of daemon executable
[ -x /sbin/portmap ] || exit 2
# Include portmap settings if available
if [ -f /etc/default/portmap ] ; then
. /etc/default/portmap
fi
# Define fall-back default settings
[ -z "$PORTMAPOPTS" ] && PORTMAPOPTS=""
RETVAL=0
# See how we were called
case "$1" in
start)
# Start daemon
echo -n "Starting portmap daemon: "
start-stop-daemon --start --exec /sbin/portmap --quiet -- $PORTMAPOPTS
RETVAL=$?
if [ $RETVAL == "0" ]; then
echo "succeeded."
else
echo "failed."
fi
;;
stop)
# Stop daemon
echo -n "Shutting down portmap daemon: "
start-stop-daemon --stop --exec /sbin/portmap --quiet
RETVAL=$?
if [ $RETVAL == "0" ]; then
echo "succeeded."
else
echo "failed."
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits