Commit Graph

154 Commits

Author SHA1 Message Date
Paul Lindner ecfd0851f5 vendor: disable non-go pruning for github.com/gopherjs/jsbuiltin
jsbuiltin.inc.js is required for proper operation

Change-Id: I9443dcf58d8e02d07068cdbded6bd74933805fd5
2018-02-12 16:13:08 -08:00
Mathieu Lonjaret d212707a6f Merge "vendor: readd github.com/gopherjs/jsbuiltin/jsbuiltin.inc.js" 2018-02-12 19:34:20 +00:00
mpl edbddab985 vendor: readd github.com/gopherjs/jsbuiltin/jsbuiltin.inc.js
It is being automatically removed by dep ensure since
3dfd895def but its removal breaks the web
UI.

This change alone is therefore probably not enough, we need to teach dep not
to remove it.

Change-Id: I61d50e703e786fdebc10446784dc84d43a0c1620
2018-02-12 20:11:49 +01:00
Paul Lindner 5894af5196 vendor: upgrade to a versioned dep of sqlite
Use the now renamed libsqlite3 build pragma. This requires
having sqlite3 installed on the system instead of using the
c code bundled in vendor (which is removed by the dep tool
by default)

1.6.0 corresponds with rev
github.com/mattn/go-sqlite3@6c771bb9887719704b210e87e934f08be014bdb1

Changelog: See https://github.com/mattn/go-sqlite3/releases

Change-Id: I48fc0bc005715b83805837f544e7fa7875e6d56a
2018-02-12 09:42:29 -08:00
Paul Lindner 3dfd895def vendor: update to dep v0.4.0 which allows for auto pruning, more legal files and no tests
Change-Id: I434887599e29664cb45440df3648207ae978c932
2018-02-06 06:56:32 -08:00
Paul Lindner fecf799c00 vendor: revert Camlistore->Perkeep change made in vendor
Change-Id: Ieeb91cb4fab9287fac19f0ce728c0773dfe1985e
2018-01-30 14:13:48 -08:00
Paul Lindner 459c75410e all: more renaming of Camlistore to Perkeep
Change-Id: I118e3cbcf20d80afeffc84f001388c4556f21628
2018-01-30 03:02:56 -08:00
mpl e9e9da4bf8 server/camlistored: use Let's Encrypt http-01 challenge
As the priority is to fix GCE instances, the port for the http-01
challenge is not configurable for now (80) even not on GCE, but it will
be in a follow-up change.

