--- admin/PlamoBuild-template-20170415 2017-04-15 12:25:32.000000000 +0900 +++ plamo/01_minimum/nfs.txz/nfs_utils/PlamoBuild.nfs_utils-1.2.9 2017-06-20 21:29:44.000000000 +0900 @@ -1,18 +1,19 @@ #!/bin/sh ###################################################################### -url="" +url="https://www.kernel.org/pub/linux/utils/nfs-utils/1.2.9/nfs-utils-1.2.9.tar.xz + https://raw.githubusercontent.com/pld-linux/nfs-utils/master/nfs-utils-heimdal.patch" verify= digest= commitid= -pkgbase= -vers= +pkgbase=nfs_utils +vers=1.2.9 arch=`uname -m` -build=P1 -src=$pkgbase-$vers -patchfiles="" -OPT_CONFIG="" -DOCS="README" +build=P3 +src=nfs-utils-$vers +patchfiles="nfs-utils-heimdal.patch" +OPT_CONFIG="--disable-nfsv4 --disable-gss --with-krb5=/usr/heimdal" +DOCS="README NEWS INSTALL COPYING" template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -36,6 +37,14 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + cp -p configure{,.orig} + cat <<- "EOF" | patch configure + 18769c18769 + < -f $dir/lib/libroken.a; then + --- + > \( -f $dir/lib/libroken.so -o -f $dir/lib64/libroken.so \); then + EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -64,6 +73,39 @@ make install DESTDIR=$P fi done + cat <<- "EOF" > $P/sbin/nfs4_setup.sh + #!/bin/sh + # + # Simple NFSv4 setup scripts for NFS mount by hands + # If you don't invoke rpc.idmapd, NFSv4's UID/username mapping + # function doesn't work and cannot chown files on NFS + + modprobe sunrpc + mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs + /usr/bin/rpcbind + /usr/sbin/rpc.nfsd 4 + /usr/sbin/rpc.mountd + /usr/sbin/rpc.idmapd + /usr/sbin/rpc.statd + EOF + chmod 755 $P/sbin/nfs4_setup.sh + mv $P/usr/sbin/{sm-notify,rpc.statd} $C + mv $C/{sm-notify,rpc.statd} $P/usr/sbin + ln -s /bin/ture $P/usr/sbin/rpc.gssd + mkdir -m 700 $P/var/lib/nfs/{rpc_pipefs,v4recovery} + chown nobody $P/var/lib/nfs/{rpc_pipefs,v4recovery} + mkdir $P/etc + cat <<- "EOF" > $P/etc/idmapd.conf + [General] + Verbosity = 1 + Pipefs-Directory = /var/lib/nfs/rpc_pipefs + Domain = localdomain + + [Mapping] + + Nobody-User = nobody + Nobody-Group = nogroup + EOF touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -71,9 +113,29 @@ compress setup_docdir convert_links - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + cat <<- EOF >> $P/install/doinst.sh + #%% begin initialize $pkg + EOF + cat <<- "EOF" | unexpand >> $P/install/doinst.sh + if [ -z `grep "^nfs" etc/services` ] ; then + echo "adding nfs service into /etc/services" + cat <<- "EOF" >> etc/services + nfs 2049/tcp + nfs 2049/udp + EOF + fi + #%% end + EOF + touch -t `date '+%m%d0900'` $P/install/doinst.sh + tar cvpf $pkg.tar -C $P `cd $P ; find sbin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` + tar rvpf $pkg.tar -C $P var/lib/nfs + tar rvpf $pkg.tar -C $P etc/idmapd.conf + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man5 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man7 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz cleanup