EnglishFrenchSpanish

Ad


OnWorks favicon

mock - Online in the Cloud

Run mock in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command mock that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


mock - build SRPMs in a chroot

SYNTAX


mock [options] --rebuild SRPM [SRPM...]

mock [options] --buildsrpm {--spec spec --sources src | --scm-enable}

mock [options] --chroot <cmd>

mock [options] {--init|clean|shell}

mock [options] --installdeps {SRPM|RPM}

mock [options] --install PACKAGE

mock [options] --update

mock [options] --remove PACKAGE

mock [options] --orphanskill

mock [options] --copyin path [path...] destination

mock [options] --copyout path [path...] destination

mock [options] --scm-enable [--scm-option key=value ...]

DESCRIPTION


Mock is a simple program that will build source RPMs inside a chroot. It doesn't do
anything terribly fancy other than populate a chroot with the contents specified by a
configuration file, then build any input SRPM(s) in that chroot.

The content of a chroot is specified by the configuration specified with the -r option.
The default configuration file is /etc/mock/default.cfg, which is usually a symlink to one
of the installed configurations.

There is a site-wide configuration file, /etc/mock/site-defaults.cfg, which can be used to
specify site-wide options. The shipped version of this file has no active options, but
does have a list of all of the configuration options, examples of how to set them, and
their default values.

For backwards compatibility, old-style commands, ("rebuild", "init", "clean", etc.)
without leading '--' are still accepted, but are deprecated. See COMMANDS section, below,
for detailed listing of all commands.

To use mock, a user should become a member of the mock group by adding their username to
the mock line in /etc/group. This can be done with the following command:

sudo /usr/sbin/usermod -a -G mock $USER

Note that mock is not intended to be run directly as root.

COMMANDS


--clean
Purge the chroot tree.

--scrub=TYPE
Completely remove the specified chroot or cache dir or all of the chroot and cache.
TYPE is one of all, chroot, cache, root-cache, c-cache, or yum-cache.

--init Initialize a chroot (clean, install chroot packages, etc.)

--rebuild
If no command is specified, rebuild is assumed. Rebuilds the specified SRPM(s). The
buildroot is cleaned first, unless --no-clean is specified.

--buildsrpm
Builds the specified SRPM either from a spec file and source file/directory or from
SCM. The buildroot is cleaned first, unless --no-clean is specified.

--shell
Run the specified command interactively within the chroot (which must already be
initialized -- no 'clean' is performed). If no command specified, /bin/sh is run.

--chroot
Run the specified command non-interactively within the chroot (which must already
be initialized -- no 'clean' is performed). Command output will be sent to the log
files.

--installdeps
Find out deps for SRPM or RPM, and do a yum install to put them in the buildroot.
Buildroot must already be initialized -- no 'clean' is performed

--install
Do a yum install PACKAGE inside the buildroot. Buildroot must already be
initialized -- no 'clean' is performed

--update
Do a yum update inside the buildroot. Buildroot must already be initialized -- no
'clean' is performed

--remove
Do a yum remove PACKAGE inside the buildroot. Buildroot must already be initialized
-- no 'clean' is performed

--orphanskill
No-op mode that simply checks that no stray processes are running in the chroot.
Kills any processes that it finds using specified root.

--copyin
Copies the source paths (files or directory trees) into the chroot at the specified
destination path.

--copyout
Copies the source paths (files or directory trees) from the chroot to the specified
destination path.

--scm-enable
Enable building from an SCM (CVS/Git/SVN). The SCM repository must be configured in
site-defaults.cfg before SCM checkouts are possible. SCM package and branch can be
defined with --scm-option arguments, see site-defaults.cfg for more information.

OPTIONS


-r CHROOT, --root=CHROOT
Uses specified chroot configuration as defined in /etc/mock/<chroot>.cfg. If none
specified, uses the chroot linked to by /etc/mock/default.cfg

--offline
Run in 'offline' mode where we tell 'yum' to run completely from local cache. Also
disables cache expiry for the mock yum cache.

