Skip to contentSkip to conversation

UBUNTU sudo apt git instead of git-core

PATCH Applied Janne Kiiskila 3 participants 8 messages Mar 24, 2021 – Mar 30, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 UBUNTU sudo apt git instead of git-core

From d7a40397af511baf3a53d12541ee601849f0ab26 Mon Sep 17 00:00:00 2001
From: Janne Kiiskila [email protected]<mailto:[email protected]>
Date: Tue, 23 Mar 2021 11:11:39 -0700
Subject: [PATCH v2] UBUNTU sudo apt git instead of git-core

Ubuntu has changed packaging and git-core is not available anymore, it is now just plain git.

$ sudo apt-get install git-core
[sudo] password for jankii01:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'git' instead of 'git-core'
git is already the newest version (1:2.17.1-1ubuntu0.8).
The following package was automatically installed and is no longer required:
  linux-hwe-5.4-headers-5.4.0-65
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.

Documentation should match the current package name to avoid confusion/warnings.

Change can be verified by running the following script

set -ex

distros=("debian:8" "debian:9" "debian:10" "ubuntu:16.04" "ubuntu:18.04" "ubuntu:20.04") for i in "${distros[@]}"
do
folder="${i/:/.}" # change : to .
mkdir -p $folder
cd $folder
echo FROM $i > Dockerfile
echo RUN apt-get update \&\& apt-get install -y git >> Dockerfile
echo
cat Dockerfile
docker build -t test-$folder .
cd ..
rm $folder/Dockerfile
rmdir $folder
done

---
documentation/poky.yaml | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
documentation/poky.yaml +0 -0
index 3c30c4430e..2554f1e496 100644
@@ -11,7 +11,7 @@ YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"

YOCTO_DL_URL : https://downloads.yoctoproject.org
YOCTO_AB_URL : https://autobuilder.yoctoproject.org
YOCTO_RELEASE_DL_URL : "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;" -UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git-core diffstat unzip texinfo gcc-multilib \
+UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git diffstat unzip texinfo gcc-multilib \

      build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
      xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
      pylint3 xterm python3-subunit mesa-common-dev"

--
2.17.1
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#1 lore raw
Quoted 62 lines · Janne Kiiskila

From d7a40397af511baf3a53d12541ee601849f0ab26 Mon Sep 17 00:00:00 2001

From: Janne Kiiskila [email protected] <mailto:[email protected]>

Date: Tue, 23 Mar 2021 11:11:39 -0700

Subject: [PATCH v2] UBUNTU sudo apt git instead of git-core

Ubuntu has changed packaging and git-core is not available anymore,

it is now just plain git.

$ sudo apt-get install git-core

[sudo] password for jankii01:

Reading package lists... Done

Building dependency tree

Reading state information... Done

Note, selecting 'git' instead of 'git-core'

git is already the newest version (1:2.17.1-1ubuntu0.8).

The following package was automatically installed and is no longer required:

  linux-hwe-5.4-headers-5.4.0-65

Use 'sudo apt autoremove' to remove it.

0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.

Documentation should match the current package name to avoid confusion/warnings.

Change can be verified by running the following script

set -ex

distros=("debian:8" "debian:9" "debian:10" "ubuntu:16.04" "ubuntu:18.04" "ubuntu:20.04")

for i in "${distros[@]}"

do

   folder="${i/:/.}"      # change : to .

   mkdir -p $folder

   cd $folder

   echo FROM $i > Dockerfile

   echo RUN apt-get update \&\& apt-get install -y git >> Dockerfile

   echo

   cat Dockerfile

   docker build -t test-$folder .

Quoted 8 lines

   cd ..

   rm $folder/Dockerfile

   rmdir $folder

done

perhaps we should install git-all instead that would be same across debian-like and redhat-like distros across multiple releases.

Quoted 47 lines

---

documentation/poky.yaml | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
documentation/poky.yaml +0 -0

index 3c30c4430e..2554f1e496 100644

--- a/documentation/poky.yaml

+++ b/documentation/poky.yaml

documentation/poky.yaml +0 -0
@@ -11,7 +11,7 @@ YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
 

YOCTO_DL_URL : https://downloads.yoctoproject.org <https://downloads.yoctoproject.org>

YOCTO_AB_URL : https://autobuilder.yoctoproject.org <https://autobuilder.yoctoproject.org>

YOCTO_RELEASE_DL_URL : "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;"

-UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git-core diffstat unzip texinfo gcc-multilib \

+UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git diffstat unzip texinfo gcc-multilib \

      build-essential chrpath socat cpio python3 python3-pip
python3-pexpect \

      xz-utils debianutils iputils-ping python3-git python3-jinja2
libegl1-mesa libsdl1.2-dev \

      pylint3 xterm python3-subunit mesa-common-dev"

Signature · 3 lines
2.17.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
#2 lore raw

Khem, Janne,

Quoted 3 lines · Khem Raj

perhaps we should install git-all instead that would be same across debian-like and redhat-like distros across multiple releases.

I'm OK for both changes, but isn't the second one a bit overkill?

On my Ubuntu 20.04 system, installing "git-all" results in installing many packages:

sudo apt install git-all
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
cvsps dh-elpa-helper elpa-dash elpa-ghub elpa-git-commit elpa-let-alist elpa-magit elpa-magit-popup elpa-treepy elpa-with-editor git-cvs git-daemon-run git-doc git-el git-mediawiki git-svn gitweb libclass-inspector-perl libclass-singleton-perl libcommon-sense-perl libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libfile-sharedir-perl libjson-perl libjson-xs-perl libmediawiki-api-perl libsvn-perl libtypes-serialiser-perl libyaml-perl runit
Suggested packages:
mediawiki libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libyaml-shell-perl
The following NEW packages will be installed:
cvsps dh-elpa-helper elpa-dash elpa-ghub elpa-git-commit elpa-let-alist elpa-magit elpa-magit-popup elpa-treepy elpa-with-editor git-all git-cvs git-daemon-run git-doc git-el git-mediawiki git-svn gitweb libclass-inspector-perl libclass-singleton-perl libcommon-sense-perl libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libfile-sharedir-perl libjson-perl libjson-xs-perl libmediawiki-api-perl libsvn-perl libtypes-serialiser-perl libyaml-perl runit
0 upgraded, 37 newly installed, 0 to remove and 15 not upgraded.
Need to get 6,879 kB of archives.
After this operation, 55.9 MB of additional disk space will be used.

IMHO, the drawback of using "git-all" is that we look track of which git components we release need. This would make the documentation more vague in terms of software requirements.

Does this make sense ?

Thanks again,

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

Hi Michael

Quoted 9 lines · Michael Opdenacker

Khem, Janne,

Quoted 3 lines · Khem Raj

perhaps we should install git-all instead that would be same across debian-like and redhat-like distros across multiple releases.

I'm OK for both changes, but isn't the second one a bit overkill?

yes git-all option is overkill, I replied to this before as well to drop this idea. but I guess only replied to Janne, patch is ok as it is

Quoted 32 lines

On my Ubuntu 20.04 system, installing "git-all" results in installing many packages:

sudo apt install git-all
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
cvsps dh-elpa-helper elpa-dash elpa-ghub elpa-git-commit elpa-let-alist elpa-magit elpa-magit-popup elpa-treepy elpa-with-editor git-cvs git-daemon-run git-doc git-el git-mediawiki git-svn gitweb libclass-inspector-perl libclass-singleton-perl libcommon-sense-perl libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libfile-sharedir-perl libjson-perl libjson-xs-perl libmediawiki-api-perl libsvn-perl libtypes-serialiser-perl libyaml-perl runit
Suggested packages:
mediawiki libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libyaml-shell-perl
The following NEW packages will be installed:
cvsps dh-elpa-helper elpa-dash elpa-ghub elpa-git-commit elpa-let-alist elpa-magit elpa-magit-popup elpa-treepy elpa-with-editor git-all git-cvs git-daemon-run git-doc git-el git-mediawiki git-svn gitweb libclass-inspector-perl libclass-singleton-perl libcommon-sense-perl libdatetime-format-builder-perl libdatetime-format-iso8601-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libdbd-sqlite3-perl libdbi-perl libfile-sharedir-perl libjson-perl libjson-xs-perl libmediawiki-api-perl libsvn-perl libtypes-serialiser-perl libyaml-perl runit
0 upgraded, 37 newly installed, 0 to remove and 15 not upgraded.
Need to get 6,879 kB of archives.
After this operation, 55.9 MB of additional disk space will be used.

IMHO, the drawback of using "git-all" is that we look track of which git components we release need. This would make the documentation more vague in terms of software requirements.

Does this make sense ?

Thanks again,

Michael.

Reviewed-by on v2 1/1
#4 lore raw
In reply to Janne Kiiskila

Hi Janne,

Thanks for this improvement!

Quoted 38 lines · Janne Kiiskila

<mailto:[email protected]>

---

documentation/poky.yaml | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

documentation/poky.yaml +0 -0

index 3c30c4430e..2554f1e496 100644

--- a/documentation/poky.yaml

+++ b/documentation/poky.yaml

documentation/poky.yaml +0 -0
@@ -11,7 +11,7 @@ YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
 

YOCTO_DL_URL : https://downloads.yoctoproject.org
<https://downloads.yoctoproject.org>

YOCTO_AB_URL : https://autobuilder.yoctoproject.org
<https://autobuilder.yoctoproject.org>

YOCTO_RELEASE_DL_URL : "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;"

-UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git-core diffstat unzip texinfo gcc-multilib \

+UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git diffstat unzip texinfo gcc-multilib \

Quoted 8 lines

      build-essential chrpath socat cpio python3 python3-pip python3-pexpect \

      xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \

      pylint3 xterm python3-subunit mesa-common-dev"

Unfortunately, your patch doesn't apply, or rather your Microsoft e-mail client or server corrupted it (I see lots of HTML in the message). Could you send it again through "git send-email", please? I could re-implement the patch by myself, but I'd like to keep your original commit and the "Signed-off-by" information that it contains, to give you proper credit.

If that's too complicated for you, let me know and I'll create the patch by myself...

Cheers,

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

From d7a40397af511baf3a53d12541ee601849f0ab26 Mon Sep 17 00:00:00 2001
From: Janne Kiiskila <[email protected]>
Date: Tue, 23 Mar 2021 11:11:39 -0700
Subject: [PATCH v2] UBUNTU sudo apt git instead of git-core

Ubuntu has changed packaging and git-core is not available anymore, it is now just plain git.

$ sudo apt-get install git-core
[sudo] password for jankii01:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'git' instead of 'git-core'
git is already the newest version (1:2.17.1-1ubuntu0.8).
The following package was automatically installed and is no longer required:
linux-hwe-5.4-headers-5.4.0-65
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.

Documentation should match the current package name to avoid confusion/warnings.

Change can be verified by running the following script

set -ex

distros=("debian:8" "debian:9" "debian:10" "ubuntu:16.04" "ubuntu:18.04" "ubuntu:20.04") for i in "${distros[@]}"
do
folder="${i/:/.}"      # change : to .
mkdir -p $folder
cd $folder
echo FROM $i > Dockerfile
echo RUN apt-get update \&\& apt-get install -y git >> Dockerfile
echo
cat Dockerfile
docker build -t test-$folder .
cd ..
rm $folder/Dockerfile
rmdir $folder
done

---
documentation/poky.yaml | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
documentation/poky.yaml +0 -0
index 3c30c4430e..2554f1e496 100644
@@ -11,7 +11,7 @@ YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"

YOCTO_DL_URL : "https://downloads.yoctoproject.org"
YOCTO_AB_URL : "https://autobuilder.yoctoproject.org"
YOCTO_RELEASE_DL_URL : "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;" -UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git-core diffstat unzip texinfo gcc-multilib \
+UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
pylint3 xterm python3-subunit mesa-common-dev"
--
2.17.1

#6 lore raw

Hi Janne,

Quoted 15 lines · Janne Kiiskila

---
 documentation/poky.yaml | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)

documentation/poky.yaml +0 -0
index 3c30c4430e..2554f1e496 100644
@@ -11,7 +11,7 @@ YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"

 YOCTO_DL_URL : "https://downloads.yoctoproject.org" YOCTO_AB_URL : "https://autobuilder.yoctoproject.org" YOCTO_RELEASE_DL_URL : "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;" -UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git-core diffstat unzip

Quoted 8 lines

texinfo gcc-multilib \
+UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git diffstat unzip texinfo gcc-multilib \
      build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
      xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
      pylint3 xterm python3-subunit mesa-common-dev"

Thanks for trying, but "git am" still doesn't accept the patch in your e-mail after I save it:

$ git am ~/\[docs\]\ \[PATCH\ v2\]\ UBUNTU\ sudo\ apt\ git\ instead\ of\ git-core.eml 
Applying: UBUNTU sudo apt git instead of git-core
error: corrupt patch at line 10
Patch failed at 0001 UBUNTU sudo apt git instead of git-core
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

If you could send the e-mail through "git send-email", there would be no HTML in your e-mail, and no mangled lines such as:

-UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git-core diffstat unzip texinf=
o gcc-multilib \

See the "=" character at the end of line 10... there should be only one line.

As explained on
https://docs.yoctoproject.org/dev-manual/common-tasks.html#using-email-to-submit-a-patch
, a good way to test what you're sending is save your own e-mail, and try to apply it by yourself in a new branch, using the "git am" command.

Again, if that's too much extra work for this simple patch this time, I can create the patch for you and give you credits through "Reported-by:".

Cheers,

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

Hello,

Quoted 48 lines · Michael Opdenacker

Hi Janne,

Quoted 15 lines · Janne Kiiskila

---
 documentation/poky.yaml | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)

documentation/poky.yaml +0 -0
index 3c30c4430e..2554f1e496 100644
@@ -11,7 +11,7 @@ YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"

 YOCTO_DL_URL : "https://downloads.yoctoproject.org" YOCTO_AB_URL : "https://autobuilder.yoctoproject.org" YOCTO_RELEASE_DL_URL : "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;" -UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git-core diffstat unzip

Quoted 8 lines

texinfo gcc-multilib \
+UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git diffstat unzip texinfo gcc-multilib \
      build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
      xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
      pylint3 xterm python3-subunit mesa-common-dev"

Thanks for trying, but "git am" still doesn't accept the patch in your e-mail after I save it:

$ git am ~/\[docs\]\ \[PATCH\ v2\]\ UBUNTU\ sudo\ apt\ git\ instead\ of\ git-core.eml 
Applying: UBUNTU sudo apt git instead of git-core
error: corrupt patch at line 10
Patch failed at 0001 UBUNTU sudo apt git instead of git-core
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

If you could send the e-mail through "git send-email", there would be no HTML in your e-mail, and no mangled lines such as:

-UBUNTU_HOST_PACKAGES_ESSENTIAL : "gawk wget git-core diffstat unzip texinf=
o gcc-multilib \

See the "=" character at the end of line 10... there should be only one line.

Quoted 7 lines

As explained on
https://docs.yoctoproject.org/dev-manual/common-tasks.html#using-email-to-submit-a-patch
, a good way to test what you're sending is save your own e-mail, and try to apply it by yourself in a new branch, using the "git am" command.

Again, if that's too much extra work for this simple patch this time, I can create the patch for you and give you credits through "Reported-by:".

Eventually, Janne sent me the patch as an attachment, which I could apply with no problem.

Applied to master-next, thanks !
http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/commit/?h=master-next&id=0c84a97aaac30dad5e95561dbfd77f4787b36300

Cheers,

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com