Fix Debian package build issues
- Remove debian/compat file (conflicts with Build-Depends) - Fix debian/install to use correct readme.md filename - Update verify-deb.sh to mark debian/compat as optional - Add -Zgzip flag to dpkg-buildpackage for compatibility (uses gzip instead of zstd for better compatibility) - Update verify-deb.sh to check optional vs required files Package now builds and installs successfully on systems without zstd support.
This commit is contained in:
@@ -60,12 +60,16 @@ REQUIRED_FILES=(
|
||||
"debian/postinst"
|
||||
"debian/prerm"
|
||||
"debian/postrm"
|
||||
"debian/compat"
|
||||
"debian/sensorpajen.service"
|
||||
"src/sensorpajen/main.py"
|
||||
"pyproject.toml"
|
||||
)
|
||||
|
||||
# Optional files (debian/compat is now optional - use Build-Depends instead)
|
||||
OPTIONAL_FILES=(
|
||||
"debian/compat"
|
||||
)
|
||||
|
||||
ALL_FILES_OK=1
|
||||
for file in "${REQUIRED_FILES[@]}"; do
|
||||
echo -n " $file... "
|
||||
@@ -77,6 +81,16 @@ for file in "${REQUIRED_FILES[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Check optional files
|
||||
for file in "${OPTIONAL_FILES[@]}"; do
|
||||
echo -n " $file... "
|
||||
if [ -f "$file" ]; then
|
||||
echo -e "${GREEN}OK${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}OPTIONAL${NC}"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $ALL_FILES_OK -eq 0 ]; then
|
||||
echo -e "${RED}Some required files are missing!${NC}"
|
||||
exit 1
|
||||
@@ -94,10 +108,10 @@ echo "Cleaning previous builds..."
|
||||
rm -f ../*.deb ../*.build ../*.buildinfo ../*.changes
|
||||
rm -rf debian/.debhelper debian/sensorpajen debian/files
|
||||
|
||||
# Build the package
|
||||
# Build the package with gzip compression (for compatibility)
|
||||
echo "Building Debian package..."
|
||||
echo "======================================================================"
|
||||
dpkg-buildpackage -us -uc -b
|
||||
dpkg-buildpackage -us -uc -b -Zgzip
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${RED}Build failed!${NC}"
|
||||
|
||||
Reference in New Issue
Block a user