--no-clean
Do not clean chroot before building package.

--cleanup-after
Clean chroot after building. Use with --resultdir. Only active for '--rebuild'.

--no-cleanup-after
Don't clean chroot after building. If automatic cleanup is enabled, use this to
disable.

--cache-alterations
Rebuild the root cache after making alterations to the chroot (i.e. --install).
Only useful when using tmpfs plugin.

--target=ARCH
This argument is passed to rpmbuild to specify the target arch to build. It
defaults to whatever is specified for --arch, or whatever is specified in the
config file as config_opts['target_arch'].

--arch=ARCH
Calls the linux personality() syscall to tell the kernel to emulate a secondary
architecture. For example, building i386 packages on an x86_64 buildhost.

-D "MACRO EXPR", --define="MACRO EXPR"
Specify macro definitions used for the build. This option may be used multiple
times, just as the rpmbuild --define option can be. For example:

--define "with_extra_cheese 1" --define="packager Monkey"

--with=OPTION
Enable configure OPTION for build. This option may be used multiple times. For
example:

--with=extra_cheese

--without=OPTION
Disable configure OPTION for build. This option may be used multiple times. For
example:

--without=anchovies

--resultdir=RESULTDIR
Change directory where resulting files (RPMs and build logs) are written. Resultdir
can contain python-string substitutions for any variable in the chroot config. For
example:

--resultdir=./my/"%(dist)s"/"%(target_arch)s"/

--uniqueext=text
Arbitrary, unique extension to append to buildroot directory name

--configdir=CONFIGDIR
Change directory where config files are found

--rpmbuild_timeout=SECONDS
Fail build if rpmbuild takes longer than 'timeout' seconds

--unpriv
Drop privileges before running command when using --chroot

--cwd=DIR
Change to the specified directory (relative to the chroot) before running command
when using --chroot

-q, --quiet
Be quiet.

-v, --verbose
Output verbose progress information.

--trace
Enables verbose tracing of function enter/exit with function arguments and return
codes. Useful for debugging mock itself.

--enable-plugin=PLUGIN
Enable the specified plugin. This option may be used multiple times.

--disable-plugin=PLUGIN
Disable the specified plugin. This option may be used multiple times.

--plugin-option PLUGIN:KEY=VALUE
Set plugin specific parameter. This option may be used multiple times.

-h, --help
Show usage information and exit.

--version
Show version number and exit.

Use mock online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    rEFInd
    rEFInd
    rEFInd is a fork of the rEFIt boot
    manager. Like rEFIt, rEFInd can
    auto-detect your installed EFI boot
    loaders and it presents a pretty GUI
    menu of boot option...
    Download rEFInd
  • 2
    ExpressLuke GSI
    ExpressLuke GSI
    This SourceForge download page was to
    grant users to download my source built
    GSIs, based upon phhusson's great
    work. I build both Android Pie and
    Android 1...
    Download ExpressLuke GSI
  • 3
    Music Caster
    Music Caster
    Music Caster is a tray music player
    that lets you cast your local music to a
    Google Cast device. On the first run,
    you will need to click the arrow in your
    tas...
    Download Music Caster
  • 4
    PyQt
    PyQt
    PyQt is the Python bindings for
    Digia's Qt cross-platform
    application development framework. It
    supports Python v2 and v3 and Qt v4 and
    Qt v5. PyQt is avail...
    Download PyQt
  • 5
    Sardi
    Sardi
    Sardi is a complete restyling and
    optimisation of svg code. 6 choices for
    your applications and 10 kind of folders
    to use in your file manager. The sardi
    icons...
    Download Sardi
  • 6
    LMMS Digital Audio Workstation
    LMMS Digital Audio Workstation
    LMMS is a free cross-platform software
    which allows you to produce music with
    your computer. If you like this project
    consider getting involved in the project
    h...
    Download LMMS Digital Audio Workstation
  • More »

Linux commands

Ad