Skip to content
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

feat: add debian source package files #249

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mpolitzer
Copy link
Contributor

@mpolitzer mpolitzer commented Jul 1, 2024

workflow:

# install debian packaging tools
apt install -y --no-install-recommends build-essential dh-make devscripts 

# update the version on the changelog
dch -v `make -s version` "Release `make -s version`-1"

# recreate the debian./ folder and the  ".orig" tarball in ..
dh_make -y -l --createorig -c lgpl3 -p machine-emulator_`make -s version`

# or just the tarball
tar czf ../machine-emulator_`make -s version`.orig.tar.gz --exclude=.git .

# build the dsc
dpkg-source -b .

# build the binary package
dpkg-buildpackage -us -uc

# cleanup
dpkg-buildpackage -rfakeroot -Tclean

@mpolitzer mpolitzer added the enhancement New feature or request label Jul 1, 2024
@mpolitzer mpolitzer self-assigned this Jul 1, 2024
debian/control Outdated
@@ -0,0 +1,43 @@
Source: machine-emulator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think name should be cartesi-machine-emulator.

debian/control Outdated
lua-lpeg,
lua-posix-dev,
lua-sec-dev,
lua-socket-dev,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lua-posix, lua-sec, lua-socket are only needed for testing could remove if we are not performing tests.
lua-lpeg can be removed
lua-dkjson we are not using anymore for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took them from the Dockerfile, I'll add an issue to clean it up as well.

debian/control Outdated
Depends:
libboost1.81-dev,
liblua5.4-dev,
libslirp-dev,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lua-dev and slirp-dev are only needed during build time, so could move to Build-Depends.

@@ -0,0 +1,3 @@
fix-make-clean
add-generated-files
fix-removal-of-generated-files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably make the changes needed for fix-removal-of-generated-files and fix-make-clean into the emulator source tree.

@edubart
Copy link
Contributor

edubart commented Jul 2, 2024

Could the workflow shared on this PR comment be a workflow in CI?

@edubart edubart linked an issue Jul 2, 2024 that may be closed by this pull request
@mpolitzer
Copy link
Contributor Author

Could the workflow shared on this PR comment be a workflow in CI?

Yes, I plan on replacing the binary version with this one on CI.

I just wanted to confirm the direction since the debian source packaging is so intrusive. Thus the draft.

@mpolitzer mpolitzer force-pushed the feature/debian-source-package branch 3 times, most recently from 40cf70a to 1b252ce Compare July 22, 2024 14:08
@mpolitzer mpolitzer force-pushed the feature/debian-source-package branch 3 times, most recently from 61654b7 to 8df51ae Compare July 25, 2024 18:50
In the uarch toolchain image (`cartesi/toolchain:0.17.0-rv64ima-lp64`),
run the following commands:
```
apt build-dep . -y --no-install-recommends
dch -v `make -s version` "Release `make -s version`"
dpkg-buildpackage
```

Packages are created on the parent directory.
@mpolitzer mpolitzer force-pushed the feature/debian-source-package branch from 8df51ae to a3c1bf4 Compare July 25, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

Create cartesi-machine debian source packages
2 participants