Initial repository structure for IPTV Updates
- Added README with repository structure - Created current.json for version tracking - Added v2.7.0 release manifest - Created patch creation guide - Set up directory structure for patches and releases
This commit is contained in:
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Temporary files
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Test data
|
||||
test/
|
||||
testing/
|
||||
|
||||
# Build artifacts
|
||||
*.pyc
|
||||
__pycache__/
|
||||
|
||||
# Logs
|
||||
*.log
|
259
PATCH_CREATION_GUIDE.md
Normal file
259
PATCH_CREATION_GUIDE.md
Normal file
@@ -0,0 +1,259 @@
|
||||
# Patch Creation Guide
|
||||
|
||||
This guide explains how to create patches for the IPTV Server system.
|
||||
|
||||
## Patch Structure
|
||||
|
||||
Each patch must follow this directory structure:
|
||||
```
|
||||
patches/vX.Y.Z-to-vA.B.C/
|
||||
├── patch.json # Patch metadata
|
||||
├── files/ # Changed files
|
||||
│ ├── modified/ # Files to be modified
|
||||
│ ├── added/ # New files to add
|
||||
│ └── deleted.json # List of files to delete
|
||||
├── scripts/ # Update scripts
|
||||
│ ├── pre_update.sh # Run before applying patch
|
||||
│ ├── post_update.sh # Run after applying patch
|
||||
│ └── validate.sh # Validation script
|
||||
└── rollback/ # Rollback information
|
||||
└── rollback.json # Rollback metadata
|
||||
```
|
||||
|
||||
## patch.json Format
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "2.7.1",
|
||||
"from_version": "2.7.0",
|
||||
"release_date": "2025-01-20T00:00:00Z",
|
||||
"type": "bugfix|feature|security|critical",
|
||||
"requires_restart": true,
|
||||
"requires_migration": false,
|
||||
"auto_apply": false,
|
||||
"changelog": {
|
||||
"added": ["New feature descriptions"],
|
||||
"fixed": ["Bug fix descriptions"],
|
||||
"changed": ["Changed functionality"],
|
||||
"security": ["Security fixes"],
|
||||
"deprecated": ["Deprecated features"]
|
||||
},
|
||||
"files": {
|
||||
"modified": [
|
||||
{
|
||||
"path": "app/api/channels_api.py",
|
||||
"checksum": "sha256:...",
|
||||
"backup": true
|
||||
}
|
||||
],
|
||||
"added": [
|
||||
{
|
||||
"path": "app/services/new_service.py",
|
||||
"checksum": "sha256:..."
|
||||
}
|
||||
],
|
||||
"deleted": ["app/deprecated.py"]
|
||||
},
|
||||
"scripts": {
|
||||
"pre_update": "scripts/pre_update.sh",
|
||||
"post_update": "scripts/post_update.sh",
|
||||
"validate": "scripts/validate.sh"
|
||||
},
|
||||
"docker": {
|
||||
"rebuild": ["iptv-backend"],
|
||||
"restart": ["iptv-backend", "nginx"],
|
||||
"pull": []
|
||||
},
|
||||
"database": {
|
||||
"migrations": ["migrations/001_add_column.sql"],
|
||||
"backup_required": true
|
||||
},
|
||||
"validation": {
|
||||
"checksum": "sha256:...",
|
||||
"signature": "gpg:...",
|
||||
"min_version": "2.7.0",
|
||||
"max_version": "2.7.5"
|
||||
},
|
||||
"rollback": {
|
||||
"supported": true,
|
||||
"data_loss_risk": false,
|
||||
"instructions": "Automatic rollback available"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Creating a Patch
|
||||
|
||||
### 1. Identify Changes
|
||||
```bash
|
||||
# Compare versions
|
||||
diff -r old_version/ new_version/ > changes.diff
|
||||
```
|
||||
|
||||
### 2. Create Patch Directory
|
||||
```bash
|
||||
mkdir -p patches/v2.7.0-to-v2.7.1/{files,scripts,rollback}
|
||||
mkdir -p patches/v2.7.0-to-v2.7.1/files/{modified,added}
|
||||
```
|
||||
|
||||
### 3. Copy Modified Files
|
||||
Place the NEW version of modified files in `files/modified/` maintaining the directory structure:
|
||||
```
|
||||
files/modified/
|
||||
└── app/
|
||||
└── api/
|
||||
└── channels_api.py # New version of the file
|
||||
```
|
||||
|
||||
### 4. Add New Files
|
||||
Place new files in `files/added/` with proper directory structure.
|
||||
|
||||
### 5. List Deleted Files
|
||||
Create `files/deleted.json`:
|
||||
```json
|
||||
[
|
||||
"app/old_file.py",
|
||||
"frontend/deprecated.js"
|
||||
]
|
||||
```
|
||||
|
||||
### 6. Create Update Scripts
|
||||
|
||||
**pre_update.sh**:
|
||||
```bash
|
||||
#!/bin/bash
|
||||
echo "Preparing to apply patch..."
|
||||
# Stop services if needed
|
||||
# Backup critical data
|
||||
exit 0
|
||||
```
|
||||
|
||||
**post_update.sh**:
|
||||
```bash
|
||||
#!/bin/bash
|
||||
echo "Finalizing patch..."
|
||||
# Restart services
|
||||
# Run migrations
|
||||
# Clear caches
|
||||
exit 0
|
||||
```
|
||||
|
||||
**validate.sh**:
|
||||
```bash
|
||||
#!/bin/bash
|
||||
echo "Validating patch application..."
|
||||
# Check file integrity
|
||||
# Test critical functions
|
||||
# Verify services are running
|
||||
exit 0
|
||||
```
|
||||
|
||||
### 7. Generate Checksums
|
||||
```bash
|
||||
# For each file
|
||||
sha256sum file > file.sha256
|
||||
```
|
||||
|
||||
### 8. Create Rollback Data
|
||||
Store original files and database state in `rollback/` directory.
|
||||
|
||||
## Testing a Patch
|
||||
|
||||
1. **Test on Development System**
|
||||
```bash
|
||||
./patch-manager.py test patches/v2.7.0-to-v2.7.1
|
||||
```
|
||||
|
||||
2. **Verify File Changes**
|
||||
- Check all files are properly modified
|
||||
- Verify checksums match
|
||||
|
||||
3. **Test Services**
|
||||
- Ensure all services start correctly
|
||||
- Test critical functionality
|
||||
|
||||
4. **Test Rollback**
|
||||
- Apply patch
|
||||
- Rollback
|
||||
- Verify system returns to previous state
|
||||
|
||||
## Publishing a Patch
|
||||
|
||||
1. **Commit to Git**
|
||||
```bash
|
||||
git add patches/v2.7.0-to-v2.7.1
|
||||
git commit -m "Add patch v2.7.0 to v2.7.1"
|
||||
git push origin main
|
||||
```
|
||||
|
||||
2. **Update current.json**
|
||||
```json
|
||||
{
|
||||
"latest": "2.7.1",
|
||||
"stable": "2.7.1"
|
||||
}
|
||||
```
|
||||
|
||||
3. **Create Release Manifest**
|
||||
Create `releases/v2.7.1.json` with version details.
|
||||
|
||||
4. **Tag Release**
|
||||
```bash
|
||||
git tag -a v2.7.1 -m "Release v2.7.1"
|
||||
git push origin v2.7.1
|
||||
```
|
||||
|
||||
## Patch Types
|
||||
|
||||
### Bugfix Patches
|
||||
- Fix existing functionality
|
||||
- No new features
|
||||
- Minimal risk
|
||||
- Can auto-apply
|
||||
|
||||
### Feature Patches
|
||||
- Add new functionality
|
||||
- May require configuration
|
||||
- Medium risk
|
||||
- Require confirmation
|
||||
|
||||
### Security Patches
|
||||
- Fix vulnerabilities
|
||||
- High priority
|
||||
- Should auto-apply
|
||||
- Include CVE references
|
||||
|
||||
### Critical Patches
|
||||
- Fix critical system issues
|
||||
- Highest priority
|
||||
- May force update
|
||||
- Include detailed instructions
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Always Test First**
|
||||
- Never publish untested patches
|
||||
- Test on multiple configurations
|
||||
|
||||
2. **Maintain Compatibility**
|
||||
- Ensure backward compatibility
|
||||
- Document breaking changes
|
||||
|
||||
3. **Clear Documentation**
|
||||
- Detailed changelogs
|
||||
- Clear update instructions
|
||||
- Known issues
|
||||
|
||||
4. **Atomic Updates**
|
||||
- Each patch should be self-contained
|
||||
- Don't depend on other patches
|
||||
|
||||
5. **Rollback Safety**
|
||||
- Always provide rollback mechanism
|
||||
- Test rollback procedure
|
||||
- Document data loss risks
|
||||
|
||||
6. **Version Sequencing**
|
||||
- Patches must be applied in order
|
||||
- Can't skip versions
|
||||
- Validate version requirements
|
35
README.md
Normal file
35
README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# IPTV Server Updates Repository
|
||||
|
||||
This repository contains patches and updates for the IPTV Server system.
|
||||
|
||||
## Structure
|
||||
|
||||
- `patches/` - Contains incremental patches between versions
|
||||
- `releases/` - Release manifests for each version
|
||||
- `current.json` - Points to the latest stable version
|
||||
|
||||
## Patch Format
|
||||
|
||||
Each patch directory follows the naming convention: `vX.Y.Z-to-vX.Y.Z/`
|
||||
|
||||
Inside each patch directory:
|
||||
- `patch.json` - Metadata about the patch
|
||||
- `files/` - Changed files to be applied
|
||||
- `scripts/` - Pre/post update scripts
|
||||
- `rollback/` - Data for rolling back the patch
|
||||
|
||||
## How Patches Work
|
||||
|
||||
1. The IPTV server checks this repository periodically
|
||||
2. Compares its current version against `current.json`
|
||||
3. Downloads and applies patches sequentially
|
||||
4. Each patch is validated before application
|
||||
5. Automatic rollback on failure
|
||||
|
||||
## Creating a New Patch
|
||||
|
||||
See `PATCH_CREATION_GUIDE.md` for detailed instructions.
|
||||
|
||||
## Version History
|
||||
|
||||
- **v2.7.0** - Initial release (2025-09-20)
|
8
current.json
Normal file
8
current.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"latest": "2.7.0",
|
||||
"stable": "2.7.0",
|
||||
"minimum_supported": "2.7.0",
|
||||
"update_channel": "stable",
|
||||
"last_updated": "2025-09-20T00:00:00Z",
|
||||
"update_server": "http://git.powerdata.dk:3000/masterdraco/IPTV-Updates.git"
|
||||
}
|
47
releases/v2.7.0.json
Normal file
47
releases/v2.7.0.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"version": "2.7.0",
|
||||
"release_date": "2025-09-20T00:00:00Z",
|
||||
"type": "major",
|
||||
"stable": true,
|
||||
"minimum_required": null,
|
||||
"changelog": {
|
||||
"description": "Initial production release of IPTV Server",
|
||||
"features": [
|
||||
"Docker-based microservices architecture",
|
||||
"TV card support for live streaming",
|
||||
"M3U8/HLS streaming support",
|
||||
"Bitcoin payment integration",
|
||||
"Multi-tier user management (Admin, Reseller, Sub-Reseller, User)",
|
||||
"VOD content management",
|
||||
"EPG support",
|
||||
"Real-time streaming analytics",
|
||||
"Automatic SSL certificate management",
|
||||
"Credit-based billing system",
|
||||
"Hardware license enforcement"
|
||||
],
|
||||
"components": [
|
||||
"FastAPI backend",
|
||||
"React frontend",
|
||||
"PostgreSQL database",
|
||||
"Redis caching",
|
||||
"Nginx reverse proxy",
|
||||
"FFmpeg transcoding",
|
||||
"Celery task queue"
|
||||
]
|
||||
},
|
||||
"requirements": {
|
||||
"os": "Ubuntu 20.04+ or Debian 11+",
|
||||
"docker": "20.10+",
|
||||
"docker-compose": "2.0+",
|
||||
"disk_space_gb": 50,
|
||||
"memory_gb": 4
|
||||
},
|
||||
"files_count": 148,
|
||||
"docker_images": [
|
||||
"iptv-backend",
|
||||
"iptv-streaming",
|
||||
"nginx",
|
||||
"postgres:15-alpine",
|
||||
"redis:7-alpine"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user