Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Remove never used uidstr/gidstr
Baptiste Daroussin committed 10 years ago
commit d7d8adaf4db2dea36f20cd49ec506805bce1e8f7
parent 54d05e5
11 files changed +6 -808
modified compat/Makefile.am
@@ -1,12 +1,11 @@
noinst_LTLIBRARIES=	libbsd_compat.la
-
noinst_HEADERS=		bsd_compat.h endian_util.h gr_util.h \
+
noinst_HEADERS=		bsd_compat.h endian_util.h \
			humanize_number.h

libbsd_compat_la_SOURCES=	basename.c \
				closefrom.c \
				dirname.c \
				file_at.c \
-
				gr_util.c \
				humanize_number.c \
				strtonum.c \
				strnstr.c \
modified compat/bsd_compat.h
@@ -67,10 +67,6 @@ char *bsd_basename(const char *);
#define eaccess(_p, _m) access(_p, _m)
#endif

-
#if !HAVE_GR_MAKE
-
#include "gr_util.h"
-
#endif
-

#if !HAVE_HUMANIZE_NUMBER
#include "humanize_number.h"
#endif
deleted compat/gr_util.c
@@ -1,638 +0,0 @@
-
/*-
-
 * Copyright (c) 2008 Sean C. Farley <scf@FreeBSD.org>
-
 * All rights reserved.
-
 *
-
 * Redistribution and use in source and binary forms, with or without
-
 * modification, are permitted provided that the following conditions
-
 * are met:
-
 * 1. Redistributions of source code must retain the above copyright
-
 *    notice, this list of conditions and the following disclaimer,
-
 *    without modification, immediately at the beginning of the file.
-
 * 2. Redistributions in binary form must reproduce the above copyright
-
 *    notice, this list of conditions and the following disclaimer in the
-
 *    documentation and/or other materials provided with the distribution.
-
 *
-
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 */
-

-
#include "bsd_compat.h"
-

-
#if !HAVE_GR_MAKE
-

-
#include <sys/param.h>
-
#include <sys/errno.h>
-
#include <sys/stat.h>
-

-
#include <errno.h>
-
#include <ctype.h>
-
#include <err.h>
-
#include <fcntl.h>
-
#include <grp.h>
-
#include <inttypes.h>
-
#include <paths.h>
-
#include <stdbool.h>
-
#include <stdio.h>
-
#include <stdlib.h>
-
#include <string.h>
-
#include <unistd.h>
-

-
static int lockfd = -1;
-
static char group_dir[PATH_MAX];
-
static char group_file[PATH_MAX];
-
static char tempname[PATH_MAX];
-
static int initialized;
-
static size_t grmemlen(const struct group *, const char *, int *);
-
static struct group *grcopy(const struct group *gr, char *mem, const char *, int ndx);
-

-
/*
-
 * Initialize statics
-
 */
-
int
-
gr_init(const char *dir, const char *group)
-
{
-

-
	if (dir == NULL) {
-
		strcpy(group_dir, "/etc");
-
	} else {
-
		if (strlen(dir) >= sizeof(group_dir)) {
-
			errno = ENAMETOOLONG;
-
			return (-1);
-
		}
-
		strcpy(group_dir, dir);
-
	}
-

-
	if (group == NULL) {
-
		if (dir == NULL) {
-
			strcpy(group_file, _PATH_GROUP);
-
		} else if (snprintf(group_file, sizeof(group_file), "%s/group",
-
			group_dir) > (int)sizeof(group_file)) {
-
			errno = ENAMETOOLONG;
-
			return (-1);
-
		}
-
	} else {
-
		if (strlen(group) >= sizeof(group_file)) {
-
			errno = ENAMETOOLONG;
-
			return (-1);
-
		}
-
		strcpy(group_file, group);
-
	}
-

-
	initialized = 1;
-
	return (0);
-
}
-

-
/*
-
 * Lock the group file
-
 */
-
int
-
gr_lock(void)
-
{
-
	if (*group_file == '\0')
-
		return (-1);
-

-
	for (;;) {
-
		struct stat st;
-

-
#if HAVE_FLOPEN
-
		lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
-
#else
-
        lockfd = -1;
-
#endif
-
		if (lockfd == -1) {
-
			if (errno == EWOULDBLOCK) {
-
				errx(1, "the group file is busy");
-
			} else {
-
				err(1, "could not lock the group file: ");
-
			}
-
		}
-
		if (fstat(lockfd, &st) == -1)
-
			err(1, "fstat() failed: ");
-
		if (st.st_nlink != 0)
-
			break;
-
		close(lockfd);
-
		lockfd = -1;
-
	}
-
	return (lockfd);
-
}
-

-
/*
-
 * Create and open a presmuably safe temp file for editing group data
-
 */
