mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[api] refactoring: configuration directory for the root user is now located at '/etc/bauh'
This commit is contained in:
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- General
|
||||
- directory paths changed for a root user using bauh:
|
||||
- caching: `/var/cache/bauh`
|
||||
- configuration: `/etc/bauh`
|
||||
- temp dir: `/tmp/bauh@root` (`/tmp/bauh@$USER` for non root users)
|
||||
|
||||
- UI
|
||||
|
||||
@@ -410,6 +410,7 @@ boot:
|
||||
```
|
||||
|
||||
#### <a name="dirs">Directory structure, caching and logs</a>
|
||||
- `~/.config/bauh` (or `/etc/bauh` for **root**): stores configuration files
|
||||
- `~/.cache/bauh` (or `/var/cache/bauh` for **root**): stores data about your installed applications, databases, indexes, etc. Files are stored here to provide a faster initialization and data recovery.
|
||||
- `/tmp/bauh@$USER` (e.g: `/tmp/bauh@root`): stores logging and temporary files (e.g: build dependencies)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from bauh import __app_name__
|
||||
from bauh.api import user
|
||||
|
||||
CACHE_PATH = f'/var/cache/{__app_name__}' if user.is_root() else f'{Path.home()}/.cache/{__app_name__}'
|
||||
CONFIG_PATH = '{}/.config/bauh'.format(str(Path.home()))
|
||||
CONFIG_PATH = f'/etc/{__app_name__}' if user.is_root() else f'{Path.home()}/.config/{__app_name__}'
|
||||
USER_THEMES_PATH = '{}/.local/share/bauh/themes'.format(str(Path.home()))
|
||||
DESKTOP_ENTRIES_DIR = '{}/.local/share/applications'.format(str(Path.home()))
|
||||
TEMP_DIR = f'/tmp/{__app_name__}@{getuser()}'
|
||||
|
||||
@@ -9,8 +9,8 @@ ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
LOCAL_PATH = '{}/.local/share/bauh/appimage'.format(str(Path.home()))
|
||||
INSTALLATION_PATH = LOCAL_PATH + '/installed/'
|
||||
SUGGESTIONS_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/appimage/suggestions.txt'
|
||||
CONFIG_FILE = '{}/appimage.yml'.format(CONFIG_PATH)
|
||||
CONFIG_DIR = '{}/appimage'.format(CONFIG_PATH)
|
||||
CONFIG_FILE = f'{CONFIG_PATH}/appimage.yml'
|
||||
CONFIG_DIR = f'{CONFIG_PATH}/appimage'
|
||||
UPDATES_IGNORED_FILE = '{}/updates_ignored.txt'.format(CONFIG_DIR)
|
||||
SYMLINKS_DIR = '{}/.local/bin'.format(str(Path.home()))
|
||||
URL_COMPRESSED_DATABASES = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/appimage/dbs.tar.gz'
|
||||
|
||||
@@ -14,7 +14,7 @@ CONFIG_DIR = '{}/.config/bauh/arch'.format(str(Path.home()))
|
||||
CUSTOM_MAKEPKG_FILE = '{}/makepkg.conf'.format(CONFIG_DIR)
|
||||
AUR_INDEX_FILE = f'{ARCH_CACHE_PATH}/aur/index.txt'
|
||||
AUR_INDEX_TS_FILE = f'{ARCH_CACHE_PATH}/aur/index.ts'
|
||||
CONFIG_FILE = '{}/arch.yml'.format(CONFIG_PATH)
|
||||
CONFIG_FILE = f'{CONFIG_PATH}/arch.yml'
|
||||
SUGGESTIONS_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/arch/aur_suggestions.txt'
|
||||
UPDATES_IGNORED_FILE = '{}/updates_ignored.txt'.format(CONFIG_DIR)
|
||||
EDITABLE_PKGBUILDS_FILE = '{}/aur/editable_pkgbuilds.txt'.format(CONFIG_DIR)
|
||||
|
||||
@@ -8,9 +8,9 @@ from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
SUGGESTIONS_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/flatpak/suggestions.txt'
|
||||
CONFIG_FILE = '{}/flatpak.yml'.format(CONFIG_PATH)
|
||||
CONFIG_DIR = '{}/flatpak'.format(CONFIG_PATH)
|
||||
UPDATES_IGNORED_FILE = '{}/updates_ignored.txt'.format(CONFIG_DIR)
|
||||
CONFIG_FILE = f'{CONFIG_PATH}/flatpak.yml'
|
||||
CONFIG_DIR = f'{CONFIG_PATH}/flatpak'
|
||||
UPDATES_IGNORED_FILE = f'{CONFIG_DIR}/updates_ignored.txt'
|
||||
EXPORTS_PATH = '{}/.local/share/flatpak/exports/share'.format(str(Path.home()))
|
||||
VERSION_1_2 = parse_version('1.2')
|
||||
VERSION_1_3 = parse_version('1.3')
|
||||
|
||||
@@ -5,7 +5,7 @@ from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
SNAP_CACHE_PATH = f'{CACHE_PATH}/snap'
|
||||
CONFIG_FILE = '{}/snap.yml'.format(CONFIG_PATH)
|
||||
CONFIG_FILE = f'{CONFIG_PATH}/snap.yml'
|
||||
CATEGORIES_FILE_PATH = f'{SNAP_CACHE_PATH}/categories.txt'
|
||||
URL_CATEGORIES_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/snap/categories.txt'
|
||||
SUGGESTIONS_FILE = 'https://raw.githubusercontent.com/vinifmor/bauh-files/master/snap/suggestions.txt'
|
||||
|
||||
@@ -31,7 +31,7 @@ TEMP_PATH = f'{TEMP_DIR}/web'
|
||||
SEARCH_INDEX_FILE = f'{WEB_CACHE_PATH}/index.yml'
|
||||
SUGGESTIONS_CACHE_FILE = f'{WEB_CACHE_PATH}/suggestions.yml'
|
||||
SUGGESTIONS_CACHE_TS_FILE = map_timestamp_file(SUGGESTIONS_CACHE_FILE)
|
||||
CONFIG_FILE = '{}/web.yml'.format(CONFIG_PATH)
|
||||
CONFIG_FILE = f'{CONFIG_PATH}/web.yml'
|
||||
ENVIRONMENT_SETTINGS_CACHED_FILE = f'{WEB_CACHE_PATH}/environment.yml'
|
||||
ENVIRONMENT_SETTINGS_TS_FILE = f'{WEB_CACHE_PATH}/environment.ts'
|
||||
NATIVEFIER_BASE_URL = 'https://github.com/nativefier/nativefier/archive/v{version}.tar.gz'
|
||||
|
||||
Reference in New Issue
Block a user