summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunchuan "Winslow" Hu2024-01-12 16:48:15 -0800
committerYunchuan "Winslow" Hu2024-01-12 16:48:15 -0800
commit31c88478ecbfbddf37bec1be476b2fd7c17642ee (patch)
tree9042a27cfcf3e2ed2b71cc0b0f8dfc10366cab06
parent592ed525a089350698ea496ccd80feaa1687ae01 (diff)
downloadaur-31c88478ecbfbddf37bec1be476b2fd7c17642ee.tar.gz
Splitted setroubleshoot-git and setroubleshoot-server-git
-rw-r--r--.SRCINFO49
-rw-r--r--PKGBUILD125
-rw-r--r--install.sh78
-rw-r--r--setroubleshoot-sysusers.conf1
-rw-r--r--setroubleshoot.logrotate6
-rw-r--r--setroubleshoot.tmpfiles1
-rwxr-xr-xtest.sh1
7 files changed, 137 insertions, 124 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b3ff764a9006..58b742620e3f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,36 @@
-pkgbase = pkgbase
- pkgdesc = Open-source YANG API in C and CLI (yangcli) and server (netconfd)
- pkgver = latest
- pkgrel = 1
- url = https://github.com/vlvassilev/yuma123
+pkgbase = setroubleshoot-server-git
+ pkgdesc = Provides tools to help diagnose SELinux problems - SETroubleshoot dbus daemon
+ pkgver = 3.3.32.r3.g502d06c
+ pkgrel = 5
+ url = https://gitlab.com/setroubleshoot
arch = x86_64
- license = BSD
- depends = git
- depends = autoconf
- depends = automake
- depends = libtool
- depends = make
- depends = gcc
- provides = yuma123
- conflicts = yuma123
- source = git+https://github.com/vlvassilev/yuma123
+ 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-gobject
+ makedepends = python-pydbus
+ makedepends = python-slip
+ makedepends = python-systemd
+ makedepends = xdg-utils
+ makedepends = python-dasbus
+ provides = setroubleshoot-server
+ conflicts = setroubleshoot-server
+ source = setroubleshoot-git::git+https://gitlab.com/setroubleshoot/setroubleshoot#branch=main
+ source = setroubleshoot.logrotate
+ source = setroubleshoot.tmpfiles
+ source = setroubleshoot-sysusers.conf
sha256sums = SKIP
+ sha256sums = 894a75c33d568f908f0c3fa7fe4d7f82824369695194aa005fe42cf961298893
+ sha256sums = eb7321b7db2fd8951c7ce3c7c42680fcfe7641c3d7be9e8d69a8fbb992a9d086
+ sha256sums = fa20d1ec3522aa877fc5462d56692b318b4c8af1cd9ecb62ec41ad6647662d77
-pkgname = yuma123-git
+pkgname = setroubleshoot-server-git
+ pkgdesc = SELinux troubleshoot server
diff --git a/PKGBUILD b/PKGBUILD
index e8b83811a57b..66c24e10f6c5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,105 @@
-# Maintainer: Joar Heimonen <joarheimonen@live.no>
-# Note: This is only an install script for Yuma123, not the actual project itself.
-
-pkgname=yuma123-git
-pkgver=latest
-pkgrel=1
-pkgdesc="Open-source YANG API in C and CLI (yangcli) and server (netconfd)"
-arch=('x86_64')
-url="https://github.com/vlvassilev/yuma123"
-license=('BSD')
-depends=('git' 'autoconf' 'automake' 'make' 'gcc')
-makedepends=('libtool') # Add libtool as a build dependency
-provides=("${pkgname%-git}")
-conflicts=("${pkgname%-git}")
-pkgbase=yuma123-git
-
-source=("git+https://github.com/vlvassilev/yuma123")
-
-prepare() {
- cd "$srcdir/yuma123"
- libtoolize
- autoreconf -i -f
+# Maintainer: Yunchuan "Winslow" Hu <i@winsloweric.com, winslows@student.ubc.ca>
+# Contributor: 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-server
+#
+# 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-server-git
+pkgname=setroubleshoot-server-git
+pkgver=3.3.32.r3.g502d06c
+pkgrel=5
+pkgdesc="Provides tools to help diagnose SELinux problems - SETroubleshoot dbus daemon"
+groups=('selinux')
+arch=('x86_64' 'aarch64')
+url='https://gitlab.com/setroubleshoot'
+license=('GPL2')
+conflicts=("setroubleshoot-server")
+provides=("setroubleshoot-server")
+
+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 "setroubleshoot-git"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- cd "$srcdir/yuma123"
- ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr
+ cd "setroubleshoot-git"
+ export PYTHON=/usr/bin/python
+ ./autogen.sh
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-auditpluginsdir=/etc/audit/plugins.d
make
}
package() {
- cd "$srcdir/yuma123"
- make DESTDIR="${pkgdir}" install
- mv "${pkgdir}/usr/sbin" "${pkgdir}/usr/bin"
-}
+ pkgdesc="SELinux troubleshoot server"
+
+ cd "setroubleshoot-git"
+ install -m644 -D "src/sedispatch.conf" "${pkgdir}/etc/audit/plugins.d/sedispatch.conf"
+ install -m755 -D "src/sealert" "${pkgdir}/usr/bin/sealert"
+ install -m644 -D "setroubleshootd.service" "${pkgdir}/usr/lib/systemd/system/setroubleshootd.service"
+ install -m644 -D "../setroubleshoot-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/setroubleshoot.conf"
+ install -m644 -D "../setroubleshoot.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/setroubleshoot.conf"
+ install -m755 -D "src/sedispatch" "${pkgdir}/usr/bin/sedispatch"
+ install -m755 -D "src/setroubleshootd" "${pkgdir}/usr/bin/setroubleshootd"
+
+ install -m644 -D "org.fedoraproject.Setroubleshootd.service" "${pkgdir}/usr/share/dbus-1/system-services/org.fedoraproject.Setroubleshootd.service"
+ install -m644 -D "org.fedoraproject.SetroubleshootFixit.service" "${pkgdir}/usr/share/dbus-1/system-services/org.fedoraproject.SetroubleshootFixit.service"
+ install -m644 -D "org.fedoraproject.SetroubleshootPrivileged.service" "${pkgdir}/usr/share/dbus-1/system-services/org.fedoraproject.SetroubleshootPrivileged.service"
+
+ install -m644 -D "src/setroubleshoot.conf" "${pkgdir}/etc/setroubleshoot/setroubleshoot.conf"
+ install -m644 -D "org.fedoraproject.Setroubleshootd.conf" "${pkgdir}/etc/dbus-1/system.d/org.fedoraproject.Setroubleshootd.conf"
+ install -m644 -D "org.fedoraproject.SetroubleshootFixit.conf" "${pkgdir}/etc/dbus-1/system.d/org.fedoraproject.SetroubleshootFixit.conf"
+ install -m644 -D "org.fedoraproject.SetroubleshootPrivileged.conf" "${pkgdir}/etc/dbus-1/system.d/org.fedoraproject.SetroubleshootPrivileged.conf"
+ install -m644 -D "org.fedoraproject.setroubleshootfixit.policy" "${pkgdir}/usr/share/polkit-1/actions/org.fedoraproject.setroubleshootfixit.policy"
-sha256sums=('SKIP') \ No newline at end of file
+ install -m644 -D "src/SetroubleshootFixit.py" "${pkgdir}/usr/share/setroubleshoot/SetroubleshootFixit.py"
+ install -m644 -D "src/SetroubleshootPrivileged.py" "${pkgdir}/usr/share/setroubleshoot/SetroubleshootPrivileged.py"
+
+for lang in "as" "bg" "bn" "bn_IN" "ca" "cs" "da" "de" "el" "en_GB" "es" "eu" "fi" "fr" "fur" "gl" "gu" "he" "hi" "hr" "hu" "it" "ja" "kn" "ko" "mai" "ml" "mr" "ms" "nb" "nds" "nl" "nn" "or" "pa" "pl" "pt" "pt_BR" "ru" "si" "sk" "sr" "sr@latin" "sv" "ta" "te" "th" "tr" "uk" "zh_CN" "zh_TW"; do
+ if [ -f "${srcdir}/locale/$lang/LC_MESSAGES/setroubleshoot.pmo" ]; then
+ install -Dm644 "${srcdir}/locale/$lang/LC_MESSAGES/setroubleshoot.pmo" "${pkgdir}/usr/share/locale/$lang/LC_MESSAGES/setroubleshoot.pmo"
+ fi
+ if [ -f "${srcdir}/locale/$lang/LC_MESSAGES/setroubleshoot.mo" ]; then
+ install -Dm644 "${srcdir}/locale/$lang/LC_MESSAGES/setroubleshoot.mo" "${pkgdir}/usr/share/locale/$lang/LC_MESSAGES/setroubleshoot.mo"
+ fi
+done
+
+ mkdir -p "${pkgdir}/run/setroubleshoot/"
+ chmod 755 "${pkgdir}/run/setroubleshoot/"
+ mkdir -p "${pkgdir}/var/lib/setroubleshoot"
+ touch "${pkgdir}/var/lib/setroubleshoot/setroubleshoot_database.xml"
+ touch "${pkgdir}/var/lib/setroubleshoot/email_alert_recipients"
+ chown -R setroubleshoot "${pkgdir}/var/lib/setroubleshoot"
+ chmod 600 "${pkgdir}/var/lib/setroubleshoot/setroubleshoot_database.xml"
+ chmod 600 "${pkgdir}/var/lib/setroubleshoot/email_alert_recipients"
+ chmod 750 "${pkgdir}/etc/audit/plugins.d/"
+
+ # SETroubleshootD requires an audit event socket to function
+ sudo sed -i 's/active = no/active = yes/g' /etc/audit/plugins.d/af_unix.conf
+}
diff --git a/install.sh b/install.sh
deleted file mode 100644
index ddc8827df6df..000000000000
--- a/install.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-basename=slk-eng
-pkgname=dict-freedict-$basename
-dictd_conf=/etc/dict/dictd.conf
-datadir=/usr/share/dictd
-conf="database $basename {
- data $datadir/$basename.dict.dz
- index $datadir/$basename.index
-}"
-
-post_install()
-{
- echo
- if pacman -Qq dictd > /dev/null 2>&1
- then
- if grep -q "^database *$basename" "$dictd_conf"
- then
- echo "$pkgname already configured in $dictd_conf"
- else
- echo "Adding configuration for $pkgname to $dictd_conf"
- echo "$conf" >> "$dictd_conf"
- fi
-
- if systemctl -q is-active dictd.service
- then
- echo "Restarting dictd service in order to" \
- "use the new dictionary database"
- systemctl restart dictd.service
- else
- echo "Starting dictd service in order to" \
- "use the new dictionary database"
- systemctl start dictd.service
- fi
- else
- echo "dictd does not appear to be installed."
- echo "In order to use this database you should either" \
- "install dictd or alternatively" \
- "another dict server and configure it on your own."
- fi
- echo
-}
-
-post_upgrade()
-{
- if pacman -Qq dictd > /dev/null 2>&1 && \
- systemctl -q is-active dictd.service
- then
- echo -e "\nRestarting dictd service in order to" \
- "use the updated dictionary database"
- systemctl restart dictd.service
- fi
-}
-
-post_remove()
-{
- if pacman -Qq dictd > /dev/null 2>&1
- then
- current_conf="$(grep -A 3 "^database *$basename" "$dictd_conf")"
- if test -n "$current_conf"
- then
- echo
- if test "$current_conf" = "$conf"
- then
- echo "Removing configuration for $pkgname from $dictd_conf"
- sed -i "/database $basename {/,/}/d" "$dictd_conf"
- else
- echo "User created / modified configuration" \
- "for $pkgname in $dictd_conf is left untouched."
- fi
- fi
-
- if systemctl -q is-active dictd.service
- then
- echo "Restarting dictd service in order to" \
- "stop using the removed dictionary database"
- systemctl restart dictd.service
- fi
- fi
-}
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 -
diff --git a/test.sh b/test.sh
deleted file mode 100755
index 36f0670f54d0..000000000000
--- a/test.sh
+++ /dev/null
@@ -1 +0,0 @@
-echo 'test'