No aarch64 branch naming since 4.26 #195

Closed
opened 2024-06-26 15:21:15 +00:00 by spikerguy · 21 comments
spikerguy commented 2024-06-26 15:21:15 +00:00 (Migrated from gitlab2.manjaro.org)

Since 4.26 update, it is defaulting to stable instead arm-stable

I am not sure if this is pkgbuild issue or the source issue.

Example: We normally have arm-stable as default but since the new update it is defaulting to stable instead arm-stable

Error from the package

Since 4.26 update, it is defaulting to `stable` instead `arm-stable` I am not sure if this is pkgbuild issue or the source issue. Example: We normally have arm-stable as default but since the new update it is defaulting to `stable` instead `arm-stable` [Error from the package](https://github.com/manjaro-arm/rootfs/actions/runs/9672459529/job/26684792162#step:7:566)
fhdk commented 2024-06-30 14:41:36 +00:00 (Migrated from gitlab2.manjaro.org)

hmmm - pacman-mirrors check the runtime architecture - it will apply arm- internally - this should not have changed.

hmmm - pacman-mirrors check the runtime architecture - it will apply `arm-` internally - this should not have changed.
fhdk commented 2024-06-30 15:24:06 +00:00 (Migrated from gitlab2.manjaro.org)

I cannot deduce what this would be from the output provided - it seems to be a CI.

The default config will always be stable - so if you are looking the .pacnew then it is correct - at least for what I know - perhaps there is a separate PKGBUILD for arm architecture - I have not checked that option.

The pacman-mirrors package itself is architecture agnostic - in the sense that the architecture is read from the system at runtime and the arm- prefix is applied to the config if aarch64 is detected.

I just checked the build process on a rpi5 using the PKGBUILD in packages/core/pacman-mirrors.

It generates no errors - perhaps you could provide some more insight ?

Did you solve the issue ? I have checked a fresh sdcard build using manjaro-arm-installer - switching the final install to unstable, sync'ing with the repo provides a functional pacman-mirrors 4.26.1-1.

If I had run manjaro-arm-installer arm-unstable I imagine I would have gotten 4.26.1 from the beginning.

I cannot deduce what this would be from the output provided - it seems to be a CI. The default config will always be stable - so if you are looking the .pacnew then it is correct - at least for what I know - perhaps there is a separate PKGBUILD for arm architecture - I have not checked that option. The pacman-mirrors package itself is architecture agnostic - in the sense that the architecture is read from the system at runtime and the `arm-` prefix is applied to the config if aarch64 is detected. I just checked the build process on a rpi5 using the PKGBUILD in packages/core/pacman-mirrors. It generates no errors - perhaps you could provide some more insight ? Did you solve the issue ? I have checked a fresh sdcard build using `manjaro-arm-installer` - switching the final install to unstable, sync'ing with the repo provides a functional pacman-mirrors 4.26.1-1. If I had run `manjaro-arm-installer arm-unstable` I imagine I would have gotten 4.26.1 from the beginning.
yochananmarqos1 commented 2024-06-30 19:16:53 +00:00 (Migrated from gitlab2.manjaro.org)

@spikerguy Apparently it's something with your CI. I've been able to build ARM packages just fine.

I'm closing the issue as it has nothing to do with pacman-mirrors.

@spikerguy Apparently it's something with your CI. I've been able to build ARM packages just fine. I'm closing the issue as it has nothing to do with `pacman-mirrors`.
yochananmarqos1 (Migrated from gitlab2.manjaro.org) closed this issue 2024-06-30 19:16:55 +00:00
pheiduck commented 2024-06-30 19:53:23 +00:00 (Migrated from gitlab2.manjaro.org)

@spikerguy you can fix that by a sed command if it still cause issues...

@spikerguy you can fix that by a sed command if it still cause issues...
spikerguy commented 2024-07-01 12:22:18 +00:00 (Migrated from gitlab2.manjaro.org)

Can someone confirm how does it detect the arch of the host ?

Cause it looks like the detection method have changed ?

We have not done any change to the build CI other than pacman-mirrors pkg got updated.

We can still build images on arm-stable and arm-testing branches as they still have 4.24 pkg.

@yochananmarqos1 please wait for few days before closing an issue.

We also have ARCH defined in our pacman-conf.aarch64 which gets pulled.

Unless it skips if after failing to find SyncFirst command here.

Can someone confirm how does it detect the arch of the host ? Cause it looks like the detection method have changed ? We have not done any change to the build CI other than pacman-mirrors pkg got updated. We can still build images on arm-stable and arm-testing branches as they still have 4.24 pkg. @yochananmarqos1 please wait for few days before closing an issue. We also have ARCH defined in our [pacman-conf.aarch64](https://gitlab.manjaro.org/manjaro-arm/applications/manjaro-arm-tools/-/blob/master/lib/pacman.conf.aarch64?ref_type=heads#L24) which gets pulled. Unless it skips if after failing to find SyncFirst command [here](https://gitlab.manjaro.org/manjaro-arm/applications/manjaro-arm-tools/-/blob/master/lib/pacman.conf.aarch64?ref_type=heads#L19).
spikerguy (Migrated from gitlab2.manjaro.org) reopened this issue 2024-07-01 12:22:21 +00:00
spikerguy commented 2024-07-01 12:24:10 +00:00 (Migrated from gitlab2.manjaro.org)

we already have sed but it resets to Stable

Can be seen here

we already have sed but it resets to `Stable` Can be seen [here](https://github.com/manjaro-arm/rootfs/actions/runs/9672459529/job/26684792162#step:7:17)
spikerguy commented 2024-07-01 12:54:57 +00:00 (Migrated from gitlab2.manjaro.org)

Dan's comments:

The step that fails is https://github.com/manjaro-arm/rootfs/blob/master/.github/workflows/aarch64_base_unstable_docker_build.yaml#L150. 

It completes the keyring population and then fails, so I wonder if pacman-mirrors simply does not get the check right.

Because it's running on x86 hardware, but emulated to be aarch64.
Dan's comments: ``` The step that fails is https://github.com/manjaro-arm/rootfs/blob/master/.github/workflows/aarch64_base_unstable_docker_build.yaml#L150. It completes the keyring population and then fails, so I wonder if pacman-mirrors simply does not get the check right. Because it's running on x86 hardware, but emulated to be aarch64. ```
spikerguy commented 2024-07-01 13:34:14 +00:00 (Migrated from gitlab2.manjaro.org)
https://github.com/manjaro-arm/rootfs/blob/master/.github/workflows/aarch64_base_unstable_docker_build.yaml#L150 sed does not seem to help,
fhdk commented 2024-07-01 15:00:04 +00:00 (Migrated from gitlab2.manjaro.org)

Can someone confirm how does it detect the arch of the host ?

https://gitlab.manjaro.org/applications/pacman-mirrors/-/blob/master/pacman_mirrors/pacman_mirrors.py?ref_type=heads#L106

But that doesn't seem to be the issue.

I cannot deduce what is the issue as I don't know the environment.

https://gitlab.manjaro.org/applications/pacman-mirrors/-/blob/master/pacman_mirrors/functions/util.py?ref_type=heads#L81-90

> Can someone confirm how does it detect the arch of the host ? https://gitlab.manjaro.org/applications/pacman-mirrors/-/blob/master/pacman_mirrors/pacman_mirrors.py?ref_type=heads#L106 But that doesn't seem to be the issue. I cannot deduce what is the issue as I don't know the environment. https://gitlab.manjaro.org/applications/pacman-mirrors/-/blob/master/pacman_mirrors/functions/util.py?ref_type=heads#L81-90
fhdk commented 2024-07-02 13:07:22 +00:00 (Migrated from gitlab2.manjaro.org)

If it is a comment from Dan - then you should look at the timestamp for that change - it could be anything.

The architecture check is provided by the python platform package.

The message in your log is created by pacman-mirrors (functions->config_setup.py->line126)

 .: ERROR: Invalid setting in `/etc/pacman-mirrors.conf`
     'Branch = stable'; EXPECTED arm-stable|arm-testing|arm-unstable

Usually the line reads

# Branch = stable

If for some reason the pacman.conf file used has an uncommented value - the error is thrown. This is intended as one would be able to manually alter the config and cause severe system issues with incompatible packages.

Branch = stable

The solution as I see it - is to ensure the CI is using the correct default file.

Just for the sake of testing - I installed manjaro-arm-tools and ran a buildimg on my workstation (x86)

I have never done this before - I assume the errors thrown has no impact as it seems to be some internal cleaning which fails due mounts still active.

 $ sudo buildarmimg -b unstable -n

[...]

==> Creating minimal edition rootfs image for rpi4 completed successfully

==> Creating minimal edition image for rpi4...
  -> Creating ext4 partitions...
  -> Copying files to image...
  -> Writing the boot loader images...
Boot PARTUUID is 97930651-01...
Root PARTUUID is 97930651-02...
Root UUID is 544fd63f-7ea4-4ffd-9144-bb2be2c0e2be...
===> Installing default ext4 /boot/cmdline.txt file...
===> Installing default /boot/config.txt file...
  -> Cleaning up image...
rm: cannot remove '/var/lib/manjaro-arm-tools/tmp/boot': Device or resource busy
rmdir: failed to remove '/var/lib/manjaro-arm-tools/tmp/root': Device or resource busy
Cleaning up image failed, aborting
  -> Compressing Manjaro-ARM-minimal-rpi4-24.07.img with xz...
Manjaro-ARM-minimal-rpi4-24.07.img: 875,9 MiB / 3.609,0 MiB = 0,243, 89 MiB/s, 0:40
  -> Removing rootfs_aarch64...
If it is a comment from Dan - then you should look at the timestamp for that change - it could be anything. The architecture check is provided by the python platform package. The message in your log is created by pacman-mirrors (functions->config_setup.py->line126) ``` .: ERROR: Invalid setting in `/etc/pacman-mirrors.conf` 'Branch = stable'; EXPECTED arm-stable|arm-testing|arm-unstable ``` Usually the line reads ``` # Branch = stable ``` If for some reason the pacman.conf file used has an uncommented value - the error is thrown. This is intended as one would be able to manually alter the config and cause severe system issues with incompatible packages. ``` Branch = stable ``` The solution as I see it - is to ensure the CI is using the correct default file. Just for the sake of testing - I installed manjaro-arm-tools and ran a buildimg on my workstation (x86) I have never done this before - I assume the errors thrown has no impact as it seems to be some internal cleaning which fails due mounts still active. ``` $ sudo buildarmimg -b unstable -n [...] ==> Creating minimal edition rootfs image for rpi4 completed successfully ==> Creating minimal edition image for rpi4... -> Creating ext4 partitions... -> Copying files to image... -> Writing the boot loader images... Boot PARTUUID is 97930651-01... Root PARTUUID is 97930651-02... Root UUID is 544fd63f-7ea4-4ffd-9144-bb2be2c0e2be... ===> Installing default ext4 /boot/cmdline.txt file... ===> Installing default /boot/config.txt file... -> Cleaning up image... rm: cannot remove '/var/lib/manjaro-arm-tools/tmp/boot': Device or resource busy rmdir: failed to remove '/var/lib/manjaro-arm-tools/tmp/root': Device or resource busy Cleaning up image failed, aborting -> Compressing Manjaro-ARM-minimal-rpi4-24.07.img with xz... Manjaro-ARM-minimal-rpi4-24.07.img: 875,9 MiB / 3.609,0 MiB = 0,243, 89 MiB/s, 0:40 -> Removing rootfs_aarch64... ```
fhdk commented 2024-07-02 13:10:52 +00:00 (Migrated from gitlab2.manjaro.org)

This line in your CI

https://github.com/manjaro-arm/rootfs/blob/master/.github/workflows/aarch64_base_unstable_docker_build.yaml#L136

appears to be targeting the wrong file - if anything at all - it should be pacman-mirrors.conf

sed -i s/"arm-stable"/"arm-$BRANCH"/g $LIBDIR/pacman.conf.$ARCH

But you don't need to use sed to modify - pacman-mirrors can do it for you using the API

This line in your CI https://github.com/manjaro-arm/rootfs/blob/master/.github/workflows/aarch64_base_unstable_docker_build.yaml#L136 appears to be targeting the wrong file - if anything at all - it should be pacman-mirrors.conf ``` sed -i s/"arm-stable"/"arm-$BRANCH"/g $LIBDIR/pacman.conf.$ARCH ``` But you don't need to use sed to modify - pacman-mirrors can do it for you using the API
spikerguy commented 2024-07-02 20:05:29 +00:00 (Migrated from gitlab2.manjaro.org)

Just tried with the api call PR

I even compiled a new pacman-mirrors with latest python from arm-unstable branch

The api call fails with this

Just tried with the api call [PR](https://github.com/manjaro-arm/rootfs/pull/8/commits/5f20c68f387c52886b0a01b0e31b0031992aaa83) I even compiled a new `pacman-mirrors` with latest python from arm-unstable branch The api call fails with [this](https://github.com/manjaro-arm/rootfs/actions/runs/9767125775/job/26961670300#step:7:574)
spikerguy commented 2024-07-02 21:39:19 +00:00 (Migrated from gitlab2.manjaro.org)

A user have reported some issue with the new package.

https://forum.manjaro.org/t/pacman-mirror-update-error/164810

A user have reported some issue with the new package. https://forum.manjaro.org/t/pacman-mirror-update-error/164810
yochananmarqos1 commented 2024-07-02 22:48:58 +00:00 (Migrated from gitlab2.manjaro.org)

Sorry, I typed something dumb and then deleted it. Nevermind...

Sorry, I typed something dumb and then deleted it. Nevermind...
fhdk commented 2024-07-03 03:01:17 +00:00 (Migrated from gitlab2.manjaro.org)

Why are you building the package for arm ?

The code is architecture agnostic - there is no need - but if you absolut must ... be sure to build from the correct pkgbuild

https://gitlab.manjaro.org/packages/core/pacman-mirrors

Why are you building the package for arm ? The code is architecture agnostic - there is no need - but if you absolut must ... be sure to build from the correct pkgbuild https://gitlab.manjaro.org/packages/core/pacman-mirrors
fhdk commented 2024-07-03 03:33:38 +00:00 (Migrated from gitlab2.manjaro.org)

I get it - pacman-mirrors has been updated - CI fails - pacman-mirrors is the fault.

I even compiled a new pacman-mirrors with latest python from arm-unstable branch

The api call fails with this

That message shows an incomplete pacman-mirrors - I have no idea how you build it

Build on rpi5

 $ git clone https://gitlab.manjaro.org/packages/core/pacman-mirrors
 $ cd pacman-mirrors
 $ makepkg pacman-mirrors
[...]
==> Entering fakeroot environment...
==> Starting package()...
~/pacman-mirrors/src/pacman-mirrors/data/locale ~/pacman-mirrors/src/pacman-mirrors
~/pacman-mirrors/src/pacman-mirrors
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "pacman-mirrors"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: pacman-mirrors 4.26.1-1 (2024-07-03T04:59:47 CEST)

There is no need to mess with branch - unless it is for changing the hardcoded repo path in pacman.conf.$ARCH - I admit - that confused me a lot.

Why hardcode the server ? It is simple to use the mirrorlist.

If you need something specifically for the build process, the API is created for that purpose

pacman-mirrors --api --set-url https://repo.manjaro.org/repo

You can even target a configuration in an arbitrary folder - change branch and manipulate the mirrorlist to use the branch as well

pacman-mirrors --api --prefix /mnt --set-branch unstable --re-branch

See the documentation

I get it - pacman-mirrors has been updated - CI fails - pacman-mirrors is the fault. > I even compiled a new `pacman-mirrors` with latest python from arm-unstable branch > > The api call fails with [this](https://github.com/manjaro-arm/rootfs/actions/runs/9767125775/job/26961670300#step:7:574) That message shows an incomplete pacman-mirrors - I have no idea how you build it Build on rpi5 ``` $ git clone https://gitlab.manjaro.org/packages/core/pacman-mirrors $ cd pacman-mirrors $ makepkg pacman-mirrors [...] ==> Entering fakeroot environment... ==> Starting package()... ~/pacman-mirrors/src/pacman-mirrors/data/locale ~/pacman-mirrors/src/pacman-mirrors ~/pacman-mirrors/src/pacman-mirrors ==> Tidying install... -> Removing libtool files... -> Purging unwanted files... -> Removing static library files... -> Stripping unneeded symbols from binaries and libraries... -> Compressing man and info pages... ==> Checking for packaging issues... ==> Creating package "pacman-mirrors"... -> Generating .PKGINFO file... -> Generating .BUILDINFO file... -> Generating .MTREE file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: pacman-mirrors 4.26.1-1 (2024-07-03T04:59:47 CEST) ``` There is no need to mess with branch - unless it is for changing the hardcoded repo path in pacman.conf.$ARCH - I admit - that confused me a lot. Why hardcode the server ? It is simple to use the mirrorlist. If you need something specifically for the build process, the API is created for that purpose pacman-mirrors --api --set-url https://repo.manjaro.org/repo You can even target a configuration in an arbitrary folder - change branch *and* manipulate the mirrorlist to use the branch as well pacman-mirrors --api --prefix /mnt --set-branch unstable --re-branch See the documentation
fhdk commented 2024-07-03 03:50:29 +00:00 (Migrated from gitlab2.manjaro.org)

The package currently in arm-unstable 4.26.1-3 does not match the aarch64 system python at 3.12.

http://mirror.easyname.at/manjaro/arm-unstable/core/aarch64/pacman-mirrors-4.26.1-3-any.pkg.tar.zst

The package installs to python3.11 site-packages.

This will be causing the error mentioned above with a forum link - https://forum.manjaro.org/t/pacman-mirror-update-error/164810

The package currently in arm-unstable 4.26.1-3 does not match the aarch64 system python at 3.12. http://mirror.easyname.at/manjaro/arm-unstable/core/aarch64/pacman-mirrors-4.26.1-3-any.pkg.tar.zst The package installs to python3.11 site-packages. This will be causing the error mentioned above with a forum link - https://forum.manjaro.org/t/pacman-mirror-update-error/164810
fhdk commented 2024-07-03 09:03:18 +00:00 (Migrated from gitlab2.manjaro.org)

I am trying to reproduce the error message from the orginal topic.

There is something fishy with the set-branch command when running on arm device.

When experimenting a little I find the set-branch to correctly alter the branch but then it throws the error message and a non-zero exit-code which is likely why the CI fails.

I am trying to reproduce the error message from the orginal topic. There is something fishy with the set-branch command when running on arm device. When experimenting a little I find the set-branch to correctly alter the branch but then it throws the error message and a non-zero exit-code which is likely why the CI fails.
fhdk commented 2024-07-03 09:31:55 +00:00 (Migrated from gitlab2.manjaro.org)

mentioned in merge request !350

mentioned in merge request !350
fhdk commented 2024-07-03 09:32:10 +00:00 (Migrated from gitlab2.manjaro.org)

mentioned in commit 7a1813a73e

mentioned in commit 7a1813a73e2492a544e7f26a4eea8eefeafc1bc1
fhdk (Migrated from gitlab2.manjaro.org) closed this issue 2024-07-03 09:32:11 +00:00
fhdk commented 2024-07-03 09:59:35 +00:00 (Migrated from gitlab2.manjaro.org)

@spikerguy

The mention of this issue in the MR and the merge of it autoclosed the issue.

It was indeed an issue with the pacman-mirrors code.

The issue has never been brought to my attention - why it only surfaced now - I have no idea.

Please update your PKGBUILD from my merge reqest https://gitlab.manjaro.org/packages/core/pacman-mirrors/-/merge_requests/3

Your CI will fail again if you don't change

sudo $NSPAWN $BUILDDIR/$ARCH pacman-mirrors --api --set-branch arm-unstable

To

sudo $NSPAWN $BUILDDIR/$ARCH pacman-mirrors --api --set-branch unstable
@spikerguy The mention of this issue in the MR and the merge of it autoclosed the issue. It was indeed an issue with the pacman-mirrors code. The issue has never been brought to my attention - why it only surfaced now - I have no idea. Please update your PKGBUILD from my merge reqest https://gitlab.manjaro.org/packages/core/pacman-mirrors/-/merge_requests/3 Your CI will fail again if you don't change ``` sudo $NSPAWN $BUILDDIR/$ARCH pacman-mirrors --api --set-branch arm-unstable ``` To ``` sudo $NSPAWN $BUILDDIR/$ARCH pacman-mirrors --api --set-branch unstable ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
applications/pacman-mirrors#195
No description provided.