Commit d611e91
committed
fix: clean up chroot environment — locale, GPG, setfont, apt sandbox
Silences four categories of noisy but harmless warnings that
appear on every image build:
1. bash: warning: setlocale: LC_ALL: cannot change locale
Host's LC_ALL/LANG leak into the chroot. Fixed in both the
chroot_sdcard/chroot_mount wrappers (LC_ALL=C LANG=C
LANGUAGE="" SUDO_USER="") and two direct chroot calls in
create_sources_list_and_deploy_repo_key.
2. gpg: WARNING: unsafe ownership on homedir
gpg --dearmor under sudo uses the builder's ~/.gnupg. Fixed
with a temporary --homedir for the single dearmor call.
3. setfont: ERROR kdfontop.c:29 is_kd_text: ioctl(KDGETMODE)
setupcon --save --force triggers setfont in chroot (no tty).
Config is saved correctly — stderr redirected to /dev/null.
4. W: Download is performed unsandboxed as root
The _apt user may not exist in a fresh rootfs. Pre-create
/etc/apt/apt.conf.d/99-armbian-sandbox with
APT::Sandbox::User "root" before mmdebstrap runs; removed
in the post-mmdebstrap cleanup so it doesn't ship in images.1 parent 8fb6c51 commit d611e91
3 files changed
Lines changed: 32 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
135 | 142 | | |
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
139 | 146 | | |
140 | | - | |
| 147 | + | |
141 | 148 | | |
142 | 149 | | |
143 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
270 | 276 | | |
271 | 277 | | |
272 | 278 | | |
273 | 279 | | |
274 | 280 | | |
275 | 281 | | |
276 | | - | |
| 282 | + | |
277 | 283 | | |
278 | 284 | | |
279 | 285 | | |
280 | 286 | | |
281 | | - | |
| 287 | + | |
282 | 288 | | |
283 | 289 | | |
284 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
| |||
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
| 141 | + | |
132 | 142 | | |
133 | 143 | | |
134 | 144 | | |
| |||
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
161 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
162 | 175 | | |
163 | 176 | | |
164 | 177 | | |
| |||
0 commit comments