Commit Graph

1288 Commits

Author SHA1 Message Date
Oliver Smith 7c0c813610
pmbootstrap challenge: Fix location of the "package_split()" function 2017-06-11 15:14:26 +02:00
Oliver Smith 5f747bedcd
pmb.build.is_necessary(): Remove unused 'suffix' parameter 2017-06-11 14:45:00 +02:00
Oliver Smith 3a3dd8063f
Merge branch 'lazy-reproducible-builds'
We have "lazy reproducible builds" now. What I mean by that is, that
the resulting "apk" archive is not fully reproducible, but all binaries
inside it are. This is necessary to kick-off the binary repo, which is
in turn required to get the testsuite going on Travis. Read #64 for more
information.

Usage:
```
pmbootstrap build hello-world --buildinfo
pmbootstrap challenge /tmp/path/to/hello-world-1-r2.apk
```

The "--buildinfo" parameter generates a "buildinfo.json", which contains
the versions of all dependencies. It is not very optimizied, so this
is a performance bottleneck and takes 10 seconds (which is quite much
considering that the hello-world package builds in less than a second).
This can be improved in the future, and then the buildinfo parameter
may become the default.
2017-06-11 14:19:57 +02:00
Oliver Smith 6999e6ea47
Fix #40: allow sdcard install, when the sdcard is mounted as /dev/sd* 2017-06-10 00:29:48 +02:00
Oliver Smith afa42ce0a3
pmbootstrap initfs: Make wording in --help more consistent 2017-06-09 19:49:01 +02:00
Oliver Smith 18339d0a14
Close #69: add 'pmbootstrap initfs' and improve initfs workflow
* allows to build/extract/list initramfs, add/del hook
* rebuild the initfs whenever running install or trying to flash/boot it
* flasher flash/boot: automatically set up a minimal rootfs with kernel and initfs,
  if it does not exist yet
2017-06-09 19:22:25 +02:00
Oliver Smith 32ad868cdc
apk.installed(): Retuns all packages and versions now
pmb.chroot.apk.installed() used to return only the explicitly installed
packages. This is not good enough for the initfs check functions (and
especially for the "lazy reproducible builds", from which branch this
commit was cherry picked).

This commit introduces more noise for the logfile - if this becomes
a problem, raise your voice in the issues tracker and we'll do something
about it.

