summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-03-11 22:05:03 +0000
committerjoerg <joerg@pkgsrc.org>2007-03-11 22:05:03 +0000
commit77305c28ef31045625f0c1d9cfaf7eced3c2eb2c (patch)
treecabfada1157e2da0a2e1677988fe46e455e0fe86 /pkgtools
parentcd381c6ec5c2d863ff82f21610c5bea83e52f232 (diff)
downloadpkgsrc-77305c28ef31045625f0c1d9cfaf7eced3c2eb2c.tar.gz
Sync with NetBSD base version:
- obsolete support for require scripts - nuke support for the following options of pkg_create: -X (excludefile) -r (require script) -h (Force follow symlink) - add option for pkg_create to specify additional @blddep packages. This brings us to version 20070308.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/Makefile3
-rw-r--r--pkgtools/pkg_install/files/add/perform.c5
-rw-r--r--pkgtools/pkg_install/files/create/create.h6
-rw-r--r--pkgtools/pkg_install/files/create/main.c30
-rw-r--r--pkgtools/pkg_install/files/create/perform.c39
-rw-r--r--pkgtools/pkg_install/files/create/pkg_create.146
-rw-r--r--pkgtools/pkg_install/files/create/pkg_create.cat135
-rw-r--r--pkgtools/pkg_install/files/info/perform.c13
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
9 files changed, 77 insertions, 104 deletions
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index 15029f43a74..a14ec5a5d03 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.129 2007/02/06 01:30:11 reed Exp $
+# $NetBSD: Makefile,v 1.130 2007/03/11 22:05:03 joerg Exp $
# Notes to package maintainers:
#
@@ -9,7 +9,6 @@
# change in the pkg_* tools that pkgsrc relies on for proper operation.
DISTNAME= pkg_install-${VERSION}
-PKGREVISION= 1
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c
index e1ffda9cbb6..0ab5f8e16d4 100644
--- a/pkgtools/pkg_install/files/add/perform.c
+++ b/pkgtools/pkg_install/files/add/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.43 2006/07/20 11:29:48 gson Exp $ */
+/* $NetBSD: perform.c,v 1.44 2007/03/11 22:05:03 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.43 2006/07/20 11:29:48 gson Exp $");
+__RCSID("$NetBSD: perform.c,v 1.44 2007/03/11 22:05:03 joerg Exp $");
#endif
#endif
@@ -825,6 +825,7 @@ ignore_replace_depends_check:
/* Look for the requirements file */
if (fexists(REQUIRE_FNAME)) {
+ warnx("package %s uses obsoleted require scripts", PkgName);
(void) fexec(CHMOD_CMD, "+x", REQUIRE_FNAME, NULL); /* be sure */
if (Verbose)
printf("Running requirements file first for %s.\n", PkgName);
diff --git a/pkgtools/pkg_install/files/create/create.h b/pkgtools/pkg_install/files/create/create.h
index ae0ab0e0929..12fdde5ef10 100644
--- a/pkgtools/pkg_install/files/create/create.h
+++ b/pkgtools/pkg_install/files/create/create.h
@@ -1,4 +1,4 @@
-/* $NetBSD: create.h,v 1.4 2003/09/23 07:13:49 grant Exp $ */
+/* $NetBSD: create.h,v 1.5 2007/03/11 22:05:03 joerg Exp $ */
/* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */
@@ -32,10 +32,9 @@ extern char *Display;
extern char *Install;
extern char *DeInstall;
extern char *Contents;
-extern char *Require;
-extern char *ExcludeFrom;
extern char *Mtree;
extern char *Pkgdeps;
+extern char *BuildPkgdeps;
extern char *Pkgcfl;
extern char *BuildVersion;
extern char *BuildInfo;
@@ -46,7 +45,6 @@ extern char *SrcDir;
extern char *realprefix;
extern char PlayPen[];
extern size_t PlayPenSize;
-extern int Dereference;
extern int PlistOnly;
extern int RelativeLinks;
extern int ReorderDirs;
diff --git a/pkgtools/pkg_install/files/create/main.c b/pkgtools/pkg_install/files/create/main.c
index 809d2a94fb6..96f2580c34c 100644
--- a/pkgtools/pkg_install/files/create/main.c
+++ b/pkgtools/pkg_install/files/create/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.7 2006/06/27 23:36:13 hubertf Exp $ */
+/* $NetBSD: main.c,v 1.8 2007/03/11 22:05:03 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: main.c,v 1.17 1997/10/08 07:46:23 charnier Exp";
#else
-__RCSID("$NetBSD: main.c,v 1.7 2006/06/27 23:36:13 hubertf Exp $");
+__RCSID("$NetBSD: main.c,v 1.8 2007/03/11 22:05:03 joerg Exp $");
#endif
#endif
@@ -32,7 +32,7 @@ __RCSID("$NetBSD: main.c,v 1.7 2006/06/27 23:36:13 hubertf Exp $");
#include "lib.h"
#include "create.h"
-static const char Options[] = "B:C:D:EFI:K:L:OP:RS:UVX:b:c:d:f:hi:k:lm:n:p:r:s:t:v";
+static const char Options[] = "B:C:D:EFI:K:L:OP:RS:T:UVb:c:d:f:i:k:lm:n:p:r:s:t:v";
char *Prefix = NULL;
char *Comment = NULL;
@@ -41,10 +41,9 @@ char *Display = NULL;
char *Install = NULL;
char *DeInstall = NULL;
char *Contents = NULL;
-char *Require = NULL;
-char *ExcludeFrom = NULL;
char *Mtree = NULL;
char *Pkgdeps = NULL;
+char *BuildPkgdeps = NULL;
char *Pkgcfl = NULL;
char *BuildVersion = NULL;
char *BuildInfo = NULL;
@@ -57,7 +56,6 @@ char PlayPen[MaxPathSize];
size_t PlayPenSize = sizeof(PlayPen);
int update_pkgdb = 1;
int create_views = 0;
-int Dereference = 0;
int PlistOnly = 0;
int RelativeLinks = 0;
int ReorderDirs = 0;
@@ -67,12 +65,12 @@ static void
usage(void)
{
fprintf(stderr,
- "usage: pkg_create [-EhlORUVv] [-B build-info-file] [-b build-version-file]\n"
+ "usage: pkg_create [-ElORUVv] [-B build-info-file] [-b build-version-file]\n"
" [-C cpkgs] [-D displayfile] [-I realprefix] [-i iscript]\n"
" [-K pkg_dbdir] [-k dscript] [-L SrcDir] [-m mtreefile]\n"
" [-n preserve-file] [-P dpkgs] [-p prefix] [-r rscript]\n"
" [-S size-all-file] [-s size-pkg-file] [-t template]\n"
- " [-X excludefile] -c comment -d description -f packlist\n"
+ " [-T buildpkgs] -c comment -d description -f packlist\n"
" pkg-name\n");
exit(1);
}
@@ -155,22 +153,10 @@ main(int argc, char **argv)
SrcDir = optarg;
break;
- case 'r':
- Require = optarg;
- break;
-
case 't':
strlcpy(PlayPen, optarg, sizeof(PlayPen));
break;
- case 'X':
- ExcludeFrom = optarg;
- break;
-
- case 'h':
- Dereference = 1;
- break;
-
case 'D':
Display = optarg;
break;
@@ -187,6 +173,10 @@ main(int argc, char **argv)
Pkgdeps = optarg;
break;
+ case 'T':
+ BuildPkgdeps = optarg;
+ break;
+
case 'C':
Pkgcfl = optarg;
break;
diff --git a/pkgtools/pkg_install/files/create/perform.c b/pkgtools/pkg_install/files/create/perform.c
index aa01a188200..f6b4265967c 100644
--- a/pkgtools/pkg_install/files/create/perform.c
+++ b/pkgtools/pkg_install/files/create/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.10 2005/11/22 15:44:59 ben Exp $ */
+/* $NetBSD: perform.c,v 1.11 2007/03/11 22:05:03 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.38 1997/10/13 15:03:51 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.10 2005/11/22 15:44:59 ben Exp $");
+__RCSID("$NetBSD: perform.c,v 1.11 2007/03/11 22:05:03 joerg Exp $");
#endif
#endif
@@ -83,12 +83,6 @@ make_dist(const char *home, const char *pkg, const char *suffix, const package_t
args[nargs++] = "bzip2";
} else if (strchr(suffix, 'z'))/* Compress/gzip? */
args[nargs++] = "-z";
- if (Dereference)
- args[nargs++] = "-h";
- if (ExcludeFrom) {
- args[nargs++] = "-X";
- args[nargs++] = ExcludeFrom;
- }
args[nargs++] = "-T"; /* Take filenames from file instead of args. */
args[nargs++] = "-"; /* Use stdin for the file. */
args[nargs] = NULL;
@@ -106,9 +100,6 @@ make_dist(const char *home, const char *pkg, const char *suffix, const package_t
if (DeInstall) {
fprintf(totar, "%s\n", DEINSTALL_FNAME);
}
- if (Require) {
- fprintf(totar, "%s\n", REQUIRE_FNAME);
- }
if (Display) {
fprintf(totar, "%s\n", DISPLAY_FNAME);
}
@@ -273,6 +264,27 @@ pkg_perform(lpkg_head_t *pkgs)
printf(".\n");
}
+ /*
+ * Put the build dependencies after the dependencies.
+ * This works due to the evaluation order in pkg_add.
+ */
+ if (BuildPkgdeps) {
+ if (Verbose && !PlistOnly)
+ printf("Registering build depends:");
+ while (BuildPkgdeps) {
+ cp = strsep(&BuildPkgdeps, " \t\n");
+ if (*cp) {
+ if (findmatchingname(_pkgdb_getPKGDB_DIR(), cp, note_whats_installed, installed) > 0) {
+ add_plist(&plist, PLIST_BLDDEP, installed);
+ if (Verbose && !PlistOnly)
+ printf(" %s", cp);
+ }
+ }
+ }
+ if (Verbose && !PlistOnly)
+ printf(".\n");
+ }
+
/* Put the conflicts directly after the dependencies, if any */
if (Pkgcfl) {
if (Verbose && !PlistOnly)
@@ -347,11 +359,6 @@ pkg_perform(lpkg_head_t *pkgs)
add_plist(&plist, PLIST_IGNORE, NULL);
add_plist(&plist, PLIST_FILE, DEINSTALL_FNAME);
}
- if (Require) {
- copy_file(Home, Require, REQUIRE_FNAME);
- add_plist(&plist, PLIST_IGNORE, NULL);
- add_plist(&plist, PLIST_FILE, REQUIRE_FNAME);
- }
if (Display) {
copy_file(Home, Display, DISPLAY_FNAME);
add_plist(&plist, PLIST_IGNORE, NULL);
diff --git a/pkgtools/pkg_install/files/create/pkg_create.1 b/pkgtools/pkg_install/files/create/pkg_create.1
index 8aeba5faa36..2d389219d89 100644
--- a/pkgtools/pkg_install/files/create/pkg_create.1
+++ b/pkgtools/pkg_install/files/create/pkg_create.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_create.1,v 1.7 2004/08/06 16:57:03 jlam Exp $
+.\" $NetBSD: pkg_create.1,v 1.8 2007/03/11 22:05:03 joerg Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -24,7 +24,7 @@
.\" [jkh] Took John's changes back and made some additional extensions for
.\" better integration with FreeBSD's new ports collection.
.\"
-.Dd September 2, 2003
+.Dd March 8, 2007
.Dt PKG_CREATE 1
.Os
.Sh NAME
@@ -32,7 +32,7 @@
.Nd a utility for creating software package distributions
.Sh SYNOPSIS
.Nm
-.Op Fl EhlORUVv
+.Op Fl ElORUVv
.Bk -words
.Op Fl B Ar build-info-file
.Ek
@@ -70,10 +70,10 @@
.Op Fl P Ar dpkgs
.Ek
.Bk -words
-.Op Fl p Ar prefix
+.Op Fl T Ar buildpkgs
.Ek
.Bk -words
-.Op Fl r Ar rscript
+.Op Fl p Ar prefix
.Ek
.Bk -words
.Op Fl S Ar size-all-file
@@ -85,9 +85,6 @@
.Op Fl t Ar template
.Ek
.Bk -words
-.Op Fl X Ar excludefile
-.Ek
-.Bk -words
.Fl c Ar comment
.Ek
.Bk -words
@@ -172,9 +169,6 @@ if
is a
.Cm -
(dash).
-.It Fl h
-Force tar to follow symbolic links, so that the files they point to
-are dumped, rather than the links themselves.
.It Fl I Ar realprefix
Provide the real prefix, as opposed to the staging prefix, for use in
staged installations of packages.
@@ -255,6 +249,16 @@ In addition, the exact versions of the packages referred to in the
list will be added to the packing list in the form of
.Cm @blddep
directives.
+.It Fl T Ar buildpkgs
+This is assumed to be a whitespace separated list of package names.
+The exact versions of the packages referred to in the
+.Ar buildpkgs
+list will be added to the packing list in the form of
+.Cm @blddep
+directives.
+This directives are stored after those created by the
+.Fl P
+option.
.It Fl p Ar prefix
Set
.Ar prefix
@@ -266,15 +270,6 @@ the package.
Re-order any directories in the pkg/PLIST file into reverse alphabetic
order, so that child directories will automatically be removed before
parent directories.
-.It Fl r Ar rscript
-Set
-.Ar rscript
-to be the
-.Pq requirements
-procedure for the package.
-This can be any executable program (or shell script).
-It will be invoked automatically at installation/deinstallation time to
-determine whether or not installation/deinstallation should proceed.
.It Fl S Ar size-all-file
Store the given file for later querying with the
.Xr pkg_info 1
@@ -312,17 +307,6 @@ Do not update the package file database with any file information.
Print version number and exit.
.It Fl v
Turn on verbose output.
-.It Fl X Ar excludefile
-Pass
-.Ar excludefile
-as a
-.Fl -exclude-from
-argument to
-.Cm tar
-when creating final package.
-See
-.Xr tar 1
-for further information on using this flag.
.El
.Sh PACKING LIST DETAILS
The
diff --git a/pkgtools/pkg_install/files/create/pkg_create.cat1 b/pkgtools/pkg_install/files/create/pkg_create.cat1
index 948483f1dab..bc6e0a6f8b3 100644
--- a/pkgtools/pkg_install/files/create/pkg_create.cat1
+++ b/pkgtools/pkg_install/files/create/pkg_create.cat1
@@ -1,16 +1,15 @@
PKG_CREATE(1) NetBSD General Commands Manual PKG_CREATE(1)
NNAAMMEE
- ppkkgg__ccrreeaattee - a utility for creating software package distributions
+ ppkkgg__ccrreeaattee -- a utility for creating software package distributions
SSYYNNOOPPSSIISS
- ppkkgg__ccrreeaattee [--EEhhllOORRUUVVvv] [--BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e] [--bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e]
+ ppkkgg__ccrreeaattee [--EEllOORRUUVVvv] [--BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e] [--bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e]
[--CC _c_p_k_g_s] [--DD _d_i_s_p_l_a_y_f_i_l_e] [--II _r_e_a_l_p_r_e_f_i_x] [--ii _i_s_c_r_i_p_t]
[--KK _p_k_g___d_b_d_i_r] [--kk _d_s_c_r_i_p_t] [--LL _S_r_c_D_i_r] [--mm _m_t_r_e_e_f_i_l_e]
- [--nn _p_r_e_s_e_r_v_e_-_f_i_l_e] [--PP _d_p_k_g_s] [--pp _p_r_e_f_i_x] [--rr _r_s_c_r_i_p_t]
- [--SS _s_i_z_e_-_a_l_l_-_f_i_l_e] [--ss _s_i_z_e_-_p_k_g_-_f_i_l_e] [--tt _t_e_m_p_l_a_t_e]
- [--XX _e_x_c_l_u_d_e_f_i_l_e] --cc _c_o_m_m_e_n_t --dd _d_e_s_c_r_i_p_t_i_o_n --ff _p_a_c_k_l_i_s_t
- _p_k_g_-_n_a_m_e
+ [--nn _p_r_e_s_e_r_v_e_-_f_i_l_e] [--PP _d_p_k_g_s] [--TT _b_u_i_l_d_p_k_g_s] [--pp _p_r_e_f_i_x]
+ [--SS _s_i_z_e_-_a_l_l_-_f_i_l_e] [--ss _s_i_z_e_-_p_k_g_-_f_i_l_e] [--tt _t_e_m_p_l_a_t_e] --cc _c_o_m_m_e_n_t
+ --dd _d_e_s_c_r_i_p_t_i_o_n --ff _p_a_c_k_l_i_s_t _p_k_g_-_n_a_m_e
DDEESSCCRRIIPPTTIIOONN
The ppkkgg__ccrreeaattee command is used to create packages that will subsequently
@@ -66,9 +65,6 @@ OOPPTTIIOONNSS
Fetch (packing list) for package from the file _p_a_c_k_l_i_s_t or ssttddiinn
if _p_a_c_k_l_i_s_t is a -- (dash).
- --hh Force tar to follow symbolic links, so that the files they point
- to are dumped, rather than the links themselves.
-
--II _r_e_a_l_p_r_e_f_i_x
Provide the real prefix, as opposed to the staging prefix, for
use in staged installations of packages.
@@ -124,6 +120,13 @@ OOPPTTIIOONNSS
to in the _d_p_k_g_s list will be added to the packing list in the
form of @@bbllddddeepp directives.
+ --TT _b_u_i_l_d_p_k_g_s
+ This is assumed to be a whitespace separated list of package
+ names. The exact versions of the packages referred to in the
+ _b_u_i_l_d_p_k_g_s list will be added to the packing list in the form of
+ @@bbllddddeepp directives. This directives are stored after those cre-
+ ated by the --PP option.
+
--pp _p_r_e_f_i_x
Set _p_r_e_f_i_x as the initial directory (base) to start from in
selecting files for the package.
@@ -132,13 +135,6 @@ OOPPTTIIOONNSS
alphabetic order, so that child directories will automatically be
removed before parent directories.
- --rr _r_s_c_r_i_p_t
- Set _r_s_c_r_i_p_t to be the (requirements) procedure for the package.
- This can be any executable program (or shell script). It will be
- invoked automatically at installation/deinstallation time to
- determine whether or not installation/deinstallation should pro-
- ceed.
-
--SS _s_i_z_e_-_a_l_l_-_f_i_l_e
Store the given file for later querying with the pkg_info(1) --SS
flag. The file is expected to contain the size (in bytes) of all
@@ -165,11 +161,6 @@ OOPPTTIIOONNSS
--vv Turn on verbose output.
- --XX _e_x_c_l_u_d_e_f_i_l_e
- Pass _e_x_c_l_u_d_e_f_i_l_e as a ----eexxcclluuddee--ffrroomm argument to ttaarr when creat-
- ing final package. See tar(1) for further information on using
- this flag.
-
PPAACCKKIINNGG LLIISSTT DDEETTAAIILLSS
The (packing list) format (see --ff) is fairly simple, being nothing more
than a single column of filenames to include in the package. However,
@@ -310,4 +301,4 @@ BBUUGGSS
invocations due to exec argument-space limitations (this depends on the
value returned by ssyyssccoonnff(___S_C___A_R_G___M_A_X)).
-NetBSD 2.0 September 2, 2003 NetBSD 2.0
+NetBSD 4.0 March 8, 2007 NetBSD 4.0
diff --git a/pkgtools/pkg_install/files/info/perform.c b/pkgtools/pkg_install/files/info/perform.c
index 6fbb320bf2e..e1823079c74 100644
--- a/pkgtools/pkg_install/files/info/perform.c
+++ b/pkgtools/pkg_install/files/info/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.29 2006/07/01 19:37:25 dillo Exp $ */
+/* $NetBSD: perform.c,v 1.30 2007/03/11 22:05:03 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.23 1997/10/13 15:03:53 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.29 2006/07/01 19:37:25 dillo Exp $");
+__RCSID("$NetBSD: perform.c,v 1.30 2007/03/11 22:05:03 joerg Exp $");
#endif
#endif
@@ -276,9 +276,12 @@ pkg_do(char *pkg)
show_file(pkg, "De-Install script:\n",
DEINSTALL_FNAME, TRUE);
}
- if ((Flags & SHOW_REQUIRE) && fexists(REQUIRE_FNAME)) {
- show_file(pkg, "Require script:\n",
- REQUIRE_FNAME, TRUE);
+ if (fexists(REQUIRE_FNAME)) {
+ warnx("package %s uses obsoleted require scripts", pkg);
+ if (Flags & SHOW_REQUIRE) {
+ show_file(pkg, "Require script:\n",
+ REQUIRE_FNAME, TRUE);
+ }
}
if ((Flags & SHOW_MTREE) && fexists(MTREE_FNAME)) {
show_file(pkg, "mtree file:\n", MTREE_FNAME, TRUE);
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index cbe6c61363d..a4cce78cb57 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.62 2006/11/03 09:35:14 joerg Exp $ */
+/* $NetBSD: version.h,v 1.63 2007/03/11 22:05:03 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -33,6 +33,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20061103"
+#define PKGTOOLS_VERSION "20070308"
#endif /* _INST_LIB_VERSION_H_ */