create aptly-api package

This commit is contained in:
aviau
2018-06-22 14:22:48 -04:00
parent bda3b8dad2
commit 5add1af33b
11 changed files with 153 additions and 3 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"rootDir": "/var/lib/aptly-api"
}
+2
View File
@@ -0,0 +1,2 @@
# Default settings for aptly-api
LISTEN_ADDRESS='localhost:8080'
+1
View File
@@ -0,0 +1 @@
debian/aptly-api.conf etc
Vendored Executable
+57
View File
@@ -0,0 +1,57 @@
#!/bin/sh
# postinst script for aptly-api
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure|reconfigure)
# create an aptly-api group and user
if ! grep -q aptly-api /etc/passwd; then
adduser --system --home /var/lib/aptly-api --no-create-home aptly-api
addgroup --system aptly-api
adduser aptly-api aptly-api
fi
# setup /var/lib/aptly-api
if [ ! -d /var/lib/aptly-api ]; then
mkdir -p /var/lib/aptly-api
fi
chown aptly-api:aptly-api /var/lib/aptly-api
# set config file permissions
# it may contain secrets so it is not world readable
chown root:aptly-api /etc/aptly-api.conf
chmod 640 /etc/aptly-api.conf
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
+41
View File
@@ -0,0 +1,41 @@
#!/bin/sh
# postrm script for aptly-api
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
# Only remove /var/lib/aptly-api on purge
if [ "${1}" = "purge" ] ; then
rm -rf /var/lib/aptly-api
fi
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=Aptly API
After=network.target
Documentation=man:aptly(1)
[Service]
User=aptly-api
Group=aptly-api
WorkingDirectory=/var/lib/aptly-api
EnvironmentFile=/etc/default/aptly-api
ExecStart=/usr/bin/aptly api serve \
-config=/etc/aptly-api.conf \
-listen=${LISTEN_ADDRESS}
[Install]
WantedBy=multi-user.target
+1
View File
@@ -0,0 +1 @@
usr/bin/aptly
+1
View File
@@ -0,0 +1 @@
man/aptly.1
+6
View File
@@ -1,3 +1,9 @@
aptly (1.3.0-3) UNRELEASED; urgency=medium
* Create aptly-api package. (Closes: #902032)
-- Alexandre Viau <aviau@debian.org> Fri, 22 Jun 2018 13:51:50 -0400
aptly (1.3.0-2) unstable; urgency=medium
* Team upload, many thanks to Alexandre Viau for this work
+1 -1
View File
@@ -1 +1 @@
9
11
+24 -2
View File
@@ -2,7 +2,8 @@ Source: aptly
Section: utils
Priority: optional
Maintainer: Sebastien Delafond <seb@debian.org>
Build-Depends: debhelper (>= 9.0.0),
Uploaders: Alexandre Viau <aviau@debian.org>
Build-Depends: debhelper (>= 11),
dh-golang,
golang-any,
golang-go.tools,
@@ -19,7 +20,7 @@ Architecture: any
Depends: bzip2, xz-utils, gnupg, gpgv, ${shlibs:Depends}, ${misc:Depends}
Suggests: graphviz
Built-Using: ${misc:Built-Using}
Description: Swiss army knife for Debian repository management
Description: Swiss army knife for Debian repository management - main package
It offers several features making it easy to manage Debian package
repositories:
.
@@ -31,3 +32,24 @@ Description: Swiss army knife for Debian repository management
- controlled update of one or more packages in snapshot from upstream
mirror, tracking dependencies
- merge two or more snapshots into one
.
This is the main package, it contains the aptly command-line utility.
Package: aptly-api
Architecture: any
Depends: ${misc:Depends}, aptly, adduser
Built-Using: ${misc:Built-Using}
Description: Swiss army knife for Debian repository management - API
It offers several features making it easy to manage Debian package
repositories:
.
- make mirrors of remote Debian/Ubuntu repositories, limiting by
components/architectures
- take snapshots of mirrors at any point in time, fixing state of
repository at some moment of time
- publish snapshot as Debian repository, ready to be consumed by apt
- controlled update of one or more packages in snapshot from upstream
mirror, tracking dependencies
- merge two or more snapshots into one
.
This package contains the aptly-api service.