Another Japan in the World

Jun Aruga's blog.

South of Spain

This time, Malaga -> Glranada -> Nerja -> Gibraltar and La Linea de la Concepcion -> Malaga


f:id:happybirthday:20190303055831j:plain f:id:happybirthday:20190303055850j:plain f:id:happybirthday:20190303055859j:plain




f:id:happybirthday:20190303060032j:plain f:id:happybirthday:20190303060048j:plain

Gibraltar and La Linea de la Concepcion

Gibraltar is UK. It's interesting! La Linea de la Concepcion is Spain. It's fun and tasty!

La Linea de la Concepcion



f:id:happybirthday:20190303060845j:plain f:id:happybirthday:20190303060535j:plain f:id:happybirthday:20190303060655j:plain

How to use host os directory from chroot (mock) environment.

On Fedora Project's work, a chroot environment is usually used to build and test. The environment is called "mock" environment.

As I often forget the way, I save it to this page.

There are 2 ways.

1. Using mount --bind

Use below command.

$ mount --bind <old_dir> <new_dir>

The /path/to/root/mnt directory is /mnt in the mock (chroot) environment.

Create a directory to mount a directory.

$ sudo mkdir /var/lib/mock/fedora-rawhide-x86_64/root/mnt/foo

Mounting the directory, it can be referred in the mock (chroot) environment.

$ cd /path/to/foo
$ sudo mount --bind . /var/lib/mock/fedora-rawhide-x86_64/mnt/foo

2. Using mock's mount plugin

2nd way is limited to the mock command. But it's easier way.

The document is here [1].

You can set it for example in $HOME/.config/mock.cfg. This directory is auto-mounted when doing login to the mock environment.

config_opts['plugin_conf']['bind_mount_enable'] = True
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/host_os/path/to/foo', '/mnt/foo' ))

That's all.