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

Rework to use packages / apt repo (WIP) #134

Closed
wants to merge 131 commits into from
Closed

Rework to use packages / apt repo (WIP) #134

wants to merge 131 commits into from

Conversation

0pcom
Copy link
Collaborator

@0pcom 0pcom commented Jan 8, 2022

This pull request hopes to accomplish the following:

  • Port the skybian build to to the PKGBUILD format for easier maintenance.
  • Create a skybian .deb package with extra files to be included in the skybian image
  • Make use of .deb packages / an APT package repository for skywire
  • Make the skybian image reusable
  • Make the configuration of the hypervisor and the connection of the visors to the hypervisor happen automatically on the official skyminer.
  • Eliminate the skyimager
  • Eliminate the inbuilt skywire updater which is accessed from the hypervisor

Requires: archlinux based x86_64 / ARM / AARCH64 host.

Note: The changes in this PR are accompanied by changes in the skywire-autoconfig script and systemd services in the skywire-bin AUR package

Changes to the builds, scripts, and systemd services for skycoin packages in the AUR and the corresponding / derived .deb packages included in the apt repo at deb.skywire.skycoin.com can be tracked now on github at the-skycoin-project/AUR

Changes to skybian:

  • Ported skybian build to IMGBUILD (a script in PKGBUILD format called by makepkg
  • Add install skywire from debian package / repo configuration in software sources
  • Include other files in PKGBUILD sources sky skybian .deb package
  • Add skybian-chrootconfig.sh script ; called by postinstall script of skybian.deb package which:
    • removes the configuration which was automatically generated on installation of the skywire-bin package
    • disables the skywire service and enables the skywire-boot-config.service
    • enables skybian-firstrun.service
  • Add skymanager (skybian-firstrun) script and service to set IP address to 192.168.xxx.2 if no matching result is found
  • add skybian-patch-config.service to enable rpc requests to the hypervisor from LAN

Changes in skywire packaging:

  • Update skywire-autoconfig to accept the hypervisor public key as an argument for configuring a visor with remote hypervisor
  • Added skywire-autoconfig.service for generating the default configuration (with running hypervisor) on boot
  • Added skywire-autoconfig-remote which retrieves the public key for configuration by querying the rpc server of the visor running at 192.168.xxx.2
  • Added skywire-autoconfig-remote.service for generating the visor configuration / autopeering on boot

Does this change need to mentioned in CHANGELOG.md?
Yes

Testing:

  • requires archlinux host
  • install dependencies as listed in skybian/README.md first
cd skybian
makepkg --skippgpcheck --noarchive -p IMGBUILD

Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the skybian-script.tar.gz archives doing in this PR?

PKGBUILD Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
armbian.IMGBUILD Outdated Show resolved Hide resolved
script/install-skywire.service Outdated Show resolved Hide resolved
Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the Skycoin.gpg key as txt?

Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no precompiled binaries in this PR. I dont see why we would need to have them. They are cluttering the repo as well.

util/srvpk.go Outdated Show resolved Hide resolved
Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no precompiled binaries in this PR. I dont see why we would need to have them. They are cluttering the repo as well.

Overall, this seems very good. We get rid of a lot of code we need to maintain and the setup is much simplified.

There are a few areas we need to improve on overall though

  1. There should be no precompiled binaries in here. It is easy to compile binaries during the image build.
  2. I think having some subdirectories for the script folder may be helpful to figure out what stage scripts are invoked in or what function they serve.
  3. Similarly, a single line of comments at the top of scripts may help. Could simply state when its invoked (from where) and what it does.
  4. The README needs to be reworked. It does not seem properly structured to me. It should start with a brief overview over what this repo tries to achieve/provide. Then it can go on to install/build instructions.

@0pcom
Copy link
Collaborator Author

0pcom commented Jun 24, 2022

Can we add the Skycoin.gpg key as txt?

it is added to the system in a file now, i think. so even if it was text in the build, it would be a file on the board.

@0pcom
Copy link
Collaborator Author

0pcom commented Jun 24, 2022

What are the skybian-script.tar.gz archives doing in this PR?

without an archive i would need to specify every file in the archives in the source array explicitly.

Ive gotten into the habit of archiving any scripts and services i include in a package to make the build shorter. Same is done for the skycoin/AUR

@0pcom
Copy link
Collaborator Author

0pcom commented Jun 24, 2022

There should be no precompiled binaries in this PR. I dont see why we would need to have them. They are cluttering the repo as well.

I was unable to install the crosscompilation dependencies from the AUR; builds are failing currently.

I have them installed on my machines here but i cannot find the package that was installed, to install them on the build server.

this http endpoint could be included with skywire-cli and avoid my having to crosscompile the binaries.

@0pcom
Copy link
Collaborator Author

0pcom commented Jun 24, 2022

@jdknives i generally agree with your final comments. Will make the changes ASAP.

@0pcom
Copy link
Collaborator Author

0pcom commented Jun 30, 2022

changes pushed to master outside of this PR

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

Successfully merging this pull request may close these issues.

3 participants