summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Phillips2018-01-29 22:59:12 -0800
committerJulian Phillips2018-01-29 22:59:12 -0800
commit861e8990a0ecb705ed605c8eafbd12f7f9d5e989 (patch)
tree6296551c69b86be02774f767b828ce77b31383b8
parent76a70b545094b0b10eb8dfb268f63d2cfc2095a9 (diff)
downloadaur-861e8990a0ecb705ed605c8eafbd12f7f9d5e989.tar.gz
Moved nose & coverage pkgs to checkdepends. Pull Arch support from Github PR.
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD21
-rw-r--r--arch.py49
3 files changed, 16 insertions, 64 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dc910a8fd4bf..5e55b8f45a21 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = sos
pkgdesc = A unified tool for collecting system logs and other debug information
pkgver = 3.5
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/sosreport/sos
arch = any
license = GPL2
+ checkdepends = python-nose
+ checkdepends = python-coverage
makedepends = python-sphinx
- makedepends = python-nose
- makedepends = python-coverage
depends = python
depends = python-six
depends = python-lxml
@@ -16,10 +16,10 @@ pkgbase = sos
backup = etc/sos.conf
source = https://github.com/sosreport/sos/archive/3.5.tar.gz
source = https://github.com/sosreport/sos/commit/0b30e8f72c3c669455209d15b1eb01de20c7d578.patch
- source = arch.py
+ source = https://patch-diff.githubusercontent.com/raw/sosreport/sos/pull/1198.patch
sha256sums = f62df231dd3c86a54645989f943bac6f5fdf45ffb210f4b76b4a5cc565296902
sha256sums = acf581080bad7772f10e183d18a2d1c2cf9bd9be91ee490e38ef5c5647859d6c
- sha256sums = 8a6565c1f7cd59ee9de3fc3896cafbf270a8e135e752901e8527471a7a405774
+ sha256sums = a57c89078c6ccbb99a2b5e5ff939979f8283ec4f68aa258d743634106607b950
pkgname = sos
diff --git a/PKGBUILD b/PKGBUILD
index e6fae7e1e589..4bf6f2f30382 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: chr0mag <phillips.julian AT gmail DOT com>
pkgname=sos
pkgver=3.5
-pkgrel=3
+pkgrel=4
epoch=
pkgdesc="A unified tool for collecting system logs and other debug information"
arch=('any')
@@ -13,8 +13,8 @@ depends=('python'
'python-lxml'
'xz'
'tar')
-makedepends=('python-sphinx' 'python-nose' 'python-coverage')
-checkdepends=()
+makedepends=('python-sphinx')
+checkdepends=('python-nose' 'python-coverage')
optdepends=()
provides=()
conflicts=()
@@ -24,20 +24,23 @@ options=()
install=
changelog=
_urlparsefix="0b30e8f72c3c669455209d15b1eb01de20c7d578.patch"
-source=("https://github.com/sosreport/sos/archive/$pkgver.tar.gz" "https://github.com/sosreport/sos/commit/$_urlparsefix" "arch.py")
+_archpullreq="1198.patch"
+source=("https://github.com/sosreport/sos/archive/$pkgver.tar.gz"
+ "https://github.com/sosreport/sos/commit/$_urlparsefix"
+ "https://patch-diff.githubusercontent.com/raw/sosreport/sos/pull/$_archpullreq")
noextract=()
md5sums=()
sha256sums=('f62df231dd3c86a54645989f943bac6f5fdf45ffb210f4b76b4a5cc565296902'
'acf581080bad7772f10e183d18a2d1c2cf9bd9be91ee490e38ef5c5647859d6c'
- '8a6565c1f7cd59ee9de3fc3896cafbf270a8e135e752901e8527471a7a405774')
+ 'a57c89078c6ccbb99a2b5e5ff939979f8283ec4f68aa258d743634106607b950')
validpgpkeys=()
prepare() {
cd "$pkgname-$pkgver"
# fix for: https://github.com/sosreport/sos/commit/0b30e8f72c3c669455209d15b1eb01de20c7d578
- patch sos/plugins/haproxy.py < ../../$_urlparsefix
- #add basic Arch policy
- cp ../../arch.py sos/policies
+ patch --strip=1 < ../../$_urlparsefix
+ #add basic Arch support
+ patch --strip=1 < ../../$_archpullreq
}
build() {
@@ -57,6 +60,4 @@ package() {
mkdir ${pkgdir}/usr/bin
mv ${pkgdir}/usr/sbin/sosreport ${pkgdir}/usr/bin
rmdir ${pkgdir}/usr/sbin
- #workaround for: https://github.com/sosreport/sos/issues/77
- #sed --in-place 's/#disable = rpm, selinux, dovecot/disable = rpm, selinux, dovecot, sunrpc, nfsserver, distupgrade/' ${pkgdir}/etc/sos.conf
}
diff --git a/arch.py b/arch.py
deleted file mode 100644
index 7cac74fd864d..000000000000
--- a/arch.py
+++ /dev/null
@@ -1,49 +0,0 @@
-import os
-from sos.policies import PackageManager, LinuxPolicy
-from sos.plugins import Plugin
-from sos.utilities import shell_out
-
-class ArchPolicy(LinuxPolicy):
-
- distro = "Arch Linux"
- vendor = "Arch Linux"
- vendor_url = "https://www.archlinux.org/"
- vendor_text = ""
- #package_manager = PackageManager("pacman --query | awk 'BEGIN {OFS = \"|\"} {print $1,$2}'")
- valid_subclasses = [Plugin]
-
- def __init__(self, sysroot=None):
- super(LinuxPolicy, self).__init__(sysroot=sysroot)
- self.package_manager = Pacman()
-
- @classmethod
- def check(cls):
- """This method checks to see if we are running on Arch.
- It returns True or False."""
- try:
- with open('/etc/os-release', 'r') as f:
- return "archlinux" in f.read()
- except:
- return False
-
-# this subclass is only needed because sos_get_command_output()
-# in utilities.py sets shell=False so the pipe to awk in the
-# command below used to format pacman output does not work
-# pacman --query | awk 'BEGIN {OFS = \"|\"} {print $1,$2}'
-class Pacman(PackageManager):
-
- def get_pkg_list(self):
- cmd = "pacman --query"
- pkg_list = shell_out(
- cmd, timeout=0, chroot=self.chroot
- ).splitlines()
-
- for pkg in pkg_list:
- name, version = pkg.split()
- self.packages[name] = {
- 'name': name,
- 'version': version.split(".")
- }
-
- return self.packages
-