Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • postmarketOS/pmbootstrap
  • fossdd/pmbootstrap
  • Adrian/pmbootstrap
  • JustSoup321/pmbootstrap
  • longnoserob/pmbootstrap
  • sixthkrum/pmbootstrap
  • ollieparanoid/pmbootstrap
  • magdesign/pmbootstrap
  • anjandev/pmbootstrap
  • HenriDellal/pmbootstrap
  • Minecrell/pmbootstrap
  • chipiguay/pmbootstrap
  • ijiki16/pmbootstrap
  • whynothugo/pmbootstrap
  • amessier/pmbootstrap
  • Eisenbahnfan/pmbootstrap
  • user0-07161/pmbootstrap
  • SzczurekYT/pmbootstrap
  • neuschaefer/pmbootstrap
  • knuxify/pmbootstrap
  • Frieder.Hannenheim/pmbootstrap
21 results
Show changes
Commits on Source (7)
  • Luca Weiss's avatar
    Replace gitlab.com with gitlab.postmarketos.org (MR 2443) · 3df0be35
    Luca Weiss authored
    Try to finish the migration by changing various links and texts to point
    to the new GitLab instance.
    Unverified
    3df0be35
  • Luca Weiss's avatar
    pmb.core.apkindex_block: Don't mark depends as optional (MR 2438) · 99f770d2
    Luca Weiss authored and Caleb Connolly's avatar Caleb Connolly committed
    In the code where the object is made (pmb/parse/apkindex.py) depends
    already will become an empty array when there's no dependencies.
    
    And there's no point in having a differentiation between None and empty
    array.
    Unverified
    99f770d2
  • Luca Weiss's avatar
  • Luca Weiss's avatar
    pmb.parse.apkindex: Add missing type hints in package() (MR 2438) · 327010cf
    Luca Weiss authored and Caleb Connolly's avatar Caleb Connolly committed
    Make sure to annotate the parameters.
    Unverified
    327010cf
  • Clayton Craft's avatar
    pmb.core.arch: add noarch (MR 2446) · c7a97df7
    Clayton Craft authored and Caleb Connolly's avatar Caleb Connolly committed
    When a `noarch` APKBUILD is changed in local pmaports, `pmb install`
    will build it automatically but image creation will fail with the
    following error:
    
    ```
    $ pmbootstrap install
    ...
    [12:00:43] Build is necessary for package 'postmarketos-base-ui': binary package out of date (binary: 28-r6, local pmaports: 29-r0)
    [12:00:48] => edge/postmarketos-base-ui: Done!
    ...
    [12:01:02] (rootfs_lenovo-21bx) % apk --no-progress --repository /home/clayton/.local/var/pmbootstrap/packages/edge add -u --virtual .pmbootstrap /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-wifi-iwd-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-qt-wayland-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-qt-tweaks-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-audio-none-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-networkmanager-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-wifi-iwd-29-r0.apk --no-interactive
    ...
    [12:01:04] ERROR: Invalid architecture: 'noarch', expected something like: x86_64, aarch64, riscv64, armhf, x86, armv7
    [12:01:04] See also: <https://postmarketos.org/troubleshooting>
    [12:01:04] Traceback (most recent call last):
      File "/home/clayton/src/pmbootstrap/pmb/core/arch.py", line 42, in from_str
        return Arch(arch)
               ^^^^^^^^^^
      File "/usr/lib/python3.12/enum.py", line 757, in __call__
        return cls.__new__(cls, value)
               ^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/enum.py", line 1171, in __new__
        raise ve_exc
    ValueError: 'noarch' is not a valid Arch
    
    ```
    
    [caleb: fixed tests]
    Unverified
    c7a97df7
  • Luca Weiss's avatar
    Improvements to documentation (MR 2440) · 35cd6408
    Luca Weiss authored and Caleb Connolly's avatar Caleb Connolly committed
    * Make sure all Python modules are documented by adding a bit of shell
      to .ci/docs.sh
    * Remove non-existing module references from .rst
    * Fix various warnings from sphinx by adjusting Python docstrings
    * Add class member docs to ApkindexBlock
    Unverified
    35cd6408
  • Clayton Craft's avatar
    ci: add basic integration testing for pmb (MR 2444) · 4f3ede33
    Clayton Craft authored and Caleb Connolly's avatar Caleb Connolly committed
    Unverified
    4f3ede33
