Commit Graph

47 Commits

Author SHA1 Message Date
Tony Garnock-Jones dfe8129640
Allow override of SSH key glob: documentation (MR 2167) 2022-02-13 16:26:49 +01:00
Anjandev Momi c1407f921b
Use doas instead of sudo if installed (MR 2091)
Prefer using doas over sudo if both are installed. Let the user override
the sudo tool with PMB_SUDO.
2021-12-12 18:46:17 +01:00
Oliver Smith d38bd6be2b
CI: drop support for cached venv + ci runner (MR 2080)
CI started failing with:
/builds/ollieparanoid/pmbootstrap/venv/bin/python3: No module named pytest

I've briefly tried to fix this with the existing scripts. However,
instead of investing more time into that, do the long overdue
refactoring of the scripts that involve dropping the venv logic and
support for a custon gitlab-ci-runner using some python docker image as
base. This configuration hasn't been used for a long time and is
probably broken anyway.

Refactor the logic to skip the qemu test case in gitlab CI by using
pytest markers. The new script is now similar to bpo's .ci/pytest.py.
2021-07-04 22:51:53 +02:00
Maxim Karasev 3d651af763
README: update requirements (MR 2077)
Alpine no longer provides linux-hardened, and also no additional
packages are required to run pmbootstrap on Alpine.
2021-07-02 04:06:49 +03:00
Antoine Fontaine c30540d13c
README: add some documentation on how to run tests (MR 1973) 2021-06-13 17:43:51 +02:00
timbz d0b32b3b05
pmbootstrap deviceinfo_parse: new action (MR 1986)
Co-Authored-By: Oliver Smith <ollieparanoid@postmarketos.org>
2020-11-10 09:15:52 +03:00
Oliver Smith 2933b57f5d
README.md: mention "pmbootstrap status" (!1882) 2020-03-14 19:15:32 +03:00
Minecrell 527f5a9512
Update required Python version to 3.6+ (!1879)
We need Python 3.5+ for recursive (**) globs.
While we are at it, we might as well require Python 3.6
so we can use f-strings in the future.
2020-03-14 08:39:13 +01:00
Oliver Smith 02e514f4d3
pmb.helpers.git.clone: use git from host system (!1845)
Do not install git in the native chroot and use it from there. Remove the
chown_to_user argument from pmb.helpers.git.clone(), the resulting dir
is now always owned by the user. While at it, refactor the function and
display the clone URL.

Previously we had cloned aports_upstream (from Alpine) with
chown_to_user=False (legacy) and pmaports with chown_to_user=True.
pmb.helpers.git.rev_parse() would only work after chown_to_user=True.

Check if git is installed in "pmbootstrap init", and remove the same
check from rev_parse(). Add a new work dir version, that checks for git
and changes ownership of already checked out aports_upstream to the
host system's user.

When creating a new work dir, create cache_git instead of cache_http.
cache_http is created on demand already, with proper permissions. But
cache_git must be created, otherwise pmb.helpers.mount.bind will create it
as root.

This is in preparation for the "pmbootstrap pull" feature, as it allows
using the host system's git in all new code paths. We will be able to
handle repositories even if they were cloned outside of the work dir
(which we do in a few CI scripts for example).

Related: #1858
2020-01-12 00:39:47 +01:00
Luca Weiss 2ad8b66ccc
Fix case sensitivity: Qemu => QEMU (!1800) 2019-07-05 20:27:12 +02:00
Idan Horo fd79a60383
pmbootstrap install: make --no-fde default (!1798)
Implement --fde, add deprecation warning to --no-fde, update related
help files and tests.
2019-07-05 20:04:10 +02:00
Oliver Smith 933c4d0f0d new action: 'pmbootstrap repo_missing'
Add a new action that lists all aports, for which no binary packages
exist. Only list packages that can be built for the relevant arch
(specified with --arch). This works recursively: when a package can be
built for a certain arch, but one of its dependencies
(or their depends) can not be built for that arch, then don't list it.

This action will be used for the new sr.ht based build infrastructure,
to figure out which packages need to be built ahead of time (so we can
trigger each of them as single build job). Determining the order of the
packages to be built is not determined with pmbootstrap, the serverside
code of build.postmarketos.org takes care of that.

For testing purposes, a single package can also be specified and the
action will list if it can be built for that arch with its
dependencies, and what needs to be built exactly.

