From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 31D4C138334 for ; Tue, 13 Aug 2019 01:35:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2565BE082F; Tue, 13 Aug 2019 01:35:29 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B64B2E082F for ; Tue, 13 Aug 2019 01:35:28 +0000 (UTC) Received: from localhost.localdomain (unknown [100.42.98.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 3C9C93499E9; Tue, 13 Aug 2019 01:35:27 +0000 (UTC) From: Zac Medico To: gentoo-portage-dev@lists.gentoo.org Cc: Aaron Bauman , Zac Medico Subject: [gentoo-portage-dev] [PATCH] glsa-check moved to portage repository (bug 463952) Date: Mon, 12 Aug 2019 18:35:09 -0700 Message-Id: <20190813013509.14998-1-zmedico@gentoo.org> X-Mailer: git-send-email 2.21.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 260bf434-31a6-49ea-92f0-2dd60aa88bdb X-Archives-Hash: 347d8c8caffb75181ad397bb2aee43b4 This copy of glsa-check is no longer need since it has moved to the portage repository. Bug: https://bugs.gentoo.org/463952 Signed-off-by: Zac Medico --- README | 1 - bin/glsa-check | 418 ------------------ man/glsa-check.1 | 66 --- pym/gentoolkit/glsa/__init__.py | 741 -------------------------------- setup.py | 2 - 5 files changed, 1228 deletions(-) delete mode 100755 bin/glsa-check delete mode 100644 man/glsa-check.1 delete mode 100644 pym/gentoolkit/glsa/__init__.py diff --git a/README b/README index e122086..4ec4fc9 100644 --- a/README +++ b/README @@ -29,7 +29,6 @@ equery - replacement for etcat and qpkg eread - script to read portage log items from einfo, ewarn etc. eshowkw - Display keywords for specified package(s) euse - tool to manage USE flags -glsa-check - tool to manage GLSA's (Gentoo Linux Security Advisory) imlate - Displays candidates for keywords for an architecture... qpkg - convient package query tool (deprecated) revdep-rebuild - scans/fixes broken shared libs and binaries diff --git a/bin/glsa-check b/bin/glsa-check deleted file mode 100755 index 3f691b8..0000000 --- a/bin/glsa-check +++ /dev/null @@ -1,418 +0,0 @@ -#!/usr/bin/python - -# $Header: $ -# This program is licensed under the GPL, version 2 - -import sys -import os -import codecs -from functools import reduce - -import portage -from portage.output import * - -from getopt import getopt, GetoptError - -__program__ = "glsa-check" -__author__ = "Marius Mauch " -__version__ = "git" - -optionmap = [ -["-l", "--list", "list the GLSAs"], -["-d", "--dump", "--print", "show all information about the GLSAs"], -["-t", "--test", "test if this system is affected by the GLSAs"], -["-p", "--pretend", "show the necessary steps to apply the GLSAs"], -["-f", "--fix", "try to auto-apply the GLSAs (experimental)"], -["-i", "--inject", "inject the given GLSA into the glsa_injected file"], -["-n", "--nocolor", "disable colors (option)"], -["-e", "--emergelike", "upgrade to latest version (not least-change, option)"], -["-h", "--help", "show this help message"], -["-V", "--version", "some information about this tool"], -["-v", "--verbose", "print more information (option)"], -["-c", "--cve", "show CVE ids in listing mode (option)"], -["-q", "--quiet", "be less verbose and do not send empty mail (option)"], -["-m", "--mail", "send a mail with the given GLSAs to the administrator"], -] - -# print a warning as this is beta code (but proven by now, so no more warning) -#sys.stderr.write("WARNING: This tool is completely new and not very tested, so it should not be\n") -#sys.stderr.write("used on production systems. It's mainly a test tool for the new GLSA release\n") -#sys.stderr.write("and distribution system, it's functionality will later be merged into emerge\n") -#sys.stderr.write("and equery.\n") -#sys.stderr.write("Please read http://www.gentoo.org/proj/en/portage/glsa-integration.xml\n") -#sys.stderr.write("before using this tool AND before reporting a bug.\n\n") - -# option parsing -args = [] -params = [] -try: - args, params = getopt(sys.argv[1:], "".join([o[0][1] for o in optionmap]), \ - [x[2:] for x in reduce(lambda x,y: x+y, [z[1:-1] for z in optionmap])]) - args = [a for a, b in args] - - for option in ["--nocolor", "-n"]: - if option in args: - nocolor() - args.remove(option) - - verbose = False - for option in ["--verbose", "-v"]: - if option in args: - verbose = True - args.remove(option) - - list_cve = False - for option in ["--cve", "-c"]: - if option in args: - list_cve = True - args.remove(option) - - least_change = True - for option in ["--emergelike", "-e"]: - if option in args: - least_change = False - args.remove(option) - - quiet = False - for option in ["--quiet", "-q"]: - if option in args: - quiet = True - args.remove(option) - - - # sanity checking - if len(args) <= 0: - sys.stderr.write("no option given: what should I do ?\n") - mode = "HELP" - elif len(args) > 1: - sys.stderr.write("please use only one command per call\n") - mode = "HELP" - else: - # in what mode are we ? - args = args[0] - for m in optionmap: - if args in [o for o in m[:-1]]: - mode = m[1][2:] - -except GetoptError as e: - sys.stderr.write("unknown option given: ") - sys.stderr.write(str(e)+"\n") - mode = "HELP" - -# we need a set of glsa for most operation modes -if len(params) <= 0 and mode in ["fix", "test", "pretend", "dump", "inject", "mail"]: - sys.stderr.write("\nno GLSA given, so we'll do nothing for now. \n") - sys.stderr.write("If you want to run on all GLSA please tell me so \n") - sys.stderr.write("(specify \"all\" as parameter)\n\n") - mode = "HELP" -elif len(params) <= 0 and mode == "list": - params.append("affected") - -# show help message -if mode == "help" or mode == "HELP": - msg = "Syntax: glsa-check