Skip to content

Commit

Permalink
Merge pull request #22 from istana/small-updates
Browse files Browse the repository at this point in the history
Small updates
  • Loading branch information
istana authored Sep 15, 2024
2 parents 31939af + ced0e4e commit 958ce7e
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 25 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
steps:
- name: Checks out the repository
uses: actions/checkout@v2
- name: Starts docker-compose
run: DISTRO=archlinux docker-compose up -d
- name: Starts docker compose
run: DISTRO=archlinux docker compose up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
Expand All @@ -24,8 +24,8 @@ jobs:
steps:
- name: Checks out the repository
uses: actions/checkout@v2
- name: Starts docker-compose
run: DISTRO=debian docker-compose up -d
- name: Starts docker compose
run: DISTRO=debian docker compose up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
Expand All @@ -37,8 +37,8 @@ jobs:
steps:
- name: Checks out the repository
uses: actions/checkout@v2
- name: Starts docker-compose
run: DISTRO=fedora docker-compose up -d
- name: Starts docker compose
run: DISTRO=fedora docker compose up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
Expand All @@ -50,8 +50,8 @@ jobs:
steps:
- name: Checks out the repository
uses: actions/checkout@v2
- name: Starts docker-compose
run: DISTRO=ubuntu docker-compose up -d
- name: Starts docker compose
run: DISTRO=ubuntu docker compose up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
Expand All @@ -63,8 +63,8 @@ jobs:
steps:
- name: Checks out the repository
uses: actions/checkout@v2
- name: Starts docker-compose
run: DISTRO=ubuntu-lts docker-compose up -d
- name: Starts docker compose
run: DISTRO=ubuntu-lts docker compose up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
Expand All @@ -76,8 +76,8 @@ jobs:
steps:
- name: Checks out the repository
uses: actions/checkout@v2
- name: Starts docker-compose
run: DISTRO=unix_socket docker-compose -f docker/docker-compose-unix-socket.yml up -d
- name: Starts docker compose
run: DISTRO=unix_socket docker compose -f docker/docker-compose-unix-socket.yml up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
Expand All @@ -90,8 +90,8 @@ jobs:
steps:
- name: Checks out the repository
uses: actions/checkout@v2
- name: Starts docker-compose
run: DISTRO=unix_socket docker-compose -f docker/docker-compose-ssl-server.yml up -d
- name: Starts docker compose
run: DISTRO=unix_socket docker compose -f docker/docker-compose-ssl-server.yml up -d
- name: Sleep
uses: jakejarvis/wait-action@master
with:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can store user and group information in `MariaDB` or `MySQL` database. E.g.
- `libconfig` for configuration
- uses direct queries and `real_escape_string`
- uses `threads.c` from `C11`
- requirements: `Glibc 2.28`, `GCC 8`, equivalent of `Debian 10` (*Buster*) and newer, `MySQL 5.5+`/`MariaDB 10.0+`, `mariadb-connector-c`/`libmysqlclient`. Might work or compile on older systems, but it's untested
- requirements: `Glibc 2.28` or newer, `GCC 8` or newer, equivalent of `Debian 10` (*Buster*) or newer, `MySQL 5.5+`/`MariaDB 10.0+`, `mariadb-connector-c`/`libmysqlclient`. Might work or compile on older systems, but it's untested
- tested systems - latest `Archlinux`, `Debian`, `Fedora`, `Ubuntu` and `Ubuntu LTS`
- both *unix socket* and *hostname* + *port* are supported
- accepts custom mysql client configuration
Expand All @@ -24,13 +24,15 @@ You can store user and group information in `MariaDB` or `MySQL` database. E.g.
- add RHEL (does not have bats) or Rockylinux/AlmaLinux
- not sure if MySQL works correctly, the test fails on buff_test which means it does not increase buffer size for long result

Feedback is welcome.

## Installation & Usage

See `examples` and `scripts/compile_and_test.sh` to see how to set it up and use.

## Build && Test in Docker

`docker-compose up`
`docker compose up`
`./scripts/build-docker.sh`

The result is in `./Debug/src` directory.
Expand Down Expand Up @@ -73,7 +75,7 @@ Set `RELEASE` variable to any value to build a release build.

## License

Copyright (C) 2015-2023 Ivan Stana
Copyright (C) 2015-2024 Ivan Stana

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
#config.vm.box = "base"
config.vm.box = "generic/debian10"
config.vm.box = "generic/debian12"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
sys:
build:
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye
FROM debian:bookworm
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y build-essential cmake libmariadb-dev libconfig-dev syslog-ng-dev bats \
Expand Down
2 changes: 1 addition & 1 deletion docs/random_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ __m128i_shift_right (offset=15, value=<error reading variable: Cannot access mem
- spec says you never should set errno when it's successful
- nss_maria_initgroups_dyn / gidsbymem propagate limit param to db query

docker-compose exec sys sh -c "/bin/bash"
docker compose exec sys sh -c "/bin/bash"

### Why weird configuration format?

Expand Down
2 changes: 1 addition & 1 deletion scripts/build-docker-release.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker-compose exec sys sh -c "RELEASE=\"1\" CONFIG_FILE=\"libnss-maria-docker.conf\" VERBOSE=${VERBOSE} /home/libnss-maria/scripts/compile_and_test.sh"
docker compose exec sys sh -c "RELEASE=\"1\" CONFIG_FILE=\"libnss-maria-docker.conf\" VERBOSE=${VERBOSE} /home/libnss-maria/scripts/compile_and_test.sh"
2 changes: 1 addition & 1 deletion scripts/build-docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker-compose \
docker compose \
-f ${DOCKERCFILE:=docker-compose.yml} exec \
$( (( CI == 1 )) && printf %s '-T' ) sys sh -c "\
CLIENT_FILE=${CLIENT_FILE} \
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-ssl-config.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
docker-compose -f docker-compose-unix-socket.yml exec sys \
docker compose -f docker compose-unix-socket.yml exec sys \
sh -c "CLIENT_FILE=\"client.cnf\" CONFIG_FILE=\"libnss-maria.conf\" EXAMPLE_SET=\"ssl\" TEST_USE_SSL=\"1\" /home/libnss-maria/scripts/compile_and_test.sh"
2 changes: 1 addition & 1 deletion scripts/test-unix-socket.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
docker-compose -f docker-compose-unix-socket.yml exec sys \
docker compose -f docker compose-unix-socket.yml exec sys \
sh -c "CONFIG_FILE=\"libnss-maria.conf\" EXAMPLE_SET=\"unix_socket\" /home/libnss-maria/scripts/compile_and_test.sh"

0 comments on commit 958ce7e

Please sign in to comment.