summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2004-04-09 18:38:12 +0000
committertv <tv@pkgsrc.org>2004-04-09 18:38:12 +0000
commit5f8f17eb0be9c1ca2e568bc1c0ff65fbc80ce70d (patch)
treec48e150b0e4e473d80bed2cd6b3c059d0961e1f0 /pkgtools
parentf060c78ebf77edaec3eb563c6269cf9feabe9141 (diff)
downloadpkgsrc-5f8f17eb0be9c1ca2e568bc1c0ff65fbc80ce70d.tar.gz
Merge 20040409: Parameterize the umask calls so that defs.*.mk can change
it on a per-opsys basis (and so that mk.conf can override it to match what the pkgsrc builder is using).
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/Makefile6
-rw-r--r--pkgtools/pkg_install/files/add/perform.c5
-rw-r--r--pkgtools/pkg_install/files/create/perform.c6
-rw-r--r--pkgtools/pkg_install/files/info/show.c6
-rw-r--r--pkgtools/pkg_install/files/lib/lib.h6
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
6 files changed, 20 insertions, 13 deletions
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index 0d9d33f0b7a..62bbe610e07 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.99 2004/03/29 02:24:11 tv Exp $
+# $NetBSD: Makefile,v 1.100 2004/04/09 18:38:12 tv Exp $
# Notes to package maintainers:
#
@@ -48,10 +48,12 @@ PLIST_SUBST+= PKG_TOOLS_BIN=${PKG_TOOLS_BIN}
LIBNBCOMPAT_FILESDIR= ${.CURDIR}/../../pkgtools/libnbcompat/files
LIBNBCOMPAT_SRCDIR= ${WRKDIR}/libnbcompat
-CFLAGS+= -I${LIBNBCOMPAT_SRCDIR}
+CPPFLAGS+= -I${LIBNBCOMPAT_SRCDIR}
LDFLAGS+= -L${LIBNBCOMPAT_SRCDIR}
LIBS+= -lnbcompat
+CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
+
MAKE_ENV+= MACHINE_ARCH="${MACHINE_ARCH}"
MAKE_ENV+= OPSYS="${OPSYS}"
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c
index dfd0c58becf..0f580466256 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.18 2004/03/29 20:27:46 tv Exp $ */
+/* $NetBSD: perform.c,v 1.19 2004/04/09 18:38:12 tv 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.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.18 2004/03/29 20:27:46 tv Exp $");
+__RCSID("$NetBSD: perform.c,v 1.19 2004/04/09 18:38:12 tv Exp $");
#endif
#endif
@@ -720,6 +720,7 @@ ignore_replace_depends_check:
if (!NoRecord && !Fake) {
char contents[FILENAME_MAX];
+ umask(DEF_UMASK);
#ifndef __INTERIX
if (getuid() != 0)
warnx("not running as root - trying to record install anyway");
diff --git a/pkgtools/pkg_install/files/create/perform.c b/pkgtools/pkg_install/files/create/perform.c
index 1a04af13a80..df8226ab993 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.6 2003/09/23 07:13:49 grant Exp $ */
+/* $NetBSD: perform.c,v 1.7 2004/04/09 18:38:12 tv 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.6 2003/09/23 07:13:49 grant Exp $");
+__RCSID("$NetBSD: perform.c,v 1.7 2004/04/09 18:38:12 tv Exp $");
#endif
#endif
@@ -340,7 +340,7 @@ pkg_perform(lpkg_head_t *pkgs)
/* Make first "real contents" pass over it */
check_list(Home, &plist, basename_of(pkg));
- (void) umask(022); /* make sure gen'ed directories, files
+ (void) umask(DEF_UMASK);/* make sure gen'ed directories, files
* don't have group or other write bits. */
/* Now put the release specific items in */
diff --git a/pkgtools/pkg_install/files/info/show.c b/pkgtools/pkg_install/files/info/show.c
index 367092d665b..f1f1d2cc2f1 100644
--- a/pkgtools/pkg_install/files/info/show.c
+++ b/pkgtools/pkg_install/files/info/show.c
@@ -1,4 +1,4 @@
-/* $NetBSD: show.c,v 1.4 2003/09/23 07:13:52 grant Exp $ */
+/* $NetBSD: show.c,v 1.5 2004/04/09 18:38:12 tv Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
#else
-__RCSID("$NetBSD: show.c,v 1.4 2003/09/23 07:13:52 grant Exp $");
+__RCSID("$NetBSD: show.c,v 1.5 2004/04/09 18:38:12 tv Exp $");
#endif
#endif
@@ -141,7 +141,7 @@ show_index(char *title, char *fname)
if (!Quiet) {
printf("%s%s", InfoPrefix, title);
- maxline -= MAXNAMESIZE;
+ maxline -= MAX(MAXNAMESIZE, strlen(title));
}
if ((fp = fopen(fname, "r")) == (FILE *) NULL) {
warnx("show_file: can't open '%s' for reading", fname);
diff --git a/pkgtools/pkg_install/files/lib/lib.h b/pkgtools/pkg_install/files/lib/lib.h
index 2e6cd9d7520..e4c48f3ed3c 100644
--- a/pkgtools/pkg_install/files/lib/lib.h
+++ b/pkgtools/pkg_install/files/lib/lib.h
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.9 2004/02/07 10:37:53 grant Exp $ */
+/* $NetBSD: lib.h,v 1.10 2004/04/09 18:38:12 tv Exp $ */
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
@@ -82,6 +82,10 @@
#define OPSYS_NAME "NetBSD"
#endif
+#ifndef DEF_UMASK
+#define DEF_UMASK 022
+#endif
+
/* Usually "rm", but often "echo" during debugging! */
#define REMOVE_CMD "rm"
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index 63e80833857..0e42d017b1f 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.24 2004/03/30 15:28:08 tv Exp $ */
+/* $NetBSD: version.h,v 1.25 2004/04/09 18:38:12 tv 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 "20040330"
+#define PKGTOOLS_VERSION "20040409"
#endif /* _INST_LIB_VERSION_H_ */