1# Releasing Picolibc
2
3Here are the current steps to perform when releasing a new version of
4picolibc:
5
6 1. Make sure the current code builds on all supported architectures:
7
8   ** native
9   ** 32-bit x86
10   ** RISC-V
11   ** ARM 32-bit
12   ** ARM 64-bit (aarch64)
13   ** Xtensa (ESP8266, ESP32)
14
15 2. Test on architectures that can do so
16
17    * native
18    * 64-bit x86
19    * 32-bit x86
20    * RISC-V, all targets (qemu)
21    * ARM 32-bit, almost all targets (qemu)
22    * ARM 64-bit
23
24 3. Use glibc test suite for RISC-V and ARM 32-bit
25
26    * Enable errno in the math functions using -Dwant-math-errno=true
27
28    * Enable long-double io for RISC-V compiles using -Dio-long-double=true
29
30    * Build and install minsize and release builds, using
31    --buildtype=release -Dbuild-type-subdir=release
32
33    * Build and run glibc test suite against all four builds
34
35 4. Test c++ builds using hello-world example on ARM
36
37 5. Verify that COPYING.picolibc includes information
38    about the current source files
39
40 6. Add release notes to README.md
41
42 7. Update meson.build and CMakeLists.txt with new version number
43
44 8. Commit release notes and meson.build
45
46	$ git commit -m'Version <version>' README.md meson.build CMakeLists.txt
47
48 9. Use native configuration to build release:
49
50	$ mkdir -p builds/build-native
51	$ cd builds/build-native
52        $ ../../scripts/do-native-configure
53	$ ninja dist
54
55 10. Use arm configuration to build bits for the Arm embedded toolkit:
56
57        $ mkdir -p builds/build-arm-tk builds/build-arm-tk-release
58        $ cd builds/build-arm-tk
59        $ PATH=$ARM_TK/bin:$PATH ../../scripts/do-arm-configure -Dsysroot-install=true
60        $ PATH=$ARM_TK/bin:$PATH DESTDIR=$PWD/../dist ninja test install
61	$ cd ../build-arm-tk-release
62	$ PATH=$ARM_TK/bin:$PATH ../../scripts/do-arm-configure -Dsysroot-install=true -Dbuild-type-subdir=release --buildtype=release
63        $ PATH=$ARM_TK/bin:$PATH DESTDIR=$PWD/../dist ninja test install
64        $ cd ../dist/$ARM_TK
65        $ zip -r ../../../picolibc-<version>-<arm-et-version>.zip .
66        $ scp picolibc-<version>-<arm-et-version>.zip keithp.com:/var/www/picolibc/dist/gnu-arm-embedded
67
68 11. Tag release
69
70	$ git tag -m'Version <version>' <version> main
71
72 12. Push tag and branch to repositories
73
74	$ git push origin main <version>
75
76 13. Upload release to web site:
77
78	$ scp build-native/meson-dist/* keithp.com:/var/www/picolibc/dist
79
80 14. Create new release on picolibc wiki pasting in relevant README.md
81     section.
82
83 15. Create new release on github site, pasting in relevant README.md
84     section. Upload release tar and arm embedded toolkit zip files.
85
86 16. Email release message to mailing list. Paste in README.md section
87     about the new release.
88
89## Debian Packages
90
91Debian packaging information is contained on the 'debian' branch in
92the main picolibc repository. It's designed to be build using 'gbp
93buildpackage', the git-based debian package building system. Here's
94how to build debian packages:
95
96 1. Release upstream picolibc first
97
98 2. Checkout debian branch
99
100	$ git checkout debian
101
102 3. Merge in main at the release tag
103
104	$ git merge <release-tag>
105
106 4. Update debian packaging to current standards
107
108 5. Update debian/copyright from COPYING.picolibc
109
110	$ cp COPYING.picolibc
111
112 6. Add new Debian change log entry
113
114	$ dch -v <release>-1 -D unstable
115
116 7. Commit debian changes to repository
117
118	$ git commit -m'debian: Version <version>-1' debian/changelog
119
120 8. Build debian packages
121
122	$ gbp buildpackage
123
124 9. Verify package results remain lintian-clean:
125
126	$ lintian --info --display-info --pedantic picolibc_<version>-1_amd64.changes
127
128 10. Tag release
129
130	$ git tag -m'debian: Version <version>-1' <version>-1 debian
131
132 11. Push tags and branches to salsa
133
134	$ git push salsa main debian <version> <version>-1
135
136 12. Sign and upload source changes:
137
138	$ debsign picolibc_<version>-1_source.changes
139	$ dput picolibc_<version>-1_source.changes
140