svn commit: r265994 - in user/cperciva/freebsd-update-build/patches: 10.0-RELEASE 8.4-RELEASE 9.1-RELEASE 9.2-RELEASE

Xin LI delphij at FreeBSD.org
Wed May 14 00:39:57 UTC 2014


Author: delphij
Date: Wed May 14 00:39:54 2014
New Revision: 265994
URL: http://svnweb.freebsd.org/changeset/base/265994

Log:
  Patch for May 13 batch.

Added:
  user/cperciva/freebsd-update-build/patches/10.0-RELEASE/3-EN-14:05.ciss
  user/cperciva/freebsd-update-build/patches/10.0-RELEASE/3-SA-14:10.openssl
  user/cperciva/freebsd-update-build/patches/8.4-RELEASE/10-EN-14:03.pkg
  user/cperciva/freebsd-update-build/patches/8.4-RELEASE/10-EN-14:04.kldxref
  user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:03.pkg
  user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:04.kldxref
  user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:05.ciss
  user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:03.pkg
  user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:04.kldxref
  user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:05.ciss

Added: user/cperciva/freebsd-update-build/patches/10.0-RELEASE/3-EN-14:05.ciss
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/10.0-RELEASE/3-EN-14:05.ciss	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,65 @@
+Index: sys/dev/ciss/ciss.c
+===================================================================
+--- sys/dev/ciss/ciss.c	(revision 264510)
++++ sys/dev/ciss/ciss.c	(revision 264511)
+@@ -180,8 +180,6 @@
+ static void	ciss_cam_poll(struct cam_sim *sim);
+ static void	ciss_cam_complete(struct ciss_request *cr);
+ static void	ciss_cam_complete_fixup(struct ciss_softc *sc, struct ccb_scsiio *csio);
+-static struct cam_periph *ciss_find_periph(struct ciss_softc *sc,
+-					   int bus, int target);
+ static int	ciss_name_device(struct ciss_softc *sc, int bus, int target);
+ 
+ /* periodic status monitoring */
+@@ -3398,27 +3396,6 @@
+ 
+ 
+ /********************************************************************************
+- * Find a peripheral attached at (target)
+- */
+-static struct cam_periph *
+-ciss_find_periph(struct ciss_softc *sc, int bus, int target)
+-{
+-    struct cam_periph	*periph;
+-    struct cam_path	*path;
+-    int			status;
+-
+-    status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]),
+-			     target, 0);
+-    if (status == CAM_REQ_CMP) {
+-	periph = cam_periph_find(path, NULL);
+-	xpt_free_path(path);
+-    } else {
+-	periph = NULL;
+-    }
+-    return(periph);
+-}
+-
+-/********************************************************************************
+  * Name the device at (target)
+  *
+  * XXX is this strictly correct?
+@@ -3427,12 +3404,22 @@
+ ciss_name_device(struct ciss_softc *sc, int bus, int target)
+ {
+     struct cam_periph	*periph;
++    struct cam_path	*path;
++    int			status;
+ 
+     if (CISS_IS_PHYSICAL(bus))
+ 	return (0);
+-    if ((periph = ciss_find_periph(sc, bus, target)) != NULL) {
++
++    status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]),
++			     target, 0);
++
++    if (status == CAM_REQ_CMP) {
++    	mtx_lock(&sc->ciss_mtx);
++	periph = cam_periph_find(path, NULL);
+ 	sprintf(sc->ciss_logical[bus][target].cl_name, "%s%d",
+ 		periph->periph_name, periph->unit_number);
++    	mtx_unlock(&sc->ciss_mtx);
++	xpt_free_path(path);
+ 	return(0);
+     }
+     sc->ciss_logical[bus][target].cl_name[0] = 0;

Added: user/cperciva/freebsd-update-build/patches/10.0-RELEASE/3-SA-14:10.openssl
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/10.0-RELEASE/3-SA-14:10.openssl	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,15 @@
+Index: crypto/openssl/ssl/s3_pkt.c
+===================================================================
+--- crypto/openssl/ssl/s3_pkt.c	(revision 265111)
++++ crypto/openssl/ssl/s3_pkt.c	(working copy)
+@@ -657,6 +657,10 @@ static int do_ssl3_write(SSL *s, int type, const u
+ 		if (i <= 0)
+ 			return(i);
+ 		/* if it went, fall through and send more stuff */
++		/* we may have released our buffer, so get it again */
++		if (wb->buf == NULL)
++			if (!ssl3_setup_write_buffer(s))
++				return -1;
+ 		}
+ 
+ 	if (len == 0 && !create_empty_fragment)

