-
Notifications
You must be signed in to change notification settings - Fork 949
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
feature: build rpm package for pouch #597
Conversation
Thanks a lot for your work, @zzchun |
Codecov Report
@@ Coverage Diff @@
## master #597 +/- ##
=======================================
Coverage 13.58% 13.58%
=======================================
Files 65 65
Lines 3541 3541
=======================================
Hits 481 481
Misses 3010 3010
Partials 50 50 Continue to review full report at Codecov.
|
# kill only the pouch process, not all processes in the cgroup | ||
KillMode=process | ||
|
||
# restart the docker process if it exits prematurely |
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.
s/docker/pouch?
LimitCORE=infinity | ||
|
||
TimeoutStartSec=0 | ||
# set delegate yes so that systemd does not reset the cgroups of docker containers |
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.
s/docker/pouch?
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.
sorry,I'll fix it
@zzchun It would be better that there is a doc with this PR |
# docker run -it -v /root/rpm/:/root/rpm pouch:rpm bash -c hack/package/build.sh | ||
# | ||
# 4. In this example rpm package will be output in '/root/rpm/package/' directory | ||
|
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.
Maybe also copy this to a build.doc?
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'll write a doc after building deb package
hack/package/build.sh
Outdated
PACKAGEDIR=/root/rpm/package | ||
|
||
# the branch to build pouch | ||
POUCH_BRANCH='0.1.x' |
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.
Do we need to change this variable to be : POUCH_BRANCH={$POUCH_BRANCH:?"Must specify pouch branch"} ? the same for VERSION
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.
Good idea,I‘ll parse these parameters via env
hack/package/build.sh
Outdated
SCRIPTSDIR=$DIR/package/rpm/scripts | ||
|
||
POUCHDIR=$TMP/source | ||
mkdir $POUCHDIR |
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.
could add a rm option after each mkdir
, for example
trap "rm -rf $POUCHDIR" EXIT
hack/package/build.sh
Outdated
{ | ||
mkdir -p $LXC_DIR && pushd $LXC_DIR | ||
git clone https://github.com/lxc/lxcfs.git | ||
cd lxcfs && git checkout -q $LXC_TAG |
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.
could use git clone -b
?
Signed-off-by: Zhanchun Zhang <[email protected]>
How about adding a config.tmpl, so that user could get there own configure file by modifying it ? |
I will give an example in the build doc. |
@zzchun No problem, I'll merge it. |
Signed-off-by: Zhanchun Zhang [email protected]
1.Describe what this PR did
This pr added a way to build rpm package
2.Does this pull request fix one issue?
fixes part of #67
3.Describe how you did it
Build pouch:rpm image
cd hack/package/rpm
docker build -t pouch:rpm .
Mount a directory which contains gpg keys, eg
$ tree rpm/keys/
rpm/keys/
├── gpg
└── secretkey
Run the following command, and enter your pass phrase to sign rpm package
docker run -it -v /root/rpm/:/root/rpm pouch:rpm bash -c hack/package/build.sh
In this example rpm package will be output in '/root/rpm/package/' directory
4.Describe how to verify it
5.Special notes for reviews