Git をアップデートした

Posted on 2023-02-18 in zakki

Git に脆弱性が出ていたのでアップデートした。

Ubuntu jammy はすでにパッチがリリースされているので、本当にアップデートするだけだった。

環境

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

手順

$ sudo apt update
Hit:1 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:3 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB]
Get:4 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [898 kB]
Get:5 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [197 kB]
Get:6 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [13.5 kB]
Get:7 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [624 kB]
Get:8 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [96.3 kB]
Get:9 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [580 B]
Get:10 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [853 kB]
Get:11 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [164 kB]
Get:12 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [17.3 kB]
Get:13 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [9,672 B]
Get:14 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [3,260 B]
Get:15 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:16 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [643 kB]
Get:17 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [134 kB]
Get:18 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [8,388 B]
Get:19 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [582 kB]
Get:20 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [90.4 kB]
Get:21 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [678 kB]
Get:22 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [105 kB]
Get:23 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [13.1 kB]
Fetched 5,466 kB in 4s (1,269 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
146 packages can be upgraded. Run 'apt list --upgradable' to see them.
$ sudo apt install git
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2 linux-image-5.13.0-1022-aws linux-modules-5.13.0-1022-aws ruby2.7
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  git-daemon-run | git-daemon-sysvinit git-doc git-email git-gui gitk gitweb git-cvs git-mediawiki
  git-svn
The following packages will be upgraded:
  git
1 upgraded, 0 newly installed, 0 to remove and 145 not upgraded.
Need to get 3,141 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Get:1 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu jammy-updates/main amd64 git amd64 1:2.34.1-1ubuntu1.8 [3,141 kB]
Fetched 3,141 kB in 0s (41.8 MB/s)
(Reading database ... 711967 files and directories currently installed.)
Preparing to unpack .../git_1%3a2.34.1-1ubuntu1.8_amd64.deb ...
Unpacking git (1:2.34.1-1ubuntu1.8) over (1:2.34.1-1ubuntu1.5) ...
Setting up git (1:2.34.1-1ubuntu1.8) ... 

Ubuntu Git