1
0
Fork 0
mirror of git://slackware.nl/current.git synced 2025-01-15 15:41:54 +01:00
slackware-current/source/ap/slackpkg/files/slackpkg
Patrick J Volkerding 3e486d66d2 Mon Jun 7 18:53:49 UTC 2021
Hey folks! Sorry about the delay in getting this batch out but I had other
distractions going on here last week that prevented getting this one wrapped
up. Anyway, probably the highlight of this update set is that we've decided
to abandon the 5.10 LTS kernel in favor of following the latest one. We've
never really had a policy that required LTS in a stable release although that
is how it has been done for years, but based on comments from the Slackware
community it seems like 5.10 LTS isn't getting a lot of love and lacks
hardware support that people need now. Conversely, the reports on 5.12 have
been almost entirely positive, so we're going to provide what we think is the
best available kernel. It's unlikely that we'll see another LTS prior to
release, so the plan for maintenance is to keep following the latest kernels
as needed for security purposes. If that means we have to jump to a new branch
while supporting the stable release, we'll start the kernel out in testing
first until we've had some feedback that it's safe to move it to the patches
directory. Sooner or later we will end up on an LTS kernel again, and at that
point we'll just roll with that one. Feel free to comment (or complain) about
this plan on LQ... I'll be curious to see what people think. Anyway, enjoy!
a/hwdata-0.348-noarch-1.txz:  Upgraded.
a/kernel-generic-5.12.9-x86_64-1.txz:  Upgraded.
a/kernel-huge-5.12.9-x86_64-1.txz:  Upgraded.
a/kernel-modules-5.12.9-x86_64-1.txz:  Upgraded.
ap/ispell-3.4.04-x86_64-1.txz:  Upgraded.
ap/mpg123-1.28.0-x86_64-1.txz:  Upgraded.
ap/slackpkg-15.0.5-noarch-1.txz:  Upgraded.
  Add "--" option to "command cd" in bash completion file. (akinomyoga)
  shell-completions/slackpkg.bash: add "show-changelog".
  Import bash-completion file from upstream project.
  Added the new-config actions for specific files. (Piter PUNK)
  Harden slackpkg with respect to obtaining GPG key. (CRTS)
d/clisp-2.50_20191103_c26de7873-x86_64-5.txz:  Rebuilt.
  Upgraded to libffcall-2.3.
d/git-2.32.0-x86_64-1.txz:  Upgraded.
d/kernel-headers-5.12.9-x86-1.txz:  Upgraded.
d/poke-1.3-x86_64-1.txz:  Upgraded.
d/vala-0.52.4-x86_64-1.txz:  Upgraded.
k/kernel-source-5.12.9-noarch-1.txz:  Upgraded.
kde/calligra-3.2.1-x86_64-9.txz:  Rebuilt.
  Recompiled against poppler-21.06.1.
kde/cantor-21.04.1-x86_64-2.txz:  Rebuilt.
  Recompiled against poppler-21.06.1.
kde/digikam-7.2.0-x86_64-3.txz:  Rebuilt.
  Recompiled against imagemagick-7.0.11_14.
kde/kfilemetadata-5.82.0-x86_64-2.txz:  Rebuilt.
  Recompiled against poppler-21.06.1.
kde/kile-2.9.93-x86_64-9.txz:  Rebuilt.
  Recompiled against poppler-21.06.1.
kde/kitinerary-21.04.1-x86_64-2.txz:  Rebuilt.
  Recompiled against poppler-21.06.1.
kde/krita-4.4.3-x86_64-5.txz:  Rebuilt.
  Recompiled against poppler-21.06.1.
kde/okular-21.04.1-x86_64-2.txz:  Rebuilt.
  Recompiled against poppler-21.06.1.
l/alsa-lib-1.2.5-x86_64-2.txz:  Rebuilt.
  Account for unexpected packing of the conf file tarballs. We'll see if this
  is enough to make things work well again.
