Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Univention: setup bareos.com repository
When the user specifies the UCR variables bareos/subscription/username and bareos/subscription/password, the download.bareos.com update repository is automatically configured in the file /etc/apt/sources.list.d/60_bareos.list
- Loading branch information
1 parent
d2c06e5
commit dc7920b
Showing
9 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
Version: GnuPG v2.0.15 (GNU/Linux) | ||
|
||
mQINBFXbK+sBEADHrDhXMa3bvy4f5MBwifTQswcXqiAkKQ5GRsHxMZIsJkq86Ewr | ||
vt2jOn+sXPiWLn/hSXNohUmWu63OKiCJFZ9TLAWzFM0T3vYeevB3XviEzLlMcQZx | ||
/dlCKpwa7B2dSISPsN1pe0Nnm0TKRUzIhEzYvwLs1mhBk0nJTrLMiuK+eJBnaI7R | ||
9nnf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2wI6l+scICc | ||
xmxnDugU8W1nt6uQYiTzwARwX3OhlM0y1yYpSPPXRLbB6Rtlt4N5HqCkHHuWIVrB | ||
Bo/iRQYh0wNCKjPGHucqsuO0WvRydQQAk0nrcdb/Mt+MQ7dic106i9+3Y78R9H7G | ||
t4pE/JWaTifssOdJwFJ+F0eTR0h142z9FNYk8xX03MqZvy0fn9FKHacgnQwcxmi3 | ||
90AktGPVIOEmTXtRblrEdbhfdBO2xBHFjF8OAxF7upynyHL8jFvJWs6w09d2C7ED | ||
NdnQp4QYJyd0Si/Wh+p+BqRw51AYO1hD829MZ8RwRTOx+6jX3OOMoakZfFb3N7wI | ||
wjFhJ4hGBBMRAgAGBQJV2yvsAAoJEEBeC+De1+v6IgUAoMMoIi5I/6E9E7ptCS+m | ||
KxSlUhJ5AJ4rBchfkK22BoPCnE0ErHBlVPN6cw== | ||
=Y033 | ||
-----END PGP PUBLIC KEY BLOCK----- |
42 changes: 42 additions & 0 deletions
42
platforms/univention/conffiles/etc/apt/sources.list.d/60_bareos.list.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@%@UCRWARNING=#@%@ | ||
|
||
@!@ | ||
import subprocess | ||
import sys | ||
from urllib import quote | ||
|
||
username = configRegistry.get('bareos/subscription/username', '') | ||
password = configRegistry.get('bareos/subscription/password', '') | ||
|
||
if username and password: | ||
|
||
bareos_major_version = @MAJOR_VERSION@ | ||
#bareos_sign_key_id = 'F93C028C093BFBA2' | ||
|
||
ucs_version = configRegistry.get('version/version') | ||
bareos_univention_dist = 'Univention_4.0' | ||
|
||
# | ||
# example: | ||
# http://download.bareos.com/bareos/release/15.2/Univention_4.0/ | ||
# https does not work on UCS 4.0, even if apt-transport-https is installed. | ||
# | ||
bareos_com_url = "http://{username}:{password}@download.bareos.com/bareos/release/{version}/{dist}".format(username=quote(username), password=password, version=bareos_major_version, dist=bareos_univention_dist) | ||
|
||
# import the bareos signing key from a keyserver (does work, if internet connection is available) | ||
#cmd = subprocess.Popen(['apt-key', 'adv', '--keyserver', 'pool.sks-keyservers.net', '--recv-key', bareos_sign_key_id], stdout=sys.stderr, stderr=sys.stderr) | ||
sys.stderr.write("importing bareos.com release key: ") | ||
cmd = subprocess.Popen(['apt-key', 'add', '/etc/bareos/bareos-com-release.key'], stdout=sys.stderr, stderr=sys.stderr) | ||
rc = cmd.wait() | ||
#sys.stderr.write("rc=" + str(rc) + "\n") | ||
|
||
print "deb {url} /".format(url=bareos_com_url) | ||
|
||
else: | ||
|
||
print "# The bareos.com repository is disabled." | ||
print "# To enable it, you must have a valid Bareos subscription." | ||
print "# Specify your Bareos credentials in the UCR variables" | ||
print "# 'bareos/subscription/username' and" | ||
print "# 'bareos/subscription/password'." | ||
@!@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
DEST=${1:-bareos-com-release.key} | ||
|
||
if [ -z "@OBS_DISTRIBUTION@" ]; then | ||
echo "OBS_DISTRIBUTION not defined, skipped." | ||
exit 0 | ||
fi | ||
|
||
# use bareos.org Release.key, | ||
# as it is identical with the bareos.com key and we do not require a authentication. | ||
URL_BRANCH="http://download.bareos.org/bareos/release/@MAJOR_VERSION@/@OBS_DISTRIBUTION@/Release.key" | ||
URL_MASTER="http://download.bareos.org/bareos/experimental/nightly/@OBS_DISTRIBUTION@/Release.key" | ||
|
||
wget -O "$DEST" "$URL_BRANCH" || wget -O "$DEST" "$URL_MASTER" | ||
exit $? | ||
|