File: README.md

package info (click to toggle)
syslog-ng 3.19.1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,176 kB
  • sloc: ansic: 114,472; makefile: 4,697; sh: 4,391; python: 4,282; java: 4,047; xml: 2,435; yacc: 1,108; lex: 426; perl: 193; awk: 184
file content (74 lines) | stat: -rw-r--r-- 2,695 bytes parent folder | download
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
## Syslog-ng development/release environtment powered by Docker
With the help of the following tool you can
- compile syslog-ng from source code
- generate tarball
- craete OS specific packages

in an isolated Docker container based environment.

## Usage information
```bash
~/syslog-ng$ dbld/rules [help]
```
dbld/rules is the general entrypoint for the tool, specifying multiple targets. For the complete list of the available targets please run the command (without parameters it will run without any sideeffect), or read the source code on [GitHub](rules).

Almost every `dbld/rules` command run in a Docker container. You can use the pre built containers from [DockerHub](https://hub.docker.com/u/balabit/) or build your own images with the `dbld/rules image-<os>` command.

The source code and build products are mounted externally in the following locations:
- **/source** -> syslog-ng/*
- **/build** -> syslog-ng/dbld/build
- **/install** -> syslog-ng/dbld/install

## Example
### Building syslog-ng from source using Ubuntu Xenial (default)
> Assume that we have cloned syslog-ng's source into the `$HOME/syslog-ng` directory.

The following commands starts a container mounted with the source:

```bash
$ dbld/rules shell-xenial
```

You can also build a DEB using:

```bash
$ dbld/rules deb-xenial
```

You can find the resulting debs in `$HOME/syslog-ng/dbld/build`.

You can also use this image to hack on syslog-ng by configuring and building manually. Steps for the manual build after entering into the containers shell:

```bash
$ cd /source/
$ ./autogen.sh
$ cd build/
$ ../configure --enable-debug --prefix=/install
$ make
$ make check
$ make install
```

If the compilation and installation was successful you can run syslog-ng with the following command:

```bash
$ /install/syslog-ng/sbin/syslog-ng -Fedv
```

## sudo
The `sudo` command is not available inside this development container.

>Short explanation:
>
>Many of the image maintainers (mostly for security reasons) do not install the sudo package by default. Additionally (to avoid access problems to your repository outside of this container), we
>- mount directories
>- run commands
>
>inside this container using your external Username and ID.

There are many options to circumvent this limitation (i.e. Create your own image, based on this one.), but probably the easiest way is to start a new privileged shell in the already running container, using `docker exec`.
```bash
$ docker exec -it <container-name or ID> /bin/bash
```

> note: We installed a fake `sudo` command inside the container, which will print out a copy-paste ready version of the `docker exec` command in case someone accidentally calls it.