1 Commits

Author SHA1 Message Date
c92a3b4b30 include block name in error message
Some checks failed
Required Approvals / required-approvals (pull_request) Failing after 1s
2025-07-08 21:26:27 -05:00
42 changed files with 84 additions and 143 deletions

View File

@@ -51,7 +51,7 @@ for (@ARGV) {
if ($end_index != 0) {
splice(@lines, $end_index, 0, "\n" . $line_prefix . $remove_var . "\n");
} else {
die("Error: Unable to find package section in PKGBUILD.\n");
die("Error: Unable to find " . $package_block . " section in PKGBUILD.\n");
}
}

View File

@@ -6,7 +6,7 @@ if [ "$#" -eq 0 ]; then
else
for arg in "$@"
do
line_number=$(grep -n "Dqt" "${arg}/PKGBUILD" | cut -d : -f 1)
line_number=$(grep -n "Dqt-versions" "${arg}/PKGBUILD" | cut -d : -f 1)
line_number=$((line_number+1))
sed -i "${line_number}"'i\ -Dsystemd=false \\' "${arg}/PKGBUILD"
done

View File

@@ -1 +0,0 @@
../_common/d-systemd.sh

View File

@@ -1 +0,0 @@
dotnet-core/

View File

@@ -6,6 +6,6 @@ if [ "$#" -eq 0 ]; then
else
for arg in "$@"
do
sed -i '/ulimit/Id' "${arg}/PKGBUILD"
sed -i "s/pkgname build/pkgname build \-Dsystemd=false/" "${arg}/PKGBUILD"
done
fi

View File

@@ -10,7 +10,7 @@ else
sed -i "s/')/'/" "${arg}/PKGBUILD"
source_line=$(grep -n "source=" "${arg}/PKGBUILD" | cut -d : -f 1)
source_line=$((source_line+1))
sed -i "${source_line}"'i\ "0001-meson-allow-disabling-systemd-specific-code.patch")' "${arg}/PKGBUILD"
sed -i "${source_line}"'i\ "0001-meson-add-logind-provider-option.patch")' "${arg}/PKGBUILD"
b2_line=$(grep -n "b2sums=" "${arg}/PKGBUILD" | cut -d : -f 1)
b2_line=$((b2_line+1))
@@ -18,8 +18,8 @@ else
prepare_line=$(grep -n "prepare()" "${arg}/PKGBUILD" | cut -d : -f 1)
prepare_line=$((prepare_line+2))
sed -i "${prepare_line}"'i\ git apply -3 ../0001-meson-allow-disabling-systemd-specific-code.patch' "${arg}/PKGBUILD"
sed -i "${prepare_line}"'i\ git apply -3 ../0001-meson-add-logind-provider-option.patch' "${arg}/PKGBUILD"
sed -i 's/$pkgname build/$pkgname build -Dsystemd=disabled/' "${arg}/PKGBUILD"
sed -i 's/$pkgname build/$pkgname build -Dlogind_provider=elogind/' "${arg}/PKGBUILD"
done
fi

View File

@@ -1,11 +0,0 @@
#!/bin/bash
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <package repo>"
exit 1
else
for arg in "$@"
do
sed -i "s/ usbguard/ udev\n usbguard/" "${arg}/PKGBUILD"
done
fi

View File

@@ -1,11 +0,0 @@
#!/bin/sh
for i in $@; do
sed -e '/session_tracking/a\
-D session_tracking=no\
-D systemd_journal=false\
-D systemdsystemunitdir=no' \
-e '/systemd/d'\
-i $i/PKGBUILD
done

View File

@@ -1,22 +0,0 @@
#!/bin/bash
# rm-systemd-deps.sh
# Remove any 'systemd' or 'systemd-libs' within a dependencies or similar array. Does
# not remove newlines but tries to remove surrounding quotes and spaces.
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <package repo>"
exit 1
else
deps=(systemd-libs systemd-tools python-systemd lib32-systemd libsystemd.so libsystemd systemd)
for arg in "$@"
do
for i in "${deps[@]}"
do
sed -i -E "s/ \"$i\"|\"$i\" //g" "${arg}/PKGBUILD"
sed -i -E "s/ '$i'|'$i' //g" "${arg}/PKGBUILD"
sed -i -E "s/ $i|$i //g" "${arg}/PKGBUILD"
done
done
fi

View File

@@ -1,9 +0,0 @@
#!/bin/sh
for i in $@; do
sed -e '/Dlogind/ s,enabled,disabled,' \
-e '/Delogind/ s,disabled,enabled,' \
-e 's,lib32-systemd,lib32-elogind,' \
-e 's|?signed||' \
-i $i/PKGBUILD
done

View File

@@ -13,7 +13,6 @@ else
-i "${arg}/PKGBUILD"
sed -e "s|'systemd' ||" \
-e "s|'systemd-libs' ||" \
-e "s|'libsystemd.so'||" \
-i "${arg}/PKGBUILD"
sed -i '/mariadb@bootstrap\.service\.d/d' "${arg}/PKGBUILD"
sed -i '/rm -r usr\/share\/mysql\/systemd\//d' "${arg}/PKGBUILD"

View File

@@ -0,0 +1 @@
../_common/rm-blocks.pl

View File

@@ -1,13 +0,0 @@
#!/bin/sh
for i in $@; do
sed -e '/systemd-libs/d' \
-e 's,systemd,elogind,g' \
-i $i/PKGBUILD
sed -e '/selinux=false/a\ -D systemdsystemunitdir=no' \
-e '/selinux=false/a\ -D session_tracking=elogind' \
-e '/selinux=false/a\ -D systemd_journal=false' \
-e '/NetworkManager.service/d' \
-e '/mobile-broadband/a\ elogind' \
-e '/util-linux/a\ libelogind' \
-i $i/PKGBUILD
done

View File

@@ -8,7 +8,6 @@ else
do
sed -e "s/systemd-libs/esysusers/" \
-e "s/--enable-systemd/--disable-systemd/" \
-e "s/-Dsystemd-service=enabled/-Dsystemd-service=disabled/" \
-e "s/'systemd'//" \
-i "${arg}/PKGBUILD"
done

View File

@@ -7,8 +7,6 @@ for i in $@ ; do
-e '/systemd/d' \
-e '/install=pulseaudio.install/d' \
-e '/iautospawn/s,no,yes,' -i $i/PKGBUILD
sed -e '/elogind=enabled/a\ -D systemd=disabled' \
-i "$i/PKGBUILD"
done

View File

@@ -1 +0,0 @@
../_common/d-systemd.sh

View File

@@ -1,11 +0,0 @@
#!/bin/bash
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <package repo>"
exit 1
else
for arg in "$@"
do
sed -E 's|^(\s+)(python -m build)|\1sed -e "s\|https://archlinux.org\|https://packages.artixlinux.org\|g" \\\n\1 -e "s\|Arch Linux\|Artix Linux\|g" \\\n\1 -i Reflector.py\n\1\2|g' -i "${arg}/PKGBUILD"
done
fi

View File

@@ -1 +0,0 @@
../_common/archlinux-to-artixlinux.sh

View File

@@ -1 +0,0 @@
../_common/d-systemd.sh

View File

@@ -1 +0,0 @@
../_common/d-systemd.sh

View File

@@ -1 +0,0 @@
../_common/add-configure-options.pl

View File

@@ -1 +0,0 @@
../_common/add-source.pl

View File

@@ -1,4 +0,0 @@
CONFIG_OPTIONS=-D systemdsystemunitdir=/usr/lib/systemd # dummy dir
SOURCE_BLOCK=makedepends
SOURCES= linux-api-headers\n
SOURCES_NO_NEWLINE=y

View File

@@ -1 +0,0 @@
../_common/systemd-libs-to-libudev.sh

View File

@@ -1 +0,0 @@
../_common/add-source.pl

View File

@@ -1,3 +0,0 @@
SOURCE_BLOCK=depends
SOURCES= dbus-glib\n
SOURCES_NO_NEWLINE=y

View File

@@ -1,14 +0,0 @@
#!/bin/bash
# rm-cd-to-systemd-dir.sh
# removes line that contain "cd /usr/lib/systemd/system" from PKGBUILD files
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <package repo>"
exit 1
else
for arg in "$@"
do
sed -i '/usr\/lib\/systemd\/system/d' "${arg}/PKGBUILD"
done
fi

21
patches/vtk/usr-prefix.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <package repo>"
exit 1
else
for arg in "$@"
do
search_string='cmake -B build -S ${pkgname^^}-${pkgver} \\'
append_string=' -DCMAKE_PREFIX_PATH=/usr \\'
line_number=$(grep -n "$search_string" "${arg}/PKGBUILD" | cut -d':' -f1)
if [ -z "$line_number" ]; then
echo "Error: Search string not found in file '${arg}/PKGBUILD'"
exit 1
fi
sed -i "${line_number}s|${search_string}|&\n${append_string}|" "${arg}/PKGBUILD"
done
fi

View File

@@ -1,12 +0,0 @@
#!/bin/sh
if [ "$#" -eq 0 ]
then
echo "Usage: $0 <package repo>"
exit 1
fi
for arg in "$@"
do
sed -i 's/xf86-input-wacom/x11win-input-wacom/g' "${arg}/PKGBUILD"
done

View File

@@ -0,0 +1,28 @@
--- a/PKGBUILD 2024-07-22 10:00:21.560007599 +0200
+++ b/PKGBUILD 2024-07-22 10:10:31.346674268 +0200
@@ -9,14 +9,13 @@
url="https://www.freedesktop.org/wiki/Software/xdg-user-dirs"
arch=(x86_64)
license=(GPL)
-depends=(sh systemd)
+depends=(sh)
makedepends=(docbook-xsl git)
backup=(etc/xdg/user-dirs.conf etc/xdg/user-dirs.defaults)
install=xdg-user-dirs.install
options=(!emptydirs)
_commit=52e71ff04416f2ca3adaf6d73193de4b8b83de46 # tags/0.18^0
-source=("git+https://gitlab.freedesktop.org/xdg/xdg-user-dirs.git#commit=$_commit"
- xdg-user-dirs-update.service)
+source=("git+https://gitlab.freedesktop.org/xdg/xdg-user-dirs.git#commit=$_commit")
sha256sums=('SKIP'
'53c75f52d782e9492601400236bc8e5bfa76a26f0afd9bce3fe8df1740d341f0')
@@ -39,8 +38,4 @@
package() {
cd $pkgname
make DESTDIR="$pkgdir" install
-
- # We use a service
- rm "$pkgdir/etc/xdg/autostart/xdg-user-dirs.desktop"
- install -Dt "$pkgdir/usr/lib/systemd/user" -m644 ../xdg-user-dirs-update.service
}

View File

@@ -0,0 +1,28 @@
--- a/PKGBUILD 2024-07-22 10:00:21.560007599 +0200
+++ b/PKGBUILD 2024-07-22 10:10:31.346674268 +0200
@@ -9,14 +9,13 @@
url="https://www.freedesktop.org/wiki/Software/xdg-user-dirs"
arch=(x86_64)
license=(GPL)
-depends=(sh systemd)
+depends=(sh)
makedepends=(docbook-xsl git)
backup=(etc/xdg/user-dirs.conf etc/xdg/user-dirs.defaults)
install=xdg-user-dirs.install
options=(!emptydirs)
_commit=52e71ff04416f2ca3adaf6d73193de4b8b83de46 # tags/0.18^0
-source=("git+https://gitlab.freedesktop.org/xdg/xdg-user-dirs.git#commit=$_commit"
- xdg-user-dirs-update.service)
+source=("git+https://gitlab.freedesktop.org/xdg/xdg-user-dirs.git#commit=$_commit")
sha256sums=('SKIP'
'53c75f52d782e9492601400236bc8e5bfa76a26f0afd9bce3fe8df1740d341f0')
@@ -39,8 +38,4 @@
package() {
cd $pkgname
make DESTDIR="$pkgdir" install
-
- # We use a service
- rm "$pkgdir/etc/xdg/autostart/xdg-user-dirs.desktop"
- install -Dt "$pkgdir/usr/lib/systemd/user" -m644 ../xdg-user-dirs-update.service
}

View File

@@ -1 +0,0 @@
../_common/rm-install.sh

View File

@@ -1,11 +0,0 @@
diff --git a/xdg-user-dirs.install b/xdg-user-dirs.install
deleted file mode 100644
index 6908505..0000000
--- a/xdg-user-dirs.install
+++ /dev/null
@@ -1,5 +0,0 @@
-pre_upgrade() {
- if (( $(vercmp $2 0.19-1) < 0)); then
- systemctl --global disable xdg-user-dirs-update.service
- fi
-}

View File

@@ -1 +0,0 @@
../_common/d-systemd.sh