system/multitail: Updated for version 7.0.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
1a59d5f227
commit
a6f967420b
|
@ -0,0 +1,28 @@
|
|||
From 608bad75a9acf51e2283768996721bd549149991 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Dorsch <t.dorsch@ibgndt.de>
|
||||
Date: Wed, 21 Sep 2022 16:41:51 +0200
|
||||
Subject: [PATCH] Used LICENSE file as license.txt (license.txt is missing),
|
||||
and also fixed ect-typo
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 862496c..3492d3d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -147,11 +147,11 @@ install(FILES multitail.conf DESTINATION etc RENAME multitail.conf.new)
|
||||
install(FILES multitail.1 DESTINATION share/man/man1)
|
||||
# install doc files
|
||||
install(FILES manual.html DESTINATION share/doc/multitail-${VERSION})
|
||||
-install(FILES license.txt DESTINATION share/doc/multitail-${VERSION})
|
||||
+install(FILES LICENSE DESTINATION share/doc/multitail-${VERSION})
|
||||
install(FILES readme.txt DESTINATION share/doc/multitail-${VERSION})
|
||||
install(FILES thanks.txt DESTINATION share/doc/multitail-${VERSION})
|
||||
# cp conversion-scripts/* etc/multitail/
|
||||
-install(DIRECTORY conversion-scripts DESTINATION ect/multitail)
|
||||
+install(DIRECTORY conversion-scripts DESTINATION etc/multitail)
|
||||
|
||||
|
||||
if(USE_CPPCHECK)
|
|
@ -0,0 +1,109 @@
|
|||
From d7d10f3bce261074c116eba9f924b61f43777662 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyich@gmail.com>
|
||||
Date: Wed, 17 Nov 2021 07:58:02 +0000
|
||||
Subject: [PATCH] multitail: always use "%s"-style format for printf()-style
|
||||
functions
|
||||
|
||||
`ncuses-6.3` added printf-style function attributes and now makes
|
||||
it easier to catch cases when user input is used in palce of format
|
||||
string when built with CFLAGS=-Werror=format-security:
|
||||
|
||||
ui.c:1167:71: error: format not a string literal and no format arguments [-Werror=format-security]
|
||||
1167 | mvwprintw(mywin -> win, 4 + loop, 42, dummy);
|
||||
| ^~~~~
|
||||
|
||||
Let's wrap all the missing places with "%s" format.
|
||||
---
|
||||
mt.c | 12 +++---------
|
||||
stripstring.c | 2 +-
|
||||
term.c | 4 ++--
|
||||
ui.c | 4 ++--
|
||||
4 files changed, 8 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/mt.c b/mt.c
|
||||
index 83c9e0a..f653919 100644
|
||||
--- a/mt.c
|
||||
+++ b/mt.c
|
||||
@@ -1459,14 +1459,8 @@ void update_statusline(NEWWIN *status, int win_nr, proginfo *cur)
|
||||
else
|
||||
{
|
||||
cur_len = 13;
|
||||
- /* is this trick still neccessary as I moved from off_t to off64_t? */
|
||||
-#if 0
|
||||
- /* this trick is because on MacOS X 'off_t' is specified as a 64 bit integer */
|
||||
-#endif
|
||||
- if (sizeof(off64_t) == 8)
|
||||
- mvwprintw(status -> win, 0, win_width - (strlen(timestamp) + cur_len), "%10lld - %s", fsize, timestamp);
|
||||
- else
|
||||
- mvwprintw(status -> win, 0, win_width - (strlen(timestamp) + cur_len), "%10ld - %s", fsize, timestamp);
|
||||
+ /* Accomodate for both 32-bit and 64-bit off_t. */
|
||||
+ mvwprintw(status -> win, 0, win_width - (strlen(timestamp) + cur_len), "%10lld - %s", (long long)fsize, timestamp);
|
||||
}
|
||||
|
||||
total_info_len = statusline_len + cur_len;
|
||||
@@ -1743,7 +1737,7 @@ void create_windows(void)
|
||||
menu_win = mynewwin(max_y, max_x, 0, 0);
|
||||
werase(menu_win -> win);
|
||||
|
||||
- wprintw(menu_win -> win, version_str);
|
||||
+ wprintw(menu_win -> win, "%s", version_str);
|
||||
wprintw(menu_win -> win, "\n\n");
|
||||
|
||||
wprintw(menu_win -> win, "%s\n", F1);
|
||||
diff --git a/stripstring.c b/stripstring.c
|
||||
index 95bfd70..4e7acad 100644
|
||||
--- a/stripstring.c
|
||||
+++ b/stripstring.c
|
||||
@@ -154,7 +154,7 @@ int edit_strippers(void)
|
||||
memset(linebuf, ' ', sizeof(linebuf) - 1);
|
||||
linebuf[sizeof(linebuf) - 1] = 0x00;
|
||||
for(loop=4; loop<22; loop++)
|
||||
- mvwprintw(mywin -> win, loop, 1, linebuf);
|
||||
+ mvwprintw(mywin -> win, loop, 1, "%s", linebuf);
|
||||
|
||||
/* display them lines */
|
||||
for(loop=0; loop<cur -> n_strip; loop++)
|
||||
diff --git a/term.c b/term.c
|
||||
index a0f1fc0..646f9ea 100644
|
||||
--- a/term.c
|
||||
+++ b/term.c
|
||||
@@ -159,7 +159,7 @@ char * edit_string(NEWWIN *win, int win_y, int win_x, int win_width, int max_wid
|
||||
string[copy_len] = 0x00;
|
||||
|
||||
str_pos = dummy;
|
||||
- mvwprintw(win -> win, win_y, win_x, &string[dummy]);
|
||||
+ mvwprintw(win -> win, win_y, win_x, "%s", &string[dummy]);
|
||||
x = strlen(string) - dummy;
|
||||
}
|
||||
else
|
||||
@@ -608,7 +608,7 @@ void escape_print(NEWWIN *win, int y, int x, char *str)
|
||||
void win_header(NEWWIN *win, char *str)
|
||||
{
|
||||
wattron(win -> win, A_BOLD);
|
||||
- mvwprintw(win -> win, 1, 2, str);
|
||||
+ mvwprintw(win -> win, 1, 2, "%s", str);
|
||||
wattroff(win -> win, A_BOLD);
|
||||
}
|
||||
|
||||
diff --git a/ui.c b/ui.c
|
||||
index e987a51..f494946 100644
|
||||
--- a/ui.c
|
||||
+++ b/ui.c
|
||||
@@ -1085,7 +1085,7 @@ int toggle_colors(void)
|
||||
|
||||
dummy = mystrdup(cur -> filename);
|
||||
dummy[min(strlen(dummy), 40)] = 0x00;
|
||||
- mvwprintw(mywin -> win, 3, 1, dummy);
|
||||
+ mvwprintw(mywin -> win, 3, 1, "%s", dummy);
|
||||
|
||||
col = ask_colors(mywin, 4, cur -> cdef.colorize, &cur -> cdef.field_nr, &cur -> cdef.field_del, &cur -> cdef.color_schemes, &cur -> cdef.attributes, &cur -> cdef.term_emul);
|
||||
if (col != (char)-1)
|
||||
@@ -1164,7 +1164,7 @@ int edit_regexp(void)
|
||||
char dummy[18];
|
||||
strncpy(dummy, (cur -> pre)[loop].cmd, min(17, strlen((cur -> pre)[loop].cmd)));
|
||||
dummy[17]=0x00;
|
||||
- mvwprintw(mywin -> win, 4 + loop, 42, dummy);
|
||||
+ mvwprintw(mywin -> win, 4 + loop, 42, "%s", dummy);
|
||||
wmove(mywin -> win, 4 + loop, 41);
|
||||
}
|
||||
if (loop == cur_re)
|
|
@ -3,7 +3,7 @@
|
|||
# Slackware build script for MultiTail
|
||||
|
||||
# Copyright 2009-2015 Erik W. Hanson, Minneapolis, MN, USA
|
||||
# Copyright 2015-2016 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
|
||||
# Copyright 2015-2023 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -26,7 +26,7 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=multitail
|
||||
VERSION=${VERSION:-6.5.0}
|
||||
VERSION=${VERSION:-7.0.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
@ -39,9 +39,6 @@ if [ -z "$ARCH" ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
|
@ -65,7 +62,7 @@ rm -rf $PKG
|
|||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tgz
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
|
@ -74,6 +71,9 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
patch -p1 < $CWD/d7d10f3b.patch
|
||||
patch -p1 < $CWD/608bad75.patch
|
||||
|
||||
# Fix our destination
|
||||
sed -i "s|/usr/share|/usr|" Makefile
|
||||
sed -i "s|share/man/man1|man/man1|" Makefile
|
||||
|
@ -85,8 +85,18 @@ sed -i 's|ncursesw/ncurses.h|ncurses.h|' mt.h
|
|||
mkdir -p $PKG/usr/{bin,doc,man/man1} $PKG/etc $PKG/install
|
||||
|
||||
# Compile and Install
|
||||
CFLAGS="$SLKCFLAGS" make
|
||||
install -m 755 multitail $PKG/usr/bin/multitail
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DMAN_INSTALL_DIR=/usr/man \
|
||||
-DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
make install/strip DESTDIR=$PKG
|
||||
cd ..
|
||||
|
||||
install -m 644 multitail.1 $PKG/usr/man/man1/multitail.1
|
||||
install -m 655 multitail.conf $PKG/etc/multitail.conf.new
|
||||
|
||||
|
@ -95,6 +105,12 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
|
|||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
mv $PKG/usr/share/doc/*/* $PKG/usr/doc/$PRGNAM-$VERSION/
|
||||
rm -rf $PKG/usr/share/*
|
||||
rm -f $PKG/usr/etc/multitail.conf.new
|
||||
mv $PKG/usr/etc/multitail $PKG/usr/share/
|
||||
rm -rf $PKG/usr/etc
|
||||
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="multitail"
|
||||
VERSION="6.5.0"
|
||||
VERSION="7.0.0"
|
||||
HOMEPAGE="http://www.vanheusden.com/multitail/"
|
||||
DOWNLOAD="http://distcache.freebsd.org/ports-distfiles/multitail-6.5.0.tgz"
|
||||
MD5SUM="21e692309babbbb5669ef1b17288ee0a"
|
||||
DOWNLOAD="https://github.com/folkertvanheusden/multitail/archive/refs/tags/7.0.0/multitail-7.0.0.tar.gz"
|
||||
MD5SUM="90b67e3e41c5c51b65b946149eaa780e"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
Loading…
Reference in New Issue