Commit Graph

1518 Commits

Author SHA1 Message Date
Andrey Smirnov 7f8db9087a Rework man generator with new go install format
With previous version, `go install` automatically picks up
package `man` and installs `gen.go` as `main` to the $GOPATH/bin which
is not what is expected. Move man page generator to separate
private folder.
2017-03-24 21:07:38 +03:00
Andrey Smirnov 92c844b8ac Merge pull request #517 from smira/goreportcard
Fix goreportcard badge [ci skip]
2017-03-23 18:33:00 +03:00
Andrey Smirnov 2b56a3937b Fix goreportcard badge [ci skip] 2017-03-23 18:32:00 +03:00
Andrey Smirnov 9cea9b6470 Merge pull request #512 from smira/500-xdg-open
Customize viewer per platform
2017-03-23 18:28:24 +03:00
Andrey Smirnov e3e68b9f22 Customize viewer per platform 2017-03-23 17:12:34 +03:00
Andrey Smirnov d56839664d Merge pull request #513 from smira/gometalinter
Switch to gometalinter
2017-03-23 16:32:33 +03:00
Andrey Smirnov 516dd7b044 Switch to gometalinter
Only small amount of required checks is enabled,
plan is to enable more linters as issues are fixed in the code.
2017-03-23 01:51:08 +03:00
Andrey Smirnov 53e59d3765 Merge pull request #509 from smira/golint-govet
Add govet/golint into Travis CI build
2017-03-22 22:14:30 +03:00
Andrey Smirnov 11d828b3b1 Add govet/golint into Travis CI build
Fix current issues
2017-03-22 21:49:16 +03:00
Andrey Smirnov 07472bec50 Merge pull request #511 from smira/dep-experiment
Convert to regular Go vendor + `dep` tool
2017-03-22 20:34:36 +03:00
Andrey Smirnov f737787c01 Fix up system tests 2017-03-22 19:56:23 +03:00
Andrey Smirnov c6c1012330 Conver to regular Go vendor + dep tool 2017-03-22 19:24:06 +03:00
Andrey Smirnov 070347295e Merge pull request #505 from smira/rmedaer-master
Added '.xz' extension in HTTP download.
2017-03-17 00:47:33 +03:00
Andrey Smirnov acd8d4a6ea Go 1.6 compatibility 2017-03-17 00:17:07 +03:00
Andrey Smirnov c9768416ed Fix up tests 2017-03-16 23:06:41 +03:00
Raphael Medaer bfb9ffad1d Added expected error on 'Packages.xz' for TestDownload[WithSources]Flat. 2017-03-16 22:41:25 +03:00
Raphael Medaer 9cfe1307e3 Added download tests for xz compression. 2017-03-16 22:41:25 +03:00
Raphael Medaer db8595711b Added '.xz' reader in HTTP download. This fixed issue when you try to mirror a distribution with only Packages.xz (example 'debian/experimental'). 2017-03-16 22:41:25 +03:00
Andrey Smirnov ce0001f94c Merge pull request #504 from smira/go-1.8
Add Travis CI build on Go 1.8
2017-03-16 22:16:01 +03:00
Andrey Smirnov b102562478 Fix up system test for Go 1.8 2017-03-16 20:58:21 +03:00
Andrey Smirnov 69cbe10690 Add Travis CI build on Go 1.8 2017-03-16 18:46:03 +03:00
Andrey Smirnov e3e4ea91bd Merge pull request #502 from smira/aws-sdk-bump
Bump Go AWS SDK to the latest version
2017-03-16 18:45:26 +03:00
Andrey Smirnov 02c582e227 Merge pull request #503 from smira/pr-template-update
Add bash completion to PR template [ci skip]
2017-03-16 01:31:52 +03:00
Andrey Smirnov 6e96cd29dc Add bash completion to PR template [ci skip] 2017-03-16 01:30:00 +03:00
Andrey Smirnov 17044f43dc Bump Go AWS SDK to the latest version
This seems to fix `NotImplemented` S3 error
2017-03-16 01:28:44 +03:00
Andrey Smirnov 5d3b170ffc Merge pull request #497 from smira/repo-create-from-snap
Implement new command `aptly repo create ... from snapshot ...`
2017-03-16 01:12:09 +03:00
Andrey Smirnov a0f7b2242d Merge pull request #499 from sobczyk/dbgsym
include dbgsym packages
2017-03-14 22:51:24 +03:00
Szymon Sobik b8e7ad9022 update changes unit test to account for dbgsym matching 2017-03-08 10:32:11 +01:00
Szymon Sobik 1b80d55ea4 since -dbgsym is for each binary package use that for PackageQuery 2017-03-08 10:31:44 +01:00
Szymon Sobik a0832adfa5 include dbgsym packages
fixes #331
2017-03-07 17:06:59 +01:00
Andrey Smirnov f17d398e8f Implement new command aptly repo create ... from snapshot ... 2017-03-04 00:12:18 +03:00
Andrey Smirnov bc3b2ed5a8 Merge pull request #495 from apachelogger/systemd-activation
support systemd activation for `api serve`
2017-03-03 22:55:47 +03:00
Harald Sitter 07cf8925f9 support systemd activation for api serve
systemd has a feature called socket activation where initially systemd
manages and listens on ports/uds and only invokes a service when traffic
appears. to then hand over the involved sockets, systemd will pass the
relevant FDs into the invoked process and defines them in the environment.