Add pmb/helpers/package.py to hold functions that work on both pmaports
and (binary package) repos - in contrary to the existing
pmb/helpers/pmaports.py (see previous commit) and pmb/helpers/repo.py,
which only work with one of those.

Refactoring:
* pmb/helpers/pmaports.py: add a get_list() function, which lists all
  aports and use it instead of writing the same glob loop over and over
* add pmb.helpers.pmaports.get(), which finds an APKBUILD and parses it
  in one step.
* rename pmb.build._package.check_arch to ...check_arch_abort to
  distinguish it from the other check_arch function
2018-12-01 21:30:59 +00:00
Robert Yang 277854e80f Kill the child processes spawned by a run command
When the timeout occurs it is important to ensure clean up of child
processes. Killing only the direct process created by a command can
leave child processes running.

For example a pmbootstrap.py install will run apk add. This run command
creates multiple processes as follows:
(cmd line arguments snipped for readability)

  $ ps -e -o pid,ppid,pgid,cmd
  PID  PPID  PGID CMD
  31738 23247 31738 python3 ./pmbootstrap.py -t 15 install --no-fde
  31746 31738 31738 sudo env -i /bin/sh -c ... ;apk --no-progress add
  31747 31746 31738 /bin/sh -c ... ;apk --no-progress add
  31748 31747 31738 apk --no-progress add

The root process of the run command is PID 31746. We want to kill
the child processes too. Otherwise only running kill -9 31746 will leave
the processes 31747 and 31748 running.
2018-10-02 07:06:46 +00:00
Oliver Smith f68a7a6baa Link to wiki page if first git clone fails 2018-09-26 05:58:11 +00:00
Oliver Smith 3ce00de710 Move aports into own repository (pmaports) 2018-09-05 05:57:38 +00:00
Grant Miller 7eaf9de000 Implement bash tab completion 2018-08-27 21:35:05 +00:00
Oliver Smith 0d7802d7ef
s/system partition/rootfs: fix remaining mentions
Follow-up to !1373, where `pmbootstrap flasher flash_system` was
replaced with `pmbootstrap flasher flash_rootfs`. We still had used
terms like "system partition" in a lot of places.

This commit replaces it everywhere, so it's clear that we're talking
about the pmOS rootfs (which may or may not be installed to Android's
system partition).
2018-07-15 23:41:31 +02:00
Oliver Smith 4c8d4815af README.md: slightly adjust URLs [skip ci]
* add .git at the end of the clone URL
* add `osk-sdl` in file name
2018-07-08 23:20:13 +00:00
Simon Schmeisser cd90f35527 Update Package section of README.md as well 2018-07-08 22:32:38 +00:00
Simon Schmeisser a95ae90c84 Update README.md after move to gitlab
still missing replacement link for "pmbootstrap newapkbuild "https://github.com/postmarketOS/osk-sdl/archive/0.51.tar.gz" "
2018-07-08 22:22:59 +00:00
Oliver Smith 0854aa1dc4
Remove github.com references
* Travis and Coveralls badges
* aports: instead of <https://github.com/postmarketOS>, use
  <https://postmarketos.org>
* References to full URLs to issues and pull requests replaced with
  a hash and the number
* grsec check: simplify error message, remove link to github issue
  (nobody is using that anymore anyway)