-
int
-
gr_tmp(int mfd)
-
{
-
	char buf[8192];
-
	ssize_t nr;
-
	const char *p;
-
	int tfd;
-

-
	if (*group_file == '\0')
-
		return (-1);
-
	if ((p = strrchr(group_file, '/')))
-
		++p;
-
	else
-
		p = group_file;
-
	if (snprintf(tempname, sizeof(tempname), "%.*sgroup.XXXXXX",
-
		(int)(p - group_file), group_file) >= (int)sizeof(tempname)) {
-
		errno = ENAMETOOLONG;
-
		return (-1);
-
	}
-
	if ((tfd = mkstemp(tempname)) == -1)
-
		return (-1);
-
	if (mfd != -1) {
-
		while ((nr = read(mfd, buf, sizeof(buf))) > 0)
-
			if (write(tfd, buf, (size_t)nr) != nr)
-
				break;
-
		if (nr != 0) {
-
			unlink(tempname);
-
			*tempname = '\0';
-
			close(tfd);
-
			return (-1);
-
		}
-
	}
-
	return (tfd);
-
}
-

-
/*
-
 * Copy the group file from one descriptor to another, replacing, deleting
-
 * or adding a single record on the way.
-
 */
-
int
-
gr_copy(int ffd, int tfd, const struct group *gr, struct group *old_gr)
-
{
-
	char buf[8192], *end, *line, *p, *q, *r, t;
-
	struct group *fgr;
-
	const struct group *sgr;
-
	size_t len;
-
	int eof, readlen;
-

-
	sgr = gr;
-
	if (gr == NULL) {
-
		line = NULL;
-
		if (old_gr == NULL)
-
			return (-1);
-
		sgr = old_gr;
-
	} else if ((line = gr_make(gr)) == NULL)
-
		return (-1);
-

-
	eof = 0;
-
	len = 0;
-
	p = q = end = buf;
-
	for (;;) {
-
		/* find the end of the current line */
-
		for (p = q; q < end && *q != '\0'; ++q)
-
			if (*q == '\n')
-
				break;
-

-
		/* if we don't have a complete line, fill up the buffer */
-
		if (q >= end) {
-
			if (eof)
-
				break;
-
			if ((size_t)(q - p) >= sizeof(buf)) {
-
				warnx("group line too long");
-
				errno = EINVAL; /* hack */
-
				goto err;
-
			}
-
			if (p < end) {
-
				q = memmove(buf, p, end -p);
-
				end -= p - buf;
-
			} else {
-
				p = q = end = buf;
-
			}
-
			readlen = read(ffd, end, sizeof(buf) - (end -buf));
-
			if (readlen == -1)
-
				goto err;
-
			else
-
				len = (size_t)readlen;
-
			if (len == 0 && p == buf)
-
				break;
-
			end += len;
-
			len = end - buf;
-
			if (len < (ssize_t)sizeof(buf)) {
-
				eof = 1;
-
				if (len > 0 && buf[len -1] != '\n')
-
					++len, *end++ = '\n';
-
			}
-
			continue;
-
		}
-

-
		/* is it a blank line or a comment? */
-
		for (r = p; r < q && isspace(*r); ++r)
-
			/* nothing */;
-
		if (r == q || *r == '#') {
-
			/* yep */
-
			if (write(tfd, p, q -p + 1) != q - p + 1)
-
				goto err;
-
			++q;
-
			continue;
-
		}
-

-
		/* is it the one we're looking for? */
-

-
		t = *q;
-
		*q = '\0';
-

-
		fgr = gr_scan(r);
-

-
		/* fgr is either a struct group for the current line,
-
		 * or NULL if the line is malformed.
-
		 */
-

-
		*q = t;
-
		if (fgr == NULL || fgr->gr_gid != sgr->gr_gid) {
-
			/* nope */
-
			if (fgr != NULL)
-
				free(fgr);
-
			if (write(tfd, p, q - p + 1) != q - p + 1)
-
				goto err;
-
			++q;
-
			continue;
-
		}
-
		if (old_gr && !gr_equal(fgr, old_gr)) {
-
			warnx("entry inconsistent");
-
			free(fgr);
-
			errno = EINVAL; /* hack */
-
			goto err;
-
		}
-
		free(fgr);
-

-
		/* it is, replace or remove it */
-
		if (line != NULL) {
-
			len = strlen(line);
-
			if (write(tfd, line, len) != (int) len)
-
				goto err;
-
		} else {
-
			/* when removed, avoid the \n */
-
			q++;
-
		}
-
		/* we're done, just copy the rest over */
-
		for (;;) {
-
			if (write(tfd, q, end - q) != end - q)
-
				goto err;
-
			q = buf;
-
			readlen = read(ffd, buf, sizeof(buf));
-
			if (readlen == 0)
-
				break;
-
			else
-
				len = (size_t)readlen;
-
			if (readlen == -1)
-
				goto err;
-
			end = buf + len;
-
		}
-
		goto done;
-
	}
-

-
	/* if we got here, we didn't find the old entry */
-
	if (line == NULL) {
-
		errno = ENOENT;
-
		goto err;
-
	}
-
	len = strlen(line);
-
	if ((size_t)write(tfd, line, len) != len ||
-
	   write(tfd, "\n", 1) != 1)
-
		goto err;
-
 done:
-
	if (line != NULL)
-
		free(line);
-
	return (0);
-
 err:
-
	if (line != NULL)
-
		free(line);
-
	return (-1);
-
}
-

-
/*
-
 * Regenerate the group file
-
 */
-
int
-
gr_mkdb(void)
-
{
-
	if (chmod(tempname, 0644) != 0)
-
		return (-1);
-

-
	return (rename(tempname, group_file));
-
}
-

-
/*
-
 * Clean up. Preserves errno for the caller's convenience.
-
 */
-
void
-
gr_fini(void)
-
{
-
	int serrno;
-

-
	if (!initialized)
-
		return;
-
	initialized = 0;
-
	serrno = errno;
-
	if (*tempname != '\0') {
-
		unlink(tempname);
-
		*tempname = '\0';
-
	}
-
	if (lockfd != -1)
-
		close(lockfd);
-
	errno = serrno;
-
}
-

-
/*
-
 * Compares two struct group's.
-
 */
-
int
-
gr_equal(const struct group *gr1, const struct group *gr2)
-
{
-
	int gr1_ndx;
-
	int gr2_ndx;
-

-
	/* Check that the non-member information is the same. */
-
	if (gr1->gr_name == NULL || gr2->gr_name == NULL) {
-
		if (gr1->gr_name != gr2->gr_name)
-
			return (false);
-
	} else if (strcmp(gr1->gr_name, gr2->gr_name) != 0)
-
		return (false);
-
	if (gr1->gr_passwd == NULL || gr2->gr_passwd == NULL) {
-
		if (gr1->gr_passwd != gr2->gr_passwd)
-
			return (false);
-
	} else if (strcmp(gr1->gr_passwd, gr2->gr_passwd) != 0)
-
		return (false);
-
	if (gr1->gr_gid != gr2->gr_gid)
-
		return (false);
-

-
	/* Check all members in both groups.
-
	 * getgrnam can return gr_mem with a pointer to NULL.
-
	 * gr_dup and gr_add strip out this superfluous NULL, setting
-
	 * gr_mem to NULL for no members.
-
	*/
-
	if (gr1->gr_mem != NULL && gr2->gr_mem != NULL) {
-
		int i;
-

-
		for (i = 0; gr1->gr_mem[i] != NULL; i++) {
-
			if (strcmp(gr1->gr_mem[i], gr2->gr_mem[i]) != 0)
-
				return (false);
-
		}
-
	}
-
	/* Count number of members in both structs */
-
	gr2_ndx = 0;
-
	if (gr2->gr_mem != NULL)
-
		for(; gr2->gr_mem[gr2_ndx] != NULL; gr2_ndx++)
-
			/* empty */;
-
	gr1_ndx = 0;
-
	if (gr1->gr_mem != NULL)
-
		for(; gr1->gr_mem[gr1_ndx] != NULL; gr1_ndx++)
-
			/* empty */;
-
	if (gr1_ndx != gr2_ndx)
-
		return (false);
-

-
	return (true);
-
}
-

-
/*
-
 * Make a group line out of a struct group.
-
 */
-
char *
-
gr_make(const struct group *gr)
-
{
-
	const char *group_line_format = "%s:%s:%ju:";
-
	const char *sep;
-
	char *line;
-
	char *p;
-
	size_t line_size;
-
	int ndx;
-

-
	/* Calculate the length of the group line. */
-
	line_size = snprintf(NULL, 0, group_line_format, gr->gr_name,
-
	    gr->gr_passwd, (uintmax_t)gr->gr_gid) + 1;
-
	if (gr->gr_mem != NULL) {
-
		for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++)
-
			line_size += strlen(gr->gr_mem[ndx]) + 1;
-
		if (ndx > 0)
-
			line_size--;
-
	}
-

-
	/* Create the group line and fill it. */
-
	if ((line = p = malloc(line_size)) == NULL)
-
		return (NULL);
-
	p += sprintf(p, group_line_format, gr->gr_name, gr->gr_passwd,
-
	    (uintmax_t)gr->gr_gid);
-
	if (gr->gr_mem != NULL) {
-
		sep = "";
-
		for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) {
-
			p = stpcpy(p, sep);
-
			p = stpcpy(p, gr->gr_mem[ndx]);
-
			sep = ",";
-
		}
-
	}
-

-
	return (line);
-
}
-

-
/*
-
 * Duplicate a struct group.
-
 */
-
struct group *
-
gr_dup(const struct group *gr)
-
{
-
	return (gr_add(gr, NULL));
-
}
-
/*
-
 * Add a new member name to a struct group.
-
 */
-
struct group *
-
gr_add(const struct group *gr, const char *newmember)
-
{
-
	char *mem;
-
	size_t len;
-
	int num_mem;
-

-
	num_mem = 0;
-
	len = grmemlen(gr, newmember, &num_mem);
-
	/* Create new group and copy old group into it. */
-
	if ((mem = malloc(len)) == NULL)
-
		return (NULL);
-
	return (grcopy(gr, mem, newmember, num_mem));
-
}
-

