lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

April 2024

  • 1 participants
  • 1128 discussions
[S] Change in osmo-ttcn3-hacks[master]: SIP_Templates: tr_SIP_REGISTER(): Pass via field directly as a param
by pespin 25 Apr '24

25 Apr '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36644?usp=email ) Change subject: SIP_Templates: tr_SIP_REGISTER(): Pass via field directly as a param ...................................................................... SIP_Templates: tr_SIP_REGISTER(): Pass via field directly as a param Similar to other templates which already required it. There's no user of this template (yet). Change-Id: I9fe477370e028543b04dee35a3285ddae6bb2c59 --- M library/SIP_Templates.ttcn 1 file changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/44/36644/1 diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn index e115bb7..3492dc4 100644 --- a/library/SIP_Templates.ttcn +++ b/library/SIP_Templates.ttcn @@ -572,14 +572,14 @@ template (present) CallidString call_id := ?, template (present) SipAddr from_addr := ?, template (present) SipAddr to_addr := ?, + template (present) Via via := tr_Via_from(f_tr_HostPort_opt_defport(?)), template integer seq_nr := *, template Contact contact := *, template Expires expires := *, template charstring body := *) := { requestLine := tr_SIP_ReqLine(REGISTER_E, sip_url_host_port), msgHeader := tr_SIP_msgh_std(call_id, from_addr, to_addr, contact, - tr_Via_from(f_tr_HostPort_opt_defport(from_addr.addr.nameAddr.addrSpec.hostPort)), - "REGISTER", *, seq_nr, + via, "REGISTER", *, seq_nr, expires := expires), messageBody := body, payload := omit -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36644?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9fe477370e028543b04dee35a3285ddae6bb2c59 Gerrit-Change-Number: 36644 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in docker-playground[master]: ttcn3-asterisk: Configure new IMS ConnHdlr
by pespin 25 Apr '24

25 Apr '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/36643?usp=email ) Change subject: ttcn3-asterisk: Configure new IMS ConnHdlr ...................................................................... ttcn3-asterisk: Configure new IMS ConnHdlr Configure new component added to Asterisk_Tests to emulate an IMS Core. Depends: osmo-ttcn3-hacks.git Change-Id Ibbbadd54b7facf4ef7384499704e742f482a1252 Change-Id: I0ee6cb8955fc4f7dec3db97c768430905374f115 --- M ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg 1 file changed, 21 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/43/36643/1 diff --git a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg index a734c22..b76c727 100644 --- a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg +++ b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg @@ -6,10 +6,15 @@ [TESTPORT_PARAMETERS] *.AMI.CTRL_HOSTNAME := "172.18.11.10" -*.SIP.default_local_address := "172.18.11.103" -*.SIP.local_sip_port := "5060" -*.SIP.default_dest_address := "172.18.11.10" -*.SIP.default_dest_port := "5094" +Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_local_address := "172.18.11.103" +Asterisk_Tests_LOCAL_SIP_EMU.SIP.local_sip_port := "5060" +Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_dest_address := "172.18.11.10" +Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_dest_port := "5094" +Asterisk_Tests_IMS_SIP_EMU.SIP.default_local_address := "172.18.11.103" +Asterisk_Tests_IMS_SIP_EMU.SIP.local_sip_port := "5061" +# Disabled for Server mode: +#Asterisk_Tests_IMS_SIP_EMU.SIP.default_dest_address := "172.18.11.10" +#Asterisk_Tests_IMS_SIP_EMU.SIP.default_dest_port := "5094" [MODULE_PARAMETERS] Asterisk_Tests.mp_local_sip_host := "172.18.11.103" -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36643?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0ee6cb8955fc4f7dec3db97c768430905374f115 Gerrit-Change-Number: 36643 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: asterisk: Initial steps to emulate IMS core
by pespin 25 Apr '24

25 Apr '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36642?usp=email ) Change subject: asterisk: Initial steps to emulate IMS core ...................................................................... asterisk: Initial steps to emulate IMS core Add the initial infrastructure to manage 2 SIPmsg_PT ports, one for the local SIP UAs and one for the IMS core. Still missing: * Trigger Asterisk (through AMI) to do the initial connect + register to it * Configure ipsec after Unauthorized response from IMS core Change-Id: Ibbbadd54b7facf4ef7384499704e742f482a1252 --- M asterisk/Asterisk_Tests.default M asterisk/Asterisk_Tests.ttcn A asterisk/IMS_ConnectionHandler.ttcn 3 files changed, 145 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/36642/1 diff --git a/asterisk/Asterisk_Tests.default b/asterisk/Asterisk_Tests.default index 0996545..622a5a9 100644 --- a/asterisk/Asterisk_Tests.default +++ b/asterisk/Asterisk_Tests.default @@ -4,7 +4,8 @@ mtc.FileMask := ERROR | WARNING | PARALLEL | VERDICTOP; [TESTPORT_PARAMETERS] -*.*.DEBUG := "yes" +#*.*.DEBUG := "yes" +#*.*.debug := "enabled" *.AMI.PROMPT1 := "Asterisk Call Manager/9.0.0\n" *.AMI.PROMPT2 := "\n" #*.AMI.REGEX_PROMPT1 := "^Asterisk Call Manager.*$" @@ -16,11 +17,20 @@ *.AMI.CTRL_READMODE := "buffered" *.AMI.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" *.AMI.CTRL_CRLF := "yes" -*.SIP.local_sip_port := "5060" -*.SIP.default_local_address := "127.0.0.2" -*.SIP.default_sip_protocol := "UDP" -*.SIP.default_dest_port := "5060" -*.SIP.default_dest_address := "127.0.0.1" +# Local SIP UAs: +Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_sip_protocol := "UDP"; +Asterisk_Tests_LOCAL_SIP_EMU.SIP.local_sip_port := "5060" +Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_local_address := "127.0.0.2" +Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_dest_port := "5060" +Asterisk_Tests_LOCAL_SIP_EMU.SIP.default_dest_address := "127.0.0.1" +# IMS Core: +Asterisk_Tests_IMS_SIP_EMU.SIP.default_sip_protocol := "TCP"; +Asterisk_Tests_IMS_SIP_EMU.SIP.listen_enabled := "enabled"; +Asterisk_Tests_IMS_SIP_EMU.SIP.local_sip_port := "5060" +Asterisk_Tests_IMS_SIP_EMU.SIP.default_local_address := "127.0.0.3" +# Disabled for Server mode: +#Asterisk_Tests_IMS_SIP_EMU.SIP.default_dest_address := "127.0.0.1" +#Asterisk_Tests_IMS_SIP_EMU.SIP.default_dest_port := "5060" [MODULE_PARAMETERS] diff --git a/asterisk/Asterisk_Tests.ttcn b/asterisk/Asterisk_Tests.ttcn index caa941c..c94f97f 100644 --- a/asterisk/Asterisk_Tests.ttcn +++ b/asterisk/Asterisk_Tests.ttcn @@ -27,6 +27,7 @@ import from SIP_Templates all; import from SIP_ConnectionHandler all; +import from IMS_ConnectionHandler all; modulepar { charstring mp_local_sip_host := "127.0.0.2"; @@ -34,15 +35,24 @@ charstring mp_remote_sip_host := "127.0.0.1"; integer mp_remote_sip_port := 5060; + charstring mp_local_ims_host := "127.0.0.3"; + integer mp_local_ims_port := 5060; + /* Asterisk AMI: */ charstring mp_ami_user := "test_user"; charstring mp_ami_secret := "1234"; } type component test_CT { + /* Manages all local VoIP users Asterisk is serving: */ var SIP_Emulation_CT vc_SIP; + /* Manages the IMS server Asterisk connects to: */ + var SIP_Emulation_CT vc_IMS; + port TELNETasp_PT AMI; + port Coord_PT COORD; + port IMSCoord_PT IMS_COORD; } const charstring broadcast_sip_extension := "0500"; @@ -64,9 +74,24 @@ f_ami_action_login(AMI, mp_ami_user, mp_ami_secret); } +/* Local SIP UAs */ +private function f_init_sip_local() runs on test_CT { + var charstring id := "Asterisk_Tests_LOCAL_SIP_EMU"; + f_init_sip(vc_SIP, id); +} + +/* IMS Server connection */ +private function f_init_sip_ims() runs on test_CT { + var charstring id := "Asterisk_Tests_IMS_SIP_EMU"; + f_init_sip(vc_IMS, id); +} + function f_init() runs on test_CT { + var charstring id; + f_init_ami(); - f_init_sip(vc_SIP, "Asterisk_Test_SIP_EMU"); + f_init_sip_local(); + f_init_sip_ims(); log("end of f_init"); } diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn new file mode 100644 index 0000000..a1baeb4 --- /dev/null +++ b/asterisk/IMS_ConnectionHandler.ttcn @@ -0,0 +1,88 @@ +/* Component implementing a IMS server towards Asterisk's IMS UE + * (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * Author: Pau Espin Pedrol <pespin(a)sysmocom.de> + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +module IMS_ConnectionHandler { + +import from TCCOpenSecurity_Functions all; +import from General_Types all; +import from Osmocom_Types all; +import from Native_Functions all; +import from Misc_Helpers all; + +import from SDP_Types all; +import from SDP_Templates all; + +import from SIP_Emulation all; +import from SIPmsg_Types all; +import from SIP_Templates all; + +type port IMSCoord_PT message +{ + inout charstring; +} with { extension "internal" }; + +const charstring IMS_COORD_CMD_REGISTERED := "COORD_CMD_REGISTERED"; + +type component IMS_ConnHdlr extends SIP_ConnHdlr { + var charstring g_name; + var IMS_ConnHdlrPars g_pars; + timer g_Tguard; + var PDU_SIP_Request g_rx_sip_req; + var PDU_SIP_Response g_rx_sip_resp; + + port IMSCoord_PT COORD; +} +type record of IMS_ConnHdlr IMS_ConnHdlrList; + +type record IMS_ConnHdlrPars { + float t_guard, + charstring remote_sip_host, + uint16_t remote_sip_port, + charstring user, + charstring display_name, + charstring password, + SipUrl registrar_sip_req_uri, + SipAddr registrar_sip_record, + CallidString registrar_sip_call_id, + integer registrar_sip_seq_nr, + Via local_via, + SipUrl local_sip_url_ext, + SipAddr local_sip_record, + Contact local_contact, + IMS_CallPars cp optional +} +type record of IMS_ConnHdlrPars IMS_ConnHdlrParsList; + +type record IMS_CallParsMT { + /* Whether to wait for COORD.receive(COORD_CMD_PICKUP) before accepting the call. */ + boolean wait_coord_cmd_pickup, + /* Whether to expect CANCEL instead of ACK as answer to our OK */ + boolean exp_cancel +} + +type record IMS_CallPars { + SipAddr calling optional, + SipAddr called optional, + + SipAddr from_addr optional, + SipAddr to_addr optional, + + CallidString sip_call_id, + integer sip_seq_nr, + charstring sip_body optional, + + charstring local_rtp_addr, + uint16_t local_rtp_port, + + SDP_Message peer_sdp optional, + IMS_CallParsMT mt +} + +} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36642?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ibbbadd54b7facf4ef7384499704e742f482a1252 Gerrit-Change-Number: 36642 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SIP_Emulation: Rename component id
by pespin 25 Apr '24

25 Apr '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36641?usp=email ) Change subject: SIP_Emulation: Rename component id ...................................................................... SIP_Emulation: Rename component id Remove the dash character, since it makes it impossible to reference the component name under TESTPORT_PARAMETERS in .default/.cfg files. While at it, actually, allow the test to provide a full id instead of always appending the suffix to it. This provides more freedom on the testsuite to provide a fitting component name. Change-Id: Iecefe7d98a5842872f1efc55e013f672186ef1a8 --- M asterisk/Asterisk_Tests.ttcn M library/SIP_Emulation.ttcn M sip/SIP_Tests.ttcn 3 files changed, 19 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/36641/1 diff --git a/asterisk/Asterisk_Tests.ttcn b/asterisk/Asterisk_Tests.ttcn index b164ee5..caa941c 100644 --- a/asterisk/Asterisk_Tests.ttcn +++ b/asterisk/Asterisk_Tests.ttcn @@ -66,7 +66,7 @@ function f_init() runs on test_CT { f_init_ami(); - f_init_sip(vc_SIP, "Asterisk_Test"); + f_init_sip(vc_SIP, "Asterisk_Test_SIP_EMU"); log("end of f_init"); } diff --git a/library/SIP_Emulation.ttcn b/library/SIP_Emulation.ttcn index 1b357b7..a5ebcfb 100644 --- a/library/SIP_Emulation.ttcn +++ b/library/SIP_Emulation.ttcn @@ -226,9 +226,7 @@ SipCreateCallback create_cb }; -function f_init_sip(inout SIP_Emulation_CT ct, charstring id) { - id := id & "-SIP"; - +function f_init_sip(inout SIP_Emulation_CT ct, charstring id := "SIP_EMU") { var SipOps ops := { create_cb := refers(SIP_Emulation.ExpectedCreateCallback) }; diff --git a/sip/SIP_Tests.ttcn b/sip/SIP_Tests.ttcn index 95f09e8..5899311 100644 --- a/sip/SIP_Tests.ttcn +++ b/sip/SIP_Tests.ttcn @@ -131,7 +131,7 @@ //f_ipa_ctrl_start_client(mp_osmosip_host, mp_osmosip_port_ctrl); f_init_mncc("SIP_Test"); log("end of f_init_mncc"); - f_init_sip(vc_SIP, "SIP_Test"); + f_init_sip(vc_SIP, "SIP_Test_SIP_EMU"); log("end of f_init_sip"); map(self:SIPVTY, system:SIPVTY); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36641?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iecefe7d98a5842872f1efc55e013f672186ef1a8 Gerrit-Change-Number: 36641 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SIP_Emulation: Remove duplicated map()
by pespin 25 Apr '24

25 Apr '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36640?usp=email ) Change subject: SIP_Emulation: Remove duplicated map() ...................................................................... SIP_Emulation: Remove duplicated map() The map() is already done before the component is started, f_init_sip(). It's better doing it there because then it's up to the creator of the SIP_Emulation component to establish the name of the system port, hence allowing multiple instances which can be configured differently (eg. different bind ip+port). Change-Id: I5632c94d03a9dce0d04d94766ce72e6700b6116b --- M library/SIP_Emulation.ttcn 1 file changed, 15 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/36640/1 diff --git a/library/SIP_Emulation.ttcn b/library/SIP_Emulation.ttcn index 559b575..1b357b7 100644 --- a/library/SIP_Emulation.ttcn +++ b/library/SIP_Emulation.ttcn @@ -62,10 +62,6 @@ port SIPEM_PROC_PT CLIENT_PROC; }; -private function f_sip_init() runs on SIP_Emulation_CT { - map(self:SIP, system:SIP); -} - template RequestLine tr_ReqLine(template Method method) := { method := method, requestUri := ?, @@ -245,7 +241,6 @@ function main(SipOps ops, charstring id) runs on SIP_Emulation_CT { - f_sip_init(); f_expect_table_init(); f_call_table_init(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36640?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5632c94d03a9dce0d04d94766ce72e6700b6116b Gerrit-Change-Number: 36640 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ci[master]: OBS: move gerrit-binpkgs logic to separate script
by pespin 25 Apr '24

25 Apr '24
Attention is currently required from: fixeria, neels, osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/36639?usp=email ) Change subject: OBS: move gerrit-binpkgs logic to separate script ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36639?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I100d8dfc0c58bdafe7efb0fa4108031ce10398a5 Gerrit-Change-Number: 36639 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Apr 2024 12:24:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[XS] Change in osmo-mgw[master]: (do not merge) commit for testing CI
by osmith 25 Apr '24

25 Apr '24
osmith has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/36638?usp=email ) Change subject: (do not merge) commit for testing CI ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36638?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I4463ea2cb93b1a0b138ea19a6a9d43f674f7349d Gerrit-Change-Number: 36638 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon
1 0
0 0
[M] Change in osmo-ci[master]: OBS: move gerrit-binpkgs logic to separate script
by osmith 25 Apr '24

