André Roth
72a7780054
fix golint complaints
2024-03-06 06:21:36 +01:00
Mauro Regli
40c242f9d1
Fix: Remove Batch from API options, set to true by default, add comments
...
Fixes : #1106
2023-09-14 10:34:20 +02:00
Mauro Regli
dbf1ac7867
Fix: Drop Publish returned wrong status code if not found
...
Deleting a publish that does not exist now results in a status code 404
instead of 500.
Fixes : #1006
2023-03-07 13:46:57 +01:00
Markus Muellner
ecc41f0c0f
replace AbortWithError calls by custom function that sets the content type correctly
2023-01-23 10:42:57 +01:00
Benj Fassbind
af899149c7
Fix wrong nil check for SkipBz2
2022-08-16 09:04:16 +02:00
Sjoerd Simons
f61514edaf
Allow disabling bzip2 compression for index files
...
Using bzip2 generates smaller index files (roughly 20% smaller Packages
files) but it comes with a big performance penalty. When publishing a
debian mirror snapshot (amd64, arm64, armhf, source) without contents
skipping bzip speeds things up around 1.8 times.
```
$ hyperfine -w 1 -L skip-bz2 true,false -m 3 -p "aptly -config aptly.conf publish drop bullseye || true" "aptly -config aptly.conf publish snapshot --skip-bz2={skip-bz2} --skip-contents --skip-signing bullseye"
Benchmark 1: aptly -config aptly.conf publish snapshot --skip-bz2=true --skip-contents --skip-signing bullseye
Time (mean ± σ): 35.567 s ± 0.307 s [User: 39.366 s, System: 10.075 s]
Range (min … max): 35.311 s … 35.907 s 3 runs
Benchmark 2: aptly -config aptly.conf publish snapshot --skip-bz2=false --skip-contents --skip-signing bullseye
Time (mean ± σ): 64.740 s ± 0.135 s [User: 68.565 s, System: 10.129 s]
Range (min … max): 64.596 s … 64.862 s 3 runs
Summary
'aptly -config aptly.conf publish snapshot --skip-bz2=true --skip-contents --skip-signing bullseye' ran
1.82 ± 0.02 times faster than 'aptly -config aptly.conf publish snapshot --skip-bz2=false --skip-contents --skip-signing bullseye'
```
Allow skipping bz2 creation for setups where faster publishing is more
important then Package file size.
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com >
2022-06-22 11:25:45 +02:00
Ximon Eighteen
5342e549cd
govet: compose literal uses unkeyed fields
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
ff51c46915
More informative return value for task.Process
2022-01-27 09:30:14 +01:00
Lorenzo Bolla
9b28d8984f
Configurable background task execution
2022-01-27 09:30:14 +01:00
Oliver Sauder
f09a273ad7
Add publish output progress counting remaining number of packages
2022-01-27 09:30:14 +01:00
Oliver Sauder
6ab5e60833
Add task api and resource locking ability
2022-01-27 09:30:14 +01:00
Oliver Sauder
1e7731c317
Removed obsolete RWMutexes
2022-01-27 09:30:14 +01:00
Oliver Sauder
208a2151c1
every go routine needs to have its own collection factory
...
this is needed so concurrent reads and writes are possible.
2022-01-27 09:30:14 +01:00
Andrey Smirnov
2c91bcdc30
Bump Go versions for Travis, fix tests
...
Replace gometalinter with golangci-lint.
Fix system tests (wheezy is gone, replace with stretch).
Fix linter warnings.
2019-07-04 00:16:12 +03:00
Andrey Smirnov
b8c5303fdb
Fix paths after repository transfer to aptly-dev
2018-04-18 21:19:43 +03:00
Harald Sitter
75c4d6da3b
properly expose AcquireByHash through the api
...
- new publish calls can now enable AcquireByHash by right away (previously
one would have had to create a new publishing endpoint and then
explicitly switch it to AcquireByHash)
- all json marshals of PublishedRepo now contain AcquireByHash (allows
inspecting if a given endpoint has AcquireByHash enabled already; also
enables verification that a switch/update actually applied a
potential AcquireByHash change
- update all tests to reflect that default state of AcquireByHash
- update creation and switch testing to explicitly toggle AcquireByHash to
make sure state mutation works as expected
2018-01-15 17:04:05 +01:00
Andrey Smirnov
43ddcd27cb
Fix race in API related to LoadComplete()
...
LoadComplete() modifies object, so it would cause issues if it runs
concurrently with other methods. Uprage mutex locks to write
locks when LoadComplete() is being used.
2017-12-13 12:40:06 +03:00
Oliver Sauder
092a7ed8f3
Rename AccessByHash to AcquireByHash for consistency with other flags
2017-11-30 09:46:02 +01:00
André Roth
bb2db7e500
Support Acquire-By-Hash for index files
...
The added "aptly publish repo" option "-access-by-hash" publishes
the index files (Packages*, Sources*) also as hardlinked hashes.
Example:
/dists/yakkety/main/binary-amd64/by-hash/SHA512/31833ec39acc...
The Release files indicate this with the option "Acquire-By-Hash: yes"
This is used by apt >= 1.2.0 and prevents the "Hash sum mismatch" race
condition between a server side "aptly publish repo" and "apt-get update"
on a client.
See: http://www.chiark.greenend.org.uk/~cjwatson/blog/no-more-hash-sum-mismatch-errors.html
This implementation uses symlinks in the by-hash/*/ directory for keeping
only two versions of the index files and deleting older files
automatically.
Note: this only works with aptly.FileSystemPublishedStorage
Closes : #536
Signed-off-by: André Roth <neolynx@gmail.com >
2017-11-30 09:46:02 +01:00
Andrey Smirnov
3756db2491
Upgrade gin-gonic to latest master, fix compatibility issues
2017-09-28 00:33:59 +03:00
Ludovico Cavedon
d6a3917141
Add -skip-cleanup option for publish commands.
...
Allow skipping unreferenced files cleanup on publish switch/update/drop
via the -skip-cleanup command line option.
Also support API SkipCleanup parameter.
Fixes #570 .
2017-08-15 19:08:17 -07:00
Andrey Smirnov
0e9f966dd1
Fix up other code to support new GPG provider structure
2017-07-21 01:01:58 +03:00
Oliver Sauder
e3f1880ad4
Added support for NotAutomatic, ButAutomaticUpgrades and Origin fields
2017-07-05 15:08:02 +02:00
Andrey Smirnov
1be8d39105
Refactor GPG signer/verifier
...
Goal is to make it easier to plug in another implementation.
2017-05-23 02:54:56 +03:00
Andrey Smirnov
470165a419
Enable goconst & interfacer linters
2017-05-17 00:53:10 +03:00
Andrey Smirnov
5ce6bf8718
Enable vetshadow linter
2017-05-04 23:00:13 +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
18d04c7977
Fix failure not being reported from API. #290
2016-03-01 12:52:54 +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
f8bca463bb
Add -force-drop to aptly publish drop, ?force=1 to DELETE publish/... to drop
...
published repositories even if cleanup fails. #153
2015-03-11 22:02:11 +03:00
Andrey Smirnov
01c0d19243
Fix bug with components not being cleaned up after publish update. #116
2015-03-03 20:49:49 +03:00
Andrey Smirnov
49a9ad79dd
Adjust return code for publish create call. #116
2015-03-01 22:31:56 +03:00
Andrey Smirnov
2f1afa54c2
Publish update/drop APIs, rework prefix, move publishing APIs. #116
2015-03-01 19:55:02 +03:00
Andrey Smirnov
e5d646c007
Merge branch 'sbadia-swift'
...
Conflicts:
AUTHORS
2015-02-21 01:08:48 +03:00
Andrey Smirnov
b323e315d1
Add comments where required.
2015-02-20 23:47:17 +03:00
Andrey Smirnov
88ff4493b0
Publish list API. #116
2015-02-20 11:12:16 +03:00
Andrey Smirnov
76ee53e9f8
Eliminate data races by using API without Progress. #116
2015-02-16 00:32:45 +03:00
Andrey Smirnov
24418ab0a4
Small fixes to publish update API. #174
2015-02-07 19:01:06 +03:00
Andrey Smirnov
ea8bfeb8a7
Merge branch 'feature/RepoUpdateAPI' of https://github.com/mkoval/aptly into mkoval-feature/RepoUpdateAPI
2015-02-07 18:52:29 +03:00
Andrey Smirnov
a4201a40d2
Allow to override architectures when publishing. #116
2015-02-07 18:36:42 +03:00
Michael Koval
a29034caa5
Implemented apiPublishUpdateSwitch.
2015-01-21 02:23:08 -05:00
Andrey Smirnov
98ca0cdf33
Publish repo REST API. #116
2015-01-07 16:11:34 +03:00