diff options
author | Mark Austin | 2022-06-08 18:00:55 -0400 |
---|---|---|
committer | Mark Austin | 2022-06-08 18:00:55 -0400 |
commit | e7a02bc0a6ac4ca72caa7cfb1b4bb9a5f72bda0b (patch) | |
tree | 7a57cf22dccc87e81f57d4814c534291cfe78be9 | |
download | aur-e7a02bc0a6ac4ca72caa7cfb1b4bb9a5f72bda0b.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 52 | ||||
-rw-r--r-- | PKGBUILD | 123 | ||||
-rw-r--r-- | setroubleshoot-sysusers.conf | 1 | ||||
-rw-r--r-- | setroubleshoot.logrotate | 6 | ||||
-rw-r--r-- | setroubleshoot.tmpfiles | 1 |
5 files changed, 183 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4f4fb34efcce --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,52 @@ +pkgbase = setroubleshoot-git + pkgdesc = Provides tools to help diagnose SELinux problems + pkgver = 3.3.29.r45.g116e3e6 + pkgrel = 1 + url = https://gitlab.com/setroubleshoot + arch = x86_64 + arch = aarch64 + groups = selinux + license = GPL2 + makedepends = audit + makedepends = dbus + makedepends = desktop-file-utils + makedepends = gtk3 + makedepends = libnotify + makedepends = libreport + makedepends = policycoreutils + makedepends = polkit + makedepends = python-dasbus + makedepends = python-gobject + makedepends = python-pydbus + makedepends = python-slip + makedepends = python-systemd + makedepends = xdg-utils + source = https://gitlab.com/setroubleshoot/setroubleshoot#branch=main + source = setroubleshoot.logrotate + source = setroubleshoot.tmpfiles + source = setroubleshoot-sysusers.conf + sha256sums = 894a75c33d568f908f0c3fa7fe4d7f82824369695194aa005fe42cf961298893 + sha256sums = eb7321b7db2fd8951c7ce3c7c42680fcfe7641c3d7be9e8d69a8fbb992a9d086 + sha256sums = fa20d1ec3522aa877fc5462d56692b318b4c8af1cd9ecb62ec41ad6647662d77 + +pkgname = setroubleshoot-git + pkgdesc = Provides tools to help diagnose SELinux problems - GUI + depends = setroubleshoot-server + depends = hicolor-icon-theme + depends = python + +pkgname = setroubleshoot-server-git + pkgdesc = SELinux troubleshoot server + depends = audit + depends = dbus + depends = desktop-file-utils + depends = gtk3 + depends = libnotify + depends = libreport + depends = policycoreutils + depends = polkit + depends = python-gobject + depends = python-pydbus + depends = python-slip + depends = python-systemd + depends = xdg-utils diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..da392a501d94 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,123 @@ +# Maintainer: Mark Austin <ganthore@gmail.com> +# Contributor: Nicolas Iooss (nicolas <dot> iooss <at> m4x <dot> org) + +# This package is forked from https://aur.archlinux.org/packages/setroubleshoot +# +# This package was created to use the new upstream URL and workaround a build +# problem due to the depreciation of python-formatter. +# Issue: +# https://gitlab.com/setroubleshoot/setroubleshoot/-/commit/838f53a97ce44ea0f8f4d361afcb62a441f8633f + +pkgbase=setroubleshoot-git +pkgname=(setroubleshoot-git setroubleshoot-server-git) +pkgver=3.3.29.r45.g116e3e6 +pkgrel=1 +pkgdesc="Provides tools to help diagnose SELinux problems" +groups=('selinux') +arch=('x86_64' 'aarch64') +url='https://gitlab.com/setroubleshoot' +license=('GPL2') +conflicts=("setroubleshoot" "setroubleshoot-server") +provides=("setroubleshoot" "setroubleshoot-server" "setroubleshoot-git" "setroubleshoot-server-git") +makedepends=('audit' 'dbus' 'desktop-file-utils' 'gtk3' 'libnotify' 'libreport' + 'policycoreutils' 'polkit' 'python-gobject' 'python-pydbus' + 'python-slip' 'python-systemd' 'xdg-utils' 'python-dasbus') +source=( + 'setroubleshoot-git::git+https://gitlab.com/setroubleshoot/setroubleshoot#branch=main' + 'setroubleshoot.logrotate' + 'setroubleshoot.tmpfiles' + 'setroubleshoot-sysusers.conf' +) +sha256sums=('SKIP' + '894a75c33d568f908f0c3fa7fe4d7f82824369695194aa005fe42cf961298893' + 'eb7321b7db2fd8951c7ce3c7c42680fcfe7641c3d7be9e8d69a8fbb992a9d086' + 'fa20d1ec3522aa877fc5462d56692b318b4c8af1cd9ecb62ec41ad6647662d77') + +pkgver() { + cd "$pkgname" + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${pkgbase}" + export PYTHON=/usr/bin/python + ./autogen.sh + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --localstatedir=/var/lib \ + --with-auditpluginsdir=/etc/audisp/plugins.d + make +} + +package_setroubleshoot-git() { + pkgdesc="Provides tools to help diagnose SELinux problems - GUI" + depends=('setroubleshoot-server' 'hicolor-icon-theme' 'python') + + cd "${pkgbase}" + make DESTDIR="${pkgdir}" install + + # Remove setroubleshoot-server files + rm "${pkgdir}/etc/audisp/plugins.d/sedispatch.conf" + rmdir "${pkgdir}/etc/audisp/plugins.d" + rmdir "${pkgdir}/etc/audisp" + rm -r "${pkgdir}/etc/dbus-1/system.d" + rmdir "${pkgdir}/etc/dbus-1" + rm "${pkgdir}/etc/setroubleshoot/setroubleshoot.conf" + rmdir "${pkgdir}/etc/setroubleshoot" + rm "${pkgdir}/usr/bin/sedispatch" + rm "${pkgdir}/usr/bin/setroubleshootd" + rm -r "${pkgdir}/usr/lib/$(/usr/bin/python -c 'import sys;print("python%d.%d" % sys.version_info[:2])')/" + rmdir "${pkgdir}/usr/lib" + rm "${pkgdir}/usr/share/dbus-1/system-services/org.fedoraproject.Setroubleshootd.service" + rm "${pkgdir}/usr/share/dbus-1/system-services/org.fedoraproject.SetroubleshootFixit.service" + rm "${pkgdir}/usr/share/dbus-1/system-services/org.fedoraproject.SetroubleshootPrivileged.service" + rmdir "${pkgdir}/usr/share/dbus-1/system-services" + rm -r "${pkgdir}/usr/share/doc/" + rm -r "${pkgdir}/usr/share/locale/" + rm "${pkgdir}/usr/share/man/man8/sedispatch.8" + rm "${pkgdir}/usr/share/man/man8/setroubleshootd.8" + rm "${pkgdir}/usr/share/polkit-1/actions/org.fedoraproject.setroubleshootfixit.policy" + rmdir "${pkgdir}/usr/share/polkit-1/actions" + rmdir "${pkgdir}/usr/share/polkit-1" + rm "${pkgdir}/usr/share/setroubleshoot/SetroubleshootFixit.py" + rm "${pkgdir}/usr/share/setroubleshoot/SetroubleshootPrivileged.py" + rm "${pkgdir}/usr/share/metainfo/setroubleshoot.appdata.xml" +} + +package_setroubleshoot-server-git() { + pkgdesc="SELinux troubleshoot server" + # FIXME: split the dependencies between setroubleshoot-server and setroubleshoot + depends=('audit' 'dbus' 'desktop-file-utils' 'gtk3' 'libnotify' 'libreport' + 'policycoreutils' 'polkit' 'python-gobject' 'python-pydbus' + 'python-slip' 'python-systemd' 'xdg-utils') + + cd "${pkgbase}" + make DESTDIR="${pkgdir}" install + + mkdir -p "${pkgdir}/var/lib/${pkgname}" + touch "${pkgdir}/var/lib/${pkgname}/setroubleshoot_database.xml" + touch "${pkgdir}/var/lib/${pkgname}/email_alert_recipients" + + install -m644 -D "${srcdir}/setroubleshoot.logrotate" "${pkgdir}/etc/logrotate.d/${pkgname}" + install -m644 -D "${srcdir}/setroubleshoot.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" + install -m644 -D "${srcdir}/setroubleshoot-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf" + + chmod 750 "${pkgdir}/etc/audisp/plugins.d/" + + # Remove setroubleshoot files + rm "${pkgdir}/etc/xdg/autostart/sealertauto.desktop" + rmdir "${pkgdir}/etc/xdg/autostart" + rmdir "${pkgdir}/etc/xdg" + rm "${pkgdir}/usr/bin/sealert" + rm "${pkgdir}/usr/bin/seapplet" + rm "${pkgdir}/usr/share/applications/setroubleshoot.desktop" + rmdir "${pkgdir}/usr/share/applications" + rm "${pkgdir}/usr/share/dbus-1/services/sealert.service" + rmdir "${pkgdir}/usr/share/dbus-1/services" + rm -r "${pkgdir}/usr/share/icons/" + rm "${pkgdir}/usr/share/man/man1/seapplet.1" + rm "${pkgdir}/usr/share/man/man8/sealert.8" + rm -r "${pkgdir}/usr/share/setroubleshoot/gui/" +} diff --git a/setroubleshoot-sysusers.conf b/setroubleshoot-sysusers.conf new file mode 100644 index 000000000000..622cc6bfec03 --- /dev/null +++ b/setroubleshoot-sysusers.conf @@ -0,0 +1 @@ +u setroubleshoot - "SELinux troubleshoot utility" /var/lib/setroubleshoot /bin/nologin diff --git a/setroubleshoot.logrotate b/setroubleshoot.logrotate new file mode 100644 index 000000000000..4e1062a08158 --- /dev/null +++ b/setroubleshoot.logrotate @@ -0,0 +1,6 @@ +/var/log/setroubleshoot/*.log { + weekly + rotate 2 + missingok + sharedscripts +} diff --git a/setroubleshoot.tmpfiles b/setroubleshoot.tmpfiles new file mode 100644 index 000000000000..8f685709158e --- /dev/null +++ b/setroubleshoot.tmpfiles @@ -0,0 +1 @@ +d /run/setroubleshoot 711 setroubleshoot setroubleshoot - |