Added: user/cperciva/freebsd-update-build/patches/8.4-RELEASE/10-EN-14:03.pkg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/8.4-RELEASE/10-EN-14:03.pkg	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,232 @@
+Index: etc/Makefile
+===================================================================
+--- etc/Makefile	(revision 265457)
++++ etc/Makefile	(working copy)
+@@ -172,6 +172,7 @@ distribution:
+ 	${_+_}cd ${.CURDIR}/devd; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/gss; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
++	${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
+ 	${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
+Index: etc/mtree/BSD.root.dist
+===================================================================
+--- etc/mtree/BSD.root.dist	(revision 265457)
++++ etc/mtree/BSD.root.dist	(working copy)
+@@ -52,6 +52,8 @@
+             weekly
+             ..
+         ..
++        pkg
++        ..
+         ppp
+         ..
+         rc.d
+Index: etc/mtree/BSD.usr.dist
+===================================================================
+--- etc/mtree/BSD.usr.dist	(revision 265457)
++++ etc/mtree/BSD.usr.dist	(working copy)
+@@ -340,6 +340,14 @@
+         ..
+         info
+         ..
++        keys
++            pkg
++                revoked
++                ..
++                trusted
++                ..
++            ..
++        ..
+         locale
+             UTF-8
+             ..
+Index: etc/pkg/FreeBSD.conf
+===================================================================
+--- etc/pkg/FreeBSD.conf	(revision 0)
++++ etc/pkg/FreeBSD.conf	(working copy)
+@@ -0,0 +1,16 @@
++# $FreeBSD$
++#
++# To disable this repository, instead of modifying or removing this file,
++# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
++#
++#   mkdir -p /usr/local/etc/pkg/repos
++#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
++#
++
++FreeBSD: {
++  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
++  mirror_type: "srv",
++  signature_type: "fingerprints",
++  fingerprints: "/usr/share/keys/pkg",
++  enabled: yes
++}
+Index: etc/pkg/Makefile
+===================================================================
+--- etc/pkg/Makefile	(revision 0)
++++ etc/pkg/Makefile	(working copy)
+@@ -0,0 +1,10 @@
++# $FreeBSD$
++
++NO_OBJ=
++
++FILES=	FreeBSD.conf
++
++FILESDIR=	/etc/pkg
++FILESMODE=	644
++
++.include <bsd.prog.mk>
+Index: share/Makefile
+===================================================================
+--- share/Makefile	(revision 265457)
++++ share/Makefile	(working copy)
+@@ -9,6 +9,7 @@ SUBDIR=	${_colldef} \
+ 	${_dict} \
+ 	${_doc} \
+ 	${_examples} \
++	keys \
+ 	${_man} \
+ 	${_me} \
+ 	misc \
+Index: share/keys/Makefile
+===================================================================
+--- share/keys/Makefile	(revision 0)
++++ share/keys/Makefile	(working copy)
+@@ -0,0 +1,5 @@
++# $FreeBSD$
++
++SUBDIR= pkg
++
++.include <bsd.subdir.mk>
+Index: share/keys/pkg/Makefile
+===================================================================
+--- share/keys/pkg/Makefile	(revision 0)
++++ share/keys/pkg/Makefile	(working copy)
+@@ -0,0 +1,5 @@
++# $FreeBSD$
++
++SUBDIR=	trusted
++
++.include <bsd.subdir.mk>
+Index: share/keys/pkg/trusted/Makefile
+===================================================================
+--- share/keys/pkg/trusted/Makefile	(revision 0)
++++ share/keys/pkg/trusted/Makefile	(working copy)
+@@ -0,0 +1,10 @@
++# $FreeBSD$
++
++NO_OBJ=
++
++FILES=	pkg.freebsd.org.2013102301
++
++FILESDIR=	/usr/share/keys/pkg/trusted
++FILESMODE=	644
++
++.include <bsd.prog.mk>
+Index: share/keys/pkg/trusted/pkg.freebsd.org.2013102301
+===================================================================
+--- share/keys/pkg/trusted/pkg.freebsd.org.2013102301	(revision 0)
++++ share/keys/pkg/trusted/pkg.freebsd.org.2013102301	(working copy)
+@@ -0,0 +1,4 @@
++# $FreeBSD$
++
++function: "sha256"
++fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"
+Index: share/man/man7/hier.7
+===================================================================
+--- share/man/man7/hier.7	(revision 265457)
++++ share/man/man7/hier.7	(working copy)
+@@ -32,7 +32,7 @@
+ .\"	@(#)hier.7	8.1 (Berkeley) 6/5/93
+ .\" $FreeBSD$
+ .\"
+-.Dd May 25, 2008
++.Dd October 29, 2013
+ .Dt HIER 7
+ .Os
+ .Sh NAME
+@@ -546,6 +546,16 @@ ASCII text files used by various games
+ device description file for device name
+ .It Pa info/
+ GNU Info hypertext system
++.It Pa keys/
++known trusted and revoked keys.
++.Bl -tag -width ".Pa keys/pkg/" -compact
++.It Pa keys/pkg/
++fingerprints for
++.Xr pkg 7
++and
++.Xr pkg 8
++.El
++.Pp
+ .It Pa locale/
+ localization files;
+ see
+Index: usr.sbin/pkg/pkg.c
+===================================================================
+--- usr.sbin/pkg/pkg.c	(revision 265457)
++++ usr.sbin/pkg/pkg.c	(working copy)
+@@ -284,13 +284,10 @@ bootstrap_pkg(void)
+ {
+ 	struct url *u;
+ 	FILE *remote;
+-	FILE *config;
+-	char *site;
+ 	struct dns_srvinfo *mirrors, *current;
+ 	/* To store _https._tcp. + hostname + \0 */
+ 	char zone[MAXHOSTNAMELEN + 13];
+ 	char url[MAXPATHLEN];
+-	char conf[MAXPATHLEN];
+ 	char abi[BUFSIZ];
+ 	char tmppkg[MAXPATHLEN];
+ 	char buf[10240];
+@@ -306,7 +303,6 @@ bootstrap_pkg(void)
+ 	max_retry = 3;
+ 	ret = -1;
+ 	remote = NULL;
+-	config = NULL;
+ 	current = mirrors = NULL;
+ 
+ 	printf("Bootstrapping pkg please wait\n");
+@@ -387,26 +383,6 @@ bootstrap_pkg(void)
+ 	if ((ret = extract_pkg_static(fd, pkgstatic, MAXPATHLEN)) == 0)
+ 		ret = install_pkg_static(pkgstatic, tmppkg);
+ 
+-	snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf",
+-	    getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE);
+-
+-	if (access(conf, R_OK) == -1) {
+-		site = strrchr(url, '/');
+-		if (site == NULL)
+-			goto cleanup;
+-		site[0] = '\0';
+-		site = strrchr(url, '/');
+-		if (site == NULL)
+-			goto cleanup;
+-		site[0] = '\0';
+-
+-		config = fopen(conf, "w+");
+-		if (config == NULL)
+-			goto cleanup;
+-		fprintf(config, "packagesite: %s\n", url);
+-		fclose(config);
+-	}
+-
+ 	goto cleanup;
+ 
+ fetchfail:
+@@ -423,7 +399,11 @@ cleanup:
+ 
+ static const char confirmation_message[] =
+ "The package management tool is not yet installed on your system.\n"
+-"Do you want to fetch and install it now? [y/N]: ";
++"The mechanism for doing this is not secure on FreeBSD 8. To securely install\n"
++"pkg(8), use ports from a portsnap checkout:\n"
++"  # portsnap fetch extract\n"
++"  # make -C /usr/ports/ports-mgmt/pkg install clean\n"
++"Do you still want to fetch and install it now? [y/N]: ";
+ 
+ static int
+ pkg_query_yes_no(void)

Added: user/cperciva/freebsd-update-build/patches/8.4-RELEASE/10-EN-14:04.kldxref
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/8.4-RELEASE/10-EN-14:04.kldxref	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,30 @@
+Index: usr.sbin/kldxref/kldxref.c
+===================================================================
+--- usr.sbin/kldxref/kldxref.c	(revision 265111)
++++ usr.sbin/kldxref/kldxref.c	(working copy)
+@@ -274,6 +274,16 @@ usage(void)
+ 	exit(1);
+ }
+ 
++static int
++compare(const FTSENT *const *a, const FTSENT *const *b)
++{
++	if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D)
++		return 1;
++	if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D)
++		return -1;
++	return strcmp((*a)->fts_name, (*b)->fts_name);
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+@@ -315,7 +325,7 @@ main(int argc, char *argv[])
+ 		err(1, "%s", argv[0]);
+ 	}
+ 
+-	ftsp = fts_open(argv, fts_options, 0);
++	ftsp = fts_open(argv, fts_options, compare);
+ 	if (ftsp == NULL)
+ 		exit(1);
+ 

