Build Iso Problem

In build.iso pacman-mirrors is still broken the system falls back to the mechanical way.
The trouble with this is it uses stable mirrors and the build system wants unstable mirrors.

Not unless you specify unstable - which you can do on command line using -b argument or on a permanent basis - in your ~/.config/manjaro-tools/manjaro-tools.conf and/or the profile’s profile.conf

I have it in Manjaro-Tools.conf, I will try also on the command line as suggested.
My preference would be that someone fixes pacman-mirrors to work with build.iso again.

I did buildiso -b unstable and it still put stable mirrors in, any more suggestions?

Don;t have ~/.config/pacman-mirrors/pacman-mirrors.conf should I have?

typo - .config/manjaro-tools/manjaro-tools.conf

unstable is the entry point for our inhouse development - pacman-mirrors is just that … inhouse - and the team has been working on updating the package from the deprecated setup.py installation onwards to poetry - this has posed some challenges.

could be that the poetry installer is doing something it shouldn’t

we are looking into the issue …

EDIT.

After tesing a buildiso using -b unstable - the pacman-mirrors.conf contains the correct info Branch = unstable

So I suggest you revisit your profile.conf and manjaro-tools.conf

pacman-mirrors.conf does have unstable in it but when we get to the mechanical pacman-mirrors it pulls the stable branch and there does not seem any way to make it pull the unstable branch.

so what you try to say: the resulting ISO points to unstable in the config file but creates a stable mirrorlist when calling pacman-mirrors. Seems I had that report also seen somewhere …

YEs but I guess only when creating the mechanical one when pacman-mirrors worked it was ok.

What is this ?

When I checked a resulting build pacman-mirrors.conf had unstable branch and the mirrorlist had unstable branch.

There is no way pacman-mirrors can generate a mirrorlist for stable branch if the config is set to unstable.

You will have to be a lot more specific - you are far too vague …

Pacman-mirrors fails to work in the build script so none is defined and a default is used.
It is this default that is always stable and can’t be made to use unstable.

Are you referring to buildiso or your own buildscript?

I cannot reproduce the behaviour - so I am fairly certain it is something local to your system.

The tests I mentioned earlier - lxqt-kwin profile - you can fetch it at linux-aarhus archive @ uex.dk

The profile is the default profile from iso-profiles repo community/lxqt-kwin (fixed for the rename of networkmanger-qt package to networkmanager-qt5) build for stable and unstable branch

buildiso -p lxqt-kwin
buildiso -p lxqt-kwin -b unstable

Remember that defining the branch in profile.conf will override manjaro-tools.conf and command line.

Also remember that branch is an environment variable which is present when the buildiso script is running - and branch default to stable if not changed either in a configuration file

In ~ /.config/manjaro-tools/manjaro-tools.conf I have target_branch=unstable as you say this should work?
This is the error

::WARNING https://repo.manjaro.org 'Connection: HTTPSConnectionPool(host='repo.manjaro.org', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd71c8c9250>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))'
::WARNING https://wikipedia.org 'Connection: HTTPSConnectionPool(host='wikipedia.org', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd71c8c9c90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))'
::WARNING https://bitbucket.org 'Connection: HTTPSConnectionPool(host='bitbucket.org', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd71c8c4410>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))'
::INFO Internet connection appears to be down
::INFO Mirror ranking is not available
::INFO Mirror list is generated using random method
::INFO Writing mirror list
::Sweden          : https://mirror.zetup.net/manjaro/stable

Good grief, sir. Check your /etc/pacman-mirrors.conf. The default there is stable.

I did and it was wrong corrected now, but the error is still there why is the script looking at those strange urls with the warning? if pacman-mirrors worked there would be none of these problems.

It now builds alright but still with those very strange warnings and the obvious stable mirrors which should be unstable.

Please don’t mark your comment as the solution because it is not.

I have repeatedly told you to check your configuration … and I am sorry - but you lack understanding on how it works.

The first packages installed is Packages-Root - and pacman-mirrors is installed in the chroot as part of this - it comes with the default pacman-mirrors.conf - which is using stable branch.

 $ man pacman-mirrors
[...]
NETWORK CONNECTION
       To be able to download the latest status file from  repo.man‐
       jaro.org  pacman-mirrors verifies network connection by open‐
       ing up to three different websites.  These sites are

       1. repo.manjaro.org
       2. github.com
       3. bitbucket.org

       The sites are chosen due to their generic nature and  general
       availability.
[...]

When pacman-mirrors run it does a network check but as no resolv.conf defined in chroot - thus the internet connection check fails as the chroot cannot lookup the test domains - the messages are only warnings - they are not critical - and they are not thrown by pacman-mirrors but the python requests library which is used for the checks.

This is completely normal in this situation - this is not an flaw but a feature that the mirrorlist is generated despite the lack of resolver - this is how it has been since 2017.

Only after that point buildiso can change the pacman-mirrors configuration from stable to unstable and it correctly does as the final ISO will have the defined branch in both pacman-mirrors.conf and the mirrorlist url.

 $ cat /etc/pacman-mirrors.conf
[...]
## Branch Pacman should use (stable, testing, unstable)
# Branch = stable
[...]

don’t change the system default file in /etc/manjaro-tools/manjaro-tools.conf

 $ cat /etc/manjaro-tools/manjaro-tools.conf
[...]
# default target branch
# target_branch=stable
[...]

Instead copy the folder to your home and change if you need - if you don’t touch this - you can always use the -b <branch> argument

 $ cat ~/.config/manjaro-tools/manjaro-tools.conf
[...]
# default target branch
# target_branch=stable
[...]

What ever you choose - a new installation of pacman-mirrors will trigger a mirror generation and it will use stable branch - that is the way.

This behavior is defined in the hook scripts

The update of pacman-mirrors has made no difference to the buildiso.
Where does buildiso try to find the pacman-mirrors from?

Now I am repeating myself.

Please understand

  • don’t get blindsided
  • there is nothing wrong with pacman-mirrors
  • the only problem here is your lack of understanding for the process.
  • pacman-mirrors is installed from repo
  • it is installed into the ISO rootfs
  • the default config is stable branch
  • the initial mirror list in a chroot enviroment will always be stable branch
  • buildiso changes the branch inside the workarea
  • the final ISO has the target branch as specified

Thanks for that very clear explanation.
Why pull pacman-mirrors from repo?
The chroot you talk about, just before the pacman-mirrors is this Skipped: Running in chroot?

That is an odd question - everything exist as packages in the repos - why would pacman-mirrors be different?

All the filesystems which makes up the ISO

  • is installed using packages from repo
  • they go into a chrooted environment
  • otherwise it would mess with your running system
  • which you most certainly do not want

So despite all this still not sure why it can’t get pacman-mirrors to work something is clearly broken as it currently always fails and falls back to the default one, pretty sure this is only a recent occurrence. It would be nice to know what’s really broken as we would at least have a chance of getting it fixed

No - you think it is broken but it is not - please don’t keep insisting on a broken package - it is checked and verified to be exactly as expected.

I know because I coded the thing - I know exactly how it works - and I can assure you pacman-mirrors works the same way as it has done for the past several years.

It is a fact that when pacman-mirrors is installed in a clean chroot there is no pacman-mirrors.conf and there is no mirror list.

Therefore the pacman-mirrors-install.hook calls pacman-mirrors to generate a mirror list - which will be stable branch because that is what is default.

buildiso will later change the branch to whatever branch is specified by command line argument or configuration.

The resulting ISO will have the correct branch and mirrorlist - and that is what matters.

Will someone from the @moderators group, please close this thread and mark a sensible reply as answer.