1. 24 Jan, 2020 1 commit
    • Oliver Smith's avatar
      gitlab-ci.yml: allow 'git config' cmds to fail · f3dc6a55
      Oliver Smith authored
      Two "su pmos -c 'git config --global user....'" commands were added to
      the before_script in .gitlab-ci.yml. They work fine with the regular
      gitlab runners, but fail with the custom gitlab runner that runs the
      qemu test. Simply allow the command to fail, because it isn't needed on
      the custom gitlab runner, as it doesn't run related tests.
      Fixes: 16e2d3c7 ("gitlab-ci.yml: set git user/email (!1848)")
  2. 21 Jan, 2020 5 commits
  3. 20 Jan, 2020 1 commit
    • Minecrell's avatar
      pmb.config: do not force installation of ttf-droid (!1860) · 4b2750e4
      Minecrell authored
      Right now we explicitly add ttf-droid to /etc/apk/world, and force
      installation of it on every postmarketOS installation. But there really
      is no reason to force this from pmbootstrap:
        - If ttf-droid is really required for every postmarketOS installation,
          it should be a depends of postmarketos-base.
        - Even with this change it is still installed on every device,
          because postmarketos-splash depends on it.
        - There is no need for fonts when using the "none" UI.
      For now, the only difference of this change is that we no longer add
      ttf-droid explicitly to the APK world. Instead, it is installed as
      dependency of postmarketos-splash.
  4. 19 Jan, 2020 10 commits
    • Minecrell's avatar
      qemu: Make QEMU audio backend configurable (!1859) · 66fdb74b
      Minecrell authored
      At the moment we assume that everyone running QEMU is either using
      ALSA, or has the ALSA PulseAudio plugin configured on the host system.
      (Since we run QEMU outside of the chroot at the moment, configuration
      files are read from the host system instead of the chroot...)
      Other distributions have much wider support for PulseAudio,
      so not everyone will actually have the ALSA PulseAudio plugin configured.
      In that case, it is better to use QEMU's PulseAudio backend since that
      does not require any configuration. It also lets us drop the alsa-lib
      fork, since that was only needed for loading the ALSA PulseAudio plugin.
      In general, it seems difficult to detect which audio backend the user
      wants to run (if any). Selecting the wrong one results in ugly warnings
      when running QEMU. So let's not assume any by default, and add a
      --audio option instead which accepts one of QEMU's audio backends
      (alsa, pa or sdl).
    • Oliver Smith's avatar
      pmbootstrap pull: new action (!1848) · e04712a6
      Oliver Smith authored
      Add a shortcut for "git pull --ff-only" in all repositories cloned by
      pmbootstrap (currently pmaports and aports_upstream, new pmdevices
      repository coming soon).
      'pmbootstrap pull' will only update the repositories, if:
      * they are on an officially supported branch (e.g. master)
      * the history is not conflicting (fast-forward is possible)
      * the git workdirs are clean
      Otherwise it shows the user a descriptive message about what to do. The
      list of supported branches is only "master" right now, and will be
      extended in later commits, so we can have a stable branch for pmaports
      based on Alpine's releases. More about that in the project direction
      2020 issue.
      Closes: #1858
    • Oliver Smith's avatar
      gitlab-ci.yml: set git user/email (!1848) · 16e2d3c7
      Oliver Smith authored
      Prevent upcoming tests for "pmbootstrap pull" from failing, when trying
      to create a git repository.
    • Oliver Smith's avatar
      pmb.helpers.git.get_path: new function (!1848) · 107c9f8b
      Oliver Smith authored
      Get the path to the repository, which is either the default one in the
      work dir, or a user-specified one in args.
    • Oliver Smith's avatar
    • Oliver Smith's avatar
    • Oliver Smith's avatar
      pmb.helpers.git.rev_parse: don't return "" on err (!1848) · 2b1dfe7c
      Oliver Smith authored
      Remove a legacy code path from back in the day, where pmaports were in
      the same repository as pmbootstrap ([1]). Nowadays, pmaports are always in a
      git repository, so this is not necessary anymore. If git fails at this
      point, crash hard and don't carry on with an empty string.
      This is in preparation for using rev_parse in new code paths, so we
      don't need to check the return value of rev_parse.
      [1] 39548835 "Write custom os-release (closes #324) (#439)"
    • Minecrell's avatar
      pmb/parse/_apkbuild: Fix locating kernel subpackages with "-" in name (!1857) · 7907e918
      Minecrell authored
      When defining a new kernel subpackage with a "-" in it
      (e.g. $pkgname-kernel-mainline-modem), then pmbootstrap is unable to
      find the function that builds the subpackage:
      ERROR: Could not find subpackage function, no line starts with 'kernel_mainline-modem() {'
      This is because it assumes that a $pkgname-kernel-<name> subpackage
      is built by a kernel_<name> function, but this does not have to be the case.
      We should really respect the name of the subpackage function that
      is specified when defining the subpackage, but unfortunately it is
      stripped away in cut_off_function_names().
      For now let's fix this by replacing "-" with "_", but ideally the
      APKBUILD parser API should be refactored to expose the subpackage
      function in the future.
    • Luca Weiss's avatar
      pmb/parse/_apkbuild: implement parsing for more variable styles (!1854) · 2320e010
      Luca Weiss authored
      Add a test for APKBUILD variable parsing as well
    • Luca Weiss's avatar
      test: fix small mistake (!1854) · b0563c54
      Luca Weiss authored
  5. 18 Jan, 2020 3 commits
  6. 14 Jan, 2020 3 commits
  7. 11 Jan, 2020 5 commits
    • Oliver Smith's avatar
      pmb.helpers.git.clone: use git from host system (!1845) · 02e514f4
      Oliver Smith authored
      Do not install git in the native chroot and use it from there. Remove the
      chown_to_user argument from pmb.helpers.git.clone(), the resulting dir
      is now always owned by the user. While at it, refactor the function and
      display the clone URL.
      Previously we had cloned aports_upstream (from Alpine) with
      chown_to_user=False (legacy) and pmaports with chown_to_user=True.
      pmb.helpers.git.rev_parse() would only work after chown_to_user=True.
      Check if git is installed in "pmbootstrap init", and remove the same
      check from rev_parse(). Add a new work dir version, that checks for git
      and changes ownership of already checked out aports_upstream to the
      host system's user.
      When creating a new work dir, create cache_git instead of cache_http.
      cache_http is created on demand already, with proper permissions. But
      cache_git must be created, otherwise pmb.helpers.mount.bind will create it
      as root.
      This is in preparation for the "pmbootstrap pull" feature, as it allows
      using the host system's git in all new code paths. We will be able to
      handle repositories even if they were cloned outside of the work dir
      (which we do in a few CI scripts for example).
      Related: #1858
    • Oliver Smith's avatar
      chroot: keep ownership of cache_git (!1845) · cba37d5d
      Oliver Smith authored
      Remove /home/pmos/git from pmb.config.chroot_home_symlinks, so
      pmb.chroot.init.init() will not change the ownership of the
      $WORK/cache_git dir.
      The symlink was added two years ago in [1] as compatibility to previous
      behavior, because the mountpoint of cache_git was changed from
      /home/user/git to /mnt/pmbootstrap-git. Forcing the ownership of that
      dir to be the pmos user inside the chroot made sense, because the only
      cloned repository (aports_upstream) would also be owned by the pmos
      user. With the upcoming change to have all cloned repos owned by the
      host-system's user, this is just confusing.
      The /home/pmos/git symlink does not seem to be used by anybody, it is
      not mentioned in the pmbootstrap code and in the wiki.
      [1] b4dd7a89 "Close #709: Improve user creation (#725)"
    • Oliver Smith's avatar
      git aports_upstream: use gitlab.alpinelinux.org (!1845) · c53988b9
      Oliver Smith authored
      Use Alpine's primary mirror instead of the mirrored version at github
      for new clones. A follow up commit will display the clone URL.
    • Oliver Smith's avatar
      pmbootstrap init: migrate work dir if necessary (!1845) · a38026f9
      Oliver Smith authored
      This should have already happened, but probably broke when splitting
      pmaports into a separate git repository.
    • Oliver Smith's avatar
      pmbootstrap init: check for required programs (!1845) · b1cb6626
      Oliver Smith authored
      Prepare to require "git" in a follow-up patch.
  8. 07 Jan, 2020 1 commit
  9. 06 Jan, 2020 1 commit
  10. 03 Jan, 2020 1 commit
  11. 02 Jan, 2020 1 commit
    • Oliver Smith's avatar
      pmb/helpers/pmaports: ignore provides without ver (!1851) · ae1b3fc3
      Oliver Smith authored
      The APKBUILD reference for "provides" [1] is not worded clearly; but
      after reading it over and over again, my understanding is:
      * package with provides='foo=1.2' will be automatically installed if
        user requests installing "foo"
      * package with provides='foo' (without version) will NOT get
        automatically installed if user requests installing "foo"
      For pmbootstrap, this means, that we must not attempt to build a package
      where the pkgname mentioned in provides matches what we are currently
      resolving, unless there is an equals sign in the provides entry.
      Fixes: #1862, pmaports#404
      [1] https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#provides says:
      "List of package names (and optionally version info) this package
      If package with a version is provided (provides='foo=1.2') apk will
      consider it as an alternate name and it will automatically consider the
      package for installation by the alternate name, and conflict with other
      packages having the same name, or provides.
      If version is not provided (provides='foo'), apk will consider it as
      virtual package name. Several package with same non-versioned provides
      can be installed simultaneously. However, none of them will be installed
      by default when requested by the virtual name - instead, error message
      is given and user is asked to choose which package providing the virtual
      name should be installed."
  12. 30 Dec, 2019 1 commit
  13. 28 Dec, 2019 1 commit
    • Daniele Debernardi's avatar
      pmb/qemu/run.py: add audio support (!1840) · d145f882
      Daniele Debernardi authored
        * Added the ALSA_PLUGIN_DIRS environment variable otherwise it tries
          to load the plugins of the host pc and they fails.
        * Added the /usr/lib/pulseaudio path to the library-path argument
        * Added the audiodev and soundhw parameters to the qemu command
        * Added the required packages necessary to be installed in the chroot
  14. 23 Dec, 2019 2 commits
    • Minecrell's avatar
      envkernel.sh: Avoid changing local version based on Git repository state (!1844) · d45e8850
      Minecrell authored
      When git is installed, the Linux kernel build system appends suffixes
      to the Linux kernel version based on the local repository state.
      This means that we get different kernel versions when building the
      package normally or with envkernel.sh.
      This causes problems with Alpine's "installkernel" script,
      which detects the kernel flavor based on the kernel version.
      e.g. when building linux-postmarketos-qcom-msm8916 with git installed
      the kernel image is installed to /boot/vmlinuz-g556e2c21dbac-dirty
      where pmbootstrap (and anything else) cannot find it.
      Two changes are necessary to prevent the kernel build system from
      appending Git version information:
        1. Set LOCALVERSION= - this is done by this commit.
           - this needs to be done in each kernel config (when needed)
    • Oliver Smith's avatar
      pmb.parse.bootimg: fix kernel detection (!1846) · a790900e
      Oliver Smith authored
      Adjust to new text that "file" outputs for ARM linux kernels:
      	"ARM OpenFirmware FORTH Dictionary..."
      Make test_bootimg_kernel pass again, which was failing with:
      	AssertionError: assert 'heimdall-isorec' in 'File is not an Android ...
  15. 14 Dec, 2019 3 commits
  16. 13 Dec, 2019 1 commit