An open API service indexing awesome lists of open source software.

https://github.com/dasunwickr/auto-upgrade-svc

A simple, extensible system service for automatically updating and upgrading Linux packages at boot.
https://github.com/dasunwickr/auto-upgrade-svc

fedora linux updater updates

Last synced: 2 months ago
JSON representation

A simple, extensible system service for automatically updating and upgrading Linux packages at boot.

Awesome Lists containing this project

README

          


auto-upgrade-svc logo


# AUTO-UPGRADE-SVC

> *A simple, extensible system service for automatically updating and upgrading Linux packages at boot.*



GPLv3 license

Last commit
Top language
Language count

---

## Quick Links

- [Overview](#-overview)
- [Features](#-features)
- [Project Structure](#-project-structure)
- [Project Index](#-project-index)
- [Getting Started](#-getting-started)
- [Prerequisites](#-prerequisites)
- [Installation](#-installation)
- [Usage](#-usage)
- [Testing](#-testing)
- [Project Roadmap](#-project-roadmap)
- [Contributing](#-contributing)
- [License](#-license)
- [Acknowledgments](#-acknowledgments)

---

## ๐Ÿ“ฆ Overview

`auto-upgrade-svc` is a lightweight Go-based system service designed to automatically update and upgrade packages on supported Linux distributions during system boot.
Currently, Fedora is supported with plans to expand to other distros.

The project is designed with scalability and modularity in mind to support multiple Linux package managers and system init systems.

---

## โœจ Features

- Automatically detects Linux distribution and runs the appropriate package update commands.
- Supports Fedora out of the box.
- Generates and manages a systemd service unit to run updates at boot.
- Modular internal architecture to add support for other distros and init systems easily.
- Runs with sudo privileges only when needed, keeping security in mind.

---

## ๐Ÿ—‚๏ธ Project Structure

```sh
โ””โ”€โ”€ auto-upgrade-svc/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ cmd
โ”‚ โ””โ”€โ”€ auto-upgrade
โ”‚ โ””โ”€โ”€ main.go
โ”œโ”€โ”€ go.mod
โ””โ”€โ”€ internal
โ”œโ”€โ”€ distro
โ”œโ”€โ”€ systemd
โ””โ”€โ”€ updater
````

### ๐Ÿ”Ž Project Index

AUTO-UPGRADE-SVC/

Root


go.mod
Defines module path and dependencies




cmd/auto-upgrade


main.go
Program entrypoint, initializes updater and systemd manager




internal/updater


updater.go
Updater interface and Fedora implementation




internal/systemd


manager.go
Systemd service manager to create and enable units




internal/distro


distro.go
Detects Linux distro and returns appropriate updater


fedora.go
Fedora-specific distro detection and updater


---

## ๐Ÿš€ Getting Started

### ๐Ÿงฐ Prerequisites

* **Go** (1.20 or newer) installed.
* Linux system (Fedora recommended for now).

---

### ๐Ÿ“ฅ Installation

Clone and build the project:

```sh
git clone https://github.com/dasunwickr/auto-upgrade-svc.git
cd auto-upgrade-svc
go build ./cmd/auto-upgrade
```

This produces a binary named `auto-upgrade`.

---

### โš™๏ธ Usage

Run the binary directly:

```sh
sudo ./auto-upgrade
```

Or run with Go:

```sh
go run ./cmd/auto-upgrade
```

The service will:

* Update metadata and upgrade packages.
* Create and enable a systemd unit on first run.

---

### ๐Ÿงช Testing

Run all tests:

```sh
go test ./...
```

---

## ๐Ÿ›ฃ๏ธ Project Roadmap

* [x] Fedora support with DNF
* [ ] Ubuntu/Debian support (APT)
* [ ] Arch Linux support (Pacman)
* [ ] Support for other init systems (SysV, OpenRC)
* [ ] Auto rollback on failure
* [ ] Logging and metrics integration

---

## ๐Ÿค Contributing

Contributions are welcome! Please:

1. Fork the repo
2. Create a new branch
3. Make and test your changes
4. Submit a pull request

Refer to [CONTRIBUTING.md](https://github.com/dasunwickr/auto-upgrade-svc/blob/main/CONTRIBUTING.md) for more info.

---

## ๐Ÿชช License

This project is licensed under the **GNU General Public License v3 (GPLv3)**.

๐Ÿ“„ [View full license](https://www.gnu.org/licenses/gpl-3.0.en.html)

---

## ๐Ÿ™ Acknowledgments

* Inspired by the Linux ecosystem and best practices in package automation.
* Thanks to the open source community for tools and ideas.