Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
2902c02478 | |||
cf94855c8e | |||
6bddbee7a5 | |||
b3f43f2739 | |||
5a93ebcf9c | |||
0eb378c291 |
40
.github/workflows/commits.yml
vendored
Normal file
40
.github/workflows/commits.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Commits
|
||||
on:
|
||||
- pull_request
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dco-check:
|
||||
permissions:
|
||||
pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR
|
||||
name: Signed-off-by (DCO)
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Get PR Commits
|
||||
id: 'get-pr-commits'
|
||||
uses: tim-actions/get-pr-commits@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Check that all commits are signed-off
|
||||
uses: tim-actions/dco@master
|
||||
with:
|
||||
commits: ${{ steps.get-pr-commits.outputs.commits }}
|
||||
|
||||
target-branch:
|
||||
permissions:
|
||||
contents: none
|
||||
name: Branch target
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check branch target
|
||||
env:
|
||||
TARGET: ${{ github.event.pull_request.base.ref }}
|
||||
run: |
|
||||
set -x
|
||||
[ "${TARGET}" = "main" ] && exit 0
|
||||
|
||||
echo "Invalid branch target: ${TARGET}"
|
||||
exit 1
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
ruby-lxc (1.2.3-0digirati1) trusty; urgency=low
|
||||
|
||||
* Version 1.2.3.
|
||||
|
||||
-- Andre Nathan <andre@digirati.com.br> Mon, 10 Jul 2018 10:29:03 -0300
|
||||
|
||||
ruby-lxc (1.2.2-0digirati1) trusty; urgency=low
|
||||
|
||||
* Version 1.2.2.
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define SYMBOL(s) ID2SYM(rb_intern(s))
|
||||
|
||||
|
@ -40,8 +41,28 @@ extern void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
|
|||
#define RELEASING_GVL2(func, arg, killfunc, killarg) func(arg)
|
||||
#endif
|
||||
|
||||
extern int lxc_wait_for_pid_status(pid_t pid);
|
||||
extern long lxc_config_parse_arch(const char *arch);
|
||||
//extern int lxc_wait_for_pid_status(pid_t pid);
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
int lxc_wait_for_pid_status(pid_t pid)
|
||||
{
|
||||
int status, ret;
|
||||
|
||||
again:
|
||||
ret = waitpid(pid, &status, 0);
|
||||
if (ret == -1) {
|
||||
if (errno == EINTR)
|
||||
goto again;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ret != pid)
|
||||
goto again;
|
||||
|
||||
return status;
|
||||
}
|
||||
//extern long lxc_config_parse_arch(const char *arch);
|
||||
|
||||
static VALUE Container;
|
||||
static VALUE Error;
|
||||
|
@ -97,24 +118,24 @@ free_c_string_array(char **arr)
|
|||
* "personality", either +:linux32+ or +:linux+, for the 32-bit and 64-bit
|
||||
* architectures, respectively.
|
||||
*/
|
||||
static VALUE
|
||||
lxc_arch_to_personality(VALUE self, VALUE rb_arch)
|
||||
{
|
||||
int ret;
|
||||
char *arch;
|
||||
|
||||
arch = StringValuePtr(rb_arch);
|
||||
ret = lxc_config_parse_arch(arch);
|
||||
|
||||
switch (ret) {
|
||||
case PER_LINUX32:
|
||||
return SYMBOL("linux32");
|
||||
case PER_LINUX:
|
||||
return SYMBOL("linux");
|
||||
default:
|
||||
rb_raise(Error, "unknown personality");
|
||||
}
|
||||
}
|
||||
//static VALUE
|
||||
//lxc_arch_to_personality(VALUE self, VALUE rb_arch)
|
||||
//{
|
||||
// int ret;
|
||||
// char *arch;
|
||||
//
|
||||
// arch = StringValuePtr(rb_arch);
|
||||
// ret = lxc_config_parse_arch(arch);
|
||||
//
|
||||
// switch (ret) {
|
||||
// case PER_LINUX32:
|
||||
// return SYMBOL("linux32");
|
||||
// case PER_LINUX:
|
||||
// return SYMBOL("linux");
|
||||
// default:
|
||||
// rb_raise(Error, "unknown personality");
|
||||
// }
|
||||
//}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
|
@ -2126,8 +2147,8 @@ Init_lxc(void)
|
|||
{
|
||||
VALUE LXC = rb_define_module("LXC");
|
||||
|
||||
rb_define_singleton_method(LXC, "arch_to_personality",
|
||||
lxc_arch_to_personality, 1);
|
||||
//rb_define_singleton_method(LXC, "arch_to_personality",
|
||||
// lxc_arch_to_personality, 1);
|
||||
rb_define_singleton_method(LXC, "run_command", lxc_run_command, 1);
|
||||
rb_define_singleton_method(LXC, "run_shell", lxc_run_shell, 0);
|
||||
rb_define_singleton_method(LXC, "global_config_item",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module LXC
|
||||
VERSION = '1.2.2'
|
||||
VERSION = '1.2.3'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue