Compare commits

...

17 commits

Author SHA1 Message Date
Lance Edgar 8bddce1329 bump: version 0.4.4 → 0.4.5 2025-02-01 15:19:59 -06:00
Lance Edgar 542875a44c fix: purge email settings for wuttjamaican also 2024-12-18 19:07:30 -06:00
Lance Edgar 8bd4236291 bump: version 0.4.3 → 0.4.4 2024-10-03 10:36:07 -05:00
Lance Edgar 00b0082302 fix: update project source links, kallithea -> forgejo 2024-09-14 11:51:19 -05:00
Lance Edgar 515ccc9f0c docs: use markdown for readme file 2024-09-13 18:40:32 -05:00
Lance Edgar e2ce4fd257 bump: version 0.4.2 → 0.4.3 2024-08-06 23:20:33 -05:00
Lance Edgar fcfe741b51 fix: setup basic log files for CORE Lane 2024-08-04 10:11:45 -05:00
Lance Edgar 59ab46a335 fix: avoid rich traceback for overnight luigi commands 2024-08-03 11:54:42 -05:00
Lance Edgar 8ab21914bd fix: avoid rich traceback for backup script 2024-07-25 10:08:41 -05:00
Lance Edgar 9eb44fa172 fix: avoid rich traceback for overnight luigi commands 2024-07-18 10:09:56 -05:00
Lance Edgar 65a9a7c9be fix: install more dependencies for borg 2024-07-18 10:09:47 -05:00
Lance Edgar 5ffcf0297c fix: install emacs-common-non-dfsg only if available
which it is not always, depending on apt sources
2024-07-12 12:00:39 -05:00
Lance Edgar 7d031e1a41 bump: version 0.4.1 → 0.4.2 2024-07-05 11:10:21 -05:00
Lance Edgar 04c586a11e fix: install non-dfsg package for emacs
for sake of tramp info manual

cf. https://www.reddit.com/r/emacs/comments/d6r3dt/comment/f0vujx6/
2024-07-03 14:18:29 -05:00
Lance Edgar d0425115da fix: remove references, dependency for six package 2024-07-01 16:35:08 -05:00
Lance Edgar 8b5bb956ae bump: version 0.4.0 → 0.4.1 2024-06-30 11:12:39 -05:00
Lance Edgar 5c5038144f fix: always install venv pkg when bootstrapping python 2024-06-15 21:17:42 -05:00
15 changed files with 86 additions and 28 deletions

View file

@ -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
View 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.

View file

@ -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/

View file

@ -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]

View file

@ -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')

View file

@ -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)

View file

@ -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',
)

View file

@ -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)

View file

@ -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',

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -50,6 +50,7 @@ def bootstrap_python(c, deploy=None,
apt.install(
c,
'python3-dev',
'python3-venv',
'libffi-dev',
'libjpeg-dev',
'libssl-dev',

View file

@ -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)

View file

@ -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: