z/i(SSKrSSKrSSKrSSKrSSKrSSKrSrSrSr Sr Sr Sr Sr S rS rS rS rSS jrSrg)Nc[RRn[RRnU(a$[RR USU35 gUS:Xa [RR U5 gUS;a [RRU5 g[RR USU35 g)z=checkout a commit, either latest tag or master or 20YY branchzorigin/latest)masternightlyN)libargsfeed git_branchgitcheckoutcheckout_latest_tagcheckout_default_branch)projectr branchs /obs/lib/srcpkg.pycheckout_for_feedr s 88==D XX F  GF8"45   ##G, & & ''0 GD6"23c[RRU5nUS3n[RR U5(aO[R "US/US9RR5nU(d[R"US5 U$[RRU5nURSSS5nURSSS 5n[R "S S S S SU3S/USS9nURS:Xa[US35 [R "/SQUS9RSSn[R "/SQUS9RR5n[US35 [RRU5nUSUSU3$URS:wa[R"US5 URR5nURSSS5nURSSS5nUR!S5(aUSSnU$! [US35 SUSU3s$=f) z@:returns: the string from git-version-gen, e.g. '1.7.0.10-76bdb'z/git-version-gen.cwdz!empty output from git-version-gen^$r describez --abbrev=4z--tagsz--match=HEADFrcheckz: has no git tags)r z rev-parserr)r zrev-listz--countrz': getting version from debian/changelog-z: using 0.0.0 as versionz0.0.0.zcommand failed unexpectedlyz-gvN)rr get_repo_pathospathexistsrun_cmdoutputrstripexit_error_cmdget_latest_tag_patternreplace returncodeprintdebianget_last_version_from_changelog startswith) r repo_path script_pathretpatternresultcommitcountversions rget_git_versionr<s/%%g.IK/0K ww~~k""kk;,)<CCJJL   s$G H gg,,W5Gooc2q)Gooc2r*G [[    wi     FC  *+, (  &1 2  &  - WIDE Fjj@@IGYawax0 0 A 6#@A --   C ++c3 "C ++dC #C ~~c!"g J% - WI56 7E7!F8, ,s .6H))Ic[RRS:Xa<[RR U5nUR S5(aUSS$U$[ U5nUS:Xa9[RRU5nSU;aURS5Sn[RRnU(aUSU3nU$)Nrr$rUNKNOWN:r) rrr r get_latest_tagr3r<r1r2splitconflict_version)rr6rBs rget_version_for_feedrC\s xx}} gg$$W-..--s12w636 ' "C ijj88A #:))C.#Cxx00Q'() Jrcv[RRU5nSU;aURS5S$g)aThe osmo-gbproxy used to have the same package version as osmo-sgsn until 2021 where it was split into its own git repository. From then on, osmo-gbproxy has a 0.*.* package version, which is smaller than the previous 1.*.* from osmo-sgsn. We had to set the epoch to 1 for osmo-gbproxy so package managers know these 0.*.* versions are higher than the previous 1.*.* ones that are still found in e.g. debian 11. The epoch is set in debian/changelog, retrieve it from there. :returns: the epoch number if set, e.g. "1" or an empty stringr?rr)rr1r2rA)r version_epochs r get_epochrFvs9JJ>>wGM m""3'** rcl[R"/SQ[RRS5S9 g)zaDownload the subproject sources here, so the package can be built in OBS without Internet access.)meson subprojectsdownloadopen5gsrN)rr)r r%rrprepare_project_open5gsrMs%KK, GG ! !) ,rc[RRS5n[RR [R S5n[R"SSU/US9 g)Npyhsszdata/pyhss_download_deps.shshz-er)rr r%r&r'join ci_obs_dirr))r4scripts rprepare_project_pyhssrTsD%%g.I WW\\#..*G HFKKtV$)4rcp[RRS5n[R"/SQUS9 g)aThe format of the license field in pyproject.toml was changed from a "table" to a a string with an SPDX license expression. The sources have been adjusted to use the new format to appease a warning ("By 2026-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported."). However now the build fails with setuptools from Debian 12. Remove the license line from pyproject.toml, the debian packaging has its own license information in debian/copyright. pyosmocom)sed-iz/^license = /dzpyproject.tomlrN)rr r%r))r4s rprepare_project_pyosmocomrYs'%%k2IKKAyQrc[RRU5nSn[RR USU35(a%[ USU35 [R"X!S9 gg)zRun contrib/generate_build_dep.sh if it exists in the given project, to to download sources for dependencies (see e.g. osmo_dia2gsup.git).zcontrib/generate_build_dep.sh/ : running rN)rr r%r&r'r(r0r))rr4r5s rrun_generate_build_depr]s_%%g.I1K ww~~ 1[M233  K=12 K/4rc[RRU5n[US3S5nUR US35 SSS5 g!,(df  g=f)Nz/.tarball-versionw )rr r%openwrite)rr;r4fs rwrite_tarball_versionrdsH%%g.I  ,-s 3q 7)2 4 3 3s A  Ac[R"U5n[RRU5n[ USUS35 [ R "USUS35R5 g)zWrite the current git commit to commit_$commit.txt file, so it gets uploaded to OBS along with the rest of the source package. This allows figuring out if the source package is still up-to-date or not for the master feed.z: adding commit_z.txtz/commit_N)rget_output_pathr get_headr0pathlibPathtouch)r output_pathr9s rwrite_commit_txtrls` %%g.K WW  g &F WI%fXT 23 LLK=56<<>rc8[RRU5n[R"/SQUSS9nURR 5R S5nUH4nUS:XaM [USU35 [R"SSS U/US 9 M6 g) N)grepz-rz-lz;include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.incFrr`rz6: setting asciidoc style to remove draft watermark in rWrXzZ/\/build\/Makefile\.asciidoc\.inc/s/^/ ASCIIDOCSTYLE = $(BUILDDIR)\/custom-dblatex.sty\n/r)rr r%r)r*r+rAr0)rr4 doc_makefiles doc_makefiles r*set_asciidoc_style_without_draft_watermarkrqs%%g.IKK[ M "((//177=M% 2    OP\~^_ r    &rc[RRn[RRn[RRn[R R U5 [R RU5 US:a [R RX5 O [U5 [U5nU(aXT- n[U5nU(aUSU3OUn[RRU5SLn[USU35 [X5 U[R R";a[RR$(dsUS:wam[RR&=(d SU3n [R(R+X U5 U(a [RR-X U5 [R(R/X5 [0R2"[R4"U55 [R6"5 S[0R8R;U53n U [=5;a"[USU 35 [=5U "5 U[R R";a [?U5 [RR@(a8[R(RAU[RR@5 [RRB(a [R(RCU5 OUS:Xa [EU5 [R(RGU5 [R(RIU5 U(a?[RRKXU5 [RRMU5 US :Xa [OU5 [R6"5 U$) Nrr?z: building source package zosmocom-keyringzosmocom-prepare_project_r\rr)(rrrBr version_appendr clonecleancheckout_from_reviewrrCrFrpm_specget_spec_in_pathr0rdconfigprojects_osmocomno_metaconflict_pkgnamer1control_add_depend add_dependchangelog_add_entry_if_neededr&makedirsrfremove_cache_extra_filesr'basenameglobalsr]configure_appenddisable_manualsrqbuild_source_packagemove_files_to_outputgeneratecopy_to_outputrl) r gerrit_idrBr rtr;epochrE has_rpm_specmetapkgproject_specific_funcs rbuildrsxx00 88==DXX,,NGGMM'GGMM'1} $$W8'""7+G! g E,1ugQwi(wM<<009EL WI/  ?@'1#**---chh6F6F7VgKg((++@$/@ %%g8HI  LL # #G6F GJJ,,WDKK##G,-  ".rww/?/?/H.IJ )  $9#:;< '(*#**---w' xx   ##GSXX-F-FG xx ""7+  27;JJ##G,JJ##G, g6 ##G, x!  " rc`[R"[R"U5S35n[U5S:Xd SU35e[ USS5nUR 5H+nUR S5(dMSU;dM# SSS5 g SSS5 g !,(df  g =f) zcCheck if an already built source package has osmo-gsm-manuals-dev in Build-Depends of the .dsc filez/*.dscrzfailed to get dsc path for rrzBuild-Depends:zosmo-gsm-manuals-devNTF)globrrflenra readlinesr3)rpath_dschandlelines rrequires_osmo_gsm_manuals_devrsyyC//89@AH x=A F!rs]  4?D4"5 R0  ? 0=@ r