760 Commits

Author SHA1 Message Date
Clemens Rabe
16a0d0d428 Added option --skip-existing-packages to speed up mirror update. 2017-03-23 22:01:11 +01:00
Clemens Rabe
66f51d2b17 Added option --skip-existing-packages to speed up mirror update. 2017-03-23 21:55:22 +01:00
Andrey Smirnov
11d828b3b1 Add govet/golint into Travis CI build
Fix current issues
2017-03-22 21:49:16 +03:00
Andrey Smirnov
f737787c01 Fix up system tests 2017-03-22 19:56:23 +03:00
Andrey Smirnov
c9768416ed Fix up tests 2017-03-16 23:06:41 +03:00
Andrey Smirnov
b102562478 Fix up system test for Go 1.8 2017-03-16 20:58:21 +03:00
Andrey Smirnov
f17d398e8f Implement new command aptly repo create ... from snapshot ... 2017-03-04 00:12:18 +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
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
jola5
5a71847b7f Simplify test implementation 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
Andrey Smirnov
33d6cd8c0a Allow filter to be empty for aptly * search commands
Empty filter implies "select all packages".
2017-02-10 23:07:06 +03:00
jolo
92116072c2 Fix and enable broken graph layout tests 2017-01-20 02:19:45 +01:00
jola5
4bf27d1dae Merge branch 'master' into master 2017-01-19 23:07:49 +01:00
Andrey Smirnov
b0dd83335f Merge branch 'master' into print_sources 2017-01-19 00:50:13 +03:00
jolo
7c62a706c4 Disable tests failing due to inappropriate test data 2017-01-17 01:04:07 +01:00
jolo
96948d6f18 Basic test of graph layout 2017-01-17 00:46:51 +01:00
Harald Sitter
345fa02fdc Allow requesting the unrendered dot graph from the graph endpoint
When api/graph.{dot,gv} is requested the raw string for dot gets returned.
This allows client-side rendering rather than server-side. It also makes
the optional dependency on graphivz for dot unnecessary to use the graph
endpoint.
2017-01-13 12:57:42 +01:00
Oliver Sauder
0fdee9cbf6 Added publish show command 2017-01-10 10:59:07 +01:00
Oliver Sauder
50e3e93166 print snapshot sources in snapshot show command 2017-01-09 17:29:01 +01:00
Blake Kostner
f939532461 added exit code 2 for go 1.5 support 2016-06-22 21:59:56 -07:00
Blake Kostner
aa4e225455 fix unit tests 2016-06-22 21:00:51 -07:00
Andrey Smirnov
65541a1df2 Fix system tests. 2016-05-16 13:02:00 +03:00
Andrey Smirnov
902c6487da Merge branch 'master' of https://github.com/dstelter/aptly into dstelter-master 2016-05-16 12:06:00 +03:00
Andrey Smirnov
1d5b7f59cf Update system tests. 2016-05-16 11:38:20 +03:00
Daniel Stelter-Gliese
1c45c79cc1 Allow overriding architecture info from Release file
Adds a flag -force-architectures to ignore missing architectures from
mirrors. This flag can be used in cases where the mirrored repository
does not provide an "Architecture: " line.

Example Release file:
http://mitaka-jessie.pkgs.mirantis.com/debian/dists/jessie-mitaka-backports/Release
2016-05-16 03:25:00 +02:00
Andrey Smirnov
7a8af044ee 0.9.8~dev version. 2016-04-21 12:24:36 +03:00
Andrey Smirnov
a667744502 Updte system tests. 2016-04-18 13:16:34 +03:00
Andrey Smirnov
52f7c83f95 Release 0.9.7. 2016-04-18 12:30:36 +03:00
Andrey Smirnov
ff52d2655a Fix package search missing duplicate packages. #225
Implement package list with duplicate entries, use it when
initiating search from PackageCollection.
2016-03-22 12:23:13 +03:00
Andrey Smirnov
60cca0245b Fix system tests. 2016-03-20 22:01:41 +03:00
Andrey Smirnov
cfaa8f3881 Fix system tests. 2016-03-10 18:42:40 +03:00
Andrey Smirnov
b966b2eabf Fix HOME expansion. 2016-03-02 13:56:11 +03:00
Andrey Smirnov
a4e573bb07 Fix system tests after squeeze->squeeze-lts move. 2016-03-02 13:25:12 +03:00
Andrey Smirnov
a29453805c Publish under root using :. explicit prefix. #339 2016-03-01 12:34:59 +03:00
Andrey Smirnov
ee05bb23c9 Fix Swift tests for SHA512. 2016-02-18 12:29:12 +03:00
Andrey Smirnov
77be7b9e3b Support for SHA-512 hashes on publishing/downloads. 2016-02-18 12:01:51 +03:00
Andrey Smirnov
f50e008763 Make 'SkipContents' configurable in API. #345
Also add global configuration to disable 'skipContents' by
default for all new published repos/snapshots.
2016-02-14 14:49:16 +03:00
Andrey Smirnov
fd30b37a0e Bump version to 0.9.7~dev. 2016-01-24 23:15:23 +03:00
Andrey Smirnov
9738687116 Add -no-lock to aptly api serve to excercise locking. 2016-01-24 23:02:46 +03:00
Andrey Smirnov
219315c01d Fix one more system test on version. 2016-01-24 22:45:53 +03:00
Andrey Smirnov
62f44e53fd Version bump to 0.9.6. 2016-01-24 21:48:33 +03:00
Andrey Smirnov
631fe44c6b Security: don't download files we don't have checksums for. #324 2015-12-22 13:52:53 +03:00
Andrey Smirnov
08bc5ac934 Fix system tests for Go 1.5.
Some error strings in Go 1.5 have changed. Until we have something
better for that, use string replace.
2015-09-22 12:40:42 +03:00
Andrey Smirnov
c160cbccc7 Fix mirror system tests. 2015-09-22 11:42:05 +03:00
Andrey Smirnov
8bda799545 Support for Go-style templating in format for aptly * search. #254 2015-07-02 12:19:41 +03:00
Andrey Smirnov
6c28e3aca8 Update flat repository. 2015-06-26 13:24:31 +03:00
Andrey Smirnov
901babe500 Fix test. 2015-06-26 13:15:11 +03:00