use coreos/go-systemd to grab the active listeners passed by systemd and
use them to serve the api routes. only one listener may be specified right
now as we also only support one -listen argument for the binary.

this allows admins to craft a systemd socket and service file for aptly
where systemd manages the socket, its permission and its live time, and
lazy start aptly when needed.
2017-03-01 11:12:10 +01:00
Andrey Smirnov 564ebf3130 Merge pull request #493 from apachelogger/api-over-socket
support serving the API over unix domain socket
2017-02-28 23:41:09 +03:00
Harald Sitter dbee214259 support serving the API over unix domain socket
`unix://$PATH` as listen argument will bind aptly to a unix domain socket
rather than TCP.

This allows binding the API to a UDS rather than a port.
Since aptly has no concept of authentication or any amount of high level
API hardening one needs to bottle it up in some other manner. Binding
to a localhost port is often a step in the right direction, ultimately is
still a scary insecure setup as any user on that host getting compromised
would mean that the entire archive is compromised as well.
UDS on the other hand are basically files and have their access managed
by regular file permission. As such, binding to a socket is in fact
the least insecure way to listen as you'd have to explicitly open up the
socket permissions to an access qualified group. In the most conservative
scenario that means no one but the aptly user can talk to the API, in a
more practical setup apache might get access as well and proxy the UDS
with authentication or limited to GET operations.

Using UDS allows reducing the attack surface of the API server while
preserving all the flexibility.
2017-02-28 09:58:39 +01:00
Andrey Smirnov 6267c5cb25 Merge pull request #490 from smira/contents-low-footprint
Use temporary LevelDB to store contents index
2017-02-27 17:26:11 +03:00
Andrey Smirnov 4c06e26d85 Throttle compaction on temporary DB 2017-02-23 01:01:17 +03:00
Andrey Smirnov f2dc4eeec9 Generating contents indexes via temporary LevelDB 2017-02-21 19:09:51 +03:00
Andrey Smirnov f86e6ebf1f Merge pull request #491 from charz/master
Fix URL path for Swift.
2017-02-17 00:37:47 +03:00
Charles Hsu 0d208c93bc Merge branch 'master' of https://github.com/smira/aptly 2017-02-16 23:14:02 +08:00
Charles Hsu 485f311498 Fix URL path for Swift. 2017-02-16 23:09:18 +08:00
Andrey Smirnov 46b0d637e2 Merge pull request #484 from jola5/master
Abort serve command if rootDir is inaccessible
2017-02-15 23:54:42 +03:00
jola5 5a71847b7f Simplify test implementation 2017-02-15 20:18:47 +01:00
jola5 38a9917815 Handle dependencies in gomfile 2017-02-15 20:18:47 +01:00
jola5 4456f8da57 Refactor 2017-02-15 20:18:47 +01:00
jola5 970b1a424a Fix bugged implementation 2017-02-15 20:18:47 +01:00
jola5 edffa24658 Test startup checks for serve command 2017-02-15 20:18:47 +01:00
jola5 3040e7360a Fix golang.org/x/sys/unix dependency issue 2017-02-15 20:18:47 +01:00
jola5 b948180b4e Abort serve command if rootDir is inaccesible 2017-02-15 20:18:47 +01:00
Andrey Smirnov f58d2627c1 Add temporary DB and prefix methods to Storage 2017-02-14 02:26:32 +03:00