[PATCH v2 0/2] Bind select(2)
by Richard Ipsum
ref: richardipsum/select-v2
sha: cab0fc8ad8f0a2c861c8eeeb70760c0b83065d80
also had to redo the first patch since it turns the autoformat didn't work.
Richard Ipsum (2):
subprocess: convert to 3space indents
Bind select(2)
luxio.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++++-
luxio/subprocess.lua | 154 +++++++++++++++++++-------------------
luxio_constants.inc.in | 3 +
tests/test-select.lua | 79 ++++++++++++++++++++
4 files changed, 354 insertions(+), 78 deletions(-)
create mode 100644 tests/test-select.lua
--
2.1.4
5 years, 11 months
Setting up a hook for Gitano - draft
by Lars Wirzenius
As a thank you for helping me set up a hook in gitano to trigger my CI
on changes, I offer the rough draft below for inclusion in Gitano docs
or website or wiki, as you prefer. It doesn't handle global hooks, but
that can be added later.
-----------------------------------------------------------------------------
# Hooks in Gitano
Gitano supports both global hooks and hooks per repository.
## Global hooks
FIXME
## Hooks per repository
Hooks are stored in the **admin ref** for the repository. The Gitano
source code has a script for checking out that ref. See
[git-admin-clone][].
[git-admin-clone]: https://git.gitano.org.uk/gitano.git/tree/scripts/git-admin-clone
To use:
$ ~/path/to/git-admin-clone ssh://git@git.example.com/myrepo foo
Initialized empty Git repository in /foo/.git/
Fetching origin
remote: Counting objects: 19, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 19 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (19/19), done.
From ssh://git.example.com/myrepo
* [new ref] refs/gitano/admin -> origin/admin
Branch admin set up to track remote ref refs/gitano/admin.
Switched to a new branch 'admin'
$
The checkout (directory `foo`) should now contains at least two
entries: `project.conf`, and `rules`.
To create a hook for this repository, create the directory `hooks` (in
parallel to `rules`), and place a `post-commit.lua` file there:
local _, updates = ...
if updates["refs/heads/master"] then
log.state("Notifying CI system, please hold...")
local code, msg, headers, body = fetch("https://ci.example.com/projects/myrepo/pipelines/build/+trigger")
if code == "200" then
log.state("CI triggered")
else
log.warn("CI not triggered, received HTTP code " .. code)
end
end
This triggers CI on any change to the master branch, by making an HTTP
request to notify CI.
Note that **no hashbang** and execution permision are needed. Gitano
will execute it anyway.
6 years
[PATCH 0/2] Bind select(2)
by Richard Ipsum
ref: richardipsum/select
Richard Ipsum (2):
subprocess: convert to 3space indents
Bind select(2)
luxio.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++++-
luxio/subprocess.lua | 154 +++++++++++++++++++-------------------
luxio_constants.inc.in | 3 +
tests/test-select.lua | 79 ++++++++++++++++++++
4 files changed, 354 insertions(+), 78 deletions(-)
create mode 100644 tests/test-select.lua
--
2.1.4
6 years
[RFC 0/2] Bind select(2)
by Richard Ipsum
hello
started trying to bind select(2)
works but not finished
with feedback I can polish on Thursday
wubba lubba dub dub
Richard Ipsum (2):
subprocess: convert to 3space indents
Bind select(2)
luxio.c | 171 +++++++++++++++++++++++++++++++++++++++++++++++++
luxio/subprocess.lua | 154 ++++++++++++++++++++++----------------------
luxio_constants.inc.in | 3 +
tests/test-select.lua | 72 +++++++++++++++++++++
4 files changed, 323 insertions(+), 77 deletions(-)
create mode 100644 tests/test-select.lua
--
2.1.4
6 years
Gitano as system user
by Will Salmon
Hi Gitano dev
I have tried to follow the page
https://wiki.gitano.org.uk/setup/system-user/ and it seemed to work but
I couldn't log in. I realised that the user is being asked to use there
public key to log in and not there private key.
I have changed the guide to use the private key and a demo can be seen
hear: http://beta.scatterworks.co.uk/wiki/gitano-wiki/setup/system-user/
I have followed the page and it seems to work.
The source for the wiki can now be found at
git://beta.scatterworks.co.uk/personal/willsalmon/gitano-wiki the commit
to change from the current wiki to the new system-user page can be found
at 3ca5b72c5e4747ed9995c1f315414efcc2b5f363
$ git diff 6caddceec28a1bca1e33d66a56f15f06a29b59fa
3ca5b72c5e4747ed9995c1f315414efcc2b5f363
diff --git a/setup/system-user.mdwn b/setup/system-user.mdwn
index ab06e0f..672f379 100644
--- a/setup/system-user.mdwn
+++ b/setup/system-user.mdwn
@@ -42,7 +42,7 @@ Then we run gitano-admin and let it know where the
keys are. It can infer the
To use these keys invoke ssh differently:
- $ ssh -i ~/.ssh/gitano-bypass.pub git@localhost whoami
+ $ ssh -i ~/.ssh/gitano-bypass git@localhost whoami
[gitano] **** ALERT **** ALERT **** PAY CAREFUL ATTENTION ****
ALERT **** ALERT ****
[gitano] **** You are acting as the bypass user. Rules and hooks
WILL NOT APPLY ****
[gitano] **** ALERT **** ALERT **** DO NOT DO THIS NORMALLY ****
ALERT **** ALERT ****
@@ -53,7 +53,7 @@ To use these keys invoke ssh differently:
Real name: Special site-wide rule/hook bypass user
Email address: admin(a)administrator.local
SSH key: initial => user@localhost [*]
- $ ssh -i ~/.ssh/gitano-admin.pub git@localhost whoami
+ $ ssh -i ~/.ssh/gitano-admin git@localhost whoami
User name: admin
Real name: Administrator
Email address: admin(a)administrator.local
@@ -62,7 +62,7 @@ To use these keys invoke ssh differently:
Git operations can be instructed to use different keys by setting
`GIT_SSH_COMMAND`.
- $ GIT_SSH_COMMAND="ssh -i ~/.ssh/gitano-admin.pub" git clone
ssh://git@localhost/gitano-admin.git
+ $ GIT_SSH_COMMAND="ssh -i ~/.ssh/gitano-admin" git clone
ssh://git@localhost/gitano-admin.git
Cloning into 'gitano-admin'...
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (23/23), done.
@@ -72,6 +72,6 @@ Git operations can be instructed to use different keys
by setting `GIT_SSH_COMMA
This is awkward because it requires `GIT_SSH_COMMAND` to be set before
every fetch and push. This can be improved by using the `ext::` remote
helper.
- $ git clone "ext::ssh -i ~/.ssh/gitano-admin.pub git@localhost %S
gitano-admin.git" gitano-admin
+ $ git clone "ext::ssh -i ~/.ssh/gitano-admin git@localhost %S
gitano-admin.git" gitano-admin
However it's often best to modify your ssh configuration to pick the
key. Consult ssh's documentation for details.
Many Thanks
Will
6 years
Gitano-wiki
by Will Salmon
Hi Gitano dev
This Email is to test that I can email to the email list and also to ask
for help.
I have put a gitano and ikiwiki instance up and the ikiwiki has a wiki
mostly mirroring the gitano-wiki but with some of the pages I have been
working on added. It should be visible at:
http://beta.scatterworks.co.uk/wiki/gitano-wiki
Some of the pages are little more than place holders, some have examples
that I have found useful but need expanding and other are more sensible.
The page
http://beta.scatterworks.co.uk/wiki/gitano-wiki/setup/debian-simple/
seems quite reasonable and I have used it to set up a couple of servers
that seem to behave ok, and there for I have started to get it in a
tidier state, but the content on some of the others is some what more WIP.
I am very dyslexic, I don't really notice typos unless I really look for
them and a lot of styling things that really get peoples backs up don't
seem to phase me but I will have a proper blitz and get them much better
before I offer any patches.
But if people could spare a little time to look at the pages, I am
interested to know if there is any content that people think is missing
or any stylistic things that I dont know to fix when I tidy it up. The
most useful help would relate to things I have missed, a lot of gitano
is very sparsely documented and I keep finding things explained in
places I wish I had found earlier, or not realising their importance
without the context of were they are useful, so I feel sure there are
still lots of thing that I am unaware of and so am nervous to spend too
long polishing stuff if it needs redoing once I find new features that I
didn't know about.
If any one would like to edit the wiki via git and are happy to give me
a public key then I can add you on to the gitano server that updates the
wiki.
Many Thanks
Will
6 years