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(packaging): create deb packaging #249 #313

Merged
merged 1 commit into from Sep 20, 2022

Conversation

acheevbhagat
Copy link
Contributor

@acheevbhagat acheevbhagat commented Sep 19, 2022

feat(packaging): create deb packaging #249

This allows creation of .deb package file after creating the dragonfly binary with ninja dragonfly, using cpack -G DEB from ./build-opts
Dragonfly is installed to /usr/bin/dragonfly

@acheevbhagat
Copy link
Contributor Author

I haven't been able to get the systemd script to work so far
I've tried creating under a new ./scripts folder, but I can't get it to install correctly (or at all) to /etc/systemd/system
I figured I'll just put a pr with what I have so far, and try to get the systemd script in another pr

@romange
Copy link
Collaborator

romange commented Sep 19, 2022

Can you please paste here the systemd file contents?

Copy link
Collaborator

@romange romange left a comment

Choose a reason for hiding this comment

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

Not as scary as I thought.
a few questions and comments below.

Packing.cmake Outdated
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})

set(CPACK_PACKAGE_CONTACT "[email protected]")
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you pls change it to [email protected] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

CMakeLists.txt Outdated
@@ -24,3 +24,5 @@ include_directories(helio)

add_subdirectory(helio)
add_subdirectory(src)

include(Packing.cmake)
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you mind moving it under /cmake dir (needs to be created as well).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved

Packing.cmake Outdated
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})

set(CPACK_PACKAGE_CONTACT "[email protected]")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Roman Gershman")
Copy link
Collaborator

Choose a reason for hiding this comment

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

DragonflyDB maintainers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

Packing.cmake Outdated Show resolved Hide resolved
Packing.cmake Outdated Show resolved Hide resolved
Packing.cmake Outdated Show resolved Hide resolved
@acheevbhagat
Copy link
Contributor Author

acheevbhagat commented Sep 20, 2022

Can you please paste here the systemd file contents?

The systemd file I was trying to add was a very simple one

[Unit]
Description=DragonflyDB

[Service]
ExecStart=/usr/bin/dragonfly

[Install]
WantedBy=multi-user.target

It would be placed under /etc/systemd/system, and once placed there it could be enabled with systemctl enable dragonfly.service

@romange romange merged commit 751bcb9 into dragonflydb:main Sep 20, 2022
2 checks passed
@romange
Copy link
Collaborator

romange commented Sep 20, 2022

Thanks Acheev! You might want to look at
https://github.com/search?q=install++CPACK_PACKAGING_INSTALL_PREFIX+DESTINATION+systemd+system&type=code

to see examples on how to add a service file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants