File: README.developers-howto

package info (click to toggle)
maxima 5.44.0-2
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 108,368 kB
  • sloc: lisp: 383,860; fortran: 14,665; perl: 14,369; tcl: 11,147; sh: 4,517; makefile: 2,580; ansic: 447; python: 262; xml: 59; awk: 37; sed: 17
file content (387 lines) | stat: -rw-r--r-- 12,754 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
  Maxima project Git / build system HOWTO


  1  General

      Makefile.am is the file to modify, NOT Makefile
      (Makefile is generated automatically from Makefile.am)

      "make install" catches Makefile problems
      that are not detected by "make" alone

      Adding / removing files often leads to Makefile problems

      To update your repository, execute
      git pull  # assuming origin/master points to the SF Maxima repo

      Workflow with Git:
      git pull                      # update your repo
      git checkout master           # work off master
      git checkout -b scratch-pad   # create a working branch
      <do development, tests, commits, then, once satisfied...>
      git checkout master           # put yourself on master branch
      git pull                      # update your repo, again
      git merge scratch-pad         # merge development work into master
      git push origin master        # push to SF Maxima repo

      BE SURE NOT TO PUSH YOUR SCRATCH-PAD!

  2  Renaming something in Git

      --  Create a scratch/development branch as in 1.
  
      --  git mv X Y
          This moves X to Y and preserves the history.
	  Like any other change, this needs to be committed
	  as a separate step.

  3  Adding / removing a file in maxima/src

      --  Create a scratch/development branch as in 1.
  
      --  Add new file X, then execute
          git add X; git commit -m 'Message' -- X

      --  Remove old file X
          git rm X
          Then execute "git commit" as above

      --  Add / remove file name from maxima/src/Makefile.am

      --  Add / remove file name from maxima/src/*-depends.mk

          NOTE: There are several *-depends.mk files. These are
          theoretically updated automatically but to the best
          of my knowledge it is necessary to fix them by hand.

      --  Add / remove file name in maxima/src/maxima.system

      --  Verify that
          "sh bootstrap; ./configure --enable-foolisp; make; make install"
          and "run_testsuite();" all succeed

      --  If the change affects the plotting routines: Verify that
          tests/testbench_draw_manual.wxm still holds the right
	  results.

      --  If the change affects drawdf() or plotdf(): Verify that
          tests/testbench_drawdf_manual.wxm still holds the right
	  results.
	  
      --  Merge your work onto master and push the changes as in 1.


  4  Adding / removing a file in maxima/share

      --  Copy new file / remove old file
          as you did in 3.

      --  Add / remove file name in maxima/share/Makefile.am

      --  Verify that
          "sh bootstrap; ./configure --enable-foolisp; make; make install"
          and "run_testsuite();" all succeed

      --  If the change affects the plotting routines: Verify that
          tests/testbench_draw_manual.wxm still holds the right
	  results.
	  
      --  Merge your work onto master and push the changes as in 1.


  5.1  Creating a new share package

       E.g., new package name = my_package

      -- Naming conventions:

         write_long_names_like_this, andNotLikeThisPlease,
         norlikethiseitherthanks

         spell_out_names, dnt_try_sv_typng_w_abbrvs_tnx

      -- Create a new directory my_package

      -- Put Lisp and/or Maxima files in the directory

         At least one file must be named my_package.lisp or my_package.mac
         Otherwise load(my_package) fails

      -- Create texinfo documentation file my_package.texi
         (PLEASE CREATE DOCUMENTATION, THANK YOU)

         my_package.texi goes in maxima/doc/info
         (same as other texinfo files)

         Use maxima/share/template.texi as a template for my_package.texi

      -- Create test file rtest_my_package.mac
         (PLEASE CREATE A TEST FILE, THANK YOU)

         Test file contains pairs of expressions:
         input expression, then expected result

         batch("my_package/rtest_my_package.mac", test);
         executes the test


  5.2  Adding a directory in maxima/share
  
      --  Create a scratch/development branch as in 1.

      --  Make the new directory and put the new files in it

      --  Add the all the files in your new directory and commit this change:
          git add .
	  git commit -m 'Message' -a

      --  Put the my_package files on the file list of maxima/share/Makefile.am

      --  Add my_package to SHARE-SUBDIRS-LIST in maxima/src/init-cl.lisp

      --  Move my_package.texi to maxima/doc/info

          Put my_package.texi on the list of files in
          maxima/doc/info/Makefile.am

          Put my_package on the list of topics in maxima/doc/info/include-maxima.texi.in
          See instructions in comments at top of maxima/share/template.texi

      --  Verify that
          "sh bootstrap; ./configure --enable-foolisp; make; make install"
          and "run_testsuite();" all succeed

      --  Commit and push your work as in 1.


  6  Adding / removing a file in maxima/tests

      --  Create a scratch/development branch as in 1.

      --  Copy new file / remove old file
          and execute "git add" / "git rm"

      --  Add / remove file name in maxima/tests/Makefile.am

      --  Add / remove file name in maxima/tests/testsuite.lisp

      --  Verify that
          "sh bootstrap; ./configure --enable-foolisp; make; make install"
          and "run_testsuite();" all succeed

      --  Commit and push your work as in 1.


  7  Updating the website

    See the Git repository "website", particularly "README.md" there.


  8.1  Backups of Git

    All you need is the rsync tool and some disk space.

    Issue the following command:

    rsync -av 'rsync://maxima.git.sourceforge.net/gitroot/maxima/*' .


  8.2  Backups of the ML subscribers list

    You need to be a list admin to do that. Other then that you only
    need a mail client to send mailman commands to
    maxima-request@math.utexas.edu

    The command to get the subscribers list is "who" followed by the
    list admin password. Sending an empty mail with "who XXX" in the
    subject line should be enough.

    I have the following cron.weekly script to do this automatically:

    | #! /bin/sh
    | 
    | su myuser -c "echo end | mail -s \"who password\" maxima-request@math.utexas.edu"


  8.3  Other Backups

    Backups of the following stuff would be nice too:

    - wiki

    - bug database


  9  Releases

  9.1  Release policies

    Releases are prepared (nominally) three times a year, on April 1,
    August 1, and December 1. Releases simply package whatever seems
    stable at that time.

    It is the responsibility of developers (not the release
    administrator) to copy bug fixes from the release branch to master
    or vice versa (it doesn't matter whether bug fixes are introduced
    on one branch or the other).

    I don't recommend major changes on a release branch, but there is
    really nothing to stop it. As always I'll appeal to good judgement.

    If I've forgotten some step, please add it to this document.

  9.2  Release numbering

    The first release on the 5.mm release branch is 5.mm.0, the second
    is 5.mm.1, third 5.mm.2, etc. The highest number on the branch is
    the "best" or, at least, the most committed-to version. There is no
    release candidate numbering.

    The version major number has been 5 for many years. If you feel like
    changing it to, say, 6, well, there's nothing to stop you.

  9.3  Changelog

    The changelog for 5.mm is named ChangeLog-5.mm.md (the suffix .md
    indicating that it is in so-called "markdown" format). To obtain the
    raw material for the changelog:

    $ git log branch-5.${mm-1}-base..HEAD

    Use the git-log output as the basis for ChangeLog-5.mm.md. Use your
    best judgement as to what to include; the git-log output is
    typically much, much larger than the changelog. Look at previous
    changelogs to see the markdown format and organization.

    Commit ChangeLog-5.mm.md to master. Don't forget to add it to 
    the top level "Makefile.am" so that it will be included in the
    release tarball.

  9.4  Verifying the functionality of the maxima tarball

    The autotools offer a few make targets that allow to verify the
    maxima release:

    $ make pdf
    isn't done automatically on "make all" so it is good to test if this
    make target works.
    
    $ make check
    runs the standard testsuite, the testsuite for the share packages
    and the tests for the ask_* functions for all lisps maxima is compiled
    with and returns an error if any test unexpectedly failed.

    $ make distcheck
    compiles maxima, builds a release tarball, extracts this tarball,
    compiles it and runs "make check" on it in order to find out if
    "make dist" has produced a working tarball no files are missing from.

    $ mkdir build
    $ ../configure
    $ make
    $ make distcleancheck
    tests if "make disclean" brings maxima back into the original state.
    this is very handy when building debian packages.
    
    make installcheck
    $ tests if "make install" results in a working maxima release.

    Note that with Ubuntu Cosmic/Disco in Jan 2019 still only the first
    two of these make targets run without errors.

  9.5  Git commands for releases

    Release versions live on a branch named branch-5_mm, and are tagged
    5.mm.0, 5.mm.1, 5.mm.2, etc. The Git tag must be the same as the
    version number declared to autoconf.

    $ git checkout master
    $ git tag -a branch-5_mm-base
    $ git push --tags origin master
    $ git checkout -b branch-5_mm
    $ <edit configure.ac to set version number to 5.mm.0>
    $ git add configure.ac && git commit
    $ git tag -a 5.mm.0

    <at this point, verify that you can build packages BEFORE you push>

    $ git push --tags origin branch-5_mm-base
    $ git checkout master
    $ <edit configure.ac to set version number to 5.${mm-1}post>
    $ git add configure.ac && git commit
    $ git push origin master

    Repeat 5.mm.0 stuff (edit configure.ac and tag) for 5.mm.1, 2, 3, ....

    To copy bug fixes from one branch to another:

    $ git cherry-pick -x <commit hash>

  9.6  Building a release

    $ git checkout branch-5_mm
    $ sh bootstrap
    $ ./configure
    $ make dist-gzip

    At this point you now have maxima-5.mm.nn.tar.gz.
    
    Binaries for Linux are traditionally created by RPM.

    I'll assume you know how to build stuff with RPM. Copy the tar.gz
    to <path to rpm build tree>/SOURCES/. Then:

    $ rpmbuild -ba maxima.spec

    Debian packages can be built the following way:

    - Install clisp, sbcl, gcl, ecl and debhelper.
    - checkout the branch DebianPackaging
    - Update the changelog contained in its debian directory: From there the
      e-mail address of the packager and the version number of the Debian
      package are taken. It also is important that gpg knows the private key
      for the e-mail address mentioned in the last ChangeLog entry.
    - copy the debian directory into the directory containing the contents of
      the release tarball.
    - cd into this directory and type:
      $ debuild
    - debuild will now complain that the source is missing and tell under which
      names it will accept the tarball. Rename the tarball to this name and start
      debuild again.
    - a few minutes later gpg will ask for the key's password in order to sign
      the newly built packages.

    Unfortunately just using the Debian package included in the autotools won't
    equip the Maxima package it generates with the metadata that allows to
    install the wxMaxima package shipped with Debian and Ubuntu.
    
  9.7  Uploading files

    $ sftp mysfusername,maxima@frs.sourceforge.net
    > cd /home/frs/project/m/ma/maxima
    > cd Maxima-Linux
    > mkdir 5.mm.nn-Linux
    > cd 5.mm.nn-Linux
    > lcd /path/to/rpms
    > put maxima-*5.mm.nn*.rpm
    > cd ..
    > mkdir 5.mm.nn-source
    > cd 5.mm.nn-source
    > lcd /path/to/tar.gz
    > put maxima-5.mm.nn.tar.gz
    > quit

  9.8  Announcements

    Post an announcement about every 5.mm.nn release to the Maxima
    mailing list. When it seems stable enough (i.e. no immediate plans
    to create another release) feel free to announce it in other forums,
    e.g. sage-devel.

    Since wxMaxima does do a simultaneous release with Maxima and
    windows installers containing wxMaxima and maxima are usually
    published within hours of the new Maxima release the wxMaxima
    developers beg to be informed in advance about the planned release
    date. Filing a ticket at http://wxmaxima-developers.github.com/wxmaxima/
    or sending the project maintainer an email should be sufficient
    for this task.