diff options
author | Moriah Waterland <Moriah.Waterland@Sun.COM> | 2009-06-03 20:16:25 -0600 |
---|---|---|
committer | Moriah Waterland <Moriah.Waterland@Sun.COM> | 2009-06-03 20:16:25 -0600 |
commit | 5c51f1241dbbdf2656d0e10011981411ed0c9673 (patch) | |
tree | 0f30a2e38fe4e5d53a5a67264ba548577d82a86f /usr/src/lib/libpkg/common/cfext.h | |
parent | 2b79d384d32b4ea1e278466cd9b0f3bb56daae22 (diff) | |
download | illumos-joyent-5c51f1241dbbdf2656d0e10011981411ed0c9673.tar.gz |
6739234 move SVR4 packaging to ONNV gate
Diffstat (limited to 'usr/src/lib/libpkg/common/cfext.h')
-rw-r--r-- | usr/src/lib/libpkg/common/cfext.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/usr/src/lib/libpkg/common/cfext.h b/usr/src/lib/libpkg/common/cfext.h new file mode 100644 index 0000000000..14ec1fce2a --- /dev/null +++ b/usr/src/lib/libpkg/common/cfext.h @@ -0,0 +1,83 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _CFEXT_H +#define _CFEXT_H + + +#ifdef __cplusplus +extern "C" { +#endif + +#include <pkgstrct.h> + +struct mergstat { + unsigned setuid:1; /* pkgmap entry has setuid */ + unsigned setgid:1; /* ... and/or setgid bit set */ + unsigned contchg:1; /* contents of the files different */ + unsigned attrchg:1; /* attributes are different */ + unsigned shared:1; /* > 1 pkg associated with this */ + unsigned osetuid:1; /* installed set[ug]id process ... */ + unsigned osetgid:1; /* ... being overwritten by pkg. */ + unsigned rogue:1; /* conflicting file not owned by a package */ + unsigned dir2nondir:1; /* was a directory & now a non-directory */ + unsigned replace:1; /* merge makes no sense for this object pair */ + unsigned denied:1; /* for some reason this was not allowed in */ + unsigned preloaded:1; /* already checked in a prior pkg op */ + unsigned processed:1; /* already installed or removed */ + unsigned parentsyml2dir:1; + /* parent directory changed from symlink to a directory */ +}; + +/* + * This is information required by pkgadd for fast operation. A + * cfextra struct is tagged to each cfent structure requiring + * processing. This is how we avoid some unneeded repetition. The + * entries incorporating the word 'local' refer to the path that + * gets us to the delivered package file. In other words, to install + * a file we usually copy from 'local' to 'path' below. In the case + * of a link, where no actual copying takes place, local is the source + * of the link. Note that environment variables are not evaluated in + * the locals unless they are links since the literal path is how + * pkgadd finds the entry under the reloc directory. + */ +struct cfextra { + struct cfent cf_ent; /* basic contents file entry */ + struct mergstat mstat; /* merge status for installs */ + short fsys_value; /* fstab[] entry index */ + short fsys_base; /* actual base filesystem in fs_tab[] */ + char *client_path; /* the client-relative path */ + char *server_path; /* the server-relative path */ + char *map_path; /* as read from the pkgmap */ + char *client_local; /* client_relative local */ + char *server_local; /* server relative local */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _CFEXT_H */ |