aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_install/create/create.h1
-rw-r--r--usr.sbin/pkg_install/create/main.c8
-rw-r--r--usr.sbin/pkg_install/create/perform.c4
-rw-r--r--usr.sbin/pkg_install/create/pkg_create.115
4 files changed, 26 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/create/create.h b/usr.sbin/pkg_install/create/create.h
index aaf96a258ae6..2f683ce03a86 100644
--- a/usr.sbin/pkg_install/create/create.h
+++ b/usr.sbin/pkg_install/create/create.h
@@ -31,6 +31,7 @@ extern char *DeInstall;
extern char *Contents;
extern char *Require;
extern char *PlayPen;
+extern char *ExcludeFrom;
void check_list(char *, Package *);
void usage(const char *, const char *, ...);
diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c
index a82fb1f2f653..0e18187c3522 100644
--- a/usr.sbin/pkg_install/create/main.c
+++ b/usr.sbin/pkg_install/create/main.c
@@ -16,7 +16,7 @@ static const char *rcsid = "$Id: main.c,v 1.4 1993/09/04 05:06:33 jkh Exp $";
#include "lib.h"
#include "create.h"
-static char Options[] = "hvf:p:c:d:i:k:r:t:";
+static char Options[] = "hvf:p:c:d:i:k:r:t:X:";
char *Prefix = NULL;
char *Comment = NULL;
@@ -26,6 +26,7 @@ char *DeInstall = NULL;
char *Contents = NULL;
char *Require = NULL;
char *PlayPen = NULL;
+char *ExcludeFrom = NULL;
int
main(int argc, char **argv)
@@ -73,6 +74,10 @@ main(int argc, char **argv)
PlayPen = optarg;
break;
+ case 'X':
+ ExcludeFrom = optarg;
+ break;
+
case 'h':
case '?':
default:
@@ -126,6 +131,7 @@ usage(const char *name, const char *fmt, ...)
fprintf(stderr, "-k script de-install script\n");
fprintf(stderr, "-r script pre/post requirements script\n");
fprintf(stderr, "-t temp use temp as template for mktemp()\n");
+ fprintf(stderr, "-X file exclude files listed in file\n");
fprintf(stderr, "-v verbose\n");
exit(1);
}
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index 747a3efe6a35..4744a9864abe 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -141,9 +141,11 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist)
char args[10];
args[0] = '\0';
+ if (ExcludeFrom)
+ sprintf(args, "-X %s ", ExcludeFrom);
sprintf(tball, "%s/%s.%s", home, pkg, suffix);
if (index(suffix, 'z')) /* Compress/gzip? */
- strcpy(args, "z");
+ strcat(args, "z");
if (Verbose)
printf("Creating gzip'd tar ball in '%s', contents:\n", tball);
strcat(args, "cf");
diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1
index 43306f2d6c41..b4cb2853f8eb 100644
--- a/usr.sbin/pkg_install/create/pkg_create.1
+++ b/usr.sbin/pkg_install/create/pkg_create.1
@@ -118,6 +118,21 @@ space in your
directory is limited. Be sure to leave some number of `X' characters
for mktemp(3) to fill in with a unique ID.
.B "Optional."
+.TP
+.BI "\-X\ " file
+Pass
+.I file
+as a
+.B \-exclude-from
+argument to
+.B tar
+when creating final package. See
+.B tar
+man page (or run
+.B tar
+with
+.B --help
+flag) for further information on using this flag.
.PP
.SH "TECHNICAL DETAILS"
The "packing list" format (see \fB-f\fR) is fairly simple, being