2018-06-30 09:00:48 +02:00
steamport 30df0725ca menuconfig: add gconfig/xconfig support (#1509)
* change "pmbootstrap kconfig_check" to "pmbootstrap kconfig check"
* change "pmbootstrap menuconfig" to "pmbootstrap kconfig edit [-x|-g]"
  (with legacy alias, because the first syntax was referenced to a lot)
* enable X11 interfaces: -x: xconfig, -g: gconfig
* new function to copy the xauthority file:
  pmb.chroot.other.copy_xauthority()
* remove menufconfig() function from the kernel template and all kernel
  aports ([skip ci] because it would rebuild all kernels and run out of
  time). Alpine has dropped this as well, and it wouldn't work with the
  new code anyway.
2018-06-09 06:52:24 +00:00
Oliver Smith 6bb8444fef
"...flasher flash_rootfs" instead of "..._system" (#1373)
* Change `pmbootstrap flasher flash_system` command to
  `pmbootstrap flasher flash_rootfs`
* The old command still works, but all references have been changed to
  the new command
* Remove obsolete `pmbootstrap flasher export` (that was changed to
  `pmbootstrap export` a few months ago)
* Update `README.md` and ZSH auto completion
* Change the description of the generated rootfs image (not talking
  about a system image anymore, mention that it has subpartitions)
* Better description of `pmbootstrap flasher flash_rootfs --partition`
2018-03-30 01:11:20 +00:00
Oliver Smith 1251c3810e
README: Update with lots of usage examples [skip ci] (#1340)
Details:
* renamed "supported devices" to "devices"
* fix coverage button to URL suggested by coveralls.io
* link to postmarketOS.org
* lots of usage examples
* use `pmbootstrap` alias
* Persistent alias note, initfs extract, debugging
2018-03-20 22:00:14 +00:00
Sicelo 730d311e75 Update README.md (#1249)
x86 is also supported, not just x86_64
2018-02-22 22:50:39 +01:00
carlos killpack abff5c933c README.md: fix typo s/coretutils/coreutils/ (#1044) 2017-12-27 19:05:59 +00:00
Oliver Smith 3b93f4f90e
README.md: we need coreutils on Alpine
Reported by xj9 in #postmarketOS - the way we call `du` doesn't work with busybox' `du`.
2017-12-27 02:12:58 +00:00
Oliver Smith 93a122cd24
README.md: remove obsolete telnet unlocking text (#882) 2017-11-07 22:27:51 +00:00
Oliver Smith df47b50013 Close #761: Integrate coveralls.io to show test coverage (#820)
* Enable coveralls.io coverage reports
* Add badge to README.md
2017-10-24 19:34:08 +00:00
Oliver Smith 29e1567813 Add grsec notice to README.md (see #107) (#697) 2017-10-04 18:17:22 +00:00
PureTryOut c7a6ff0b34 Make sure to tell people WSL is not supported (#507) 2017-09-03 14:07:22 +00:00
Yuval Adam 471006b798 Update README links (#506) 2017-09-03 08:50:40 +00:00
James Heald 12951dc3cf Updated all outdated wiki links (#504) 2017-09-03 06:46:54 +00:00
Martijn Braam 176352ee65 Added memory requirements to README (#454)
Please note that in case of #444 one GB for a full Ubuntu (which eats up several hundreds MB of RAM alone) + compiling in pmbootstrap was not enough, and that it was "enough" with 2 GB. So the actual value may be much lower.
2017-08-24 17:33:22 +00:00
Yuval Adam 7088c2d2f1 README refactoring (#367) 2017-08-16 20:45:31 +00:00
Oliver Smith ed58ae3a79
Close #103: Document how to use chroot commands with parameters 2017-06-23 23:46:09 +02:00
Oliver Smith 51af907534
Slightly adjust README.md
* Change "GNU/Linux" into "Linux distribution", because the Alpine Linux developers don't see their distro as GNU/Linux
* Use "hello-world" as example package, as it does not make much sense right now to compile heimdall for armhf
2017-06-21 20:01:28 +02:00
Oliver Smith 8fcbaec305
Slightly re-arrange the links, add link to the security warning 2017-06-04 04:50:06 +02:00
Oliver Smith 95144642a8
README.md Link to the devices wiki page 2017-05-30 20:52:42 +02:00
Oliver Smith 1b9efba2e1
README.md: link CI badge 2017-05-28 03:04:45 +02:00
Oliver Smith fb683bc7a2
README.md: Add CI badge 2017-05-28 03:01:27 +02:00
Oliver Smith 1cce0155fd
README.md: Typo fix, openssl is required, not openssh.
You'll need openssh to connect to your device after it has booted,
but if your host system does not have openssh, you can simply use
openssh from the native Alpine Linux chroot:
  ./pmbootstrap.py chroot
  apk install openssh
2017-05-28 01:13:29 +02:00
Oliver Smith 779723249c
README.md: link to the new porting guide 2017-05-28 00:57:21 +02:00
Oliver Smith e557414563
Adjust pmbootstrap executable in README.md #2 2017-05-26 22:43:36 +02:00
Oliver Smith 04c931dc13
Adjust pmbootstrap executable in README.md 2017-05-26 22:40:30 +02:00
Oliver Smith 0d26306d73
Minor adjustments to README.md 2017-05-26 22:13:15 +02:00
Oliver Smith eba5222e47
add README.md 2017-05-26 22:09:50 +02:00