- Mar 10, 2025
-
-
Currently packages that are not in the systemd channel cannot be sideloaded when using the systemd channel. This is because apk sideload uses the global aports channel and not the channel of the package. Fix it with this patch.
-
We fully expect to reach this code path within normal use of pmbootstrap. It's not a bug if we get here. As such, use NonBugError to indicate that and clean up the output.
-
We fully expect to reach this code path within normal use of pmbootstrap. It's not a bug if we get here. As such, use NonBugError to indicate that and clean up the output.
-
We fully expect to reach this code path within normal use of pmbootstrap. It's not a bug if we get here. As such, use NonBugError to indicate that and clean up the output.
-
The install action will initialise the native chroot, so this way we don't have to initialise the chroot in this code path. It also gives users feedback quicker if they haven't already initialised the rootfs since this way they don't have to wait around for nbd to be installed before being told that they need to generate the rootfs first. Closes postmarketOS/pmbootstrap#2549
-
- Mar 09, 2025
-
-
Oliver Smith authored
Cross compiling go programs with cross-native2 fails for armv7, riscv64 and armhf unless we use CGO_ENABLED=1 in the APKBUILD (see related aports issue). Add --sysroot to CGO_CFLAGS, so cgo can find the includes and doesn't fail with: go build -buildmode=pie -modcacherw -trimpath -buildvcs=false -ldflags "-s -w -X main.Version=2.6.1" -o mkinitfs ./cmd/mkinitfs # runtime/cgo _cgo_export.c:3:10: fatal error: stdlib.h: No such file or directory Add it to LDFLAGS too for linking against libraries from the sysroot. Related: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15809 Related: https://stackoverflow.com/a/38835938
-
- Mar 08, 2025
-
-
- Mar 06, 2025
-
-
Clayton Craft authored
Fixes a bug where checkdepends are not being installed, and packages that run tests that depend on something in checkdepends fail because it's missing. For example, the `plasma-workspace` forked pkg in pmaports tells abuild to run `xwfb-run` in `check()`, this binary comes from `xwayland-run`, which is listed in the `checkdepends`. However this isn't being installed and so `pmb build` ultimately fails to build the package.
-
- Mar 02, 2025
-
-
Oliver Smith authored
Add the cross compiling documentation to the pmbootstrap docs. This is based on the following wiki pages, but updated to reflect new changes with cross-native2 and to make it more readable: * https://wiki.postmarketos.org/wiki/Pmbootstrap/Cross_Compiling * https://wiki.postmarketos.org/wiki/Build_internals#Cross-compile_types Co-authored-by:
Caleb Connolly <caleb@postmarketos.org>
-
- Mar 01, 2025
-
-
Casey authored
Speed up compressing packages after build by using pigz which does parallelised compression! Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
- Feb 27, 2025
-
-
Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Set things up so that we can run abuild on the native chroot and use it's cross compilation features rather than running it and the build system through QEMU. This massively speeds up building when it works. cross-native used to be quite limited in functionality and didn't integrate into abuild itself, this commit fixes that. Packages can opt-in to this by adding pmb:cross-native2 to their options and configuring makedepends_host and makedepends_build. This also speeds up building packages like postmarketos-initramfs since it entirely avoids running commands through QEMU (usually abuild itself would be run through QEMU). Lastly, we preserve the old pmb:cross-kernel options, this can be used to enable the old cross compiler behaviour which is used for cross compiling kernels in pmaports. This allows them to keep being supporting while we adapt them to the new cross-native2. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Rather than a list which we later convert to a set. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Map architectures to the strings used for GOARCH for cross compiling Go applications. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
The .supported() method errs on the side of exposing too many architectures to make porting for new or less-common platforms easier. It therefore isn't suitable for using as a list of supported architectures we can probe the binary repository for. Introduce a .supported_binary() method to export only the architectures where we have a binary repository. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Oliver Smith authored
-
Oliver Smith authored
Instead of automatic python package discovery that for some reason still picks up the test module even though it should be excluded, specify the "pmb" module manually to be installed. Follow-up to MR 2551. Fixes: issue 2541
-
- Feb 26, 2025
-
-
Oliver Smith authored
-
I didn't really understand mypy's overloading well when I wrote this. It makes sense to have a third overload here with bool as type for multiple_providers used in circumstances where a literal isn't provided for that parameter.
-
Having a more generic overload like this fixes the issue where mypy complains about no matching overloads at the call site in userm().
-
According to Python documentation, p.match checks if characters at the beginning of string match the regex This commit changes validation to full length of string
-
- Properly run commands at host to mount rootfs - Always refuse to zap chroot_image, since it is never added to workdir.cfg Co-authored-by:
Newbyte <newbyte@postmarketos.org>
-
- Feb 23, 2025
-
-
Oliver Smith authored
After setting "-T big", we still saw some images failing with "out of space" errors in bpo, such as "v24.12:samsung-espresso10:xfce4". I've looked at /etc/mke2fs.conf to figure out what exactly gets configured with "-T big". What I did not realize is that the inode ratio gets bigger by going from small -> big, big -> huge, but with a larger ratio FEWER inodes will be created (see man mkfs.ext4, -i bytes-per-inode). In /etc/mke2fs.conf in Alpine edge: [defaults] … blocksize = 4096 inode_size = 256 inode_ratio = 16384 [fs_types] … small = { blocksize = 1024 inode_ratio = 4096 } floppy = { blocksize = 1024 inode_ratio = 8192 } big = { inode_ratio = 32768 } huge = { inode_ratio = 65536 } news = { inode_ratio = 4096 } … So I've tried out half the ratio value we get with "big" now, 16384. With that we finally seem to have: * Enough inodes for small UIs (console, none) as well as big UIs with lots of files (xfce4, plasma-desktop, ...) * We don't directly specify an inode count (-N) anymore as we did earlier, which had problems with small images as the inode count would be too large for the given image size (pmb#2572). Test builds with various images: Filesystem Inodes Used Available Use% Mounted on master:postmarketos-trailblazer:none: /dev/installp2 35440 5111 30329 14% /mnt/install master:postmarketos-trailblazer:console: /dev/installp2 47232 8713 38519 18% /mnt/install master:pine64-pinebookpro:plasma-desktop: /dev/installp2 276352 100607 175745 36% /mnt/install v24.12:samsung-espresso10:xfce4: /dev/installp2 80960 51150 29810 63% /mnt/install So the most Use% I could get is 63% with this, leaving a nice margin for the future.
-
Oliver Smith authored
Log how well we have used the space and available inodes in the resulting images, to show how well the mkfs parameters we have decided on are working.
-
This is no longer necessary to pass checks, and it allows further unused import analysis.
-
This name is what's used at the one call site the codebase currently has, and it means we can have an explicit re-export which Ruff won't complain about.
-
-
- Feb 19, 2025
-
-
Oliver Smith authored
Using "-N" to set a specific inode count caused errors: * With 100K, we got "out of space" errors when creating images for bigger UIs with many small files like: pine64-pinebookpro:plasma-desktop * With 1M (current value), we got "out of space" for small images like: postmarketos-trailblazer:console Use "-T big" instead to set the usage-type that is closest to how we expect the filesystem to be used, once it is flashed to the user's device and resized. This will indirectly set the bytes-per-inode. I've verified that building both the big pine64-pinebookpro:plasma-desktop and small postmarketos-trailblazer:console (and even with UI=none) works with this change. I've verified that building both the small image works with this. From the mkfs.ext4 man page: -T usage-type[,...] Specify how the file system is going to be used, so that mke2fs can choose optimal file system parameters for that use. The usage types that are supported are defined in the configuration file /etc/mke2fs.conf. The user may specify one or more usage types using a comma separated list. If this option is is not specified, mke2fs will pick a single default usage type based on the size of the file system to be created. If the file system size is less than 3 megabytes, mke2fs will use the file system type floppy. If the file system size is greater than or equal to 3 but less than 512 megabytes, mke2fs(8) will use the file system type small. If the file system size is greater than or equal to 4 terabytes but less than 16 terabytes, mke2fs(8) will use the file system type big. If the file system size is greater than or equal to 16 terabytes, mke2fs(8) will use the file system type huge. Otherwise, mke2fs(8) will use the default file system type default. Fixes: d0d7c2d4 ("pmb.install.format: set ext4 usage-type to big") Fixes: issue 2572
-
- Feb 16, 2025
-
-
Oliver Smith authored
Don't try to modify a variable in the while loop, as it runs in a subshell because of the pipe. Fail on the first error instead, like we have it in .ci/shellcheck.sh. This can be optimized later on (for both scripts) if we really want to. Fix for: In ./.ci/markdown.sh line 17: markdownlint-cli "$file" || MDL_FAILED=1 ^--------^ SC2030 (info): Modification of MDL_FAILED is local (to subshell caused by pipeline). In ./.ci/markdown.sh line 20: if [ "$MDL_FAILED" = "1" ]; then ^---------^ SC2031 (info): MDL_FAILED was modified in a subshell. That change might be lost.
-
Oliver Smith authored
Move the "npm install" command to the section that runs as regular user instead of root. Instead of creating a /usr/bin/markdownlint-cli symlink, run the JS file from the path where npm installs it. Try to find a markdownlint-cli executable and use it instead if it exists, in case users run this script outside of "pmbootstrap chroot" and have the linter installed under that name.
-
Add a pre-commit hook that runs ruff.sh and tells you how to auto-fix issues, add a section to CONTRIBUTING.md to document it. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
lint all the markdown files so they pass markdownlint. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Add a CI job to enforce markdown linting Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
Add a flag to bind-mount in the necessary sysfs directories for USB devices to be accessed inside the chroot. This is the same as how we do it for "pmbootstrap flasher" but allows running arbitrary commands in the chroot. This is useful to allow using pmbootstrap chroot's as a sandbox for custom flashing procedures. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
_type(value) in super().__setattr__(key, _type(value)) always returns True for a valid string, even if the string is "False". This code also didn't fail when any other value besides True or False was passed, though it must fail. Fix #2554
-
Oliver Smith authored
Make 10x the amount of inodes available for ext4 partitions when using "pmbootstrap install" without the "--disk" argument so we won't run out for sure. The previous value was not enough in some edge cases. We do need to set this as the default is not enough either. Fixes: issue 2568
-
- Feb 13, 2025
-
-
Hugo Barrera authored
When installing pmboostrap, all tests are installed alongside it. There doesn't seem to be any way to selectively exclude some files inside python modules, so move all test into a separate module instead. This is the typical convention in python projects. See: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/79862 Fixes: postmarketOS/pmbootstrap#2541
-
- Feb 12, 2025
-
-
Allows easily using an existing checkout. The default path remains the same. Fixes: postmarketOS/pmbootstrap#2506 [ci:skip-build]: already built successfully in CI
-