-
/* It is safer to walk the pointers given at gr_mem since there is no
-
 * guarantee the gr_mem + strings are contiguous in the given struct group
-
 * but compactify the new group into the following form.
-
 *
-
 * The new struct is laid out like this in memory. The example given is
-
 * for a group with two members only.
-
 *
-
 * {
-
 * (char *name)
-
 * (char *passwd)
-
 * (int gid)
-
 * (gr_mem * newgrp + sizeof(struct group) + sizeof(**)) points to gr_mem area
-
 * gr_mem area
-
 * (member1 *) 
-
 * (member2 *)
-
 * (NULL)
-
 * (name string)
-
 * (passwd string)
-
 * (member1 string)
-
 * (member2 string)
-
 * }
-
 */
-
/*
-
 * Copy the contents of a group plus given name to a preallocated group struct
-
 */
-
static struct group *
-
grcopy(const struct group *gr, char *dst, const char *name, int ndx)
-
{
-
	int i;
-
	struct group *newgr;
-

-
	newgr = (struct group *)(void *)dst;	/* avoid alignment warning */
-
	dst += sizeof(*newgr);
-
	if (ndx != 0) {
-
		newgr->gr_mem = (char **)(void *)(dst);	/* avoid alignment warning */
-
		dst += (ndx + 1) * sizeof(*newgr->gr_mem);
-
	} else
-
		newgr->gr_mem = NULL;
-
	if (gr->gr_name != NULL) {
-
		newgr->gr_name = dst;
-
		dst = stpcpy(dst, gr->gr_name) + 1;
-
	} else
-
		newgr->gr_name = NULL;
-
	if (gr->gr_passwd != NULL) {
-
		newgr->gr_passwd = dst;
-
		dst = stpcpy(dst, gr->gr_passwd) + 1;
-
	} else
-
		newgr->gr_passwd = NULL;
-
	newgr->gr_gid = gr->gr_gid;
-
	i = 0;
-
	/* Original group struct might have a NULL gr_mem */
-
	if (gr->gr_mem != NULL) {
-
		for (; gr->gr_mem[i] != NULL; i++) {
-
			newgr->gr_mem[i] = dst;
-
			dst = stpcpy(dst, gr->gr_mem[i]) + 1;
-
		}
-
	}
-
	/* If name is not NULL, newgr->gr_mem is known to be not NULL */
-
	if (name != NULL) {
-
		newgr->gr_mem[i++] = dst;
-
		dst = stpcpy(dst, name) + 1;
-
	}
-
	/* if newgr->gr_mem is not NULL add NULL marker */
-
	if (newgr->gr_mem != NULL)
-
		newgr->gr_mem[i] = NULL;
-

-
	return (newgr);
-
}
-

-
/*
-
 *  Calculate length of a struct group + given name
-
 */
-
static size_t
-
grmemlen(const struct group *gr, const char *name, int *num_mem)
-
{
-
	size_t len;
-
	int i;
-

-
	if (gr == NULL)
-
		return (0);
-
	/* Calculate size of the group. */
-
	len = sizeof(*gr);
-
	if (gr->gr_name != NULL)
-
		len += strlen(gr->gr_name) + 1;
-
	if (gr->gr_passwd != NULL)
-
		len += strlen(gr->gr_passwd) + 1;
-
	i = 0;
-
	if (gr->gr_mem != NULL) {
-
		for (; gr->gr_mem[i] != NULL; i++) {
-
			len += strlen(gr->gr_mem[i]) + 1;
-
			len += sizeof(*gr->gr_mem);
-
		}
-
	}
-
	if (name != NULL) {
-
		i++;
-
		len += strlen(name) + 1;
-
		len += sizeof(*gr->gr_mem);
-
	}
-
	/* Allow for NULL pointer */
-
	if (i != 0)
-
		len += sizeof(*gr->gr_mem);
-
	*num_mem = i;
-
	return(len);
-
}
-

-
/*
-
 * Scan a line and place it into a group structure.
-
 */
-
static bool
-
__gr_scan(char *line, struct group *gr)
-
{
-
	char *loc;
-
	int ndx;
-

-
	/* Assign non-member information to structure. */
-
	gr->gr_name = line;
-
	if ((loc = strchr(line, ':')) == NULL)
-
		return (false);
-
	*loc = '\0';
-
	gr->gr_passwd = loc + 1;
-
	if (*gr->gr_passwd == ':')
-
		*gr->gr_passwd = '\0';
-
	else {
-
		if ((loc = strchr(loc + 1, ':')) == NULL)
-
			return (false);
-
		*loc = '\0';
-
	}
-
	if (sscanf(loc + 1, "%u", &gr->gr_gid) != 1)
-
		return (false);
-

-
	/* Assign member information to structure. */
-
	if ((loc = strchr(loc + 1, ':')) == NULL)
-
		return (false);
-
	line = loc + 1;
-
	gr->gr_mem = NULL;
-
	ndx = 0;
-
	do {
-
		gr->gr_mem = realloc(gr->gr_mem, sizeof(*gr->gr_mem) *
-
		    (ndx + 1));
-
		if (gr->gr_mem == NULL)
-
			return (false);
-

-
		/* Skip locations without members (i.e., empty string). */
-
		do {
-
			gr->gr_mem[ndx] = strsep(&line, ",");
-
		} while (gr->gr_mem[ndx] != NULL && *gr->gr_mem[ndx] == '\0');
-
	} while (gr->gr_mem[ndx++] != NULL);
-

-
	return (true);
-
}
-