l/at-spi2-core-2.40.2-x86_64-1.txz:  Upgraded.
l/dvdauthor-0.7.2-x86_64-5.txz:  Rebuilt.
  Recompiled against imagemagick-7.0.11_14.
l/libogg-1.3.5-x86_64-1.txz:  Upgraded.
l/librsvg-2.50.7-x86_64-1.txz:  Upgraded.
l/pipewire-0.3.29-x86_64-1.txz:  Upgraded.
l/polkit-0.119-x86_64-1.txz:  Upgraded.
  This update includes a mitigation for local privilege escalation using
  polkit_system_bus_name_get_creds_sync().
  For more information, see:
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3560
  (* Security fix *)
l/poppler-21.06.1-x86_64-1.txz:  Upgraded.
  Shared library .so-version bump.
l/pycairo-1.20.1-x86_64-1.txz:  Upgraded.
l/qca-2.3.3-x86_64-1.txz:  Upgraded.
l/vte-0.64.2-x86_64-1.txz:  Upgraded.
n/epic5-2.1.5-x86_64-1.txz:  Upgraded.
n/httpd-2.4.48-x86_64-1.txz:  Upgraded.
  This release contains security fixes and improvements.
  mod_http2: Fix a potential NULL pointer dereference.
  Unexpected <Location> section matching with 'MergeSlashes OFF'.
  mod_auth_digest: possible stack overflow by one nul byte while validating
  the Digest nonce.
  mod_session: Fix possible crash due to NULL pointer dereference, which
  could be used to cause a Denial of Service with a malicious backend
  server and SessionHeader.
  mod_session: Fix possible crash due to NULL pointer dereference, which
  could be used to cause a Denial of Service.
  mod_proxy_http: Fix possible crash due to NULL pointer dereference, which
  could be used to cause a Denial of Service.
  mod_proxy_wstunnel, mod_proxy_http: Handle Upgradable protocols end-to-end
  negotiation.
  For more information, see:
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-31618
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-30641
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-35452
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-26691
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-26690
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-13950
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17567
  (* Security fix *)
n/libmbim-1.24.8-x86_64-1.txz:  Upgraded.
n/libqmi-1.28.6-x86_64-1.txz:  Upgraded.
n/nettle-3.7.3-x86_64-1.txz:  Upgraded.
n/openldap-2.4.59-x86_64-1.txz:  Upgraded.
n/p11-kit-0.24.0-x86_64-1.txz:  Upgraded.
n/php-7.4.20-x86_64-1.txz:  Upgraded.
n/vsftpd-3.0.4-x86_64-1.txz:  Upgraded.
n/whois-5.5.10-x86_64-1.txz:  Upgraded.
x/libX11-1.7.2-x86_64-1.txz:  Upgraded.
  This is a bug fix release, correcting a regression introduced by and
  improving the checks from the fix for CVE-2021-31535.
x/libinput-1.18.0-x86_64-1.txz:  Upgraded.
x/mesa-21.1.2-x86_64-1.txz:  Upgraded.
xap/blueman-2.2.1-x86_64-1.txz:  Upgraded.
xap/gnuplot-5.4.2-x86_64-1.txz:  Upgraded.
xap/mozilla-thunderbird-78.11.0-x86_64-1.txz:  Upgraded.
  This release contains security fixes and improvements.
  For more information, see:
    https://www.mozilla.org/en-US/thunderbird/78.11.0/releasenotes/
    https://www.mozilla.org/en-US/security/advisories/mfsa2021-26/
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29964
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29967
  (* Security fix *)
xap/pidgin-2.14.5-x86_64-1.txz:  Upgraded.
xap/xine-lib-1.2.11-x86_64-6.txz:  Rebuilt.
  Recompiled against poppler-21.06.1.
extra/bash-completion/bash-completion-2.11-noarch-2.txz:  Rebuilt.
  Removed the slackpkg completion file.
