Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement gtk4 changes #4

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 0 additions & 233 deletions ARCHITECTURE.md

This file was deleted.

75 changes: 52 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,103 @@
# software-properties-station

The software-properties-station app is a simple graphical and command-line application to manage and select package repositories for GhostBSD. It provides a user-friendly interface for switching between different repository mirrors, making it easy to update and configure the system's package sources.
The `software-properties-station` app is a simple graphical and command-line application to manage and select package repositories for GhostBSD. It provides a user-friendly interface for switching between different repository mirrors, making it easy to update and configure the system's package sources.

## Features

- **Graphical Interface**: Easy-to-use GTK-based GUI for selecting package repositories.
- **Command-line Interface**: Allows repository management directly from the CLI.
- **Custom Repositories**: Easily add and remove custom repositories through the interface.
- **Validation**: Ensures the configuration file is valid after updating the repository.
- **Logging**: Logs actions and errors for troubleshooting.

## Requirements

- Python 3.11
- GTK 3.0
- Python 3.11+
- GTK 4.0+
- GhostBSD
- `PyGObject` (GTK bindings for Python)

## Installation

1. Clone the repository:
```
```bash
git clone https://github.com/ghostbsd/software-properties-station.git
cd software-properties-station
```

2. Ensure you have the required dependencies installed:
```
sudo pkg install gtk3
2. Install the required dependencies:
```bash
sudo pkg install gtk4 pygobject3-common
```

3. Make the scripts executable:
```
chmod +x software-properties-station repo_manager.py config.py ui.py
3. Install the application using `pip`:
```bash
sudo pip install .
```

## Usage

### Graphical Interface

1. Run the application:
```
sudo ./software-properties-station
1. To launch the graphical interface, run:
```bash
sudo software-properties-station --gui
```

2. Select the desired repository from the list.
2. Select the desired repository from the list of GhostBSD repositories or add a custom repository.
3. Confirm the selection when prompted.
4. The application will update the repository URLs and validate the new configuration.

### Command-line Interface

1. List available repositories:
```
sudo ./software-properties-station --list
```bash
sudo software-properties-station --list
```

2. Show the current repository:
```
sudo ./software-properties-station --current
```bash
sudo software-properties-station --current
```

3. Select a repository:
```bash
sudo software-properties-station <repo_name>
```
sudo ./software-properties-station <repo_name>
```
Replace `<repo_name>` with the name of the repository you want to select, such as `GhostBSD_FR`.
Replace `<repo_name>` with the name of the repository you want to select, such as `GhostBSD_France`.

### Custom Repositories

1. Add a custom repository by selecting the **Custom Repositories** tab in the GUI.
2. Fill in the repository name, URL, base URL, and optionally the public key.
3. Save the repository, and it will appear in the list of available repositories.

## Configuration

The configuration file is located at `/etc/pkg/GhostBSD.conf`.
The main configuration file is located at `/etc/pkg/GhostBSD.conf`. Custom repositories are stored in the `/etc/pkg/` directory, each with its own `.conf` file.

### Example Configuration:

```ini
GhostBSD: {
url: "https://pkg.ghostbsd.org/unstable/${ABI}/latest",
signature_type: "pubkey",
pubkey: "/usr/share/keys/ssl/certs/ghostbsd.cert",
enabled: yes
}
GhostBSD-base: {
url: "https://pkg.ghostbsd.org/unstable/${ABI}/base",
signature_type: "pubkey",
pubkey: "/usr/share/keys/ssl/certs/ghostbsd.cert",
enabled: yes
}
```

## Logging

Logs are written to `~/software-properties-station.log`. Check this file for any errors or information about the application's operations.
Logs are written to `/var/log/software-properties-station/software-properties-station.log`. Check this file for any errors or information about the application's operations.

## License
vimanuelt marked this conversation as resolved.
Show resolved Hide resolved

This project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.

4 changes: 2 additions & 2 deletions config.py → config/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3.11
#!/usr/bin/env python
# Filename: config.py

def load_repos():
repos = {
Expand All @@ -7,4 +8,3 @@ def load_repos():
"GhostBSD_France": ("https://pkg.fr.ghostbsd.org/unstable/${ABI}/latest", "https://pkg.fr.ghostbsd.org/unstable/${ABI}/base"),
}
return repos

Loading