gc and encrypted metafiles
Brad Fitzpatrick
brad at danga.com
Mon May 18 13:39:55 UTC 2009
Committed & 1.09 released to CPAN.
It would've been nice to have a new test, though, that showed encrypted
metafiles decrypting properly.
On Sun, May 17, 2009 at 11:00 PM, Chris Anderson <cva at pobox.com> wrote:
> ping.
>
>
> On Mon, May 4, 2009 at 11:13 PM, Chris Anderson <cva at pobox.com> wrote:
>
>> I fixed the MANIFEST and the test failure. I also rewrote
>> Decrypt::decrypt_data from Stephane's original patch which was creating
>> unnecessary temp files when the data wasn't encrypted in the first place.
>> I have tested restore and gc using both encrypted and unencrypted S3
>> backups.
>>
>> cva
>>
>>
>> On Sat, May 2, 2009 at 8:36 PM, Brad Fitzpatrick <brad at danga.com> wrote:
>>
>>> Patch doesn't look that bad, but it doesn't even pass "make test" for
>>> me. And it's missing the two new files from its MANIFEST.
>>>
>>> Fix the tests and I'll look again:
>>>
>>> # Failed test 'did the restore'
>>> # at /home/bradfitz/proj/brackup/blib/lib/Brackup/Test.pm line 106.
>>> restore failed: Can't locate object method "decrypt_data" via package
>>> "Brackup::Restore" at
>>> /raid/bradfitz/proj/brackup/blib/lib/Brackup/Restore.pm line 205.
>>>
>>>
>>> On Tue, Apr 28, 2009 at 7:39 PM, Chris Anderson <cva at pobox.com> wrote:
>>>
>>>> done
>>>> http://codereview.appspot.com/52065/show
>>>>
>>>> this is stephane's patch with one typo corrected (and I commented out a
>>>> line which required you to hit enter after each metafile was decrypted).
>>>>
>>>> cva
>>>>
>>>> On Fri, Apr 24, 2009 at 3:04 PM, Brad Fitzpatrick <brad at danga.com>wrote:
>>>>
>>>>> Where's the patch? Could somebody upload it to codereview.appspot.com?
>>>>> I find it easiest to suck things down from there (it has raw download patch
>>>>> URLs), even if there are no comments on the code itself.
>>>>>
>>>>> On Fri, Apr 24, 2009 at 11:52 AM, Chris Anderson <cva at pobox.com>wrote:
>>>>>
>>>>>> I applied this patch last night and after making a couple small
>>>>>> changes it seems to work just fine (though I haven't tested all of the edge
>>>>>> cases).
>>>>>>
>>>>>> Can we get this committed?
>>>>>>
>>>>>> cva
>>>>>>
>>>>>>
>>>>>> On Mon, Apr 20, 2009 at 2:01 AM, Stéphane Alnet <
>>>>>> stephane at shimaore.net> wrote:
>>>>>>
>>>>>>> Chris,
>>>>>>>
>>>>>>> > I'm waking up this thread to see if there was ever a consensus as
>>>>>>> to whether
>>>>>>> > this was the preferred solution or people preferred the patch for
>>>>>>> doing gc
>>>>>>> > against local metafiles.
>>>>>>>
>>>>>>> The patch was designed to allow both, but I didn't want to mess up
>>>>>>> gc() so I didn't add an option for local metafiles.
>>>>>>>
>>>>>>> Essentially the two lines in Brackup::Target that read:
>>>>>>>
>>>>>>> my $decrypted_backup = new Brackup::DecryptedFile($tempfile);
>>>>>>> my $parser = Brackup::Metafile->open($decrypted_backup->name);
>>>>>>>
>>>>>>> would need to be rewritten:
>>>>>>>
>>>>>>> my $parser;
>>>>>>> if($use_local_metafile)
>>>>>>> {
>>>>>>> # Assumes local metafiles are unencrypted.
>>>>>>> $parser = Brackup::Metafile->open($local_metafile_name);
>>>>>>> }
>>>>>>> else
>>>>>>> {
>>>>>>> $self->get_backup($backup->filename, $tempfile);
>>>>>>> $decrypted_backup = new Brackup::DecryptedFile($tempfile);
>>>>>>> $parser = Brackup::Metafile->open($decrypted_backup->name);
>>>>>>> }
>>>>>>>
>>>>>>> But the outside loop in gc() needs to be rewritten, in order to
>>>>>>> account for local metafiles and provide $use_local_metafile flag and
>>>>>>> the $local_metafile_name above.
>>>>>>>
>>>>>>> > Either way, does anyone have a version of this
>>>>>>> > patch which will apply cleanly to 1.07 and, if so, is there any
>>>>>>> interest in
>>>>>>> > getting this committed?
>>>>>>>
>>>>>>> I just tested and it seems to apply cleanly to 1.07.
>>>>>>> Stéphane
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/brackup/attachments/20090518/a4cac4b1/attachment.htm
More information about the brackup
mailing list