raspberrypi / cmprovision

Provisioning system for CM4 products
BSD 3-Clause "New" or "Revised" License
88 stars 11 forks source link

public/uploads directory missing when built from source #28

Open ysi-camerona opened 9 months ago

ysi-camerona commented 9 months ago

I built cmprovision from source using dpkg-buildpackage. I then compared my local deb against the 1.6.3 release and noticed that /var/lib/cmprovision/public/uploads was missing from my local deb. This causes the /images endpoint to return a 500 error (Images.php:21).

I suspect this is because the uploads directory is not included in the Git source. I solved the problem by creating a debian/dirs file and adding the directory to it, but the documentation suggests this is generally not desirable.

Should I be building the source differently, or is this a bug that a PR should be submitted for?

barneyman commented 7 months ago

My build script does this effectively ...

mkdir public/uploads
dpkg-buildpackage -us -uc --build=all
ysi-camerona commented 7 months ago

Thanks barney, I solved the issue locally in a similar way. I created the debian/dirs file (documentation) with the contents:

var/lib/cmprovision/public/uploads