deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH core] Mock: Moved the default directory from /var/tmp to /var/lib (BZ: #750880)
Date Mon, 07 Nov 2011 20:13:28 GMT
On Mon, 2011-11-07 at 12:17 +0100, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mfojtik@redhat.com>
> 
> 
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> ---
>  server/Rakefile                                   |   13 +++++++++----
>  server/lib/deltacloud/drivers/mock/mock_driver.rb |    2 +-
>  2 files changed, 10 insertions(+), 5 deletions(-)

Be careful with this kind of change: for gem installs, this will blow
up, because /var/lib/deltacloud will not exist, and your average user
will not be able to create the dir. (This headache is the reason why I
went with /var/tmp initially)

The cleanest way to do this is to set the root for the mock storage
driver in config.ru via something like
        $mock_storage_root = File::join("/var/tmp/deltacloud", "mock-#{ENV["USER"]}")
and then patch that in the spec file to
        $mock_storage_root = "/var/lib/deltacloud/mock"

The RPM spec then also needs to create and own /var/lib/deltacloud

David



Mime
View raw message