Create staging dist branch

This commit is contained in:
wpetit 2021-09-02 14:41:04 +02:00
parent 174ebb74c7
commit d8ea894716
10 changed files with 67 additions and 1 deletions

View File

@ -7,7 +7,7 @@
BACKUP_USER=postgres
# Optional hostname to adhere to pg_hba policies. Will default to "localhost" if none specified.
HOSTNAME=/var/run/postgresql
HOSTNAME=
# Optional username to connect to database as. Will default to "postgres" if none specified.
USERNAME=

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

14
debian/control vendored Normal file
View File

@ -0,0 +1,14 @@
Source: postgres-backup
Section: unknown
Priority: optional
Maintainer: Cadoles <contact@cadoles.com>
Build-Depends: debhelper (>= 8.0.0), dh-systemd (>= 1.5)
Standards-Version: 3.9.4
Homepage: http://forge.cadoles.com/Cadoles/postgres-backup
Vcs-Git: http://forge.cadoles.com/Cadoles/postgres-backup.git
Vcs-Browser: http://forge.cadoles.com/Cadoles/postgres-backup
Package: postgres-backup
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: PostgreSQL backup scripts

1
debian/postgres-backup.dirs vendored Normal file
View File

@ -0,0 +1 @@
/var/backups/database/postgresql

2
debian/postgres-backup.links vendored Normal file
View File

@ -0,0 +1,2 @@
/usr/share/postgres-backup/pg_backup.sh /usr/bin/pg_backup.sh
/usr/share/postgres-backup/pg_backup_rotated.sh /usr/bin/pg_backup_rotated.sh

4
debian/postgres-backup.postinst vendored Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
mkdir -p /var/backups/database/postgresql
chown -R postgres:postgres /var/backups/database/postgresql

10
debian/postgres-backup.service vendored Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=Run PostgreSQL backup
[Service]
Type=oneshot
ExecStart=/usr/bin/pg_backup_rotated.sh -c /etc/postgres-backup/pg_backup.conf
User=postgres
[Install]
WantedBy=default.target

9
debian/postgres-backup.timer vendored Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Timer for periodic execution of postgres-backup service.
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target

24
debian/rules vendored Normal file
View File

@ -0,0 +1,24 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
%:
dh $@ --with systemd
override_dh_auto_install:
mkdir -p debian/postgres-backup/usr/share/postgres-backup
mkdir -p debian/postgres-backup/etc/postgres-backup
mkdir -p debian/postgres-backup/usr/bin
cp script/pg_backup.sh debian/postgres-backup/usr/share/postgres-backup/pg_backup.sh
cp script/pg_backup_rotated.sh debian/postgres-backup/usr/share/postgres-backup/pg_backup_rotated.sh
cp conf/pg_backup.conf debian/postgres-backup/etc/postgres-backup/pg_backup.conf
chmod +x debian/postgres-backup/usr/share/postgres-backup/pg_backup_rotated.sh
chmod +x debian/postgres-backup/usr/share/postgres-backup/pg_backup.sh
install -D -m 644 debian/postgres-backup.timer debian/postgres-backup/lib/systemd/system/postgres-backup.timer
install -d debian/postgres-backup

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)