Commit Graph

28 Commits

Author SHA1 Message Date
Michael Hoffmann ad7454c304 misc: add race flag to devcam and fix fallout 2023-01-13 07:48:33 -08:00
Tamás Gulácsi c986ee3c62
Use modernc.org/sqlite (#1581)
* Use modernc.org/sqlite

This way it can be enabled by default, as it is a cgo-free, Go-only package.
No need for build tags, conditional compilation (whether libsqlite3-dev is installed).

* make.go: Remove unused -sqlite flag

* Remove use of -sqlite flag
2021-12-27 12:18:08 -08:00
mpl ca7f2e57e3 dev/devcam: use libsqlite3 tag when -sqlite=true
In 5894af5196 we chose not to vendor
sqlite3-binding.c and sqlite3-binding.h in, because we rely on the
system's libsqlite3 instead. But we never told devcam test to use the
corresponding necessary "libsqlite3" tag, which is now done in this CL.

Also, comment properly about it in .gitignore.

And make Travis CI use the devcam installed in $GOPATH/bin, instead of
specifically building one in tree.

Change-Id: I4b7bb1305669037f84063c7cf6c7f356c99f3edc
2018-09-14 22:16:23 +02:00
mpl f95bd2a593 devcam test: add internal and app/publisher to the list of tests
Fixes #1138

Change-Id: I71f46da09fb9d14c7a3648d6da901ac712466f72
2018-05-15 19:36:14 +02:00
Brad Fitzpatrick b1abccd287 devcam, localhost, storagetest: fixes for Windows
Unset CGO_ENABLED if no sign of gcc.

The localdisk renaming stuff was fixed in Go ages ago in
golang/go#13673 and https://golang.org/cl/6140

And a defer in storagetest meant Windows couldn't delete files
because a file was still open.

Change-Id: I57aef85f24653b19ce10e3d1e18c778cee2d48f6
2018-05-01 10:46:19 -07:00
mpl b75523bbea dev/devcam: fix website go code location
also do not set GOBIN when building self

Change-Id: Ibea2ab4fcc7b60ef28dfcb6620a44b29541eedef
2018-04-25 12:19:10 -07:00
mpl 7a27eb42eb cmd: rename camget to pk-get, and make it a mode of pk
A couple of related fixes and renames too.

Updates #981
Fixes #1056

Change-Id: Id47a933c77422edfb9db41d34c38ed9d0d7a1846
2018-04-22 20:50:54 -07:00
Brad Fitzpatrick ca76a40bbc Rename camlistored to perkeepd.
Updates #981

Change-Id: I8fe43c240c149074c23128a89ab426af9cbf94b4
2018-04-21 11:06:09 -07:00
mpl ce4658abfc cmd: rename camput to pk-put, and make "pk put" call it
A new "put" mode is added to the pk command, so that the "pk put"
command can be used to create and upload blobs.

What this command does is actually just call the previously named
"camput" executable, which is renamed to "pk-put" in this change.

This involves adding a new way to register a mode in cmdmain, when such
a mode is just meant to call an external binary. To emphasize the
distinction, the existing func (to register a sub-command, or a mode) is
renamed from RegisterCommand to RegisterMode, and RegisterCommand is now
the name of the new func/way.

Updates #981
Updates #1056

Change-Id: Ief954c17aa88a376f551df7de4b4e9fe41ad96d1
2018-04-21 10:26:55 -07:00
mpl f8ef262ff9 make.go: clean up, notably remove the tmp source code mirroring
Fixes #1004

Change-Id: Iea01cfc601b8dd8f2a81fe5da40cdd272b164bb1
2018-04-17 19:39:46 +02:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
Part of the project renaming, issue #981.

After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.

This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.

Also, this only moves the lru package to internal. More will move to
internal later.

Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.

This updates some docs, but not all.

devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).

Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
2018-01-01 16:03:34 -08:00
Paul Lindner f28eb3cce8 Remove appengine server and the old python blobserver
Change-Id: I734f4621f77ce902050e9b37805e7f8912f75e97
2017-11-30 19:13:37 -08:00
mpl 93a7f46720 make.go: remove --use_gopath
Because it makes full integration with gopherjs impossible (without
polluting the user's GOPATH), as long as
https://github.com/gopherjs/gopherjs/issues/415 is not fixed.

Also it is kind of antithetical with the point of make.go anyway.

We still rely on CAMLI_MAKE_USEGOPATH for the integration tests that run
make.go to know that they shouldn't recursively create another temp
GOPATH (when they're already in such a temp dir, because they're started
through devcam test).

Change-Id: Icc6af46ec5976fdf08e9b8bf4249e307a15499cf
2016-05-09 17:22:39 +02:00
mpl cf08d789f2 website: sidestep failInTests panics from osutil
Because camweb now depends on pkg/deploy/gce, which has global vars
initialized with calls from osutil.

And test website from devcam test

Change-Id: I233c229e96ded5bfde4e2c1fa7a18bbf757ab1fb
2015-12-07 22:48:12 +01:00
mpl 3e37ca9120 devcam test: build things in ./misc/docker too
Fixes issue #651

Change-Id: I10e4b73946dea073399bdb21888202f85a33c1b7
2015-12-03 16:49:11 +01:00
mpl 8127040762 pkg/client: use Transport.DialTLS
We can now use DialTLS when we need a custom TLS setup, i.e. with
android, or when using self-signed certificates, or when totally
skipping certificates verification.

This allows us to get rid of the scheme rewriting hack, which simplifies
things, in particular because we have less tricky URL/host parsing to
do.

For the sake of tests and not affecting "real" code, I introduced the
fake_android build tag, so the tests can use custom functions to
simulate testing whether we're on android.

Fixes #566

Change-Id: I72ac2bb69ad2365e98dd6ca2e7016ce9c2d7c57e
2015-09-26 00:09:26 +02:00
mpl 974ed85e2e devcam test: run devcam hook pre-commit
Instead of the old ./misc/pre-commit.githook
Also fix devcam hook pre-commit so we don't show the override message in
that case.

Change-Id: I390016765056b9c4d3331d12bef8f2581e5621df
2015-09-22 15:57:36 +02:00
mpl 4f0e6079bf devcam: fix self-building wrt new vendoring
Change-Id: I26c8a49bb2fe7e03dea08a653ae6533e7ef05d17
2015-08-16 15:50:33 +02:00
mpl db9a833d02 devcam test: missing filepath.FromSlash
Change-Id: Icc3461d5435702414b1fe716ef81c18a8e3c2c34
2014-10-27 22:52:27 +01:00
Bill Thiede af19bf089c devcam: run git pre-commit hook as a test.
Additional check to prevent b bad imports and un-go-fmt'd code
from sneaking in.
If users don't run tests, it will break the builder.

Change-Id: I95c74724aac68d915aa5195b6d8fcb78f92349e0
2014-10-02 09:32:23 -07:00
mpl d953dee008 devcam test: do not "recurse" temp GOPATH, docs, couple more options.
Problem: make.go creates an isolated temp gopath ./tmp/build-gopath. The
integration tests make use of that gopath (by running make.go) to build
the tools, and run the test world in it. Similarly, devcam test uses
make.go to setup that temp gopath, and runs the tests from the source
files in that gopath. Consequently, when the integration tests are run
through devcam test, even though they're run from the temp gopath, they
would use the make.go in it, which would create a nested temp gopath
(CAMLIROOT/tmp/build-gopath/src/camlistore.org/tmp/build-gopath) in
which to run the tests.

This patch addresses this issue by creating a new flag (-envGoPath), and
the corresponding env var (CAMLI_MAKE_USEGOPATH), which tells make.go
not to create a new temporary gopath (and hence not to mirror any
files), and to rely on the already set GOPATH env var instead.

Also refactored make.go a bit, and added a couple options and doc to
devcam test.

Change-Id: Ia8a5d7a31e6e317f05218d9e18fb886001cd19cb
2014-08-08 22:02:57 +02:00
Brad Fitzpatrick 99bc9f7664 devcam: let test command take arguments, to run subset of tests 2014-01-23 13:57:13 -08:00
Brad Fitzpatrick a384ff188d Get rid of CAMLI_DEV_KEYBLOBS / keyblobs / etc.
Fixes camlistore.org/issue/277

Change-Id: I7f380f9d18785f600fa0c442d5a19cd118782788
2014-01-20 13:47:08 -08:00
Aaron Boodman dc562622a7 Enable -secretring and -keyid for devcam server. Also fix bug in devcam server -wipe.
Change-Id: Ic615935c6ea9aa150a23aee0a18361b498574d76
2013-12-28 14:35:16 -08:00
Salman Aljammaz bfd1a65724 devcam: fix up package doc strings
Change-Id: I5f1b85e872a2d66d3c68babd2a2b53b76fb23dc3
2013-10-22 16:36:57 +01:00
Brad Fitzpatrick 0d854e106c devcam: don't use current environment as scratchpad for future process's environment
Remove calls to os.Setenv.

Change-Id: I9a0c611eb534b278459ddf724b8e7d181f2395ef
2013-09-22 20:13:28 +01:00
mpl 0c1dc0d6e4 devcam test: generate keyblob with devcam put init
The integration tests run by devcam test require a
GPG keyblob in the default location (for camput), and
we do not track in git such a keyblob.
This change allows devcam test to create the keyblob
with devcam put init before running the tests.

Also, devcam server is now using CAMLI_KEYID instead
of hardcoding the key id in the dev server config file.

Change-Id: I030b88c9a9321016fedb62424e0e707621206922
2013-09-20 20:03:21 +02:00
mpl ba8f88c21a devcam test, replaces make presubmit
http://camlistore.org/issue/223

Change-Id: Iaaea9926a98d7d3335fd6ee52daa225e51ec4703
2013-09-19 17:00:59 +02:00