Update to latest upstream commit
This commit is contained in:
parent
58395d286b
commit
5634de1b69
|
@ -1,17 +1 @@
|
||||||
/0.21.0-ac1e7e4.tar.gz
|
the_silver_searcher-*.tar.gz
|
||||||
/0.22.0-cfcaede.tar.gz
|
|
||||||
/0.24.1-4b270d1.tar.gz
|
|
||||||
/0.25.0-7e212a4.tar.gz
|
|
||||||
/0.26.0-bbb112a.tar.gz
|
|
||||||
/0.27.0-45b670b.tar.gz
|
|
||||||
/0.29.1-803700e.tar.gz
|
|
||||||
/0.30.0-c81622c.tar.gz
|
|
||||||
/0.31.0-d7193e1.tar.gz
|
|
||||||
/0.31.0-3675402.tar.gz
|
|
||||||
/0.32.0-31e1f8c.tar.gz
|
|
||||||
/0.32.0-cda6350.tar.gz
|
|
||||||
/0.33.0-944e011.tar.gz
|
|
||||||
/2.0.0-99cf183.tar.gz
|
|
||||||
/2.1.0-1a5e259.tar.gz
|
|
||||||
/2.2.0-965f71d.tar.gz
|
|
||||||
/2.2.0-b93c271.tar.gz
|
|
||||||
|
|
181
1377.diff
181
1377.diff
|
@ -1,181 +0,0 @@
|
||||||
diff --git a/src/ignore.c b/src/ignore.c
|
|
||||||
index 7ae83f3e..88036eff 100644
|
|
||||||
--- a/src/ignore.c
|
|
||||||
+++ b/src/ignore.c
|
|
||||||
@@ -20,6 +20,8 @@
|
|
||||||
const int fnmatch_flags = FNM_PATHNAME;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+ignores *root_ignores;
|
|
||||||
+
|
|
||||||
/* TODO: build a huge-ass list of files we want to ignore by default (build cache stuff, pyc files, etc) */
|
|
||||||
|
|
||||||
const char *evil_hardcoded_ignore_files[] = {
|
|
||||||
diff --git a/src/ignore.h b/src/ignore.h
|
|
||||||
index 20d5a6af..8db0f377 100644
|
|
||||||
--- a/src/ignore.h
|
|
||||||
+++ b/src/ignore.h
|
|
||||||
@@ -29,7 +29,7 @@ struct ignores {
|
|
||||||
};
|
|
||||||
typedef struct ignores ignores;
|
|
||||||
|
|
||||||
-ignores *root_ignores;
|
|
||||||
+extern ignores *root_ignores;
|
|
||||||
|
|
||||||
extern const char *evil_hardcoded_ignore_files[];
|
|
||||||
extern const char *ignore_pattern_files[];
|
|
||||||
diff --git a/src/log.c b/src/log.c
|
|
||||||
index 1481b6d0..f6f4e9a8 100644
|
|
||||||
--- a/src/log.c
|
|
||||||
+++ b/src/log.c
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
#include "log.h"
|
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
+pthread_mutex_t print_mtx = PTHREAD_MUTEX_INITIALIZER;
|
|
||||||
static enum log_level log_threshold = LOG_LEVEL_ERR;
|
|
||||||
|
|
||||||
void set_log_level(enum log_level threshold) {
|
|
||||||
diff --git a/src/log.h b/src/log.h
|
|
||||||
index 85847ee7..318622c3 100644
|
|
||||||
--- a/src/log.h
|
|
||||||
+++ b/src/log.h
|
|
||||||
@@ -9,7 +9,7 @@
|
|
||||||
#include <pthread.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-pthread_mutex_t print_mtx;
|
|
||||||
+extern pthread_mutex_t print_mtx;
|
|
||||||
|
|
||||||
enum log_level {
|
|
||||||
LOG_LEVEL_DEBUG = 10,
|
|
||||||
diff --git a/src/options.c b/src/options.c
|
|
||||||
index 4abf4dcd..69953013 100644
|
|
||||||
--- a/src/options.c
|
|
||||||
+++ b/src/options.c
|
|
||||||
@@ -20,6 +20,8 @@ const char *color_line_number = "\033[1;33m"; /* bold yellow */
|
|
||||||
const char *color_match = "\033[30;43m"; /* black with yellow background */
|
|
||||||
const char *color_path = "\033[1;32m"; /* bold green */
|
|
||||||
|
|
||||||
+cli_options opts;
|
|
||||||
+
|
|
||||||
/* TODO: try to obey out_fd? */
|
|
||||||
void usage(void) {
|
|
||||||
printf("\n");
|
|
||||||
diff --git a/src/options.h b/src/options.h
|
|
||||||
index aae93093..0d852167 100644
|
|
||||||
--- a/src/options.h
|
|
||||||
+++ b/src/options.h
|
|
||||||
@@ -92,7 +92,7 @@ typedef struct {
|
|
||||||
} cli_options;
|
|
||||||
|
|
||||||
/* global options. parse_options gives it sane values, everything else reads from it */
|
|
||||||
-cli_options opts;
|
|
||||||
+extern cli_options opts;
|
|
||||||
|
|
||||||
typedef struct option option_t;
|
|
||||||
|
|
||||||
diff --git a/src/search.c b/src/search.c
|
|
||||||
index 0f4ae211..0dad3c07 100644
|
|
||||||
--- a/src/search.c
|
|
||||||
+++ b/src/search.c
|
|
||||||
@@ -2,6 +2,19 @@
|
|
||||||
#include "print.h"
|
|
||||||
#include "scandir.h"
|
|
||||||
|
|
||||||
+size_t alpha_skip_lookup[256];
|
|
||||||
+size_t *find_skip_lookup;
|
|
||||||
+uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
|
|
||||||
+
|
|
||||||
+work_queue_t *work_queue = NULL;
|
|
||||||
+work_queue_t *work_queue_tail = NULL;
|
|
||||||
+int done_adding_files = 0;
|
|
||||||
+pthread_cond_t files_ready = PTHREAD_COND_INITIALIZER;
|
|
||||||
+pthread_mutex_t stats_mtx = PTHREAD_MUTEX_INITIALIZER;
|
|
||||||
+pthread_mutex_t work_queue_mtx = PTHREAD_MUTEX_INITIALIZER;
|
|
||||||
+
|
|
||||||
+symdir_t *symhash = NULL;
|
|
||||||
+
|
|
||||||
/* Returns: -1 if skipped, otherwise # of matches */
|
|
||||||
ssize_t search_buf(const char *buf, const size_t buf_len,
|
|
||||||
const char *dir_full_path) {
|
|
||||||
diff --git a/src/search.h b/src/search.h
|
|
||||||
index 6bac4203..00aa018d 100644
|
|
||||||
--- a/src/search.h
|
|
||||||
+++ b/src/search.h
|
|
||||||
@@ -31,9 +31,9 @@
|
|
||||||
#include "uthash.h"
|
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
-size_t alpha_skip_lookup[256];
|
|
||||||
-size_t *find_skip_lookup;
|
|
||||||
-uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
|
|
||||||
+extern size_t alpha_skip_lookup[256];
|
|
||||||
+extern size_t *find_skip_lookup;
|
|
||||||
+extern uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
|
|
||||||
|
|
||||||
struct work_queue_t {
|
|
||||||
char *path;
|
|
||||||
@@ -41,12 +41,12 @@ struct work_queue_t {
|
|
||||||
};
|
|
||||||
typedef struct work_queue_t work_queue_t;
|
|
||||||
|
|
||||||
-work_queue_t *work_queue;
|
|
||||||
-work_queue_t *work_queue_tail;
|
|
||||||
-int done_adding_files;
|
|
||||||
-pthread_cond_t files_ready;
|
|
||||||
-pthread_mutex_t stats_mtx;
|
|
||||||
-pthread_mutex_t work_queue_mtx;
|
|
||||||
+extern work_queue_t *work_queue;
|
|
||||||
+extern work_queue_t *work_queue_tail;
|
|
||||||
+extern int done_adding_files;
|
|
||||||
+extern pthread_cond_t files_ready;
|
|
||||||
+extern pthread_mutex_t stats_mtx;
|
|
||||||
+extern pthread_mutex_t work_queue_mtx;
|
|
||||||
|
|
||||||
|
|
||||||
/* For symlink loop detection */
|
|
||||||
@@ -64,7 +64,7 @@ typedef struct {
|
|
||||||
UT_hash_handle hh;
|
|
||||||
} symdir_t;
|
|
||||||
|
|
||||||
-symdir_t *symhash;
|
|
||||||
+extern symdir_t *symhash;
|
|
||||||
|
|
||||||
ssize_t search_buf(const char *buf, const size_t buf_len,
|
|
||||||
const char *dir_full_path);
|
|
||||||
diff --git a/src/util.c b/src/util.c
|
|
||||||
index 3949477b..90ffb6f1 100644
|
|
||||||
--- a/src/util.c
|
|
||||||
+++ b/src/util.c
|
|
||||||
@@ -21,6 +21,8 @@
|
|
||||||
} \
|
|
||||||
return ptr;
|
|
||||||
|
|
||||||
+FILE *out_fd = NULL;
|
|
||||||
+ag_stats stats;
|
|
||||||
void *ag_malloc(size_t size) {
|
|
||||||
void *ptr = malloc(size);
|
|
||||||
CHECK_AND_RETURN(ptr)
|
|
||||||
diff --git a/src/util.h b/src/util.h
|
|
||||||
index 0c9b9b11..338b05f4 100644
|
|
||||||
--- a/src/util.h
|
|
||||||
+++ b/src/util.h
|
|
||||||
@@ -12,7 +12,7 @@
|
|
||||||
#include "log.h"
|
|
||||||
#include "options.h"
|
|
||||||
|
|
||||||
-FILE *out_fd;
|
|
||||||
+extern FILE *out_fd;
|
|
||||||
|
|
||||||
#ifndef TRUE
|
|
||||||
#define TRUE 1
|
|
||||||
@@ -51,7 +51,7 @@ typedef struct {
|
|
||||||
} ag_stats;
|
|
||||||
|
|
||||||
|
|
||||||
-ag_stats stats;
|
|
||||||
+extern ag_stats stats;
|
|
||||||
|
|
||||||
/* Union to translate between chars and words without violating strict aliasing */
|
|
||||||
typedef union {
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
||||||
SHA512 (2.2.0-b93c271.tar.gz) = 1ac1b74827521fff9cb793e32255577d301923fcb808d6c1886009f05407c77715c6218f90c9ba4c697da17a493df03370897fd51f251701fb4b231829c8eace
|
SHA512 (the_silver_searcher-5a1c8d83ba1514ca8d045ba80403f93772fb371a.tar.gz) = a23eff00e3bbd824b883a5f0f1d292fefb873bea97cd57cc8d0ad843f7311903e0973d8a9aacbb6c131ddd1dee1780739f3d82aeb150c4d6d213894bb766e838
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
%global commit b93c2719933d8824d749bfa8573cc02e4f050c10
|
%global forgeurl https://github.com/ggreer/the_silver_searcher
|
||||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
%global commit 5a1c8d83ba1514ca8d045ba80403f93772fb371a
|
||||||
|
%global date 2020704
|
||||||
|
%forgemeta
|
||||||
|
|
||||||
%global bashcompdir %(pkg-config --variable=completionsdir bash-completion)
|
%global bashcompdir %(pkg-config --variable=completionsdir bash-completion)
|
||||||
%if "%{bashcompdir}" == ""
|
%if "%{bashcompdir}" == ""
|
||||||
%define bashcompdir "/etc/bash_completion.d"
|
%define bashcompdir "/etc/bash_completion.d"
|
||||||
|
@ -7,13 +10,11 @@
|
||||||
|
|
||||||
Name: the_silver_searcher
|
Name: the_silver_searcher
|
||||||
Version: 2.2.0
|
Version: 2.2.0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Super-fast text searching tool (ag)
|
Summary: Super-fast text searching tool (ag)
|
||||||
License: ASL 2.0 and BSD
|
License: ASL 2.0 and BSD
|
||||||
URL: https://github.com/ggreer/the_silver_searcher
|
URL: %{forgeurl}
|
||||||
Source: https://github.com/ggreer/the_silver_searcher/archive/%{commit}/%{version}-%{shortcommit}.tar.gz
|
Source0: %{forgesource}
|
||||||
# My (= shlomif) pull request to fix the build
|
|
||||||
Patch1: https://patch-diff.githubusercontent.com/raw/ggreer/the_silver_searcher/pull/1377.diff
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
|
@ -29,9 +30,10 @@ BuildRequires: zlib-devel
|
||||||
The Silver Searcher is a code searching tool similar to ack,
|
The Silver Searcher is a code searching tool similar to ack,
|
||||||
with a focus on speed.
|
with a focus on speed.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{commit}
|
%forgeautosetup -p 1
|
||||||
%patch1 -p1 -b .GLOBALS
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
aclocal
|
aclocal
|
||||||
|
@ -39,28 +41,30 @@ autoconf
|
||||||
autoheader
|
autoheader
|
||||||
automake --add-missing
|
automake --add-missing
|
||||||
%configure --disable-silent-rules
|
%configure --disable-silent-rules
|
||||||
make %{?_smp_mflags}
|
%make_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
%make_install
|
||||||
mkdir -p $RPM_BUILD_ROOT%{bashcompdir}
|
mkdir -p $RPM_BUILD_ROOT%{bashcompdir}
|
||||||
install -pm 0644 ag.bashcomp.sh $RPM_BUILD_ROOT%{bashcompdir}/ag
|
install -pm 0644 ag.bashcomp.sh $RPM_BUILD_ROOT%{bashcompdir}/ag
|
||||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.md
|
||||||
%{_bindir}/ag
|
%{_bindir}/ag
|
||||||
%{_mandir}/man1/ag.1*
|
%{_mandir}/man1/ag.1*
|
||||||
%(dirname %{bashcompdir})
|
%(dirname %{bashcompdir})
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
|
||||||
%doc README.md
|
|
||||||
%license LICENSE
|
|
||||||
%else
|
|
||||||
%doc README.md LICENSE
|
|
||||||
%endif
|
|
||||||
# zsh completion
|
# zsh completion
|
||||||
%{_datadir}/zsh/site-functions/_%{name}
|
%{_datadir}/zsh/site-functions/_%{name}
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 29 2020 Carl George <carl@george.computer> - 2.2.0-3.2020704git5a1c8d8
|
||||||
|
- Update to latest upstream commit
|
||||||
|
|
||||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue