<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source4/scripting/bin/gen_werror.py, branch talloc-2.4.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>s4:scripting: Remove obsolete references to function prototypes</title>
<updated>2024-01-15T00:48:40+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2024-01-11T20:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5199d788f45579093a0e61dd73865f20b75c3fc2'/>
<id>5199d788f45579093a0e61dd73865f20b75c3fc2</id>
<content type='text'>
These prototypes were removed in commit
0ffe030c0dcd46b51ffb2f11c03d5b48e93d32b9.

Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These prototypes were removed in commit
0ffe030c0dcd46b51ffb2f11c03d5b48e93d32b9.

Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use python.h from libreplace</title>
<updated>2023-11-20T15:37:33+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2023-11-09T10:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9621a3d7a6949aa833425884cd22379387738cfa'/>
<id>9621a3d7a6949aa833425884cd22379387738cfa</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>s4:scripting: Remove unused imports</title>
<updated>2023-09-14T21:35:29+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-08-29T23:58:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9846da6f4be6ed3e556ad630e8689e7f5ef684c2'/>
<id>9846da6f4be6ed3e556ad630e8689e7f5ef684c2</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s4/scripting: fix a few trailing semicolons in gen_{hresult,ntstatus,werror}.py</title>
<updated>2023-05-05T04:58:30+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2023-02-23T23:54:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=8c19775a27c596024c4351b90fb063c1c1c27c14'/>
<id>8c19775a27c596024c4351b90fb063c1c1c27c14</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&gt;
Reviewed-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcli: Shrink .data segment by 43264 bytes</title>
<updated>2023-03-09T18:10:33+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2023-02-28T19:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=43b34b015979fd250171b7610db7d55f6b2ac7cf'/>
<id>43b34b015979fd250171b7610db7d55f6b2ac7cf</id>
<content type='text'>
A case statement only references const strings, pointers in an array
need to be relocated at exec() time.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A case statement only references const strings, pointers in an array
need to be relocated at exec() time.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcli: Shrink .data segment by 43264 bytes</title>
<updated>2023-03-09T18:10:33+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2023-02-28T19:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=e6a03c04a765e4d6c41b137d365a1e64f6285a8e'/>
<id>e6a03c04a765e4d6c41b137d365a1e64f6285a8e</id>
<content type='text'>
A case statement only references const strings, pointers in an array
need to be relocated at exec() time.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A case statement only references const strings, pointers in an array
need to be relocated at exec() time.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: remove 'from __future__ import unicode_literals'</title>
<updated>2021-04-28T03:43:34+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2021-04-28T01:07:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=e84924fdfe22829d8dcc733e4aa9bd3af30f0c66'/>
<id>e84924fdfe22829d8dcc733e4aa9bd3af30f0c66</id>
<content type='text'>
as well as a comment about Python 2 strings, which we don't want to be
reminded of.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as well as a comment about Python 2 strings, which we don't want to be
reminded of.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: Remove ndr_PyLong_FromUnsignedLongLong wrapper from NT_STATUS and W_ERROR table generator</title>
<updated>2019-05-06T05:46:11+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2019-05-06T03:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=154370a2e6288d9cf15dd36ecf66fcd8335cfb0b'/>
<id>154370a2e6288d9cf15dd36ecf66fcd8335cfb0b</id>
<content type='text'>
Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s4/scripting/bin: open unicode files with utf8 encoding and write unicode string</title>
<updated>2019-02-08T05:34:47+00:00</updated>
<author>
<name>Joe Guo</name>
<email>joeg@catalyst.net.nz</email>
</author>
<published>2019-01-30T02:52:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=87149445af26b8577566dfe5e311b32e3650c6e6'/>
<id>87149445af26b8577566dfe5e311b32e3650c6e6</id>
<content type='text'>
In files like `libcli/util/werror_err_table.txt` and `libcli/util/ntstatus_err_table.txt`,
there were unicode quote symbols at line 6:

    ...(“this documentation”)...

In `libcli/util/wscript_build`, it will run `gen_werror.py` and `gen_ntstatus.py`
to `open` above files, read content from them and write to other files.

When encoding not specified, `open` in both python 2/3 will guess encoding from locale.

When locale is not set, it defaults to POSIX or C, and then python will use
encoding `ANSI_X3.4-1968`.

So, on a system locale is not set, `make` will fail with encoding error
for both python 2 and 3:

    File "/home/ubuntu/samba/source4/scripting/bin/gen_werror.py", line 139, in main
        errors = parseErrorDescriptions(input_file, True, transformErrorName)
      File "/home/ubuntu/samba/source4/scripting/bin/gen_error_common.py", line 52, in parseErrorDescriptions
        for line in file_contents:
      File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 318: ordinal not in range(128)

In this case, we have to use `io.open` with `encoding='utf8'`.
However, then we got unicode strs and try to write them with other strs
into new file, which means the new file must also open with utf-8 and
all other strs have to be unicode, too.

Instead of prefix `u` to all strs, a more easier/elegant way is to enable
unicode literals for the python scripts, which we normally didn't do in samba.

Since both `gen_werror.py` and `gen_ntstatus.py` are bin scripts and no
other modules import them, it should be ok for this case.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;

Autobuild-User(master): Douglas Bagnall &lt;dbagnall@samba.org&gt;
Autobuild-Date(master): Fri Feb  8 06:34:47 CET 2019 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In files like `libcli/util/werror_err_table.txt` and `libcli/util/ntstatus_err_table.txt`,
there were unicode quote symbols at line 6:

    ...(“this documentation”)...

In `libcli/util/wscript_build`, it will run `gen_werror.py` and `gen_ntstatus.py`
to `open` above files, read content from them and write to other files.

When encoding not specified, `open` in both python 2/3 will guess encoding from locale.

When locale is not set, it defaults to POSIX or C, and then python will use
encoding `ANSI_X3.4-1968`.

So, on a system locale is not set, `make` will fail with encoding error
for both python 2 and 3:

    File "/home/ubuntu/samba/source4/scripting/bin/gen_werror.py", line 139, in main
        errors = parseErrorDescriptions(input_file, True, transformErrorName)
      File "/home/ubuntu/samba/source4/scripting/bin/gen_error_common.py", line 52, in parseErrorDescriptions
        for line in file_contents:
      File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 318: ordinal not in range(128)

In this case, we have to use `io.open` with `encoding='utf8'`.
However, then we got unicode strs and try to write them with other strs
into new file, which means the new file must also open with utf-8 and
all other strs have to be unicode, too.

Instead of prefix `u` to all strs, a more easier/elegant way is to enable
unicode literals for the python scripts, which we normally didn't do in samba.

Since both `gen_werror.py` and `gen_ntstatus.py` are bin scripts and no
other modules import them, it should be ok for this case.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;

Autobuild-User(master): Douglas Bagnall &lt;dbagnall@samba.org&gt;
Autobuild-Date(master): Fri Feb  8 06:34:47 CET 2019 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>PY3: change shebang to python3 in source4/scripting/bin dir</title>
<updated>2018-12-14T13:40:20+00:00</updated>
<author>
<name>Joe Guo</name>
<email>joeg@catalyst.net.nz</email>
</author>
<published>2018-12-10T23:23:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a19d5bd771c1727b037d28d24af0b85e49bdafb2'/>
<id>a19d5bd771c1727b037d28d24af0b85e49bdafb2</id>
<content type='text'>
Samba default python is 3 now.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Samba default python is 3 now.

Signed-off-by: Joe Guo &lt;joeg@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
