mirror of
https://github.com/zuno/slackpkgplus
synced 2025-01-13 20:01:04 +01:00
Merge branch 'test'
Added USETERSE and PROXY options Updated manpage, CHANGES and sample configuration Added zlookkernel.sh Fixed search with duplicated packages
This commit is contained in:
commit
193e73387b
7 changed files with 196 additions and 18 deletions
29
src/CHANGES
29
src/CHANGES
|
@ -8,7 +8,11 @@
|
|||
|
||||
- Changed some default settings in sample configuration file
|
||||
|
||||
- Added SBOURL to configure the SlackBuild.org repository
|
||||
- Added SBOURL to configure the SlackBuild.org repository (search only)
|
||||
|
||||
- Added USETERSE to use the --terse mode for pkgtools
|
||||
|
||||
- Added PROXY to specify a proxy server
|
||||
|
||||
|
||||
*New features:
|
||||
|
@ -22,6 +26,8 @@
|
|||
SlackBuilds.org and report the url to download to build and install
|
||||
packages yourself.
|
||||
|
||||
- Added optional script to configure lilo/elilo/initrd after a kernel upgrade
|
||||
|
||||
|
||||
*Improvements
|
||||
|
||||
|
@ -29,15 +35,28 @@
|
|||
|
||||
- Smaller output for 'slackpkg search'
|
||||
|
||||
- Replaced Spinning with Percentage
|
||||
|
||||
|
||||
*BugFixes
|
||||
|
||||
- 'slackpkg search' did not honor the '+' symbol
|
||||
|
||||
- Issues when an invalid repository is configured
|
||||
- Issues when an invalid repository is configured or no repositories are
|
||||
configured
|
||||
|
||||
- 'slackpkg check-updates' did not work unless you set VERBOSE=3
|
||||
|
||||
- Fix a not work properly when run as a package group instead single packages
|
||||
(a, ap, d, ...)
|
||||
|
||||
- Fix caching HTTP/2 servers
|
||||
|
||||
- Fix setupmultilib script
|
||||
|
||||
- 'slackpkg search' did not show duplicated packages (as ffmpeg in alienbob
|
||||
and restricted repositories)
|
||||
|
||||
|
||||
*Various
|
||||
|
||||
|
@ -46,9 +65,11 @@
|
|||
- Bash completation enabled by default (if you have bash_completation package
|
||||
installed)
|
||||
|
||||
- 'slackpkg upgrade' now works with slackpkg-2.83 (development release).
|
||||
- Works with slackpkg-2.84 (development release).
|
||||
This is not officially released, so not all regressions can be solved.
|
||||
Currently slackpkg+ does not work with slackpkg-2.83 if $ROOT is non-empty.
|
||||
Currently slackpkg+ does not work with slackpkg-2.84 if $ROOT is non-empty.
|
||||
slackpkg 2.84 introduces a new blacklist system. slackpkg+ uses it in
|
||||
install/upgrade/remove options; not 'search' and does not impact greylist.
|
||||
|
||||
|
||||
== From 1.6 and 1.7 ==
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
.\" Questa manpage è scritta modificando quella di slackpkg.conf
|
||||
.\"
|
||||
.\"*******************************************************************
|
||||
.TH SLACKPKGPLUS.CONF 5 "July 2016" slackpkg+\-1.7.0 ""
|
||||
.TH SLACKPKGPLUS.CONF 5 "Febbraio 2020" slackpkg+\-1.8.0 ""
|
||||
.SH NOME
|
||||
\fBslackpkgplus.conf\fP \- Configuration file for slackpkg+
|
||||
|
||||
|
@ -53,12 +53,14 @@ Here is the list of available settings:
|
|||
|
||||
\fBDownload settings\fP
|
||||
.ds 1 VERBOSE\t\t\t\t0,1,2,3\t\t1\t\tyes
|
||||
.ds 2 WGETOPTS\t\t\t\tstring\t\t-\t\tyes
|
||||
.ds 3 DOWNLOADCMD\t\t\tstring\t\twget\t\tyes
|
||||
.ds 4 DOWNLOADONLY\t\t\ton/off\t\toff\t\tyes
|
||||
.ds 5 CACHEUPDATE\t\t\ton/off\t\toff\t\tyes
|
||||
.ds 6 SEARCH_CLOG_INPARENT\ton/off\t\toff\t\tno
|
||||
.ds 7 STRICTGPG\t\t\t\ton/off\t\ton\t\tyes
|
||||
.ds 2 USETERSE\t\t\t\ton/off\t\toff\t\tyes
|
||||
.ds 3 PROXY\t\t\t\tstrings\t\t-\t\tyes
|
||||
.ds 4 WGETOPTS\t\t\t\tstring\t\t-\t\tyes
|
||||
.ds 5 DOWNLOADCMD\t\t\tstring\t\twget\t\tyes
|
||||
.ds 6 DOWNLOADONLY\t\t\ton/off\t\toff\t\tyes
|
||||
.ds 7 CACHEUPDATE\t\t\ton/off\t\toff\t\tyes
|
||||
.ds 8 SEARCH_CLOG_INPARENT\ton/off\t\toff\t\tno
|
||||
.ds 9 STRICTGPG\t\t\t\ton/off\t\ton\t\tyes
|
||||
.in +2
|
||||
\*1
|
||||
.br
|
||||
|
@ -73,6 +75,10 @@ Here is the list of available settings:
|
|||
\*6
|
||||
.br
|
||||
\*7
|
||||
.br
|
||||
\*8
|
||||
.br
|
||||
\*9
|
||||
.in
|
||||
|
||||
|
||||
|
@ -212,6 +218,23 @@ With this setting you can specify how many output should show wget. Possible val
|
|||
|
||||
This setting is ignored (or partially ignored if it is set to \fI3\fP if you are using another downloader with setting \fB\%DOWNLOADCMD\fP (see below).
|
||||
|
||||
.TP 5
|
||||
\fBUSETERSE\fP
|
||||
.br
|
||||
Set this variable ti \fIon\P to use the TERSE option of installpkg(8), upgradepkg(8), removepkg(8). Install displaying only a single description line to stdout instead full description and coplete filelist.
|
||||
|
||||
.TP 5
|
||||
\fBPROXY\fP
|
||||
.br
|
||||
Use proxy when needed
|
||||
|
||||
.in +4
|
||||
PROXY=192.168.0.1:3128
|
||||
.in
|
||||
|
||||
If empty use the system settings (enviroment variable http_proxy and https_proxy). Set to \fIoff\fP to disable the proxy.
|
||||
|
||||
|
||||
.TP 5
|
||||
\fBWGETOPTS\fP
|
||||
.br
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
.\" Questa manpage è scritta modificando quella di slackpkg.conf
|
||||
.\"
|
||||
.\"*******************************************************************
|
||||
.TH SLACKPKGPLUS.CONF 5 "Luglio 2016" slackpkg+\-1.7.0 ""
|
||||
.TH SLACKPKGPLUS.CONF 5 "Febbraio 2020" slackpkg+\-1.8.0 ""
|
||||
.SH NOME
|
||||
\fBslackpkgplus.conf\fP \- Configurazione per slackpkg+
|
||||
|
||||
|
@ -53,12 +53,14 @@ Seguono le differenti impostazioni disponibili:
|
|||
|
||||
\fBImpostazioni di download\fP
|
||||
.ds 1 VERBOSE\t\t\t\t0,1,2,3\t\t1\t\tsi
|
||||
.ds 2 WGETOPTS\t\t\t\tstringa\t\t-\t\tsi
|
||||
.ds 3 DOWNLOADCMD\t\t\tstringa\t\twget\t\tsi
|
||||
.ds 4 DOWNLOADONLY\t\t\ton/off\t\toff\t\tsi
|
||||
.ds 5 CACHEUPDATE\t\t\ton/off\t\toff\t\tsi
|
||||
.ds 6 SEARCH_CLOG_INPARENT\ton/off\t\toff\t\tno
|
||||
.ds 7 STRICTGPG\t\t\t\ton/off\t\ton\t\tsi
|
||||
.ds 2 USETERSE\t\t\t\ton/off\t\toff\t\tsi
|
||||
.ds 3 PROXY\t\t\t\tstrings\t\t-\t\tsi
|
||||
.ds 4 WGETOPTS\t\t\t\tstringa\t\t-\t\tsi
|
||||
.ds 5 DOWNLOADCMD\t\t\tstringa\t\twget\t\tsi
|
||||
.ds 6 DOWNLOADONLY\t\t\ton/off\t\toff\t\tsi
|
||||
.ds 7 CACHEUPDATE\t\t\ton/off\t\toff\t\tsi
|
||||
.ds 8 SEARCH_CLOG_INPARENT\ton/off\t\toff\t\tno
|
||||
.ds 9 STRICTGPG\t\t\t\ton/off\t\ton\t\tsi
|
||||
.in +2
|
||||
\*1
|
||||
.br
|
||||
|
@ -73,6 +75,10 @@ Seguono le differenti impostazioni disponibili:
|
|||
\*6
|
||||
.br
|
||||
\*7
|
||||
.br
|
||||
\*8
|
||||
.br
|
||||
\*9
|
||||
.in
|
||||
|
||||
|
||||
|
@ -211,6 +217,21 @@ Con questa impostazione si pu
|
|||
|
||||
Questa impostazione viene ignorata (o parzialmente ignorata se viene impostata a \fI3\fP in caso si utilizzi un altro downloader con l'impostazione \fB\%DOWNLOADCMD\fP (v.sotto).
|
||||
|
||||
.TP 5
|
||||
\fBUSETERSE\fP
|
||||
.br
|
||||
Impostando questa variabile a \fIon\fP verrà abilitata l'opzione TERSE di installpkg(8), upgradepkg(8), removepkg(8). Ovvero in fase di installazione mostra solo una singola riga di descrizione anzichè descrizione completa e lista di file.
|
||||
|
||||
.TP 5
|
||||
\fBPROXY\fP
|
||||
.br
|
||||
Imposta il proxy dove necessario.
|
||||
|
||||
.in +4
|
||||
PROXY=192.168.0.1:3128
|
||||
.in
|
||||
|
||||
Se non impostato usa quello di sistema (variabili d'ambiente http_proxy e https_proxy). Impostando a \fIoff\fP disattiva il proxy.
|
||||
.TP 5
|
||||
\fBWGETOPTS\fP
|
||||
.br
|
||||
|
|
|
@ -33,6 +33,8 @@ if [ -e $CONF/slackpkgplus.conf ];then
|
|||
EXTSTRICTGPG=$STRICTGPG
|
||||
EXTDETAILED_INFO=$DETAILED_INFO
|
||||
EXTWW_FILE_SEARCH=$WW_FILE_SEARCH
|
||||
EXTUSETERSE=$USETERSE
|
||||
EXTPROXY=$PROXY
|
||||
|
||||
. $CONF/slackpkgplus.conf
|
||||
|
||||
|
@ -50,6 +52,24 @@ if [ -e $CONF/slackpkgplus.conf ];then
|
|||
STRICTGPG=${EXTSTRICTGPG:-$STRICTGPG}
|
||||
DETAILED_INFO=${EXTDETAILED_INFO:-$DETAILED_INFO}
|
||||
WW_FILE_SEARCH=${EXTWW_FILE_SEARCH:-$WW_FILE_SEARCH}
|
||||
USETERSE=${EXTUSETERSE:-$USETERSE}
|
||||
PROXY=${EXTPROXY:-$PROXY}
|
||||
|
||||
if [ "$PROXY" == "off" ];then
|
||||
unset http_proxy
|
||||
unset https_proxy
|
||||
else
|
||||
http_proxy=$PROXY
|
||||
https_proxy=$PROXY
|
||||
export http_proxy https_proxy
|
||||
fi
|
||||
|
||||
if [ "$USETERSE" == "on" ];then
|
||||
TERSE=0 # note that TERSE=0 means TERSE ENABLED; undocumentated feature in installpkg(8)
|
||||
else
|
||||
TERSE=
|
||||
fi
|
||||
export TERSE
|
||||
|
||||
USEBLACKLIST=true
|
||||
if [ "$USEBL" == "off" -o "$USEBL" == "0" ];then
|
||||
|
|
|
@ -10,6 +10,13 @@ SLACKPKGPLUS=on
|
|||
# set to '3' for a debug mode
|
||||
VERBOSE=1
|
||||
|
||||
# Enable TERSE to use a smaller output in installpkg/upgradepkg
|
||||
USETERSE=on
|
||||
|
||||
# Use proxy. Leave commented to use system settings.
|
||||
#PROXY=off
|
||||
#PROXY=<host>:<port>
|
||||
|
||||
# Enable (on) / Disable (off) the official slackpkg blacklist. May be useful to temporarily skip
|
||||
# the slackware blacklist. You can also override it from command line:
|
||||
# 'USEBL=off slackpkg upgrade-all'
|
||||
|
|
|
@ -10,6 +10,13 @@ SLACKPKGPLUS=on
|
|||
# set to '3' for a debug mode
|
||||
VERBOSE=1
|
||||
|
||||
# Enable TERSE to use a smaller output in installpkg/upgradepkg
|
||||
USETERSE=on
|
||||
|
||||
# Use proxy. Leave commented to use system settings.
|
||||
#PROXY=off
|
||||
#PROXY=<host>:<port>
|
||||
|
||||
# By default slackpkg+ deny to install 32bit packages.
|
||||
#
|
||||
# Set this flag to 'on' allow slackpkg+ to install 32bit packages on a 64bit slackware
|
||||
|
|
79
src/zlookkernel.sh
Executable file
79
src/zlookkernel.sh
Executable file
|
@ -0,0 +1,79 @@
|
|||
### Note about ZLookKernel ##
|
||||
#
|
||||
#
|
||||
# After a kernel update, it try to rebuild the initrd - if any - and try to
|
||||
# reinstall lilo/elilo
|
||||
#
|
||||
# To install it run (as root):
|
||||
# $ ln -sf /usr/libexec/slackpkg/zlookkernel.sh /usr/libexec/slackpkg/functions.d/
|
||||
#
|
||||
# To uninstall it run (as root):
|
||||
# $ rm /usr/libexec/slackpkg/functions.d/zlookkernel.sh
|
||||
#
|
||||
|
||||
lookkernel() {
|
||||
NEWKERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null)
|
||||
if [ "$KERNELMD5" != "$NEWKERNELMD5" ]; then
|
||||
KERNEL=$(readlink /boot/vmlinuz | sed 's/.*-\([1-9]\)/\1/')
|
||||
echo -e "\nYour kernel image was updated (found $KERNEL). You have to rebuild the bootloader.\nDo you want slackpkg to do it? (Y/n)"
|
||||
answer
|
||||
if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
|
||||
INITRD=/boot/initrd.gz
|
||||
if [ -e /boot/initrd-tree/command_line ];then
|
||||
OINITRD=$(cat /boot/initrd-tree/command_line|grep -- " -o "|sed -r 's/^.* -o *([^ ]*).*$/\1/')
|
||||
INITRD=${OINITRD:-$INITRD}
|
||||
|
||||
if [ -f "$INITRD" ];then
|
||||
echo -en "Found $INITRD; rebuilding it with:\n "
|
||||
MKINITRD=$(sed -e "s/ *-k *[^ ]\+//g" -e "s/ *$/ -k $KERNEL/" /boot/initrd-tree/command_line)
|
||||
echo " $MKINITRD"
|
||||
echo "Do you want continue? (Y/n)"
|
||||
answer
|
||||
if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
|
||||
$MKINITRD
|
||||
if [ ! -d "/boot/initrd-tree/lib/modules/$KERNEL" ];then
|
||||
echo -e "\nWARNING! the initrd may failed to create\n"
|
||||
echo " The initrd may failed to create." >>$TMPDIR/error.log
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ -e /boot/efi/EFI/Slackware/elilo.conf ];then
|
||||
echo -e "\nFound elilo. Copying files to EFI partition"
|
||||
COPYDONE=""
|
||||
for tocopy in vmlinuz vmlinuz-generic vmlinuz-huge `basename $INITRD`;do
|
||||
if [ -e /boot/$tocopy ]&&[ -e /boot/efi/EFI/Slackware/$tocopy ]&&grep -E -q "= *$tocopy *$" /boot/efi/EFI/Slackware/elilo.conf ;then
|
||||
echo "Do you want to copy $tocopy to EFI partition? (Y/n)"
|
||||
answer
|
||||
if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
|
||||
cp -v /boot/$tocopy /boot/efi/EFI/Slackware/$tocopy && COPYDONE="$COPYDONE $tocopy"
|
||||
touch -r /boot/$tocopy /boot/efi/EFI/Slackware/$tocopy
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ -z "$COPYDONE" ];then
|
||||
echo -e "\nWARNING! no files copied. You have to fix bootloader yourself\n"
|
||||
echo " No files copied to the EFI partition found. Fix it yourself" >>$TMPDIR/error.log
|
||||
fi
|
||||
elif [ -x /sbin/lilo ]&&[ -e /etc/lilo.conf ]; then
|
||||
echo -e "\nFound lilo. Do you want to run now: /sbin/lilo ? (Y/n)"
|
||||
answer
|
||||
if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
|
||||
if ! /sbin/lilo -t ;then
|
||||
echo "You need to fix your lilo configuration. Then press return to continue."
|
||||
read
|
||||
fi
|
||||
/sbin/lilo -v
|
||||
fi
|
||||
elif [ -e /boot/grub ]&&[ -x /usr/sbin/grub-install ];then
|
||||
echo -e "\nWARNING! Grub found but not supported by slackpkg. You have to fix it yourself\n"
|
||||
echo " Grub found but not supported by slackpkg. You have to fix it yourself" >>$TMPDIR/error.log
|
||||
else
|
||||
echo -e "\nWARNING! slackpkg can't found your bootloader configuration. You have to fix it yourself\n"
|
||||
echo " slackpkg can't found your bootloader configuration. You have to fix it yourself" >>$TMPDIR/error.log
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
Loading…
Reference in a new issue