From ed0fa606fc087c8cbde4dffc7dc3f004cedf859a Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sat, 28 Jan 2017 15:47:48 +0100 Subject: [PATCH] Add convert32 whitelist --- convert32-supported | 84 +++++++++++++++++++++++++++++++++++++++++++++ convert32pkg.sh | 14 ++++++++ massconvert32.sh | 15 ++++---- 3 files changed, 107 insertions(+), 6 deletions(-) create mode 100644 convert32-supported diff --git a/convert32-supported b/convert32-supported new file mode 100644 index 0000000..03b7d3f --- /dev/null +++ b/convert32-supported @@ -0,0 +1,84 @@ +# List of tested packages using convert32pkg. +# This list is safe to use with massconvert32.sh and safe to install. +# Note that these are from slackware 14.2, including patches. -current is unsupported. + +# a +bzip2 +dbus +eudev +xz + +# ap +cups +mpg123 + +# d +libtool + +# l +alsa-lib +elfutils +expat +freetype +glib2 +glibc +gmp +gst-plugins-base +gstreamer +harfbuzz +icu4c +lcms2 +libexif +libffi +libgphoto2 +libidn +libieee1284 +libjpeg-turbo +libnl3 +libpcap +libpng +libtiff +libusb +libxml2 +libxslt +ncurses +orc +v4l-utils +zlib + +# n +cyrus-sasl +gnutls +libgcrypt +libgpg-error +nettle +openldap-client +openssl +p11-kit + +# x +fontconfig +glu +libX11 +libXau +libXcomposite +libXcursor +libXdamage +libXdmcp +libXext +libXfixes +libXi +libXinerama +libXrandr +libXrender +libXv +libXvMC +libXxf86vm +libdrm +libpciaccess +libxcb +libxshmfence +mesa + +# xap +sane diff --git a/convert32pkg.sh b/convert32pkg.sh index 0431953..400f364 100755 --- a/convert32pkg.sh +++ b/convert32pkg.sh @@ -92,6 +92,20 @@ if [ -f install/doinst.sh ]; then cp "$pkgscript" install/doinst.64 fi + # There's some packages that need special treatment + if [ "$pkgname" = 'glib2' -o "$pkgname" = 'cups' -o "$pkgname" = 'sane' ]; then + sed -i -e '/^for file in/,/^done/d' install/doinst.sh + fi + if [ "$pkgname" = 'cups' ]; then + sed -i -e '/^if \[ -e etc\/rc.d\/rc.cups \]; then/,/^fi/d' install/doinst.sh + fi + if [ "$pkgname" = 'eudev' ]; then + sed -i -e '/^if \[ \(-e etc\/rc.d\/rc.udev\|-r etc\/rc.d\/rc.udev.new\) \]; then/,/^fi/d' install/doinst.sh + fi + if [ "$pkgname" = 'dbus' ]; then + sed -i -e '/^if \[ \(-e etc\/rc.d\/rc.messagebus\|-r etc\/rc.d\/rc.messagebus.new\) \]; then/,/^fi/d' install/doinst.sh + fi + # Extract all lines treating with symlinks. See /sbin/removepkg sed -n -e 's,^[ ]*( [ ]*cd[ ]* .* [ ]*; [ ]*\(rm\|ln\) [ ]*-\(rf\|sf\)[ ]* .* [ ]*)[ ]*$,&,p' -e 's,^[ ]*config .*[ ]*,&,p' install/doinst.64 > install/doinst diff --git a/massconvert32.sh b/massconvert32.sh index 710be93..5ea9464 100755 --- a/massconvert32.sh +++ b/massconvert32.sh @@ -2,10 +2,10 @@ # DISCLAIMER # Don't ever think of installing every single package generated with this script. -# While it *should* not cause any problems, doing so is simply overkill, and not recommended in the least. +# While it *should* not cause any problems, doing so is simply overkill, untested, and not recommended in the least. if [ "$#" -lt 2 ]; then - echo "Usage: $0 " 1>&2 + echo "Usage: $0 [whitelist]" 1>&2 exit 1 fi @@ -13,6 +13,7 @@ scriptdir="$(realpath "$(dirname "$0")")" slackware="$1" slackware64="$2" +whitelist="$3" find "$slackware" -type f -name "*.t?z" -printf '%P\n' | sort | while read -r pkg; do # See /sbin/installpkg @@ -23,6 +24,12 @@ find "$slackware" -type f -name "*.t?z" -printf '%P\n' | sort | while read -r pk pkgarch="$(echo "$pkgbase" | sed -e 's?.*-[^-]*-\([^-]*\)-[^-]*$?\1?')" pkgbuild="$(echo "$pkgbase" | sed -e 's?.*-[^-]*-[^-]*-\([^-]*\)$?\1?')" + if [ "$whitelist" ]; then + if ! grep -v '^#' "$whitelist" | fgrep -xq "$pkgname"; then + continue + fi + fi + case "$pkgarch" in i?86) pkgarch=x86_64 ;; *) continue ;; @@ -43,7 +50,3 @@ find "$slackware" -type f -name "*.t?z" -printf '%P\n' | sort | while read -r pk "$scriptdir/convert32pkg.sh" "$rpkg" "$rpkg64" ) done - -# if [ ! "$(tar tf "convert32-$pkgname-$pkgver-$pkgarch-$pkgbuild.$pkgext" | grep -v '^./\|^install/')" ]; then -# rm -f "convert32-$pkgname-$pkgver-$pkgarch-$pkgbuild.$pkgext" -# fi