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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
31 Mar 2025 09:11 #325371 by tommylight

Please Log in or Create an account to join the conversation.

More
02 Apr 2025 07:35 #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 or Create an account to join the conversation.

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
02 Apr 2025 08:28 - 02 Apr 2025 08:30 #325499 by rodw
Try this line but make sure you run the lines containing the rm command first
sudo echo "deb http://buildbot2.highlab.com/debian/ bookworm master-uspace 2.9-uspace" >> /etc/apt/sources.list.d/linuxcnc-uspace.list
Last edit: 02 Apr 2025 08:30 by rodw.

Please Log in or Create an account to join the conversation.

More
02 Apr 2025 13:14 #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 or Create an account to join the conversation.

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
02 Apr 2025 19:47 #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.
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 or Create an account to join the conversation.

More
02 Apr 2025 20:24 #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 or Create an account to join the conversation.

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
02 Apr 2025 20:48 #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 or Create an account to join the conversation.

More
03 Apr 2025 07:13 - 03 Apr 2025 07:23 #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.

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
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
Last edit: 03 Apr 2025 07:23 by Hakan.

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
03 Apr 2025 07:31 - 03 Apr 2025 07:54 #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

#! /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
Last edit: 03 Apr 2025 07:54 by rodw.

Please Log in or Create an account to join the conversation.

More
03 Apr 2025 07:52 - 03 Apr 2025 07:52 #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.
Last edit: 03 Apr 2025 07:52 by Hakan.

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum