summaryrefslogtreecommitdiffstats
path: root/README
blob: 396be4e7b89a6fd82ab05fd6bf97bccb814071ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Mock Readme
Mock is a simple chroot/rpm building program. It doesn't do anything
terribly fancy other than build a single srpm at a time in a chroot.

You invoke it as:
mock -r name-of-chroot /path/to/srpm

options:
  -r CHROOT             chroot name/config file name default: chroot.cfg
  --no-clean            do not clean chroot before building
  --arch=ARCH           target build arch
  --debug               Output copious debugging information
  --resultdir=RESULTDIR
                        path for resulting files to be put
  --statedir=STATEDIR   path for state file is written
  --uniqueext=UNIQUEEXT
                        Arbitrary, unique extension to append to buildroot
                        directory name

 commands:
  init  - initialize a chroot (install pkgs, setup devices, etc,) then exit
  clean - purge the chroot tree - normally this happens right before a build
          but this is for the tidy-minded
  rebuild <srpm> - for mach compatibility

mock does:
- builds the chroot
- takes the srpm, rebuilds into another srpm
   - it does this to make sure that the build deps in the spec file are
     made in the right environment.
- takes the build deps from the new srpm and installs them.
- rebuilds the new srpm into binary packages
- copies the binary packages into the result dir
- logs nicely so that chroot creation and build logs are separate
- outputs little unless it needs to.


TODO: document more
TODO: man page?