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