Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube_1.16.0-0_amd64.deb: package architecture (arm64) does not match system (amd64) #9995

Closed
mgabeler-lee-6rs opened this issue Dec 18, 2020 · 20 comments · Fixed by #9998 or #10004
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. packaging/apt Debian (apt) packaging issues priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@mgabeler-lee-6rs
Copy link

Steps to reproduce the issue:

  1. Download amd64 debian package of latest release: https://github.com/kubernetes/minikube/releases/download/v1.16.0/minikube_1.16.0-0_amd64.deb
  2. Inspect the package file
  3. It's marked as an arm64 package not an amd64 package
  4. It has stray files in it that are clearly not meant to be there

Full output of failed command:

$ dpkg --info minikube_1.16.0-0_amd64.deb ; dpkg --contents minikube_1.16.0-0_amd64.deb 
 new Debian package, version 2.0.
 size 20578594 bytes: control archive=389 bytes.
     381 bytes,    11 lines      control              
 Package: minikube
 Version: 1.16.0
 Section: base
 Priority: optional
 Architecture: arm64
 Maintainer: Thomas Strömberg <t+minikube@stromberg.org>
 Description: Minikube
  minikube is a tool that makes it easy to run Kubernetes locally.
  minikube runs a single-node Kubernetes cluster inside a VM on your
  laptop for users looking to try out Kubernetes or develop with it 
  day-to-day.
drwxr-xr-x root/root         0 2020-12-17 18:41 ./
drwxr-xr-x root/root         0 2020-12-17 18:41 ./minikube_deb_template/
drwxr-xr-x root/root         0 2020-12-17 18:41 ./minikube_deb_template/DEBIAN/
-rw-r--r-- root/root       416 2020-12-17 18:41 ./minikube_deb_template/DEBIAN/control
drwxr-xr-x root/root         0 2020-12-17 18:41 ./usr/
drwxr-xr-x root/root         0 2020-12-17 18:41 ./usr/bin/
-rwxr-xr-x root/root  57925077 2020-12-17 18:41 ./usr/bin/minikube

Note: Architecture: arm64 and ./minikube_deb_template/... in the contents.

However the actual binary contained within is an amd64 one:

# extract the contents of the package
$ file minikube
minikube: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=6LZF01FcZrGBprW2lwYI/gWzE5fRYw4NT_meHguiF/54zHaIwKVnjc2RZCfg6t/T0VXjXYTfvHZFrWQslv4, not stripped
@KernelErr
Copy link

Seems that both releases from Google Storage and GitHub have the same problem.

@Jorropo
Copy link
Contributor

Jorropo commented Dec 18, 2020

Same problem here, the .deb package in the github releases are wrong also, but it is different from the arm64 (size is a bit bigger).

EDIT:
Sorry, I though this report was about the website (https://minikube.sigs.k8s.io/docs/start/#debian-package), both are wrong :)

@Jorropo
Copy link
Contributor

Jorropo commented Dec 18, 2020

This is only an error in the manifest. With :

sudo dpkg -i --force-architecture minikube_1.16.0-0_amd64.deb

This works fine.

@tstromberg tstromberg added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Dec 18, 2020
@tstromberg
Copy link
Contributor

tstromberg commented Dec 18, 2020

Thanks for the update. I believe this was our first major release publishing arm64/amd64 debs, and it looks like we got it a bit wrong. I'm no .deb expert, so if anyone is interested in helping us to fix our .deb Makefile rule, it's defined here:

out/minikube_$(DEB_VERSION)-0_%.deb: out/minikube-linux-%

@tstromberg tstromberg added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. packaging/apt Debian (apt) packaging issues kind/bug Categorizes issue or PR as related to a bug. labels Dec 18, 2020
@tstromberg
Copy link
Contributor

I strongly suspect that v1.16.0-beta.0 was also impacted, although we haven't yet seen reports confirming it.

@Jorropo
Copy link
Contributor

Jorropo commented Dec 18, 2020

I strongly suspect that v1.16.0-beta.0 was also impacted, although we haven't yet seen reports confirming it.

ok weird, running :

make out/minikube_1.16.0-0_amd64.deb

Works like a charm.
I guess the bug is elsewhere.

@tstromberg
Copy link
Contributor

tstromberg commented Dec 18, 2020 via email

@Jorropo
Copy link
Contributor

Jorropo commented Dec 18, 2020

I wonder if it's due to running both commands in the same directory?

You are right, there is a race condition where they both create their temporary dir at out/minikube_1.16.0/.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Dec 18, 2020

Probably also need some minimal regression tests, when doing the release.

But introduced in 318bdcd due to running with make -j 16

@afbjorklund afbjorklund self-assigned this Dec 18, 2020
@Jorropo
Copy link
Contributor

Jorropo commented Dec 18, 2020

I have a fix, I'm pushing a pr.

Jorropo added a commit to Jorropo/minikube that referenced this issue Dec 18, 2020
Signed-off-by: Jorropo <jorropo.pgm@gmail.com>
@afbjorklund
Copy link
Collaborator

The good news is that the arm64.deb looks fine :-)

Also the rpm files got "lucky", in the make race.

@tstromberg
Copy link
Contributor

tstromberg commented Dec 18, 2020

The root cause remains unfixed -- but I will push up a new amd64 .deb file this morning for this release. I can confirm that the arm64 deb installs fine.

@tstromberg tstromberg changed the title Bad build/upload of minikube_1.16.0-0_amd64.deb minikube_1.16.0-0_amd64.deb: package architecture (arm64) does not match system (amd64) Dec 18, 2020
@tstromberg
Copy link
Contributor

tstromberg commented Dec 18, 2020

It took a bit of surgery to post a new Debian package without mucking with the checksum of the minikube binary, but:

Build:

git checkout tags/v1.16.0
 curl -L https://github.com/kubernetes/minikube/releases/download/v1.16.0/minikube-linux-amd64 > out/minikube 
make -e DEB_VERSION=1.16.0 -e DEB_REVISION=1 out/minikube_1.16.0-1_amd64.deb

Propagate:

gsutil cp out/minikube_1.16.0-1_amd64.deb gs://minikube/releases/latest
gsutil cp out/minikube_1.16.0-1_amd64.deb gs://minikube/releases/latest/minikube_latest_amd64.deb 
gsutil cp out/minikube_1.16.0-1_amd64.deb gs://minikube/releases/v1.16.0/

Then uploaded manually to GitHub releases:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_1.16.0-1_amd64.deb
<drag file to GitHub release>

@tstromberg
Copy link
Contributor

tstromberg commented Dec 18, 2020

The broken minikube_1.16.0-0_amd64.deb package has been removed from GitHub and GCS to avoid confusion.

The updated one has a new revision and filename of minikube_1.16.0-1_amd64.deb

My apologies for the inconvenience. We'll leave this issue open until the Makefile can be updated so that this build corruption issue cannot occur again.

@afbjorklund
Copy link
Collaborator

It looks like the actual binaries were all correct, so the issue was with the packaging

@mgabeler-lee-6rs
Copy link
Author

Was able to download & install the fixed release and restart my local minikube environment with the new version. Thanks! 👍

@bl-ue
Copy link

bl-ue commented Dec 18, 2020

@mgabeler-lee-6rs You should re-open this:

quoting @tstromberg #9995 (comment):

We'll leave this issue open until the Makefile can be updated so that this build corruption issue cannot occur again.

@tstromberg tstromberg reopened this Dec 18, 2020
@mgabeler-lee-6rs
Copy link
Author

Oops, missed that, sorry!

@bl-ue
Copy link

bl-ue commented Dec 18, 2020

This already has two PRs #9998 and #10004 linked
/remove-good-first-issue
/remove-help-wanted

@k8s-ci-robot k8s-ci-robot removed the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Dec 18, 2020
@bl-ue
Copy link

bl-ue commented Dec 18, 2020

The maintainers are working on this
/remove-help-wanted
(@tstromberg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. packaging/apt Debian (apt) packaging issues priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
7 participants