From cb468c0b752380d0bf1884609241df67fdc7f3be Mon Sep 17 00:00:00 2001 From: Achill Gilgenast Date: Tue, 13 Jan 2026 20:29:12 +0100 Subject: [PATCH] main/postmarketos-mvcfg: remove Deprecated. See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3580, lets remove it. Removed the last users in the last commits. Part-of: --- .ci/shellcheck.sh | 1 - main/postmarketos-mvcfg/APKBUILD | 22 ----- .../postmarketos-mvcfg-package.sh | 17 ---- .../postmarketos-mvcfg-pre-upgrade.sh | 83 ------------------- 4 files changed, 123 deletions(-) delete mode 100644 main/postmarketos-mvcfg/APKBUILD delete mode 100644 main/postmarketos-mvcfg/postmarketos-mvcfg-package.sh delete mode 100644 main/postmarketos-mvcfg/postmarketos-mvcfg-pre-upgrade.sh diff --git a/.ci/shellcheck.sh b/.ci/shellcheck.sh index 46445137c..6c74efebc 100755 --- a/.ci/shellcheck.sh +++ b/.ci/shellcheck.sh @@ -38,7 +38,6 @@ sh_files=" $(find . -name '*.trigger') $(find . -path './main/devicepkg-dev/*.sh') - $(find . -path './main/postmarketos-mvcfg/*.sh') $(find . -path './.ci/**.sh') $(find . -path '**/tests/*.sh') diff --git a/main/postmarketos-mvcfg/APKBUILD b/main/postmarketos-mvcfg/APKBUILD deleted file mode 100644 index c62358557..000000000 --- a/main/postmarketos-mvcfg/APKBUILD +++ /dev/null @@ -1,22 +0,0 @@ -maintainer="Oliver Smith " -pkgname=postmarketos-mvcfg -pkgver=1 -pkgrel=0 -pkgdesc="Move configs from legacy packaging" -url="https://postmarketos.org/mvcfg" -arch="noarch" -license="GPL-3.0-or-later" -options="!check !tracedeps pmb:cross-native" -source=" - postmarketos-mvcfg-pre-upgrade.sh - postmarketos-mvcfg-package.sh - " - -package() { - for script in pre-upgrade package; do - install -Dm755 "postmarketos-mvcfg-$script.sh" \ - "$pkgdir/usr/bin/postmarketos-mvcfg-$script" - done -} -sha512sums="58affac657b588a8a1f3370aa649cbc4077206cc237a6180b9533e85108394eedbb10e4b71bb8aecafdbdfc0de820b116b8baa9a6c3fe44272da06a9a5d11d52 postmarketos-mvcfg-pre-upgrade.sh -82ae4ccc8de87acf1c40e8c6bfb9bd1d0e7eff11055e231000304000dec87de04dc988125aad8a60a8266a21b90da2e14c9605d29b0748ad3cbf5a92dd00910a postmarketos-mvcfg-package.sh" diff --git a/main/postmarketos-mvcfg/postmarketos-mvcfg-package.sh b/main/postmarketos-mvcfg/postmarketos-mvcfg-package.sh deleted file mode 100644 index d12d3956d..000000000 --- a/main/postmarketos-mvcfg/postmarketos-mvcfg-package.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -e - -pkgdir="$1" -dirname="$2" - -if [ -z "$dirname" ] || ! [ -d "$pkgdir" ]; then - echo "usage:" - # shellcheck disable=SC2016 - echo ' postmarketos-mvcfg-package "$pkgname" "$pkgdir"' - echo "more information:" - echo " https://postmarketos.org/mvcfg" - exit 1 -fi - -# Create "done" file, so postmarketos-mvcfg-pre-upgrade doesn't do anything -mkdir -p "$pkgdir/etc/postmarketos-mvcfg/done" -touch "$pkgdir/etc/postmarketos-mvcfg/done/$dirname" diff --git a/main/postmarketos-mvcfg/postmarketos-mvcfg-pre-upgrade.sh b/main/postmarketos-mvcfg/postmarketos-mvcfg-pre-upgrade.sh deleted file mode 100644 index e427e1f54..000000000 --- a/main/postmarketos-mvcfg/postmarketos-mvcfg-pre-upgrade.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh -# Move all configs that were created/modified with legacy methods in -# post-install scripts. - -if [ "$#" -lt 2 ]; then - echo "usage:" - echo " postmarketos-mvcfg-pre-upgrade dirname cfg [cfg ...]" - echo "example:" - echo " postmarketos-mvcfg-pre-upgrade \\" - echo " postmarketos-base \\" - echo " /etc/issue \\" - echo " /etc/fstab" - echo "more information:" - echo " https://postmarketos.org/mvcfg" - exit 1 -fi - -# Skip if "done" file exists. This is created in package() with -# postmarketos-mvcfg-package, so this script doesn't do anything if the package -# installed at pre-upgrade time is already using properly packaged configs. -dirname="$1" -if [ -e "/etc/postmarketos-mvcfg/done/$dirname" ]; then - exit 0 -fi - -# Only act on existing files -shift -cfgs_found="" -for i in "$@"; do - if [ -e "$i" ]; then - cfgs_found="$cfgs_found $i" - fi -done - -if [ -n "$cfgs_found" ]; then - # Create non-existing backupdir - backupdir="/etc/postmarketos-mvcfg/backup/$dirname" - while [ -d "$backupdir" ]; do - backupdir="${backupdir}_" - done - mkdir -p "$backupdir" - - # Copy all configs first - for i in $cfgs_found; do - # Generate non-existing target path - # flatpath: /etc/issue -> etc-issue - flatpath="$(echo "$i" | sed s./.-.g | cut -d- -f2-)" - target="$backupdir/$flatpath" - while [ -e "$target" ]; do - target="${target}_" - done - - cp -a "$i" "$target" - done - - # Remove configs - for i in $cfgs_found; do - rm "$i" - done - - # List moved configs - echo " *" - echo " * These configs were created with legacy packaging methods:" - for i in $cfgs_found; do - echo " * $i" - done - echo " *" - echo " * In order to replace them with properly packaged configs," - echo " * the old versions (which you might have adjusted manually)" - echo " * were moved to:" - echo " * $backupdir" - echo " *" - echo " * If you did not manually adjust these configs, you can ignore" - echo " * this message." - echo " *" - echo " * More information: https://postmarketos.org/mvcfg" - echo " *" -fi - -# Make sure that the "done" file exists, even if the packager forgot to call -# 'postmarketos-mvcfg-package' in package() of the APKBUILD. -mkdir -p "/etc/postmarketos-mvcfg/done" -touch "/etc/postmarketos-mvcfg/done/$dirname"