update from official debian packaging

This commit is contained in:
André Roth
2024-11-15 14:59:07 +01:00
parent 92bff40eb4
commit 9150a75886
11 changed files with 29 additions and 91 deletions
+1
View File
@@ -0,0 +1 @@
mv_conffile /etc/aptly-api.conf /etc/aptly.conf 1.6~
Vendored Regular → Executable
+9 -39
View File
@@ -1,28 +1,13 @@
#!/bin/sh #!/bin/sh
#
# see: dh_installdeb(1)
set -e 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
# source debconf library # source debconf library
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
case "$1" in case "$1" in
configure) configure|reconfigure)
# create an aptly group and user # create an aptly-api group and user
if ! getent passwd aptly-api > /dev/null; then if ! getent passwd aptly-api > /dev/null; then
useradd --system --user-group --create-home --home-dir /var/lib/aptly-api aptly-api useradd --system --user-group --create-home --home-dir /var/lib/aptly-api aptly-api
fi fi
@@ -30,32 +15,17 @@ case "$1" in
# set config file permissions not world readable as it may contain secrets # set config file permissions not world readable as it may contain secrets
chown root:aptly-api /etc/aptly.conf chown root:aptly-api /etc/aptly.conf
chmod 640 /etc/aptly.conf chmod 640 /etc/aptly.conf
;;
if [ -f /etc/aptly-api.conf.migrate ]; then abort-upgrade|abort-remove|abort-deconfigure)
rootDir=`grep rootDir /etc/aptly-api.conf.migrate | sed 's_/var/lib/aptly-api_~_' | sed -n 's/.\+: "\([^"]\+\)".*/\1/p'` ;;
if [ -n "$rootDir" ]; then
sed -i 's/\(.*"rootDir": "\)[^"]*\(".*\)/\1'$rootDir'\2/' /etc/aptly.conf
fi
echo "backing up /etc/aptly-api.conf to /etc/aptly-api.conf.old..."
mv /etc/aptly-api.conf.migrate /etc/aptly-api.conf.old
fi
;;
abort-upgrade|abort-remove|abort-deconfigure) *)
exit 0 echo "postinst called with unknown argument \`$1'" >&2
;; exit 1
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER# #DEBHELPER#
db_stop
exit 0 exit 0
Vendored Regular → Executable
-18
View File
@@ -1,24 +1,9 @@
#!/bin/sh #!/bin/sh
#
# see: dh_installdeb(1)
set -e set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in case "$1" in
install|upgrade) install|upgrade)
if [ -f /etc/aptly-api.conf ]; then
echo "migrating /etc/aptly-api.conf ..."
mv /etc/aptly-api.conf /etc/aptly-api.conf.migrate
fi
;; ;;
abort-upgrade) abort-upgrade)
@@ -30,9 +15,6 @@ case "$1" in
;; ;;
esac esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER# #DEBHELPER#
exit 0 exit 0
+1
View File
@@ -0,0 +1 @@
completion.d/aptly
+2 -6
View File
@@ -1,6 +1,2 @@
build/aptly usr/bin/ usr/bin/aptly
README.rst usr/share/aptly/ completion.d/_aptly usr/share/zsh/vendor-completions
LICENSE usr/share/aptly/
AUTHORS usr/share/aptly/
completion.d/_aptly usr/share/zsh/vendor-completions/
completion.d/aptly usr/share/bash-completion/completions/
+1
View File
@@ -0,0 +1 @@
man/aptly.1
-1
View File
@@ -1 +0,0 @@
11
+8 -9
View File
@@ -1,9 +1,9 @@
Source: aptly Source: aptly
Section: devel Section: utils
Priority: optional Priority: optional
Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org> Maintainer: André Roth <neolynx@gmail.com>
Uploaders: TODO <admin@lepton.exnihilo> Build-Depends: bash-completion,
Build-Depends: debhelper (>= 11), debhelper-compat (= 13),
dh-golang, dh-golang,
golang-go, golang-go,
golang-github-aleksi-pointer-dev, golang-github-aleksi-pointer-dev,
@@ -78,12 +78,11 @@ Build-Depends: debhelper (>= 11),
golang-go.uber-zap-dev, golang-go.uber-zap-dev,
golang-etcd-server-dev (>= 3.5.15-7), golang-etcd-server-dev (>= 3.5.15-7),
git git
Standards-Version: 4.2.1 Standards-Version: 4.7.0
Homepage: https://github.com/aptly-dev/aptly Homepage: https://www.aptly.info
Vcs-Browser: https://salsa.debian.org/go-team/packages/aptly Vcs-Git: https://github.com/aptly-dev/aptly.git
Vcs-Git: https://salsa.debian.org/go-team/packages/aptly.git Vcs-Browser: https://github.com/aptly-dev/aptly
XS-Go-Import-Path: github.com/aptly-dev/aptly XS-Go-Import-Path: github.com/aptly-dev/aptly
Testsuite: autopkgtest-pkg-go
Package: aptly Package: aptly
Architecture: any Architecture: any
-1
View File
@@ -1,7 +1,6 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: aptly Upstream-Name: aptly
Source: http://www.aptly.info Source: http://www.aptly.info
Files-Excluded: vendor/*
Files: * Files: *
Copyright: 2014 Andrey Smirnov <me@smira.ru> Copyright: 2014 Andrey Smirnov <me@smira.ru>
+1
View File
@@ -0,0 +1 @@
src/github.com/aptly-dev/aptly/man/aptly.1
+6 -17
View File
@@ -8,36 +8,25 @@ export DEB_BUILD_OPTIONS=crossbuildcanrunhostbinaries
export GOARCH := $(shell if [ $(DEB_TARGET_ARCH) = "i386" ]; then echo "386"; elif [ $(DEB_TARGET_ARCH) = "armhf" ]; then echo "arm"; else echo $(DEB_TARGET_ARCH); fi) export GOARCH := $(shell if [ $(DEB_TARGET_ARCH) = "i386" ]; then echo "386"; elif [ $(DEB_TARGET_ARCH) = "armhf" ]; then echo "arm"; else echo $(DEB_TARGET_ARCH); fi)
%: %:
dh $@ --buildsystem=golang --with=golang dh $@ --buildsystem=golang --with=golang,bash-completion
override_dh_auto_clean: override_dh_auto_clean:
rm -rf build/ rm -rf build/
rm -rf obj-$(DEB_TARGET_GNU_TYPE)/ rm -rf obj-$(DEB_TARGET_GNU_TYPE)/
dh_auto_clean dh_auto_clean
override_dh_auto_build:
echo $(DEB_VERSION) > VERSION
go build -o build/aptly
# when dependencies fully debianized:
# echo $(DEB_VERSION) > obj-$(DEB_TARGET_GNU_TYPE)/src/github.com/aptly-dev/aptly/VERSION
# dh_auto_build
override_dh_auto_test: override_dh_auto_test:
# disabled
override_dh_auto_install: override_dh_auto_install:
dh_auto_install -- --no-source dh_auto_install -- --no-source
mkdir -p build
test -f debian/tmp/usr/bin/aptly && mv debian/tmp/usr/bin/aptly build/ || true
mkdir -p debian/aptly/usr/share/man/man1/
cp man/aptly.1 debian/aptly/usr/share/man/man1
gzip debian/aptly/usr/share/man/man1/aptly.1
override_dh_strip:
dh_strip --dbg-package=aptly-dbg
# only with full debian dependencies: # only with full debian dependencies:
override_dh_golang: override_dh_golang:
# not needed with golang, fails with cross compiling # not needed with golang, fails with cross compiling
# override_dh_makeshlibs: # override_dh_makeshlibs:
override_dh_auto_build:
echo $(DEB_VERSION) > VERSION
go build -o build/aptly