25 Apr '24
Attention is currently required from: fixeria, neels, osmith, pespin. Hello Jenkins Builder, fixeria, neels, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/36639?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by pespin, Verified+1 by Jenkins Builder Change subject: OBS: move gerrit-binpkgs logic to separate script ...................................................................... OBS: move gerrit-binpkgs logic to separate script As I'm preparing slides for a OsmoDevCon talk, I'm realizing that it is quite cumbersome for users to build debian packages from Osmocom git repositories (the same way gerrit does it, to reproduce errors locally). Move the logic from the gerrit-binpkgs job to a separate script that can be run from an Osmocom git repository, will figure out the repository name from there and only needs the target distribution as argument. Usage example: $ git clone https://gitea.osmocom.org/osmocom/osmo-ci $ cd libosmocore $ ../osmo-ci/scripts/obs/gerrit_binpkgs.sh debian:12 # or debian:11, debian:10, almalinux:8 Change-Id: I100d8dfc0c58bdafe7efb0fa4108031ce10398a5 --- M jobs/gerrit-binpkgs.yml M scripts/obs/README A scripts/obs/gerrit_binpkgs.sh 3 files changed, 66 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/39/36639/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36639?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I100d8dfc0c58bdafe7efb0fa4108031ce10398a5 Gerrit-Change-Number: 36639 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-ci[master]: OBS: move gerrit-binpkgs logic to separate script
by pespin 25 Apr '24

