SimpleRepo is a simple Python application that creates a Debian repository using Flask. It scans a specified directory for Debian package files (.deb), displays them in a web interface, and provides instructions on how to add the repository to /etc/apt/sources.list
.
- Scans a directory for .deb files and displays them in a web interface.
- Generates a repository index file (
Packages.simplerepo
) and stores it in the directory specified. - Makes the repo available at host:post/repo
-
Clone the repository:
git clone https://github.com/yourusername/simplerepo.git
-
Install dependencies:
pip install Flask
-
Navigate to the project directory:
cd simplerepo
-
Run the application:
python main.py
- Set the
scan_directory
variable inmain.py
to the path where your .deb files are located. - Configure the
flask_host
andflask_port
variables inmain.py
according to your preferences. - Note that Usage below assums not change was made to the configuration
-
After running the application, open your web browser and go to:
http://localhost:5000
-
The web interface will display a table of available .deb files.
-
To add the repository to
/etc/apt/sources.list
, run the following command:echo "deb http://localhost:5000/repo/ /" | sudo tee -a /etc/apt/sources.list
-
Update the package list:
sudo apt-get update
-
You can now install packages from your repository using
apt-get
.