Request 2272 (accepted)
No description set
Submit package home:nephros:bra...hos:chum:testing / xtail to package sailfishos:chum:testing / xtail
[-] [+] | Deleted | xtail.spec |
@@ -1,96 +0,0 @@ -# -# Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.32 -# - -Name: xtail - -# >> macros -# << macros - -Summary: a multi-file tail -Version: 2.1 -Release: 0 -Group: Applications/System -License: BSD -URL: https://unicom.crosenthal.com/sw/xtail -Source0: %{name}-%{version}.tar.gz -Source100: xtail.yaml -Patch0: 0001-Use-ISO8601-Fix-Gcc-header-Use-C-c.patch -Patch1: 0001-xtail.1-remove-SIGQUIT.patch -Patch2: xtail_2.1-5-debian-local-changes.patch -BuildRequires: autoconf -BuildRequires: automake - -%description -xtail watches the growth of files. - -It's like running a "tail -f"on a bunch of files at once. - -You can specify both filenames and directories on the command line. - -If you specify a directory, it watches all the files in that directory. It -will notice when new files are created (and start watching them) or when old -files are deleted (and stop watching them). - -%if "%{?vendor}" == "chum" -Type: console-application -PackagerName: nephros -Categories: - - Utility -%endif - - -%package docs -Summary: Documentation files for %{name} -Group: Documentation -BuildArch: noarch -AutoReq: 0 -Requires: %{name} = %{version}-%{release} - -%description docs -%{summary}. - -%prep -%setup -q -n %{name}-%{version} - -# 0001-Use-ISO8601-Fix-Gcc-header-Use-C-c.patch -%patch0 -p1 -# 0001-xtail.1-remove-SIGQUIT.patch -%patch1 -p1 -# xtail_2.1-5-debian-local-changes.patch -%patch2 -p1 -# >> setup -# << setup - -%build -# >> build pre -# << build pre - -%configure --disable-static - -# >> build post -%{__make} -# << build post - -%install -rm -rf %{buildroot} -# >> install pre -# << install pre - -# >> install post -%{__install} -D -m 755 xtail $RPM_BUILD_ROOT%{_bindir}/xtail -%{__install} -D -m 644 xtail.1 $RPM_BUILD_ROOT%{_mandir}/xtail.1 -# << install post - -%files -%defattr(-,root,root,-) -%{_bindir}/%{name} -# >> files -# << files - -%files docs -%defattr(-,root,root,-) -%{_mandir}/* -# >> files docs -# << files docs | ||
[-] [+] | Deleted | 0001-Use-ISO8601-Fix-Gcc-header-Use-C-c.patch ^ |
@@ -1,101 +0,0 @@ -From 6d3b7c3e82186aec732d15cbbef5902a9c74586e Mon Sep 17 00:00:00 2001 -From: Jari Aalto <jari.aalto@cante.net> -Date: Fri, 10 Feb 2012 13:41:39 +0200 -Subject: [PATCH] Use ISO8601, Fix Gcc header, Use -C-c -Organization: Private -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jari Aalto <jari.aalto@cante.net> ---- - miscfuncs.c | 14 ++++++++++---- - xtail.c | 17 +++++++++++------ - 2 files changed, 21 insertions(+), 10 deletions(-) - -diff --git a/miscfuncs.c b/miscfuncs.c -index ae2e500..050dffe 100644 ---- a/miscfuncs.c -+++ b/miscfuncs.c -@@ -215,26 +215,32 @@ void show_status(void) - { - int i, n; - struct tm *tp; -+/* - static char *monname[] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; -+*/ - static time_t tval0; - time_t tval; - - /* give user a hint if they are whacking on SIGINT */ - time(&tval); -- if (tval0 != 0 && difftime(tval, tval0) < 3) -+/* if (tval0 != 0 && difftime(tval, tval0) < 3) - (void) printf("(note: use \"%s\" SIQUIT to exit program)\n", quit_ch()); - tval0 = tval; -- -+*/ - (void) printf("\n*** recently changed files ***\n"); - for (i = 0, n = 0 ; i < List_file->num_entries ; ++i) { - if (List_file->list[i]->fd > 0) { - tp = localtime(&List_file->list[i]->mtime); -- (void) printf("%4d %2d-%3s-%02d %02d:%02d:%02d %s\n", -+ (void) printf("%4d %d-%02d-%02d %02d:%02d:%02d %s\n", - ++n, -- tp->tm_mday, monname[tp->tm_mon], (tp->tm_year % 100), -+ tp->tm_year + 1900, -+ tp->tm_mon + 1, -+ tp->tm_mday, -+/* monname[tp->tm_mon], */ -+/* (tp->tm_year % 100), */ - tp->tm_hour, tp->tm_min, tp->tm_sec, - List_file->list[i]->name - ); -diff --git a/xtail.c b/xtail.c -index ebe2ff5..a1663bb 100644 ---- a/xtail.c -+++ b/xtail.c -@@ -1,5 +1,5 @@ - /* $Id: xtail.c,v 2.5 2000/06/04 09:09:03 chip Exp $ */ -- -+#include <string.h> - #include "config.h" - #include <sys/types.h> - #include <sys/stat.h> -@@ -138,12 +138,10 @@ int main(int argc, char *argv[]) - - /* - * Display what we are watching if a SIGINT was caught. -- */ - if (sigcaught) { -- show_status(); - sigcatcher(0); - } -- -+ */ - - /* - * Go through all of the files looking for changes. -@@ -357,8 +355,15 @@ int main(int argc, char *argv[]) - - RETSIGTYPE sigcatcher(int sig) - { -- if (sig == SIGQUIT) -- (void) exit(0); -+ if (sig == SIGINT) -+ { -+ show_status(); -+ printf("Exit (y/N)? "); -+ int ch = getchar(); -+ -+ if ( (ch == (int)'y') || (ch == (int)'Y') ) -+ (void) exit(0); -+ } - sigcaught = sig; - #ifdef STATUS_ENAB - (void) signal(SIGINT, sigcatcher); --- -1.7.5.1 - | ||
[-] [+] | Deleted | 0001-xtail.1-remove-SIGQUIT.patch ^ |
@@ -1,32 +0,0 @@ -From 1adcb84005899f172195b23a4f603708d84836c4 Mon Sep 17 00:00:00 2001 -From: Jari Aalto <jari.aalto@cante.net> -Date: Fri, 10 Feb 2012 13:48:55 +0200 -Subject: [PATCH] xtail.1: remove SIGQUIT -Organization: Private -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit - - -Signed-off-by: Jari Aalto <jari.aalto@cante.net> ---- - xtail.1 | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/xtail.1 b/xtail.1 -index cff150e..969c4a9 100644 ---- a/xtail.1 -+++ b/xtail.1 -@@ -24,8 +24,8 @@ will watch for it and monitor it once created. When switching files in - the display, a banner showing the pathname of the file is printed. - .P - An interrupt character (usually CTRL/C or DEL) will display a list of the --most recently modified files being watched. Send a quit signal --(usually CTRL/backslash) to stop -+most recently modified files being watched. -+ - .IR xtail . - .SH SEE ALSO - tail(1) --- -1.7.5.1 - | ||
[-] [+] | Deleted | xtail_2.1-5-debian-local-changes.patch ^ |
@@ -1,156 +0,0 @@ ---- xtail-2.1.orig/entryfuncs.c -+++ xtail-2.1/entryfuncs.c -@@ -75,6 +75,8 @@ - entryp->fd = 0; - entryp->size = 0; - entryp->mtime = 0; -+ entryp->dev = 0; -+ entryp->ino = 0; - - return E_append(listp,entryp); - } -@@ -118,6 +120,8 @@ - if (Reset_status) { - entryp->size = 0; - entryp->mtime = 0; -+ entryp->dev = 0; -+ entryp->ino = 0; - } - } - ---- xtail-2.1.orig/miscfuncs.c -+++ xtail-2.1/miscfuncs.c -@@ -107,6 +107,8 @@ - } else { - entryp->mtime = sbuf.st_mtime; - entryp->size = sbuf.st_size; -+ entryp->dev = sbuf.st_dev; -+ entryp->ino = sbuf.st_ino; - } - - } ---- xtail-2.1.orig/xtail.1 -+++ xtail-2.1/xtail.1 -@@ -1,5 +1,5 @@ - .\" $Id: xtail.1,v 2.2 1996/06/25 00:31:15 chip Exp $ --.TH XTAIL 1L -+.TH XTAIL 1 - .SH NAME - xtail - Watch the growth of files. - .SH SYNTAX -@@ -31,9 +31,7 @@ - tail(1) - .SH NOTES - .I Xtail --may be easily confused. For example, if a file is renamed, --.I xtail --may or may not continue to monitor it. If you ask it to monitor a file -+may be easily confused. For example, if you ask it to monitor a file - multiple times, it probably will. If you misspell a filename, - .I xtail - will treat it as a nonexistent entry and happily wait for its creation. ---- xtail-2.1.orig/xtail.c -+++ xtail-2.1/xtail.c -@@ -22,7 +22,7 @@ - { - int open_files_only, already_open, iteration, i; - struct entry_descrip *entryp; -- struct stat sbuf; -+ struct stat sbuf, path_sbuf; - - /* - * Initialize. -@@ -61,6 +61,8 @@ - move_entry(List_file, List_zap, last_entry(List_zap)); - entryp->size = sbuf.st_size; - entryp->mtime = sbuf.st_mtime; -+ entryp->dev = sbuf.st_dev; -+ entryp->ino = sbuf.st_ino; - break; - - case ENTRY_DIR: /* move entry to dir list */ -@@ -195,6 +197,20 @@ - } - - /* -+ * See if an open file has been renamed. Occasionally do -+ * an extra stat on the file's name, and compare that to the -+ * info which fstat() returned. -+ */ -+ if (already_open && !open_files_only -+ && (stat(entryp->name, &path_sbuf) != 0 -+ || path_sbuf.st_dev != entryp->dev -+ || path_sbuf.st_ino != entryp->ino)) { -+ message(MSSG_RENAMED, entryp); -+ move_entry(List_zap, List_file, i--); -+ continue; -+ } -+ -+ /* - * If nothing has changed then continue on. - */ - if (entryp->size==sbuf.st_size && entryp->mtime==sbuf.st_mtime) -@@ -247,9 +263,11 @@ - } - - /* -- * Update the modification time. -+ * Update the other saved info about this entry. - */ - entryp->mtime = sbuf.st_mtime; -+ entryp->dev = sbuf.st_dev; -+ entryp->ino = sbuf.st_ino; - - /* - * Since we've changed the mtime, the list might no longer be ---- xtail-2.1.orig/xtail.h -+++ xtail-2.1/xtail.h -@@ -36,11 +36,6 @@ - */ - #define MAX_OPEN 8 - --/* -- * MAX_ENTRIES - This is *BOGUS* I should get rid of this. -- */ --#define MAX_ENTRIES 512 -- - - - /***************************************************************************** -@@ -75,12 +70,13 @@ - #define MSSG_CREATED 2 /* file has been created */ - #define MSSG_ZAPPED 3 /* file has been deleted */ - #define MSSG_TRUNC 4 /* file has been truncated */ --#define MSSG_NOTAFIL 5 /* error - not a regular file or dir */ --#define MSSG_STAT 6 /* error - stat() failed */ --#define MSSG_OPEN 7 /* error - open() failed */ --#define MSSG_SEEK 8 /* error - lseek() failed */ --#define MSSG_READ 9 /* error - read() failed */ --#define MSSG_UNKNOWN 10 /* unknown error - must be last in list */ -+#define MSSG_RENAMED 5 /* file has been renamed */ -+#define MSSG_NOTAFIL 6 /* error - not a regular file or dir */ -+#define MSSG_STAT 7 /* error - stat() failed */ -+#define MSSG_OPEN 8 /* error - open() failed */ -+#define MSSG_SEEK 9 /* error - lseek() failed */ -+#define MSSG_READ 10 /* error - read() failed */ -+#define MSSG_UNKNOWN 11 /* unknown error - must be last in list */ - - - #ifdef INTERN -@@ -113,6 +109,8 @@ - int fd; /* opened fd, or <= 0 if not opened */ - long size; /* size of entry last time checked */ - long mtime; /* modification time last time checked */ -+ dev_t dev; /* device number last time, if file is opened */ -+ ino_t ino; /* inode number last time, if file is opened */ - }; - - struct entry_list { -@@ -171,6 +169,7 @@ - "\n*** '%s' has been created ***\n", /*MSSG_CREATED*/ - "\n*** '%s' has been deleted ***\n", /*MSSG_ZAPPED */ - "\n*** '%s' has been truncated - rewinding ***\n", /*MSSG_TRUNC */ -+ "\n*** '%s' has been renamed - closing ***\n", /*MSSG_RENAMED */ - "\n*** error - '%s' not a file or dir - removed ***\n", /*MSSG_NOTAFIL*/ - "\n*** error - couldn't stat '%s' (%s) - removed ***\n",/*MSSG_STAT */ - "\n*** error - couldn't open '%s' (%s) - removed ***\n",/*MSSG_OPEN */ | ||
[-] [+] | Added | _service ^ |
@@ -0,0 +1,10 @@ +<services> + <service name="tar_git"> + <param name="url">https://github.com/sailfishos-chum/xtail</param> + <param name="branch"></param> + <param name="revision">2.1+git1</param> + <param name="token"/> + <param name="debian">N</param> + <param name="dumb">Y</param> +</service> +</services> | ||
Deleted | xtail-2.1.tar.gz ^ | |
[-] [+] | Deleted | xtail.yaml ^ |
@@ -1,46 +0,0 @@ -Name: xtail -Summary: a multi-file tail -Version: 2.1 -Release: 0 -Group: Applications/System -License: BSD -Sources: - - '%{name}-%{version}.tar.gz' -URL: https://unicom.crosenthal.com/sw/xtail -Description: | - xtail watches the growth of files. - - It's like running a "tail -f"on a bunch of files at once. - - You can specify both filenames and directories on the command line. - - If you specify a directory, it watches all the files in that directory. It - will notice when new files are created (and start watching them) or when old - files are deleted (and stop watching them). - - %if "%{?vendor}" == "chum" - Type: console-application - PackagerName: nephros - Categories: - - Utility - %endif - -Patches: - - 0001-Use-ISO8601-Fix-Gcc-header-Use-C-c.patch - - 0001-xtail.1-remove-SIGQUIT.patch - - xtail_2.1-5-debian-local-changes.patch -SetupOptions: '-q -n %{name}-%{version}' -Builder: none -PkgBR: - - autoconf - - automake -Files: - - '%{_bindir}/%{name}' -SubPackages: - - Name: docs - BuildArch: noarch - NoAutoReq: true - Summary: Documentation files for %{name} - Group: Documentation - Files: - - '%{_mandir}/*' |