This repository contains the Debian package configuration for OpenList, designed to automatically create .deb
packages for Ubuntu/Debian systems. It monitors the main OpenList repository for new releases and automatically builds corresponding DEB packages.
- Automatic Version Detection: Uses GitHub API to detect new OpenList releases
- Multi-Architecture Support: Builds for both
amd64
andarm64
architectures - Automated Binary Download: Downloads the latest binaries from OpenList releases
- System Integration:
- Installs to
/var/lib/openlist
- Creates systemd service for automatic startup
- Creates wrapper script at
/usr/bin/openlist
for command-line access - Automatically adds
--force-bin-dir
to all commands - Manages user/group creation and cleanup
- Installs to
- GitHub Releases: Automatically creates releases with DEB packages
- PPA Support: Optional upload to Launchpad PPA
├── .github/workflows/
│ └── build-deb.yml # GitHub Actions workflow
├── debian/
│ ├── control # Package metadata and dependencies
│ ├── changelog # Package version history
│ ├── compat # Debhelper compatibility level
│ ├── rules # Build rules (extracts pre-downloaded binaries)
│ ├── openlist.install # File installation mappings
│ ├── openlist.service # Systemd service definition
│ ├── postinst # Post-installation script
│ ├── prerm # Pre-removal script
│ └── postrm # Post-removal script
├── build.sh # Local build script
└── README.md # This file
The GitHub Actions workflow:
- Daily Check: Runs daily at 2 AM UTC to check for new OpenList releases
- Version Detection: Uses GitHub API to get the latest release from
OpenListTeam/OpenList
- Duplicate Check: Verifies if this version was already built
- Binary Download: Downloads
openlist-linux-amd64.tar.gz
andopenlist-linux-arm64.tar.gz
- Package Building: Creates DEB packages for both architectures
- Release Creation: Creates a GitHub release with the DEB packages
- PPA Upload: Optionally uploads to Launchpad PPA (if configured)
jq
(for JSON parsing)wget
orcurl
- Debian packaging tools (
debhelper
,devscripts
,build-essential
)
chmod +x build.sh
./build.sh
./build.sh --version 1.2.3 --arch amd64
-v, --version VERSION
: Set package version (default: fetch latest from GitHub)-a, --arch ARCH
: Set architecture (amd64 or arm64, default: amd64)-d, --debug
: Enable debug output-h, --help
: Show help message
- Schedule: Daily at 2 AM UTC
- Manual: Via workflow dispatch
Configure these secrets in your GitHub repository settings:
GPG_PRIVATE_KEY
: Your GPG private key for signing packagesGPG_PASSPHRASE
: Passphrase for your GPG keyGPG_KEY_ID
: Your GPG key IDLAUNCHPAD_EMAIL
: Your Launchpad email address
ENABLE_PPA_UPLOAD
: Set to'true'
to enable PPA uploads (optional)
# Download latest release
wget https://github.com/OpenListTeam/OpenList-APT/releases/latest/download/openlist_VERSION-1_amd64.deb
# Install
sudo dpkg -i openlist_VERSION-1_amd64.deb
sudo apt-get install -f # Fix any dependency issues
sudo add-apt-repository ppa:openlist/ppa
sudo apt update
sudo apt install openlist
The package installs a systemd service that starts automatically:
# Check service status
sudo systemctl status openlist
# Start/stop/restart service
sudo systemctl start openlist
sudo systemctl stop openlist
sudo systemctl restart openlist
# View logs
sudo journalctl -u openlist -f
After installation, OpenList is available in the PATH:
openlist --help
openlist server
openlist version
Important: The /usr/bin/openlist
command is a wrapper script that automatically adds --force-bin-dir
to all commands. So when you run:
openlist server
→ actually executesopenlist server --force-bin-dir
openlist --help
→ actually executesopenlist --help --force-bin-dir
- Any command → automatically gets
--force-bin-dir
appended
The actual binary is located at /var/lib/openlist/openlist
with a wrapper script at /usr/bin/openlist
.
- Binary:
/var/lib/openlist/openlist
- Wrapper Script:
/usr/bin/openlist
- Working Directory:
/var/lib/openlist
- Service File:
/etc/systemd/system/openlist.service
- User/Group:
openlist:openlist
The package automatically downloads the appropriate binary from:
- AMD64:
https://github.com/OpenListTeam/OpenList/releases/latest/download/openlist-linux-amd64.tar.gz
- ARM64:
https://github.com/OpenListTeam/OpenList/releases/latest/download/openlist-linux-arm64.tar.gz
# Remove package but keep configuration
sudo apt remove openlist
# Remove package and all configuration/data
sudo apt purge openlist
Check the service logs:
sudo journalctl -u openlist -n 50
Ensure proper ownership:
sudo chown -R openlist:openlist /var/lib/openlist
sudo chmod 755 /var/lib/openlist/openlist
Check the wrapper script:
cat /usr/bin/openlist
If the wrapper script is missing or corrupted, recreate it:
sudo tee /usr/bin/openlist << 'EOF'
#!/bin/bash
# OpenList wrapper script
# Automatically adds --force-bin-dir to all commands
BINARY="/var/lib/openlist/openlist"
# Check if the binary exists
if [ ! -x "$BINARY" ]; then
echo "Error: OpenList binary not found at $BINARY"
exit 1
fi
# Check if --force-bin-dir is already present in arguments
if [[ "$*" != *"--force-bin-dir"* ]]; then
# Add --force-bin-dir to all commands
exec "$BINARY" "$@" --force-bin-dir
else
# --force-bin-dir already present, pass through as-is
exec "$BINARY" "$@"
fi
EOF
sudo chmod +x /usr/bin/openlist
If you need to run the binary without the wrapper script:
/var/lib/openlist/openlist --help
/var/lib/openlist/openlist server
- Clone this repository
- Run the build script:
./build.sh
- Install the generated package:
sudo dpkg -i ../openlist_*.deb
- Test the service:
sudo systemctl status openlist
- Test the wrapper:
openlist --help
- Fork this repository
- Make your changes
- Test locally
- Submit a pull request
This packaging configuration follows the same license as the main OpenList project.