update golang.org/x/crypto/* (for acme) to rev
13931e22f9e72ea58bb73048bc752b48c6d4d4ac
update golang.org/x/sys/* to rev
fff93fa7cd278d84afc205751523809c464168ab (because unix is a dep of
crypto)

remove warning about Let's Encrypt security issue from pkg/deploy/gce

I had to manually exclude vendor/golang.org/x/crypto/acme/jws_test.go
for now because it contains a private key, and git whines about it, and
i could not override it.

Fixes #1033

Change-Id: Ie4f2049e97892dee9ab513300a5f12e64976aec8
2018-01-16 23:43:13 +01:00
mpl da9020ec71 cmd/camput: compact LevelDB on HaveCache setup
This CL is about levelDB as the HaveCache for camput, and there are
several aspects to it. To describe it, I'll take the particular example
where you want to add many permanodes (~33k) to a given set, with
camput. Something like:

for _, blob := range blobs {
	do("camput attr -add sha1-foobar camliMember " + blob)
}

In a "normal" levelDB use case, everytime the number of level-0 .ldb
files goes over 4 (by default), a background compaction task is
started to transform these SST into level-1 ones, and remove the level-0
ones.
However, since our particular camput call is very short lived
(especially on a local Perkeep), not only might there be not enough time
for the compaction to be triggered, but even if it is, when the DB is
flushed (on a Close call), any ongoing compactions are cancelled. This
makes level-0 compactions very unlikely to happen on short-lived camput
calls. As a result, the number of level-0 files keeps growing until
levelDB fails while trying to open them all, because it hits the current
process ulimit.

Now, in this CL, what we propose is to systematically force a compaction
as soon as the HaveCache is opened. It is not scheduled concurrently, so
we are sure that the compaction happens before the DB actually gets used
by camput. This seems to make sure that the number of level-0 tables
never grows too much. With this change, I was able to run the above
example on 33K blobs without hitting the ulimit error.

However, it should be noted that potential problems might remain. The
compaction for levels above 0 is triggered based only on the total size
of the level (e.g. at 100MB by default for level-1), and not on the
number of files. Since we're creating many tiny tables (basically 1
entry per table), the number of files grows very fast while the total
size does not, and the compaction does not get triggered, even if forced
with CompactRange. This does not seem to be a problem for our use case,
as levelDB does not seem to need to open many of the level-1 files at
the same time, so we're not hitting the ulimit problem because of that.

If needed, there's at least one way this problem (if it is one?) could
be fixed: make the compaction trigger on other conditions, such as
number of files per level. I've experimented with it (forcing the
level-1 compaction to trigger at the 100 files limit), and it seems to
be working. But I had to do change the goleveldb code itself, and I
don't think levelDB implementations are supposed to do that.

For information, at the end of the run on the 33K blobs:
$ du -sch *.ldb
...
83M	total
$ ll | wc -l
20988

And indeed, when asking for leveldb.stats on the table:
 Level |   Tables   |    Size(MB)   |
-------+------------+---------------+
   0   |          1 |       0.00015 |
   1   |      20981 |       3.47307 |

Also, update github.com/syndtr/goleveldb to
34011bf325bce385408353a30b101fe5e923eb6e
And remove github.com/syndtr/gosnappy as goleveldb does not use it
anymore.

Also apply this change to StatCache.

Fixes #1008

Change-Id: If9f790a003e67f3c075881470e52e5f2174afa73
2018-01-16 00:46:11 +01:00
Paul Lindner 45aed2db49 vendor: upgrade github/russross/blackfriday to v2
This upgrades the markdown conversion library to v2 and
switches camweb to use the new, simplified API.

Change-Id: I710110431fdfa32104c591abdf9b01c74a214f48
2018-01-12 18:11:02 -08:00
Paul Lindner d35f919539 vendor/github.com/go-sql-driver/mysql: upgrade to v1.3.0
Upgrades mysql driver to a versioned release, fixes a minor issue
in dbinit that caused SHOW DATABASES queries to fail and improves
error messages to help diagnose such problems.

Changelog: vendor/github.com/go-sql-driver/mysql/CHANGELOG.md
Revision: go-sql-driver/mysql@a0583e0143

Change-Id: I4f5fdee60b30eca85564c452f72774e9c15828f3
2018-01-12 10:02:14 -08:00
Paul Lindner 837fe8ac46 vendor: Update github.com/gorilla/websocket to v1.2.0
Maps to rev: gorilla/websocket@ea4d1f681b

Also adjust the search websocket code to use the new API
which does proper origin checks.

Changelog: https://github.com/gorilla/websocket/releases/tag/v1.2.0

Change-Id: Ie25490b6319a98345aa6272e9eabc35c298bc06d
2018-01-11 10:42:39 -08:00
Paul Lindner 020c6923ce vendor: fully switch to using the dep vendor tree management tool
Gopkg.toml / Gopkg.lock contain the full set of revisions used by
Perkeep now.  You can remove your entire vendor tree and

  dep ensure && dep prune

will restore you to a known good state.

This final change contains various files that were missing (like
LICENSE/README.md/tests) and also prunes a number of packages that
are transitively unused.

Fixes #889

Change-Id: I6ee6c4a4e14e2de6b6f33620eb7e2c44e97ce91b
2018-01-09 18:27:36 -08:00
Paul Lindner cb160bbb1a Merge "vendor: sync gopherjs and remove local modifications that remove fsnotify" 2018-01-09 23:24:14 +00:00
Paul Lindner 4c64eb1767 Merge "vendor: update google go related packages to consistent revisions" 2018-01-09 23:14:18 +00:00
Paul Lindner 463832ed76 clients/web/embed: Move vendor/embed to clients/web/embed and adjust paths
Addresses #889
Fixes #1024

Change-Id: I9fa1dc246b0a3a1a4e4ec7abab0a7828fdfdb41e
2018-01-09 22:33:03 +00:00
Paul Lindner 5e2b7a582e vendor: update contributing docs to mention the upcoming use of the dep tool
also remove vendor/README as the entire directory will be dep managed shortly.

Addresses #889

Change-Id: I08aa9178ed03bfa0c2bfd80e79a10bdba2d4ef85
2018-01-09 14:24:46 -08:00
Paul Lindner 5b0c2db6d7 vendor: sync gopherjs and remove local modifications that remove fsnotify
Sync following revisions:
- github.com/fsnotify/fsnotify@629574ca2a5df945712d3079857300b5e4da0236
- github.com/gopherjs/gopherjs@b40cd48c38f9a18eb3db20d163bad78de12cf0b7
- github.com/neelance/astrewrite@99348263ae862cc230986ce88deaddbf7edcc034

Addresses: #889

Change-Id: I638f96e8d2c5b4557039985ff9b891daecb4dc69
2018-01-08 11:52:25 -08:00
Paul Lindner cb571228af vendor: update google go related packages to consistent revisions
Uses revisions as close to current usage as possible.

Addresses issues with repos that have different per-directory
revisions.

- cloud.google.com/go
  rev: b70ccc799b9d019708c3eb9395acef6e3f6b7bc8
- github.com/golang/protobuf
  rev: 1e59b77b52bf8e4b449a57e6f79f21226d571845
- google.golang.org/api
  rev: 48e49d1645e228d1c50c3d54fb476b2224477303
- google.golang.org/appengine
  rev: 150dc57a1b433e64154302bdc40b6bb8aefa313a
  version: v1.0.0
- google.golang.org/genproto
  rev: 08f135d1a31b6ba454287638a3ce23a55adace6f

Addresses #889

Change-Id: I41610d2f409d7a558a59e3018094a124efc100c5
2018-01-08 10:00:54 -08:00
Paul Lindner 683d81f2df vendor: prune vendor directories that will be removed by dep
- bazil.org/fuse
- github.com/cznic/mathutil/mersenne
- github.com/golang/glog
- myitcv.io/gogenerate/_scripts
- google.golang.org/grpc/Documentation
- myitcv.io/react/testutils
- github.com/cznic/fileutil/{falloc,hdb,storage}

Addresses #889

Change-Id: Icde028ba4d433a7311132c1c86837e6cb4217fc3
2018-01-08 01:13:03 +00:00
Paul Lindner 7ed0b7ec5c vendor/github.com/rwcarlsen/goexif: update and remove local modifications
Remove goexif local changes (a TODO, README and gofmt)
Update to rev: 709fab3d192d7c62f86043caff1e7e3fb0f42bd8
Use dep to prune unused files

Change-Id: Icce8885917b798b25eaeed4c98ff393ce0db66b8
2018-01-03 23:27:13 -08:00
Paul Lindner d5b55e51a8 Merge "all: update mongo to latest version" 2018-01-03 21:04:12 +00:00
Brad Fitzpatrick 15012bc37a Merge "vendor/github.com/mattn/go-sqlite3: remove local customizations for sqlite3" 2018-01-03 20:14:21 +00:00
Paul Lindner 364e125929 vendor/github.com/mattn/go-sqlite3: remove local customizations for sqlite3
This pulls in a clean upstream version of go-sqlite3 at revision
919cf4144a09abfd877330bbe735f3a243a84537 using the dep tool.

The current method of using the -sqlite flag in make.go appears to
enable conditional builds with/without sqlite3, obsoleting the
need for local modifications.

We also manually remove sqlite

Addresses: #889

Change-Id: I4d2c107cd12608ac0bcb7c0607629ecb2d7f880f
2018-01-03 12:10:43 -08:00
Paul Lindner 49b1af4a1b all: update mongo to latest version
The mongo integration was using a very old package.  It's using
a new namespace now.  Upgrade and adjust all call points

Removes labix.org/v2/mgo

Introduces gopkg.in/mgo.v2 from branch v2 with revision
  3f83fa5005286a7fe593b055f0d7771a7dce4655

Change-Id: I2784fca941998460f58e0ac8d3d51286401590b5
2018-01-03 10:49:07 -08:00
Brad Fitzpatrick c3d05cdce9 Move more packages out of pkg/ and into internal/
Moved hashutil, httputil, osutil, netutil,
images, media, magic, video, and rollsum.
2018-01-02 21:03:30 -08:00
Paul Lindner a0943ac69b vendor/golang.org/x/net: update to rev d866cfc389cec985d6fda2859936a575a55a3ab6
Using dep vendor in latest golang.org/x/net package.

Change-Id: I927467478a20316cbb3175b0da0c8b1abdcfedfa
2018-01-02 09:47:01 -08:00
Mathieu Lonjaret e2deb945a9 Merge "vendor/golang.org/x/text: include more x/text packages" 2018-01-02 16:05:49 +00:00
Paul Lindner 04c6794e12 vendor/golang.org/x/text: include more x/text packages
Various text packages were previously imported from
rev 88f656faf3f37f690df1a32515b479415e1a6769

This includes the dep included/pruned version of x/text so that
we can update golang.org/x/net to the latest revision.

Addresses: #889

Change-Id: I54e8b02aef70d16519801b8fafd6bfd5548af4cd
2018-01-02 06:37:24 -08:00
Paul Lindner 551deec74d vendor/golang.org/x/image: update to rev 12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7
This syncs golang.org/x/image using the dep tool to the most recent set of
changes from upstream.

Addresses: #889

Change-Id: I2bfde5a1c146656365062d73773ac2754df591b9
2018-01-02 05:49:29 -08:00
Brad Fitzpatrick 11e9c5567c Move some packages from perkeep.org/pkg to perkeep.org/internal
Notably: pkg/misc all moves.

And pkg/googlestorage is deleted, since it's not used. Only the
x/net/http2/h2demo code used to use it, but that ended in
https://go-review.googlesource.com/33230 (our vendored code is old).
So just nuke that dir for now. When it's refreshed, it'll either be
gone (dep prune) or new enough to not need googlestorage.

Also move pkg/pools, pkg/leak, and pkg/geocode to internal.

More remains.

Change-Id: I2640c4d18424062fdb8461ba451f1ce26719ae9d
2018-01-01 20:54:48 -08: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 bf4b74b5d6 vendor: remove more testdata from vendored packages
This is another step towards getting vendor managed by dep.

Addresses: #889

Change-Id: Ibdc3102eee25d6e873f4f418d17f0b4e46b38d9f
2018-01-01 01:48:48 -08:00
Paul Lindner 1d4d49ad7a vendor: update picago and oauth2 packages to latest version
Picago was very old and had local changes, update to latest release.
Also update to latest oauth2 as a transitive dependency.

Actual versions:

  github.com/tgulacsi/picago: 9e1ac2306c701ca7477a169b2b49902b7b4c58bf
  golang.org/x/oauth2: 197281d4e0ecd78c33865daf9c6e51626feefcb2

manually omit oauth2 testdata and tests that contain private keys to
make "devcam review" happy

This change was prepared using the forthcoming migration to the dep
tool.

Manually tested by setting up a new Picasa oauth config and importing
many photos.

Addresses: #889

Change-Id: I4d21941ccb4ade84ec658b5cfc8624e29f52be60
2017-12-31 15:23:15 -08:00
Paul Lindner 9b77475913 vendor: update golang.org/x/crypto to rev ede567c8e044a5913dad1d1af3696d9da953104c
This is the most recent committed vendoring of this directory introduced in
commit bace8b0d on Dec 9, 2016

f9cfd754 introduced the Apr 16, 2016 versions of a number of crypto packages
and this brings them up to date.

This change was prepared using the forthcoming migration to the dep tool.

Change-Id: Id29faa7fe57fe3fbb15208f615f951025ae0fbd9
2017-12-29 23:15:29 -08:00
Filippo Valsorda f9cfd754a2 blobserver/encrypt: rewrite encryption to use NaCl and a simpler meta
NaCl offers authenticated encryption, which means that the blobstore
can't tamper with the data.  Since SHA-1 were checked one could not
change a blob outright, but could add new blobs by tampering with the
meta blobs, too.  It's true that only signed blobs should cause actions
just by being present, but we are already far too deep in the chain of
assumptions, just not to spend a bit of CPU adding a MAC.  The new
scheme is much easier to prove secure.

Also simplified the meta by removing the IV (which is in the encrypted
blob anyway) and the encrypted size (which is plaintext size + overhead).

Finally, added tests (including a storagetest) and tried to make this
sort of production-ready.

Still to do are meta compaction and a way to regenerate the meta from
the blobs, in case of meta corruption (which now we can do securely
thanks to NaCl authentication).

golang.org/x/crypto/nacl/secretbox:
golang.org/x/crypto/poly1305:
golang.org/x/crypto/salsa20/salsa:
golang.org/x/crypto/scrypt:
golang.org/x/crypto/pbkdf2:
	1e61df8d9ea476e2e1504cd9a32b40280c7c6c7e

Change-Id: I095c6204ac093f6292c7943dbb77655d2c51aba6
2017-12-29 14:16:34 -08:00
Daniel Heath 59ac14caa5 Vendor OpenSans (apache 2 licence)
Change-Id: Ie74b37efc007011b32810fd91c65b7750588a76e
2017-12-29 10:22:49 -08:00
Brad Fitzpatrick 78e9aade99 Merge "vendor: avoid retaining irrelevant vendor files and enumerate existing removals" 2017-12-29 01:18:03 +00:00
Brad Fitzpatrick 19521f9fc2 Merge "vendor: remove unused package github.com/cznic/bufs" 2017-12-29 01:08:14 +00:00
Paul Lindner 05d75586fb vendor: remove unused package github.com/cznic/bufs
Part of solving #889

Change-Id: Ie6717e52e96b12e45ae3cf0ac4cd1fdc4da7e044
2017-12-28 15:40:03 -08:00
Paul Lindner bf0ca6088a vendor: update go4.org to rev 034d17a462f7b2dcd1a4a73553ec5357ff6e6c6e
Part of solving #889

Change-Id: Iec1d8c68481da4c94bb19f9369ac0f06f5e12dcb
2017-12-28 15:39:32 -08:00
Paul Lindner 38ae5fe6db vendor: avoid retaining irrelevant vendor files and enumerate existing removals
Previous vendoring removed a number of files manually.  This enumerates the
existing removals in .gitignore and makes it easier to transition to another
dependency management system. We also take this opportunity to add travis and
gitignore files to the list and remove those from the vendor tree.

Part of solving #889

Change-Id: Ia1b1b11ea5f2065de3a069022c2ee346e2befe78
2017-12-28 15:36:01 -08:00
Brad Fitzpatrick 36f351ff50 Merge "pkg/webserver: remove usage of the obsolete runsit package" 2017-12-27 01:13:33 +00:00
Paul Lindner ca067082a3 vendor: remove unused go-spew package
Change-Id: I97d629e23406831ed93ea46634ff030695586a23
2017-12-26 16:11:28 -08:00
Paul Lindner b077a5916e pkg/webserver: remove usage of the obsolete runsit package
The runsit package is obsolete.  Pull the listen code directly into webserver and
remove support for the runsit specific named ports.  Update TODO.

Change-Id: I0d8ea798375d0eb4abea86ed9e6454376233e992
2017-12-26 15:03:59 -08:00
Paul Lindner 6b283519e6 vendor: remove unused gomemcache package
Change-Id: I7cafc05d758e0efe09b7701b346236f92f73ad3c
2017-12-26 01:15:07 -08:00
Brad Fitzpatrick e996c47bd1 vendor: add golang.org/x/sync
Adds golang.org/x/sync to vendor at fd80eb99c

Change-Id: I4b24acff93f0ace5f2ff0ba3c40e8b4145e1f60d
2017-12-17 14:27:26 -08:00
mpl f86f8de294 camweb: use mailgun for sending commit e-mails
github.com/mailgun/mailgun-go vendored in at rev
17e8bd11e87cb660ba5da8d635bbeae44b9443ac

github.com/pkg/errors vendored in at rev
f15c970de5b76fac0b59abb32d62c17cc7bed265

Fixes #980

Change-Id: I824ee3aa7493e062e6d916030dd62e0bd51ce477
2017-12-06 20:43:07 +01:00
Paul Lindner 3e703921d1 vendor: update myitcv.io/react and react javascript library
Update myitcv.io/react to revision:
  bca7c66b77ed8a5b86fb77cff70914c4a7cc3ce5

Update react, react-dom to v15.6.2 based on instructions in
  https://reactjs.org/blog/2017/09/25/react-v15.6.2.html

Add vendor/embed/react/update.sh script to assist with future updates

Update mobile UI to fix problems documented here:
  https://reactjs.org/warnings/legacy-factories.html

Update mobile.html and debug_console.html to use minified js

Fixes #977

Change-Id: I15ea81822e4f85669b321d5b3eb8b169f534def7
2017-11-27 08:55:30 -08:00
Paul Lindner 07a8df180c vendor: update bazil.org/fuse
Full Revision Information
- path: bazil.org/fuse
  rev: 371fbbdaa8987b715bdd21d6adc4c9b20155f748

Change-Id: I6787dec20690ca0392222a7f0fa17f9b45c956c7
2017-11-22 05:28:42 -08:00