Difference between revisions of "Repository maintenance"

From postmarketOS
Jump to: navigation, search
(See also: link to add a new arch page)
(Fixing upstream incompatibilities with Alpine's repository: add aportgen grub-efi-x86)
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
This page is about maintaining the official binary package repository of postmarketOS. It does not relate to the local package repository that <code>pmbootstrap</code> creates when compiling packages. So most people will not need this.
 
This page is about maintaining the official binary package repository of postmarketOS. It does not relate to the local package repository that <code>pmbootstrap</code> creates when compiling packages. So most people will not need this.
  
== QT upgrade ==
+
== Qt upgrade ==
There are KDE packages, which need to be rebuilt after each QT upgrade:
+
There are KDE packages, which need to be rebuilt after each Qt upgrade:
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
$ pmbootstrap pkgrel_bump kwayland kwin plasma-framework kdeclarative  
+
$ pmbootstrap pkgrel_bump kwayland kwin plasma-framework kdeclarative
 
</syntaxhighlight>
 
</syntaxhighlight>
  
See {{github|978}} for an idea to automatize this and for more information.
+
See {{issue|130|pmaports}} for an idea to automatize this and for more information.
 +
 
 +
== Fixing upstream incompatibilities with Alpine's repository ==
 +
 
 +
The following script checks out the master branch of pmbootstrap and pmaports, automatically bumps the pkgrels that need to be bumped because of soname bumps, and regenerates all aports that are based on Alpine's aports.
 +
Finally it executes the upstream compatibility test case again, which should run through again with the changes it made.
 +
 
 +
After the script ran, manually check the diff in the pmaports.git repository. Then make reasonable patches and commit messages from the changes.
 +
 
 +
<syntaxhighlight lang="shell">
 +
#!/bin/sh -ex
 +
 
 +
# make sure we don't get an outdated mirror
 +
mirror="http://dl-cdn.alpinelinux.org/alpine/"
 +
 
 +
git -C ~/code/pmbootstrap checkout master
 +
git -C ~/code/pmbootstrap/aports checkout master
 +
 
 +
pmbootstrap --mirror-alpine="$mirror" -y zap
 +
pmbootstrap --mirror-alpine="$mirror" \
 +
    chroot --add=git --user -- git -C /mnt/pmbootstrap-git/aports_upstream pull
 +
pmbootstrap --mirror-alpine="$mirror" pkgrel_bump --auto
 +
pmbootstrap --mirror-alpine="$mirror" aportgen \
 +
    binutils-armhf binutils-aarch64 binutils-armv7 \
 +
    busybox-static-armhf busybox-static-aarch64 busybox-static-armv7 \
 +
    gcc6-armhf gcc6-aarch64 gcc6-armv7 \
 +
    gcc-armhf gcc-aarch64 gcc-armv7 \
 +
    musl-armhf musl-aarch64 musl-armv7 \
 +
    grub-efi-x86
 +
 
 +
cd ~/code/pmbootstrap/aports
 +
pytest .gitlab-ci/testcases/test_upstream_compatibility.py
 +
git diff --name-only
 +
</syntaxhighlight>
  
 
== See also ==
 
== See also ==

Revision as of 18:28, 5 April 2019

This page is about maintaining the official binary package repository of postmarketOS. It does not relate to the local package repository that pmbootstrap creates when compiling packages. So most people will not need this.

Qt upgrade

There are KDE packages, which need to be rebuilt after each Qt upgrade:

$ pmbootstrap pkgrel_bump kwayland kwin plasma-framework kdeclarative

See pmaports#130 for an idea to automatize this and for more information.

Fixing upstream incompatibilities with Alpine's repository

The following script checks out the master branch of pmbootstrap and pmaports, automatically bumps the pkgrels that need to be bumped because of soname bumps, and regenerates all aports that are based on Alpine's aports. Finally it executes the upstream compatibility test case again, which should run through again with the changes it made.

After the script ran, manually check the diff in the pmaports.git repository. Then make reasonable patches and commit messages from the changes.

#!/bin/sh -ex

# make sure we don't get an outdated mirror
mirror="http://dl-cdn.alpinelinux.org/alpine/"

git -C ~/code/pmbootstrap checkout master
git -C ~/code/pmbootstrap/aports checkout master

pmbootstrap --mirror-alpine="$mirror" -y zap
pmbootstrap --mirror-alpine="$mirror" \
    chroot --add=git --user -- git -C /mnt/pmbootstrap-git/aports_upstream pull
pmbootstrap --mirror-alpine="$mirror" pkgrel_bump --auto
pmbootstrap --mirror-alpine="$mirror" aportgen \
    binutils-armhf binutils-aarch64 binutils-armv7 \
    busybox-static-armhf busybox-static-aarch64 busybox-static-armv7 \
    gcc6-armhf gcc6-aarch64 gcc6-armv7 \
    gcc-armhf gcc-aarch64 gcc-armv7 \
    musl-armhf musl-aarch64 musl-armv7 \
    grub-efi-x86

cd ~/code/pmbootstrap/aports
pytest .gitlab-ci/testcases/test_upstream_compatibility.py
git diff --name-only

See also