Compare commits
9 Commits
5c2a5d0710
...
v0.1.19
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b292d218b | |||
| 25b9b02df2 | |||
| 2c39bf1158 | |||
| 36d936f5de | |||
| 277a540d94 | |||
| b9accfedd2 | |||
| 8a8da6a7be | |||
| 644ced9ca6 | |||
| e9cf428dd2 |
@@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build_n_upload:
|
||||
runs-on: linux
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
lint_n_build:
|
||||
runs-on: linux
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
|
||||
5
Makefile
5
Makefile
@@ -2,13 +2,14 @@ NAME = netoik-db
|
||||
VERSION = $(shell git describe --abbrev=0)
|
||||
RELEASE = $(shell git rev-parse --short HEAD)
|
||||
ARCH = noarch
|
||||
OWNER = samuel
|
||||
OWNER = netoik
|
||||
SUMMARY = "Netoïk Database Management System"
|
||||
LICENSE = "MIT"
|
||||
URL = "https://git.netoik.io/$(OWNER)/$(NAME)"
|
||||
SOURCE0 = "$(NAME)-$(VERSION)-$(RELEASE).tar.gz"
|
||||
|
||||
RPM_RPMDIR = $(shell rpm --eval '%{_rpmdir}')
|
||||
RPM_RUNDIR = $(shell rpm --eval '%{_rundir}')
|
||||
RPM_SBINDIR = $(shell rpm --eval '%{_sbindir}')
|
||||
RPM_SOURCEDIR = $(shell rpm --eval '%{_sourcedir}')
|
||||
RPM_SYSCONFDIR = $(shell rpm --eval '%{_sysconfdir}')
|
||||
@@ -73,7 +74,7 @@ install: ## Install files into rpm dest (requires env var DESTDIR)
|
||||
printf "[CRITICAL] Missing env var DESTDIR\n[CRITICAL] This command is designed to be called by rpmbuild only!\n" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
install --mode=755 --directory $(DESTDIR)$(RPM_SYSCONFDIR)/postgres $(DESTDIR)$(RPM_UNITDIR)/postgresql.service.d
|
||||
install --mode=755 --directory $(DESTDIR)$(RPM_RUNDIR)/postgresql $(DESTDIR)$(RPM_SYSCONFDIR)/postgres $(DESTDIR)$(RPM_UNITDIR)/postgresql.service.d
|
||||
install --mode=644 --target-directory=$(DESTDIR)$(RPM_SYSCONFDIR)/postgres files/postgres/postgresql.conf files/postgres/pg_hba.conf
|
||||
install --mode=644 --target-directory=$(DESTDIR)$(RPM_UNITDIR)/postgresql.service.d files/systemd/postgres.conf
|
||||
|
||||
|
||||
@@ -63,15 +63,12 @@ Some commands to deploy the RPM package on server
|
||||
|
||||
- Show available versions:
|
||||
```shell
|
||||
dnf --showduplicates netoik-db
|
||||
dnf search --showduplicates netoik-db
|
||||
```
|
||||
|
||||
- Install or upgrade package:
|
||||
```shell
|
||||
set -a
|
||||
source ~/.netoik-db.env
|
||||
dnf --nogpgcheck --refresh --assumeyes --best install netoik-db
|
||||
set +a
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,11 @@ Install the database management system called postgresql with a predefined confi
|
||||
|
||||
%post
|
||||
# Create sock directory if not existing
|
||||
mkdir --parents --mode 755 "%{_rundir}/postgresql"
|
||||
chown postgres:postgres "%{_rundir}/postgresql"
|
||||
|
||||
# Init cluster if necessary
|
||||
runuser --user=postgres -- [ -f $PGDATA/PG_VERSION ] || postgresql-setup --initdb
|
||||
|
||||
# Restart services
|
||||
systemctl daemon-reload
|
||||
systemctl reenable postgresql.service
|
||||
@@ -39,5 +41,7 @@ systemctl restart postgresql.service
|
||||
%dir %attr(755, root, root) %{_unitdir}/postgresql.service.d
|
||||
%attr(644, root, root) %{_unitdir}/postgresql.service.d/postgres.conf
|
||||
|
||||
%dir %attr(755, -, -) %{_rundir}/postgresql
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
||||
Reference in New Issue
Block a user