Page MenuHomeFreeBSD

D61380.1795720001.diff
No OneTemporary

Authored By
Unknown
Size
1018 B
Referenced Files
None
Subscribers
None

D61380.1795720001.diff

diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in
--- a/usr.sbin/bsdinstall/scripts/pkgbase.in
+++ b/usr.sbin/bsdinstall/scripts/pkgbase.in
@@ -345,10 +345,15 @@
assert(os.execute("cp -R /usr/share/keys/* " .. chroot .. "/usr/share/keys/"))
end
+ -- Create <chroot>/tmp and point at it with TMPDIR; otherwise pkg uses
+ -- /tmp which is a small tmpfs in the installer environment and fails
+ -- to extract data.pkg.
-- We must use --repo-conf-dir rather than -o REPOS_DIR here as the latter
-- is interpreted relative to the --rootdir. BSDINSTALL_PKG_REPOS_DIR must
-- be allowed to point to a path outside the chroot.
- local pkg = "pkg --rootdir " .. chroot ..
+ assert(os.execute("mkdir -p " .. chroot .. "/tmp"))
+ assert(os.execute("chmod 1777 " .. chroot .. "/tmp"))
+ local pkg = "env TMPDIR=" .. chroot .. "/tmp pkg --rootdir " .. chroot ..
" --repo-conf-dir " .. repos_dir .. " -o IGNORE_OSVERSION=yes "
while not os.execute(pkg .. "update") do

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 26, 7:06 PM (13 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41653918
Default Alt Text
D61380.1795720001.diff (1018 B)

Event Timeline