(This commit also changes minor code styling in other files, I did
not run autopep8 last time, because flake8 didn't complain...)
2017-06-09 18:01:39 +02:00
Oliver Smith e55347315d
pmbootstrap index: Automatically set up abuild 2017-06-08 18:19:17 +02:00
Oliver Smith 50195a6af2
pmbootstrap log: Add a -n/--lines parameter (like tail has)
...also increase the default line count to 30, so it's easier to
spot an error if you didn't have the log open when it happened.

This parameter also works for 'pmbootstrap log_distccd', for consistency.
2017-06-08 18:15:38 +02:00
Oliver Smith 9515782f8d
Fix 67: New '--add' parameter for 'pmbootstrap install' to add custom packages.
Example usage:

./pmbootstrap install --add='vim,gcc'
2017-06-08 18:10:00 +02:00
Oliver Smith 5016c196ba
Fix two typos in the config 2017-06-08 18:02:00 +02:00
Oliver Smith f1ab344f09
Fix #68: properly update the device chroot in the install step
* build all dependencies, that have a newer version
* upgrade all packages inside the chroot
2017-06-08 17:54:53 +02:00
Oliver Smith 31b276eeb9
WIP #64: make gcc-armhf lazy-reproducible, properly compare symlinks 2017-06-06 22:21:59 +02:00
Oliver Smith 36527e548e
Fix #61: Check whether device nodes exist, after they have been created.
As reported in #53, it appears that older versions of eCryptfs don't
really create the device nodes, although `mknod` does not fail on
the commandline. That's fixed now with this extra check.
2017-06-06 16:36:57 +02:00
Oliver Smith eac1b69f0e
Fix #44: Do not clean up /home/build after successful build
This adjusts the /etc/abuild.conf automatically during build init.
Zap your build chroots now, to benefit from this commit.
2017-06-06 16:26:44 +02:00
Oliver Smith 63ac1f5f6c
WIP #64: "lazy reproducible builds" 2017-06-05 03:58:45 +02:00
Pablo Castellano 42473c89d6 Changed sha512 to sha256 to avoid "file name too long" error (issue #51) 2017-06-04 17:00:02 +02:00
Oliver Smith 64521b1435
Make static code analysis go through again 2017-06-04 04:27:49 +02:00
Oliver Smith 9d4bc61545
Fix #47: Support /dev/sd* as sdcard device
* The check for valid sdcard paths has been removed (because it
  doesn't make sense for /dev/sd*, this might as well be a real
  harddrive)
* New check: abort if any partition of the sdcard is mounted
* Automatically detect if the partitions are called "p1", "p2" etc.
  or just "1", "2" etc. (/dev/sda1 vs. /dev/mmcblk0p1)
* pmb.helpers.mount.ismount(): check the source (new) and the target
  path in /proc/mounts
2017-06-04 02:57:37 +02:00
Oliver Smith 42a8990594
Fix #28: fall back to truncate, when fallocate does not work 2017-06-02 23:00:52 +02:00
Oliver Smith 1cc0704bc0
Revert "Process stdout and stderr from subprocesses separately"
This reverts commit 04aabd7d70.

I did not test this well enough, sorry! This introduced problems
such as interactive shell not working anymore (#40), cryptsetup partion
creating not working anymore etc.
2017-06-02 21:36:12 +02:00
Oliver Smith 9d8fd984a0
Revert "Log exit codes to log file"
This reverts commit 2a39d9c091.

I did not test this well enough, sorry! This introduced problems
such as interactive shell not working anymore (#40), cryptsetup partion
creating not working anymore etc.
2017-06-02 21:36:03 +02:00
Oliver Smith 1b6f1d86ef
Revert "Removed debugging code"
This reverts commit c15bf48f77.

I did not test this well enough, sorry! This introduced problems
such as interactive shell not working anymore (#40), cryptsetup partion
creating not working anymore etc.
2017-06-02 21:35:40 +02:00
Oliver Smith 7d6365b473
Revert "Fixed menuconfig with new async runner"
I did not test this well enough, sorry! This introduced problems
such as interactive shell not working anymore (#40), cryptsetup partion
creating not working anymore etc.

This reverts commit f39c1dae69.
2017-06-02 21:33:29 +02:00
Martijn Braam f39c1dae69 Fixed menuconfig with new async runner 2017-06-02 15:19:08 +02:00
Martijn Braam c15bf48f77 Removed debugging code 2017-06-01 19:15:49 +02:00
Martijn Braam 2a39d9c091 Log exit codes to log file 2017-06-01 14:07:08 +02:00
Martijn Braam 04aabd7d70 Process stdout and stderr from subprocesses separately 2017-06-01 14:00:18 +02:00
Oliver Smith 9e9c5907ec
Make it easier to find the output of failed commands in the log
...by adding a ^^^^^^^^... line right below the failed command's output.
2017-05-31 18:30:00 +02:00
Oliver Smith 8a40c245da
Fix #19: gcc-armhf didn't compile anymore 2017-05-31 18:18:45 +02:00
Oliver Smith 3b5d5d8086
Debian Jessie/Python 3.4 support for the most part (#6)
* automatically find the chroot binary on Debian, even if it is not
  in the user's PATH
* don't use subprocess.run anymore (remove related testcase, that explicitly
  checked for subprocess.run usage, and used recursive globbing, another
  post 3.4 Python feature, for the checks. A similar case can be added in the
  future, but right now it's more important to get Debian 3.4 working and all
  PRs are reviewed anyway.)
* pytest fixtures: don't use the newer "yield" feature, as this is only
  supported in a newer version of pytest, than provided on Debian Jessie

From manually testing, most stuff works in Debian Jessie. However, the
testsuite does not run through - creating an empty .tar.gz with Python
fails for some reason (this is done in test_apk_static.py).
2017-05-29 20:38:11 +02:00
Samuel Dionne-Riel 41177a25de Fixes workdir lowercasing.
The `cli.ask` command would forcibly lowercase the whole string. This
made the script unusable on a non-FHS-compliant system, like mine, where
the users's directories are under `/Users/`.
2017-05-28 14:27:48 -04:00
Oliver Smith 15a495b7e2
Fix #5: proper error message, when chroot binary is not in PATH 2017-05-28 17:49:45 +02:00
Oliver Smith 75641f5fc7
Set up static code analysis, fix style issues reported by flake8 2017-05-28 02:44:53 +02:00
Oliver Smith 247a79a1ba
Fix #1: copying user's abuild keys failed 2017-05-27 15:38:04 +02:00
Oliver Smith bf387f0ef8
Add missing "build" folder (was gitignored before) 2017-05-26 22:35:21 +02:00
Oliver Smith ed9fc7f8b2
Put postmarketOS aports inside pmbootstrap repo
Later, the aports folder will probably get split up in its own repository.
But right now this is simply convenient.
2017-05-26 22:26:25 +02:00
Oliver Smith ae950fb9f7
Hello, there! 2017-05-26 22:08:45 +02:00