Kupfer Linux

Archlinux for mobile devices
the best pmOS clone you've ever seen
my phone runs Arch btw
go > rust


Author: Prawn
Date: 2022-11-12

v0.2.0rc0 merged to dev

What is up, people of the multiverse?

I've merged Kupferbootstrap and PKGBUILDs merge requests into dev!

I consider this v0.2.0rc0.

This release will take some manual intervention to update!

The eagle-eyed among you might spot some barely edited paragraphs from the last post in here.

Coming up: both how to migrate to main to stay on v0.1.5 and how to migrate to dev for the new v0.2.0rc0.

What's in v0.2rc0#

* on gitlab.com public CI runners (flaky) or bring your own runner (preferred)

Migration Instructions#

So, without further ado, let me present you with your two options:

  1. Don't want to be the victim of my development whims so much? Want to postpone the migration pain until v0.2.0 is ready? Prefer smooth-ish sailing? Understandable.
    You can stay on v0.1.x for now by switching to the main branch (if you're unsure, read the linked instructions on how to change branches - you'll see what you have).
  2. Or: Take a ride, experience and test the new Kupfer(bootstrap) with us. Unlike previous versions, updating will require some manual interventions.
    After v0.2.0 is released to main, you will have to do this anyway, but more things might change along the way, dev is short for development after all.
    If you're up for it, follow the migration instructions for v0.2rc0 below.

v0.1.5 - main branch#

If you want to remain on v0.1.5 for now, just follow the instructions in the last blog post

v0.2rc0 - dev branch#

Once v0.2rc0 has hit dev, the procedure for updating is similar, however, you should take some steps first:

  1. Open a terminal.
  2. Clear src/ and pkg/ dirs from outdated PKGBUILDs:
    sudo rm -rf ~/.cache/kupfer/pkgbuilds/*/*/{src,pkg}
  3. Kupferbootstrap tries to do as little as necessary as root (even inside docker) now.
    Hence we'll need to fix some ownership issues, i.e. chown some things to your normal user and group:
    sudo chown -R "$(whoami):$(id -g)" ~/.cache/kupfer/{packages,images,jumpdrive,pkgbuilds}
  4. Edit your config file:
    1. Open your config file with your favourite editor, e.g. nano ~/.config/kupfer/kupferbootstrap.toml.
      If that file doesn't exist or is empty for some reason, run kupferbootstrap config init -N now and reopen the file.
      It should contain the default values now.
    2. In the [pkgbuilds] section, set git_branch to "dev"
    3. in the [pacman] section, set repo_branch to "dev"
      1
      2
      3
      4
      5
      6
      7
      [pkgbuilds]
      ...
      git_branch = "dev"
      
      [pacman]
      ...
      repo_branch = "dev"
      
  5. Change directory (cd) into your kupferbootstrap directory, then run the following commands:
    1
    2
    3
    git remote update
    git switch -f dev
    git reset --hard origin/dev
    
  6. Make sure all the python dependencies from requirements.txt are installed. Either consult the AUR or [create a venv and] run pip install -r requirements.txt
  7. Change directory into your pkgbuilds directory (~/.cache/kupfer/pkgbuilds by default) and run the commands from the last step here too.
  8. If all of that succeeded, back up and regenerate your config, just in case: cp ~/.config/kupfer/kupferbootstrap.toml{,.premigration} && kupferbootstrap config init -N

  9. Run kupferbootstrap packages update --discard-changes.
    Your repository should be on the dev branch and already up to date.

Migrating your existing phone installation to v0.2rc0#

  1. On your device, edit your pacman.conf, e.g. sudo nano /etc/pacman.conf, best done from a PC with SSH.
    Ensure your Kupfer repos towards the end of the file are pointing at /dev/, not /main/, like so:
    [boot]
    Server = https://gitlab.com/kupfer/packages/prebuilts/-/raw/dev/$arch/$repo
    
    Change this for all the Kupfer repos.
  2. Update the system and install kupfer-config: sudo pacman -Syu kupfer-config.
  3. Depending on your flavour, you might also want to install either flavour-barebone, flavour-debug-shell, flavour-phosh, or flavour-gnome.
  4. Enable services: sudo kupfer-config apply
  5. If both commands succeeded, reboot.

It should be as simple as that. Yes, really.