extra/php8/php8-8.0.7-x86_64-1.txz:  Upgraded.
isolinux/initrd.img:  Rebuilt.
kernels/*:  Upgraded.
usb-and-pxe-installers/usbboot.img:  Rebuilt.
2021-06-07 23:59:59 +02:00

606 lines
14 KiB
Bash

#!/bin/bash
#
# SlackPkg - An Automated packaging tool for Slackware Linux
# Copyright (C) 2003-2011 Roberto F. Batista, Evaldo Gardenali
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Project Page: https://slackpkg.org/
# Roberto F. Batista (aka PiterPunk) piterpunk@slackware.com
# Evaldo Gardenali (aka UdontKnow) evaldogardenali@fasternet.com.br
#
# Ensure that we're not at the epoch. slackpkg breaks with GPG checks when
# the date is so far in the past:
if [ $( date +%s ) -le 1437841588 ]; then
cat <<"EOF"
Error: Your system date is wrong. slackpkg requires that the date be correct
so that the package signatures can be verified.
The date may be incorrect because you have a system such as a Raspberry Pi that
does does not have an RTC (Real Time Clock), or that the correct date was unable
to be read from the RTC due to a driver bug, or a missing driver.
You may wish to set up NTP on your system:
http://docs.slackware.com/howtos:network_services:ntp
EOF
exit 1
fi
#========================================================================
#
# LOAD CONFIGURATIONS
#
#
# CONF = configuration directory
# SOURCE = A mirror of Slackware. Source can be set by editing $CONF/mirrors
#
VERSION=@VERSION@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
SLACKWARE_VERSION=$(cat /etc/slackware-version | cut -f2 -d\ )
[ -z "$ROOT" ] && CONF=${CONF:-/etc/slackpkg}
[ -n "$ROOT" ] && CONF=${CONF:-"${ROOT}/etc/slackpkg"}
SOURCE=$(sed -n '
# Remove leading and trailing blanks
s/^[[:blank:]]*//
s/[[:blank:]]*$//
# Only one token is allowed per line
/[[:blank:]]/d
# A single solidus should end the URI
s,[/]*$,/,
# Print the lines beginning with one of the URI schemes we look for
\@^file://@p
\@^cdrom://@p
\@^local://@p
\@^https\{0,1\}://@p
\@^ftps\{0,1\}://@p' $CONF/mirrors)
PATH='' builtin source $CONF/slackpkg.conf
WORKDIR=${ROOT}/${WORKDIR}
ERROR=""
# Set temporary directory
#
mkdir -p ${ROOT}/tmp
TMPDIR=$(mktemp -p ${ROOT}/tmp -d slackpkg.XXXXXX 2>/dev/null)
if [ $? -ne 0 ]; then
TMPDIR="${ROOT}/tmp/slackpkg.${RANDOM}"
mkdir -p -m 700 $TMPDIR || TMPDIR="FAILED"
fi
#
# Load the slackpkg functions
#
. /usr/libexec/slackpkg/core-functions.sh
#========================================================================
#
# COMMAND LINE PARSING
#
if [ $# -eq 0 ]; then
usage
fi
while [ -n "$1" ] ; do
case $1 in
-delall=on)
DELALL=on
shift
;;
-delall=off)
DELALL=off
shift
;;
-checkmd5=on)
CHECKMD5=on
shift
;;
-checkmd5=off)
CHECKMD5=off
shift
;;
-checkgpg=on)
CHECKGPG=on
shift
;;
-checkgpg=off)
CHECKGPG=off
shift
;;
-checksize=on)
CHECKSIZE=on
shift
;;
-checksize=off)
CHECKSIZE=off
shift
;;
-postinst=on)
POSTINST=on
shift
;;
-postinst=off)
POSTINST=off
shift
;;
-onoff=on)
ONOFF=on
shift
;;
-onoff=off)
ONOFF=off
shift
;;
-download_all=on)
DOWNLOAD_ALL=on
shift
;;
-download_all=off)
DOWNLOAD_ALL=off
shift
;;
-dialog=on)
DIALOG=on
shift
;;
-dialog=off)
DIALOG=off
shift
;;
-dialog_maxargs=*)
DIALOG_MAXARGS=$(echo $1 | cut -f2 -d=)
shift
;;
-batch=on)
BATCH=on
shift
;;
-batch=off)
BATCH=off
shift
;;
-only_new_dotnew=on)
ONLY_NEW_DOTNEW=on
shift
;;
-only_new_dotnew=off)
ONLY_NEW_DOTNEW=off
shift
;;
-orig_backups=on)
ORIG_BACKUPS=on
shift
;;
-orig_backups=off)
ORIG_BACKUPS=off
shift
;;
-use_includes=on)
USE_INCLUDES=on
shift
;;
-use_includes=off)
USE_INCLUDES=off
shift
;;
-spinning=on)
SPINNING=on
shift
;;
-spinning=off)
SPINNING=off
shift
;;
-default_answer=y|-default_answer=yes)
DEFAULT_ANSWER=y
shift
;;
-default_answer=n|-default_answer=no)
DEFAULT_ANSWER=n
shift
;;
-mirror=*)
SOURCE=$(echo $1 | cut -f2 -d=)
shift
;;
install|reinstall|upgrade|remove|download)
CMD=$1
shift
if [ -n "$1" ]; then
if echo $1 | egrep -q "^\.{0,2}/" ; then
if [ -e $1 ]; then
INPUTLIST=$(cat $1 | tr "\n" " ")
else
echo -e "The file $1 doesn't exist.\n"
cleanup
fi
else
#
# Sanitize the argument. We have some problems with dots
# and plus (.+)
#
#INPUTLIST="$(echo $@ | sed -e 's/\+/\\\+/g' -e 's/\./\\\./g')"
INPUTLIST="$@"
fi
elif [ "$CMD" != "blacklist" ]; then
usage
fi
shift $#
;;
blacklist)
CMD=$1
shift $#
;;
update)
CMD=$1
shift
if [ "$1" = "gpg" ]; then
UPARG="$1"
shift
fi
;;
install-new|upgrade-all|clean-system|new-config|check-updates|show-changelog|help)
CMD=$1
shift
if [ -n "$1" ]; then
echo -e "\n$CMD: Ignoring extra arguments: $@" >&2 >&1
shift $#
fi
;;
generate-template|install-template|remove-template|search|file-search|info)
CMD=$1
shift
if [ -n "$1" ]; then
ARG=$1
shift
else
usage
fi
if [ -n "$1" ]; then
echo -e "\n$CMD: Ignoring extra arguments: $@" >&2 >&1
shift $#
fi
;;
*)
echo -e "\n$1: Unknown option.\n"
usage
;;
esac
done
#========================================================================
#
# SYSTEM SETUP
#
system_setup
#========================================================================
#
# SYNTAX CHECKING
#
system_checkup
#========================================================================
#
# READ EXTRA FUNCTIONS
#
# If you want a new function or need a rewrite of an existing
# feature, you can put your new function in a shell script under
# /usr/libexec/slackpkg/functions.d/
#
# Remember - the new function scripts need to be executable
#
for i in /usr/libexec/slackpkg/functions.d/*.sh; do
if [ -x $i ]; then
. $i
fi
done
#========================================================================
#
# MAIN PROGRAM
#
#
# A *BIG* case with all slackpkg commands -:)
#
case "$CMD" in
help)
full_usage
;;
check-updates)
# output to stdout if no change, or stderr if changes. Will cause
# cron jobs to notify system admin
if checkchangelog 1>/dev/null 2>/dev/null ; then
echo "Slackpkg: No updated packages since last check."
else
echo "Slackpkg: Updated packages are available since last check." >&2
PENDING_UPDATES=1
fi
;;
show-changelog)
# display changelog and exit
if [ -e ${WORKDIR}/ChangeLog.txt ]; then
$MORECMD ${WORKDIR}/ChangeLog.txt
else
echo "ChangeLog.txt file not found. Aborting"
fi
POSTINST=off
;;
update)
# If you are using "slackpkg update gpg" OR the system
# doesn't have Slackware GPG key, download and install
# the key
#
if [ "$UPARG" = "gpg" ] || [ "$GPGFIRSTTIME" = "0" ]; then
get_gpg_key && import_gpg_key
if [ "$UPARG" = "gpg" ]; then
cleanup
fi
fi
echo "Updating the package lists..."
updatefilelists
;;
install)
makelist $INPUTLIST
if [ -n "$LIST" ]; then
showlist "$LIST" $CMD
install_pkg
else
echo -e "No packages match the pattern for install. Try:"
echo -e "\n\t$0 reinstall|upgrade $2\n"
POSTINST=off
fi
;;
reinstall)
makelist $INPUTLIST
if [ -n "$LIST" ]; then
showlist "$LIST" $CMD
install_pkg
else
echo -e "No packages match the pattern for reinstall. Try:"
echo -e "\n\t$0 install|upgrade $2\n"
POSTINST=off
fi
;;
upgrade)
sanity_check
makelist $INPUTLIST
if [ -n "$LIST" ]; then
showlist "$LIST" $CMD
upgrade_pkg
else
echo -e "No packages match the pattern for upgrade. Try:"
echo -e "\n\t$0 install|reinstall $2\n"
POSTINST=off
fi
;;
download)
makelist $INPUTLIST
DELALL="off"
if ! [ "$LIST" = "" ]; then
showlist "$LIST" $CMD
for i in $SHOWLIST; do
getpkg $i true
done
else
echo -e "No packages match the pattern for download."
POSTINST=off
fi
;;
remove)
makelist $INPUTLIST
if [ "$LIST" = "" ]; then
echo -e "The file(s) $INPUTLIST can't be removed - package not installed.\n"
cleanup
fi
showlist "$LIST" $CMD
remove_pkg
;;
clean-system)
makelist $INPUTLIST
if [ -n "$LIST" ]; then
showlist "$LIST" remove
remove_pkg
else
echo -e "No packages match the pattern for clean-system\n"
POSTINST=off
fi
;;
upgrade-all)
sanity_check
makelist $INPUTLIST
if ! [ -n "${LIST}" ]; then
echo -e "No packages match the pattern for upgrade. Try:"
echo -e "\n\t$0 install|reinstall $2\n"
POSTINST=off
else
showlist "$LIST" upgrade
if [ "$DOWNLOAD_ALL" = "on" ]; then
OLDDEL="$DELALL"
DELALL="off"
for i in $SHOWLIST; do
getpkg $i true
done
DELALL="$OLDDEL"
fi
FOUND=""
FOUND=$(echo $SHOWLIST | tr -s ' ' "\n" | grep "slackpkg-[0-9]")
if [ "$FOUND" != "" ]; then
getpkg $FOUND upgradepkg Upgrading
echo -e "slackpkg was upgraded - you will need start the upgrade process again...\n"
cleanup
exit 0
fi
for i in pkgtools aaa_glibc-solibs glibc-solibs aaa_libraries aaa_elflibs readline sed; do
FOUND=""
FOUND=$(echo $SHOWLIST | tr -s ' ' "\n" | grep "${i}-[0-9]")
if [ "$FOUND" != "" ]; then
getpkg $FOUND upgradepkg Upgrading
fi
done
upgrade_pkg
fi
;;
install-new)
makelist ${INPUTLIST}
if ! [ -n "${LIST}" ]; then
echo -e "No packages match the pattern for install. Try:"
echo -e "\n\t$0 upgrade|reinstall $2\n"
POSTINST=off
else
showlist "$LIST" install
install_pkg
fi
;;
blacklist)
echo -e "Edit /etc/slackpkg/blacklist to add or remove packages."
echo -e ""
echo -e "Packages in blacklist:\n"
grep -v "^#" $CONF/blacklist | $MORECMD
echo -e ""
;;
file-search)
PATTERN=$(echo $ARG | sed -e 's/\+/\\\+/g' -e 's/\./\\\./g' -e 's/ /\|/g')
makelist $PATTERN
if [ "$LIST" = "" ]; then
echo -e "No packages contains \"$PATTERN\" file."
else
echo -e "The list below shows the packages that contains \"$PATTERN\" file.\n"
searchlist "$LIST"
echo -e "\nYou can search specific packages using \"slackpkg search package\".\n"
fi
;;
search)
PATTERN=$(echo $ARG | sed -e 's/\+/\\\+/g' -e 's/\./\\\./g' -e 's/ /\|/g')
makelist $PATTERN
if [ "$LIST" = "" ]; then
echo -e "No package name matches the pattern."
else
echo -e "The list below shows all packages with name matching \"$PATTERN\".\n"
searchlist "$LIST"
echo -e "\nYou can search specific files using \"slackpkg file-search file\".\n"
fi
;;
info)
PATTERN=$(echo $ARG | sed -e 's/\+/\\\+/g' -e 's/\./\\\./g')
NAME=$(cutpkg $PATTERN)
awk -F: "/PACKAGE NAME:.* ${NAME}-[^-]+-(${ARCH}|fw|noarch)-[^-]+/,/^$/ {
found=1
if (\$1 ~ /"$NAME"/) {
print \$PATTERN
} else {
print \$0
}
}
END {
if ( found != 1 ) {
print \"No packages found! Try:\n\n\tslackpkg search $PATTERN\n\nand choose one (and ONLY one package).\n\"
}
}" ${WORKDIR}/PACKAGES.TXT 2>/dev/null
;;
new-config)
POSTINST=on
;;
generate-template)
TEMPLATE=$ARG.template
if [ -e $TEMPLATEDIR/$TEMPLATE ]; then
echo -e "\
\"$TEMPLATE\" already exists!\n\
\nDo you want to overwrite $TEMPLATE (y/N)? \c"
answer
if [ "$ANSWER" = "Y" -o "$ANSWER" = "y" ]; then
rm $TEMPLATEDIR/$TEMPLATE
echo
else
cleanup
fi
fi
generate_template $ARG
;;
install-template)
TEMPLATE=$ARG.template
if [ -e $TEMPLATEDIR/$TEMPLATE ]; then
( cd $TEMPLATEDIR
parse_template $TEMPLATE
)
INPUTLIST=$(cat ${TMPDIR}/${TEMPLATE}.tmp | tr "\n" " ")
else
echo -e "$ARG template not found!"
cleanup
fi
makelist $INPUTLIST
if [ -n "$LIST" ]; then
showlist "$LIST" $CMD
install_pkg
else
echo -e "All packages from $ARG template are already installed"
POSTINST=off
fi
;;
remove-template)
TEMPLATE=$ARG.template
if [ -e $TEMPLATEDIR/$TEMPLATE ]; then
( cd $TEMPLATEDIR
parse_template $TEMPLATE
)
INPUTLIST=$(cat ${TMPDIR}/${TEMPLATE}.tmp | tr "\n" " ")
else
echo -e "$ARG template not found!"
cleanup
fi
makelist $INPUTLIST
if [ "$LIST" = "" ]; then
echo -e "The template $ARG can't be removed - it isn't installed.\n"
cleanup
fi
showlist "$LIST" $CMD
remove_pkg
;;
*)
usage
;;
esac
#
# Executes the post-install. This is the default
# Before runs post-install, check if the slackpkg option is
# remove, search, update, info or clean-system.
# That options don't change configurations files and, if
# someone remove the kernel, i hope he knows what is doing.
#
for i in check-updates remove search file-search update info blacklist \
clean-system download generate-template remove-template; do
if [ "$CMD" = "$i" ]; then
POSTINST=off
fi
done
if [ "$POSTINST" != "off" ]; then
lookkernel
looknew
fi
cleanup