README: update scripts/build-packages help, some small changes

This commit is contained in:
Jernej Jakob 2019-12-21 16:11:30 +01:00
parent 9af4bee638
commit 972daf259a

View File

@ -203,20 +203,24 @@ directory to start compilation.
```bash ```bash
$ scripts/build-packages -h $ scripts/build-packages -h
usage: build-packages [-h] [-v] [-c] [-l] [-b BUILD [BUILD ...]] [-f] [-p] usage: build-packages [-h] [-c | -k | -f] [-v] [-l] [-b BUILD [BUILD ...]]
[-p] [--blacklist BLACKLIST [BLACKLIST ...]]
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-v, --verbose Increase logging verbosity for each occurance
-c, --clean Re-clone required Git repositories -c, --clean Re-clone required Git repositories
-k, --keep Keep modified Git repositories
-f, --fetch Fetch sources only, no build
-v, --verbose Increase logging verbosity for each occurance
-l, --list-packages List all packages to build -l, --list-packages List all packages to build
-b BUILD [BUILD ...], --build BUILD [BUILD ...] -b BUILD [BUILD ...], --build BUILD [BUILD ...]
Whitespace separated list of packages to build Whitespace separated list of packages to build
-f, --fetch Fetch sources only, no build
-p, --parallel Build on all CPUs -p, --parallel Build on all CPUs
--blacklist BLACKLIST [BLACKLIST ...]
Do not build/report packages when calling --list
``` ```
Git repositoriers are automatically fetched and build on demand. If you wan't to Git repositories are automatically fetched and build on demand. If you want to
work offline you can fetch all source code first with the `-f` option. work offline you can fetch all source code first with the `-f` option.
The easiest way to compile is with the above mentioned [Docker](docker/Dockerfile) The easiest way to compile is with the above mentioned [Docker](docker/Dockerfile)
@ -236,8 +240,7 @@ container and checkout all packages you want to compile.
### Building single package(s) ### Building single package(s)
The script above runs all package build inside the Docker container, this is also To build a single package use the same script as above but specify packages with `-b`:
possible to do by hand using:
Executed from the root of `vyos-build` Executed from the root of `vyos-build`
@ -262,6 +265,8 @@ First create a directory "packages" at the top level of the vyos-build repositor
and clone your package into it (creating a subdirectory with the package contents). and clone your package into it (creating a subdirectory with the package contents).
Then checkout the correct branch or commit you want to build before building the package. Then checkout the correct branch or commit you want to build before building the package.
Example using `git@github.com:myname/vyos-1x.git` repository to build vyos-1x:
```bash ```bash
$ mkdir packages $ mkdir packages
$ cd packages $ cd packages
@ -272,10 +277,10 @@ $ docker run --rm -it -v $(pwd):/vyos -w /vyos/packages/PACKAGENAME \
vyos-builder scripts/build-packages -b vyos-1x vyos-builder scripts/build-packages -b vyos-1x
``` ```
**NOTE:** you need to git pull manually after you commit to the remote and before rebuilding, **NOTE:** You need to git pull manually after you commit to the remote and before rebuilding,
the local repository won't be updated automatically. the local repository won't be updated automatically.
**WARNING:** any packages in the packages directory will be added to the iso during build, **WARNING:** Any packages in the packages directory will be added to the iso during build,
replacing the upstream ones. Make sure you delete them (both the source directories and built replacing the upstream ones. Make sure you delete them (both the source directories and built
deb packages) if you want to build an iso from purely upstream packages. deb packages) if you want to build an iso from purely upstream packages.