3
# Copyright 2014 Canonical Ltd.
5
# This program is free software: you can redistribute it and/or modify it
6
# under the terms of the GNU Affero General Public License version 3, as
7
# published by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12
# PURPOSE. See the GNU Affero General Public License for more details.
14
# You should have received a copy of the GNU Affero General Public License
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
22
from cupstream2distro.settings import BOT_KEY
26
logging.basicConfig(level=logging.INFO)
27
parser = argparse.ArgumentParser(description="Resign source packages "
28
"with the key with right "
30
parser.add_argument("-k", "--gnupg-keyid",
32
help="Bot GPG key ID")
33
parser.add_argument("-l", "--content-url", required=True,
34
help="The url where the changes is stored")
35
parser.add_argument("-d", "--debug", action="store_true",
36
default=False, help="Enable debug infos")
37
args = parser.parse_args()
42
logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO,
43
format="%(asctime)s %(levelname)s %(message)s")
44
cmd = ["debsign", "-k{}".format(args.gnupg_keyid), "--re-sign",
47
logging.info("Running command {}".format(cmd))
48
subprocess.check_call(cmd)
50
logging.exception("Signing failed")
53
if __name__ == '__main__':