~m-grant-prg/dnsmasq-logrotate/stretch

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
----------------------------
DNSMASQ Log Rotation Project
============================
--------
Contents
========

1 ... Project Description

2 ... AutoTools (configure and make) Installation

3 ... Ubuntu, Debian and Raspbian Installation

4 ... Utility Scripts



-------------------------
1 ... Project Description
=========================

This AutoTools project utilises the logrotate facillity to provide log rotation
for dnsmasq.

It places a logrotate control file in sysconfdir/logrotate.d and a post-rotate
script file in sbindir.

N.B.
----
At a source modification / development level, this project expects to reside in
a git environment. This manifests itself in 2 places:-
1) ... .gitignore files are included in the source.
2) ... The make target, 'srctarball', relies on the command 'git am' so it will
	fail if git is not installed or it is not in a git repository.


-------------------------------------------------
2 ... AutoTools (configure and make) Installation
=================================================

a) ... Download either the source or distribution tarball (the .tar.gz file)
	from:-

https://github.com/m-grant-prg/dnsmasq-logrotate/releases

b) ... Extract the tarball preserving the directory structure.

c) ... cd to the directory created.

d) ... If you downloaded the source tarball type 'autoreconf -if'

e) ... Type './configure'

f) ... As root or sudo, type 'make install clean'

g) ... Edit the first line of sysconfdir/logrotate.d/dnsmasq to reflect the
location of your dnsmasq log file, ('log-facility=' line in
sysconfdir/dnsmasq.conf).

(Quote marks are for textual clarity only).

To uninstall the package:

1 ... cd to the directory created in the above install process.

2 ... As root or sudo, type 'make uninstall clean'


----------------------------------------------
3 ... Ubuntu, Debian and Raspbian Installation
==============================================
Please refer to the relevant installation section on the wiki at:-

https://github.com/m-grant-prg/dnsmasq-logrotate/wiki


---------------------
4 ... Utility Scripts
=====================
In the project root directory there is 1 helper script; bootstrap.sh.

bootstrap.sh
------------
This misleadingly named script bootstraps the project build and provides other
useful features. The main options below are probably b, c, C, D and T.

In AutoTools it is usually advisable to perform parallel builds. This means you
build somewhere other than the project root. This is because building creates
files and they would confuse the project root downwards. I always create a build
directory straight off the project root, cd to there and do all build and git
work from there, (.gitignore is already set to ignore such a directory).

Assuming you adopt the preceding paragraph then a typical invocation of the
script would be:-
../bootstrap.sh --build ..
The last '..' points the way to project root.

The full list of arguments to bootstrap.sh are:-
	-b, --build make the project.

	-c, --config configure the project.

	-C, --distcheck perform a normal make distcheck.

	-d, --debug build with appropriate debug flags.

	-D, --dist perform a make dist.

	-F, --distcheckfake run a make distcheck using a fake AT standard
	directory as a substitute for an absolute path which distcheck does not
	support.

	-g, --gnulib run gnulib-tool --update. Checks for the existence of the
	cache file proj-root/m4/gnulib-cache.m4. If it does not exist the update
	is not run.

	-h, --help prints usage information.

	-s, --sparse pass --enable-sparse=yes to configure.

	-T, --source-tarball perform a make srctarball to build a source
	tarball.

	-V, --version prints version information

Options b build, C distcheck, D dist, F distcheckfake and T source-tarball are
mutually exclusive.

Options d debug, F distcheckfake and s sparse are enabled by configure so
require option c config.