Commit Graph

18 Commits

Author SHA1 Message Date
Caleb Connolly 9526a9d437
build: use host native gzip (MR 2242)
Instead of installing a gzip wrapper, run gzip from the native chroot
which we bind mount in.

Signed-off-by: Caleb Connolly <kc@postmarketos.org>
2024-02-06 00:23:19 +01:00
Oliver Smith 0ff6ad481d
install: remove /mnt/pmbootstrap at the end
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
2023-08-14 09:52:22 +02:00
Oliver Smith 9975d373b0
Bump copyright to 2023 2023-01-22 19:18:06 +01:00
Clayton Craft a367e0d95b
pmb.chroot.mount: create /dev/fd (MR 2170)
Specifically, this fixes issues with process substitution in bash in the
chroot.

For example, the following lines from a NetworkManager build script:

    ... |
        grep -Fx -f <(get_symbols_explicit) -v |
        grep -Fx -f <(get_symbols_nm)

fail with:
     ninja: job failed: /home/pmos/build/src/NetworkManager-1.35.92/tools/create-exports-NetworkManager.sh --called-from-build /home/pmos/build/src/NetworkManager-1.35.92
     grep: /dev/fd/63: No such file or directory
     grep: /dev/fd/63: No such file or directory
2022-02-20 15:03:09 +01:00
Oliver Smith 6f6a3b0408
Happy new year 2022! 2022-01-02 22:39:14 +01:00
Oliver Smith 1c791da482
treewide: bump copyright to 2021 2021-01-07 23:30:47 +01:00
Oliver Smith 7f60a6d782
chroot: put built packages into channel subdir (MR 1912)
Migrate to workdir version 5 and move already built packages into the edge
channel subdir, for example:
	$WORK/packages/x86_64/hello-world-1-r5.apk
to:
	$WORK/packages/edge/x86_64/hello-world-1-r5.apk

The build.postmarketos.org code has already been adjusted to find built
packages in either directory structure.
2020-05-17 08:08:45 +02:00
Oliver Smith f21c216a26
Cosmetic: use SPDX license header (!1877)
While at it, also remove unnecessary "#!/usr/bin/env python3" in files
that only get imported, and adjust other empty/comment lines in the
beginnings of the files for consistency.

This makes files easier to read, and makes the pmbootstrap codebase more
consistent with the build.postmarketos.org codebase.
2020-02-24 03:11:10 +03:00
Oliver Smith 948e3f931f
Change copyright to 2020 2020-01-06 02:43:00 +01:00
Oliver Smith 8187c66825
Mount /dev/shm in chroots
Fix configure crash when building mozjs60 by mounting tmpfs as /dev/shm
in chroots. This is an important fix, because of this dependency chain,
that is currently broken in armhf and armv7 (see pmaports#244):

postmarketos-base -> networkmanager -> polkit -> mozjs60
2019-05-05 17:47:25 +02:00
Zhuowei Zhang 1fffe83df3
Add "crossdirect": faster cross compiling (!1758)
Launch native cross compilers inside foreign chroot. Enable by default,
but allow disabling with --no-crossdirect for now. This option and the
distcc-sshd related code will be removed in the future.
2019-03-23 01:13:36 +01:00
Oliver Smith f16bdaf0ca
Update copyright to 2019
Happy new year \o/
2019-01-02 09:31:20 +01:00
Oliver Smith a92e6a89d0
remove local postmarketOS mirror folder support (!1718)
Obscure feature: it was possible to specify a local path as
--mirror-pmOS. It would then get mounted to /mnt/postmarketos-mirror
inside the chroot, and be specified as such in the generated
/etc/apk/repositories file.

I had used this once for some testing scripts, but I am sure nobody is
using this anymore. The same can be achieved with running a local http
server anyway:
<https://wiki.postmarketos.org/wiki/Installing_packages_on_a_running_phone>

Removing this makes it easier to support multiple postmarketOS mirrors
(next commit).
2018-12-06 07:31:38 +01:00
Oliver Smith 4e665a2190
Recreate device nodes in chroot after shutdown (#1447)
Device nodes in the chroots get created in a tmpfs, so they can be
created even if the filesystem where the chroot resides does not
support device nodes (#1317). In "pmbootstrap shutdown" we umount the
`dev` folder, which means all device nodes that were created inside
this folder are gone. This commit changes the code to actually recreate
the device nodes when using the chroot again.

Details:
* move `pmb.chroot.init.create_device_nodes` to
  `pmb.chroot.mount.crete_device_nodes`
* don't call it in `pmb.chroot.init()` anymore, but in
  `pmb.chroot.mount_dev_tmpfs()`
* Create the `null` device as well (`apk --initdb` also creates it on
  `init`, but we don't call it after `shutdown`)
2018-04-29 22:17:57 +00:00
Oliver Smith dc624aecea
Mount tmpfs in chroot's /dev folders (#1317) 2018-03-10 14:24:16 +00:00
Oliver Smith 7750c1dd40
Happy new year! (update copyright to 2018) 2018-01-04 04:53:35 +01:00
Oliver Smith f37367c57c
Properly support specifying a local folder as --mirror-pmOS
This is required for developing and testing the binary repository
scripts (see #64). Changes:
* When specified, the local folder gets mounted inside the chroots
  as /mnt/postmarketos-mirror
* The apkindex_files() function outputs the correct path to the local
  repository (it does *not* hash the URL in that case, which would
  be wrong)
* /etc/apk/repositories: when the pmOS mirror is a local folder,
  the path "/mnt/postmarketos-mirror" gets added to that file instead
  of the outside path (so apk finds it properly inside the chroot)
2017-07-12 21:55:47 +02:00
Oliver Smith ae950fb9f7
Hello, there! 2017-05-26 22:08:45 +02:00