- Mar 12, 2024
-
-
This aims to solve this issue https://gitlab.com/postmarketOS/pmaports/-/jobs/6377953514#L497 Interpretation: - Our gcc-aarch64 is outdated - Our g++-aarch64 depends on libstdc++ with its same pkgver - We don't create a subpackage for libstdc++, so what should be libstdc++-aarch64 lives in gcc-aarch - gcc-aarch cannot resolve to itself, so resolves to the libstdc++ provided by alpine - The solver goes nuts This warranties that cross-compilers keep working, even when out-of-sync with alpine. I really don't know why this wasn't added in so many years, so I hope there's no hidden trick
-
- Feb 26, 2024
-
-
Newbyte authored
-
- Feb 16, 2024
-
-
Clayton Craft authored
This drops the prompt for using non-free firmware in images. The logic for searching/installing non-free fw subpackages for devices is kept, and will always be installed. This is to support the many device packages in pmaports that still have nonfree-firmware subpackages. Going forward, device packages can list firmware in `depends=` (for required fw) or `pmb_recommends` (for optional fw). nonfree-userland wasn't used in pmaports as far as I could find.
-
- Feb 09, 2024
-
-
Andras Sebok authored
-
- Jan 25, 2024
-
-
Oliver Smith authored
Fix "pmbootstrap chroot" and others not passing the proxy environment variables correctly. Thanks to notfound405 for pointing this out! Instead of only preserving proxy environment variables in pmb.helpers.run_core, which should never be called directly, do it in the calling functions: * pmb.helpers.run.user * pmb.helpers.run.root * pmb.chroot.root * pmb.chroot.user This fixes that the environment variables were only really passed by pmb.helpers.run.user, because the other functions would result in something like: HTTP_PROXY=mytestproxy sudo env -i /usr/bin/sh -c '…' This is needed to either elevate to root, or to elevate to root first and then enter the chroot as root or user. Due to the "env -i", the environment intentionally gets cleaned, but unintentionally also removes the proxy environment variables that were explicitly set. By adjusting the functions, they now run a variant of: sudo env -i /usr/bin/sh -c 'HTTP_PROXY=mytestproxy …' The escaping is simplified in this example, run "pmbootstrap -v" to see the not very readable, but proper escaping with shutil.quote(). Remove the previous test for preserving the environment variables in pmb.helpers.run_core (as it should never be called directly), and test instead the new behavior. Fixes: issue 2299 Fixes: 13c4ac42 ("pmb.helpers.run_core: fix proxy env var logic")
-
- Jan 09, 2024
-
-
This refactors the get_recommends function that was originally used for UI packages to support pmb_recommends for any package (and subpackage). Extending pmb_recommends will, for example, help us create better generic device packages [1] and can be used to improve packaging for UIs with shared pmb_recommends[2]. 1. https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4673 2. https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3700 Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20240102074605.23248-2-clayton@craftyguy.net%3E
-
- Dec 10, 2023
-
-
Sometimes I want to build an older version of a package from Alpine, and since package upgrades can involve things like patches and other externalities just changing the pkgver and running checksum in pmaports may not be enough. As such, it tends to be easier to revert the change in the local aports repo and then fork than forking and then trying to manually revert the changes yourself (since you can't have git do that for you given that they are distinct repositories). Prior to this patch, that was not possible since pmbootstrap would assume older aport version equals outdated aports in general and as such cancel the whole operation. Instead, just print a warning and helpful information to make this workflow possible while also warning users that they may want to update their local aports. Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20231209111813.37756-1-newbyte@postmarketos.org%3E
-
- Dec 03, 2023
-
-
Oliver Smith authored
Remove the code for generating binutils-aarch64 etc. packages, as these live upstream in Alpine now. Having the generator scripts for binutils cross pkgs is therefore not useful anymore and would just bitrot if we kept it. Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20231126121617.3855-1-ollieparanoid@postmarketos.org%3E
-
- Nov 13, 2023
-
-
This fixes an issue when pmb is run on an Alpine/pmOS host and apk.static sees that /etc/apk/interactive is set on the host. It's really annoying to have the build pause so apk can prompt when building chroots, so this uses a flag to apk to disable interactive mode. I can't think of any situations where we would actually want to prompt users when building chroots, by then all user configuration should have been completed via pmb init/config. Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Co-developed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20231110185320.8358-1-clayton@craftyguy.net%3E
-
Currently, pmbootstrap checks if either the kernel or the ramdisk in a boot.img contains the MediaTek header, and if one does, it assumes both do. It hardcodes the label KERNEL for the kernel and ROOTFS for the ramdisk. My Amazon Echo Dot (gen 2) has a boot.img where only the kernel has the header, but not the ramdisk. These changes (as well as those in my new boot-deploy MR) account for that situation (and any possible label an image has) by splitting bootimg_mtk_mkimage into two variables for the kernel and the ramdisk labels. Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/patches/46351
-
- Nov 01, 2023
-
-
To use the same convention as in pmaports. See https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4283 Signed-off-by:
Pablo Correa Gómez <ablocorrea@hotmail.com> Reviewed-by:
Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230827174210.27896-1-pabloyoyoista@postmarketos.org%3E
-
- Aug 14, 2023
-
-
this seems to be parsed correctly, other than this one check bug: https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2260 Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230813202045.24493-1-lauren@selfisekai.rocks%3E
-
Oliver Smith authored
Remove test_crossdirect_rust, the only test in test_crossdirect.py. The behavior that was tested here with all the "mv /usr/bin/rustc" commands was specific to version 4 and isn't valid anymore since version 5 (pmaports MR 4234). The previous behavior was that crossdirect always tried to run rustc from /native, and if it failed, it would fall back to using qemu. The new behavior is that it runs rustc from /native only when it expects it to succeed, and runs rustc via qemu otherwise, without attempting /native first. As the logic to decide whether to use native rustc or not is now done beforehand, it does not do the fallback to qemu if native fails. Note that the test hasn't been failing because we switch to the v23.06 channel and therefore use the older crossdirect version. Reviewed-by:
Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230806184729.4891-6-ollieparanoid@postmarketos.org%3E
-
Oliver Smith authored
Cache the compiler output of rust code with sccache, like we use ccache for c code. I've considered using sccache to completely replace ccache since it can cache output of C/C++ code too. But let's not do it for now since ccache doesn't need to run a daemon in the background that needs to be stopped when shutting down / zapping. Also it would need more refactoring. Reviewed-by:
Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230806184729.4891-5-ollieparanoid@postmarketos.org%3E
-
Oliver Smith authored
Don't include the /mnt/pmbootstrap directories in the images created with "pmbootstrap install". Reviewed-by:
Pablo Correa Gómez <ablocorrea@hotmail.com> Reviewed-by:
Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230806184729.4891-3-ollieparanoid@postmarketos.org%3E
-
Oliver Smith authored
Have one /mnt/pmbootstrap directory with subdirectories, instead of several /mnt/pmbootstrap-* directories. Reviewed-by:
Pablo Correa Gómez <ablocorrea@hotmail.com> Reviewed-by:
Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230806184729.4891-2-ollieparanoid@postmarketos.org%3E
-
- Jul 25, 2023
-
-
Oliver Smith authored
After we have removed binutils-aarch64 etc. from pmaports, this test started to fail with the following: Failed: DID NOT RAISE <class 'RuntimeError'> Rewrite it to try to build "hello-world-wrapper" instead, and mark its dependency "hello-world" as outdated. While it's not great to depend on packages in pmaports for testing, at least these two are explicitly made for the testsuite and are less likely to change. Related: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3275 Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230724070509.1885-3-ollieparanoid@postmarketos.org%3E
-
Oliver Smith authored
Add the "args" fixture to test_skip_already_built, so it correctly initializes logging (and indirectly pmb.helpers.other.cache). With this it becomes possible to run the test file on its own. See "def args" on top of the file for implementation of the "args" fixture. Fix for: $ pytest -xvv test/test_build_package.py … > assert pmb.helpers.other.cache["built"] == {} E TypeError: 'NoneType' object is not subscriptable Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230724070509.1885-2-ollieparanoid@postmarketos.org%3E
-
- Jul 21, 2023
-
-
So deviceinfo_modules_initfs is going to be phased out in pmaports!4169 as a preparation for pmaports#1836. The implementation for the alternative of using a modules file has already been merged in pmaports!4193, so stop promoting the soon-to-be-phased-out deviceinfo variable, and instead use the new and already-supported alternative. Related: https://gitlab.com/postmarketOS/pmaports/-/issues/1836 Related: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4169 Related: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4193 Signed-off-by:
Pablo Correa Gómez <ablocorrea@hotmail.com> Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230720164706.18936-1-pabloyoyoista@postmarketos.org%3E
-
Oliver Smith authored
Fix that the list "cmd" was turned into a string if one of the proxy vars was set in the environment. Add a test for this code path. Before this patch: $ FTP_PROXY=test pmbootstrap -v --details-to-stdout status … % cd /home/user/.local/var/pmbootstrap/cache_git/pmaports; git remote -v run: FTP_PROXY=test ['git', 'remote', '-v'] ERROR: [Errno 2] No such file or directory: "FTP_PROXY=test ['git', 'remote', '-v']" Fixes: 1a00c04f ("pmb.helpers.run_core: always configure proxy vars if set in environment") Reviewed-by:
Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230713182337.6185-3-ollieparanoid@postmarketos.org%3E
-
Oliver Smith authored
Move pmb.helpers.run.flat_cmd to run_core, as it will be used by pmb.helpers.run_core.core in the next patch. Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230713182337.6185-2-ollieparanoid@postmarketos.org%3E
-
- Jul 13, 2023
-
-
When build_default_device_arch is set in your local pmbootstrap config, some tests fail because pmbootstrap tries to cross compile. Make sure this option is disabled in the test context. Signed-off-by:
Caleb Connolly <kc@postmarketos.org> Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230629-suffix-type-hint-v1-5-e92802ae20a8@postmarketos.org%3E
-
don't assume that master is the default branch name. Signed-off-by:
Caleb Connolly <kc@postmarketos.org> Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230629-suffix-type-hint-v1-3-e92802ae20a8@postmarketos.org%3E
-
Since introducing git hooks, these tests fail locally because copytree can't handle the relative symlinks. Add a helper for this common pattern and set ignore_dangling_symlinks to safely skip these symlinks. Signed-off-by:
Caleb Connolly <kc@postmarketos.org> Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230629-suffix-type-hint-v1-2-e92802ae20a8@postmarketos.org%3E
-
- Jun 15, 2023
-
-
Oliver Smith authored
With this code path, pmbootstrap would start a distccd + sshd in the native chroot, and configure it so it runs the cross compiler. The foreign arch chroots would then call this cross compiler from localhost by calling the distcc client instead of gcc. This code has been obsoleted by the much simpler crossdirect in 2019. Let's finally remove it. Fixes: issue 2179 Reviewed-by:
Luca Weiss <luca@z3ntu.xyz> Reviewed-by:
Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230613161437.570196-4-ollieparanoid@postmarketos.org%3E
-
- Jun 04, 2023
-
-
This cancels the need to install and configure `sudo` or `doas` on single-user installations (e.g.: a VM dedicated to running pmbootstrap). Fixes: https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2224 Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230529203922.22161-1-hugo@whynothugo.nl%3E
-
- May 25, 2023
-
-
Oliver Smith authored
Adjust to Alpine's APKBUILD where jansson-dev and zstd-dev are only set if $BOOTSTRAP is empty. The APKBUILD parser in pmbootstrap doesn't recognize this, and therefore doesn't install the depends unless we replace makedepends_host= outside of the condition. Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/fe73f3a28c101cfbe0a41e55c8497520a6cfbdca Reviewed-by:
Luca Weiss <luca@z3ntu.xyz> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230522065220.2841-3-ollieparanoid@postmarketos.org%3E
-
- Mar 24, 2023
-
-
Oliver Smith authored
Rename the file so it runs last, as it's currently failing a lot of times on sourcehut. When I looked into it last time, it seemed to be related to CDN caching and then it worked again so I didn't look further into it at the time. Move it to the end until this is figured out properly, so at least we see if all other tests are passing.
-
Oliver Smith authored
Replace the old kconfig check tests with new ones, that do not rely on: * any kernel config in pmaports * the currently required kconfig options set in pmb/config/__init__.py This will make it much easier to change the required options, and moves the testsuite a bit more towards making it completely independent from current pmaports state. Reviewed-by:
Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230312151325.1968-13-ollieparanoid@postmarketos.org%3E
-
Oliver Smith authored
Components are the sets of kernel config options in pmb/config/__init__.py, such as the ones for waydroid, nftables, etc. Generate the list of components dynamically and refactor the code, so we can add/remove components in just one place. Reviewed-by:
Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230312151325.1968-4-ollieparanoid@postmarketos.org%3E
-
- Feb 26, 2023
-
-
pmOS cannot boot without these two. There was recently someone in the unofficial postmarketOS Telegram group who used some minimal config and couldn't figure out why the initramfs couldn't start up, and these options being disabled turned out to be the culprit. As such, let's ensure these are enabled to make life easier for people setting up new kernel configurations. Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Tested-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230128203716.152281-1-newbyte@postmarketos.org%3E
-
Oliver Smith authored
Always set GOCACHE during build and let it point to pmbootstrap's work dir. This has a similar effect as using ccache for C/C++. Set GOMODCACHE conditionally: this is for caching the go modules (git repositories) that get cloned during a build if they are not bundled with the source. Usually APKBUILDs should cache them, but when using pmbootstrap build --src, they would get downloaded over and over again. Set GOMODCACHE automatically for --src and allow enabling/disabling this manually with new --go-mod-cache / --no-go-mod-cache. This speeds up multiple iterations of building the same package significantly. I'm using it for: $ pmbootstrap build postmarketos-mkinitfs --src=... I've verified that using the same GOCACHE dir for multiple architectures doesn't result in build artifacts for the wrong arch getting used. Reviewed-by:
Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230223064743.1773-1-ollieparanoid@postmarketos.org%3E
-
- Jan 22, 2023
-
-
Oliver Smith authored
-
- Jan 20, 2023
-
-
Running abuild on the host directly creates directories in the aport where it gets built. Interrupting abuild results in those working-dirs not getting deleted. We don't want to copy those entries to our builder. It's only really noticeable if pmbootstrap tries to copy a broken symlink in src/ and thus fails. Reviewed-by:
Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20221207205201.22139-1-jane400@bingo-ev.de%3E
-
- Nov 02, 2022
-
-
Oliver Smith authored
The typical workflow for upgrading cross/gcc-* is: $ cd pmaports/cross $ pmbootstrap aportgen gcc-* Currently this is failing because the APKBUILD has been updated in Alpine for gcc, but gcc has not been built for all arches yet. This shouldn't prevent us from generating the proper updated APKBUILDs in pmaports so just print a note and don't fail here. I'm committing this directly to master as this currently breaks test/test_aportgen.py::test_aportgen.
-
- Oct 25, 2022
-
-
Oliver Smith authored
Replace .gitlab-ci.yml with a minimal .build.yml that runs a script in the .ci dir for each task. Each of these scripts runs as root first, installs dependencies, and then drops rights to the testuser and runs the actual test. I went with this design, so we can add a 'pmbootstrap ci' command in following patches that run these in a pmbootstrap chroot (see pmaports#2169). Looking at flake8, we currently ignore W504 and W604. Would be nice to fix these instead, but let's do that in another patch. I've added a minver package to Alpine, so we don't need to install it form pip anymore. Use minver's new --lint argument to simplify the script, and as recommended by minver itself, use --no-parse-comments as speed optimization since we don't have minver specific comments. Using doas instead of sudo in build.yml would be nice, but this doesn't work out of the box. Can be changed in the future. Add a note to the pytest script, that 'pmbootstrap log' can be used to follow the log while tests are running.
-
- Oct 12, 2022
-
-
Oliver Smith authored
Device packages shouldn't depend on it anymore, in order to end up with a smaller installation for ui=none this package only gets pulled in by postmarketos-base if mesa is installed. Related: pmaports MR 3478
-
- Oct 05, 2022
-
-
Oliver Smith authored
abuild traces shared library dependencies for binaries in built packages, and adds all of them to depends. This is needed for the cross gcc builds, as otherwise it will not add the isl dependency (currently isl25). With the crossdirect compilation method we mount the cross-gcc from the native chroot in the foreign arch chroot. Due to the missing dependency, isl was not installed in the native chroot, and so when attempting to use that native cross gcc from the foreign arch chroot, it would try to load the foreign arch isl instead of the native one. Resulting in lots of the following errors (and of course not a working gcc): Error relocating /usr/lib/libisl.so.23: unsupported relocation type 1026 I had probably added '!tracedeps' because abuild complains about it otherwise... but as noted in [1] these complaints are safe to ignore. Keep !strip for now even though it's not in Alpine's APKBUILD. I've tried to build without and the build fails with: strip: Unable to recognise the format of the input file `./usr/aarch64-alpine-linux-musl/lib/libgcc_s.so.1' [1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/0415ebf6f9e5bae8338a45cc147f1b8536ef45d7 Related: pmaports issue 1732
-