APPLIED: [kteam-tools][PATCH] git-build-kernel: Don't hard-code the location of the build script
Juerg Haefliger
juerg.haefliger at canonical.com
Mon Apr 30 06:42:49 UTC 2018
Applied with Kamal's update to the README.
...Juerg
On 04/20/2018 05:32 PM, Kamal Mostafa wrote:
> On Fri, Apr 20, 2018 at 09:12:50AM +0200, Juerg Haefliger wrote:
>> Ping.
>>
>> On 03/26/2018 04:40 PM, Juerg Haefliger wrote:
>>> Instead, deduce its location from the location of the post-receive hook.
>>> With this, one can use a local build script, for example for testing or
>>> special builds.
>>>
>>> Signed-off-by: Juerg Haefliger <juergh at canonical.com>
>>> ---
>>> git-build-kernel/post-receive | 5 +++--
>>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/git-build-kernel/post-receive b/git-build-kernel/post-receive
>>> index dd8451f35dd5..43671f97a82a 100755
>>> --- a/git-build-kernel/post-receive
>>> +++ b/git-build-kernel/post-receive
>>> @@ -2,8 +2,9 @@
>>> # .git/hooks/post-receive --> git-build-kernel automatic push builder
>>> # Kamal Mostafa <kamal at canonical.com>
>>>
>>> -### directory containing the git-build-kernel script
>>> -GBK_DIR=/usr3/ubuntu/kteam-tools/git-build-kernel
>>> +### directory containing the git-build-kernel script (the same directory where
>>> +### the post-receive hook is located)
>>> +GBK_DIR="$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")"
>>>
>>> option_only_build_refs_build=0
>>> option_only_build_predefined_refs=1
>>>
>>
>>
>
> Acked-by: Kamal Mostafa <kamal at canonical.com>
>
> And here's a patch to the README that could go along with the code change.
>
> diff --git a/git-build-kernel/README b/git-build-kernel/README
> index 03b8c00..875ffb9 100644
> --- a/git-build-kernel/README
> +++ b/git-build-kernel/README
> @@ -75,8 +75,9 @@ Notes:
>
> To set up your git push auto-builder
>
> -1. On the build server (tangerine or gomeisa), cd into your own ubuntu-*
> - repo .git/hooks/ directory, and symlink to my post-receive script:
> +1. On the build server, cd into your own ubuntu-* repo .git/hooks/ directory,
> + and create a symlink to the builder's post-receive script. This
> + post-receive MUST be created as a symlink (not a copy):
>
> cd .../ubuntu-something/.git/hooks/
> ln -s /usr3/ubuntu/kteam-tools/git-build-kernel/post-receive .
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180430/5cd8185c/attachment.sig>
More information about the kernel-team
mailing list