-
Notifications
You must be signed in to change notification settings - Fork 39
DKMS changes #200
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
Open
anandhk-juniper
wants to merge
5
commits into
master
Choose a base branch
from
dkms
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DKMS changes #200
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0110dac
Initial commit to support DKMS. Packaging for ubuntu
anandhk-juniper 4a359c0
- RPM spec file for vrouter dkms package
anandhk-juniper 91f7a5d
Merge remote-tracking branch 'github/master' into dkms
anandhk-juniper 3dbc871
Mark the AUTOINSTALL flag so that the module gets built as part of sy…
anandhk-juniper 412abdf
review comments
anandhk-juniper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| contrail-vrouter-src-dkms (BUILDTAG) anandhk; urgency=low | ||
|
|
||
| [anandhk ] | ||
| * debian/changelog: changelog | ||
|
|
||
| -- anandhk <anandhk@juniper.net> Fri, 11 April 2014 8:00:11 +0800 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Source: contrail-vrouter-src-dkms | ||
| Maintainer: anandhk <anandhk@juniper.net> | ||
| Section: misc | ||
| Priority: optional | ||
| Standards-Version: 1.0 | ||
| Build-Depends: | ||
|
|
||
| Package: contrail-vrouter-src-dkms | ||
| Architecture: all | ||
| Maintainer: anandhk <anandhk@juniper.net> | ||
| Depends: dkms | ||
| Section: contrail-vrouter-src-dkms | ||
| Priority: extra | ||
| Description: Contrail Openstack vRouter kernel source debian package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Name: contrail-vrouter-src-dkms | ||
| Maintainer: anandhk <anandhk@juniper.net> | ||
| License: Commercial | ||
| Files: * | ||
| Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. |
12 changes: 12 additions & 0 deletions
12
common/debian/contrail-vrouter-src-dkms/debian/postinst.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/bin/sh | ||
| set -e | ||
| version="BUILDTAG" | ||
|
|
||
| case "$1" in | ||
| configure) | ||
| cd /usr/src/vrouter-$version/ | ||
| dkms add -m vrouter -v $version | ||
| ;; | ||
| *) | ||
| ;; | ||
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/bin/sh | ||
|
|
||
| set -e | ||
| version="BUILDTAG" | ||
|
|
||
| case "$1" in | ||
| upgrade|remove) | ||
| cd /usr/src/vrouter-$version/ | ||
| dkms remove -m vrouter -v $version --all | ||
| make clean | ||
| cd /usr/src | ||
| rm -rf vrouter-$version | ||
| ;; | ||
| *) | ||
| ;; | ||
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| #!/usr/bin/make -f | ||
| # -*- makefile -*- | ||
| # Sample debian/rules that uses debhelper. | ||
| # This file was originally written by Joey Hess and Craig Small. | ||
| # As a special exception, when this file is copied by dh-make into a | ||
| # dh-make output file, you may use that output file without restriction. | ||
| # This special exception was added by Craig Small in version 0.37 of dh-make. | ||
| # Uncomment this to turn on verbose mode. | ||
| # | ||
| export DH_VERBOSE=1 | ||
|
|
||
| export BUILDTIME := $(shell date -u +%y%m%d%H%M) | ||
| export SB_TOP := $(shell pwd | sed -re "s/(.*)\/tools\/packaging\/(.*)/\1/") | ||
| export buildroot := $(SB_TOP)/build/debian/contrail-vrouter-src-dkms | ||
| export _srcdir := ${SB_TOP}/vrouter/ | ||
| export _sandesh_srcdir := ${SB_TOP}/tools/sandesh/ | ||
| export _builddir := $(SB_TOP)/build/debug/vrouter/ | ||
|
|
||
| BUILDTAG = | ||
| ifdef TAG | ||
| BUILDTAG = $(TAG) | ||
| else | ||
| BUILDTAG = $(BUILDTIME) | ||
| endif | ||
|
|
||
| export _target_srcroot := /usr/src/vrouter-$(BUILDTAG)/ | ||
| export _packagedir := $(buildroot)/$(_target_srcroot) | ||
| export _package_builddir := $(buildroot)/$(_target_builddir) | ||
| export _arch := x86_64 | ||
|
|
||
|
|
||
| %: | ||
| dh $@ --tmpdir=${buildroot} --destdir=${SB_TOP}/build/debian | ||
|
|
||
| override_dh_auto_build: | ||
| sed 's,BUILDTAG,$(BUILDTAG),g' debian/changelog.in > debian/changelog | ||
| sed 's,BUILDTAG,$(BUILDTAG),g' debian/postinst.in > debian/postinst | ||
| sed 's,BUILDTAG,$(BUILDTAG),g' debian/prerm.in > debian/prerm | ||
| (cd ${SB_TOP}; scons --target=$(_arch) $(BUILD_ARCH_TARGETS) $(_srcdir)/sandesh) | ||
|
|
||
| override_dh_auto_install: | ||
| install -d -m 755 $(_packagedir)/dp-core | ||
| install -d -m 755 $(_packagedir)/include | ||
| install -d -m 755 $(_packagedir)/linux | ||
| install -d -m 755 $(_packagedir)/sandesh | ||
| install -d -m 755 $(_packagedir)/sandesh/gen-c/ | ||
| install -d -m 755 $(_packagedir)/sandesh/library/c | ||
| install -d -m 755 $(_packagedir)/sandesh/library/c/protocol | ||
| install -d -m 755 $(_packagedir)/sandesh/library/c/transport | ||
|
|
||
| echo "MAKE[0]=\"'make' -C . KERNELDIR=/lib/modules/\$${kernelver}/build\"" >> $(_packagedir)/dkms.conf | ||
| echo "CLEAN[0]=\"'make' -C . KERNELDIR=/lib/modules/\$${kernelver}/build\"" >> $(_packagedir)/dkms.conf | ||
| echo "DEST_MODULE_LOCATION[0]=\"/kernel/extra/net/vrouter\"" >> $(_packagedir)/dkms.conf | ||
| echo "BUILT_MODULE_NAME[0]=\"vrouter\"" >> $(_packagedir)/dkms.conf | ||
| echo "PACKAGE_NAME=vrouter" >> $(_packagedir)/dkms.conf | ||
| echo "PACKAGE_VERSION=$(BUILDTAG)" >> $(_packagedir)/dkms.conf | ||
| echo "AUTOINSTALL=\"yes\"" >> $(_packagedir)/dkms.conf | ||
|
|
||
|
|
||
| install -p -m 755 $(_srcdir)/dp-core/SConscript $(_packagedir)/dp-core/SConscript | ||
| install -p -m 755 $(_srcdir)/dp-core/vnsw_ip4_mtrie.c $(_packagedir)/dp-core/vnsw_ip4_mtrie.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_bridge.c $(_packagedir)/dp-core/vr_bridge.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_btable.c $(_packagedir)/dp-core/vr_btable.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_datapath.c $(_packagedir)/dp-core/vr_datapath.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_flow.c $(_packagedir)/dp-core/vr_flow.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_fragment.c $(_packagedir)/dp-core/vr_fragment.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_htable.c $(_packagedir)/dp-core/vr_htable.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_index_table.c $(_packagedir)/dp-core/vr_index_table.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_interface.c $(_packagedir)/dp-core/vr_interface.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_mcast.c $(_packagedir)/dp-core/vr_mcast.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_message.c $(_packagedir)/dp-core/vr_message.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_mirror.c $(_packagedir)/dp-core/vr_mirror.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_mpls.c $(_packagedir)/dp-core/vr_mpls.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_nexthop.c $(_packagedir)/dp-core/vr_nexthop.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vrouter.c $(_packagedir)/dp-core/vrouter.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_packet.c $(_packagedir)/dp-core/vr_packet.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_proto_ip.c $(_packagedir)/dp-core/vr_proto_ip.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_queue.c $(_packagedir)/dp-core/vr_queue.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_response.c $(_packagedir)/dp-core/vr_response.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_route.c $(_packagedir)/dp-core/vr_route.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_sandesh.c $(_packagedir)/dp-core/vr_sandesh.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_stats.c $(_packagedir)/dp-core/vr_stats.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_vrf_assign.c $(_packagedir)/dp-core/vr_vrf_assign.c | ||
| install -p -m 755 $(_srcdir)/dp-core/vr_vxlan.c $(_packagedir)/dp-core/vr_vxlan.c | ||
|
|
||
| install -p -m 755 $(_srcdir)/include/nl_util.h $(_packagedir)/include/nl_util.h | ||
| install -p -m 755 $(_srcdir)/include/udp_util.h $(_packagedir)/include/udp_util.h | ||
| install -p -m 755 $(_srcdir)/include/ulinux.h $(_packagedir)/include/ulinux.h | ||
| install -p -m 755 $(_srcdir)/include/vhost.h $(_packagedir)/include/vhost.h | ||
| install -p -m 755 $(_srcdir)/include/vnsw_ip4_mtrie.h $(_packagedir)/include/vnsw_ip4_mtrie.h | ||
| install -p -m 755 $(_srcdir)/include/vr_bridge.h $(_packagedir)/include/vr_bridge.h | ||
| install -p -m 755 $(_srcdir)/include/vr_btable.h $(_packagedir)/include/vr_btable.h | ||
| install -p -m 755 $(_srcdir)/include/vr_compat.h $(_packagedir)/include/vr_compat.h | ||
| install -p -m 755 $(_srcdir)/include/vr_defs.h $(_packagedir)/include/vr_defs.h | ||
| install -p -m 755 $(_srcdir)/include/vr_flow.h $(_packagedir)/include/vr_flow.h | ||
| install -p -m 755 $(_srcdir)/include/vr_fragment.h $(_packagedir)/include/vr_fragment.h | ||
| install -p -m 755 $(_srcdir)/include/vr_genetlink.h $(_packagedir)/include/vr_genetlink.h | ||
| install -p -m 755 $(_srcdir)/include/vr_hash.h $(_packagedir)/include/vr_hash.h | ||
| install -p -m 755 $(_srcdir)/include/vr_htable.h $(_packagedir)/include/vr_htable.h | ||
| install -p -m 755 $(_srcdir)/include/vr_index_table.h $(_packagedir)/include/vr_index_table.h | ||
| install -p -m 755 $(_srcdir)/include/vr_interface.h $(_packagedir)/include/vr_interface.h | ||
| install -p -m 755 $(_srcdir)/include/vr_linux.h $(_packagedir)/include/vr_linux.h | ||
| install -p -m 755 $(_srcdir)/include/vr_mcast.h $(_packagedir)/include/vr_mcast.h | ||
| install -p -m 755 $(_srcdir)/include/vr_message.h $(_packagedir)/include/vr_message.h | ||
| install -p -m 755 $(_srcdir)/include/vr_mirror.h $(_packagedir)/include/vr_mirror.h | ||
| install -p -m 755 $(_srcdir)/include/vr_mpls.h $(_packagedir)/include/vr_mpls.h | ||
| install -p -m 755 $(_srcdir)/include/vr_nexthop.h $(_packagedir)/include/vr_nexthop.h | ||
| install -p -m 755 $(_srcdir)/include/vr_os.h $(_packagedir)/include/vr_os.h | ||
| install -p -m 755 $(_srcdir)/include/vrouter.h $(_packagedir)/include/vrouter.h | ||
| install -p -m 755 $(_srcdir)/include/vr_packet.h $(_packagedir)/include/vr_packet.h | ||
| install -p -m 755 $(_srcdir)/include/vr_proto.h $(_packagedir)/include/vr_proto.h | ||
| install -p -m 755 $(_srcdir)/include/vr_queue.h $(_packagedir)/include/vr_queue.h | ||
| install -p -m 755 $(_srcdir)/include/vr_response.h $(_packagedir)/include/vr_response.h | ||
| install -p -m 755 $(_srcdir)/include/vr_route.h $(_packagedir)/include/vr_route.h | ||
| install -p -m 755 $(_srcdir)/include/vr_sandesh.h $(_packagedir)/include/vr_sandesh.h | ||
| install -p -m 755 $(_srcdir)/include/vr_vxlan.h $(_packagedir)/include/vr_vxlan.h | ||
|
|
||
| install -p -m 755 $(_srcdir)/linux/vhost_dev.c $(_packagedir)/linux/vhost_dev.c | ||
| install -p -m 755 $(_srcdir)/linux/vr_genetlink.c $(_packagedir)/linux/vr_genetlink.c | ||
| install -p -m 755 $(_srcdir)/linux/vr_host_interface.c $(_packagedir)/linux/vr_host_interface.c | ||
| install -p -m 755 $(_srcdir)/linux/vr_mem.c $(_packagedir)/linux/vr_mem.c | ||
| install -p -m 755 $(_srcdir)/linux/vrouter_mod.c $(_packagedir)/linux/vrouter_mod.c | ||
|
|
||
| install -p -m 755 $(_builddir)/sandesh/gen-c/vr_types.c $(_packagedir)/sandesh/gen-c/vr_types.c | ||
| install -p -m 755 $(_builddir)/sandesh/gen-c/vr_types.h $(_packagedir)/sandesh/gen-c/vr_types.h | ||
|
|
||
| install -p -m 755 $(_sandesh_srcdir)/library/c/sandesh.c $(_packagedir)/sandesh/library/c/sandesh.c | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/sandesh.h $(_packagedir)/sandesh/library/c/sandesh.h | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/thrift.h $(_packagedir)/sandesh/library/c/thrift.h | ||
|
|
||
| install -p -m 755 $(_sandesh_srcdir)/library/c/protocol/thrift_binary_protocol.c $(_packagedir)/sandesh/library/c/protocol/thrift_binary_protocol.c | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/protocol/thrift_binary_protocol.h $(_packagedir)/sandesh/library/c/protocol/thrift_binary_protocol.h | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/protocol/thrift_protocol.c $(_packagedir)/sandesh/library/c/protocol/thrift_protocol.c | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/protocol/thrift_protocol.h $(_packagedir)/sandesh/library/c/protocol/thrift_protocol.h | ||
|
|
||
| install -p -m 755 $(_sandesh_srcdir)/library/c/transport/thrift_fake_transport.c $(_packagedir)/sandesh/library/c/transport/thrift_fake_transport.c | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/transport/thrift_fake_transport.h $(_packagedir)/sandesh/library/c/transport/thrift_fake_transport.h | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/transport/thrift_memory_buffer.c $(_packagedir)/sandesh/library/c/transport/thrift_memory_buffer.c | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/transport/thrift_memory_buffer.h $(_packagedir)/sandesh/library/c/transport/thrift_memory_buffer.h | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/transport/thrift_transport.c $(_packagedir)/sandesh/library/c/transport/thrift_transport.c | ||
| install -p -m 755 $(_sandesh_srcdir)/library/c/transport/thrift_transport.h $(_packagedir)/sandesh/library/c/transport/thrift_transport.h | ||
|
|
||
| install -p -m 755 $(_srcdir)/Makefile $(_packagedir)/Makefile | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Instead of individually selecting each of the files, can't we tar the entire directory and put the tarball?
This way whenever we add or delete files in the source, we don't have to modify the spec/rules file.
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.
Hello ND,
There are a couple of problems in tar-ing (though, none are signifcant). Firstly,
it is possible that there could be binary files in the same directory. Secondly, not
all the files inside the vrouter directory is copied. Thirdly, all the sources don't
actually come from the same directory. However, I agree to the point that people
can forget adding files into the spec file. I do not have a good solution for this.
Let me know.
Thanks,
Anand
From: ndramesh notifications@github.com
Sent: Saturday, April 5, 2014 6:44 AM
To: Juniper/contrail-packaging
Cc: Anand H Krishnan
Subject: Re: [contrail-packaging] DKMS changes (#200)
In common/debian/contrail-vrouter-src-dkms/debian/rules:
Instead of individually selecting each of the files, can't we tar the entire directory and put the tarball?
This way whenever we add or delete files in the source, we don't have to modify the spec/rules file.
Reply to this email directly or view it on GitHubhttps://github.com//pull/200/files#r11319153.