Added: user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:03.pkg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:03.pkg	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,229 @@
+Index: etc/Makefile
+===================================================================
+--- etc/Makefile	(revision 265457)
++++ etc/Makefile	(working copy)
+@@ -205,6 +205,7 @@ distribution:
+ 	${_+_}cd ${.CURDIR}/devd; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/gss; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
++	${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
+ 	${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
+Index: etc/mtree/BSD.root.dist
+===================================================================
+--- etc/mtree/BSD.root.dist	(revision 265457)
++++ etc/mtree/BSD.root.dist	(working copy)
+@@ -52,6 +52,8 @@
+             weekly
+             ..
+         ..
++        pkg
++        ..
+         ppp
+         ..
+         rc.d
+Index: etc/mtree/BSD.usr.dist
+===================================================================
+--- etc/mtree/BSD.usr.dist	(revision 265457)
++++ etc/mtree/BSD.usr.dist	(working copy)
+@@ -398,6 +398,14 @@
+ 		..
+ 	    ..
+         ..
++        keys
++            pkg
++                revoked
++                ..
++                trusted
++                ..
++            ..
++        ..
+         locale
+             UTF-8
+             ..
+Index: etc/pkg/FreeBSD.conf
+===================================================================
+--- etc/pkg/FreeBSD.conf	(revision 0)
++++ etc/pkg/FreeBSD.conf	(working copy)
+@@ -0,0 +1,16 @@
++# $FreeBSD$
++#
++# To disable this repository, instead of modifying or removing this file,
++# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
++#
++#   mkdir -p /usr/local/etc/pkg/repos
++#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
++#
++
++FreeBSD: {
++  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
++  mirror_type: "srv",
++  signature_type: "fingerprints",
++  fingerprints: "/usr/share/keys/pkg",
++  enabled: yes
++}
+Index: etc/pkg/Makefile
+===================================================================
+--- etc/pkg/Makefile	(revision 0)
++++ etc/pkg/Makefile	(working copy)
+@@ -0,0 +1,10 @@
++# $FreeBSD$
++
++NO_OBJ=
++
++FILES=	FreeBSD.conf
++
++FILESDIR=	/etc/pkg
++FILESMODE=	644
++
++.include <bsd.prog.mk>
+Index: share/Makefile
+===================================================================
+--- share/Makefile	(revision 265457)
++++ share/Makefile	(working copy)
+@@ -10,6 +10,7 @@ SUBDIR=	${_colldef} \
+ 	${_doc} \
+ 	${_examples} \
+ 	${_i18n} \
++	keys \
+ 	${_man} \
+ 	${_me} \
+ 	misc \
+Index: share/keys/Makefile
+===================================================================
+--- share/keys/Makefile	(revision 0)
++++ share/keys/Makefile	(working copy)
+@@ -0,0 +1,5 @@
++# $FreeBSD$
++
++SUBDIR= pkg
++
++.include <bsd.subdir.mk>
+Index: share/keys/pkg/Makefile
+===================================================================
+--- share/keys/pkg/Makefile	(revision 0)
++++ share/keys/pkg/Makefile	(working copy)
+@@ -0,0 +1,5 @@
++# $FreeBSD$
++
++SUBDIR=	trusted
++
++.include <bsd.subdir.mk>
+Index: share/keys/pkg/trusted/Makefile
+===================================================================
+--- share/keys/pkg/trusted/Makefile	(revision 0)
++++ share/keys/pkg/trusted/Makefile	(working copy)
+@@ -0,0 +1,10 @@
++# $FreeBSD$
++
++NO_OBJ=
++
++FILES=	pkg.freebsd.org.2013102301
++
++FILESDIR=	/usr/share/keys/pkg/trusted
++FILESMODE=	644
++
++.include <bsd.prog.mk>
+Index: share/keys/pkg/trusted/pkg.freebsd.org.2013102301
+===================================================================
+--- share/keys/pkg/trusted/pkg.freebsd.org.2013102301	(revision 0)
++++ share/keys/pkg/trusted/pkg.freebsd.org.2013102301	(working copy)
+@@ -0,0 +1,4 @@
++# $FreeBSD$
++
++function: "sha256"
++fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"
+Index: share/man/man7/hier.7
+===================================================================
+--- share/man/man7/hier.7	(revision 265457)
++++ share/man/man7/hier.7	(working copy)
+@@ -32,7 +32,7 @@
+ .\"	@(#)hier.7	8.1 (Berkeley) 6/5/93
+ .\" $FreeBSD$
+ .\"
+-.Dd May 25, 2008
++.Dd October 29, 2013
+ .Dt HIER 7
+ .Os
+ .Sh NAME
+@@ -546,6 +546,16 @@ ASCII text files used by various games
+ device description file for device name
+ .It Pa info/
+ GNU Info hypertext system
++.It Pa keys/
++known trusted and revoked keys.
++.Bl -tag -width ".Pa keys/pkg/" -compact
++.It Pa keys/pkg/
++fingerprints for
++.Xr pkg 7
++and
++.Xr pkg 8
++.El
++.Pp
+ .It Pa locale/
+ localization files;
+ see
+Index: usr.sbin/pkg/pkg.c
+===================================================================
+--- usr.sbin/pkg/pkg.c	(revision 265457)
++++ usr.sbin/pkg/pkg.c	(working copy)
+@@ -282,10 +282,7 @@ static int
+ bootstrap_pkg(void)
+ {
+ 	FILE *remote;
+-	FILE *config;
+-	char *site;
+ 	char url[MAXPATHLEN];
+-	char conf[MAXPATHLEN];
+ 	char abi[BUFSIZ];
+ 	char tmppkg[MAXPATHLEN];
+ 	char buf[10240];
+@@ -300,7 +297,6 @@ bootstrap_pkg(void)
+ 	last = 0;
+ 	ret = -1;
+ 	remote = NULL;
+-	config = NULL;
+ 
+ 	printf("Bootstrapping pkg please wait\n");
+ 
+@@ -355,26 +351,6 @@ bootstrap_pkg(void)
+ 	if ((ret = extract_pkg_static(fd, pkgstatic, MAXPATHLEN)) == 0)
+ 		ret = install_pkg_static(pkgstatic, tmppkg);
+ 
+-	snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf",
+-	    getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE);
+-
+-	if (access(conf, R_OK) == -1) {
+-		site = strrchr(url, '/');
+-		if (site == NULL)
+-			goto cleanup;
+-		site[0] = '\0';
+-		site = strrchr(url, '/');
+-		if (site == NULL)
+-			goto cleanup;
+-		site[0] = '\0';
+-
+-		config = fopen(conf, "w+");
+-		if (config == NULL)
+-			goto cleanup;
+-		fprintf(config, "packagesite: %s\n", url);
+-		fclose(config);
+-	}
+-
+ 	goto cleanup;
+ 
+ fetchfail:
+@@ -391,7 +367,11 @@ cleanup:
+ 
+ static const char confirmation_message[] =
+ "The package management tool is not yet installed on your system.\n"
+-"Do you want to fetch and install it now? [y/N]: ";
++"The mechanism for doing this is not secure on FreeBSD 9.1. To securely install\n"
++"pkg(8), use ports from a portsnap checkout:\n"
++"  # portsnap fetch extract\n"
++"  # make -C /usr/ports/ports-mgmt/pkg install clean\n"
++"Do you still want to fetch and install it now? [y/N]: ";
+ 
+ static int
+ pkg_query_yes_no(void)

Added: user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:04.kldxref
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:04.kldxref	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,30 @@
+Index: usr.sbin/kldxref/kldxref.c
+===================================================================
+--- usr.sbin/kldxref/kldxref.c	(revision 265111)
++++ usr.sbin/kldxref/kldxref.c	(working copy)
+@@ -274,6 +274,16 @@ usage(void)
+ 	exit(1);
+ }
+ 
++static int
++compare(const FTSENT *const *a, const FTSENT *const *b)
++{
++	if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D)
++		return 1;
++	if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D)
++		return -1;
++	return strcmp((*a)->fts_name, (*b)->fts_name);
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+@@ -315,7 +325,7 @@ main(int argc, char *argv[])
+ 		err(1, "%s", argv[0]);
+ 	}
+ 
+-	ftsp = fts_open(argv, fts_options, 0);
++	ftsp = fts_open(argv, fts_options, compare);
+ 	if (ftsp == NULL)
+ 		exit(1);
+ 

