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

Changes to make packaging easier #575

Merged
merged 4 commits into from Feb 10, 2016
Merged

Conversation

arges
Copy link
Contributor

@arges arges commented Jan 13, 2016

Here are a series of commits that will make packaging kpatch in distributions such as Debian and Ubuntu a bit easier.

Chris J Arges added 2 commits January 11, 2016 14:26
When building binaries such as create-diff-object it would be useful
to be able to pass LDFLAGS when running make from the command line.
Some distributions prefer not to use /usr/libexec. To make things easier
for packaging, allow this directory to be set easily via environment
variables.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
$(INSTALL_DIRS):
$(MAKE) -C $(@:install-%=%) install

ninstall: $(UNINSTALL_DIRS)
Copy link
Contributor

Choose a reason for hiding this comment

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

You meant uninstall: right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are correct! Already pushed a fix.

$(INSTALL) -d $(MODULESDIR)/$(shell uname -r)
$(INSTALL) -m 644 core/kpatch.ko $(MODULESDIR)/$(shell uname -r)
$(INSTALL) -m 644 core/Module.symvers $(MODULESDIR)/$(shell uname -r)

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to define INSTALL somewhere, or include Makefile.inc

EDIT: It appears MODULESDIR is undefined too, so best to just include Makefile.inc :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

No need to specify core/ in the path, since we would already be in the core/ directory when this target is called. So it'd just be $(INSTALL) -m 644 kpatch.ko

@flaming-toast
Copy link
Contributor

@arges Thanks for the PR! And thanks for your patience :-) Other than the comments I already made, everything else looks good on my side.

Chris J Arges added 2 commits February 10, 2016 09:46
Don't assume we are building for the current kernel. In addition print out
a proper package necessary for building the module.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
In some cases when packaging it may not be useful to build kmod/core at
package build time (for example if using DKMS). Add a parameter 'BUILDMOD'
that when set to 'yes' will build kmod/core.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
@arges
Copy link
Contributor Author

arges commented Feb 10, 2016

I thought about this a bit more, and pushed an earlier approach to just add conditionals to kmod/Makefile. This is a bit more simple than moving makefile logic around and having to worry about including sub makefiles. Thanks for the reviews.

@jpoimboe
Copy link
Member

👍

@flaming-toast
Copy link
Contributor

Looks good to me, thanks.

flaming-toast added a commit that referenced this pull request Feb 10, 2016
Changes to make packaging easier
@flaming-toast flaming-toast merged commit 08f55af into dynup:master Feb 10, 2016
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

3 participants