summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blacklist.txt8
-rwxr-xr-xfind-deprecated-pkgs118
2 files changed, 105 insertions, 21 deletions
diff --git a/blacklist.txt b/blacklist.txt
index ab279ce..8e469d6 100644
--- a/blacklist.txt
+++ b/blacklist.txt
@@ -336,18 +336,14 @@ java-runtime-common:java-runtime-common:::[branding][FIXME:description]
java-xmlgraphics-commons:java-xmlgraphics-commons:::[technical] Arch version was not built from source
jdk7-openjdk:jdk7-openjdk:::[branding][FIXME:description]
jdk8-openjdk:jdk8-openjdk:::[branding][FIXME:description]
-jdk9-openjdk:jdk9-openjdk:::[branding][FIXME:description]
jedit:jedit:::[technical] Arch version uses jar file to compile sources
jmol:jmol:::[technical] Arch version was not built from source
jre7-openjdk-headless:jre7-openjdk-headless:::[branding][FIXME:description]
jre7-openjdk:jre7-openjdk:::[branding][FIXME:description]
jre8-openjdk-headless:jre8-openjdk-headless:::[branding][FIXME:description]
jre8-openjdk:jre8-openjdk:::[branding][FIXME:description]
-jre9-openjdk-headless:jre9-openjdk-headless:::[branding][FIXME:description]
-jre9-openjdk:jre9-openjdk:::[branding][FIXME:description]
jsampler::::[uses-nonfree] only useful with nonfree linuxsampler
junit:junit:::[technical] Arch version was not built from source
-kdebase-runtime:kdebase-runtime:::[uses-nonfree] has non-privacy search engines by default
kde-development-environment-meta:kde-development-environment-meta:::[uses-nonfree] depends on nonfree qt5-webengine
kdepim-addons:kdepim-addons:::[uses-nonfree] built with nonfree qt5-webengine
kdepim-runtime:kdepim-runtime:::[uses-nonfree] built with nonfree qt5-webengine
@@ -600,7 +596,6 @@ riot-desktop::parabola:1380:[uses-nonfree] depends on nonfree electron
riscv64-linux-gnu-linux-api-headers:riscv64-linux-gnu-linux-libre-api-headers:::[semifree] has source containing and recommending nonfree software
rp-pppoe:rp-pppoe:::[semifree] installs documentation about nonfree counterpart
ruby2.3:ruby2.3:parabola:674:[semifree] json module has nonfree CVTUTF code; replace with pure Ruby implementation
-ruby2.4:ruby2.4:parabola:674:[semifree] json module has nonfree CVTUTF code; replace with pure Ruby implementation
ruby-docs:ruby-docs:parabola:674:[semifree] Rebuilt as part of 'ruby' package
ruby:ruby:parabola:674:[semifree] json module has nonfree CVTUTF code; replace with pure Ruby implementation
sane-gt68xx-firmware::::[nonfree] Contains nonfree Software
@@ -641,7 +636,6 @@ thunderbird-i18n-ar:icedove-l10n-ar:::[semifree][FIXME:description]
thunderbird-i18n-ast:icedove-l10n-ast:::[semifree][FIXME:description]
thunderbird-i18n-be:icedove-l10n-be:::[semifree][FIXME:description]
thunderbird-i18n-bg:icedove-l10n-bg:::[semifree][FIXME:description]
-thunderbird-i18n-bn-bd:icedove-l10n-bn-bd:::[semifree][FIXME:description]
thunderbird-i18n-br:icedove-l10n-br:::[semifree][FIXME:description]
thunderbird-i18n-ca:icedove-l10n-ca:::[semifree][FIXME:description]
thunderbird-i18n-cs:icedove-l10n-cs:::[semifree][FIXME:description]
@@ -676,7 +670,6 @@ thunderbird-i18n-lt:icedove-l10n-lt:::[semifree][FIXME:description]
thunderbird-i18n-nb-no:icedove-l10n-nb-no:::[semifree][FIXME:description]
thunderbird-i18n-nl:icedove-l10n-nl:::[semifree][FIXME:description]
thunderbird-i18n-nn-no:icedove-l10n-nn-no:::[semifree][FIXME:description]
-thunderbird-i18n-pa-in:icedove-l10n-pa-in:::[semifree][FIXME:description]
thunderbird-i18n-pl:icedove-l10n-pl:::[semifree][FIXME:description]
thunderbird-i18n-pt-br:icedove-l10n-pt-br:::[semifree][FIXME:description]
thunderbird-i18n-pt-pt:icedove-l10n-pt-pt:::[semifree][FIXME:description]
@@ -689,7 +682,6 @@ thunderbird-i18n-sl:icedove-l10n-sl:::[semifree][FIXME:description]
thunderbird-i18n-sq:icedove-l10n-sq:::[semifree][FIXME:description]
thunderbird-i18n-sr:icedove-l10n-sr:::[semifree][FIXME:description]
thunderbird-i18n-sv-se:icedove-l10n-sv-se:::[semifree][FIXME:description]
-thunderbird-i18n-ta-lk:icedove-l10n-ta-lk:::[semifree][FIXME:description]
thunderbird-i18n-tr:icedove-l10n-tr:::[semifree][FIXME:description]
thunderbird-i18n-uk:icedove-l10n-uk:::[semifree][FIXME:description]
thunderbird-i18n-vi:icedove-l10n-vi:::[semifree][FIXME:description]
diff --git a/find-deprecated-pkgs b/find-deprecated-pkgs
index 8b91211..086d017 100755
--- a/find-deprecated-pkgs
+++ b/find-deprecated-pkgs
@@ -17,7 +17,7 @@ repos_armv7h="$repos alarm" # although we don't sync [alarm] we blacklist its pa
# we do not blacklists those packages anywhere
repos_parabola="pcr pcr-multilib pcr-multilib-testing pcr-testing libre libre-multilib libre-multilib-testing libre-testing"
-# Set the blacklist files
+# Set the blacklist files. The packages here always have a [libre] replacement if there's one.
# aur-blacklist.txt is not here since we want to check Arch's official repos
blacklists="blacklist.txt"
@@ -40,18 +40,16 @@ for r in $repos_armv7h; do
done
# Parabola mirrors, used to check [libre] and [pcr] packages
-for r in $1 $2; do
-if [[ $r = parabola ]]; then
+if [[ $1 = parabola ]]; then
for r in $repos_parabola; do
mirrors+=(https://mirror.grapentin.org/parabola/$r/os/x86_64/)
mirrors+=(https://mirror.grapentin.org/parabola/$r/os/i686/)
mirrors+=(https://mirror.grapentin.org/parabola/$r/os/armv7h/)
done
fi
-done
# Sed expresion tested for Nginx, change if needed
-sedexp='s/.*href="//;s/\-any.pkg.tar.xz.*//;s/\-x86_64.pkg.tar.xz.*//;s/\-i686.pkg.tar.xz.*//;s/\-armv7h.pkg.tar.xz.*//'
+sedexp='s/.*href="//;s/\.pkg.tar.xz.*//'
# extra sedexps for special characters/symbols
sedexp+=';s/%2B/+/g;s/%3A/:/g;s/%40/@/g'
@@ -72,6 +70,11 @@ since in blacklists like your-privacy and your-initfreedom we also block
some packages from [pcr] (like jitsi) and [libre] (like icedove), and
probably also from their -multilib, -testing and -multilib-testing derivatives.
+Note that the package architecture is always specified with 'parabola', and
+in 'arch' only when there's an uneeded replacement. This is because your-freedom
+is for any architecture and no matter if you use Parabola x86_64 or i686, it
+will always conflict packages that are even for armv7h only (and vice versa).
+
To easily remove a line, you can use the following sed expresion:
sed '/^pkgname:/d' -i blacklist_file.txt
@@ -82,11 +85,25 @@ mkpkglist() {
parabola_pkgs=$(mktemp)
arch_pkgs=$(mktemp)
case $1 in
- parabola) curl -s ${mirrors[@]} | grep '".*.pkg.tar.xz"' | sed $sedexp |
- for f in $(cat /dev/stdin); do echo ${f%-*-*} >> $parabola_pkgs; done
+ parabola) curl -s ${mirrors[@]} | grep '".*.pkg.tar.xz"' | sed $sedexp > $parabola_pkgs
+
+ # Separate packages by architecture
+ for arch in x86_64 i686 armv7h any; do
+ grep $arch$ $parabola_pkgs | for f in $(</dev/stdin); do
+ echo "${f%-*-*-*} $arch" >> $parabola_pkgs-$arch
+ done
+ done
+ cat $parabola_pkgs-{x86_64,i686,armv7h,any} | sort -u > $parabola_pkgs
;;
- arch) curl -s ${mirrors[@]} | grep '".*.pkg.tar.xz"' | sed $sedexp |
- for f in $(cat /dev/stdin); do echo ${f%-*-*} >> $arch_pkgs; done
+ arch) curl -s ${mirrors[@]} | grep '".*.pkg.tar.xz"' | sed $sedexp > $arch_pkgs
+
+ # Separate packages by architecture
+ for arch in x86_64 i686 armv7h any; do
+ grep $arch$ $arch_pkgs | for f in $(</dev/stdin); do
+ echo "${f%-*-*-*} $arch" >> $arch_pkgs-$arch
+ done
+ done
+ cat $arch_pkgs-{x86_64,i686,armv7h,any} | sort -u > $arch_pkgs
;;
esac
}
@@ -113,21 +130,96 @@ submsg() {
"$1"
}
+compare_pkgs(){
+ # $1 is the pkgname and replacement (used when checking Arch pkgs)
+ # $2 is the packages file list
+
+ # We'll use this when we check Arch's pkgs only
+ if ! [[ -e $libre_pkgs ]]; then
+ libre_pkgs=$(mktemp)
+ for r in libre libre-multilib libre-testing libre-multilib-testing; do
+ mirrors_parabola+=(https://mirror.grapentin.org/parabola/$r/os/x86_64/)
+ mirrors_parabola+=(https://mirror.grapentin.org/parabola/$r/os/i686/)
+ mirrors_parabola+=(https://mirror.grapentin.org/parabola/$r/os/armv7h/)
+ done
+ curl -s ${mirrors[@]} | grep '".*.pkg.tar.xz"' | sed $sedexp > $libre_pkgs
+ for arch in x86_64 i686 armv7h any; do
+ grep $arch$ $libre_pkgs | for f in $(</dev/stdin); do
+ echo "${f%-*-*-*} $arch" >> $libre_pkgs-$arch
+ done
+ done
+ cat $libre_pkgs-{x86_64,i686,armv7h,any} | sort -u > $libre_pkgs
+ fi
+
+ # First check if the pkg is available for
+ # a specific architecture, if not, check
+ # if it's for 'any'
+ package="${1%%:*}"
+ replacement="$(cut -d ":" -f1 <(echo $1))"
+ for arch in x86_64 i686 armv7h; do
+ grep $arch$ $2 | awk '{print $1}' | grep -xw ^$package &> /dev/null || \
+ grep any$ $2 | awk '{print $1}' | grep -xw ^$package &> /dev/null || \
+ if [ $2 = $arch_pkgs ]; then
+ # Check if the package has a replacement, and
+ # if such replacement is available for the same
+ # architectures
+ if ! [[ $replacement = "" ]]; then
+ # If this works, it means the pkg doesn't exist for $arch in Arch,
+ # but we have the [libre] replacement which should be deprecated.
+ grep $arch$ $libre_pkgs | awk '{print $1}' | grep -xw ^$replacement &> /dev/null || \
+ grep any$ $libre_pkgs | awk '{print $1}' | grep -xw ^$replacement &> /dev/null && \
+ to_be_removed+=($arch) || is_not_for+=($arch)
+ else
+ # However if this fails, it means the pkg doesn't have a replacement
+ # for $arch, or it simply doesn't have a replacement.
+ is_not_for+=($arch)
+ fi
+ elif [ $2 = $parabola_pkgs ]; then
+ if ! [[ $replacement = "" ]]; then
+ # Look for the replacement
+ grep $arch$ $parabola_pkgs | awk '{print $1}' | grep -xw ^$replacement &> /dev/null || \
+ grep any$ $parabola_pkgs | awk '{print $1}' | grep -xw ^$replacement &> /dev/null && \
+ to_be_deleted+=($arch) || isnt_for+=($arch)
+ else
+ isnt_for+=($arch)
+ fi
+ fi
+ done
+
+ for arch in ${to_be_removed[@]}; do
+ submsg "$p ($arch) was not found, but we've a [libre] replacement which should be removed"
+ done
+
+ for arch in ${to_be_deleted[@]}; do
+ submsg "$p ($arch) was not found, but we've $replacement as replacement and should be removed"
+ done
+
+ if [[ ${is_not_for[@]} = "x86_64 i686 armv7h" ]]; then
+ submsg "$p was not found"
+ fi
+
+ if [[ ${isnt_for[@]} = "x86_64 i686 armv7h" ]]; then
+ submsg "$p was not found"
+ fi
+}
+
check(){
mkpkglist $1
case $1 in
parabola) msg 'Comparing blacklists with Parabola packages ...'
- pkgs=$(cut -d ":" -f 1 $blacklists_parabola | grep -v ^#)
+ pkgs=$(cut -d ":" -f1 $blacklists_parabola | grep -v ^#)
for p in $pkgs; do
- grep -xw ^$p$ $parabola_pkgs &> /dev/null || submsg "$p was not found"
+ compare_pkgs $p $parabola_pkgs
done
+ rm -f $parabola_pkgs
msg 'done'
;;
arch) msg 'Comparing blacklists with Arch packages ...'
- pkgs=$(cut -d ":" -f 1 $blacklists | grep -v ^#)
+ pkgs=$(grep -v ^# $blacklists | awk '{print $1}')
for p in $pkgs; do
- grep -xw ^$p$ $arch_pkgs &> /dev/null || submsg "$p was not found"
+ compare_pkgs $p $arch_pkgs
done
+ rm -f $arch_pkgs
msg 'done'
;;
*) err "$1 is not a valid argument"