aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorPaul Eggert2017-11-02 21:01:04 -0700
committerPaul Eggert2017-11-02 21:01:04 -0700
commitc66a3944edca6150c9252e15a0ea75c96225481b (patch)
tree888bfa31967a17c174ba61d0a8547dd64658060a /admin
parent770f245cdf2cf9e74e49bb32afb77562d9b1ad6d (diff)
parent7f089aa5f6d208209b2cfef8e0d3d9530e191248 (diff)
downloademacs-c66a3944edca6150c9252e15a0ea75c96225481b.tar.gz
emacs-c66a3944edca6150c9252e15a0ea75c96225481b.zip
Merge from origin/emacs-26
7f089aa5f6 Require seq in rmc.el 53aaad1dfc Make an example code introduced in the Gnus info work (bug... 7b29db222f Enable gnus-read-ephemeral-* to run multiple times (bug#29... 015f0bb2d8 Port thread.c to OpenBSD ARM ad68bbd0da Fix another "wrong side of point" error in CC Mode. 646e56e150 Fix Bug#28959 685fd77959 Fix duplicate .o file on QNX e562356c3f Fix two js indentation problems b8cf159bbc Update documentation for windows build 46540a1c7a Fix a "wrong side of point" error in CC Mode. Fixes bug #... 57ca409111 Fix autoload of flymake from elisp-mode during bootstrap (... aee0bc8775 Fix non-native fullscreen on NS (bug#28872) d6c1a9cb8a ; Fix author email address in test/lisp/url/url-tramp-test... 761c630766 Fix Bug#28982 628b653209 Fix windows build errors e8a06a5f9a Fix compile warning for non-w32 builds 0c536a20fb Display commit in package description, if available (Bug#2... 1d83257a1d Port to QNX 19667f44ef * configure.ac: Tweak libcurses diagnostic. 3fc05cfaec Scripts to automate windows binary distribution 928a106939 Fix Edebug specs for map-let and with-maps-do 46f2ee0d4c * test/lisp/net/tramp-tests.el (tramp-test41-delay-load): ... b51009d7f0 * admin/authors.el (authors-canonical-author-name): Ignore... a015db90e3 * test/lisp/progmodes/sql-tests.el (sql-tests-postgres-lis... 529a9c09d3 Further work on Bug#28889 c6deabaf4d Improve Tramp backward compatibility 8093e82e42 Improve backward compatibility of tramp-tests.el 46cdc01daa Fix some ‘window-normalize-’ prefixed functions (Bug#28947) 6360611457 Port to OpenIndiana a012ec766c Don't fill keywords after Emacs Lisp docstring b7c4aa951c Refactor c-forward-token-2 with new function c-forward-ove... 3aee7be62e Avoid unnecessary rounding errors in timestamps 2bfa42855b Fix xdg timestamp error on 32-bit Emacs 237e96bc52 Test that advice doesn't trigger bytecomp warnings (Bug#28... d719ea6ad5 Another fix for unsafe directory error message (Bug#865) b060e091c3 Handle https url for debbugs mbox (Bug#28831) 9e4265ef91 Ignore string properties when saving eshell history (Bug#2... 0f286ca85a Fix Bug#28889
Diffstat (limited to 'admin')
-rw-r--r--admin/MAINTAINERS1
-rw-r--r--admin/authors.el7
-rw-r--r--admin/nt/dist-build/README-scripts92
-rw-r--r--admin/nt/dist-build/README-windows-binaries45
-rwxr-xr-xadmin/nt/dist-build/build-dep-zips.py223
-rwxr-xr-xadmin/nt/dist-build/build-zips.sh145
6 files changed, 510 insertions, 3 deletions
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index c13cb552a78..753a676e81a 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -62,6 +62,7 @@ Michael Albinus
62 lisp/url/url-tramp.el 62 lisp/url/url-tramp.el
63 doc/misc/tramp*.texi 63 doc/misc/tramp*.texi
64 test/lisp/net/tramp-tests.el 64 test/lisp/net/tramp-tests.el
65 test/lisp/url/url-tramp-tests.el
65 66
66 D-Bus 67 D-Bus
67 src/dbusbind.c 68 src/dbusbind.c
diff --git a/admin/authors.el b/admin/authors.el
index 71995d5764c..603ceb3fa08 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -1321,9 +1321,10 @@ it is found in `authors-fixed-case'."
1321 (setq author (replace-regexp-in-string "[ \t]+" " " author)) 1321 (setq author (replace-regexp-in-string "[ \t]+" " " author))
1322 ;; NB this ignores the first name only case. 1322 ;; NB this ignores the first name only case.
1323 (unless (string-match "[-, \t]" author) 1323 (unless (string-match "[-, \t]" author)
1324 (push (format-message "%s:%d: ignored `%s'" 1324 (or (authors-lax-changelog-p file)
1325 file (1+ (count-lines (point-min) pos)) author) 1325 (push (format-message "%s:%d: ignored `%s'"
1326 authors-ignored-names) 1326 file (1+ (count-lines (point-min) pos)) author)
1327 authors-ignored-names))
1327 (setq author "")) 1328 (setq author ""))
1328 (or (car (member author authors-fixed-case)) 1329 (or (car (member author authors-fixed-case))
1329 (capitalize author)))) 1330 (capitalize author))))
diff --git a/admin/nt/dist-build/README-scripts b/admin/nt/dist-build/README-scripts
new file mode 100644
index 00000000000..a20099e4eb6
--- /dev/null
+++ b/admin/nt/dist-build/README-scripts
@@ -0,0 +1,92 @@
1Distribution Build Scripts for Windows
2======================================
3
4The scripts are used to build the binary distribution zip files for windows.
5
6File System Organisation
7------------------------
8
9
10They are relatively strict about the file system organisation. In
11general, they should work across several more than just the version of
12Emacs they come with, as the dependencies of Emacs change relatively slowly.
13
14The file system needs to be organised like so:
15
16~/emacs-build/git
17
18Contains a checkout of the Emacs git repository, organised according
19to branches, with git worktree
20
21~/emacs-build/git/emacs-$branch
22
23A branch of the git repository containing the current release
24branch. This has to be created by hand.
25
26~/emacs-build/git/emacs-$version
27
28A branch of the git repository containing the last release. The
29build-zips.sh file will create this for you.
30
31~/emacs-build/deps
32
33A location for the dependencies. This needs to contain two zip files
34with the dependencies. build-dep-zips.py will create these files for you.
35
36~/emacs-build/deps/libXpm/i686
37~/emacs-build/deps/libXpm/x86_64
38
39Contain libXpm-noX4.dll. This file is used to load images for the
40splash screen, menu items and so on. Emacs runs without it, but looks
41horrible. The x86_64 comes from msys2, while the i686 comes from
42ezwinports because it itself has no dependencies. These have to be
43placed manually (but probably never need updating).
44
45
46~/emacs-build/build/$version/i686
47~/emacs-build/build/$version/x86_64
48
49We build Emacs out-of-source here. This directory is created by
50build-zips.sh. This directory can be freely deleted after zips have
51been created
52
53
54~/emacs-build/install/$version/i686
55~/emacs-build/install/$version/x86_64
56
57We install Emacs here. This directory is created by build-zips.sh.
58This directory can and *should* be deleted after zips have been
59created.
60
61~/emacs-upload
62
63Zips are created and moved here from where they can be, well,
64uploaded.
65
66
67
68Build Process
69-------------
70
71For each major version:
72
73The dependencies files need to be created. This can be around the time
74of the pre-tests, then used for all releases of that version, to
75ensure the maximum stability.
76
77To do this:
78
79Update msys to the latest version with `pacman -Syu`.
80
81Then run build-dep-zips.py, in this directory. Three zips will be
82created, containing the 64bit and 32bit dependencies, as well as the
83source for these.
84
85For emacs release or pre-test version:
86
87Run `build-zips.sh -g` in the release branch. This will create a worktree
88with the tag of the last version.
89
90Then run `build-zips.sh` in this worktree. Eventually, four new zip
91files will be created in ~/emacs-upload from where they can be signed
92and uploaded with `gnupload`.
diff --git a/admin/nt/dist-build/README-windows-binaries b/admin/nt/dist-build/README-windows-binaries
new file mode 100644
index 00000000000..27a5483c02b
--- /dev/null
+++ b/admin/nt/dist-build/README-windows-binaries
@@ -0,0 +1,45 @@
1Windows Binaries
2================
3
4Currently, we provide four different binary packages for Emacs, which
5are:
6
7emacs-$VERSION-x86_64.zip
8
9Contains a 64-bit build of Emacs with dependencies. Mostly, this is
10the best one to install.
11
12emacs-$VERSION-x86_64-no-deps.zip
13
14Contains a 64-bit build of Emacs without any dependencies. This may be
15useful if you wish to install where the dependencies are already
16available, or if you want the small possible Emacs.
17
18emacs-$VERSION-i686.zip
19
20Contains a 32-bit build of Emacs with dependencies. This is useful for
21running on a 32-bit machine.
22
23emacs-$VERSION-i686-no-deps.zip
24
25Contains a 32-bit build of Emacs without dependencies
26
27In addition, we provide the following files which will not be useful
28for most end-users.
29
30emacs-26-x86_64-deps.zip
31
32The dependencies. Unzipping this file on top of
33emacs-$VERSION-x86_64-no-deps.zip should result in the same install as
34emacs-$VERSION-x86_64.zip.
35
36emacs-26-i686-deps.zip
37
38The 32-bit version of the dependencies.
39
40emacs-26-deps-mingw-w64-src.zip
41
42The source for the dependencies. Source for Emacs itself is available
43in the main distribution tarball. These dependencies were produced
44from an updated msys2 at the point of the first pre-test. It is not
45intended that these will be updated after that point. \ No newline at end of file
diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py
new file mode 100755
index 00000000000..33bc4b586c9
--- /dev/null
+++ b/admin/nt/dist-build/build-dep-zips.py
@@ -0,0 +1,223 @@
1#!/usr/bin/python3
2
3## Copyright (C) 2017 Free Software Foundation, Inc.
4
5## This file is part of GNU Emacs.
6
7## GNU Emacs is free software: you can redistribute it and/or modify
8## it under the terms of the GNU General Public License as published by
9## the Free Software Foundation, either version 3 of the License, or
10## (at your option) any later version.
11
12## GNU Emacs is distributed in the hope that it will be useful,
13## but WITHOUT ANY WARRANTY; without even the implied warranty of
14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15## GNU General Public License for more details.
16
17## You should have received a copy of the GNU General Public License
18## along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
19import argparse
20import multiprocessing as mp
21import glob
22import os
23import shutil
24import re
25
26from subprocess import check_output
27
28## Constants
29EMACS_MAJOR_VERSION="26"
30
31
32## Options
33DRY_RUN=False
34
35## Packages to fiddle with
36SKIP_PKGS=["mingw-w64-gcc-libs"]
37MUNGE_PKGS ={"mingw-w64-libwinpthread-git":"mingw-w64-winpthreads-git"}
38ARCH_PKGS=["mingw-w64-mpc",
39 "mingw-w64-termcap",
40 "mingw-w64-xpm-nox"]
41SRC_REPO="https://sourceforge.net/projects/msys2/files/REPOS/MINGW/Sources"
42
43
44def check_output_maybe(*args,**kwargs):
45 if(DRY_RUN):
46 print("Calling: {}{}".format(args,kwargs))
47 else:
48 return check_output(*args,**kwargs)
49
50def extract_deps():
51
52 # This list derives from the features we want Emacs to compile with.
53 PKG_REQ='''mingw-w64-x86_64-giflib
54mingw-w64-x86_64-gnutls
55mingw-w64-x86_64-libjpeg-turbo
56mingw-w64-x86_64-libpng
57mingw-w64-x86_64-librsvg
58mingw-w64-x86_64-libtiff
59mingw-w64-x86_64-libxml2
60mingw-w64-x86_64-xpm-nox
61mingw-w64-x86_64-lcms2'''.split()
62
63 # Get a list of all dependencies needed for packages mentioned above.
64 # Run `pactree -lu' for each elment of $PKG_REQ
65 pkgs = set()
66 for x in PKG_REQ:
67 pkgs.update(
68 check_output(["pactree", "-lu", x]).decode("utf-8").split()
69 )
70
71 return sorted(pkgs)
72
73def gather_deps(deps, arch, directory):
74
75 os.mkdir(arch)
76 os.chdir(arch)
77
78 ## Replace the architecture with the correct one
79 deps = [re.sub(r"x86_64",arch,x) for x in deps]
80
81 ## find all files the transitive dependencies
82 deps_files = check_output(
83 ["pacman", "-Ql"] + deps
84 ).decode("utf-8").split("\n")
85
86 ## Produces output like
87 ## mingw-w64-x86_64-zlib /mingw64/lib/libminizip.a
88
89 ## drop the package name
90 tmp = deps_files.copy()
91 deps_files=[]
92 for d in tmp:
93 slt = d.split()
94 if(not slt==[]):
95 deps_files.append(slt[1])
96
97 ## sort uniq
98 deps_files = sorted(list(set(deps_files)))
99 ## copy all files into local
100 print("Copying dependencies: {}".format(arch))
101 check_output_maybe(["rsync", "-R"] + deps_files + ["."])
102
103 ## And package them up
104 os.chdir(directory)
105 print("Zipping: {}".format(arch))
106 check_output_maybe("zip -9r ../../emacs-26-{}-deps.zip *".format(arch),
107 shell=True)
108 os.chdir("../../")
109
110
111def download_source(tarball):
112 print("Downloading {}...".format(tarball))
113 check_output_maybe(
114 "wget -a ../download.log -O {} {}/{}/download"
115 .format(tarball, SRC_REPO, tarball),
116 shell=True
117 )
118 print("Downloading {}... done".format(tarball))
119
120def gather_source(deps):
121
122
123 ## Source for gcc-libs is part of gcc
124 ## Source for libwinpthread is in libwinpthreads
125 ## mpc, termcap, xpm -- has x86_64, and i686 versions
126
127 ## This needs to have been run first at the same time as the
128 ## system was udpated.
129 os.mkdir("emacs-src")
130 os.chdir("emacs-src")
131
132 to_download = []
133 for pkg in deps:
134 pkg_name_and_version= \
135 check_output(["pacman","-Q", pkg]).decode("utf-8").strip()
136
137 ## Produces output like:
138 ## mingw-w64-x86_64-zlib 2.43.2
139 pkg_name_components = pkg_name_and_version.split()
140 pkg_name=pkg_name_components[0]
141 pkg_version=pkg_name_components[1]
142
143 ## make a simple name to make lookup easier
144 simple_pkg_name = re.sub(r"x86_64-","",pkg_name)
145
146 if(simple_pkg_name in SKIP_PKGS):
147 continue
148
149 ## Some packages have different source files for different
150 ## architectures. For these we need two downloads.
151 if(simple_pkg_name in ARCH_PKGS):
152 downloads = [pkg_name,
153 re.sub(r"x86_64","i686",pkg_name)]
154 else:
155 downloads = [simple_pkg_name]
156
157 for d in downloads:
158 ## Switch names if necessary
159 d = MUNGE_PKGS.get(d,d)
160
161 tarball = "{}-{}.src.tar.gz".format(d,pkg_version)
162
163 to_download.append(tarball)
164
165 ## Download in parallel or it is just too slow
166 p = mp.Pool(16)
167 p.map(download_source,to_download)
168
169 print("Zipping")
170 check_output_maybe("zip -9 ../emacs-{}-deps-mingw-w64-src.zip *"
171 .format(EMACS_MAJOR_VERSION),
172 shell=True)
173
174 os.chdir("..")
175
176
177def clean():
178 print("Cleaning")
179 os.path.isdir("emacs-src") and shutil.rmtree("emacs-src")
180 os.path.isdir("i686") and shutil.rmtree("i686")
181 os.path.isdir("x86_64") and shutil.rmtree("x86_64")
182 os.path.isfile("download.log") and os.remove("download.log")
183
184
185if(os.environ["MSYSTEM"] != "MSYS"):
186 print("Run this script in an MSYS-shell!")
187 exit(1)
188
189
190parser = argparse.ArgumentParser()
191parser.add_argument("-t", help="32 bit deps only",
192 action="store_true")
193
194parser.add_argument("-f", help="64 bit deps only",
195 action="store_true")
196
197parser.add_argument("-s", help="source code only",
198 action="store_true")
199
200parser.add_argument("-c", help="clean only",
201 action="store_true")
202
203parser.add_argument("-d", help="dry run",
204 action="store_true")
205
206args = parser.parse_args()
207do_all=not (args.c or args.s or args.f or args.t)
208
209deps=extract_deps()
210
211DRY_RUN=args.d
212
213if( do_all or args.t ):
214 gather_deps(deps,"i686","mingw32")
215
216if( do_all or args.f ):
217 gather_deps(deps,"x86_64","mingw64")
218
219if( do_all or args.s ):
220 gather_source(deps)
221
222if( args.c ):
223 clean()
diff --git a/admin/nt/dist-build/build-zips.sh b/admin/nt/dist-build/build-zips.sh
new file mode 100755
index 00000000000..fb44c31c70d
--- /dev/null
+++ b/admin/nt/dist-build/build-zips.sh
@@ -0,0 +1,145 @@
1#!/bin/bash
2
3## Copyright (C) 2017 Free Software Foundation, Inc.
4
5## This file is part of GNU Emacs.
6
7## GNU Emacs is free software: you can redistribute it and/or modify
8## it under the terms of the GNU General Public License as published by
9## the Free Software Foundation, either version 3 of the License, or
10## (at your option) any later version.
11
12## GNU Emacs is distributed in the hope that it will be useful,
13## but WITHOUT ANY WARRANTY; without even the implied warranty of
14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15## GNU General Public License for more details.
16
17## You should have received a copy of the GNU General Public License
18## along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
19
20
21function git_up {
22 echo Making git worktree for Emacs $VERSION
23 cd $HOME/emacs-build/git/emacs-$MAJOR_VERSION
24 git pull
25 git worktree add ../emacs-$BRANCH emacs-$BRANCH
26
27 cd ../emacs-$BRANCH
28 ./autogen.sh
29
30}
31
32function build_zip {
33
34 ARCH=$1
35 PKG=$2
36 HOST=$3
37
38 echo Building Emacs-$VERSION for $ARCH
39 if [ $ARCH == "i686" ]
40 then
41 PATH=/mingw32/bin:$PATH
42 MSYSTEM=MINGW32
43 fi
44
45 mkdir --parents $HOME/emacs-build/build/emacs-$VERSION/$ARCH
46 cd $HOME/emacs-build/build/emacs-$VERSION/$ARCH
47
48 export PKG_CONFIG_PATH=$PKG
49 ../../../git/emacs-$BRANCH/configure \
50 --without-dbus \
51 --host=$HOST --without-compress-install \
52 CFLAGS="-O2 -static -g3"
53 make -j 8 install \
54 prefix=$HOME/emacs-build/install/emacs-$VERSION/$ARCH
55 cd $HOME/emacs-build/install/emacs-$VERSION/$ARCH
56 cp $HOME/emacs-build/deps/libXpm/$ARCH/libXpm-noX4.dll bin
57 zip -r -9 emacs-$VERSION-$ARCH-no-deps.zip *
58 mv emacs-$VERSION-$ARCH-no-deps.zip $HOME/emacs-upload
59 rm bin/libXpm-noX4.dll
60 unzip $HOME/emacs-build/deps/emacs-26-$ARCH-deps.zip
61 zip -r -9 emacs-$VERSION-$ARCH.zip *
62 mv emacs-$VERSION-$ARCH.zip ~/emacs-upload
63}
64
65
66##set -o xtrace
67set -o errexit
68
69SNAPSHOT=
70
71BUILD_32=1
72BUILD_64=1
73GIT_UP=0
74
75while getopts "36ghsV:" opt; do
76 case $opt in
77 3)
78 BUILD_32=1
79 BUILD_64=0
80 GIT_UP=0
81 ;;
82 6)
83 BUILD_32=0
84 BUILD_64=1
85 GIT_UP=0
86 ;;
87
88 g)
89 BUILD_32=0
90 BUILD_64=0
91 GIT_UP=1
92 ;;
93 V)
94 VERSION=$OPTARG
95 ;;
96 s)
97 SNAPSHOT="-snapshot"
98 ;;
99 h)
100 echo "build-zips.sh"
101 echo " -3 32 bit build only"
102 echo " -6 64 bit build only"
103 echo " -g git update and worktree only"
104 exit 0
105 ;;
106 \?)
107 echo "Invalid option: -$OPTARG" >&2
108 ;;
109 esac
110done
111
112if [ -z $VERSION ];
113then
114 echo "doing version thing"
115 VERSION=`
116 sed -n 's/^AC_INIT(GNU Emacs,[ ]*\([^ ,)]*\).*/\1/p' < ../../../configure.ac
117`
118fi
119
120if [ -z $VERSION ];
121then
122 echo Cannot determine Emacs version
123 exit 1
124fi
125
126MAJOR_VERSION="$(echo $VERSION | cut -d'.' -f1)"
127BRANCH=$VERSION
128VERSION=$VERSION$SNAPSHOT
129
130if (($GIT_UP))
131then
132 git_up
133fi
134
135if (($BUILD_64))
136then
137 build_zip x86_64 /mingw64/lib/pkgconfig x86_64-w64-mingw32
138fi
139
140## Do the 64 bit build first, because we reset some environment
141## variables during the 32 bit which will break the build.
142if (($BUILD_32))
143then
144 build_zip i686 /mingw32/lib/pkgconfig i686-w64-mingw32
145fi