-
/*
-
 * Create a struct group from a line.
-
 */
-
struct group *
-
gr_scan(const char *line)
-
{
-
	struct group gr;
-
	char *line_copy;
-
	struct group *new_gr;
-

-
	if ((line_copy = strdup(line)) == NULL)
-
		return (NULL);
-
	if (!__gr_scan(line_copy, &gr)) {
-
		free(line_copy);
-
		return (NULL);
-
	}
-
	new_gr = gr_dup(&gr);
-
	free(line_copy);
-
	if (gr.gr_mem != NULL)
-
		free(gr.gr_mem);
-

-
	return (new_gr);
-
}
-

-
#endif
modified docs/pkg_printf.3
@@ -30,7 +30,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-
.Dd January 18, 2015
+
.Dd August 15, 2015
.Dt PKG_PRINTF 3
.Os
.Sh NAME
@@ -539,20 +539,6 @@ Groups [array]
.Pp
Default row format:
.Cm "%G%{%Gn\en%|%}"
-
.It Cm %Gg
-
Group GID-string [string]
-
.Vt struct pkg_group *
-
.Pp
-
The GID-string consists of a colon-separated list containing the
-
group name,
-
.Sq *
-
as a place holder instead of any hashed password for the group,
-
the group identifier number and a possibly empty comma separated list
-
of the group members,
-
equivalent to one line from
-
.Fa /etc/group
-
as described in
-
.Xr group 5 .
.It Cm %Gn
Group name [string]
.Vt struct pkg_group *
@@ -613,23 +599,6 @@ Default row format:
.It Cm %Un
User name [string]
.Vt struct pkg_user *
-
.It Cm %Uu
-
User UID-str [string]
-
.Vt struct pkg_user *
-
.Pp
-
The UID-string consists of a colon-separated list containing the
-
user name,
-
.Sq *
-
as a place holder instead of any hashed password for the user, the
-
user identifier number, the user's login group id, an empty field for
-
the user login class, zero for the password change time, zero for the
-
account expiry time,
-
.Sq gecos
-
string (general information about the user), the user's home directory
-
and the user's login shell; equivalent to one line from
-
.Fa /etc/master.passwd
-
as described in
-
.Xr passwd 5 .
.It Cm \^%V
Old version [string].
Valid only during operations when one version of a package is being
modified libpkg/pkg.c
@@ -598,7 +598,7 @@ pkg_requires(const struct pkg *pkg, char **c)
}

int
-
pkg_adduid(struct pkg *pkg, const char *name, const char *uidstr)
+
pkg_adduser(struct pkg *pkg, const char *name)
{
	struct pkg_user *u = NULL;

@@ -620,24 +620,13 @@ pkg_adduid(struct pkg *pkg, const char *name, const char *uidstr)

	strlcpy(u->name, name, sizeof(u->name));

-
	if (uidstr != NULL)
-
		strlcpy(u->uidstr, uidstr, sizeof(u->uidstr));
-
	else
-
		u->uidstr[0] = '\0';
-

	HASH_ADD_STR(pkg->users, name, u);

	return (EPKG_OK);
}

int
-
pkg_adduser(struct pkg *pkg, const char *name)
-
{
-
	return (pkg_adduid(pkg, name, NULL));
-
}
-

-
int
-
pkg_addgid(struct pkg *pkg, const char *name, const char *gidstr)
+
pkg_addgroup(struct pkg *pkg, const char *name)
{
	struct pkg_group *g = NULL;

@@ -658,10 +647,6 @@ pkg_addgid(struct pkg *pkg, const char *name, const char *gidstr)
	pkg_group_new(&g);

	strlcpy(g->name, name, sizeof(g->name));
-
	if (gidstr != NULL)
-
		strlcpy(g->gidstr, gidstr, sizeof(g->gidstr));
-
	else
-
		g->gidstr[0] = '\0';

	HASH_ADD_STR(pkg->groups, name, g);

@@ -669,12 +654,6 @@ pkg_addgid(struct pkg *pkg, const char *name, const char *gidstr)
}

int
-
pkg_addgroup(struct pkg *pkg, const char *name)
-
{
-
	return (pkg_addgid(pkg, name, NULL));
-
}
-

