]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/libloc-0.9.1-rename-location-query-to-location.patch
Add convert-to-location converter.
[ipfire-2.x.git] / src / patches / libloc-0.9.1-rename-location-query-to-location.patch
1 commit 1d237439676e8b9ee10a6dde2c64f5ba3a057210
2 Author: Michael Tremer <michael.tremer@ipfire.org>
3 Date: Wed Jun 3 17:21:31 2020 +0000
4
5 Rename location-query(8) to location(8)
6
7 Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
8
9 diff --git a/Makefile.am b/Makefile.am
10 index bf204d8..59870b1 100644
11 --- a/Makefile.am
12 +++ b/Makefile.am
13 @@ -238,19 +238,19 @@ uninstall-perl:
14 $(DESTDIR)/$(prefix)/man/man3/Location.3pm
15
16 bin_SCRIPTS = \
17 + src/python/location \
18 src/python/location-exporter \
19 - src/python/location-importer \
20 - src/python/location-query
21 + src/python/location-importer
22
23 EXTRA_DIST += \
24 + src/python/location.in \
25 src/python/location-exporter.in \
26 - src/python/location-importer.in \
27 - src/python/location-query.in
28 + src/python/location-importer.in
29
30 CLEANFILES += \
31 + src/python/location \
32 src/python/location-exporter \
33 - src/python/location-importer \
34 - src/python/location-query
35 + src/python/location-importer
36
37 # ------------------------------------------------------------------------------
38
39 @@ -374,7 +374,7 @@ src_test_signature_LDADD = \
40 # ------------------------------------------------------------------------------
41
42 MANPAGES = \
43 - man/location-query.8
44 + man/location.8
45
46 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
47 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
48 diff --git a/man/location-query.txt b/man/location.txt
49 similarity index 84%
50 rename from man/location-query.txt
51 rename to man/location.txt
52 index acb43cd..672c2b2 100644
53 --- a/man/location-query.txt
54 +++ b/man/location.txt
55 @@ -1,21 +1,21 @@
56 -= location-query(8)
57 += location(8)
58
59 == NAME
60 -location-query - Query the location database
61 +location - Query the location database
62
63 == SYNOPSIS
64 [verse]
65 -`location-query lookup ADDRESS [ADDRESS...]`
66 -`location-query get-as ASN [ASN...]`
67 -`location-query search-as STRING`
68 -`location-query update`
69 -`location-query verify`
70 -`location-query list-networks-by-as ASN`
71 -`location-query list-networks-by-cc COUNTRY_CODE`
72 -`location-query list-networks-by-flags [--anonymous-proxy|--satellite-provider|--anycast]`
73 +`location lookup ADDRESS [ADDRESS...]`
74 +`location get-as ASN [ASN...]`
75 +`location search-as STRING`
76 +`location update`
77 +`location verify`
78 +`location list-networks-by-as ASN`
79 +`location list-networks-by-cc COUNTRY_CODE`
80 +`location list-networks-by-flags [--anonymous-proxy|--satellite-provider|--anycast]`
81
82 == DESCRIPTION
83 -The `location-query` retrieves information from the location database.
84 +`location` retrieves information from the location database.
85 This data can be used to determine someone's location on the Internet
86 and for building firewall rulesets to block access from certain ASes
87 or countries.
88 @@ -93,7 +93,7 @@ or countries.
89 Shows the program's version and exists.
90
91 == EXIT CODES
92 -The 'location-query' command will normally exit with code zero.
93 +The 'location' command will normally exit with code zero.
94 If there has been a problem and the requested action could not be performed,
95 the exit code is unequal to zero.
96
97 diff --git a/src/python/location-query.in b/src/python/location.in
98 similarity index 99%
99 rename from src/python/location-query.in
100 rename to src/python/location.in
101 index 0291786..10618e2 100644
102 --- a/src/python/location-query.in
103 +++ b/src/python/location.in
104 @@ -248,7 +248,7 @@ class CLI(object):
105 try:
106 db = location.Database(args.database)
107 except FileNotFoundError as e:
108 - sys.stderr.write("location-query: Could not open database %s: %s\n" \
109 + sys.stderr.write("location: Could not open database %s: %s\n" \
110 % (args.database, e))
111 sys.exit(1)