tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
replace target with OBJ on nfs, fix root creation of files
Hi
My pkgsrc obj directory is on NFS with root access disabled.
Whilst installing has been fine, pkg_rolling-replace fails at the first
hurdle because the replace target wants to create files in WRKDIR to
store old and new package names. This fails because the files are
created AFTER the super user command.
There is a note in the mk source to say that all of the replace must
happen within a "transaction." I don't feel that name resolution should
be part of this becase the same files are used by the undo target, which
by nature cannot be part of this transaction.
Attached is a patch (relative to pkgsrc/mk) that allow
pkg_rolling-replace to work with my setup by moving the creation of
these files to before the super user command.
Is this a safe thing to do? I'm not familiar with this area of pkgsrc,
hence this email.
Roy
Index: install/replace.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/install/replace.mk,v
retrieving revision 1.18
diff -u -p -r1.18 replace.mk
--- install/replace.mk 10 Apr 2016 15:58:02 -0000 1.18
+++ install/replace.mk 19 Jan 2019 23:41:16 -0000
@@ -29,6 +29,7 @@ _REPLACE_TARGETS+= package
.endif
_REPLACE_TARGETS+= replace-message
_REPLACE_TARGETS+= unprivileged-install-hook
+_REPLACE_TARGETS+= replace-names
#
# replace
Index: pkgformat/pkg/replace.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/pkgformat/pkg/replace.mk,v
retrieving revision 1.5
diff -u -p -r1.5 replace.mk
--- pkgformat/pkg/replace.mk 19 Aug 2017 00:30:19 -0000 1.5
+++ pkgformat/pkg/replace.mk 19 Jan 2019 23:41:16 -0000
@@ -11,7 +11,6 @@
# to installing the new package, should be one transaction.
#
_pkgformat-replace: \
- replace-names \
replace-tarup \
replace-preserve-installed-info \
replace-preserve-required-by \
@@ -24,7 +23,6 @@ _pkgformat-replace: \
# tarup is omitted for DESTDIR, because the benefits are very small
_pkgformat-destdir-replace: \
- replace-names \
replace-destdir \
.PHONY
Home |
Main Index |
Thread Index |
Old Index