Skip to content

Commit b717242

Browse files
Sync patches with upstream
1 parent 0fa959e commit b717242

File tree

6 files changed

+132
-18
lines changed

6 files changed

+132
-18
lines changed

debian/patches/clean.patch

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
diff --git a/Makefile.in b/Makefile.in
2-
index ec5988348c..d76d79e589 100644
1+
clean.patch by Sergei Golovan <sgolovan@nes.ru>
2+
3+
Erlang leaves many files after make clean. This patch contains
4+
a hack to remove them.
5+
36
--- a/Makefile.in
47
+++ b/Makefile.in
5-
@@ -931,11 +931,214 @@ clean: check_recreate_primary_bootstrap
8+
@@ -931,6 +931,7 @@
69
rm -f *~ *.bak config.log config.status prebuilt.files ibin/*
710
cd erts && ERL_TOP=$(ERL_TOP) $(MAKE) clean
811
cd lib && ERL_TOP=$(ERL_TOP) $(MAKE) clean BUILD_ALL=true
912
+ $(MAKE) additional_clean
10-
13+
1114
distclean: clean
1215
find . -type f -name SKIP -print | xargs $(RM)
13-
find . -type f -name SKIP-APPLICATIONS -print | xargs $(RM)
14-
16+
@@ -989,3 +990,204 @@
17+
$(NO_DIALYZER_APPS): $$(patsubst %,%_build,$$@)
18+
$(APPS_TEST): $$(patsubst %_test,%_build,$$@)
19+
ERL_TOP=$(ERL_TOP) TYPE=$(TYPE) $(MAKE) -C lib/$(patsubst %_test,%,$@) test
20+
+
1521
+additional_clean:
1622
+ rm -rf $(ERL_TOP)/bin
1723
+ rm -rf $(ERL_TOP)/bootstrap/bin/erl
@@ -212,8 +218,3 @@ index ec5988348c..d76d79e589 100644
212218
+ rm -rf $(ERL_TOP)/system/doc/tutorial/erl_interface.xml
213219
+ rm -rf $(ERL_TOP)/system/doc/tutorial/example.xml
214220
+ rm -rf $(ERL_TOP)/system/doc/tutorial/nif.xml
215-
+
216-
+
217-
#
218-
# Just wipe out emulator, not libraries
219-
#

debian/patches/doc.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Last-Modified: Mon, 04 Mar 2024 16:08:31 +0300
55

66
--- a/lib/snmp/doc/references/snmpc_cmd.md
77
+++ b/lib/snmp/doc/references/snmpc_cmd.md
8-
@@ -56,17 +56,17 @@
8+
@@ -57,17 +57,17 @@
99

1010
- **\--verbosity _verbosity_** - Print debug info.
1111

debian/patches/exdoc.patch

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
Author: Sergei Golovan
2+
Description: Patch fixes FTBFS when using pbuilder.
3+
4+
--- a/make/ex_doc_wrapper.in
5+
+++ b/make/ex_doc_wrapper.in
6+
@@ -35,11 +35,14 @@
7+
8+
## Running the command where we redirect stderr to fd 1 and stdout to fd 3.
9+
## We then use tee on the stderr (which is now fd 1) to print that to fd 4
10+
-OUTPUT="$( { escript@EXEEXT@ "${EX_DOC}" "${ARGS[@]}"; } 2>&1 1>&3 | tee /dev/fd/4 )"
11+
+export ERL_LIBS=/usr/lib/elixir/lib
12+
+OUTPUT="$( { "${EX_DOC}" "${ARGS[@]}"; } 2>&1 1>&3 )"
13+
14+
## Close fd 3 and 4
15+
exec 3>&- 4>&-
16+
17+
+echo "${OUTPUT}"
18+
+
19+
## If EX_DOC_WARNINGS_AS_ERRORS is not explicitly turned on
20+
## and any .app file is missing, we turn off warnings as errors
21+
if [ "${EX_DOC_WARNINGS_AS_ERRORS}" != "true" ]; then
22+
--- a/make/ex_doc.exs
23+
+++ b/make/ex_doc.exs
24+
@@ -185,6 +185,7 @@
25+
|> Enum.uniq(),
26+
extras: extras,
27+
skip_undefined_reference_warnings_on: ["notes.md"],
28+
+ skip_code_autolink_to: ["t:fun/0"],
29+
groups_for_docs:
30+
(Access.get(local_config, :groups_for_docs, []) ++ groups_for_docs) |> Enum.uniq(),
31+
deps:
32+
--- a/lib/kernel/doc/docs.exs
33+
+++ b/lib/kernel/doc/docs.exs
34+
@@ -39,7 +39,7 @@
35+
:trace
36+
]
37+
],
38+
- skip_code_autolink_to: ["t:file_descriptor/0"],
39+
+ skip_code_autolink_to: ["t:file_descriptor/0","t:fun/0"],
40+
## The order of these items determine
41+
## how they are listed in the docs
42+
extras: [
43+
--- a/lib/tools/doc/docs.exs
44+
+++ b/lib/tools/doc/docs.exs
45+
@@ -11,6 +11,7 @@
46+
"references/erlang.el.md"
47+
],
48+
skip_code_autolink_to: [
49+
+ "t:fun/0",
50+
"fprof:apply_start_stop/4",
51+
"prim_file:drv_command/4",
52+
"prim_file:drv_command/2",
53+
--- a/lib/xmerl/doc/docs.exs
54+
+++ b/lib/xmerl/doc/docs.exs
55+
@@ -1,5 +1,5 @@
56+
[
57+
- skip_code_autolink_to: ["t:xmerl_scanner/0", "t:xsd_state/0"],
58+
+ skip_code_autolink_to: ["t:xmerl_scanner/0", "t:xsd_state/0", "t:fun/0"],
59+
60+
## The order of these items determine
61+
## how they are listed in the docs
62+
--- a/lib/diameter/doc/docs.exs
63+
+++ b/lib/diameter/doc/docs.exs
64+
@@ -9,5 +9,5 @@
65+
"references/diameterc_cmd.md",
66+
"references/diameter_dict.md"
67+
],
68+
- skip_code_autolink_to: ["diameter_traffic:request/1"]
69+
+ skip_code_autolink_to: ["diameter_traffic:request/1","t:fun/0"]
70+
]
71+
--- a/erts/doc/docs.exs
72+
+++ b/erts/doc/docs.exs
73+
@@ -106,6 +106,7 @@
74+
"references/werl_cmd.md"
75+
] ++ Path.wildcard("../emulator/internal_doc/*.md"),
76+
skip_code_autolink_to: [
77+
+ "t:fun/0",
78+
"dist_util:net_ticker_spawn_options/0",
79+
"dist_util:handshake_we_started/1",
80+
"dist_util:handshake_other_started/1",

debian/patches/gnu.patch

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Author: Pino Toscano <pino@debian.org>
1515

1616
--- a/erts/configure.ac
1717
+++ b/erts/configure.ac
18-
@@ -527,7 +527,7 @@
18+
@@ -526,7 +526,7 @@
1919

2020
dnl NOTE: CPPFLAGS will be included in CFLAGS at the end
2121
case $host_os in
@@ -24,7 +24,7 @@ Author: Pino Toscano <pino@debian.org>
2424
aix*|os400*)
2525
# * _ALL_SOURCE: Required to get the winsize structure for TIOCSWINSZ.
2626
# * _LINUX_SOURCE_COMPAT: Not required, but makes some libc functions
27-
@@ -1158,7 +1158,7 @@
27+
@@ -1157,7 +1157,7 @@
2828
fi
2929

3030
case $host_os in
@@ -49,7 +49,7 @@ Author: Pino Toscano <pino@debian.org>
4949
#include <sys/sysctl.h>
5050
--- a/erts/emulator/drivers/common/inet_drv.c
5151
+++ b/erts/emulator/drivers/common/inet_drv.c
52-
@@ -5297,6 +5297,11 @@
52+
@@ -5308,6 +5308,11 @@
5353
*x = addr;
5454
return 0;
5555
}
@@ -63,7 +63,7 @@ Author: Pino Toscano <pino@debian.org>
6363

6464
--- a/erts/etc/common/erlexec.c
6565
+++ b/erts/etc/common/erlexec.c
66-
@@ -1663,7 +1663,7 @@
66+
@@ -1699,7 +1699,7 @@
6767
if (!bindir) {
6868
/* Determine bindir from absolute path to executable */
6969
char *p;
@@ -72,7 +72,7 @@ Author: Pino Toscano <pino@debian.org>
7272
strncpy(buffer, argv[0], sizeof(buffer));
7373
buffer[sizeof(buffer)-1] = '\0';
7474

