Commit Graph

53 Commits

Author SHA1 Message Date
mpl c5630a8906 osutil: selfpath for windows, and make it public.
Change-Id: Ic3e8de6e75651921cb29e3b5e91cdb9f5159896a
2014-08-18 22:30:01 +02:00
Brad Fitzpatrick c0a149ac3e Move GCE stuff out of camlistored into new package. Use from camtool.
Now camtool dumpconfig works on GCE too using the same mechanisms as camlistored.

Change-Id: I11c5311a6b7ace35fb0c6dd661ba9bdcad7820ed
2014-08-07 12:33:52 -07:00
Bill Thiede 15efa84eae pkg/osutil: add FreeBSD CPU usage.
Change-Id: Ic2cf8f8e422d2aef8c7c5e217da988d14735a416
2014-07-04 20:00:00 -07:00
Brad Fitzpatrick 26bdefc4b0 osutil: remove err error stutter, add osutil.ErrNotSupported
Change-Id: I483f30d3d4db39a9ffa0f83c1e055d7a59edba4b
2014-05-31 10:42:44 +09:00
Brian Gitonga Marete 53ab352fa7 pkg/schema, cmd/camget, cmd/camput: Support sockets.
This patch:

1. Introduces a JSON schema for unix domain sockets (socket files).
2. Adds support for the new schema to pkg/schema.
3. Adds support for uploading and restoring sockets to camput and
camget respectively.

Depends on CL 2706 (https://camlistore-review.googlesource.com/2706/)

Change-Id: Ib0d6e9f9ebd348f55efee5a08cd774f3969d0760
2014-05-21 18:51:14 +03:00
Brian Gitonga Marete e9dd1af195 cmd/camget, cmd/camput, pkg/schema: Support FIFOs.
This patch:

1. Introduces a JSON schema for FIFOs (named pipes).
2. Adds support for uploading and restoring FIFOs to camput and camget
respectively.

It includes tests for the basic schema support in pkg/schema and
integration tests for camput and camget.

This CL does not add FIFO support to the HTTP server and fs (cammount
support) code. Those will be addressed in a subsequent patch.

Change-Id: Iab926073c36e653d25e693a559178bea9bf19b9a
2014-05-21 14:52:23 +03:00
mpl cdc4ed5ae2 camput init: ring/key related fixes
1) Removed exec call to gpg, because it automatically looks in .gnupg/,
which we don't use anymore as a default.
2) Now taking into account global --secret-keyring flag.
This flag is now in osutil.
3) New or modified funcs in osutil
4) Made sure --gpgkey works too.
5) Cleaned up error messages and hints.

Context: http://camlistore.org/issue/364
         http://camlistore.org/issue/368

Change-Id: I2e51032ed0597da656db100d72f5588b37308e1a
2014-03-28 19:55:18 +01:00
Brad Fitzpatrick cd7e723088 osutil: fail if tests access host paths
Change-Id: I21e20698ebc6b1d3b3499299f6d3dd9ed3031baf
2014-02-23 10:59:56 -08:00
Brad Fitzpatrick 09266d5960 osutil: add CAMLI_VAR_DIR for CamliVarDir
Change-Id: Idcb0a32ccc49cf24e61bdb81a4fdb1a0f049595c
2014-02-23 10:18:15 -08:00
Brad Fitzpatrick 99a4ee0fd3 osutil: don't use host config during tests
Change-Id: I28171f0dc9c3c21c9693805781275c39ed517d25
2014-02-23 10:00:45 -08:00
Brad Fitzpatrick 8bbe100bbc osutil: fail if used during tests
Disabled by default for now. Will fix cases and set by default, to proactively
catch future testing mistakes.

Change-Id: If292ccd105e214ee888bcad98efb4e49f052e4fd
2014-02-23 09:45:23 -08:00
Brad Fitzpatrick ef1063828b osutil: add DirExists
Change-Id: I3c15cd0bedeffea6d62dffc8603e4e71e57e52af
2014-01-31 12:20:24 +01:00
Brad Fitzpatrick c97c0d48b3 osutil: add MemUsage func
Change-Id: I4a0cbde782077c5b34caefd9b6bdb99bc659c2c9
2014-01-26 21:56:16 -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
mpl 7c21c617b6 client: improved ignoredFiles
also changed osutil.HomeDir for windows so it looks like an abs path for
filepath.IsAbs

http://camlistore.org/issue/290