-
int
pkg_adddep(struct pkg *pkg, const char *name, const char *origin, const char *version, bool locked)
{
	struct pkg_dep *d = NULL;
modified libpkg/pkg_manifest.c
@@ -90,7 +90,6 @@ static struct manifest_key {
	{ "dirs",                PKG_DIRS,                UCL_ARRAY,  pkg_array},
	{ "files",               PKG_FILES,               UCL_OBJECT, pkg_obj},
	{ "flatsize",            PKG_FLATSIZE,            UCL_INT,    pkg_int},
-
	{ "groups",              PKG_GROUPS,              UCL_OBJECT, pkg_obj},
	{ "groups",              PKG_GROUPS,              UCL_ARRAY,  pkg_array},
	{ "licenselogic",        PKG_LICENSE_LOGIC,       UCL_STRING, pkg_string},
	{ "licenses",            PKG_LICENSES,            UCL_ARRAY,  pkg_array},
@@ -113,7 +112,6 @@ static struct manifest_key {
	{ "shlibs_provided",     PKG_SHLIBS_PROVIDED,     UCL_ARRAY,  pkg_array},
	{ "shlibs_required",     PKG_SHLIBS_REQUIRED,     UCL_ARRAY,  pkg_array},
	{ "sum",                 PKG_CKSUM,               UCL_STRING, pkg_string},
-
	{ "users",               PKG_USERS,               UCL_OBJECT, pkg_obj},
	{ "users",               PKG_USERS,               UCL_ARRAY,  pkg_array},
	{ "version",             PKG_VERSION,             UCL_STRING, pkg_string},
	{ "version",             PKG_VERSION,             UCL_INT,    pkg_string},
@@ -468,20 +466,6 @@ pkg_obj(struct pkg *pkg, const ucl_object_t *obj, int attr)
			else
				pkg_set_dirs_from_object(pkg, cur);
			break;
-
		case PKG_USERS:
-
			if (cur->type == UCL_STRING)
-
				pkg_adduid(pkg, key, ucl_object_tostring(cur));
-
			else
-
				pkg_emit_error("Skipping malformed users %s",
-
				    key);
-
			break;
-
		case PKG_GROUPS:
-
			if (cur->type == UCL_STRING)
-
				pkg_addgid(pkg, key, ucl_object_tostring(cur));
-
			else
-
				pkg_emit_error("Skipping malformed groups %s",
-
				    key);
-
			break;
		case PKG_DIRECTORIES:
			if (cur->type == UCL_BOOLEAN) {
				urldecode(key, &tmp);
modified libpkg/pkg_printf.c
@@ -76,7 +76,6 @@
 * Fu pkg_file     User owner of file 
 *
 * G  pkg          List of groups
-
 * Gg pkg_group    gidstr (parse this using gr_scan()?)
 * Gn pkg_group    Group name
 *
 * H
@@ -108,7 +107,6 @@
 *
 * U  pkg          List of users
 * Un pkg_user     User name
-
 * Uu pkg_user     uidstr (parse this using pw_scan()?)
 *
 * V  pkg          old version
 * W
@@ -342,15 +340,6 @@ static const struct pkg_printf_fmt fmt[] = {
		PP_PKG,
		&format_files,
	},
-
	[PP_PKG_GROUP_GIDSTR] =
-
	{
-
		'G',
-
		'g',
-
		false,
-
		false,
-
		PP_PKG|PP_G,
-
		&format_group_gidstr,
-
	},
	[PP_PKG_GROUP_NAME] =
	{
		'G',
@@ -486,15 +475,6 @@ static const struct pkg_printf_fmt fmt[] = {
		PP_PKG|PP_U,
		&format_user_name,
	},
-
	[PP_PKG_USER_UIDSTR] =
-
	{
-
		'U',
-
		'u',
-
		false,
-
		false,
-
		PP_PKG|PP_U,
-
		&format_user_uidstr,
-
	},
	[PP_PKG_USERS] =
	{
		'U',
@@ -1158,7 +1138,7 @@ format_file_user(struct sbuf *sbuf, const void *data, struct percent_esc *p)
/*
 * %G -- Groups. list of string values.  Optionally accepts following
 * per-field format in %{ %| %} where %Gn will be replaced by each
-
 * groupname or %#Gn by the gid or %Gg by the "gidstr" -- a line from
+
 * groupname or %#Gn by the gid -- a line from
 * /etc/group. Default %{%Gn\n%|%}
 */
struct sbuf *
@@ -1189,17 +1169,6 @@ format_groups(struct sbuf *sbuf, const void *data, struct percent_esc *p)
}

/*
-
 * %Gg -- Group 'gidstr' (one line from /etc/group).
-
 */
-
struct sbuf *
-
format_group_gidstr(struct sbuf *sbuf, const void *data, struct percent_esc *p)
-
{
-
	const struct pkg_group	*group = data;
-

-
	return (string_val(sbuf, group->gidstr, p));
-
}
-

-
/*
 * %Gn -- Group name.
 */
struct sbuf *
@@ -1394,7 +1363,7 @@ format_char_string(struct sbuf *sbuf, const void *data, struct percent_esc *p)
/*
 * %U -- Users. list of string values.  Optionally accepts following
 * per-field format in %{ %| %} where %Un will be replaced by each
-
 * username or %#Un by the uid or %Uu by the uidstr -- a line from
+
 * username or %#Un by the uid -- a line from
 * /etc/passwd. Default %{%Un\n%|%}
 */
struct sbuf *
@@ -1436,17 +1405,6 @@ format_user_name(struct sbuf *sbuf, const void *data, struct percent_esc *p)
}

/*
-
 * %Uu -- User uidstr (one line from /etc/passwd).
-
 */
-
struct sbuf *
-
format_user_uidstr(struct sbuf *sbuf, const void *data, struct percent_esc *p)
-
{
-
	const struct pkg_user	*user = data;
-

-
	return (string_val(sbuf, user->uidstr, p));
-
}
-

-
/*
 * %V -- Old package version. string. Accepts field width, left align
 */
struct sbuf *
modified libpkg/pkgdb_iterator.c
@@ -537,8 +537,6 @@ pkgdb_load_category(sqlite3 *sqlite, struct pkg *pkg)
static int
pkgdb_load_user(sqlite3 *sqlite, struct pkg *pkg)
{
-
	/*struct pkg_user *u = NULL;
-
	struct passwd *pwd = NULL;*/
	int		ret;
	const char	sql[] = ""
		"SELECT users.name"
@@ -553,22 +551,12 @@ pkgdb_load_user(sqlite3 *sqlite, struct pkg *pkg)
	ret = load_val(sqlite, pkg, sql, PKG_LOAD_USERS,
	    pkg_adduser, PKG_USERS);

-
	/* TODO get user uidstr from local database */
-
/*	while (pkg_users(pkg, &u) == EPKG_OK) {
-
		pwd = getpwnam(u->name);
-
		if (pwd == NULL)
-
			continue;
-
		strlcpy(u->uidstr, pw_make(pwd), sizeof(u->uidstr));
-
	}*/
-

	return (ret);
}

static int
pkgdb_load_group(sqlite3 *sqlite, struct pkg *pkg)
{
-
	struct pkg_group	*g = NULL;
-
	struct group		*grp = NULL;
	int			 ret;
	const char		 sql[] = ""
		"SELECT groups.name"
@@ -583,13 +571,6 @@ pkgdb_load_group(sqlite3 *sqlite, struct pkg *pkg)
	ret = load_val(sqlite, pkg, sql, PKG_LOAD_GROUPS,
	    pkg_addgroup, PKG_GROUPS);

-
	while (pkg_groups(pkg, &g) == EPKG_OK) {
-
		grp = getgrnam(g->name);
-
		if (grp == NULL)
-
			continue;
-
		strlcpy(g->gidstr, gr_make(grp), sizeof(g->gidstr));
-
	}
-

	return (ret);
}

modified libpkg/private/pkg.h
@@ -311,13 +311,11 @@ struct pkg_option {

struct pkg_user {
	char		 name[MAXLOGNAME];
-
	char		 uidstr[8192];/* taken from pw_util.c */
	UT_hash_handle	hh;
};

struct pkg_group {
	char		 name[MAXLOGNAME];
-
	char		 gidstr[8192]; /* taken from gw_util.c */
	UT_hash_handle	hh;
};

@@ -733,8 +731,6 @@ int pkg_kv_add(struct pkg_kv **kv, const char *key, const char *value, const cha
const char *pkg_kv_get(struct pkg_kv *const*kv, const char *key);
int pkg_adduser(struct pkg *pkg, const char *name);
int pkg_addgroup(struct pkg *pkg, const char *group);
-
int pkg_adduid(struct pkg *pkg, const char *name, const char *uidstr);
-
int pkg_addgid(struct pkg *pkg, const char *group, const char *gidstr);
int pkg_addshlib_required(struct pkg *pkg, const char *name);
int pkg_addshlib_provided(struct pkg *pkg, const char *name);
int pkg_addconflict(struct pkg *pkg, const char *name);
modified libpkg/private/pkg_printf.h
@@ -94,7 +94,6 @@ typedef enum _fmt_code_t {
	PP_PKG_FILE_SHA256,
	PP_PKG_FILE_USER,
	PP_PKG_FILES,
-
	PP_PKG_GROUP_GIDSTR,
	PP_PKG_GROUP_NAME,
	PP_PKG_GROUPS,
	PP_ROW_COUNTER,
@@ -110,7 +109,6 @@ typedef enum _fmt_code_t {
	PP_PKG_REPO_PATH,
	PP_PKG_CHAR_STRING,
	PP_PKG_USER_NAME,
-
	PP_PKG_USER_UIDSTR,
	PP_PKG_USERS,
	PP_PKG_OLD_VERSION,
	PP_PKG_AUTOREMOVE,
modified tests/lib/pkg_printf_test.c
@@ -1365,7 +1365,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_PKG, PP_PKG_FILE_SHA256,         2, '\0', },
		{ "Fu", PP_PKG, PP_PKG_FILE_USER,           2, '\0', },
		{ "F",  PP_PKG, PP_PKG_FILES,               1, '\0', },
-
		{ "Gg", PP_PKG, PP_PKG_GROUP_GIDSTR,        2, '\0', },
		{ "Gn", PP_PKG, PP_PKG_GROUP_NAME,          2, '\0', },
		{ "G",  PP_PKG, PP_PKG_GROUPS,              1, '\0', },
		{ "I",  PP_PKG, PP_UNKNOWN,                 0, 'I',  },
@@ -1381,7 +1380,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_PKG, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_PKG, PP_PKG_CHAR_STRING,         1, '\0', },
		{ "Un", PP_PKG, PP_PKG_USER_NAME,           2, '\0', },
-
		{ "Uu", PP_PKG, PP_PKG_USER_UIDSTR,         2, '\0', },
		{ "U",  PP_PKG, PP_PKG_USERS,               1, '\0', },
		{ "V",  PP_PKG, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_PKG, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1434,7 +1432,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_B, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_B, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_B, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_B, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_B, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_B, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_B, PP_ROW_COUNTER,             1, '\0', },
@@ -1450,7 +1447,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_B, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_B, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_B, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_B, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_B, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_B, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_B, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1503,7 +1499,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_C, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_C, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_C, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_C, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_C, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_C, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_C, PP_ROW_COUNTER,             1, '\0', },
@@ -1519,7 +1514,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_C, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_C, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_C, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_C, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_C, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_C, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_C, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1570,7 +1564,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_D, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_D, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_D, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_D, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_D, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_D, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_D, PP_ROW_COUNTER,             1, '\0', },
@@ -1586,7 +1579,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_D, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_D, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_D, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_D, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_D, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_D, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_D, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1638,7 +1630,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_F, PP_PKG_FILE_SHA256,         2, '\0', },
		{ "Fu", PP_F, PP_PKG_FILE_USER,           2, '\0', },
		{ "F",  PP_F, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_F, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_F, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_F, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_F, PP_ROW_COUNTER,             1, '\0', },
@@ -1654,7 +1645,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_F, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_F, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_F, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_F, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_F, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_F, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_F, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1707,7 +1697,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_G, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_G, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_G, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_G, PP_PKG_GROUP_GIDSTR,        2, '\0', },
		{ "Gn", PP_G, PP_PKG_GROUP_NAME,          2, '\0', },
		{ "G",  PP_G, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_G, PP_ROW_COUNTER,             1, '\0', },
@@ -1723,7 +1712,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_G, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_G, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_G, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_G, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_G, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_G, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_G, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1776,7 +1764,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_L, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_L, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_L, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_L, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_L, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_L, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_L, PP_ROW_COUNTER,             1, '\0', },
@@ -1792,7 +1779,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_L, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_L, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_L, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_L, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_L, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_L, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_L, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1845,7 +1831,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_O, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_O, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_O, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_O, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_O, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_O, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_O, PP_ROW_COUNTER,             1, '\0', },
@@ -1861,7 +1846,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_O, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_O, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_O, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_O, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_O, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_O, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_O, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1914,7 +1898,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_U, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_U, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_U, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_U, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_U, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_U, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_U, PP_ROW_COUNTER,             1, '\0', },
@@ -1930,7 +1913,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_U, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_U, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_U, PP_PKG_USER_NAME,           2, '\0', },
-
		{ "Uu", PP_U, PP_PKG_USER_UIDSTR,         2, '\0', },
		{ "U",  PP_U, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_U, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_U, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -1983,7 +1965,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_b, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_b, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_b, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_b, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_b, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_b, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_b, PP_ROW_COUNTER,             1, '\0', },
