Move keys from gitinator to main namespace. Repository history could not be migrated at this time, but may be added retroactively in the near future

This commit is contained in:
idk
2021-09-09 14:18:23 -04:00
parent 2045114890
commit e8f6135e93
12 changed files with 790 additions and 1 deletions

60
debian/changelog vendored Normal file
View File

@@ -0,0 +1,60 @@
i2p-keyring (2019.09.21) unstable; urgency=medium
* Extend keys for two more years
-- zzz on i2p <zzz@i2pmail.org> Sat, 21 Sep 2019 12:00:00 +0000
i2p-keyring (2018.09.16) unstable; urgency=medium
* Extend keys for another year
-- zzz on i2p <zzz@i2pmail.org> Mon, 16 Sep 2018 12:00:00 +0000
i2p-keyring (2017.09.21) unstable; urgency=medium
* Fix for old GPG
-- zzz on i2p <zzz@i2pmail.org> Mon, 21 Sep 2017 12:00:00 +0000
i2p-keyring (2017.09.20) unstable; urgency=medium
* Fix incompatibility with new GPG
-- zzz on i2p <zzz@i2pmail.org> Mon, 20 Sep 2017 12:00:00 +0000
i2p-keyring (2017.09.18) unstable; urgency=medium
* Extend keys for another year
-- zzz on i2p <zzz@i2pmail.org> Mon, 18 Sep 2017 12:00:00 +0000
i2p-keyring (2016.10.01) unstable; urgency=medium
* Extend keys for another year
-- zzz on i2p <zzz@i2pmail.org> Sat, 01 Oct 2016 16:50:00 +0000
i2p-keyring (2015.10.02.1) unstable; urgency=medium
* Extend the subkey too
-- Kill Your TV <killyourtv@i2pmail.org> Fri, 02 Oct 2015 02:29:31 +0000
i2p-keyring (2015.10.02) unstable; urgency=medium
* Extend key for another yet
-- Kill Your TV <killyourtv@i2pmail.org> Fri, 02 Oct 2015 02:04:04 +0000
i2p-keyring (2014.09.25) unstable; urgency=medium
* Extend key for another year
-- Kill Your TV <killyourtv@i2pmail.org> Thu, 25 Sep 2014 17:20:29 +0000
i2p-keyring (2013.10.12) unstable; urgency=low
* Initial release
-- Kill Your TV <killyourtv@i2pmail.org> Sat, 12 Oct 2013 14:09:28 +0000

1
debian/compat vendored Normal file
View File

@@ -0,0 +1 @@
7

16
debian/control vendored Normal file
View File

@@ -0,0 +1,16 @@
Source: i2p-keyring
Section: misc
Priority: extra
Maintainer: zzz on i2p <zzz@i2pmail.org>
Build-Depends: debhelper (>= 7), gnupg
Standards-Version: 3.9.4
Package: i2p-keyring
Architecture: all
Depends: ${misc:Depends}, gnupg, coreutils (>= 7.4)
Recommends: killyourtv-keyring
Description: GnuPG keys of the I2P package repository
This package provides digital keys used for signing I2P's repositories.
Upon installation of this package, your APT trusted keyring will updated with
these keys. Upon removal of this package, the keys provided by this package
will be removed from the APT trusted keyring.

29
debian/copyright vendored Normal file
View File

@@ -0,0 +1,29 @@
This package was debianized by Modestas Vainius <modestas@vainius.eu> on
Mon, 03 Aug 2009 02:12:19 +0300.
Upstream Authors:
Modestas Vainius <modestas@vainius.eu>
Copyright:
Copyright: © 2009 Modestas Vainius <modestat@vainius.eu>
License of all content including debian packaging:
| This package is free software; you can redistribute it and/or modify
| it under the terms of the GNU General Public License as published by
| the Free Software Foundation; either version 2 of the License, or
| (at your option) any later version.
|
| This package is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
|
| You should have received a copy of the GNU General Public License
| along with this package; if not, write to the Free Software
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.

2
debian/install vendored Normal file
View File

@@ -0,0 +1,2 @@
i2p-archive-keyring.gpg usr/share/keyrings
i2p-archive-removed-keys.gpg usr/share/keyrings

124
debian/maint-script vendored Executable file
View File

@@ -0,0 +1,124 @@
#!/bin/sh
set -e
KEYRING=/usr/share/keyrings/i2p-archive-keyring.gpg
REMOVED_KEYS=/usr/share/keyrings/i2p-archive-removed-keys.gpg
TRUSTDB=`mktemp --tmpdir trustdb.gpg.XXXXXXXXXX`
# Run cleanup function on exit
trap cleanup 0
run_gpg() {
if [ -f "$TRUSTDB" ] && [ ! -s "$TRUSTDB" ]; then
rm -f "$TRUSTDB"
fi
gpg --homedir=/dev/null --secret-keyring=/dev/null --trustdb-name="$TRUSTDB" \
--batch --ignore-time-conflict --no-options --lock-never --no-auto-check-trustdb \
--no-default-keyring --no-use-agent "$@" 2>/dev/null
}
cleanup() {
if [ -f "$TRUSTDB" ]; then
rm -f "$TRUSTDB"
fi
}
list_keys() {
run_gpg --with-colons --list-keys "$@" | grep ^pub
}
print_key() {
echo "$1" | awk -F: 'BEGIN { ORS = "" } { print " " $5, $6, $10; if ($7) print " [ expires " $7 " ]"; }'
}
remove_keys() {
list_keys "$@" | while read key; do
id=`echo "$key" | cut -d: -f5`
if [ -n "`apt-key export $id 2>/dev/null`" ]; then
print_key "$key"
echo -n " ... "
apt-key del $id
fi
done
}
sync_keys() {
action="$1"
if [ -s "$KEYRING" ]; then
if [ "$action" = "update" ]; then
echo "Adding/refreshing keys:"
list_keys --keyring $KEYRING | while read key; do
print_key "$key"
echo
done
echo -n "... "
# doesn't work with new GPG
# apt-key add $KEYRING
run_gpg --keyring $KEYRING --export -a | apt-key add -
elif [ "$action" = "remove" ]; then
echo "Removing keys (if exist):"
remove_keys --keyring $KEYRING
else
echo "Internal error: unknown sync action '$action'" >&2
exit 2
fi
fi
if [ -s "$REMOVED_KEYS" ]; then
echo "Removing old keys (if exist):"
remove_keys --keyring $REMOVED_KEYS
fi
}
postinst() {
case "$1" in
configure)
sync_keys update
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "unrecognized postinst argument: $1" >&2
exit 1
;;
esac
}
prerm() {
case "$1" in
remove|purge)
sync_keys remove
;;
upgrade|deconfigure)
;;
failed-upgrade)
;;
*)
echo "unrecognized prerm argument: $1" >&2
exit 1
;;
esac
}
if [ ! -x /usr/bin/apt-key ]; then
exit 0
fi
case "$0" in
*prerm)
prerm "$@"
;;
*postinst)
postinst "$@"
;;
*)
echo "Unhandled script: $0" >&2
exit 1
;;
esac
exit 0

73
debian/rules vendored Executable file
View File

@@ -0,0 +1,73 @@
#!/usr/bin/make -f
KEYRING := ./i2p-archive-keyring.gpg
REMOVED_KEYS_KEYRING := ./i2p-archive-removed-keys.gpg
KEYRING_TMP := ./i2p-archive-keyring-tmp.gpg
REMOVED_KEYS_KEYRING_TMP := ./i2p-archive-removed-keys-tmp.gpg
GPG := gpg --homedir=gpghome --batch --ignore-time-conflict \
--secret-keyring=/dev/null --no-use-agent \
--no-options --lock-never --no-auto-check-trustdb \
--no-default-keyring
gpghome:
mkdir gpghome
chmod 0700 gpghome
$(KEYRING): $(wildcard keys/*) | gpghome
# Create a keyring from the keys in the keys/ directory
if [ -d keys ]; then \
$(GPG) --keyring $(KEYRING_TMP) --import keys/*; \
$(GPG) --keyring $(KEYRING_TMP) --export > $(KEYRING); \
else \
echo "No keys in the keys directory." >&2 && exit 1; \
fi
$(REMOVED_KEYS_KEYRING): $(wildcard removed-keys/*) | gpghome $(KEYRING)
# Create a keyring from the keys in the remove-keys/ directory
if [ -d removed-keys ]; then \
$(GPG) --keyring $(REMOVED_KEYS_KEYRING_TMP) --import removed-keys/*; \
$(GPG) --keyring $(REMOVED_KEYS_KEYRING_TMP) --export > $(REMOVED_KEYS_KEYRING); \
else \
touch $(REMOVED_KEYS_KEYRING); \
fi
build: $(KEYRING) $(REMOVED_KEYS_KEYRING)
clean:
dh_testdir
dh_testroot
dh_clean
rm -rf gpghome
rm -f *.gpg *.gpg~
rm -f debian/prerm debian/postinst
build-arch:
# dummy
build-indep:
#dummy
binary-arch:
#policy requires this.
binary-indep: build
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_install
dh_installman
dh_link
dh_compress
dh_fixperms
cp -a debian/maint-script debian/prerm
cp -a debian/maint-script debian/postinst
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep
.PHONY: clean binary-indep binary-arch binary build