Script to update 2.9.x ISO to use Linuxcnc Version 2.10 (master branch)

More
More
1 year 6 months ago #325498 by H-S-W
cnc@raspberrypi:~$ sudo apt-add-repository "deb buildbot2.highlab.com/debian/ bookworm master-uspace 2.9-uspace"
sudo: apt-add-repository: command not found

Please Log in to join the conversation.

More
1 year 6 months ago #325499 by rodw
Try this line but make sure you run the lines containing the rm command first
Code:
sudo echo "deb http://buildbot2.highlab.com/debian/ bookworm master-uspace 2.9-uspace" >> /etc/apt/sources.list.d/linuxcnc-uspace.list

Please Log in to join the conversation.

More
1 year 6 months ago #325513 by Hakan
Won't work, redirect of output is not done by superuser but by the invoking user.
Some solutions here stackoverflow.com/questions/84882/sudo-e...egedfile-doesnt-work

Please Log in to join the conversation.

More
1 year 6 months ago #325536 by rodw

Won't work, redirect of output is not done by superuser but by the invoking user.
Some solutions here stackoverflow.com/questions/84882/sudo-e...egedfile-doesnt-work
Ahh thanks, all my scripting has been done in installers as root
I tested this on my chromebook but there the user has root permissions
Something like this should then work as a script.
Code:
mkdir ~/apt sudo cp -r /etc/apt/*.* ~/apt sudo wget http://buildbot2.highlab.com/buildbot-archive-key.gpg /etc/apt/trusted.gpg.d sudo rm -f /etc/apt/preferences.d/99linuxcnc-uspace.pref sudo rm -f /etc/apt/sources.list.d/linuxcnc-uspace.list sudo tee /etc/apt/sources.list.d/linuxcnc-uspace.list > /dev/null <<EOT deb http://buildbot2.highlab.com/debian/ bookworm master-uspace 2.9-uspace EOT sudo apt update sudo apt upgrade
 

Please Log in to join the conversation.

More
1 year 6 months ago #325540 by Hakan
That worked. Was it supposed to overwrite the content of the linuxcnc-uspace.list?
That's what it did anyway. If you just wanted to add a new line at the end, "tee -a" is the answer.
Considering you did that in the previous commands with echo and >>

Please Log in to join the conversation.

More
1 year 6 months ago #325543 by rodw
Cool, the ISO install points that file to the Linuxcnc.org repositories so deleting it let it us overwrite it to use buildbot2
Also we have a preferences file we delete to ensure Debian chose the Linuxcnc version at Linuxcnc.org, not the obsolete one in the Bookworm distribution. I don't think we need that here because  version 2.10 is > 2.94 (it worked for you)
If we do, we can edit the saved preferences version from the apt folder in your home folder or get it from the linuxcnc-livebuild (the binary versions are what we use, chroot is just for the builder)
github.com/LinuxCNC/linuxcnc-live-build/...worm/config/archives

Finally, I might add that this install is not best practice for apt. If you look at the Ethercat list.binary file, the key is explicitly referenced in the Deb archive line

Please Log in to join the conversation.

More
1 year 6 months ago #325590 by Hakan
I actually only tested that "tee" line.
But now I have tested the script and it fails on the "apt update" line.

Code:
Error:9 http://buildbot2.highlab.com/debian bookworm InRelease   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EF1B07FEE0EE663E W: GPG-fel: http://buildbot2.highlab.com/debian bookworm InRelease: the following signatures couldn't be verified because the public key is not available: NO_PUBKEY EF1B07FEE0EE663E E: The repository 'http://buildbot2.highlab.com/debian bookworm InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

Found it, there should be a "-P" in the wget command
Code:
sudo wget http://buildbot2.highlab.com/buildbot-archive-key.gpg -P /etc/apt/trusted.gpg.d

The output of "apt list --upgradable" shows a number of 2.10 packages such as
linuxcnc-uspace/stable 1:2.10.0~pre0.4165.g55fb1a0267 amd64

Please Log in to join the conversation.

More
1 year 6 months ago #325592 by rodw
These keys are a right pain in the butt, I have been it all before.
Try this which links the key on the Deb line.
You could just use sudo Geany to edit the file, but we know the script works you may need to delete the backup folder ~/apt

Code:
#! /bin/bash mkdir ~/apt sudo cp -r /etc/apt/*.* ~/apt sudo wget http://buildbot2.highlab.com/buildbot-archive-key.gpg -P /etc/apt/trusted.gpg.d sudo rm -f /etc/apt/preferences.d/99linuxcnc-uspace.pref sudo rm -f /etc/apt/sources.list.d/linuxcnc-uspace.list sudo tee /etc/apt/sources.list.d/linuxcnc-uspace.list > /dev/null <<EOT deb [arch=amd64, signed-by=/etc/apt/trusted.gpg.d/buildbot-archive-key.gpg] http://buildbot2.highlab.com/debian/ bookworm master-uspace 2.9-uspace EOT sudo apt update sudo apt upgrade

Please Log in to join the conversation.

More
1 year 6 months ago #325593 by Hakan
I guess you missed the edit I did on that message. There should be a "-P" on the wget line to put the downloaded key in the right place.

Please Log in to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum