Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
e62a668f3e
|
|||
bd8934d57f
|
|||
96fe3c7813
|
|||
9fdb959540
|
|||
eb889beee7
|
|||
2a37eb4172
|
40
PKGBUILD
Normal file
40
PKGBUILD
Normal file
@ -0,0 +1,40 @@
|
||||
# PKGBUILD
|
||||
|
||||
# Maintainer: Daniele Fucini <dfucini [at] gmail [dot] com>
|
||||
|
||||
pkgname=simple_backup
|
||||
pkgdesc='Simple backup script that uses rsync to copy files'
|
||||
pkgver=4.1.5
|
||||
pkgrel=1
|
||||
url="https://github.com/Fuxino/${pkgname}"
|
||||
arch=('any')
|
||||
license=('GPL-3.0-or-later')
|
||||
makedepends=('git'
|
||||
'python-setuptools'
|
||||
'python-build'
|
||||
'python-installer'
|
||||
'python-wheel')
|
||||
depends=('python>=3.10'
|
||||
'rsync'
|
||||
'python-dotenv')
|
||||
optdepends=('python-systemd: use systemd log'
|
||||
'python-dbus: for desktop notifications'
|
||||
'python-paramiko: for remote backup through ssh')
|
||||
conflicts=('simple_backup-git')
|
||||
source=(git+${url}?signed#tag=${pkgver})
|
||||
validpgpkeys=('7E12BC1FF3B6EDB2CD8053EB981A2B2A3BBF5514')
|
||||
sha256sums=('4da838282fff813f82ee0408996c989078a206eabce07112b4e3ee8b057e34cf')
|
||||
|
||||
build()
|
||||
{
|
||||
cd ${srcdir}/${pkgname}
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package()
|
||||
{
|
||||
cd ${srcdir}/${pkgname}
|
||||
python -m installer --destdir=${pkgdir} dist/*.whl
|
||||
install -Dm644 ${pkgname}/${pkgname}.conf ${pkgdir}/usr/share/doc/${pkgname}/${pkgname}.conf
|
||||
install -Dm644 man/${pkgname}.1 ${pkgdir}/usr/share/man/man1/${pkgname}.1
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
.TH SIMPLE_BACKUP 1 2023-06-15 SIMPLE_BACKUP 3.2.6
|
||||
.TH SIMPLE_BACKUP 1 2025-03-30 SIMPLE_BACKUP 4.1.6
|
||||
.SH NAME
|
||||
simple_backup \- Backup files and folders using rsync
|
||||
.SH SYNOPSIS
|
||||
@ -187,6 +187,6 @@ Bad configuration file.
|
||||
.SH SEE ALSO
|
||||
.BR rsync (1)
|
||||
.SH AUTHORS
|
||||
.MT https://github.com/Fuxino
|
||||
.MT https://git.shouldnt.work/fuxino
|
||||
Daniele Fucini
|
||||
.ME
|
||||
|
@ -6,7 +6,7 @@ long_description = file: README.md
|
||||
author = Daniele Fucini
|
||||
author_email = dfucini@gmail.com
|
||||
license = GPL3
|
||||
url = https://github.com/Fuxino/simple_backup
|
||||
url = https://git.shouldnt.work/fuxino
|
||||
classifiers =
|
||||
Development Status :: 4 - Beta
|
||||
Environment :: Console
|
||||
@ -16,6 +16,7 @@ classifiers =
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
Programming Language :: Python :: 3.13
|
||||
Topic :: System :: Archiving :: Backup
|
||||
|
||||
[options]
|
||||
|
@ -1,3 +1,3 @@
|
||||
"""Init."""
|
||||
|
||||
__version__ = '4.1.5'
|
||||
__version__ = '4.1.6'
|
||||
|
@ -679,7 +679,10 @@ def _read_config(config_file, user=None):
|
||||
'numeric_ids': False}
|
||||
|
||||
if not os.path.isfile(config_file):
|
||||
if user is not None:
|
||||
logger.warning('Config file %s does not exist', config_file)
|
||||
else:
|
||||
logger.warning('User not specified. Can\'t read configuration file')
|
||||
|
||||
return config_args
|
||||
|
||||
@ -793,7 +796,12 @@ def simple_backup():
|
||||
|
||||
if euid == 0:
|
||||
user = os.getenv('SUDO_USER')
|
||||
|
||||
if user is not None:
|
||||
homedir = os.path.expanduser(f'~{user}')
|
||||
else:
|
||||
logger.warning('Failed to detect user. You can use -u/--user parameter to manually specify it')
|
||||
homedir = None
|
||||
else:
|
||||
user = os.getenv('USER')
|
||||
homedir = os.getenv('HOME')
|
||||
|
Reference in New Issue
Block a user