Added: user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:05.ciss
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/9.1-RELEASE/13-EN-14:05.ciss	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,65 @@
+Index: sys/dev/ciss/ciss.c
+===================================================================
+--- sys/dev/ciss/ciss.c	(revision 264510)
++++ sys/dev/ciss/ciss.c	(revision 264511)
+@@ -180,8 +180,6 @@
+ static void	ciss_cam_poll(struct cam_sim *sim);
+ static void	ciss_cam_complete(struct ciss_request *cr);
+ static void	ciss_cam_complete_fixup(struct ciss_softc *sc, struct ccb_scsiio *csio);
+-static struct cam_periph *ciss_find_periph(struct ciss_softc *sc,
+-					   int bus, int target);
+ static int	ciss_name_device(struct ciss_softc *sc, int bus, int target);
+ 
+ /* periodic status monitoring */
+@@ -3398,27 +3396,6 @@
+ 
+ 
+ /********************************************************************************
+- * Find a peripheral attached at (target)
+- */
+-static struct cam_periph *
+-ciss_find_periph(struct ciss_softc *sc, int bus, int target)
+-{
+-    struct cam_periph	*periph;
+-    struct cam_path	*path;
+-    int			status;
+-
+-    status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]),
+-			     target, 0);
+-    if (status == CAM_REQ_CMP) {
+-	periph = cam_periph_find(path, NULL);
+-	xpt_free_path(path);
+-    } else {
+-	periph = NULL;
+-    }
+-    return(periph);
+-}
+-
+-/********************************************************************************
+  * Name the device at (target)
+  *
+  * XXX is this strictly correct?
+@@ -3427,12 +3404,22 @@
+ ciss_name_device(struct ciss_softc *sc, int bus, int target)
+ {
+     struct cam_periph	*periph;
++    struct cam_path	*path;
++    int			status;
+ 
+     if (CISS_IS_PHYSICAL(bus))
+ 	return (0);
+-    if ((periph = ciss_find_periph(sc, bus, target)) != NULL) {
++
++    status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]),
++			     target, 0);
++
++    if (status == CAM_REQ_CMP) {
++    	mtx_lock(&sc->ciss_mtx);
++	periph = cam_periph_find(path, NULL);
+ 	sprintf(sc->ciss_logical[bus][target].cl_name, "%s%d",
+ 		periph->periph_name, periph->unit_number);
++    	mtx_unlock(&sc->ciss_mtx);
++	xpt_free_path(path);
+ 	return(0);
+     }
+     sc->ciss_logical[bus][target].cl_name[0] = 0;

Added: user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:03.pkg
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:03.pkg	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,232 @@
+Index: etc/Makefile
+===================================================================
+--- etc/Makefile	(revision 265457)
++++ etc/Makefile	(working copy)
+@@ -224,6 +224,7 @@ distribution:
+ 	${_+_}cd ${.CURDIR}/devd; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/gss; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
++	${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install
+ 	${_+_}cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall
+ 	${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap
+Index: etc/mtree/BSD.root.dist
+===================================================================
+--- etc/mtree/BSD.root.dist	(revision 265457)
++++ etc/mtree/BSD.root.dist	(working copy)
+@@ -52,6 +52,8 @@
+             weekly
+             ..
+         ..
++        pkg
++        ..
+         ppp
+         ..
+         rc.d
+Index: etc/mtree/BSD.usr.dist
+===================================================================
+--- etc/mtree/BSD.usr.dist	(revision 265457)
++++ etc/mtree/BSD.usr.dist	(working copy)
+@@ -402,6 +402,14 @@
+ 		..
+ 	    ..
+         ..
++        keys
++            pkg
++                revoked
++                ..
++                trusted
++                ..
++            ..
++        ..
+         locale
+             UTF-8
+             ..
+Index: etc/pkg/FreeBSD.conf
+===================================================================
+--- etc/pkg/FreeBSD.conf	(revision 0)
++++ etc/pkg/FreeBSD.conf	(working copy)
+@@ -0,0 +1,16 @@
++# $FreeBSD$
++#
++# To disable this repository, instead of modifying or removing this file,
++# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
++#
++#   mkdir -p /usr/local/etc/pkg/repos
++#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
++#
++
++FreeBSD: {
++  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
++  mirror_type: "srv",
++  signature_type: "fingerprints",
++  fingerprints: "/usr/share/keys/pkg",
++  enabled: yes
++}
+Index: etc/pkg/Makefile
+===================================================================
+--- etc/pkg/Makefile	(revision 0)
++++ etc/pkg/Makefile	(working copy)
+@@ -0,0 +1,10 @@
++# $FreeBSD$
++
++NO_OBJ=
++
++FILES=	FreeBSD.conf
++
++FILESDIR=	/etc/pkg
++FILESMODE=	644
++
++.include <bsd.prog.mk>
+Index: share/Makefile
+===================================================================
+--- share/Makefile	(revision 265457)
++++ share/Makefile	(working copy)
+@@ -11,6 +11,7 @@ SUBDIR=	${_colldef} \
+ 	dtrace \
+ 	${_examples} \
+ 	${_i18n} \
++	keys \
+ 	${_man} \
+ 	${_me} \
+ 	misc \
+Index: share/keys/Makefile
+===================================================================
+--- share/keys/Makefile	(revision 0)
++++ share/keys/Makefile	(working copy)
+@@ -0,0 +1,5 @@
++# $FreeBSD$
++
++SUBDIR= pkg
++
++.include <bsd.subdir.mk>
+Index: share/keys/pkg/Makefile
+===================================================================
+--- share/keys/pkg/Makefile	(revision 0)
++++ share/keys/pkg/Makefile	(working copy)
+@@ -0,0 +1,5 @@
++# $FreeBSD$
++
++SUBDIR=	trusted
++
++.include <bsd.subdir.mk>
+Index: share/keys/pkg/trusted/Makefile
+===================================================================
+--- share/keys/pkg/trusted/Makefile	(revision 0)
++++ share/keys/pkg/trusted/Makefile	(working copy)
+@@ -0,0 +1,10 @@
++# $FreeBSD$
++
++NO_OBJ=
++
++FILES=	pkg.freebsd.org.2013102301
++
++FILESDIR=	/usr/share/keys/pkg/trusted
++FILESMODE=	644
++
++.include <bsd.prog.mk>
+Index: share/keys/pkg/trusted/pkg.freebsd.org.2013102301
+===================================================================
+--- share/keys/pkg/trusted/pkg.freebsd.org.2013102301	(revision 0)
++++ share/keys/pkg/trusted/pkg.freebsd.org.2013102301	(working copy)
+@@ -0,0 +1,4 @@
++# $FreeBSD$
++
++function: "sha256"
++fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"
+Index: share/man/man7/hier.7
+===================================================================
+--- share/man/man7/hier.7	(revision 265457)
++++ share/man/man7/hier.7	(working copy)
+@@ -32,7 +32,7 @@
+ .\"	@(#)hier.7	8.1 (Berkeley) 6/5/93
+ .\" $FreeBSD$
+ .\"
+-.Dd January 21, 2010
++.Dd October 29, 2013
+ .Dt HIER 7
+ .Os
+ .Sh NAME
+@@ -546,6 +546,16 @@ ASCII text files used by various games
+ device description file for device name
+ .It Pa info/
+ GNU Info hypertext system
++.It Pa keys/
++known trusted and revoked keys.
++.Bl -tag -width ".Pa keys/pkg/" -compact
++.It Pa keys/pkg/
++fingerprints for
++.Xr pkg 7
++and
++.Xr pkg 8
++.El
++.Pp
+ .It Pa locale/
+ localization files;
+ see
+Index: usr.sbin/pkg/pkg.c
+===================================================================
+--- usr.sbin/pkg/pkg.c	(revision 265457)
++++ usr.sbin/pkg/pkg.c	(working copy)
+@@ -284,13 +284,10 @@ bootstrap_pkg(void)
+ {
+ 	struct url *u;
+ 	FILE *remote;
+-	FILE *config;
+-	char *site;
+ 	struct dns_srvinfo *mirrors, *current;
+ 	/* To store _https._tcp. + hostname + \0 */
+ 	char zone[MAXHOSTNAMELEN + 13];
+ 	char url[MAXPATHLEN];
+-	char conf[MAXPATHLEN];
+ 	char abi[BUFSIZ];
+ 	char tmppkg[MAXPATHLEN];
+ 	char buf[10240];
+@@ -306,7 +303,6 @@ bootstrap_pkg(void)
+ 	max_retry = 3;
+ 	ret = -1;
+ 	remote = NULL;
+-	config = NULL;
+ 	current = mirrors = NULL;
+ 
+ 	printf("Bootstrapping pkg please wait\n");
+@@ -387,26 +383,6 @@ bootstrap_pkg(void)
+ 	if ((ret = extract_pkg_static(fd, pkgstatic, MAXPATHLEN)) == 0)
+ 		ret = install_pkg_static(pkgstatic, tmppkg);
+ 
+-	snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf",
+-	    getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE);
+-
+-	if (access(conf, R_OK) == -1) {
+-		site = strrchr(url, '/');
+-		if (site == NULL)
+-			goto cleanup;
+-		site[0] = '\0';
+-		site = strrchr(url, '/');
+-		if (site == NULL)
+-			goto cleanup;
+-		site[0] = '\0';
+-
+-		config = fopen(conf, "w+");
+-		if (config == NULL)
+-			goto cleanup;
+-		fprintf(config, "packagesite: %s\n", url);
+-		fclose(config);
+-	}
+-
+ 	goto cleanup;
+ 
+ fetchfail:
+@@ -423,7 +399,11 @@ cleanup:
+ 
+ static const char confirmation_message[] =
+ "The package management tool is not yet installed on your system.\n"
+-"Do you want to fetch and install it now? [y/N]: ";
++"The mechanism for doing this is not secure on FreeBSD 9.2. To securely install\n"
++"pkg(8), use ports from a portsnap checkout:\n"
++"  # portsnap fetch extract\n"
++"  # make -C /usr/ports/ports-mgmt/pkg install clean\n"
++"Do you still want to fetch and install it now? [y/N]: ";
+ 
+ static int
+ pkg_query_yes_no(void)

Added: user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:04.kldxref
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:04.kldxref	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,30 @@
+Index: usr.sbin/kldxref/kldxref.c
+===================================================================
+--- usr.sbin/kldxref/kldxref.c	(revision 265111)
++++ usr.sbin/kldxref/kldxref.c	(working copy)
+@@ -274,6 +274,16 @@ usage(void)
+ 	exit(1);
+ }
+ 
++static int
++compare(const FTSENT *const *a, const FTSENT *const *b)
++{
++	if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D)
++		return 1;
++	if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D)
++		return -1;
++	return strcmp((*a)->fts_name, (*b)->fts_name);
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+@@ -315,7 +325,7 @@ main(int argc, char *argv[])
+ 		err(1, "%s", argv[0]);
+ 	}
+ 
+-	ftsp = fts_open(argv, fts_options, 0);
++	ftsp = fts_open(argv, fts_options, compare);
+ 	if (ftsp == NULL)
+ 		exit(1);
+ 

Added: user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:05.ciss
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/patches/9.2-RELEASE/6-EN-14:05.ciss	Wed May 14 00:39:54 2014	(r265994)
@@ -0,0 +1,65 @@
+Index: sys/dev/ciss/ciss.c
+===================================================================
+--- sys/dev/ciss/ciss.c	(revision 264510)
++++ sys/dev/ciss/ciss.c	(revision 264511)
+@@ -180,8 +180,6 @@
+ static void	ciss_cam_poll(struct cam_sim *sim);
+ static void	ciss_cam_complete(struct ciss_request *cr);
+ static void	ciss_cam_complete_fixup(struct ciss_softc *sc, struct ccb_scsiio *csio);
+-static struct cam_periph *ciss_find_periph(struct ciss_softc *sc,
+-					   int bus, int target);
+ static int	ciss_name_device(struct ciss_softc *sc, int bus, int target);
+ 
+ /* periodic status monitoring */
+@@ -3398,27 +3396,6 @@
+ 
+ 
+ /********************************************************************************
+- * Find a peripheral attached at (target)
+- */
+-static struct cam_periph *
+-ciss_find_periph(struct ciss_softc *sc, int bus, int target)
+-{
+-    struct cam_periph	*periph;
+-    struct cam_path	*path;
+-    int			status;
+-
+-    status = xpt_create_path(&path, NULL, cam_sim_path(sc->ciss_cam_sim[bus]),
+-			     target, 0);
+-    if (status == CAM_REQ_CMP) {
+-	periph = cam_periph_find(path, NULL);
+-	xpt_free_path(path);
+-    } else {
+-	periph = NULL;
+-    }
+-    return(periph);
+-}
+-
+-/********************************************************************************
+  * Name the device at (target)
+  *
+  * XXX is this strictly correct?
+@@ -3427,12 +3404,22 @@

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list