Commit ee9fb8df authored by Sébastien Delafond's avatar Sébastien Delafond

New upstream version 1.1.1

parent c926f2bf
......@@ -34,3 +34,5 @@ man/aptly.1.html
......@@ -10,17 +10,17 @@
"TaskSettings": {
"deb": {
"debs": {
"metadata": {
"maintainer": "Andrey Smirnov",
"maintainerEmail": "",
"maintainer-email": "",
"description": "Debian repository management tool"
"metadata-deb": {
"License": "MIT",
"Homepage": "",
"Recommends": "bzip2, graphviz, xz-utils",
"Depends": ""
"Depends": "bzip2, xz-utils, gnupg, gpgv",
"Suggests": "graphviz"
"other-mapped-files": {
"/": "root/"
sudo: false
dist: trusty
sudo: required
language: go
- 1.6
- 1.7
- 1.8
- tip
- 1.6.x
- 1.7.x
- 1.8.x
- master
......@@ -20,14 +23,11 @@ env:
- secure: "V7OjWrfQ8UbktgT036jYQPb/7GJT3Ol9LObDr8FYlzsQ+F1uj2wLac6ePuxcOS4FwWOJinWGM1h+JiFkbxbyFqfRNJ0jj0O2p93QyDojxFVOn1mXqqvV66KFqAWR2Vzkny/gDvj8LTvdB1cgAIm2FNOkQc6E1BFnyWS2sN9ea5E="
- secure: "OxiVNmre2JzUszwPNNilKDgIqtfX2gnRSsVz6nuySB1uO2yQsOQmKWJ9cVYgH2IB5H8eWXKOhexcSE28kz6TPLRuEcU9fnqKY3uEkdwm7rJfz9lf+7C4bJEUdA1OIzJppjnWUiXxD7CEPL1DlnMZM24eDQYqa/4WKACAgkK53gE="
- virtualenv env
- . env/bin/activate
- virtualenv system/env
- . system/env/bin/activate
- pip install six packaging appdirs
- pip install -U pip setuptools
- pip install boto requests requests-unixsocket python-swiftclient
- mkdir -p $GOPATH/src/
- ln -s $TRAVIS_BUILD_DIR $GOPATH/src/ || true
- cd $GOPATH/src/
- pip install -r system/requirements.txt
- make version
- make prepare
......@@ -36,7 +36,7 @@ script: make travis
- go: tip
- go: master
......@@ -26,3 +26,5 @@ List of contributors, in chronological order:
* Harald Sitter (
* Johannes Layher (
* Charles Hsu (
* Clemens Rabe (
* TJ Merritt (
# Contributing to aptly
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
The following is a set of guidelines for contributing to [aptly]( and related repositories, which are hosted in the [aptly-dev Organization]( on GitHub.
These are just guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
## What should I know before I get started?
### Code of Conduct
This project adheres to the Contributor Covenant [code of conduct](
By participating, you are expected to uphold this code.
Please report unacceptable behavior to [](
### List of Repositories
* [smira/aptly]( - aptly source code, functional tests, man page
* [apty-dev/]( - aptly website (
* [aptly-dev/aptly-fixture-db]( & [aptly-dev/aptly-fixture-pool]( provide
fixtures for aptly functional tests
## How Can I Contribute?
### Reporting Bugs
1. Please search for similar bug report in [issue tracker](
2. Please verify that bug is not fixed in latest aptly nightly ([download information](
3. Steps to reproduce increases chances for bug to be fixed quickly. If possible, submit PR with new functional test which fails.
4. If bug is reproducible with specific package, please provide link to package file.
5. Open issue at [GitHub](
### Suggesting Enhancements
1. Please search [issue tracker]( for similar feature requests.
2. Describe why enhancement is important to you.
3. Include any additional details or implementation details.
### Improving Documentation
There are two kinds of documentation:
* [aptly website](https://www.aptly/info)
* aptly `man` page
Core content is mostly the same, but website contains more information, tutorials, examples.
If you want to update `man` page, please open PR to [main aptly repo](,
details in [man page](#man-page) section.
If you want to update website, please follow steps below:
1. Install [hugo](
2. Fork [website source]( and clone it
3. Launch hugo in development mode: `hugo -w server`
4. Navigate to `http://localhost:1313/`: you should see aptly website
5. Update documentation, most of the time editing Markdown is all you need.
6. Page in browser should reload automatically as you make changes to source files.
We're always looking for new contributions to [FAQ](, [tutorials](,
general fixes, clarifications, misspellings, grammar mistakes!
### Your Fist Code Contribution
Please follow [next section](#development-setup) on development process. When change is ready, please submit PR
following [PR template](.github/
Make sure that purpose of your change is clear, all the tests and checks pass, and all new code is covered with tests
if that is possible.
## Development Setup
This section describes local setup to start contributing to aptly source.
### Go & Python
You would need `Go` (latest version is recommended) and `Python` 2.7.x (3.x is not supported yet).
If you're new to Go, follow [getting started guide]( to install it and perform
initial setup. With Go 1.8+, default `$GOPATH` is `$HOME/go`, so rest of this document assumes that.
Usually `$GOPATH/bin` is appended to your `$PATH` to make it easier to run built binaries, but you might choose
to prepend it or to skip this test if you're security conscious.
### Forking and Cloning
As Go is using repository path in import paths, it's better to clone aptly repo (not your fork) at default location:
mkdir -p ~/go/src/
cd ~/go/src/
git clone
cd aptly
For main repo under your GitHub user and add it as another Git remote:
git remote add <user><user>/aptly.git
That way you can continue to build project as is (you don't need to adjust import paths), but you would need
to specify your remote name when pushing branches:
git push <user> <your-branch>
### Dependencies
You would need some additional tools and Python virtual environment to run tests and checks, install them with:
make prepare dev system/env
This is usually one-time action.
### Building
If you want to build aptly binary from your current source tree, run:
make install
This would build `aptly` in `$GOPATH/bin`, so depending on your `$PATH`, you should be able to run it immediately with:
Or, if it's not on your path:
### Unit-tests
aptly has two kinds of tests: unit-tests and functional (system) tests. Functional tests are preferred way to test any
feature, but some features are much easier to test with unit-tests (e.g. algorithms, failure scenarios, ...)
aptly is using standard Go unit-test infrastructure plus [gocheck]( Run the unit-tests with:
make test
### Functional Tests
Functional tests are implemented in Python, and they use custom test runner which is similar to Python unit-test
runner. Most of the tests start with clean aptly state, run some aptly commands to prepare environment, and finally
run some aptly commands capturing output, exit code, checking any additional files being created and so on. API tests
are a bit different, as they re-use same aptly process serving API requests.
The easiest way to run functional tests is to use `make`:
make system-test
This would check all the dependencies and run all the tests. Some tests (S3, Swift) require access credentials to
be set up in the environment. For example, it needs AWS credentials to run S3 tests (they would be used to publish to S3).
If credentials are missing, tests would be skipped.
You can also run subset of tests manually:
system/ t04_mirror
This would run all the mirroring tests under `system/t04_mirror` folder.
Or you can run tests by test name mask:
system/ UpdateMirror*
Or, you can run specific test by name:
system/ UpdateMirror7Test
Test runner can update expected output instead of failing on mismatch (this is especially useful while
working on new tests):
system/ --capture <test>
Output for some tests might contain environment-specific things, e.g. your home directory. In that case
you can use `${HOME}` and similar variable expansion in expected output files.
Some tests depend on fixtures, for example pre-populated GPG trusted keys. There are also test fixtures
captured after mirror update which contain pre-build aptly database and pool contents. They're useful if you
don't want to waste time in the test on populating aptly database while you need some packages to work with.
There are some packages available under `system/files/` directory which are used to build contents of local repos.
*WARNING*: tests are running under current `$HOME` directory with aptly default settings, so they clear completely
`~/.aptly.conf` and `~/.aptly` subdirectory between the runs. So it's not wise to have non-dev aptly being used with
this default location. You can run aptly under different user or by using non-default config location with non-default
aptly root directory.
### Style Checks
Style checks could be run with:
make check
aptly is using [gometalinter]( to run style checks on Go code. Configuration
for the linter could be found in [linter.json](linter.json) file. Running linters might take considerable amount of time
unfortunately, but usually warning reported by linters hint at real code issues.
Python code (system tests) are linted with [flake8 tool](
### Vendored Code
aptly is using Go vendoring for all the libraries aptly depends upon. `vendor/` directory is checked into the source
repository to avoid any problems if source repositories go away. Go build process will automatically prefer vendored
packages over packages in `$GOPATH`.
If you want to update vendored dependencies or to introduce new dependency, use [dep tool](
Usually all you need is `dep ensure` or `dep ensure -update`.
### man Page
aptly is using combination of [Go templates]( and automatically generated text to build `aptly.1` man page. If either source
template [man/aptly.1.ronn.tmpl](man/aptly.1.ronn.tmpl) is changed or any command help is changed, run `make man` to regenerate
final rendered man page [man/aptly.1](man/aptly.1). In the end of the build, new man page is displayed for visual
Man page is built with small helper [_man/gen.go](man/gen.go) which pulls in template, command-line help from [cmd/](cmd/) folder
and runs that through [forked copy]( of [ronn](
### Bash Completion
Bash completion for aptly resides in the same repo under in [bash_completion.d/aptly](bash_completion.d/aptly). It's all hand-crafted.
When new option or command is introduced, bash completion should be updated to reflect that change.
When aptly package is being built, it automatically pulls bash completion and man page into the package.
## Design
This section requires future work.
### Database
### Package Pool
### Package
### PackageList, PackageRefList
### LocalRepo, RemoteRepo, Snapshot
### PublishedRepository
### Context
### Collections, CollectionFactory
memo = "becdf010a814559719c990c1bd645c737cee332ad52004c440605c13de100d45"
name = ""
packages = ["."]
revision = "08a25bac605b3fcb6cc27f3917b2c2c87451963d"
version = "v1.0.0"
branch = "master"
name = ""
packages = ["."]
revision = "33a99fdf1d5ee1f79b5077e9c06f955ad356d5f4"
name = ""
packages = [".","ast","parser","scanner","token"]
revision = "761fd5fbb34e4c2c138c280395b65b48e4ff5a53"
version = "v1.0"
name = ""
packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/corehandlers","aws/credentials","aws/credentials/ec2rolecreds","aws/credentials/endpointcreds","aws/credentials/stscreds","aws/defaults","aws/ec2metadata","aws/endpoints","aws/request","aws/session","aws/signer/v4","private/protocol","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/restxml","private/protocol/xml/xmlutil","service/s3","service/sts"]
revision = "2db5849d2939d93075d911138309a83235032bea"
version = "v1.8.0"
name = ""
packages = ["."]
revision = "cdf719fac0dd208251aa828e687c2d5802053b51"
version = "v1.0.10"
name = ""
packages = [".","binding","render"]
revision = "b1758d3bfa09e61ddbc1c9a627e936eec6a170de"
name = ""
packages = ["."]
revision = "1730955e3146956d6a087861380f9b4667ed5071"
version = "v1.26.0"
branch = "master"
name = ""
packages = ["."]
revision = "553a641470496b2327abcac10b36396bd98e45c9"
branch = "master"
name = ""
packages = ["matchers"]
revision = "0df83c38d14ff5f653d419d480eaac286ccbc823"
branch = "master"
name = ""
packages = ["."]
revision = "7b85eb4638a2c0473acefcfb929a98f879c15c86"
name = ""
packages = ["."]
revision = "3433f3ea46d9f8019119e7dd41274e112a2359a9"
version = "0.2.2"
name = ""
packages = ["."]
revision = "8c199fb6259ffc1af525cc3ad52ee60ba8359669"
version = "v1.1"
name = ""
packages = ["."]
revision = "9e777a8366cce605130a531d2cd6363d07ad7317"
version = "v0.0.2"
name = ""
packages = ["."]
revision = "005a0944d84452842197c2108bd9168ced206f78"
version = "v1.0.2"
branch = "master"
name = ""
packages = ["."]
revision = "282caa8bd9daba480b51f1d5a988714913b97aad"
branch = "master"
name = ""
packages = ["flowrate"]
revision = "cca7078d478f8520f85629ad7c68962d31ed7682"
branch = "master"
name = ""
packages = [".","swifttest"]
revision = "8e9b10220613abdbc2896808ee6b43e411a4fa6c"
name = ""
packages = ["."]
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
branch = "master"
name = ""
packages = ["."]
revision = "f408b00e68d5d6e21b9f18bd310978dafc604e47"
branch = "master"
name = ""
packages = ["."]
revision = "357ed3e599ffcbd4aeaa828e1d10da2df3ea5107"
branch = "master"
name = ""
packages = ["."]
revision = "0070896e9d7f4f9f2d558532b2d896ce2239992a"
branch = "master"
name = ""
packages = ["protocol"]
revision = "066b75c2b70dca7ae10b1b88b47534a3c31ccfaa"
branch = "master"
name = ""
packages = ["uuid"]
revision = "ed3ca8a15a931b141440a7e98e4f716eec255f7d"
branch = "master"
name = ""
packages = ["."]
revision = "0c531f070014e218b21f3cfca801cc992d52726d"
branch = "master"
name = ""
packages = ["."]
revision = "7f0af6269940baa2c938fabe73e0d7ba41205683"
branch = "master"
name = ""
packages = ["leveldb","leveldb/cache","leveldb/comparer","leveldb/errors","leveldb/filter","leveldb/iterator","leveldb/journal","leveldb/memdb","leveldb/opt","leveldb/storage","leveldb/table","leveldb/util"]
revision = "3c5717caf1475fd25964109a0fc640bd150fce43"
name = ""
packages = ["codec"]
revision = "71c2886f5a673a35f909803f38ece5810165097b"
branch = "master"
name = ""
packages = ["color"]
revision = "0940f3fc43a0ed42d04916b1c04578462c650b09"
branch = "master"
name = ""
packages = ["cast5","openpgp","openpgp/armor","openpgp/clearsign","openpgp/elgamal","openpgp/errors","openpgp/packet","openpgp/s2k","ssh/terminal"]
revision = "459e26527287adbc2adcc5d0d49abff9a5f315a7"
branch = "master"
name = ""
packages = ["unix"]
revision = "99f16d856c9836c42d24e7ab64ea72916925fa97"
branch = "v1"
name = ""
packages = ["."]
revision = "20d25e2804050c1cd24a7eea1e7a6447dd0e74ec"
name = ""
packages = ["types"]
revision = "3093b8ebec6efb56ac813238b8beab4ed4eaac6a"
version = "v1.0.1"
name = ""
revision = "b1758d3bfa09e61ddbc1c9a627e936eec6a170de"
branch = "master"
name = ""
branch = "master"
name = ""
branch = "master"
name = ""
name = ""
revision = "71c2886f5a673a35f909803f38ece5810165097b"
branch = "master"
name = ""
branch = "master"
name = ""
branch = "v1"
name = ""
GOVERSION=$(shell go version | awk '{print $$3;}')
VERSION=$(shell git describe --tags | sed 's@^v@@' | sed 's@-@+@g')
PACKAGES=context database deb files http query swift s3 utils
PACKAGES=context database deb files gpg http query swift s3 utils
......@@ -35,16 +35,26 @@ coverage: coverage.out
go tool cover -html=coverage.out
rm -f coverage.out
gometalinter --vendor --vendored-linters --config=linter.json ./...
check: system/env
if [ -x travis_wait ]; then \
travis_wait gometalinter --config=linter.json ./...; \
else \
gometalinter --config=linter.json ./...; \
. system/env/bin/activate && flake8 --max-line-length=200 --exclude=system/env/ system/
go install -v -ldflags "-X main.Version=$(VERSION)"
system-test: install
system/env: system/requirements.txt
rm -rf system/env
virtualenv system/env
system/env/bin/pip install -r system/requirements.txt
system-test: install system/env
if [ ! -e ~/aptly-fixture-db ]; then git clone ~/aptly-fixture-db/; fi
if [ ! -e ~/aptly-fixture-pool ]; then git clone ~/aptly-fixture-pool/; fi
. system/env/bin/activate && APTLY_VERSION=$(VERSION) PATH=$(BINPATH)/:$(PATH) $(PYTHON) system/ --long $(TESTS)
travis: $(TRAVIS_TARGET) check system-test
......@@ -58,20 +68,11 @@ mem.png: mem.dat
open mem.png
rm -rf aptly-$(VERSION)
mkdir -p aptly-$(VERSION)/src/
cd aptly-$(VERSION)/src/ && git clone && cd aptly && git checkout v$(VERSION)
mkdir -p aptly-$(VERSION)/bash_completion.d
(cd aptly-$(VERSION)/bash_completion.d && wget$(VERSION)/aptly)
tar cyf aptly-$(VERSION)-src.tar.bz2 aptly-$(VERSION)
rm -rf aptly-$(VERSION)
rm -rf root/
mkdir -p root/usr/share/man/man1/ root/etc/bash_completion.d
cp man/aptly.1 root/usr/share/man/man1
(cd root/etc/bash_completion.d && wget
cp bash_completion.d/aptly root/etc/bash_completion.d
gzip root/usr/share/man/man1/aptly.1
goxc -pv=$(VERSION) -max-processors=4 $(GOXC_OPTS)
......@@ -2,11 +2,11 @@