Wiki source code of Adapting PBA to new Debian Release
Version 7.1 by christoph_lechleitner@iteg_at on 2021-10-01 09.49:14
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | = {{id name="AdaptingPBAtonewDebianRelease-Introduction"/}}Introduction = | ||
| 2 | |||
| 3 | About every 2 years Debian introduces a new release. | ||
| 4 | |||
| 5 | The following notes shall provide a step-by-step-plan for adapting the [[PBA Package Builder + Archiver>>doc:PBA.WebHome]] to a new Debian release and shall make it more efficient for the next Debian. | ||
| 6 | |||
| 7 | The first version of this page was created when Debian [[Buster>>url:https://wiki.debian.org/DebianBuster||shape="rect"]] was on it's way from Full Freeze to GA. | ||
| 8 | |||
| 9 | Currently we are in the progress of adapting to Debian [[Bullseye>>url:https://wiki.debian.org/DebianBullseye||shape="rect"]], and we have switched from {{code language="none"}}svn{{/code}} to {{code language="none"}}git{{/code}}. Currently this is __WORK IN PROGRESS__ rg. Bullseye. | ||
| 10 | |||
| 11 | = {{id name="AdaptingPBAtonewDebianRelease-AdaptingpbatonewDebianRelease"/}}Adapting pba to new Debian Release = | ||
| 12 | |||
| 13 | === {{id name="AdaptingPBAtonewDebianRelease-Preprations"/}}Preprations === | ||
| 14 | |||
| 15 | {{code}} | ||
| 16 | OLDDN=stretch | ||
| 17 | NEWDN=buster | ||
| 18 | |||
| 19 | # we prefix name of feature branches issue number or epic numbers | ||
| 20 | ISSUENR="e1"BRANCHNAME="${ISSUENR}_adapt_to_debian_11_${NEWDN}" ; echo "Branch name: ${BRANCHNAME}" | ||
| 21 | {{/code}} | ||
| 22 | |||
| 23 | === {{id name="AdaptingPBAtonewDebianRelease-Adaptionsforphase1,towardsGA"/}}Adaptions for phase 1, towards GA === | ||
| 24 | |||
| 25 | In phase 1 we make the new distribution known in the sense of adding a template for distributions.d/. | ||
| 26 | |||
| 27 | {{code}} | ||
| 28 | cd ~/sources/pba/git/pba | ||
| 29 | |||
| 30 | git checkout main ; git pull ; git checkout main | ||
| 31 | |||
| 32 | git branch ${BRANCHNAME} && git checkout ${BRANCHNAME} && git status | ||
| 33 | |||
| 34 | git push --set-upstream origin ${BRANCHNAME} | ||
| 35 | |||
| 36 | cat src/etc/pba/distributions.d/${OLDDN} |sed -e "s/${OLDDN}/${NEWDN}/g" >src/etc/pba/distributions.d/${NEWDN} | ||
| 37 | git add src/etc/pba/distributions.d/${NEWDN} | ||
| 38 | |||
| 39 | # evtl. drop ancient ones | ||
| 40 | git rm src/etc/pba/distributions.d/foobar | ||
| 41 | |||
| 42 | ${EDITOR:-vi} debian/changelog debian/rules debian/pba-common.install src/etc/pba/distributions.d/${NEWDN} debian/control | ||
| 43 | # src/etc/pba/builder.conf.template src/lib/build-functions.pl | ||
| 44 | |||
| 45 | # commit | ||
| 46 | git commit -m "Adding support for new Debian distro ${NEWDN}" | ||
| 47 | |||
| 48 | # release it | ||
| 49 | pba-release | ||
| 50 | {{/code}} | ||
| 51 | |||
| 52 | === {{id name="AdaptingPBAtonewDebianRelease-AdaptHelloWorldProjects"/}}Adapt HelloWorld Projects === | ||
| 53 | |||
| 54 | {{code language="none"}} | ||
| 55 | cd ~/sources/pba/trunk/pba-helloworld | ||
| 56 | |||
| 57 | git checkout main ; git pull ; git checkout main | ||
| 58 | |||
| 59 | git branch ${BRANCHNAME} && git checkout ${BRANCHNAME} && git status | ||
| 60 | |||
| 61 | git push --set-upstream origin ${BRANCHNAME} | ||
| 62 | |||
| 63 | pba-raiseversion | ||
| 64 | # decide next version | ||
| 65 | pba-raisversion -b 1.2.3 "Adding new Debian target distro ${NEWDN}" | ||
| 66 | |||
| 67 | git add debian*/control debian*/changelog | ||
| 68 | |||
| 69 | PBAO="." | ||
| 70 | # or | ||
| 71 | PBAO="arch|unix" | ||
| 72 | # or in phase 2 or when combining | ||
| 73 | PBAO="arch|unix|7" | ||
| 74 | |||
| 75 | #pba-builddeps -i -o ${PBAO} | ||
| 76 | |||
| 77 | #pba-instdeps -i -o ${PBAO} | ||
| 78 | |||
| 79 | pba-build -u -i -o ${PBAO} | ||
| 80 | |||
| 81 | # solve eventual problems | ||
| 82 | |||
| 83 | PBADD=$(ls -1d debian* |grep -v mingw |head -1) | ||
| 84 | ${EDITOR:-vi} ${PBADD}/changelog ${PBADD}/control | ||
| 85 | |||
| 86 | pba-localbuild -u -o ${PBAO} | ||
| 87 | |||
| 88 | # evtl. | ||
| 89 | #pba-localrpmbuild -u -o ${PBAO} | ||
| 90 | |||
| 91 | # wait for success | ||
| 92 | |||
| 93 | git commit -m "Adding support for new Debian distro ${NEWDN}" | ||
| 94 | git push | ||
| 95 | |||
| 96 | # optional, eventually after merge in main | ||
| 97 | pba-release -o ${PBAO} | ||
| 98 | |||
| 99 | |||
| 100 | {{/code}} | ||
| 101 | |||
| 102 | LATER (after adapting Fancylibs below) repeat for {{code language="none"}}pba-helloworld-portable{{/code}} (with {{code language="none"}}-o unix{{/code}}). | ||
| 103 | |||
| 104 | Repeat for {{code language="none"}}pba-hellolib-portable{{/code}} (with {{code language="none"}}-o unix{{/code}}). | ||
| 105 | |||
| 106 | Repeat for {{code language="none"}}pba-hellobigworld-portable{{/code}} (with {{code language="none"}}-o unix{{/code}}). | ||
| 107 | |||
| 108 | ... with (% style="letter-spacing: 0.0px;" %){{code language="none"}}-o unix{{/code}}(%%) or later (% style="letter-spacing: 0.0px;" %){{code language="none"}}-o "unix|9"{{/code}}(%%). | ||
| 109 | |||
| 110 | === {{id name="AdaptingPBAtonewDebianRelease-AdaptFANCYLIBS"/}}Adapt [[doc:FANCYLIBS.WebHome]] === | ||
| 111 | |||
| 112 | **~-~-- current point of adaption to Debian Bullseye ~-~--** | ||
| 113 | |||
| 114 | See [[Adapting FancyLibs & MinGW-Pkg from Debian 9 Stretch to 10 Buster, Mingw-7 to Mingw-8>>doc:FANCYLIBS.Adapting FancyLibs & MinGW-Pkg from Debian 9 Stretch to 10 Buster, Mingw-7 to Mingw-8.WebHome]]. | ||
| 115 | |||
| 116 | === {{id name="AdaptingPBAtonewDebianRelease-Adaptpba-helloworld-portable"/}}Adapt pba-helloworld-portable === | ||
| 117 | |||
| 118 | See above, use {{code language="none"}}-o unix{{/code}}. | ||
| 119 | |||
| 120 | === {{id name="AdaptingPBAtonewDebianRelease-CreatePBA-Buildertarballs"/}}Create PBA-Builder tarballs === | ||
| 121 | |||
| 122 | See eventual separate notes (my [[ITEG's PBA-Tarball Notes>>url:https://confluence.iteg.at/x/l4Kg||shape="rect"]] are not public, sorry). | ||
| 123 | |||
| 124 | === {{id name="AdaptingPBAtonewDebianRelease-AdaptMinGW"/}}Adapt [[MinGW>>doc:MINGW64.WebHome]] === | ||
| 125 | |||
| 126 | See [[doc:MINGW64.mingw 6 rebuild order.WebHome]]. | ||
| 127 | |||
| 128 | === {{id name="AdaptingPBAtonewDebianRelease-MinGW-Adaptpba-hello*-portable"/}}MinGW-Adapt pba-hello*-portable === | ||
| 129 | |||
| 130 | See above, with -o "unix|9" instead of "-o unix". | ||
| 131 | |||
| 132 | === {{id name="AdaptingPBAtonewDebianRelease-Adaptionsforphase2,oncenewreleaseissettled"/}}Adaptions for phase 2, once new release is settled === | ||
| 133 | |||
| 134 | Once the new Debian release is settled and all VIP libraries and current projects can be built for it, we can declare it the new default value for {{code language="none"}}DefaultDistribution{{/code}} in {{code language="none"}}pba-builder.conf{{/code}}. | ||
| 135 | |||
| 136 | {{code}} | ||
| 137 | ${EDITOR:-vi} debian/changelog src/etc/pba/builder.conf.template src/lib/build-functions.pl | ||
| 138 | |||
| 139 | # commit | ||
| 140 | git commit -m "Making new Debian distro ${NEWDN} default for DefaultDistribution in pba-builder.conf" | ||
| 141 | |||
| 142 | # release it | ||
| 143 | pba-release | ||
| 144 | {{/code}} |