1. 15 Jul, 2021 12 commits
    • Santosh Mahto's avatar
      build fix · 119574f5
      Santosh Mahto authored
      119574f5
    • Santosh Mahto's avatar
      use github fakemachine · fb0eecdb
      Santosh Mahto authored
      fb0eecdb
    • Santosh Mahto's avatar
      Use packages from santoshmahto forked repo · 02281324
      Santosh Mahto authored
      02281324
    • Santosh Mahto's avatar
      Reverse the exitcode initialization value · 7a980e65
      Santosh Mahto authored
      
      
       Fakemachine is subject to panic and causes Debos to exit success due to
       the current logic of the exitcode. For example, the fakemachine function
       CopyFileTo() panics if the file is missing.
      
       In the case of a panic, the function never returns. Thus, the exitcode
       cannot be set to 1 and Debos exits with 0.
      
       This commit reverses the logic of the exitcode: it is initialized to 1
       (i.e. failure), and it is set to 0 (i.e. success) only if Debos has
       reached the end of the things it has to do (or for the help message).
      Signed-off-by: Gaël PORTAY's avatarGaël PORTAY <gael.portay@collabora.com>
      7a980e65
    • Arnaud Rebillout's avatar
      pacstrap: Disable download timeout · 2e004a2c
      Arnaud Rebillout authored and Santosh Mahto's avatar Santosh Mahto committed
      
      
      The timeout is fixed at 10 seconds, and I see it quite often.
      
      The man page for pacman.conf(5) reads:
      
       DisableDownloadTimeout
      
          Disable defaults for low speed limit and timeout on downloads. Use
          this if you have issues downloading files with proxy and/or security
          gateway.
      Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
      2e004a2c
    • Arnaud Rebillout's avatar
      pacstrap: Add siglevel option for repositories · 81052fb5
      Arnaud Rebillout authored and Santosh Mahto's avatar Santosh Mahto committed
      
      Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
      81052fb5
    • Arnaud Rebillout's avatar
      pacstrap: Rework action to let user define their repositories · ba40558e
      Arnaud Rebillout authored and Santosh Mahto's avatar Santosh Mahto committed
      Before this commit, we hard-coded the 3 repositories 'core', 'extra',
      and 'community', and we only allowed the user define the mirror and
      mirror layout for those.
      
      This is not really a good idea, as none of these repositories are
      required to exist, or even to be named that way. These are just
      conventions. An Archlinux derivative could as well decide to have their
      repositories named 'main', 'contrib' and 'non-free', for example.
      
      Hence it seems more flexible to have a 'repositories' property instead,
      and let user define the repository name and the repository server. This
      way, there's no need for a mirror and mirror-layout properties.
      
      With this change, a basic recipe to build an Archlinux OS can be:
      
          architecture: amd64
      
          actions:
            - action: pacstrap
              repositories:
                - name: core
                  server: http://mirrors.kernel.org/archlinux/$repo/os/$arch
                - name: extra
                  server: http://mirrors.kernel.org/archlinux/$repo/os/$arch
      
            - action: pack
              compression: gz
              file: recipe.tar.gz
      
      More complicated, a recipe that allows to build both ArchLinux or
      Manjaro can be defined like that:
      
          {{  $arch := or .arch "amd64" -}}
          {{- $distrib := or .distrib "archlinux" -}}
          {{- $mirror := or .mirror "http://mirrors.kernel.org/archlinux
      
      " -}}
          {{- $layout := or .layout "$repo/os/$arch" -}}
      
          {{- if eq $distrib "manjaro" -}}
          {{- $mirror = or .mirror "http://repo.manjaro.org.uk" -}}
          {{- $layout = or .layout "stable/$repo/$arch" -}}
          {{- end -}}
      
          architecture: {{ $arch }}
      
          actions:
            - action: pacstrap
              repositories:
                - name: core
                  server: {{ $mirror }}/{{ $layout }}
                - name: extra
                  server: {{ $mirror }}/{{ $layout }}
                - name: community
                  server: {{ $mirror }}/{{ $layout }}
      
            - action: pack
              compression: gz
              file: {{ $distrib }}-base.tar.gz
      
      And it can be invoked in the following ways:
      
          # build archlinux:
          debos recipe.yaml
      
          # build manjaro:
          debos -t distrib:manjaro recipe.yaml
      
      Introducing the 'repository' property has the consequence of removing
      the 'mirror' property, which can't make anymore. It means that debos
      doesn't try to handle the mirror list anymore, it's left to the user.
      
      By default, ArchLinux leaves you with no mirror configured, so pacman
      fails until you manually enable a mirror in /etc/pacman.d/mirrolist.
      
      Manjaro, on the other hand, leaves you with a mirrorlist where all the
      mirrors are enabled, and possibly NOT sorted. Watch the pacstrap logs
      for the messages:
      
          Pacstrap | ::INFO Internet connection appears to be down
          Pacstrap | ::INFO Mirror ranking is not available
          Pacstrap | ::INFO Mirror list is generated using random method
          Pacstrap | ::INFO Writing mirror list
      
      One last word.
      
      Remember that these repositories are only used to create the pacman.conf
      file used during the pacstrap action. pacstrap itself will install a
      default pacman config and a default mirror list in the bootstrapped
      system, hence subsequent calls to the `pacman` action will use those.
      
      So if you want to use a particular mirror, defining it in the pacstrap
      action is not enough, you will also need to enable it in the
      bootstrapped system.
      Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
      ba40558e
    • Arnaud Rebillout's avatar
      pacstrap: Import all keyrings in /usr/share/pacman/keyrings · bd59304f
      Arnaud Rebillout authored and Santosh Mahto's avatar Santosh Mahto committed
      
      
      With this change, pacman-key will populate the pacman keyring in the
      chroot with EVERY keyring found in /usr/share/pacman/keyrings on the
      host.
      
      For example, assuming you're building a Manjaro image, you need to
      populate the chroot with the two keyrings 'archlinux' and 'manjaro'.
      Assuming that both keyrings are installed on the host, then you have two
      ways to achieve that
      - run `pacman-key --populate archlinux manjaro`, which install exactly
        these two keyrings in the chroot.
      - run `pacman-key --populate`, which installs every keyring found in
        /usr/share/pacman/keyrings.
      
      This commit makes the assumption that the host has already all the
      keyrings needed in /usr/share/pacman/keyrings, and that it's desirable
      to install them all in the chroot.
      Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
      bd59304f
    • Arnaud Rebillout's avatar
      pacstrap: Add mirror-layout parameter · fe2c4bfe
      Arnaud Rebillout authored and Santosh Mahto's avatar Santosh Mahto committed
      
      
      ArchLinux's default mirror layout is $repo/os/$arch, however in
      ArchLinux world the mirror layout doesn't seem to be enforced by
      anything, so there's some variety out there.
      
      Within ArchLinux itself, it seems that there are at least two different
      existing layouts, as seen in mkosi sources:
      
          if platform.machine() == "aarch64":
              server = f"Server = {args.mirror}/$arch/$repo"
          else:
              server = f"Server = {args.mirror}/$repo/os/$arch"
      
      Additionally, Manjaro mirrors also do it differently:
      
          {args.mirror}/$branch/$repo/$arch
      
      So we can't hardcode the mirror layout in debos anymore.
      
      This commit let user enter a string that defines the mirror layout. If
      not set, debos defaults to ArchLinux's default layout '$repo/os/$arch'.
      Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
      fe2c4bfe
    • Arnaud Rebillout's avatar
      pacman: Disable download timeout · 25634f47
      Arnaud Rebillout authored and Santosh Mahto's avatar Santosh Mahto committed
      I experience regular failures due to timeout, for example:
      
        error: failed retrieving file 'libssh2-1.8.2-1-x86_64.pkg.tar.xz' from http://mirrors.kernel.org/archlinux :
        Connection timed out after 10001 milliseconds
      
      The pacman manual mentions:
      
        --disable-download-timeout
          Disable defaults for low speed limit and timeout on downloads. Use this
          if you have issues downloading files with proxy and/or security gateway.
      
      I do run a proxy most of the time, but even when I don't I still see
      this issue. So let's disable this timeout.
      
      Ref: <https://www.archlinux.org/pacman/pacman.8.html
      
      >
      Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
      25634f47
    • Arnaud Rebillout's avatar
      Add pacman action · 994a093e
      Arnaud Rebillout authored and Santosh Mahto's avatar Santosh Mahto committed
      
      Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
      994a093e
    • Arnaud Rebillout's avatar
      Add pacstrap action · f57f91c3
      Arnaud Rebillout authored and Santosh Mahto's avatar Santosh Mahto committed
      
      Signed-off-by: Arnaud Rebillout's avatarArnaud Rebillout <arnaud.rebillout@collabora.com>
      f57f91c3
  2. 07 Jul, 2021 11 commits
  3. 06 Jul, 2021 5 commits
  4. 28 May, 2021 1 commit
  5. 26 May, 2021 1 commit
  6. 29 Apr, 2021 2 commits
  7. 28 Apr, 2021 1 commit
  8. 06 Apr, 2021 1 commit
  9. 23 Mar, 2021 3 commits
  10. 25 Jan, 2021 2 commits
  11. 11 Dec, 2020 1 commit