75-
@@ -1677,7 +1677,7 @@
75+
@@ -1713,7 +1713,7 @@
7676
if (!rootdir) {
7777
/* Determine rootdir from absolute path to bindir */
7878
char *p;
@@ -81,7 +81,7 @@ Author: Pino Toscano <pino@debian.org>
8181
strncpy(buffer, bindir, sizeof(buffer));
8282
buffer[sizeof(buffer)-1] = '\0';
8383

84-
@@ -1911,7 +1911,7 @@
84+
@@ -1947,7 +1947,7 @@
8585
char cwd[MAX_PATH];
8686
if (_getcwd(cwd, sizeof(cwd)) == NULL) {
8787
#else
@@ -166,3 +166,32 @@ Author: Pino Toscano <pino@debian.org>
166166
| perl -pe "s@ [a-zA-Z]?$(ERL_TOP_NATIVE)/(?:bootstrap/)?lib/([^/]+)@ ../../\1@g" 2> /dev/null \
167167
| sed "s/\.$(EMULATOR)/\.$$\(EMULATOR\)/" \
168168
| sed 's@^dtls_@$$(EBIN)/dtls_@' \
169+
--- a/make/autoconf/otp.m4
170+
+++ b/make/autoconf/otp.m4
171+
@@ -1818,6 +1818,8 @@
172+
ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
173+
fi
174+
;;
175+
+ *gnu*)
176+
+ ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE" ;;
177+
*) ;;
178+
esac
179+
180+
@@ -3079,7 +3081,7 @@
181+
DED_CFLAGS=
182+
DED_OSTYPE=unix
183+
case $host_os in
184+
- linux*)
185+
+ linux*|*gnu*)
186+
DED_CFLAGS="-D_GNU_SOURCE" ;;
187+
win32)
188+
DED_CFLAGS="-D_WIN32_WINNT=0x0600 -DWINVER=0x0600"
189+
@@ -3217,7 +3219,7 @@
190+
DED_LD="$CC"
191+
DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
192+
;;
193+
- linux*)
194+
+ linux*|*gnu*)
195+
DED_LD="$CC"
196+
DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
197+
DED_LDFLAGS="-shared -Wl,-Bsymbolic"

debian/patches/javascript.patch

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Author: Sergei Golovan
2+
Description: Patch drops JavaScript libraries from the binary package.
3+
14
--- a/lib/common_test/priv/Makefile.in
25
+++ b/lib/common_test/priv/Makefile.in
36
@@ -61,7 +61,7 @@

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ gnu.patch
33
javascript.patch
44
x32.patch
55
doc.patch
6+
exdoc.patch

0 commit comments

Comments
 (0)