Compare commits
17 commits
Author | SHA1 | Date | |
---|---|---|---|
|
8bddce1329 | ||
|
542875a44c | ||
![]() |
8bd4236291 | ||
![]() |
00b0082302 | ||
![]() |
515ccc9f0c | ||
![]() |
e2ce4fd257 | ||
![]() |
fcfe741b51 | ||
![]() |
59ab46a335 | ||
![]() |
8ab21914bd | ||
![]() |
9eb44fa172 | ||
![]() |
65a9a7c9be | ||
![]() |
5ffcf0297c | ||
![]() |
7d031e1a41 | ||
![]() |
04c586a11e | ||
![]() |
d0425115da | ||
![]() |
8b5bb956ae | ||
![]() |
5c5038144f |
36
CHANGELOG.md
36
CHANGELOG.md
|
@ -5,6 +5,42 @@ All notable changes to rattail-fabric2 will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.4.5 (2025-02-01)
|
||||
|
||||
### Fix
|
||||
|
||||
- purge email settings for wuttjamaican also
|
||||
|
||||
## v0.4.4 (2024-10-03)
|
||||
|
||||
### Fix
|
||||
|
||||
- update project source links, kallithea -> forgejo
|
||||
|
||||
## v0.4.3 (2024-08-06)
|
||||
|
||||
### Fix
|
||||
|
||||
- setup basic log files for CORE Lane
|
||||
- avoid rich traceback for overnight luigi commands
|
||||
- avoid rich traceback for backup script
|
||||
- avoid rich traceback for overnight luigi commands
|
||||
- install more dependencies for borg
|
||||
- install `emacs-common-non-dfsg` only if available
|
||||
|
||||
## v0.4.2 (2024-07-05)
|
||||
|
||||
### Fix
|
||||
|
||||
- install non-dfsg package for emacs
|
||||
- remove references, dependency for `six` package
|
||||
|
||||
## v0.4.1 (2024-06-30)
|
||||
|
||||
### Fix
|
||||
|
||||
- always install `venv` pkg when bootstrapping python
|
||||
|
||||
## v0.4.0 (2024-06-10)
|
||||
|
||||
### Feat
|
||||
|
|
11
README.md
Normal file
11
README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
# rattail-fabric2
|
||||
|
||||
Rattail is a retail software framework, released under the GNU General Public
|
||||
License.
|
||||
|
||||
This package contains various utility functions for use with
|
||||
[Fabric](http://www.fabfile.org/) (v2).
|
||||
|
||||
Please see Rattail's [home page](https://rattailproject.org/) for more
|
||||
information.
|
14
README.rst
14
README.rst
|
@ -1,14 +0,0 @@
|
|||
|
||||
rattail-fabric2
|
||||
===============
|
||||
|
||||
Rattail is a retail software framework, released under the GNU General Public
|
||||
License.
|
||||
|
||||
This package contains various utility functions for use with `Fabric`_ (v2).
|
||||
|
||||
.. _`Fabric`: http://www.fabfile.org/
|
||||
|
||||
Please see Rattail's `home page`_ for more information.
|
||||
|
||||
.. _`home page`: https://rattailproject.org/
|
|
@ -6,9 +6,9 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "rattail-fabric2"
|
||||
version = "0.4.0"
|
||||
version = "0.4.5"
|
||||
description = "Fabric (v2) Utilities for Rattail"
|
||||
readme = "README.rst"
|
||||
readme = "README.md"
|
||||
authors = [{name = "Lance Edgar", email = "lance@edbob.org"}]
|
||||
license = {text = "GNU GPL v3+"}
|
||||
classifiers = [
|
||||
|
@ -26,14 +26,13 @@ dependencies = [
|
|||
"fabric2",
|
||||
"invoke",
|
||||
"rattail",
|
||||
"six",
|
||||
]
|
||||
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://rattailproject.org"
|
||||
Repository = "https://kallithea.rattailproject.org/rattail-project/rattail-fabric2"
|
||||
Changelog = "https://kallithea.rattailproject.org/rattail-project/rattail-fabric2/files/master/CHANGELOG.md"
|
||||
Repository = "https://forgejo.wuttaproject.org/rattail/rattail-fabric2"
|
||||
Changelog = "https://forgejo.wuttaproject.org/rattail/rattail-fabric2/src/branch/master/CHANGELOG.md"
|
||||
|
||||
|
||||
[tool.commitizen]
|
||||
|
|
|
@ -112,4 +112,10 @@ def install_emacs(c):
|
|||
if ubuntu_version and ubuntu_version < 16:
|
||||
emacs = 'emacs23-nox'
|
||||
|
||||
install(c, emacs, 'emacs-goodies-el')
|
||||
install(c, emacs,
|
||||
'emacs-goodies-el',
|
||||
)
|
||||
|
||||
# nb. this includes tramp manual
|
||||
if c.sudo('dpkg -s emacs-common-non-dfsg', warn=True).ok:
|
||||
install(c, 'emacs-common-non-dfsg')
|
||||
|
|
|
@ -103,7 +103,7 @@ def deploy_backup_app(c, deploy, envname, mkvirtualenv=True, user='rattail',
|
|||
# rattail
|
||||
mkdir(c, os.path.join(envpath, 'src'), use_sudo=True, runas_user=user)
|
||||
if not exists(c, os.path.join(envpath, 'src/rattail')):
|
||||
c.sudo('git clone https://kallithea.rattailproject.org/rattail-project/rattail {}/src/rattail'.format(envpath), user=user)
|
||||
c.sudo(f'git clone https://forgejo.wuttaproject.org/rattail/rattail.git {envpath}/src/rattail', user=user)
|
||||
c.sudo("bash -c 'PIP_CONFIG_FILE={0}/pip.conf {0}/bin/pip install --editable {0}/src/rattail'".format(envpath),
|
||||
user=user)
|
||||
deploy_generic(c, 'backup/git-exclude', os.path.join(envpath, 'src/rattail/.git/info/exclude'), use_sudo=True, owner=user)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
# Copyright © 2010-2024 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -26,8 +26,6 @@ Fabric library for Borg backups
|
|||
https://www.borgbackup.org/
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
from rattail_fabric2 import apt
|
||||
|
||||
|
||||
|
@ -39,6 +37,9 @@ def install_dependencies(c):
|
|||
c,
|
||||
'libacl1-dev',
|
||||
'libfuse-dev',
|
||||
'liblz4-dev',
|
||||
'libssl-dev',
|
||||
'libxxhash-dev',
|
||||
'libzstd-dev',
|
||||
'pkg-config',
|
||||
)
|
||||
|
|
|
@ -33,7 +33,7 @@ def install_from_source(c, user='rattail'):
|
|||
"""
|
||||
if not exists(c, '/usr/local/src/byjove'):
|
||||
mkdir(c, '/usr/local/src/byjove', use_sudo=True, owner=user)
|
||||
c.sudo('git clone https://kallithea.rattailproject.org/rattail-project/byjove /usr/local/src/byjove',
|
||||
c.sudo('git clone https://forgejo.wuttaproject.org/rattail/byjove.git /usr/local/src/byjove',
|
||||
user=user)
|
||||
c.sudo("bash -l -c 'cd /usr/local/src/byjove; npm link'",
|
||||
user=user)
|
||||
|
|
|
@ -107,12 +107,18 @@ def install_corepos(c, rootdir, rooturl_office, production=True,
|
|||
'mysql_password': mysql_password,
|
||||
'mysql_name_prefix': mysql_name_prefix})
|
||||
|
||||
# fannie logging
|
||||
# office logging
|
||||
mkdir(c, f'{is4c}/fannie/logs', use_sudo=True,
|
||||
owner=f'{user}:www-data', mode='0775')
|
||||
c.sudo(f"bash -c 'cd {is4c}/fannie/logs && touch fannie.log debug_fannie.log'",
|
||||
user='www-data')
|
||||
|
||||
# lane logging
|
||||
mkdir(c, f'{is4c}/pos/is4c-nf/log', use_sudo=True,
|
||||
owner=f'{user}:www-data', mode='0775')
|
||||
c.sudo(f"bash -c 'cd {is4c}/pos/is4c-nf/log && touch lane.log debug_lane.log'",
|
||||
user='www-data')
|
||||
|
||||
|
||||
# TODO: deprecate / remove this
|
||||
def install_fannie(c, rootdir, user='www-data', branch='version-2.10',
|
||||
|
|
|
@ -11,6 +11,8 @@ else
|
|||
fi
|
||||
|
||||
RATTAIL="/srv/envs/${envname}/bin/rattail --config=$CONFIG $PROGRESS $VERBOSE"
|
||||
# nb. avoid rich-formatted traceback here since it's so "noisy"
|
||||
export _TYPER_STANDARD_TRACEBACK=1
|
||||
|
||||
|
||||
# sanity check
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
cd ${envroot}
|
||||
|
||||
export RATTAIL_CONFIG_FILES=${overnight_conf}
|
||||
# nb. avoid rich-formatted traceback here since it's so "noisy"
|
||||
export _TYPER_STANDARD_TRACEBACK=1
|
||||
|
||||
bin/rattail --no-versioning overnight -k ${automation.lower()} <%text>\</%text>
|
||||
% if email_key is not Undefined and email_key:
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
cd ${envroot}
|
||||
|
||||
export RATTAIL_CONFIG_FILES=${overnight_conf}
|
||||
# nb. avoid rich-formatted traceback here since it's so "noisy"
|
||||
export _TYPER_STANDARD_TRACEBACK=1
|
||||
|
||||
bin/rattail --no-versioning overnight -k ${automation.lower()} <%text>\</%text>
|
||||
% if email_key is not Undefined and email_key:
|
||||
|
|
|
@ -50,6 +50,7 @@ def bootstrap_python(c, deploy=None,
|
|||
apt.install(
|
||||
c,
|
||||
'python3-dev',
|
||||
'python3-venv',
|
||||
'libffi-dev',
|
||||
'libjpeg-dev',
|
||||
'libssl-dev',
|
||||
|
|
|
@ -108,6 +108,14 @@ def delete_email_recipients(c, dbname):
|
|||
"""
|
||||
Purge all email recipient settings for the given database.
|
||||
"""
|
||||
# purge new-style for wuttjamaican
|
||||
postgresql.sql(c, "delete from setting where name like 'rattail.email.%.sender';", database=dbname)
|
||||
postgresql.sql(c, "delete from setting where name like 'rattail.email.%.to';", database=dbname)
|
||||
postgresql.sql(c, "delete from setting where name like 'rattail.email.%.cc';", database=dbname)
|
||||
postgresql.sql(c, "delete from setting where name like 'rattail.email.%.bcc';", database=dbname)
|
||||
|
||||
# purge old-style for rattail
|
||||
postgresql.sql(c, "delete from setting where name like 'rattail.mail.%.from';", database=dbname)
|
||||
postgresql.sql(c, "delete from setting where name like 'rattail.mail.%.to';", database=dbname)
|
||||
postgresql.sql(c, "delete from setting where name like 'rattail.mail.%.cc';", database=dbname)
|
||||
postgresql.sql(c, "delete from setting where name like 'rattail.mail.%.bcc';", database=dbname)
|
||||
|
|
|
@ -111,8 +111,6 @@ def append(c, filename, text, use_sudo=False, partial=False, escape=True,
|
|||
"""
|
||||
func = use_sudo and c.sudo or c.run
|
||||
# Normalize non-list input to be a list
|
||||
# TODO: do we need to check for six.something here?
|
||||
# if isinstance(text, basestring):
|
||||
if isinstance(text, str):
|
||||
text = [text]
|
||||
for line in text:
|
||||
|
|
Loading…
Reference in a new issue