Commit Graph

15 Commits

Author SHA1 Message Date
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
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 c58e07942e all: lint fixes for "if block ends with a return statement"
Change-Id: I1c244f14995478860c19695695f287d541a7a39c
2017-12-13 11:31:25 -08:00
Paul Lindner 15feaeb24c all: lint fixes for 'error strings should not be capitalized or end with punctuation or a newline'
Change-Id: I9c3766a51ac8be694ae76befff4b6fa9a85e34eb
2017-12-11 06:13:25 -08:00
Will Norris 77ed42edf8 add canonical import paths
The import path was added to the go file that included the package
documentation if one existed.  Otherwise, I used what seemed to be the
primary file for the package.

Fixes #689

Change-Id: If51be0e86529fd6f179e80af6781e639f8550fd2
2016-03-13 19:57:14 -07:00
mpl b49c8b94de buildbot: switch to Go 1.5
Change-Id: I1b97aa44157064a64baec8f2d3f22376c9438d21
2015-08-21 19:27:52 +02:00
mpl 424ccbdeba misc/buildbot: keep it alive until rewrite
Because of the hg->git switch and the switch to Go 1.4, which requires
bootstrapping for building from source:

-master now requires an env with a working Go to build builder (instead of
building go tip from source), and master does not monitor changes to the go
tree anymore.

-builder gets Go1.4.1 from the binary tarball (instead of building from
source), and does not build go tip anymore (nor does it run tests with
it).

Keeping it alive properly was not deemed worth the trouble since we plan
on replacing it with a new builder based on the same tools used for the
Go builders.

Change-Id: Idd0864350b27b6523675006f00719fba2d6fc72f
2015-01-27 00:56:40 +01:00
mpl 08dad1803e camlibot: set GOROOT properly, stricter hash checks, simplify
Change-Id: I27fed6c52eeae239b9f8a17600331fc08dfd9ef7
2013-12-30 19:50:54 +01:00
Bill Thiede b030952753 buidbot/master: remove auto refresh on stderr view.
I thought this was clever, but now I see it is just annoying when
dealing with long stderr logs.

Change-Id: Iddb172240a046aedb9abb78fa5a74ebeded3c387
2013-12-27 11:21:21 -08:00
Bill Thiede 738783ebf4 buildbot/master: add Basic Auth support.
Moved BasicAuth parsing and localhost detection code from pkg/auth ->
pkg/httputil for use by buildbot master.

Added user config file for remote access.  The file's name is
"masterbot-config.json" and is located in osutil.CamliConfigDir(),
which on Unix will resolve to $XDG_CONFIG_HOME/camlistore/, if
XDG_CONFIG_HOME set, or ~/.config/camlistore/.  On Windows it will be
under %APPDATA%\Camlistore\.  The expected format is a json object
with usernames as the keys and sha1 sums of the password as the
values, i.e.:

    {
        "user1": "1234567890abcdef12341234567890abcdef1234",
        "user2": "1234abcdef12345678901234abcdef1234567890"
    }

This file is polled at a 1 minute interval and reparsed if the file's
modification time is more recent then the previous parse attempt.  It
is ok for the file to go missing, it will zero out the remote user
list. A malformed file will result in the master exiting.

New commandline flags, -tlsCertFile & -tlsKeyFile, added.  Specifying
both will enable TLS on the listener specified by -host.  The go
source contains generate_cert.go in crypto/tls that can be used to
generate self-signed cert.pem and key.pem for testing.

Added -skiptlscheck commandline option to builder.  This allows the
builder to report to https:// addresses with self-signed certs as we
don't currently have a way to specify the cert chains to be used
for TLS verification.  This is a stop-gap solution.

When launching a master that listens for secure connections, we
currently need tell the builders to skip certificate validation. Add
'-builderopts="-skiptlscheck"' to the master's commandline to skip
cerfication verification.

Change-Id: I0750b5c9fa8f4def67fc05a841087b50abded2f7
2013-11-21 21:22:12 -08:00
Mathieu Lonjaret c1b21a9668 Merge "builder: add client side Basic Auth support." 2013-11-07 16:04:20 +00:00
Bill Thiede 05fa589675 builder: add client side Basic Auth support.
Adds support for specifying additional masters to send results to.
The config file, named "builderbot-config", must be located in
osutil.CamliConfigDir(); on Unix, it will be under
$XDG_CONFIG_HOME/camlistore/, if XDG_CONFIG_HOME set, or
~/.config/camlistore/.  On Windows it will be under %APPDATA%\Camlistore\.
The expected format is one host per line, comments are not allowed and used
only for illustration below.  Some examples:

    # Post to default path on host1, no user auth.
    http://host1
    # Post to / on host2, no user auth.
    http://host2/
    # Post to /other/path on host3, no user auth.
    http://host3/other/path
    # Post to default path on host4, user 'user', password 'pass'.
    http://user:pass@host4
    # Post to / on host4 port 7070, user 'user', password 'pass'.
    http://user:pass@host4:7070/

This change also explicitly sets GOPATH to the copy of camlistore.org checked
out by the master before building the builder, and starting the build run.
This ensures we're not building against a random checkout of camlistore
pointed to by the user's environment.

The directory of the checked out source is moved from ${PWD}/camlistore.org
-> ${PWD}/src/camlistore.org so GOPATH can be set to $PWD and the requirement
of packages being under src/ is met.

Change-Id: I6e121c0aae9dae0c1832f782fa32619434ce9d2c
2013-11-06 19:16:58 -08:00
Bill Thiede d950d683b5 buildbot/master: reformat task's error message.
The error message is already preformated with \n newlinews, so <pre> is a more
appropriate tag, shows error messages with proper line-breaks.

Change-Id: Ifcf63ae4c9fa857c48bd825edb8f83f1527ed57a
2013-10-30 21:21:19 -07:00
mpl 9ab3af23b6 misc/buildbot: a few fixes + README
-hack to disallow remote bots reports, until we have some auth working
-verify that the alternative latest hash provider response looks like
a git hash before using it.
-check that the buildbot code is the most recent before building
-a few more debugging prints
-some paths fixes
-README to get started

Change-Id: Ibe8b4472586b4902d3f28f70a2cceadfb6e41c80
2013-10-25 01:29:36 +02:00
mpl 74bb79e63b buildbot: broke into a master and a builder bot
This change is the first major step towards more improvements to the
buildbot. It cleans up various details, but most notably:
-it now uses a task as the basic data structure, to improve readability
and maintainability
-it breaks the bot into a master bot and a builder bot.
-it allows a master to receive reports from remote bots, and the
status page now aggregates all those reports.
-it allows a builder bot to send its reports to several master bots.
-the master bot uses whatever go version is installed to build the
builder bot, or the downloaded go tip if none is found.

The master bot is in charge of
1) monitoring the changes to the Camlistore and Go repos,
2) recompiling builder bot, which allows to add some new tests to the
test suite without having to interrupt the master bot.
3) starting a builder bot instance
4) waiting for the builder bot report and/or polling the builder bot
for its progress
5) answering the requests to display the various status pages.

http://camlistore.org/issue/185

Change-Id: I46a0b8fabbebf76b0c3ed04fd2ee73362d565cf7
2013-10-18 19:32:24 +02:00