--- admin/PlamoBuild.template.common.without_comment 2016-06-15 20:51:13.000000000 +0900 +++ plamo/00_base/old/openbsd_inetd-20160114/PlamoBuild.openbsd_inetd-0.20080125 2016-01-14 19:12:30.000000000 +0900 @@ -1,15 +1,15 @@ #!/bin/sh ###################################################################### -url="" -pkgbase= -vers= +url="http://ftp.debian.org/debian/pool/main/o/openbsd-inetd/openbsd-inetd_0.20080125.orig.tar.gz + http://ftp.debian.org/debian/pool/main/o/openbsd-inetd/openbsd-inetd_0.20080125-6.diff.gz" +pkgbase=openbsd_inetd +vers=0.20080125 arch=`uname -m` -build=P1 -src=$pkgbase-$vers -patchfiles="" +build=P2 +src=openbsd-inetd-$vers.orig OPT_CONFIG="" -DOCS="README" +DOCS="ChangeLog" ###################################################################### fscheck() { @@ -186,35 +186,13 @@ fi if [ $opt_download -eq 1 ] ; then for i in $url ; do - if [ ! -f ${i##*/} ] ; then - wget $i ; j=${i%.*} - for sig in asc sig{,n} {sha{256,1},md5}{,sum} ; do - if wget --spider $i.$sig ; then wget $i.$sig ; break ; fi - if wget --spider $j.$sig ; then - case ${i##*.} in - gz) gunzip -c ${i##*/} > ${j##*/} ;; - bz2) bunzip2 -c ${i##*/} > ${j##*/} ;; - xz) unxz -c ${i##*/} > ${j##*/} ;; - esac - touch -r ${i##*/} ${j##*/} ; i=$j ; wget $i.$sig ; break - fi - done - if [ -f ${i##*/}.$sig ] ; then - case $sig in - asc|sig|sign) gpg2 --verify ${i##*/}.$sig ;; - sha256|sha1|md5) ${sig}sum -c ${i##*/}.$sig ;; - *) $sig -c ${i##*/}.$sig ;; - esac - if [ $? -ne 0 ] ; then echo "archive verify failed" ; exit ; fi - fi - fi + if [ ! -f ${i##*/} ] ; then wget $i ; fi done for i in $url ; do case ${i##*.} in tar) tar xvpf ${i##*/} ;; - gz|tgz) tar xvpzf ${i##*/} ;; - bz2|tbz) tar xvpjf ${i##*/} ;; - xz|txz) tar xvpJf ${i##*/} ;; + gz) tar xvpzf ${i##*/} ;; + bz2) tar xvpjf ${i##*/} ;; esac done fi @@ -222,28 +200,22 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done - for i in `seq 0 $((${#B[@]} - 1))` ; do - cd ${B[$i]} - for j in ${patchfiles[$i]} ; do - case ${j##*.} in - gz) gunzip -c $W/$j | patch -Np1 -i - ;; - bz2) bunzip2 -c $W/j | patch -Np1 -i - ;; - xz) unxz -c $W/$j | patch -Np1 -i - ;; - *) patch -Np1 -i $W/$j ;; - esac - done + cd $B + gunzip -c $W/openbsd-inetd_0.20080125-6.diff.gz | patch -Np1 -i - + for i in `grep "^[^#]" debian/patches/series` ; do + patch -Np1 -i debian/patches/$i done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make clean + make -f Makefile.debian clean fi if [ -f config.log ] ; then rm -rf config.cache config.log fi if [ -x configure ] ; then - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ + ./configure --prefix=/usr --libdir='${exec_prefix}'/$libdir \ + --infodir='${prefix}'/share/info \ --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} fi done @@ -252,7 +224,7 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make + make -f Makefile.debian fi done fi @@ -272,6 +244,139 @@ make install DESTDIR=$P fi done + install -d $P/usr/sbin + install inetd $P/usr/sbin + install -d $mandir/man8 + install -m 644 inetd.8 $mandir/man8 + install -d $P/etc + cat <<- "EOF" > $P/etc/inetd.conf + # See "man 8 inetd" for more information. + # + # If you make changes to this file, either reboot your machine or send the + # inetd a HUP signal: + # Do a "ps x" as root and look up the pid of inetd. Then do a + # "kill -HUP ". + # The inetd will re-read this file whenever it gets that signal. + # + # + # + # The first 4 services are really only used for debugging purposes, so + # we comment them out since they can otherwise be used for some nasty + # denial-of-service attacks. If you need them, uncomment them. + # echo stream tcp nowait root internal + # echo dgram udp wait root internal + # discard stream tcp nowait root internal + # discard dgram udp wait root internal + # daytime stream tcp nowait root internal + # daytime dgram udp wait root internal + # chargen stream tcp nowait root internal + # chargen dgram udp wait root internal + time stream tcp nowait root internal + time dgram udp wait root internal + # + # These are standard services. + # + ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd + telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd + # + # Use this one instead if you want to snoop on telnet users (try to use this + # for ethical purposes, ok folks?) : + # telnet stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.telnetsnoopd + # + # This is generally unnecessary. The daemon provided by INN will handle the + # incoming NNTP connections. + # nntp stream tcp nowait root /usr/sbin/tcpd in.nntpd + # + # This is for BSD sendmail. NOTE: It's not a good idea to uncomment this + # one, since sendmail is already set up to run as a daemon in /etc/rc.d/rc.M. + # But, if you really want to run sendmail this way for some reason, you'll + # need to uncomment the smtp line below AND change the line in /etc/rc.d/rc.M + # to run sendmail like this: /usr/sbin/sendmail -q30m + # ...otherwise the queue will not be processed. + # smtp stream tcp nowait root /usr/sbin/tcpd sendmail -bs + # + # The comsat daemon notifies the user of new mail when biff is set to y: + comsat dgram udp wait root /usr/sbin/tcpd in.comsat + # + # Shell, login, exec and talk are BSD protocols. + # + shell stream tcp nowait root /usr/sbin/tcpd in.rshd -L + login stream tcp nowait root /usr/sbin/tcpd in.rlogind + # exec stream tcp nowait root /usr/sbin/tcpd in.rexecd + # talk dgram udp wait root /usr/sbin/tcpd in.talkd + # ntalk dgram udp wait root /usr/sbin/tcpd in.talkd + ssh stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sshd -i + + # + # Kerberos authenticated services + # + # klogin stream tcp nowait root /usr/sbin/tcpd rlogind -k + # eklogin stream tcp nowait root /usr/sbin/tcpd rlogind -k -x + # kshell stream tcp nowait root /usr/sbin/tcpd rshd -k + # + # Services run ONLY on the Kerberos server + # + # krbupdate stream tcp nowait root /usr/sbin/tcpd registerd + # kpasswd stream tcp nowait root /usr/sbin/tcpd kpasswdd + # + # Pop et al + # + # pop2 stream tcp nowait root /usr/sbin/tcpd in.pop2d + pop3 stream tcp nowait root /usr/sbin/tcpd ipop3d + imap stream tcp nowait root /usr/sbin/tcpd imapd + pop3s stream tcp nowait root /usr/sbin/tcpd ipop3d + imaps stream tcp nowait root /usr/sbin/tcpd imapd + # + # The ipop3d POP3 server is part of the Pine distribution. If you've + # installed the Pine package, you may wish to switch to ipop3d by + # commenting out the pop3 line above, and uncommenting the pop3 line below. + #pop3 stream tcp nowait root /usr/sbin/tcpd ipop3d + # imap2 stream tcp nowait root /usr/sbin/tcpd imapd + # + # The Internet UUCP service. + # + # uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l + # + # Tftp service is provided primarily for booting. Most sites + # run this only on machines acting as "boot servers." + # + # tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd + # bootps dgram udp wait root /usr/sbin/in.bootpd in.bootpd + # + # Finger, systat and netstat give out user information which may be + # valuable to potential "system crackers." Many sites choose to disable + # some or all of these services to improve security. + # Try "telnet localhost systat" and "telnet localhost netstat" to see that + # information yourself! + # + # finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd -w + # systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx + # netstat stream tcp nowait root /usr/sbin/tcpd /bin/netstat -a + # + # Ident service is used for net authentication + auth stream tcp wait root /usr/sbin/in.identd in.identd -w -t120 -l + # + # These are to start Samba, an smb server that can export filesystems to + # Pathworks, Lanmanager for DOS, Windows for Workgroups, Windows95, Lanmanager + # for Windows, Lanmanager for OS/2, Windows NT, etc. + # If you're running smbd and nmbd from daemons in /etc/rc.d/rc.samba, then you + # shouldn't uncomment these lines. + # netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd + # netbios-ns dgram udp wait root /usr/local/samba/bin/nmbd nmbd + # + # Sun-RPC based services. + # + # + # rstatd/1-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rstatd + # rusersd/2-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rusersd + # walld/1 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rwalld + # + + skkserv stream tcp nowait nobody /usr/sbin/tcpd /usr/libexec/dbskkd-cdb + printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd + # End of inetd.conf. + swat stream tcp nowait root /usr/sbin/tcpd /usr/sbin/swat + EOF touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -295,8 +400,9 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert - 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` + tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | 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 etc/inetd.conf tar rvpf $pkg.tar -C $P usr/share/doc/$src touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz