Upgrade to repository main: Difference between revisions

From Alpine Linux
(Initial notes for upgrading to signed repositories)
 
(Category:Package Manager)
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Obsolete|This was for older Alpine systems.}}
= How to upgrade to signed repositories =
= How to upgrade to signed repositories =


Line 5: Line 7:
We used this occation to also merge the core and extra repositories into a single repository: main.
We used this occation to also merge the core and extra repositories into a single repository: main.


If you boot from CF, USB, cdrom and run from tmpfs, then its just a matter of replacing the boot media and reboot. If you boot and runn from a harddisk, then its really recommended to reinstall the system.
If you boot from CF, USB, or cdrom and run from tmpfs, then it's just a matter of replacing the boot media and reboot. If you boot and run from a harddisk, then it's really recommended to reinstall the system.


This document shows how to upgrade to the signed 'main' repository if you still want to try it. It might work, it might not.
This document shows how to upgrade to the signed 'main' repository if you still want to try it. It might work, it might not.
Line 17: Line 19:


== Upgrading basic packages ==
== Upgrading basic packages ==
Make sure that you have latest apk-tools and other base utilites from 'core' before we switch to the new, 'main' repository.
Then you will need a newer version of apk-tools. Use wget to download a static version of apk.
 
wget http://dl-3.alpinelinux.org/alpine/v1.9/apk.static
chmod +x apk.static
 
Verify that the apk version is atleast 2.0_rc1.
 
./apk.static --version
 
Now, replace the 'core' and 'extra' repositories with 'main' in '/etc/apk/repositories' with a text editor.
 
vi /etc/apk/repositories
 
Then upgrade latest alpine-base, which will include the needed keys.
 
./apk.static add --update-cache --upgrade --allow-untrusted alpine-base


apk add -u alpine-base
Now we should have the keys and latest apk-tools. Start the upgrade and re-install of the recompiled and signed packages.<BR>
'''''Note:''' It might work, it might break your system, so, again, make sure you have that backup.''


(In case you get an ''ERROR: libcrypto: Trying to overwrite usr/lib/libcrypto.so owned by openssl.'' due to a change in openssl/libcrypto you can solve that with ''apk add -u --force openssl'' and then retry ''apk add -u alpine-base'')
apk upgrade --available


Now, replace the core and extra repositories with 'main' in /etc/apk/repositories with a text editor. Then start the upgrade and re-install the recompiled and signed packages. It might work, it might break you system, so again, make sure you have that backup.
If things went well, it should be a matter of rebooting and you are done.


  apk upgrade -a
  reboot


If things went good, it should be a question of reboot and you are done.
[[Category:Installation]]
[[Category:Package Manager]]

Revision as of 19:53, 25 March 2012

This material is obsolete ...

This was for older Alpine systems. (Discuss)

How to upgrade to signed repositories

From Alpine 1.9 alpha18 and newer the packages and repositories are signed. Due to this change the index format changed. Index was also renamed from APK_INDEX.gz to APKINDEX.tar.gz.

We used this occation to also merge the core and extra repositories into a single repository: main.

If you boot from CF, USB, or cdrom and run from tmpfs, then it's just a matter of replacing the boot media and reboot. If you boot and run from a harddisk, then it's really recommended to reinstall the system.

This document shows how to upgrade to the signed 'main' repository if you still want to try it. It might work, it might not.

Make backup

Before you start, you should make a backup of your configuration. This can be done with the lbu utility.

lbu package backup.apkovl.tar.gz

Copy the backup.apkovl.tar.gz to a safe place. Might be handy in case the upgrade fail and you end up reinstalling.

Upgrading basic packages

Then you will need a newer version of apk-tools. Use wget to download a static version of apk.

wget http://dl-3.alpinelinux.org/alpine/v1.9/apk.static
chmod +x apk.static

Verify that the apk version is atleast 2.0_rc1.

./apk.static --version

Now, replace the 'core' and 'extra' repositories with 'main' in '/etc/apk/repositories' with a text editor.

vi /etc/apk/repositories

Then upgrade latest alpine-base, which will include the needed keys.

./apk.static add --update-cache --upgrade --allow-untrusted alpine-base

Now we should have the keys and latest apk-tools. Start the upgrade and re-install of the recompiled and signed packages.
Note: It might work, it might break your system, so, again, make sure you have that backup.

apk upgrade --available

If things went well, it should be a matter of rebooting and you are done.

reboot