From 71c9cfb407312fa60d9fe1e80bd424a8f326c063 Mon Sep 17 00:00:00 2001 From: sulincix Date: Fri, 24 Nov 2023 19:10:03 +0000 Subject: [PATCH] fixes --- .../base/cinnamon-control-center/ympbuild | 15 ++-- cinnamon/base/cinnamon-desktop/ympbuild | 2 +- .../cinnamon-translations/ympbuild | 2 +- sys/process/audit/auditd.confd | 22 +++++ sys/process/audit/auditd.initd | 90 +++++++++++++++++++ sys/process/audit/ympbuild | 13 ++- 6 files changed, 131 insertions(+), 13 deletions(-) rename cinnamon/{base => extra}/cinnamon-translations/ympbuild (95%) create mode 100644 sys/process/audit/auditd.confd create mode 100644 sys/process/audit/auditd.initd diff --git a/cinnamon/base/cinnamon-control-center/ympbuild b/cinnamon/base/cinnamon-control-center/ympbuild index b27e6ab6..8f3f8329 100644 --- a/cinnamon/base/cinnamon-control-center/ympbuild +++ b/cinnamon/base/cinnamon-control-center/ympbuild @@ -1,6 +1,6 @@ #!/usr/bin/env bash name='cinnamon-control-center' -release='3' +release='2' version='6.0.0' url='https://github.com/linuxmint/cinnamon-control-center' description='The Control Center for Cinnamon' @@ -9,7 +9,7 @@ maintainer='akarsu' license=('GPLv3') source=("https://github.com/linuxmint/cinnamon-control-center/archive/refs/tags/${version}.tar.gz") depends=(cinnamon-settings-daemon cinnamon-menus colord libgnomekbd) -makedepends=(meson ) +makedepends=(meson) md5sums=('fcf3c538fc4b108b10a6e0685c5af308') group=(cinnamon.base) uses=() @@ -19,9 +19,9 @@ cd $name-$version setup () { meson setup build --prefix=/usr \ - --libdir=/usr/lib64/ \ - -Dmodemmanager=false \ - -Donlineaccounts=false + --libdir=/usr/lib64/ \ + -Dmodemmanager=false \ + -Donlineaccounts=false } build () { @@ -29,9 +29,6 @@ build () { } package () { - DESTDIR=$DESTDIR ninja -C build install $jobs - #rm "${DESTDIR}"/usr/bin/cinnamon-control-center - #rm "${DESTDIR}"/usr/share/cinnamon-control-center/ui/shell.ui - + ninja -C build install $jobs } diff --git a/cinnamon/base/cinnamon-desktop/ympbuild b/cinnamon/base/cinnamon-desktop/ympbuild index 647e5bb3..f34d58a6 100644 --- a/cinnamon/base/cinnamon-desktop/ympbuild +++ b/cinnamon/base/cinnamon-desktop/ympbuild @@ -1,6 +1,6 @@ #!/usr/bin/env bash name='cinnamon-desktop' -release='2' +release='3' version='6.0.0' url='https://github.com/linuxmint/cinnamon-desktop' description='Library with common API for various Cinnamon modules' diff --git a/cinnamon/base/cinnamon-translations/ympbuild b/cinnamon/extra/cinnamon-translations/ympbuild similarity index 95% rename from cinnamon/base/cinnamon-translations/ympbuild rename to cinnamon/extra/cinnamon-translations/ympbuild index 974c6556..0db47913 100644 --- a/cinnamon/base/cinnamon-translations/ympbuild +++ b/cinnamon/extra/cinnamon-translations/ympbuild @@ -11,7 +11,7 @@ source=("https://github.com/linuxmint/cinnamon-translations/archive/refs/tags/${ depends=() makedepends=() md5sums=('c488e3efc6e7aef6cd8d75b3749bc7f2') -group=(cinnamon.base) +group=(cinnamon.extra) uses=() arch=('x86_64') diff --git a/sys/process/audit/auditd.confd b/sys/process/audit/auditd.confd new file mode 100644 index 00000000..c66be166 --- /dev/null +++ b/sys/process/audit/auditd.confd @@ -0,0 +1,22 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Configuration options for auditd +# -f for foreground mode +# There are some other options as well, but you'll have to look in the source +# code to find them as they aren't ready for use yet. +EXTRAOPTIONS='' + +# Audit rules file to run after starting auditd +RULEFILE_STARTUP=/etc/audit/audit.rules + +# Audit rules file to run before and after stopping auditd +RULEFILE_STOP_PRE=/etc/audit/audit.rules.stop.pre +RULEFILE_STOP_POST=/etc/audit/audit.rules.stop.post + +# If you want to enforce a certain locale for auditd, +# uncomment one of the next lines: +#AUDITD_LANG=none +AUDITD_LANG=C +#AUDITD_LANG=en_US +#AUDITD_LANG=en_US.UTF-8 diff --git a/sys/process/audit/auditd.initd b/sys/process/audit/auditd.initd new file mode 100644 index 00000000..b9d9c47e --- /dev/null +++ b/sys/process/audit/auditd.initd @@ -0,0 +1,90 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands='reload reload_auditd reload_rules' +description='Linux Auditing System' +description_reload='Reload daemon configuration and rules' +description_reload_rules='Reload daemon rules' +description_reload_auditd='Reload daemon configuration' + +name='auditd' +pidfile='/var/run/auditd.pid' +command='/usr/sbin/auditd' + +start_auditd() { + # Env handling taken from the upstream init script + if [ -z "$AUDITD_LANG" -o "$AUDITD_LANG" = "none" -o "$AUDITD_LANG" = "NONE" ]; then + unset LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE + else + LANG="$AUDITD_LANG" + LC_TIME="$AUDITD_LANG" + LC_ALL="$AUDITD_LANG" + LC_MESSAGES="$AUDITD_LANG" + LC_NUMERIC="$AUDITD_LANG" + LC_MONETARY="$AUDITD_LANG" + LC_COLLATE="$AUDITD_LANG" + export LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE + fi + unset HOME MAIL USER USERNAME + + ebegin "Starting ${name}" + start-stop-daemon \ + --start --quiet --pidfile ${pidfile} \ + --exec ${command} -- ${EXTRAOPTIONS} + local ret=$? + eend $ret + return $ret +} + +stop_auditd() { + ebegin "Stopping ${name}" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + local ret=$? + eend $ret + return $ret +} + +loadfile() { + local rules="$1" + if [ -n "${rules}" -a -f "${rules}" ]; then + einfo "Loading audit rules from ${rules}" + /usr/sbin/auditctl -R "${rules}" >/dev/null + return $? + else + return 0 + fi +} + +start() { + start_auditd + local ret=$? + if [ $ret -eq 0 -a "${RC_CMD}" != "restart" ]; then + loadfile "${RULEFILE_STARTUP}" + fi + return $ret +} + +reload_rules() { + loadfile "${RULEFILE_STARTUP}" +} + +reload_auditd() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP \ + --exec "${command}" --pidfile "${pidfile}" + eend $? +} + +reload() { + reload_auditd + reload_rules +} + +stop() { + [ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_PRE}" + stop_auditd + local ret=$? + [ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_POST}" + return $ret +} diff --git a/sys/process/audit/ympbuild b/sys/process/audit/ympbuild index da1b6273..8086eb32 100644 --- a/sys/process/audit/ympbuild +++ b/sys/process/audit/ympbuild @@ -7,10 +7,14 @@ description='Userspace components of the audit framework' email='aliriza.keskin@pardus.org.tr' maintainer='aliriza' license=('GPLv3') -source=("https://github.com/linux-audit/audit-userspace/archive/refs/tags/v$version.tar.gz") +source=("https://github.com/linux-audit/audit-userspace/archive/refs/tags/v$version.tar.gz" + "auditd.initd" + "auditd.confd") depends=() makedepends=( ) -md5sums=('03f6572873b0df83e6bcb84d8c500765') +md5sums=('03f6572873b0df83e6bcb84d8c500765' + 'SKIP' + 'SKIP') group=(sys.process) uses=(libcap_ng) uses_extra=(python) @@ -29,6 +33,9 @@ setup(){ --disable-listener \ --disable-systemd \ --disable-gssapi-krb5 \ + --enable-shared=audit \ + --with-arm \ + --with-aarch64 \ $(use_opt python --with-python3 --without-python3) \ $(use_opt python --with-python --without-python) \ $(use_opt libcap_ng --with-libcap-ng=yes --with-libcap-ng=no) @@ -40,5 +47,7 @@ build(){ package(){ make install $jobs + install -Dm755 ../auditd.initd "$DESTDIR"/etc/init.d/auditd + install -Dm755 ../auditd.confd "$DESTDIR"/etc/conf.d/auditd }