@@ -1999,7 +1980,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_b, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_b, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_b, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_b, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_b, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_b, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_b, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -2052,7 +2032,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_d, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_d, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_d, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_d, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_d, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_d, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_d, PP_ROW_COUNTER,             1, '\0', },
@@ -2068,7 +2047,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_d, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_d, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_d, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_d, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_d, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_d, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_d, PP_PKG_AUTOREMOVE,          1, '\0', },
@@ -2121,7 +2099,6 @@ ATF_TC_BODY(format_code, tc)
		{ "Fs", PP_r, PP_UNKNOWN,                 0, 'F',  },
		{ "Fu", PP_r, PP_UNKNOWN,                 0, 'F',  },
		{ "F",  PP_r, PP_UNKNOWN,                 0, 'F',  },
-
		{ "Gg", PP_r, PP_UNKNOWN,                 0, 'G',  },
		{ "Gn", PP_r, PP_UNKNOWN,                 0, 'G',  },
		{ "G",  PP_r, PP_UNKNOWN,                 0, 'G',  },
		{ "I",  PP_r, PP_ROW_COUNTER,             1, '\0', },
@@ -2137,7 +2114,6 @@ ATF_TC_BODY(format_code, tc)
		{ "R",  PP_r, PP_PKG_REPO_PATH,           1, '\0', },
		{ "S",  PP_r, PP_UNKNOWN,                 0, 'S',  },
		{ "Un", PP_r, PP_UNKNOWN,                 0, 'U',  },
-
		{ "Uu", PP_r, PP_UNKNOWN,                 0, 'U',  },
		{ "U",  PP_r, PP_UNKNOWN,                 0, 'U',  },
		{ "V",  PP_r, PP_PKG_OLD_VERSION,         1, '\0', },
		{ "a",  PP_r, PP_PKG_AUTOREMOVE,          1, '\0', },