Change-Id: I1b32c1c13e7d23a421a6da2c0f9d6b8b07f48b8d
2014-01-05 20:53:46 -08:00
mpl 6e7eacea4a Merge "pkg/client: some cleanup, doc on the website" 2013-12-23 22:31:45 +00:00
mpl 1e8d46ee45 pkg/client: some cleanup, doc on the website
Changed some keys to be consistent with the server config, and removed
some others.

We're now using jsonconfig to get the keys and validate the config.

Removed some unused funcs/methods, moved some global vars as members of a client.

Also, having two possible defaults for the secret keyring
(.config/camlistore/identity-secring.gpg and .gnupg/secring.gpg)
was annoying and confusing imho, so I removed the latter.

http://camlistore.org/issue/259

Change-Id: Icf79fa8822b62b5d91843698861dd19cb553607a
2013-12-23 20:23:21 +01:00
mpl f9bfed9b57 camlistored: use osutil for default TLS cert/key
http://camlistore.org/issue/254

Change-Id: I9a0944497db64387058230c5245ed2718f36fde2
2013-12-10 15:13:50 +01:00
Brad Fitzpatrick e0e0c9fead osutil: add CPUUsage function
Change-Id: Iba56be21be27f8786d8d7ca847ed9f2b7c3c1390
2013-11-30 11:59:36 -08:00
Salman Aljammaz 408bed7d74 use XDG_CACHE_HOME for cache if set
Change-Id: Id06be1e98c7b550cbb92cedd21fd852c0e158857
2013-10-17 12:50:03 +01:00
mpl c556debcc5 osutil: take into account env var for default secret ring
http://camlistore.org/issue/227

Change-Id: I40eac298d7d5d74760be65d9e13d531b562830b9
2013-09-20 14:22:12 +02:00
mpl 353c19e551 osutil: doc on Username
Change-Id: Ic6deb921e9fb7cdce34e4e50143b321b6aedd697
2013-08-28 21:38:57 +02:00
mpl de3d73707a serverconfig: find username on windows too, to set dbname
http://camlistore.org/issue/215

Change-Id: I0599b8061d91c2f6a4ceaa00e54bd0b899540c97
2013-08-28 15:54:07 +02:00
Brad Fitzpatrick c55bf01f84 Move osutil.Lock to its own package
Now in a small repo at github.com/camlistore/lock and brought into our third_party.

Change-Id: I966ca6126dde8b7c2e03f0d9fab1e36abd66c2ef
2013-08-25 19:53:01 -05:00
Brad Fitzpatrick 6a8f653ef0 osutil: more details on Lock failure
Change-Id: I84764dc257a9a8bf8fddd55f9f22fa67a8c3bdfb
2013-08-25 12:56:04 -05:00
mpl 99aaf3b55e client: take into account "selfPubKeyDir" from config when signing
http://camlistore.org/issue/210

Change-Id: Id6d75393a90bdf3141acc10fddc2b3cedee64422
2013-08-23 21:31:03 +02:00
Brad Fitzpatrick d7898d4712 pkg/osutil: add Lock function and tests.
Prep for using cznic/kv in camput and as index.Storage.

Change-Id: If912f7cb6b33247217f7812ac2082414436c0bf5
2013-08-23 11:54:25 -05:00
Brad Fitzpatrick aa2ccf9732 osutil: implement CacheDir on Windows.
Change-Id: I3b41b2a68f0c4222cbfac2945b614964f362e29f
2013-08-04 14:21:36 -07:00
mpl 0a073f17e8 osutil: fix typo in build tag
Change-Id: I60536a17bb847d459818f6377a06111beb7c3548
2013-08-02 21:23:55 +02:00
Brad Fitzpatrick e8d0200a11 Merge "integration tests: kill camlistored when all tests are done" 2013-08-02 19:04:41 +00:00
mpl 5fa82a3abb integration tests: kill camlistored when all tests are done
-osutil: PollParent to monitor parent process.
-camlistored: option to kill itself if it has been orphaned.

Change-Id: I87193254d55847e46134439ecd1b04f71718d083
2013-08-02 15:42:49 +02:00
mpl 5b584500ba osutil: use MkdirAll to create cache dir
http://camlistore.org/issue/186

Change-Id: I3078261ed57d9e7cbf090c7e1fdb41a1c38b7741
2013-08-01 00:19:38 +02:00
Brad Fitzpatrick 9468e5ba70 More docs. Every package is documented now.
misc.CountingReader moves into readerutil.

pkg/atomics is folded into pkg/types.

pkg/test/testdep is folded into pkg/test, with better name/docs.

Old cruft from pkg/webserver is deleted.

