From owner-freebsd-bugs@FreeBSD.ORG Fri Jun 25 17:30:48 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55B6D16A4CE for ; Fri, 25 Jun 2004 17:30:48 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A58A43D2F for ; Fri, 25 Jun 2004 17:30:48 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i5PHUMIj093224 for ; Fri, 25 Jun 2004 17:30:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i5PHUMLh093223; Fri, 25 Jun 2004 17:30:22 GMT (envelope-from gnats) Resent-Date: Fri, 25 Jun 2004 17:30:22 GMT Resent-Message-Id: <200406251730.i5PHUMLh093223@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrea Campi Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BD0916A4CE for ; Fri, 25 Jun 2004 17:27:28 +0000 (GMT) Received: from hal-5.inet.it (hal-5.inet.it [213.92.5.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C40243D46 for ; Fri, 25 Jun 2004 17:27:27 +0000 (GMT) (envelope-from andrea@acampi.inet.it) Received: from acampi.inet.it [::ffff:213.92.1.165] by hal-5.inet.it via I-SMTP-4.8.4-483 id ::ffff:213.92.1.165+SB2eun1IdKo1; Fri, 25 Jun 2004 00:50:11 +0200 Received: by acampi.inet.it (Postfix, from userid 1000) id 36DDF15533; Fri, 25 Jun 2004 00:50:11 +0200 (CEST) Message-Id: <20040624225010.GA20737@webcom.it> Date: Fri, 25 Jun 2004 00:50:11 +0200 From: Andrea Campi To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/68338: [patch] make buildworld fails is NO_YP_LIBC is defined X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andrea Campi List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2004 17:30:48 -0000 >Number: 68338 >Category: bin >Synopsis: [patch] make buildworld fails is NO_YP_LIBC is defined >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jun 25 17:30:22 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Andrea Campi >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD tanja.webcom.it 5.2-CURRENT FreeBSD 5.2-CURRENT #38: Sat Jun 12 16:31:30 CEST 2004 tanja@tanja.webcom.it:/usr/obj/usr/src/sys/TANJA i386 >Description: make -DNO_YP_LIBC buildworld fails with a few errors. The attached patch by Bjoern A. Zeeb fixes them. A related, but orthogonal issue is the name of the option; since it covers far more than libc it should arguably renamed to NO_YP or NOYP. It might be worth to do it as a separate step. >How-To-Repeat: make -DNO_YP_LIBC buildworld >Fix: -- The dark ages were caused by the Y1K problem. --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="10039-no-yp-libc.diff" ! $ZABBADOZ: FreeBSD/patches/10039-no-yp-libc.diff,v 1.8 2004/04/03 21:15:10 bz Exp $ ! ! Author: "Bjoern A. Zeeb" ! ! Description: try to get world compiled with NO_YP_LIBC defined ! --- compile-crisco-20040310-1128/lib/libpam/modules/pam_unix/Makefile.orig Wed Mar 10 13:04:44 2004 +++ compile-crisco-20040310-1128/lib/libpam/modules/pam_unix/Makefile Wed Mar 10 13:07:06 2004 @@ -38,9 +38,16 @@ LIB= pam_unix SRCS= pam_unix.c MAN= pam_unix.8 +.if !defined(NO_YP_LIBC) CFLAGS+= -DYP +.endif -DPADD= ${LIBUTIL} ${LIBCRYPT} ${LIBYPCLNT} -LDADD= -lutil -lcrypt -lypclnt +DPADD= ${LIBUTIL} ${LIBCRYPT} ${_libypclnt} +LDADD= -lutil -lcrypt ${_ypclnt} + +.if !defined(NO_YP_LIBC) +_libypclnt= ${LIBYPCLNT} +_ypclnt= -lypclnt +.endif .include --- compile-crisco-20040310-1128/libexec/Makefile.orig Wed Mar 10 13:08:29 2004 +++ compile-crisco-20040310-1128/libexec/Makefile Wed Mar 10 13:10:21 2004 @@ -12,7 +12,7 @@ SUBDIR= atrun \ ${_lukemftpd} \ ${_mail.local} \ makekey \ - mknetid \ + ${_mknetid} \ ${_named-xfer} \ pppoed \ pt_chown \ @@ -33,7 +33,7 @@ SUBDIR= atrun \ tcpd \ telnetd \ tftpd \ - ypxfr + ${_ypxfr} .if !defined(NO_BIND) _named-xfer= named-xfer @@ -50,6 +50,11 @@ _rtld-elf= rtld-elf .if !defined(NO_SENDMAIL) _mail.local= mail.local _smrsh= smrsh +.endif + +.if !defined(NO_YP_LIBC) +_mknetid= mknetid +_ypxfr= ypxfr .endif .if defined(WANT_LUKEMFTPD) --- compile-crisco-20040310-1447/lib/libc/gen/getnetgrent.c.orig Wed Mar 10 16:28:24 2004 +++ compile-crisco-20040310-1447/lib/libc/gen/getnetgrent.c Wed Mar 10 16:28:36 2004 @@ -200,7 +200,7 @@ setnetgrent(group) return; } #else - if (netf = fopen(_PATH_NETGROUP, "r")) { + if ((netf = fopen(_PATH_NETGROUP, "r"))) { #endif if (parse_netgrp(group)) endnetgrent(); --- compile-crisco-20040310-1447/lib/libc/net/rcmd.c.orig Wed Mar 10 17:56:57 2004 +++ compile-crisco-20040310-1447/lib/libc/net/rcmd.c Wed Mar 10 17:57:28 2004 @@ -55,8 +55,8 @@ __FBSDID("$FreeBSD: src/lib/libc/net/rcm #include #include #include -#ifdef YP #include +#ifdef YP #include #include #endif --- compile-crisco-20040310-1447/lib/libc/rpc/netnamer.c.orig Wed Mar 10 18:02:01 2004 +++ compile-crisco-20040310-1447/lib/libc/rpc/netnamer.c Wed Mar 10 18:02:48 2004 @@ -56,7 +56,9 @@ __FBSDID("$FreeBSD: src/lib/libc/rpc/net #include "un-namespace.h" static char *OPSYS = "unix"; +#ifdef YP static char *NETID = "netid.byname"; +#endif static char *NETIDFILE = "/etc/netid"; static int getnetid( char *, char * ); --- compile-accu-20040329-0704/lib/librpcsvc/Makefile.orig Tue May 14 11:37:10 2002 +++ compile-accu-20040329-0704/lib/librpcsvc/Makefile Mon Mar 29 16:21:44 2004 @@ -9,8 +9,12 @@ RPCSRCS= klm_prot.x mount.x nfs_prot.x n rquota.x rstat.x rwall.x sm_inter.x spray.x yppasswd.x ypxfrd.x \ ypupdate_prot.x -OTHERSRCS= rnusers.c rstat.c rwall.c yp_passwd.c yp_update.c +OTHERSRCS= rnusers.c rstat.c rwall.c ${_ypothersrc} SECRPCSRCS= secretkey.c xcrypt.c + +.if !defined(NO_YP_LIBC) +_ypothersrc= yp_passwd.c yp_update.c +.endif RPCCOM = rpcgen -C --- compile-crisco-20040310-2123/lib/libwrap/Makefile.orig Thu Mar 11 08:19:23 2004 +++ compile-crisco-20040310-2123/lib/libwrap/Makefile Thu Mar 11 08:26:45 2004 @@ -17,6 +17,9 @@ CFLAGS+=-DFACILITY=LOG_AUTH -DHOSTS_ACCE -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 \ -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" \ -DSYS_ERRLIST_DEFINED -DALWAYS_HOSTNAME -DUSE_STRSEP -DPROCESS_OPTIONS +.if defined(NO_YP_LIBC) +CFLAGS+=-DUSE_GETDOMAIN +.endif .if !defined(NOINET6) CFLAGS+=-DINET6 .endif --- compile-accu-20040329-0704/usr.bin/chkey/Makefile.orig Sun Jan 18 11:41:27 2004 +++ compile-accu-20040329-0704/usr.bin/chkey/Makefile Mon Mar 29 07:13:13 2004 @@ -4,7 +4,10 @@ PROG= chkey SRCS= chkey.c generic.c update.c -CFLAGS+=-DYP -I${.CURDIR}/../newkey +CFLAGS+=-I${.CURDIR}/../newkey +.if !defined(NO_YP_LIBC) +CFLAGS+=-DYP +.endif DISTRIBUTION= crypto DPADD= ${LIBRPCSVC} ${LIBMP} ${LIBCRYPTO} LDADD= -lrpcsvc -lmp -lcrypto --- compile-crisco-20040312-0944/usr.bin/chpass/Makefile.orig Mon Dec 30 09:46:58 2002 +++ compile-crisco-20040312-0944/usr.bin/chpass/Makefile Fri Mar 12 12:19:02 2004 @@ -8,13 +8,19 @@ SRCS= chpass.c edit.c field.c pw_scan.c BINOWN= root BINMODE=4555 WARNS?= 5 +.if !defined(NO_YP_LIBC) CFLAGS+=-DYP +.endif #Some people need this, uncomment to activate #CFLAGS+=-DRESTRICT_FULLNAME_CHANGE CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I. -DPADD= ${LIBCRYPT} ${LIBUTIL} ${LIBYPCLNT} -LDADD= -lcrypt -lutil -lypclnt +DPADD= ${LIBCRYPT} ${LIBUTIL} +LDADD= -lcrypt -lutil +.if !defined(NO_YP_LIBC) +DPADD+= ${LIBYPCLNT} +LDADD+= -lypclnt +.endif LINKS= ${BINDIR}/chpass ${BINDIR}/chfn LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh --- compile-crisco-20040311-2214/usr.bin/newkey/Makefile.orig Fri Mar 12 09:20:33 2004 +++ compile-crisco-20040311-2214/usr.bin/newkey/Makefile Fri Mar 12 09:20:51 2004 @@ -2,7 +2,9 @@ PROG= newkey SRCS= newkey.c generic.c update.c +.if !defined(NO_YP_LIBC) CFLAGS+= -DYP +.endif MAN= newkey.8 DISTRIBUTION= crypto DPADD= ${LIBRPCSVC} ${LIBMP} ${LIBCRYPTO} --- compile-crisco-20040312-1244/usr.bin/Makefile.orig Fri Mar 12 15:28:51 2004 +++ compile-crisco-20040312-1244/usr.bin/Makefile Fri Mar 12 15:30:02 2004 @@ -220,9 +220,9 @@ SUBDIR= alias \ xstr \ ${_yacc} \ yes \ - ypcat \ - ypmatch \ - ypwhich + ${_ypcat} \ + ${_ypmatch} \ + ${_ypwhich} .if ${MACHINE_ARCH} != "amd64" && ${MACHINE_ARCH} != "powerpc" _truss= truss @@ -262,6 +262,12 @@ _yacc= yacc .if !defined(NO_USB) _usbhidaction= usbhidaction _usbhidctl= usbhidctl +.endif + +.if !defined(NO_YP_LIBC) +_ypcat= ypcat +_ypmatch= ypmatch +_ypwhich= ypwhich .endif .if ${MACHINE_ARCH} == "i386" --- compile-crisco-20040311-2214/usr.sbin/Makefile.orig Fri Mar 12 09:21:59 2004 +++ compile-crisco-20040311-2214/usr.sbin/Makefile Fri Mar 12 09:31:02 2004 @@ -133,9 +133,9 @@ rpc.lockd \ rpc.statd \ rpc.umntall \ - rpc.yppasswdd \ - rpc.ypupdated \ - rpc.ypxfrd \ + ${_rpc.yppasswdd} \ + ${_rpc.ypupdated} \ + ${_rpc.ypxfrd} \ rrenumd \ rtadvd \ rtprio \ @@ -173,12 +173,12 @@ watchdogd \ wicontrol \ ${_wlconfig} \ - ypbind \ - yp_mkdb \ - yppoll \ - yppush \ - ypserv \ - ypset \ + ${_ypbind} \ + ${_yp_mkdb} \ + ${_yppoll} \ + ${_yppush} \ + ${_ypserv} \ + ${_ypset} \ zic \ ${_zzz} @@ -240,6 +240,18 @@ .if !defined(NO_USB) _usbd= usbd _usbdevs= usbdevs +.endif + +.if !defined(NO_YP_LIBC) +_rpc.yppasswdd= rpc.yppasswdd +_rpc.ypupdated= rpc.ypupdated +_rpc.ypxfrd= rpc.ypxfrd +_ypbind= ypbind +_yp_mkdb= yp_mkdb +_yppoll= yppoll +_yppush= yppush +_ypserv= ypserv +_ypset= ypset .endif .if ${MACHINE_ARCH} == "i386" --- compile-crisco-20040312-1538/usr.sbin/amd/amd/Makefile.orig Fri Mar 12 21:31:50 2004 +++ compile-crisco-20040312-1538/usr.sbin/amd/amd/Makefile Fri Mar 12 21:32:41 2004 @@ -15,7 +15,7 @@ SRCS+= am_ops.c amd.c amfs_auto.c amfs_d SRCS+= amfs_host.c amfs_inherit.c amfs_link.c amfs_linkx.c amfs_nfsl.c SRCS+= amfs_nfsx.c amfs_program.c amfs_root.c amfs_toplvl.c SRCS+= amfs_union.c amq_subr.c amq_svc.c autil.c clock.c conf.c -SRCS+= get_args.c info_file.c info_hesiod.c info_ndbm.c info_nis.c info_passwd.c +SRCS+= get_args.c info_file.c info_hesiod.c info_ndbm.c ${_info_nis.c} info_passwd.c SRCS+= info_union.c map.c mapc.c mntfs.c nfs_prot_svc.c nfs_start.c SRCS+= nfs_subr.c ops_cdfs.c ops_mfs.c ops_nfs.c ops_nfs3.c SRCS+= ops_nullfs.c ops_pcfs.c ops_tfs.c ops_ufs.c ops_umapfs.c @@ -38,5 +38,9 @@ CLEANFILES+= mount_xdr.c mount_xdr.c: ${MOUNT_X} ${RPCCOM} -c -DWANT_NFS3 ${MOUNT_X} -o ${.TARGET} + +.if !defined(NO_YP_LIBC) +_info_nis.c= info_nis.c +.endif .include --- compile-crisco-20040312-1538/usr.sbin/amd/include/Makefile.orig Fri Mar 12 21:26:32 2004 +++ compile-crisco-20040312-1538/usr.sbin/amd/include/Makefile Fri Mar 12 21:31:01 2004 @@ -8,6 +8,9 @@ # $NetBSD: Makefile,v 1.8 1998/08/08 22:33:37 christos Exp $ SRCS= config_local.h +.if defined(NO_YP_LIBC) +SRCS+= localconfig.h +.endif CLEANFILES= ${SRCS} all depend: ${SRCS} @@ -15,5 +18,11 @@ all depend: ${SRCS} config_local.h: newvers.sh @rm -f ${.TARGET} sh ${.ALLSRC} ${.CURDIR}/../../../sys/conf/newvers.sh > ${.TARGET} + +localconfig.h: + @rm -f ${.TARGET} + @echo "/* NIS disabled by NO_YP_LIBC make.conf option */" >> ${.TARGET} + @echo "#undef HAVE_MAP_NIS" >> ${.TARGET} + .include --- compile-crisco-20040312-2333/usr.sbin/amd/Makefile.inc.orig Sat Mar 13 09:24:42 2004 +++ compile-crisco-20040312-2333/usr.sbin/amd/Makefile.inc Sat Mar 13 09:25:30 2004 @@ -17,6 +17,9 @@ CFLAGS+= -I${.OBJDIR}/../include CFLAGS+= -I${.CURDIR}/../../../contrib/amd/include CFLAGS+= -I${.CURDIR}/../../../contrib/amd CFLAGS+= -DHAVE_CONFIG_H +.if defined(NO_YP_LIBC) +CFLAGS+= -DHAVE_LOCALCONFIG_H +.endif CFLAGS+= -DHOST_CPU=\"${MACHINE_ARCH}\" -DHOST_ARCH=\"${MACHINE_ARCH}\" --- compile-crisco-20040313-0930/usr.sbin/bootparamd/bootparamd/bootparamd.c.orig Sat Mar 13 17:52:34 2004 +++ compile-crisco-20040313-0930/usr.sbin/bootparamd/bootparamd/bootparamd.c Sat Mar 13 18:12:00 2004 @@ -12,9 +12,11 @@ static const char rcsid[] = "$FreeBSD: src/usr.sbin/bootparamd/bootparamd/bootparamd.c,v 1.11 2003/10/26 05:51:51 peter Exp $"; #endif /* not lint */ +#ifdef YP #include #include #include +#endif #include "bootparam_prot.h" #include #include @@ -191,7 +193,9 @@ int blen; char *where; static char *result; int resultlen; +#ifdef YP static char *yp_domain; +#endif int ch, pch, fid_len, res = 0; int match = 0; @@ -212,6 +216,7 @@ int blen; } } if (*hostname == '+' ) { /* NIS */ +#ifdef YP if (yp_get_default_domain(&yp_domain)) { if (debug) warn("NIS"); return(0); @@ -230,6 +235,9 @@ int blen; if (fclose(bpf)) warnx("could not close %s", bootpfile); return(1); +#else + return(0); /* ENOTSUP */ +#endif } /* skip to next entry */ if ( match ) break; @@ -288,7 +296,9 @@ int len; int res = 0; static char *result; int resultlen; +#ifdef YP static char *yp_domain; +#endif /* struct hostent *cmp_he;*/ @@ -315,6 +325,7 @@ int len; } } if (*hostname == '+' ) { /* NIS */ +#ifdef YP if (yp_get_default_domain(&yp_domain)) { if (debug) warn("NIS"); return(0); @@ -332,6 +343,9 @@ int len; if (fclose(bpf)) warnx("could not close %s", bootpfile); return(res); +#else + return(0); /* ENOTSUP */ +#endif } /* skip to next entry */ pch = ch = getc(bpf); --- compile-crisco-20040313-0930/usr.sbin/bootparamd/bootparamd/Makefile.orig Sat Mar 13 18:12:03 2004 +++ compile-crisco-20040313-0930/usr.sbin/bootparamd/bootparamd/Makefile Sat Mar 13 18:12:30 2004 @@ -7,6 +7,9 @@ SRCS= bootparamd.c main.c ${GENSRCS} GENSRCS=bootparam_prot.h bootparam_prot_svc.c bootparam_prot_xdr.c CFLAGS+= -DTFTP_DIR=\"/tftpboot\" -I. +.if !defined(NO_YP_LIBC) +CFLAGS+= -DYP +.endif CLEANFILES= ${GENSRCS} --OXfL5xGRrasGEqWY-- >Release-Note: >Audit-Trail: >Unformatted: --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline