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

Release-info-change on a raspbian repository causes build failure #143

Open
shueja opened this issue Aug 28, 2021 · 14 comments
Open

Release-info-change on a raspbian repository causes build failure #143

shueja opened this issue Aug 28, 2021 · 14 comments

Comments

@shueja
Copy link

shueja commented Aug 28, 2021

OctoPrint/CustoPiZer#1
This issue popped up last night on the CustoPiZer repository as I was trying to get that build method to work. When I switched to CustomPiOS (using latest OctoPi release as my base image) and added a module that does nothing except this script:

#!/usr/bin/env bash

source /common.sh

sudo -u pi /home/pi/oprint/bin/pip install -U OctoPrint==1.6.1

I get a very similar error message to what is linked in that issue. @jneilliii found the error and fixed it in CustoPiZer (jneilliii/CustoPiZer@1155256), and the analogous issue here is by my searching located in

I would PR it myself, but I'm not familiar enough with the wonders of docker to be able to properly test that it would fix the issue.

@guysoft
Copy link
Owner

guysoft commented Aug 31, 2021

Why is the releaseinfo changeing there?
@jneilliii any idea why that solved the issue?

@jneilliii
Copy link

Something about upstream release name changes to debian. Without that flag the build fails on the first apt update.

@guysoft
Copy link
Owner

guysoft commented Sep 1, 2021

What base image? I want to open an issue to https://github.com/RPi-Distro/pi-gen/issues/

@shueja
Copy link
Author

shueja commented Sep 1, 2021

I used this: https://github.com/OctoPrint/OctoPi-UpToDate/releases/tag/0.18.0.op1.6.1 with a custom module to install the custom stuff.

@guysoft
Copy link
Owner

guysoft commented Sep 9, 2021

@shueja-personal That apt-get update command is enclose inside an if:

if [ "${BASE_DISTRO}" == "ubuntu" ]; then

So you are not supposed to reach it at all. You are setting ${BASE_DISTRO} to be Ubuntu somewhere.

Make sure to set

BASE_DISTRO=raspbian

Then that line should not run at all.

I tested here with the base image you provided, and it does not even execute that line. It runs:

+ install_cleanup_trap
+ set -e
+ trap cleanup SIGINT SIGTERM
+ '[' raspbian == ubuntu ']'

Then continues.

@jneilliii
Copy link

What base image? I want to open an issue to https://github.com/RPi-Distro/pi-gen/issues/

Whatever you are using for the last stable octopi 0.18 image, 32bit. The same error has popped up with the OctoDash install scripts, where people running the script are getting the error as well. Hope that helps. As an FYI the CustoPiZer scripts were updated and that allowed them to run again without choking on the error.

@jneilliii
Copy link

jneilliii commented Sep 9, 2021

That apt-get update command is enclose inside an if

You are correct, and another PR was sent after that corrected both apt-get commands in that file.

jneilliii/CustoPiZer@fc1d280

@guysoft
Copy link
Owner

guysoft commented Sep 9, 2021

@jneilliii
At the moment I am considering two options here.
I would very much would like to reproduce the bug here and determine what the "Something about upstream release name changes to debian" actually are. It might be something that needs to go upstream.

If not I could just modify it and put a "workaround for issue #143" comment and move on, I would just like to attempt to figure out what is going on before I do that.

@jneilliii
Copy link

jneilliii commented Sep 9, 2021

Well, you could reproduce the error by flashing octopi 0.18 and try to install OctoDash with the command line below. Since CustoPiZer has already got the workaround applied not sure if you can attempt that one anymore.

bash <(wget -qO- https://github.com/UnchartedBull/OctoDash/raw/main/scripts/install.sh)

@jneilliii
Copy link

I think I've seen some people mention that apt update vs apt-get update might not be as problematic, but I haven't personally tested that myself.

@jneilliii
Copy link

I noticed you had done this before here but that is no longer active, assuming that pi-gen updated their base image?

@guysoft
Copy link
Owner

guysoft commented Sep 12, 2021

@jneilliii That was a workaround when Rapi foundation started upgrading packages to buster, which was done i a way where there were mixed packages, its written in the comment.

Unlike the situation here, where that code is inside an if statement, only supposed to run in Ubuntu images. Not in Raspberrypi OS.

They might have accidentally pushed something from bullseye which they might also be working on, but I don't know that for sure.

@jneilliii
Copy link

I think you missed the reply where I mentioned the patch to CustoPiZer was updated again outside of that if statement.

@guysoft
Copy link
Owner

guysoft commented Sep 12, 2021

@jneilliii I did miss it, that corresponds to this line in CustomPiOS:
https://github.com/guysoft/CustomPiOS/blob/devel/src/modules/disable-services/start_chroot_script#L12
At least I think that is the one, its the only place that looks like it.

Now that I know what line is cuasing it I could reproduce:

+ trap cleanup SIGINT SIGTERM
+ apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.7 kB]
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [393 kB]
Reading package lists...
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

Here is a talk on the rpi forms:
https://www.raspberrypi.org/forums/viewtopic.php?t=318302

Also opened an issue here:
RPi-Distro/pi-gen#546

guysoft added a commit to guysoft/klipper that referenced this issue Sep 16, 2021
Hey, installing klipper for the first time and got this issue where the error is:
```
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
```

I had this also on CustomPiOS, and this is the current workaround

|Related:
guysoft/CustomPiOS#143
RPi-Distro/pi-gen#546
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants