Hi,
Please take my answers with a grain of salt.
Brad will correct later when I'm wrong.
On Tue, Oct 16, 2012 at 6:40 AM, Bill Thiede <
couch...@gmail.com> wrote:
> Pardon me for putting this all in one email, I can fork off the topics if
> one gets noisy.
it's fine like that, we'll open separate issues in the tracker if need be.
> So I'm experimenting with camlistore trying to understand how it works, and
> apparently I have some magic power for breaking things. First thing I
> noticed is that dev-cammount is not setting some required environment
> variables. I added the following to make it work for me:
>
> +$ENV{"CAMLI_DEV_KEYBLOBS"} = "$Bin/config/dev-client-dir/keyblobs";
> +$ENV{"CAMLI_AUTH"} = "userpass:camlistore:pass3179";
> +$ENV{"CAMLI_KEYID"} = "26F5ABDA";
> +$ENV{"CAMLI_SECRET_RING"} = "$Bin/pkg/jsonsign/testdata/test-secring.gpg";
>
> I have no doubt this is simple bitrot, and wouldn't be surprised if the
> other dev-* helper scripts had similar omissions. Would a CL putting all the
> "$ENV{...} ="s into a common module and having all the dev-* scripts import
> it be welcome?
it works for me out of the box but it's probably because I have a
working client config file, so I don't need all the env vars. I had
stopped using the dev-* scripts since then.
What about dev-camput, is it working properly for you without any change?
> Secondly, I got cammount mounting, and for some reason the first thing I
> tried caused a panic. All I did was run dev-server in one terminal,
> dev-cammount in another and then ran the following:
>
> $ cat /tmp/cammount-dir/sha1-280c3ea4d9f9b31975211ae669630aa1b3ea30f0
>
> Which happens to be the permanode from "Publish root node for dev-pics-root"
> in the Web UI. I made this small change:
>
> --- a/pkg/schema/filereader.go
> +++ b/pkg/schema/filereader.go
> @@ -185,7 +185,7 @@ func NewFileReader(fetcher blobref.SeekFetcher,
> fileBlobRef *blobref.BlobRef) (*
>
> func (ss *Superset) NewFileReader(fetcher blobref.SeekFetcher)
> (*FileReader, error) {
> if ss.Type != "file" && ss.Type != "bytes" {
> - return nil, fmt.Errorf("schema/filereader: Superset not of
> type \"file\" or \"bytes\"")
> + return nil, fmt.Errorf("schema/filereader: Superset not of
> type \"file\" or \"bytes\": %q", ss.Type)
> }
> size := int64(ss.SumPartsSize())
> return &FileReader{
>
> And can see that ss.Type == "permanode", which explains the panic.
> nodeReader looks like this:
>
> type nodeReader struct {
> n *node
> ss *schema.Superset // not nil, always of type "file" or "bytes"
> }
>
> And I'm not sure if that comment is saying other code should be enforcing
> that guarantee, or if the original author expected it would never be set to
> anything else in this code?
Ok, I can reproduce that. I'll have a closer look, thanks.
> Third and lastly, the android app doesn't seem to work, it is looking for
> URLs that are not served by the dev-server configuration. Is there an
> example of a configuration that works with the android app? If only the
> URLs have been renamed, and the functionality still exists to support the
> android client, someone can point me to the CL for the new layout?
No idea about that, sorry.
> Bill
>
> PS If it's worth creating a HOWTO for getting all the various dev-* parts
> working together, to tour through the various functionalities that
> camlistore provides, I wouldn't mind taking a stab at it. But I don't want
> to put in too much effort if people think it should be self-evident, or it
> is assumed that people capable of contributing to camlistore at this stage
> would be able to infer 'how' from looking at the source.
I believe the names are explicit and simple enough that what the
commands generally do should be self-evident. Then running them (e.g
dev-camput) without argument should print the help for the command
behind the scenes (resp. camput) and that should be enough for the
user/dev to go on from there.
That said, it's all a work in progress, so some of those helps are
probably incomplete.