deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH core] Mock: Moved the default directory from /var/tmp to /var/lib (BZ: #750880)
Date Wed, 09 Nov 2011 12:02:27 GMT
Hi,

Yes, thanks you raised a valid point. I would rather prefer to add the
MOCK_STORAGE_ROOT into /etc/sysconfig/deltacloud-core to override the default
one instead of modifying config.ru just for the Mock driver.

So, NACK to my own patch :-)

  -- Michal

David Lutterkort wrote:
> 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