25 Apr '24
Attention is currently required from: fixeria, neels, osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/36639?usp=email ) Change subject: OBS: move gerrit-binpkgs logic to separate script ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36639?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I100d8dfc0c58bdafe7efb0fa4108031ce10398a5 Gerrit-Change-Number: 36639 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 25 Apr 2024 12:10:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ci[master]: OBS: move gerrit-binpkgs logic to separate script
by osmith 25 Apr '24

25 Apr '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/36639?usp=email ) Change subject: OBS: move gerrit-binpkgs logic to separate script ...................................................................... OBS: move gerrit-binpkgs logic to separate script As I'm preparing slides for a OsmoDevCon talk, I'm realizing that it is quite cumbersome for users to build debian packages from Osmocom git repositories (the same way gerrit does it, to reproduce errors locally). Move the logic from the gerrit-binpkgs job to a separate script that can be run from an Osmocom git repository, will figure out the repository name from there and only needs the target distribution as argument. Usage example: $ git clone https://gitea.osmocom.org/osmocom/osmo-ci $ cd libosmocore $ ../osmo-ci/scripts/obs/gerrit_binpkgs.sh debian:12 # or debian:11, debian:10, centos:8 Change-Id: I100d8dfc0c58bdafe7efb0fa4108031ce10398a5 --- M jobs/gerrit-binpkgs.yml M scripts/obs/README A scripts/obs/gerrit_binpkgs.sh 3 files changed, 66 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/39/36639/1 diff --git a/jobs/gerrit-binpkgs.yml b/jobs/gerrit-binpkgs.yml index 7cf2230..a6cf44b 100644 --- a/jobs/gerrit-binpkgs.yml +++ b/jobs/gerrit-binpkgs.yml @@ -28,7 +28,7 @@ scm: - git: - basedir: 'code-from-gerrit' + basedir: '$PROJECT_NAME' url: '$GERRIT_REPO_URL' credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d branches: @@ -60,27 +60,9 @@ osmo-ci git -C osmo-ci log --oneline - # Move code from gerrit to build_srcpkg.py's git cache - cache_dir=osmo-ci/scripts/obs/_cache - mkdir -p $cache_dir - mv code-from-gerrit "$cache_dir/$PROJECT_NAME" + cd "$PROJECT_NAME" + ../osmo-ci/scripts/obs/gerrit_binpkgs.sh "$DISTRO" - # Set a known branch name - git -C "$cache_dir/$PROJECT_NAME" checkout -B "origin/gerrit" - - # Build source package - cd osmo-ci/scripts/obs/ - ./build_srcpkg.py \ - --docker \ - --feed master \ - --git-branch gerrit \ - --git-skip-fetch \ - "$PROJECT_NAME" - - # Build binary package - ./build_binpkg.py \ - --docker "$DISTRO" \ - "$PROJECT_NAME" wrappers: - ansicolor: colormap: xterm diff --git a/scripts/obs/README b/scripts/obs/README index cf8e201..e6ca502 100644 --- a/scripts/obs/README +++ b/scripts/obs/README @@ -4,6 +4,7 @@ projects in OBS (Open Build Service) and building binary packages. Here is an overview of the scripts, run them with -h to get a more detailed description. +* gerrit_binpkgs.sh: build source + binary packages like CI for gerrit * build_srcpkg.py: build one source package for an Osmocom project * update_obs_project.py: generate source packages and upload them to OBS * build_binpkg.py: build rpm/deb packages for one Osmocom project diff --git a/scripts/obs/gerrit_binpkgs.sh b/scripts/obs/gerrit_binpkgs.sh new file mode 100755 index 0000000..5c3f3dd --- /dev/null +++ b/scripts/obs/gerrit_binpkgs.sh @@ -0,0 +1,40 @@ +#!/bin/sh -e +SCRIPTS_OBS_DIR="$(realpath "$(dirname "$0")")" + +DISTRO="$1" +if [ -z "$DISTRO" ]; then + echo "usage: gerrit-binpkgs.sh DISTRO" + echo "examples:" + echo " gerrit-binpkgs.sh debian:12" + echo " gerrit-binpkgs.sh centos8" + exit 1 +fi + +GIT_REPO_DIR="$(git rev-parse --show-toplevel 2>/dev/null || true)" +if [ -z "$GIT_REPO_DIR" ]; then + echo "ERROR: run inside a git repository of an Osmocom project" + exit 1 +fi + +CACHE_DIR="$SCRIPTS_OBS_DIR/_cache" +PROJECT_NAME="$(basename "$GIT_REPO_DIR")" + +# Copy the source dir into the cache dir. It will be mounted inside the docker +# containers for building source and binary packages (so using a symlink does +# not work). Use rsync so it is very fast. +echo ":: Copying the source to the cache dir" +mkdir -p "$CACHE_DIR" +rsync -a --delete "$GIT_REPO_DIR" "$CACHE_DIR" + +echo ":: Building the source package" +"$SCRIPTS_OBS_DIR"/build_srcpkg.py \ + --docker \ + --feed master \ + --git-skip-fetch \ + --git-skip-checkout \ + "$PROJECT_NAME" + +echo ":: Building the binary packages" +"$SCRIPTS_OBS_DIR"/build_binpkg.py \ + --docker "$DISTRO" \ + "$PROJECT_NAME" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36639?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I100d8dfc0c58bdafe7efb0fa4108031ce10398a5 Gerrit-Change-Number: 36639 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • ...
  • 113
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.