Change-Id: I3f72d8b29804254ef944995fb085837c878f79f5
2013-07-07 21:12:30 -07:00
Brad Fitzpatrick d065aac5b7 Fix compilation on FreeBSD. Thanks to retzkek. Fixes Issue 168.
Change-Id: I554321932709c6961fc05533aa4255bd8127d323
2013-07-02 22:12:53 -07:00
mpl a221ebe413 osutil: change paths to be xdg compliant
http://camlistore.org/issue/152

Change-Id: Idfcf167158df1e12eaeb2ec802f14e0994e19d8b
2013-06-22 01:35:28 +02:00
mpl 0de2881a16 client: help (wrt to the gpg key) initialize the config
Change-Id: I983e4396abacbc4d8fc354863cffeece65dd5b90
2013-06-22 01:16:11 +02:00
Brad Fitzpatrick 78b4084f4c osutil: simplify GoPackagePath
Change-Id: If0af2e19c56d495ff46dc38a19b5148fa9f014fe
2013-06-17 17:12:22 -07:00
mpl 75507e65fa newui: Final move to get rid of the old ui!
1) Everything in ui/ except for js-notes.txt was removed.
2) mv newui/* ui/
3) modified pkg/server/ui.go to make it all work
4) modified Makefile to generate server/camlistored/ui/deps.js
5) regenerated all the zembeds
6) Some fixes to attempt to make it (re-)work on appengine:
  -removed the Go1.1 check
  -added pkg/osutil/restart_stub.go (for restarting a process)
7) The closure handler now redirects to the online files when
the closure library is not on disk, because we do not embed
the required closure js files.

Change-Id: Id1bcf007550cafb7188ba2674352e8f3bd07fb8c
2013-06-11 13:25:59 +02:00
Brad Fitzpatrick 8dc06bd49c App Engine: +build hide restart_unix.go
Otherwise won't deploy on App Engine.

Change-Id: I24df0e20c03eb5864e2a791671be88e039ca63b6
2013-03-14 19:43:25 -07:00
Brad Fitzpatrick f6861b71e2 android, osutil: the the child process its Android-specific cache directory
Change-Id: I1161afd4ab30eb02e0e5b41c3d73a0c94f59c200
2013-01-27 13:24:50 -08:00
Brad Fitzpatrick 6ca0efac8c camlistored: much better sqlite support, by default, and help/docs/hints 2013-01-10 16:16:10 -08:00
mpl cd32b0b5b9 move findGoPathPackage to osutil, and use it to define closureDir
Change-Id: I838a2e665591d13ecf3bb2689df1931d7e14465b
2012-12-13 12:31:56 +01:00
mpl 0824bc7f7c Pointer to minux codereview to do the restart on darwin
Change-Id: I077803b367b543f998d5d25026db2be477963bf8
2012-11-15 18:57:53 +01:00
mpl 62b5da6f99 find the path to the executable of the running instance
to restart camli properly

This change adds the functionality to find the path to
the currently running executable, so that camlistore
can be restarted without à priori knowledge of cwd.
It should work for linux, netBSD and freeBSD, and it
might work for openBSD.
The naive (os.Args[0]) approach is still used with
darwin.

Reference: https://codereview.appspot.com/6736069/

Change-Id: Icc9fc2b4e1b3542cfbe6c457c1fefbe762eff2f1
2012-11-14 16:10:50 +01:00
Andrew Gerrand 7874bef34e add bsds to osutil/restart_unix build rule
Change-Id: If5e7f811ad8c656bcfa48f26c12f7ea59ddef830
2012-08-05 10:55:36 +10:00
mpl 497fc21385 Added/changed copyright
Change-Id: I1de302b52903ebf61100ab061c1fa7f14495fde8
2012-05-27 01:37:54 +02:00
mpl b2f079f081 handle SIGHUP, restart camli from wizard
Change-Id: I9856e49b9c4d76dc3bed1827594451349d4f5810
2012-05-16 11:37:29 +02:00
Brad Fitzpatrick 8fafe38f37 osutil: create cache directory on first access
Change-Id: Ifc599a21ad984028bc7ad2df7bf6fd6099f25f24
2012-04-22 16:19:21 -07:00
Brad Fitzpatrick c7333e7f9b osutil: implement CacheDir on darwin
Change-Id: I73ef36039037f9469df5dc262b5b976cd33a1fd6
2012-04-18 07:44:08 -07:00
Brad Fitzpatrick 71ee67264d osutil: add IdentitySecretRing accessor
Change-Id: Idcb7a62530292eb3e0a98c798dc86a985fc491f1
2012-04-12 16:54:57 -07:00