Showing with 356 additions and 53 deletions
......@@ -20,6 +20,22 @@ if [ -z "$(command -v sphinx-build)" ]; then
exit 1
fi
# Sanity check docs that all modules are documented.
# Ignore all packages and files named test*
fail=0
modules="$(find pmb/ -name "*.py" | grep -v '/__init__.py' | grep -v '/test' | grep -v '/conftest.py' | sort | sed 's|\.py$||' | sed 's|/|.|g')"
for module in $modules; do
if ! grep -q "automodule:: $module" docs/api/*.rst; then
echo "Undocumented module: $module"
fail=1
fi
done
if [ "$fail" -eq 1 ]; then
echo "ERROR: Found undocumented modules!"
echo "ERROR: Please add this module to the correct .rst file in docs/api/"
exit 1
fi
sphinx-build \
docs \
public \
......
#!/bin/sh -e
set -x
if [ "$(id -u)" = 0 ]; then
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
pmbootstrap() {
./pmbootstrap.py --details-to-stdout "$@"
}
# Make sure that the work folder format is up to date, and that there are no
# mounts from aborted test cases (pmbootstrap#1595)
echo "Initializing pmbootstrap"
yes '' | ./pmbootstrap.py --details-to-stdout init
pmbootstrap work_migrate
pmbootstrap -q shutdown
# TODO: make device configurable?
device="qemu-amd64"
# TODO: make UI configurable?
ui="phosh"
pmbootstrap config device "$device"
pmbootstrap config ui "$ui"
# NOTE: --no-image is used because building images makes pmb try to
# "modprobe loop". This fails in CI.
echo "Building $ui image for $device"
pmbootstrap -y install --zap --password 147147 --no-image
echo "Building $ui image for $device, with FDE"
pmbootstrap -y install --zap --password 147147 --fde --no-image
......@@ -64,7 +64,7 @@ mr-settings:
before_script:
- *global_before_scripts
- "apk -q add python3"
- "wget -q 'https://gitlab.com/postmarketOS/ci-common/-/raw/master/check_mr_settings.py'"
- "wget -q 'https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/check_mr_settings.py'"
script:
- "python3 ./check_mr_settings.py"
......@@ -95,3 +95,19 @@ deploy:
- rsync -hrvz --delete -e "ssh -p ${SSH_PORT}" public/ "${SSH_HOST}":/var/www/docs.postmarketos.org/pmbootstrap/
environment:
name: deploy
integration:
stage: test
before_script:
- *global_before_scripts
- apk upgrade -U
- apk add doas git losetup python3 openssl
- echo "permit nopass build" > /etc/doas.d/ci-user.conf
script:
- ".ci/integration.sh"
after_script:
- "cp /home/build/.local/var/pmbootstrap/log.txt ."
artifacts:
when: on_failure
paths:
- "log.txt"
......@@ -41,7 +41,7 @@ This is a reST style.
#### The `args` variable
This contains the arguments passed to pmbootstrap, and some additional data.
See `pmb/helpers/args.py` for details. This is a legacy construct, see
[#1879](https://gitlab.com/postmarketOS/pmbootstrap/-/issues/1879).
[#1879](https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/1879).
#### Executing commands
Use one of the following functions instead of Python's built-in `subprocess`:
......
......@@ -34,7 +34,7 @@ $ pytest -vv ./test/test_keys.py
## Issues
Issues are being tracked
[here](https://gitlab.com/postmarketOS/pmbootstrap/-/issues).
[here](https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues).
## Requirements
* Linux distribution on the host system (`x86`, `x86_64`, `aarch64` or `armv7`)
......@@ -42,7 +42,7 @@ Issues are being tracked
does **not** work! Please use [VirtualBox](https://www.virtualbox.org/) instead.
* [Linux kernel 3.17 or higher](https://postmarketos.org/oldkernel)
* Note: kernel versions between 5.8.8 and 6.0 might
[have issues with parted](https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2309).
[have issues with parted](https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2309).
* Python 3.10+
* For python3 < 3.11: tomli
* OpenSSL
......@@ -52,7 +52,7 @@ Issues are being tracked
## Relation to pmaports
For pmbootstrap to be useful, it needs to maintain a local copy of the
[pmaports](https://gitlab.com/postmarketOS/pmaports) repository where
[pmaports](https://gitlab.postmarketos.org/postmarketOS/pmaports) repository where
postmarketOS-specific packages are maintained. This is set up automatically, but
the local copy of pmaports does not automatically get updated. To update it, you
can run `$ pmbootstrap pull`.
......@@ -117,7 +117,7 @@ $ pmbootstrap checksum hello-world
Generate a template for a new package:
```
$ pmbootstrap newapkbuild "https://gitlab.com/postmarketOS/tinydm/-/archive/1.2.0/tinydm-1.2.0.tar.gz"
$ pmbootstrap newapkbuild "https://gitlab.postmarketos.org/postmarketOS/tinydm/-/archive/1.2.0/tinydm-1.2.0.tar.gz"
```
#### Default architecture
......
......@@ -12,6 +12,14 @@ pmb.build.autodetect module
:undoc-members:
:show-inheritance:
pmb.build.backend module
------------------------
.. automodule:: pmb.build.backend
:members:
:undoc-members:
:show-inheritance:
pmb.build.checksum module
-------------------------
......@@ -60,6 +68,14 @@ pmb.build.other module
:undoc-members:
:show-inheritance:
pmb.build._package module
-------------------------
.. automodule:: pmb.build._package
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
......
......@@ -68,10 +68,10 @@ pmb.chroot.other module
:undoc-members:
:show-inheritance:
pmb.chroot.root module
----------------------
pmb.chroot.run module
---------------------
.. automodule:: pmb.chroot.root
.. automodule:: pmb.chroot.run
:members:
:undoc-members:
:show-inheritance:
......@@ -84,14 +84,6 @@ pmb.chroot.shutdown module
:undoc-members:
:show-inheritance:
pmb.chroot.user module
----------------------
.. automodule:: pmb.chroot.user
:members:
:undoc-members:
:show-inheritance:
pmb.chroot.zap module
---------------------
......
pmb.commands package
====================
Submodules
----------
pmb.commands.aportgen module
----------------------------
.. automodule:: pmb.commands.aportgen
:members:
:undoc-members:
:show-inheritance:
pmb.commands.base module
------------------------
.. automodule:: pmb.commands.base
:members:
:undoc-members:
:show-inheritance:
pmb.commands.index module
-------------------------
.. automodule:: pmb.commands.index
:members:
:undoc-members:
:show-inheritance:
pmb.commands.kconfig_check module
---------------------------------
.. automodule:: pmb.commands.kconfig_check
:members:
:undoc-members:
:show-inheritance:
pmb.commands.kconfig_edit module
--------------------------------
.. automodule:: pmb.commands.kconfig_edit
:members:
:undoc-members:
:show-inheritance:
pmb.commands.log module
-----------------------
.. automodule:: pmb.commands.log
:members:
:undoc-members:
:show-inheritance:
pmb.commands.pkgrel_bump module
-------------------------------
.. automodule:: pmb.commands.pkgrel_bump
:members:
:undoc-members:
:show-inheritance:
pmb.commands.pkgver_bump module
-------------------------------
.. automodule:: pmb.commands.pkgver_bump
:members:
:undoc-members:
:show-inheritance:
pmb.commands.pull module
------------------------
.. automodule:: pmb.commands.pull
:members:
:undoc-members:
:show-inheritance:
pmb.commands.repo_bootstrap module
----------------------------------
.. automodule:: pmb.commands.repo_bootstrap
:members:
:undoc-members:
:show-inheritance:
pmb.commands.shutdown module
----------------------------
.. automodule:: pmb.commands.shutdown
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: pmb.commands
:members:
:undoc-members:
:show-inheritance:
......@@ -4,26 +4,26 @@ pmb.config package
Submodules
----------
pmb.config.init module
pmb.config.file module
----------------------
.. automodule:: pmb.config.init
.. automodule:: pmb.config.file
:members:
:undoc-members:
:show-inheritance:
pmb.config.load module
pmb.config.init module
----------------------
.. automodule:: pmb.config.load
.. automodule:: pmb.config.init
:members:
:undoc-members:
:show-inheritance:
pmb.config.merge\_with\_args module
-----------------------------------
pmb.config.other module
-----------------------
.. automodule:: pmb.config.merge_with_args
.. automodule:: pmb.config.other
:members:
:undoc-members:
:show-inheritance:
......@@ -36,14 +36,6 @@ pmb.config.pmaports module
:undoc-members:
:show-inheritance:
pmb.config.save module
----------------------
.. automodule:: pmb.config.save
:members:
:undoc-members:
:show-inheritance:
pmb.config.sudo module
----------------------
......
pmb.core package
=================
Submodules
----------
pmb.core.apkindex_block module
------------------------------
.. automodule:: pmb.core.apkindex_block
:members:
:undoc-members:
:show-inheritance:
pmb.core.arch module
--------------------
.. automodule:: pmb.core.arch
:members:
:undoc-members:
:show-inheritance:
pmb.core.chroot module
----------------------
.. automodule:: pmb.core.chroot
:members:
:undoc-members:
:show-inheritance:
pmb.core.config module
----------------------
.. automodule:: pmb.core.config
:members:
:undoc-members:
:show-inheritance:
pmb.core.context module
-----------------------
.. automodule:: pmb.core.context
:members:
:undoc-members:
:show-inheritance:
pmb.core.crosstool module
-------------------------
.. automodule:: pmb.core.crosstool
:members:
:undoc-members:
:show-inheritance:
pmb.core.dps module
-------------------
.. automodule:: pmb.core.dps
:members:
:undoc-members:
:show-inheritance:
pmb.core.package_metadata module
--------------------------------
.. automodule:: pmb.core.package_metadata
:members:
:undoc-members:
:show-inheritance:
pmb.core.pkgrepo module
-----------------------
.. automodule:: pmb.core.pkgrepo
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: pmb.core
:members:
:undoc-members:
:show-inheritance:
......@@ -44,6 +44,14 @@ pmb.helpers.devices module
:undoc-members:
:show-inheritance:
pmb.helpers.exceptions module
-----------------------------
.. automodule:: pmb.helpers.exceptions
:members:
:undoc-members:
:show-inheritance:
pmb.helpers.file module
-----------------------
......@@ -172,6 +180,14 @@ pmb.helpers.status module
:undoc-members:
:show-inheritance:
pmb.helpers.toml module
-----------------------
.. automodule:: pmb.helpers.toml
:members:
:undoc-members:
:show-inheritance:
pmb.helpers.ui module
---------------------
......
......@@ -52,6 +52,14 @@ pmb.install.ui module
:undoc-members:
:show-inheritance:
pmb.install._install module
---------------------------
.. automodule:: pmb.install._install
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
......
......@@ -12,14 +12,6 @@ pmb.parse.apkindex module
:undoc-members:
:show-inheritance:
pmb.parse.arch module
---------------------
.. automodule:: pmb.parse.arch
:members:
:undoc-members:
:show-inheritance:
pmb.parse.arguments module
--------------------------
......@@ -76,6 +68,14 @@ pmb.parse.kconfig module
:undoc-members:
:show-inheritance:
pmb.parse.kconfigcheck module
-----------------------------
.. automodule:: pmb.parse.kconfigcheck
:members:
:undoc-members:
:show-inheritance:
pmb.parse.version module
------------------------
......@@ -84,6 +84,14 @@ pmb.parse.version module
:undoc-members:
:show-inheritance:
pmb.parse._apkbuild module
--------------------------
.. automodule:: pmb.parse._apkbuild
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
......
......@@ -11,7 +11,9 @@ Subpackages
pmb.build
pmb.chroot
pmb.ci
pmb.commands
pmb.config
pmb.core
pmb.export
pmb.flasher
pmb.helpers
......@@ -20,6 +22,7 @@ Subpackages
pmb.parse
pmb.qemu
pmb.sideload
pmb.types
Module contents
---------------
......
pmb.types package
=================
Module contents
---------------
.. automodule:: pmb.types
:members:
:undoc-members:
:show-inheritance:
......@@ -34,6 +34,6 @@ Indices and tables
*Note:* This documentation is currently a work-in-progress, your feedback and contributions are very welcome!
.. _postmarketOS-wiki: https://wiki.postmarketos.org/wiki/Main_Page
.. _issue-tracker: https://gitlab.com/postmarketOS/pmbootstrap/-/issues
.. _repository: https://gitlab.com/postmarketOS/pmbootstrap/
.. _issue-tracker: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues
.. _repository: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/
.. _Installation: https://wiki.postmarketos.org/wiki/Installation
......@@ -40,7 +40,7 @@ Follow this section if your Linux distribution doesn't have pmbootstrap packaged
.. code-block::
$ git clone --depth=1 https://gitlab.com/postmarketOS/pmbootstrap.git
$ git clone --depth=1 https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
$ mkdir -p ~/.local/bin
$ ln -s "$PWD/pmbootstrap/pmbootstrap.py" ~/.local/bin/pmbootstrap
$ pmbootstrap --version
......
......@@ -141,7 +141,9 @@ def main() -> int:
print_log_hint()
print()
print("Before you report this error, ensure that pmbootstrap is " "up to date.")
print("Find the latest version here:" " https://gitlab.com/postmarketOS/pmbootstrap/-/tags")
print(
"Find the latest version here: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/tags"
)
print(f"Your version: {__version__}")
return 1
......
......@@ -24,11 +24,10 @@ def get_cross_package_arches(pkgname: str) -> str:
:param pkgname: package name, e.g. "gcc-aarch64", "gcc-x86_64"
:returns: string of architecture(s) (space separated). It doesn't
necessarily make sense to use Arch here given that this value gets
used to write APKBUILD files, where the ``arch`` field can have values
that aren't necessarily valid arches like "!armhf", "noarch", or
"x86 x86_64".
necessarily make sense to use Arch here given that this value gets
used to write APKBUILD files, where the ``arch`` field can have values
that aren't necessarily valid arches like "!armhf", "noarch", or
"x86 x86_64".
"""
if pkgname.endswith("-x86_64"):
return "aarch64"
......@@ -46,7 +45,6 @@ def properties(pkgname):
:param pkgname: package name
:returns: (prefix, folder, options)
"""
for folder, options in pmb.config.aportgen.items():
for prefix in options["prefixes"]:
......
......@@ -8,17 +8,23 @@ from pmb.core.arch import Arch
@dataclass
class ApkindexBlock:
"""
"depends" is not set for packages without any dependencies, e.g. ``musl``.
"timestamp" and "origin" are not set for virtual packages (#1273).
We use that information to skip these virtual packages in parse().
"""
#: the architecture of the package
arch: Arch
depends: list[str] | None
#: dependencies for the package
depends: list[str]
#: the origin name of the package
origin: str | None
#: package name
pkgname: str
#: what this package provides
provides: list[str]
#: provider priority for the package
provider_priority: int | None
#: unix timestamp of the package build date/time
timestamp: str | None
#: package version
version: str