New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add script for creating debian package #3189
Conversation
Add MANIFEST.in to include static files
…etting up debian package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to get Mathesar running on a Debian (bullseye) machine as a .deb
package! Nice work, @silentninja .
For future reference, the correct command to install the package is
sudo apt install ./mathesar_0.1.3_amd64.deb
I'm not sure why the ./
prefix is necessary, but it didn't work (on my test machine) without that. I assume it flags the installation package as existing on the local filesystem.
Moving forward, I think we should consider reorganizing the docs a bit, however I was able to use the ones added in this PR to build the package, so they suffice.
I think we should hold off on merging until #3206 is merged (via develop
) into this branch, to make sure the python changes don't affect PG version compatibility.
Fixes #2765
This PR adds the release-scripts/build-debian.sh for generating a Debian package of Mathesar.
The generated Debian package is specific to the OS version it was generated on. So if it was generated on Debian bullseye, it can be installed only on machines running Debian bullseye and for example, cannot be installed on Debian buster.
We would be running this script on a build service like Open Build Service, it is provided here only for generating and testing manually.
The generated Debian package contains a virtualenv directory of all the dependencies of Mathesar and Mathesar Python modules. When the debian package is installed, the system python is symlinked to this virtual env. The systemd file then uses this virtual environment to start Mathesar.
The following changes are needed for the Debian package to function correctly
Notes for the reviewer
The aim of this PR is to generate the debian package manually by running the release-scripts/build-debian.sh script and test the generated package on a Debian machine to see if the .deb file works as intended.
In practice, the script will run a build service like Open Build Service which will download the release source code along with static assets, and use it for generating the Debian file.
Instructions for building the Debian image are in the Developer Guide
Before installing Mathesar, you need to install a Postgres server as we don't support SQLite as an internal database as of now
If the mathesar service is installed on a remote server. You need to do the following
Add the IP address of the server to allowed hosts
and add the IP address to the
ALLOWED_HOSTS
and restart the serviceSince the mathesar server runs on port 8000 which is not exposed to the public. You would need to set up a reverse proxy to listen on port 80 or redirect the port 80 traffic to port 8000.
Updating the debian package can be tested by making changes to the version number in
pyproject.yaml
and running the build script again. The generated debian package can be installed to update the existing Mathesar running on the OSChecklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin