util  Check-in [99704cfae0]

Overview
Comment:add wgsync base
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 99704cfae0a492846c04837dec52233f9418d65b105eff882151a32466352f91
User & Date: lexi on 2022-10-31 21:27:27
Other Links: manifest | tags
Context
2022-10-31
23:37
fix lack of alignment and small max file size for mkup; check in missing files check-in: 7bafdb9f90 user: lexi tags: trunk
21:27
add wgsync base check-in: 99704cfae0 user: lexi tags: trunk
2022-10-27
20:04
add soda check-in: 0d4aa1c43a user: lexi tags: trunk
Changes

Added wgsync/makefile version [b1a751a53e].

            1  +pq-inc != pkg-config --cflags libpq
            2  +pq-lib != pkg-config --libs libpq
            3  +
            4  +cc-flags = -std=c2x $(pq-inc)
            5  +ld-flags = $(pq-lib)
            6  +
            7  +B = build
            8  +
            9  +# link rule 
           10  +.PHONY: wgsync
           11  +$B/wgsync: $B/wgsync.o $B/wireguard.o | $B/
           12  +	$(CC) $(ld-flags) $^ -o $@
           13  +
           14  +# build rules 
           15  +$B/%.o: src/%.c | $B/
           16  +	$(CC) $(cc-flags) -c $< -o $@
           17  +
           18  +$B/wireguard.o: ext/wglib/wireguard.c ext/wglib/wireguard.h | $B/
           19  +	$(CC) -std=c11 -c $< -o $@
           20  +
           21  +# dep listings
           22  +$B/wgsync.o: ext/wglib/wireguard.h
           23  +
           24  +# fetch rules
           25  +%/:
           26  +	mkdir -p $@
           27  +
           28  +wg-lib-uri = https://git.zx2c4.com/wireguard-tools/plain/contrib/embeddable-wg-library
           29  +ext/wglib/%: | ext/wglib/
           30  +	curl $(wg-lib-uri)/$* >$@

Added wgsync/src/wgsync.c version [dbf75c60c6].

            1  +#include <libpq-fe.h>
            2  +
            3  +int main(int argc, char** argv) {
            4  +	return 0;
            5  +}

Added wgsync/wgsync.ct version [2440d0cfbb].

            1  +# wgsync
            2  +wgsync is a utility used to sync VPN keys and rules between the kernel and a postgres database. it can run either as a oneshot utility or a daemon that re-syncs the configuration every time a signal is sent.