Skip to content
Snippets Groups Projects
  1. Jul 21, 2024
  2. Jul 20, 2024
  3. Jul 19, 2024
  4. Jul 18, 2024
  5. Jul 17, 2024
    • Oliver Smith's avatar
      Fix "pmbootstrap config args /new/path" (MR 2374) · b14a872f
      Oliver Smith authored
      Fix writing config options that are stored as CSV-list. Without this
      patch:
      
      $ pmbootstrap config aports /tmp/pmaports
      [23:43:58] Config changed: aports='/tmp/pmaports'
      $ pmbootstrap config aports
      [PosixPath('/'), PosixPath('t'), PosixPath('m'), PosixPath('p'), PosixPath('/'), PosixPath('p'), PosixPath('m'), PosixPath('a'), PosixPath('p'), PosixPath('o'), PosixPath('r'), PosixPath('t'), PosixPath('s')]
      
      Storing strings as CSV list isn't great and we probably want to
      implement this more elegantly, see the related issue. But let's fix this
      first.
      
      Related: pmbootstrap issue 2412
      b14a872f
  6. Jul 16, 2024
  7. Jul 15, 2024
    • Oliver Smith's avatar
      docs/mirrors: new document (MR 2361) · 37244e1c
      Oliver Smith authored
      37244e1c
    • Oliver Smith's avatar
      docs: support markdown (MR 2361) · 89a3136f
      Oliver Smith authored
      Let's write all new documentation in markdown, and convert existing ones
      at some point. I think we are all much more familiar with markdown than
      with the rst format.
      89a3136f
    • Oliver Smith's avatar
      Support setting custom mirrors + disabling mirrors (MR 2361) · 591a7377
      Oliver Smith authored
      Allow setting _custom mirrors in the config:
      * alpine_custom
      * pmaports_custom
      * systemd_custom
      
      When these are set, they are added to /etc/apk/repositories before real
      repositories. This is used by bpo to build packages with a WIP
      repository enabled, in addition to the final repository.
      
      All mirrors can also be set to "none" to be disabled. This is important
      for bootstrapping from pure Alpine without any binary repository, and
      the bpo testsuite also uses this.
      
      I've discussed with Caleb whether to name it _wip instead of _custom,
      but the latter is more generic and people may also use this for other
      use cases than the bpo wip repository thing.
      591a7377
    • Oliver Smith's avatar
    • Oliver Smith's avatar
      pmb.config: remove config file migration logic (MR 2361) · 7c3af8c3
      Oliver Smith authored
      We have decided to let the user generate a pmbootstrap_v3.cfg file
      instead of attempting to automatically migrate the file. This way we
      don't need to worry about potential migration bugs and users can also
      temporarily go back to v2 to compare behavior with v3 without problems.
      
      Remove migration logic related to mirror_alpine and
      mirrors_postmarketos, before I add support for using multiple
      repositories with these again (as needed for bpo). This reduces
      complexity and removes a note about "multiple mirrors are not supported"
      that won't be valid anymore.
      7c3af8c3
    • Oliver Smith's avatar
      init: mirror selection: set systemd mirror too (MR 2361) · e7af3c49
      Oliver Smith authored
      When selecting a different mirror in "pmbootstrap init", then select the
      systemd mirror as well. It will always be the normal postmarketOS mirror
      plus some path appended. Currently it is the path for the staging
      repository, this will change when the systemd changes are merged to
      pmaports master and bpo can build it. I'll adjust this before we release
      pmbootstrap v3.
      
      I have considered changing the code so that we don't store a separate
      systemd mirror in the config. But I think it's useful to be able to
      point to systemd mirrors with different paths for debugging purposes,
      and also it would make the logic more complex once we re-introduce
      support for multiple mirrors of the same type for bpo. So I've
      intentionally kept that part as-is.
      e7af3c49
    • Oliver Smith's avatar
    • Oliver Smith's avatar
      pmb/types: manual ruff fixes (MR 2357) · 3e0eba85
      Oliver Smith authored
      Manual fixes for things that ruff didn't fix automatically.
      
      From python3 docs:
      > Union[X, Y] is equivalent to X | Y and means either X or Y.
      3e0eba85
    • Oliver Smith's avatar
      Run ruff format (MR 2357) · 7b451b25
      Oliver Smith authored
      7b451b25
    • Oliver Smith's avatar
      Run ruff check --fix (MR 2357) · 36dd53f4
      Oliver Smith authored
      Now that we have target-version = "py310" in [tool.ruff] in
      pyproject.toml, ruff check complains about using typing.Optional and
      typing.Union instead of newer syntax. Run the tool to fix it.
      36dd53f4
    • Oliver Smith's avatar
      9fd45fb3
    • Anri Dellal's avatar
      Fix pmbootstrap install --android-recovery-zip (MR 2368) · 2b577a86
      Anri Dellal authored and Oliver Smith's avatar Oliver Smith committed
      
      Tweaked-By: default avatarOliver Smith <ollieparanoid@postmarketos.org>
      2b577a86
    • Anri Dellal's avatar
      flasher boot: fix missing args (MR 2369) · d8e174b0
      Anri Dellal authored and Oliver Smith's avatar Oliver Smith committed
      Closes #2407
      Closes #2408
      d8e174b0
    • Anri Dellal's avatar
      Fix types of pmb arguments (MR 2370) · b8ca63dc
      Anri Dellal authored and Oliver Smith's avatar Oliver Smith committed
      - Change some arguments' types to bool to avoid type mismatch errors
        after refactoring in the future
      - Add more arguments from parse/arguments with corresponding types
      - Change type of pmbootstrap log --lines argument to int
      b8ca63dc
    • Arnav Singh's avatar
      config: init: fix crash in mirrors prompt (MR 2367) · b98c5e2c
      Arnav Singh authored and Oliver Smith's avatar Oliver Smith committed
      This was missed in fc010bc7
      
      Before this fix:
      
      ```
      ...
      
      [18:34:35] Enable background timer to prevent repeated sudo authorization? (y/n) [n]: y
      (020272) [18:34:44] ERROR: 'Config' object has no attribute 'mirrors_postmarketos'
      (020272) [18:34:44] See also: <https://postmarketos.org/troubleshooting>
      (020272) [18:34:44] Traceback (most recent call last):
        File "/home/arnavion/src/pmbootstrap/pmb/__init__.py", line 72, in main
          return config_init.frontend(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/arnavion/src/pmbootstrap/pmb/config/init.py", line 729, in frontend
          ask_for_additional_options(config)
        File "/home/arnavion/src/pmbootstrap/pmb/config/init.py", line 542, in ask_for_additional_options
          logging.info("Selected mirror:" f" {','.join(context.config.mirrors_postmarketos)}")
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/arnavion/src/pmbootstrap/pmb/core/config.py", line 130, in __getattribute__
          return super().__getattribute__(key)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: 'Config' object has no attribute 'mirrors_postmarketos'
      ```
      b98c5e2c
  8. Jul 13, 2024
  9. Jul 11, 2024
  10. Jul 10, 2024
    • Oliver Smith's avatar
      Tweak errors for missing config/work dir (MR 2350) · aeb65f29
      Oliver Smith authored and Caleb Connolly's avatar Caleb Connolly committed
      * Use NonBugError instead of RuntimeError so users don't get a stack
        trace for this.
      * Check for the pmbootstrap <= 3.0.0 config, and print a nice message
        asking users to recreate their config.
      * Add a separate message if --config was used.
      * Reword the generic "no config found" message to suggest 'pmbootstrap
        init' first, and only mention --config at the end. Most users will
        need to just run 'pmbootstrap init'.
      aeb65f29
    • Oliver Smith's avatar
      Use pmbootstrap_v3.cfg as config file (MR 2350) · 9dfa89c5
      Oliver Smith authored and Caleb Connolly's avatar Caleb Connolly committed
      Using pmbootstrap v3 with the old config can cause problems, for example
      when having $WORK in the pmaports dir instead of the actual work path.
      This is not supported anymore by v3 to reduce complexity. The format of
      how mirrors are stored in the config also has changed.
      
      Use a separate config file, so users can go back from v3 to 2.3.x if
      they need to (for figuring out a regression) and so users won't run into
      bugs when moving from 2.3.x to v3.
      9dfa89c5
  11. Jul 09, 2024
  12. Jul 08, 2024
Loading