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.
This commit is contained in:
Oliver Smith 2017-06-11 14:19:57 +02:00
commit 3a3dd8063f
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
10 changed files with 286 additions and 4 deletions

View file

@ -61,7 +61,9 @@ def arguments_initfs(subparser):
# ls, build, extract
ls = sub.add_parser("ls", help="list initramfs contents")
build = sub.add_parser("build", help="(re)build the initramfs")
extract = sub.add_parser("extract", help="extract the initramfs to a temporary folder")
extract = sub.add_parser(
"extract",
help="extract the initramfs to a temporary folder")
for action in [ls, build, extract]:
action.add_argument(
"--flavor",
@ -164,9 +166,15 @@ def arguments():
" specific architecture")
build.add_argument("--arch")
build.add_argument("--force", action="store_true")
build.add_argument("--buildinfo", action="store_true")
for action in [checksum, build, menuconfig, parse_apkbuild, aportgen]:
action.add_argument("package")
# Action: challenge
challenge = sub.add_parser("challenge",
help="rebuild a package and diff its contents")
challenge.add_argument("apk")
# Use defaults from the user's config file
args = parser.parse_args()
cfg = pmb.config.load(args)