====== パッケージの更新 ======
\\
**脆弱性の修正**など、root filesystem リリース時からパッケージが更新されている場合が多々あります。\\
その場合、ファームウェアをビルドする前にパッケージを更新しておきます。
===== パッケージデータベースの更新 =====
**apt update** を実行してパッケージデータベースを更新します。
root@max3xx-devel:/home/user1/work# ./chroot_arm64.sh max3xx_jammy_rootfs/
root@max3xx-devel:/# apt update
Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:2 http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu jammy InRelease
Get:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease [119 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease [110 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 Packages [887 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 Packages [789 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe Translation-en [180 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports jammy-security/main arm64 Packages [635 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports jammy-security/universe arm64 Packages [603 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports jammy-security/universe Translation-en [118 kB]
Fetched 3441 kB in 8s (413 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them. <----
root@max3xx-devel:/#
この例では、『4 つのパッケージが更新可能』 と表示されています。
\\
===== パッケージの更新 =====
**apt upgrade** でパッケージをダウンロードして更新します。
root@max3xx-devel:/# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
initramfs-tools initramfs-tools-bin initramfs-tools-core <--- "hold" しているため更新されない
The following packages will be upgraded:
tzdata
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 335 kB of archives.
After this operation, 9216 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 tzdata all 2023c-0ubuntu0.22.04.0 [335 kB]
Fetched 335 kB in 2s (203 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Preconfiguring packages ...
E: Unlocking the slave of master fd 35 failed! - unlockpt (22: Invalid argument)
(Reading database ... 15956 files and directories currently installed.)
Preparing to unpack .../tzdata_2023c-0ubuntu0.22.04.0_all.deb ...
Unpacking tzdata (2023c-0ubuntu0.22.04.0) over (2022g-0ubuntu0.22.04.1) ...
Setting up tzdata (2023c-0ubuntu0.22.04.0) ...
Current default time zone: 'Asia/Tokyo'
Local time is now: Thu Apr 13 09:55:53 JST 2023.
Universal Time is now: Thu Apr 13 00:55:53 UTC 2023.
Run 'dpkg-reconfigure tzdata' if you wish to change it.
root@max3xx-devel:/#
\\