[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via aa3cc0b s3: smbd: If EA's are turned off on a share don't allow an SMB2 create containing them. from b06544d wafsamba: detect programmer errors in CHECK_BUNDLED_SYSTEM() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit aa3cc0b459124c66de0aad8ff41908e1bf261222 Author: Jeremy AllisonDate: Wed Nov 4 09:34:57 2015 -0800 s3: smbd: If EA's are turned off on a share don't allow an SMB2 create containing them. Otherwise a create that should have failed may succeed. Based on an original patch from John Mulligan and comments from Uri Simchoni BUG: https://bugzilla.samba.org/show_bug.cgi?id=11589 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Nov 4 22:14:22 CET 2015 on sn-devel-104 --- Summary of changes: source3/smbd/smb2_create.c | 6 ++ 1 file changed, 6 insertions(+) Changeset truncated at 500 lines: diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index e151e96..1b12962 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -707,6 +707,12 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, } if (exta) { + if (!lp_ea_support(SNUM(smb2req->tcon->compat))) { + tevent_req_nterror(req, + NT_STATUS_EAS_NOT_SUPPORTED); + return tevent_req_post(req, ev); + } + ea_list = read_nttrans_ea_list(mem_ctx, (const char *)exta->data.data, exta->data.length); if (!ea_list) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 77eb8e0 vfs_offline: add documentation via b3f3ffe vfs_offline: add a blackbox test via b37ecbd vfs_offline: add vfs_offline module via 89940f3 s3: rpcclient: Prevent null ptr access by returning error if no creds available via e8fab02 s3: winbind: Prevent null ptr access by returning error if no creds available from aa3cc0b s3: smbd: If EA's are turned off on a share don't allow an SMB2 create containing them. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 77eb8e0a4b83d46d854337dbf4f6ace76d557e85 Author: Uri SimchoniDate: Wed Nov 4 21:18:20 2015 +0200 vfs_offline: add documentation Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Nov 5 01:22:48 CET 2015 on sn-devel-104 commit b3f3ffe35d50886cce730b6f78ed22e1e62959a1 Author: Uri Simchoni Date: Wed Nov 4 12:06:03 2015 +0200 vfs_offline: add a blackbox test Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison commit b37ecbd06d7a625d6889a9e8eaa66c807bb2a839 Author: Uri Simchoni Date: Wed Nov 4 08:44:29 2015 +0200 vfs_offline: add vfs_offline module This module marks all file in the share as offline. It can be useful for shares mounted on top of a remote file system (either through a samba VFS module or via FUSE). Offline files change the behavior of Windows explorer, and prevent it from peeking inside folders just for the sake of drawing a nice icon of them. This greatly reduces the number of requests Windows Explorer makes, and improves user experience when dealing with remote file systems. The offline bit also has an effect on the behavior of Windows redirector. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison commit 89940f39c6d2db03b3a468942d686e762f126f9f Author: Noel Power Date: Mon Nov 2 09:59:12 2015 + s3: rpcclient: Prevent null ptr access by returning error if no creds available Prevent rpccli_netlogon_password_logon being called with 'NULL' credentials. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11569 Signed-off-by: Noel Power Reviewed-by: Jeremy Allison Reviewed-by: Stefan Metzmacher commit e8fab02773892812f563eea7098847618df76e1b Author: Noel Power Date: Thu Oct 22 12:37:17 2015 +0100 s3: winbind: Prevent null ptr access by returning error if no creds available Prevent rpccli_netlogon_network_logon/rpccli_netlogon_password_logon being called with 'NULL' credentials BUG: https://bugzilla.samba.org/show_bug.cgi?id=11569 Signed-off-by: Noel Power Reviewed-by: Jeremy Allison Reviewed-by: Stefan Metzmacher --- Summary of changes: .../{vfs_dirsort.8.xml => vfs_offline.8.xml} | 31 +++--- docs-xml/wscript_build | 1 + selftest/target/Samba3.pm | 6 +++ source3/modules/vfs_offline.c | 47 ++ source3/modules/wscript_build | 7 source3/rpcclient/cmd_netlogon.c | 5 +++ source3/script/tests/test_offline.sh | 33 +++ source3/selftest/tests.py | 1 + source3/winbindd/winbindd_pam.c| 7 +++- source3/wscript| 2 +- 10 files changed, 123 insertions(+), 17 deletions(-) copy docs-xml/manpages/{vfs_dirsort.8.xml => vfs_offline.8.xml} (53%) create mode 100644 source3/modules/vfs_offline.c create mode 100755 source3/script/tests/test_offline.sh Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/vfs_dirsort.8.xml b/docs-xml/manpages/vfs_offline.8.xml similarity index 53% copy from docs-xml/manpages/vfs_dirsort.8.xml copy to docs-xml/manpages/vfs_offline.8.xml index 7f26cf4..5a702b6 100644 --- a/docs-xml/manpages/vfs_dirsort.8.xml +++ b/docs-xml/manpages/vfs_offline.8.xml @@ -1,24 +1,24 @@ http://www.samba.org/samba/DTD/samba-doc;> - + - vfs_dirsort + vfs_offline 8 Samba System Administration tools - 4.3 + 4.4 - vfs_dirsort - Sort directory contents + vfs_offline + Mark all files as offline - vfs objects = dirsort + vfs objects = offline @@ -29,22 +29,25 @@
autobuild: intermittent test failure detected
The autobuild test system has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey/2015-11-05-0608/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey/2015-11-05-0608/samba.stderr http://git.samba.org/autobuild.flakey/2015-11-05-0608/samba.stdout The top commit at the time of the failure was: commit 77eb8e0a4b83d46d854337dbf4f6ace76d557e85 Author: Uri SimchoniDate: Wed Nov 4 21:18:20 2015 +0200 vfs_offline: add documentation Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Nov 5 01:22:48 CET 2015 on sn-devel-104
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b06544d wafsamba: detect programmer errors in CHECK_BUNDLED_SYSTEM() from c474173 tests: Add tests for net ads (join|leave) https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b06544da6f466affaa0ef6681e78673ef05b2c1e Author: Stefan MetzmacherDate: Thu Aug 27 10:47:05 2015 +0200 wafsamba: detect programmer errors in CHECK_BUNDLED_SYSTEM() All prerequisite libraries of CHECK_BUNDLED_SYSTEM[_PKG](onlyif='lib1 lib2') need to be checked before. That means conf.env['FOUND_SYSTEMLIB_lib1'] and conf.env['FOUND_SYSTEMLIB_lib2'] need to exist independed of its value (True or False). Otherwise this is a logic error. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11458 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Wed Nov 4 18:38:18 CET 2015 on sn-devel-104 --- Summary of changes: buildtools/wafsamba/samba_bundled.py | 50 ++-- 1 file changed, 25 insertions(+), 25 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py index a4f841b..bfc7ecc 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py @@ -108,16 +108,6 @@ def LIB_MUST_BE_PRIVATE(conf, libname): return ('ALL' in conf.env.PRIVATE_LIBS or libname in conf.env.PRIVATE_LIBS) -@conf -def CHECK_PREREQUISITES(conf, prereqs): -missing = [] -for syslib in TO_LIST(prereqs): -f = 'FOUND_SYSTEMLIB_%s' % syslib -if not f in conf.env: -missing.append(syslib) -return missing - - @runonce @conf def CHECK_BUNDLED_SYSTEM_PKG(conf, libname, minversion='0.0.0', @@ -142,11 +132,34 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', this first tries via pkg-config, then if that fails tries by testing for a specified function in the specified lib ''' -if conf.LIB_MUST_BE_BUNDLED(libname): -return False +# We always do a logic validation of 'onlyif' first +missing = [] +if onlyif: +for l in TO_LIST(onlyif): +f = 'FOUND_SYSTEMLIB_%s' % l +if not f in conf.env: +Logs.error('ERROR: CHECK_BUNDLED_SYSTEM(%s) - ' % (libname) + + 'missing prerequisite check for ' + + 'system library %s, onlyif=%r' % (l, onlyif)) +sys.exit(1) +if not conf.env[f]: +missing.append(l) found = 'FOUND_SYSTEMLIB_%s' % libname if found in conf.env: return conf.env[found] +if conf.LIB_MUST_BE_BUNDLED(libname): +conf.env[found] = False +return False + +# see if the library should only use a system version if another dependent +# system version is found. That prevents possible use of mixed library +# versions +if missing: +if not conf.LIB_MAY_BE_BUNDLED(libname): +Logs.error('ERROR: Use of system library %s depends on missing system library/libraries %r' % (libname, missing)) +sys.exit(1) +conf.env[found] = False +return False def check_functions_headers_code(): '''helper function for CHECK_BUNDLED_SYSTEM''' @@ -167,19 +180,6 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', return False return True - -# see if the library should only use a system version if another dependent -# system version is found. That prevents possible use of mixed library -# versions -if onlyif: -missing = conf.CHECK_PREREQUISITES(onlyif) -if missing: -if not conf.LIB_MAY_BE_BUNDLED(libname): -Logs.error('ERROR: Use of system library %s depends on missing system library/libraries %r' % (libname, missing)) -sys.exit(1) -conf.env[found] = False -return False - minversion = minimum_library_version(conf, libname, minversion) msg = 'Checking for system %s' % libname -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v4-2-test updated
The branch, v4-2-test has been updated via 6f95e55 manpage: corrected small typo error from 1998b07 ctdb: strip trailing spaces from nodes file. https://git.samba.org/?p=samba.git;a=shortlog;h=v4-2-test - Log - commit 6f95e55eb6742054f6a4d5622cfe0302cd5d2623 Author: YvanMDate: Sun Nov 1 11:53:45 2015 +0100 manpage: corrected small typo error Corrected mistakes, probably comming from a too fast "copy and paste", in the smb.conf manpage. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11584 Signed-off-by: YvanM Reviewed-by: Björn Jacke Reviewed-by: Karolin Seeger Autobuild-User(master): Karolin Seeger Autobuild-Date(master): Mon Nov 2 14:43:15 CET 2015 on sn-devel-104 (cherry picked from commit d66863b1fff862aa2ae21a06116bc2a2b2f7a6ce) Autobuild-User(v4-2-test): Karolin Seeger Autobuild-Date(v4-2-test): Wed Nov 4 12:24:20 CET 2015 on sn-devel-104 --- Summary of changes: docs-xml/smbdotconf/security/aclgroupcontrol.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/security/aclgroupcontrol.xml b/docs-xml/smbdotconf/security/aclgroupcontrol.xml index 279a57b..fbc4c7d 100644 --- a/docs-xml/smbdotconf/security/aclgroupcontrol.xml +++ b/docs-xml/smbdotconf/security/aclgroupcontrol.xml @@ -30,7 +30,7 @@ - This is parameter has been was deprecated in Samba 3.0.23, but re-activated in + This parameter was deprecated in Samba 3.0.23, but re-activated in Samba 3.0.31 and above, as it now only controls permission changes if the user is in the owning primary group. It is now no longer equivalent to the dos filemode option. -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c474173 tests: Add tests for net ads (join|leave) from 23932d3 ctdb-build: Add ctdb/ directory to include path for top-level build https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c474173a83f3200ce64379f96c1e2367061aa2ca Author: Andreas SchneiderDate: Tue Oct 20 15:54:39 2015 +0200 tests: Add tests for net ads (join|leave) Signed-off-by: Andreas Schneider Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Nov 4 15:35:57 CET 2015 on sn-devel-104 --- Summary of changes: source4/selftest/tests.py | 1 + testprogs/blackbox/test_net_ads.sh | 35 +++ 2 files changed, 36 insertions(+) create mode 100755 testprogs/blackbox/test_net_ads.sh Changeset truncated at 500 lines: diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index acacadb..1425323 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -330,6 +330,7 @@ plantestsuite("samba4.blackbox.gentest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.jo plantestsuite("samba4.blackbox.rfc2307_mapping(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(samba4srcdir, "../nsswitch/tests/test_rfc2307_mapping.sh"), '$DOMAIN', '$USERNAME', '$PASSWORD', "$SERVER", "$UID_RFC2307TEST", "$GID_RFC2307TEST", configuration]) plantestsuite("samba4.blackbox.chgdcpass", "chgdcpass", [os.path.join(bbdir, "test_chgdcpass.sh"), '$SERVER', "CHGDCPASS\$", '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", '$SELFTEST_PREFIX/chgdcpass', smbclient4]) plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass']) +plantestsuite("samba4.blackbox.net_ads(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_net_ads.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD']) plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "ad_dc_ntvfs", [valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo']) # Tests using the "Simple" NTVFS backend diff --git a/testprogs/blackbox/test_net_ads.sh b/testprogs/blackbox/test_net_ads.sh new file mode 100755 index 000..487014d --- /dev/null +++ b/testprogs/blackbox/test_net_ads.sh @@ -0,0 +1,35 @@ +if [ $# -lt 3 ]; then +cat <
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via c7c45b0 tests: Add test for ephemeral port binding in listen() via 1e2f53a swrap: Automatically bind an ephemeral port if needed from f24f91e tests: Add valgrind suppression file for dlopen() issues https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit c7c45b0f2abf2fb278c7a63a24090fad3df28fee Author: Andreas SchneiderDate: Wed Nov 4 11:22:25 2015 +0100 tests: Add test for ephemeral port binding in listen() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 1e2f53a6db5b9163ece72b0d75396b5816464460 Author: Andreas Schneider Date: Wed Nov 4 11:21:23 2015 +0100 swrap: Automatically bind an ephemeral port if needed Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: src/socket_wrapper.c| 8 tests/CMakeLists.txt| 1 + tests/test_tcp_listen.c | 115 3 files changed, 124 insertions(+) create mode 100644 tests/test_tcp_listen.c Changeset truncated at 500 lines: diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index b43c877..9ba212b 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -3154,6 +3154,14 @@ static int swrap_listen(int s, int backlog) return libc_listen(s, backlog); } + if (si->bound == 0) { + ret = swrap_auto_bind(s, si, si->family); + if (ret == -1) { + errno = EADDRINUSE; + return ret; + } + } + ret = libc_listen(s, backlog); return ret; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9679177..aecf6b8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -20,6 +20,7 @@ target_link_libraries(${TORTURE_LIBRARY} set(SWRAP_TESTS test_ioctl +test_tcp_listen test_echo_tcp_socket test_echo_tcp_connect test_echo_tcp_bind diff --git a/tests/test_tcp_listen.c b/tests/test_tcp_listen.c new file mode 100644 index 000..5641c47 --- /dev/null +++ b/tests/test_tcp_listen.c @@ -0,0 +1,115 @@ +#include +#include +#include +#include + +#include "config.h" +#include "torture.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_RPC_RPC_H +#include +#endif + +static int setup(void **state) +{ + torture_setup_socket_dir(state); + + return 0; +} + +static int teardown(void **state) +{ + torture_teardown_socket_dir(state); + + return 0; +} + +static void test_listen_unbound_ipv4(void **state) +{ + struct torture_address addr = { + .sa_socklen = sizeof(struct sockaddr_storage), + }; + int rc; + int s1; + int s2; + + (void) state; /* unused */ + + s1 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + assert_return_code(s1, errno); + + rc = listen(s1, SOMAXCONN); + assert_return_code(rc, errno); + + rc = getsockname(s1, , _socklen); + assert_return_code(rc, errno); + assert_int_equal(addr.sa_socklen, sizeof(struct sockaddr_in)); + assert_in_range(ntohs(addr.sa.in.sin_port), 1024, 65535); + + s2 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + assert_return_code(s2, errno); + + rc = connect(s2, , addr.sa_socklen); + assert_return_code(rc, errno); + + close(s1); + close(s2); +} + +#ifdef HAVE_IPV6 +static void test_listen_unbound_ipv6(void **state) +{ + struct torture_address addr = { + .sa_socklen = sizeof(struct sockaddr_storage), + }; + int rc; + int s1; + int s2; + + (void) state; /* unused */ + + s1 = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP); + assert_return_code(s1, errno); + + rc = listen(s1, SOMAXCONN); + assert_return_code(rc, errno); + + rc = getsockname(s1, , _socklen); + assert_return_code(rc, errno); + assert_int_equal(addr.sa_socklen, sizeof(struct sockaddr_in6)); + assert_in_range(ntohs(addr.sa.in6.sin6_port), 1024, 65535); + + s2 = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP); + assert_return_code(s2, errno); + + rc = connect(s2, , addr.sa_socklen); + assert_return_code(rc, errno); + + close(s1); + close(s2); +} +#endif /* HAVE_IPV6 */ + +int main(void) { + int rc; + + const struct CMUnitTest tcp_listen_tests[] = { + cmocka_unit_test(test_listen_unbound_ipv4), +#ifdef HAVE_IPV6 + cmocka_unit_test(test_listen_unbound_ipv6), +#endif /* HAVE_IPV6 */ + }; + + rc = cmocka_run_group_tests(tcp_listen_tests, setup,
[SCM] Samba Website Repository - branch master updated
The branch, master has been updated via a95eee2 History: fix text for link to 4.2.5 relnotes from 0a760eb NEWS[uid_wrapper-1.2.0]: uid_wrapper-1.2.0 has been released https://git.samba.org/?p=samba-web.git;a=shortlog;h=master - Log - commit a95eee24fecdddfd9b03320caf88c9448ad29710 Author: Michael AdamDate: Wed Nov 4 13:19:22 2015 +0100 History: fix text for link to 4.2.5 relnotes Signed-off-by: Michael Adam --- Summary of changes: history/header_history.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/history/header_history.html b/history/header_history.html index b12fc0a..927af7f 100755 --- a/history/header_history.html +++ b/history/header_history.html @@ -11,7 +11,7 @@ samba-4.3.1 samba-4.3.0 - samba-4.2.4 + samba-4.2.5 samba-4.2.4 samba-4.2.3 samba-4.2.2 -- Samba Website Repository
[SCM] Samba Shared Repository - branch v4-3-test updated
The branch, v4-3-test has been updated via c900ae8 script/release.sh: make it possible to create stable .x releases (x >= 1) via 11310de script/release.sh: make it possible to create stable .0 releases from b6530ac ctdb: open the RO tracking db with perms 0600 instead of https://git.samba.org/?p=samba.git;a=shortlog;h=v4-3-test - Log - commit c900ae8f5ad8632e0974c825f7261308f77aac3a Author: Stefan MetzmacherDate: Wed Oct 21 10:02:33 2015 +0200 script/release.sh: make it possible to create stable .x releases (x >= 1) This version was used to create samba-4.3.1. Signed-off-by: Stefan Metzmacher Reviewed-by: Karolin Seeger Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Wed Oct 21 14:27:53 CEST 2015 on sn-devel-104 (cherry picked from commit f99d0b917419756b11f0ebfecbe84b3ebab7fa0a) Autobuild-User(v4-3-test): Stefan Metzmacher Autobuild-Date(v4-3-test): Wed Nov 4 17:14:41 CET 2015 on sn-devel-104 commit 11310de39f459300733ba0d6861184e7bc8af837 Author: Stefan Metzmacher Date: Tue Sep 8 15:47:26 2015 +0200 script/release.sh: make it possible to create stable .0 releases This version was used to create samba-4.3.0. Signed-off-by: Stefan Metzmacher Reviewed-by: Karolin Seeger (cherry picked from commit 19a0a7f33ca71a39859706d726eaf70882362c93) --- Summary of changes: script/release.sh | 741 +- 1 file changed, 677 insertions(+), 64 deletions(-) Changeset truncated at 500 lines: diff --git a/script/release.sh b/script/release.sh index 9f7379e..e5d93a7 100755 --- a/script/release.sh +++ b/script/release.sh @@ -15,6 +15,7 @@ umask 0022 CONF_REPO_URL="ssh://git.samba.org/data/git/samba.git" CONF_UPLOAD_URL="samba-b...@download-master.samba.org:/home/data/ftp/pub" CONF_DOWNLOAD_URL="https://download.samba.org/pub; +CONF_HISTORY_URL="https://www.samba.org; test -d ".git" || { echo "Run this script from the top-level directory in the" @@ -25,7 +26,7 @@ test -d ".git" || { usage() { echo "Usage: release.sh " echo "" - echo "PRODUCT: ldb, talloc, tevent, tdb, samba-rc" + echo "PRODUCT: ldb, talloc, tevent, tdb, samba-rc, samba-stable" echo "COMMAND: fullrelease, create, push, upload, announce" echo "" return 0 @@ -64,7 +65,9 @@ min_args "$0" "$#" "2" product="$1" globalcmd="$2" shift 2 +oldtagname="" tagname="" +patchfile="" cmds="" next_cmd="" @@ -124,6 +127,132 @@ verify_samba_rc() { return 0 } +load_samba_stable_versions() { + check_args "${FUNCNAME}" "$#" "0" || return 1 + + test -n "${version-}" && { + return 0 + } + + local SAMBA_VERSION_MAJOR=$(grep '^SAMBA_VERSION_MAJOR=' VERSION | cut -d '=' -f2 | xargs) + local SAMBA_VERSION_MINOR=$(grep '^SAMBA_VERSION_MINOR=' VERSION | cut -d '=' -f2 | xargs) + local SAMBA_VERSION_RELEASE=$(grep '^SAMBA_VERSION_RELEASE=' VERSION | cut -d '=' -f2 | xargs) + + version="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}" + tagname="${productbase}-${version}" + + test ${SAMBA_VERSION_RELEASE} -gt 0 || { + return 0 + } + + oldversion="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.$(expr ${SAMBA_VERSION_RELEASE} - 1)" + oldtagname="${productbase}-${oldversion}" + patchfile="${productbase}-${oldversion}-${version}.diffs" + + return 0 +} + +verify_samba_stable() { + check_args "${FUNCNAME}" "$#" "0" || return 1 + + test -f VERSION || { + echo "VERSION doesn't exist" + return 1 + } + + grep -q 'SAMBA_VERSION_IS_GIT_SNAPSHOT=no' VERSION || { + echo "SAMBA_VERSION_IS_GIT_SNAPSHOT is not 'no'" + return 1 + } + + local VARS="" + VARS="${VARS} SAMBA_VERSION_REVISION" + VARS="${VARS} SAMBA_VERSION_TP_RELEASE" + VARS="${VARS} SAMBA_VERSION_ALPHA_RELEASE" + VARS="${VARS} SAMBA_VERSION_BETA_RELEASE" + VARS="${VARS} SAMBA_VERSION_PRE_RELEASE" + VARS="${VARS} SAMBA_VERSION_RC_RELEASE" + VARS="${VARS} SAMBA_VERSION_RELEASE_NICKNAME" + VARS="${VARS} SAMBA_VERSION_VENDOR_SUFFIX" + VARS="${VARS} SAMBA_VERSION_VENDOR_PATCH" + for var in ${VARS}; do + grep -q "^${var}" VERSION && { + grep -q "^${var}=$" VERSION || { + echo "${var} found in stable version" + return 1 + } + } + done + + load_samba_stable_versions