summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LICENSE201
-rw-r--r--README.md5
-rw-r--r--build-setup-s390x.patch32
-rw-r--r--build-setup.patch22
-rw-r--r--change-lldb-location.patch20
-rw-r--r--clangloc.patch11
-rw-r--r--compiler-rt-fuzzer.patch4
-rwxr-xr-xcreate-n-build.sh54
-rw-r--r--glibcpthread.patch11
-rw-r--r--ibm-identifier.patch11
-rw-r--r--indexstore.patch11
-rwxr-xr-xjustbuild-mock.sh21
-rwxr-xr-xjustbuild-s390.sh23
-rwxr-xr-xjustbuild.sh24
-rwxr-xr-xjustbuild.sh~24
-rw-r--r--last-release.txt1
-rw-r--r--linux-tests-python-3-2.patch48
-rw-r--r--llvm.patch11
-rw-r--r--no-inplace-copy.patch15
-rw-r--r--no-ninja-build.patch15
-rwxr-xr-xnrc.py116
-rw-r--r--python3-2.patch410
-rw-r--r--swift-lang-runtime.conf1
-rw-r--r--swift-lang.conf1
-rw-r--r--swift-lang.spec541
-rw-r--r--swift-unwrapped.patch20
-rw-r--r--swift.patch23
27 files changed, 1398 insertions, 278 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..59e4c07
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+# swift-lang-packaging-fedora
+All the files necessary to package Apple's Swift Programming language for Fedora
+
+# Warning!
+This is very much a working directory; some of the patches are unfinished or temporary. The file to "trust" is `swift-lang.spec`.
diff --git a/build-setup-s390x.patch b/build-setup-s390x.patch
new file mode 100644
index 0000000..83a723b
--- /dev/null
+++ b/build-setup-s390x.patch
@@ -0,0 +1,32 @@
+--- swift/utils/build-presets.ini.orig 2020-04-11 22:32:29.178121900 +0000
++++ swift/utils/build-presets.ini 2020-04-11 22:33:41.148121900 +0000
+@@ -736,18 +736,15 @@
+ llbuild
+ swiftpm
+ xctest
+-libicu
+ libcxx
+
+ dash-dash
+
+-build-ninja
+ install-swift
+ install-lldb
+ install-llbuild
+ install-swiftpm
+ install-xctest
+-install-libicu
+ install-prefix=/usr
+ install-libcxx
+ install-sourcekit-lsp
+@@ -758,10 +755,8 @@
+ # Executes the lit tests for the installable package that is created
+ # Assumes the swift-integration-tests repo is checked out
+
+-test-installable-package
+
+ # Build the benchmarks against the toolchain.
+-toolchain-benchmarks
+
+ # Path to the root of the installation filesystem.
+ install-destdir=%(install_destdir)s
diff --git a/build-setup.patch b/build-setup.patch
new file mode 100644
index 0000000..0308c3f
--- /dev/null
+++ b/build-setup.patch
@@ -0,0 +1,22 @@
+--- swift/utils/build-presets.ini.orig 2020-01-30 19:54:07.528043218 -0600
++++ swift/utils/build-presets.ini 2020-01-30 19:55:11.580461138 -0600
+@@ -741,7 +741,6 @@
+
+ dash-dash
+
+-build-ninja
+ install-swift
+ install-lldb
+ install-llbuild
+@@ -755,11 +754,6 @@
+ build-swift-static-sdk-overlay
+ build-swift-stdlib-unittest-extra
+
+-# Executes the lit tests for the installable package that is created
+-# Assumes the swift-integration-tests repo is checked out
+-
+-test-installable-package
+-
+ # Build the benchmarks against the toolchain.
+ toolchain-benchmarks
+
diff --git a/change-lldb-location.patch b/change-lldb-location.patch
deleted file mode 100644
index 3d324e7..0000000
--- a/change-lldb-location.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- swift/lib/Driver/ToolChains.cpp.orig 2018-11-16 09:22:38.058780122 -0600
-+++ swift/lib/Driver/ToolChains.cpp 2018-11-16 09:31:08.699326699 -0600
-@@ -881,7 +881,7 @@
- useLLDB = true;
- break;
- case REPLJobAction::Mode::PreferLLDB:
-- useLLDB = !findProgramRelativeToSwift("lldb").empty();
-+ useLLDB = true;
- break;
- }
-
-@@ -909,7 +909,7 @@
- ArgStringList Arguments;
- Arguments.push_back(context.Args.MakeArgString(std::move(SingleArg)));
-
-- return {"lldb", Arguments};
-+ return {"/usr/libexec/swift-lldb/lldb", Arguments};
- }
-
- ToolChain::InvocationInfo
diff --git a/clangloc.patch b/clangloc.patch
deleted file mode 100644
index 5892519..0000000
--- a/clangloc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp.orig 2019-02-08 20:24:10.121192411 -0600
-+++ lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp 2019-02-08 22:20:36.347687737 -0600
-@@ -34,7 +34,7 @@
- #else
- static bool DefaultComputeClangDirectory(FileSpec &file_spec) {
- return HostInfoPosix::ComputePathRelativeToLibrary(
-- file_spec, "/lib/lldb/clang/");
-+ file_spec, "/swift/clang/");
- return HostInfoPosix::ComputePathRelativeToLibrary(
- file_spec, (llvm::Twine("/lib") + CLANG_LIBDIR_SUFFIX + "/clang/" +
- CLANG_VERSION_STRING)
diff --git a/compiler-rt-fuzzer.patch b/compiler-rt-fuzzer.patch
index b0e779a..19575b7 100644
--- a/compiler-rt-fuzzer.patch
+++ b/compiler-rt-fuzzer.patch
@@ -1,5 +1,5 @@
---- compiler-rt/lib/fuzzer/FuzzerDriver.cpp.orig 2019-02-13 14:24:24.239239031 -0600
-+++ compiler-rt/lib/fuzzer/FuzzerDriver.cpp 2019-02-13 14:28:18.525530281 -0600
+--- llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp.orig 2019-02-13 14:24:24.239239031 -0600
++++ llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp 2019-02-13 14:28:18.525530281 -0600
@@ -248,13 +248,16 @@
Command Cmd(Args);
Cmd.removeFlag("jobs");
diff --git a/create-n-build.sh b/create-n-build.sh
new file mode 100755
index 0000000..61184cd
--- /dev/null
+++ b/create-n-build.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+THISDIR=/home/rolson/swift-lang-packaging-fedora
+
+pushd $THISDIR
+
+# Gives us the version number of this platform
+THISVERSION=`cat /etc/os-release | grep PLATFORM_ID | awk -F: '/platform:*/{print $2}' | cut -c 2- | rev | cut -c 2- | rev`
+echo Building on $THISVERSION of Fedora
+
+# First we want to capture the hash of the swift-lang.spec
+# file...
+bh=`md5sum ./swift-lang.spec`
+
+# Now run the python program to check for updates
+# and modify the swift-lang.spec file accordingly
+./nrc.py
+
+# Now hash the file again
+ah=`md5sum ./swift-lang.spec`
+
+# And now only bother doing the rest of the script
+# if the hash was changed, otherwise exit
+if [ "$bh" = "$ah" ]; then
+ exit 0
+fi
+
+# Okay, we're gonna do this...
+
+rm -rf /home/rolson/rpmbuild
+rm $THISDIR/cnb-build-output.txt
+mkdir -p /home/rolson/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+cp $THISDIR/*.patch /home/rolson/rpmbuild/SOURCES
+cp $THISDIR/*.conf /home/rolson/rpmbuild/SOURCES
+cp $THISDIR/swift-lang.spec /home/rolson/rpmbuild/SPECS
+
+pushd /home/rolson/rpmbuild/SPECS
+spectool -g -R ./swift-lang.spec
+# Get the dependencies
+dnf builddep -y ./swift-lang.spec
+# Now do the actual build
+rpmbuild -ba ./swift-lang.spec 2>&1 | tee $THISDIR/cnb-build-output.txt
+popd
+
+# And commit it to the nightly-builds branch
+#git checkout nightly-builds
+git commit -am "Updated to `awk '/%global swifttag *./{print $3}' ./swift-lang.spec`"
+git push
+
+# Now move it to fedorapeople
+ssh fedorapeople.org "rm ~/public_html/swift-lang/*$THISVERSION*.rpm"
+scp /home/rolson/rpmbuild/SRPMS/* fedorapeople.org:~/public_html/swift-lang
+scp /home/rolson/rpmbuild/RPMS/x86_64/* fedorapeople.org:~/public_html/swift-lang
+scp /home/rolson/rpmbuild/SPECS/* fedorapeople.org:~/public_html/swift-lang
diff --git a/glibcpthread.patch b/glibcpthread.patch
new file mode 100644
index 0000000..24ce515
--- /dev/null
+++ b/glibcpthread.patch
@@ -0,0 +1,11 @@
+--- llvm-project/compiler-rt/lib/builtins/CMakeLists.txt.orig 2019-12-11 15:39:19.537518740 -0600
++++ llvm-project/compiler-rt/lib/builtins/CMakeLists.txt 2019-12-11 23:23:57.583292289 -0600
+@@ -537,7 +537,7 @@
+ add_subdirectory(macho_embedded)
+ darwin_add_builtin_libraries(${BUILTIN_SUPPORTED_OS})
+ else ()
+- set(BUILTIN_CFLAGS "")
++ set(BUILTIN_CFLAGS "-D_DEFAULT_SOURCE")
+
+ append_list_if(COMPILER_RT_HAS_STD_C11_FLAG -std=c11 BUILTIN_CFLAGS)
+
diff --git a/ibm-identifier.patch b/ibm-identifier.patch
new file mode 100644
index 0000000..8ed81c3
--- /dev/null
+++ b/ibm-identifier.patch
@@ -0,0 +1,11 @@
+--- swiftpm/Sources/Build/Triple.swift.orig 2020-04-11 19:16:00.451437120 +0000
++++ swiftpm/Sources/Build/Triple.swift 2020-04-11 19:17:33.091437120 +0000
+@@ -135,7 +135,7 @@
+ public static let x86_64Linux = try! Triple("x86_64-unknown-linux-gnu")
+ public static let i686Linux = try! Triple("i686-unknown-linux")
+ public static let ppc64leLinux = try! Triple("powerpc64le-unknown-linux")
+- public static let s390xLinux = try! Triple("s390x-unknown-linux")
++ public static let s390xLinux = try! Triple("s390x-ibm-linux")
+ public static let arm64Linux = try! Triple("aarch64-unknown-linux-gnu")
+ public static let armLinux = try! Triple("armv7-unknown-linux-gnueabihf")
+ public static let armAndroid = try! Triple("armv7a-unknown-linux-androideabi")
diff --git a/indexstore.patch b/indexstore.patch
new file mode 100644
index 0000000..d3c43ab
--- /dev/null
+++ b/indexstore.patch
@@ -0,0 +1,11 @@
+diff -Naur ./indexstore-db-orig/include/IndexStoreDB/Database/IDCode.h indexstore-db/include/IndexStoreDB/Database/IDCode.h
+--- ./indexstore-db-orig/include/IndexStoreDB/Database/IDCode.h 2019-08-19 13:15:44.000000000 -0500
++++ indexstore-db/include/IndexStoreDB/Database/IDCode.h 2020-01-23 16:20:05.055701686 -0600
+@@ -14,6 +14,7 @@
+ #define INDEXSTOREDB_SKDATABASE_IDCODE_H
+
+ #include <functional>
++#include <cstdint>
+
+ namespace IndexStoreDB {
+ namespace db {
diff --git a/justbuild-mock.sh b/justbuild-mock.sh
new file mode 100755
index 0000000..dfd828d
--- /dev/null
+++ b/justbuild-mock.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+MYDIR=$PWD
+
+START_TS=`date`
+
+rm -rf $HOME/rpmbuild
+rm -rf $MYDIR/mock-results
+mkdir $MYDIR/mock-results
+mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+cp $PWD/*.patch $HOME/rpmbuild/SOURCES
+cp $PWD/swift-lang.spec $HOME/rpmbuild/SPECS
+
+pushd $HOME/rpmbuild/SPECS
+spectool -g -R ./swift-lang.spec
+# Now do the actual build
+mock --clean -r fedora-30-x86_64 --spec=swift-lang.spec --sources=../SOURCES --resultdir=$MYDIR/mock-results --buildsrpm --rebuild --rpmbuild-opts=--noclean --no-cleanup-after 2>&1 | tee $MYDIR/mock-results/build-output.txt
+popd
+
+echo Started:_____$START_TS
+echo Ended:_______`date`
diff --git a/justbuild-s390.sh b/justbuild-s390.sh
new file mode 100755
index 0000000..bc7f4cb
--- /dev/null
+++ b/justbuild-s390.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+MYDIR=$PWD
+
+START_TS=`date`
+
+rm -rf $HOME/rpmbuild
+rm -rf $MYDIR/mock-results
+mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+cp $PWD/*.patch $HOME/rpmbuild/SOURCES
+cp $PWD/swift-lang.spec $HOME/rpmbuild/SPECS
+
+pushd $HOME/rpmbuild/SPECS
+spectool -g -R ./swift-lang.spec
+# Now do the actual build
+#mock --init --clean -r fedora-31-s390x --spec=swift-lang.spec --sources=../SOURCES --resultdir=$MYDIR/mock-results --buildsrpm --rebuild --rpmbuild-opts=--noclean --no-cleanup-after 2>&1
+mock --init --clean -r fedora-31-s390x --spec=swift-lang.spec --sources=../SOURCES --resultdir=$MYDIR/mock-results --buildsrpm
+pushd $MYDIR/mock-results
+mock -r fedora-31-s390x rebuild ./swift-lang-5.2.1-1.fc31.src.rpm
+popd
+
+echo Started:_____$START_TS
+echo Ended:_______`date`
diff --git a/justbuild.sh b/justbuild.sh
new file mode 100755
index 0000000..d92c03e
--- /dev/null
+++ b/justbuild.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+MYDIR=$PWD
+
+START_TS=`date`
+
+rm -rf /home/rolson/rpmbuild
+rm $MYDIR/build-output.txt
+mkdir -p /home/rolson/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+cp $PWD/*.patch /home/rolson/rpmbuild/SOURCES
+cp $PWD/*.conf /home/rolson/rpmbuild/SOURCES
+cp $PWD/swift-lang.spec /home/rolson/rpmbuild/SPECS
+
+pushd /home/rolson/rpmbuild/SPECS
+spectool -g -R ./swift-lang.spec
+# Get the dependencies
+dnf builddep -y ./swift-lang.spec
+# Now do the actual build
+rpmbuild -ba ./swift-lang.spec 2>&1 | tee $MYDIR/build-output.txt
+#rpmbuild -bc ./swift-lang.spec 2>&1 | tee $MYDIR/build-output.txt
+popd
+
+echo Started:_____$START_TS
+echo Ended:_______`date`
diff --git a/justbuild.sh~ b/justbuild.sh~
new file mode 100755
index 0000000..d92c03e
--- /dev/null
+++ b/justbuild.sh~
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+MYDIR=$PWD
+
+START_TS=`date`
+
+rm -rf /home/rolson/rpmbuild
+rm $MYDIR/build-output.txt
+mkdir -p /home/rolson/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+cp $PWD/*.patch /home/rolson/rpmbuild/SOURCES
+cp $PWD/*.conf /home/rolson/rpmbuild/SOURCES
+cp $PWD/swift-lang.spec /home/rolson/rpmbuild/SPECS
+
+pushd /home/rolson/rpmbuild/SPECS
+spectool -g -R ./swift-lang.spec
+# Get the dependencies
+dnf builddep -y ./swift-lang.spec
+# Now do the actual build
+rpmbuild -ba ./swift-lang.spec 2>&1 | tee $MYDIR/build-output.txt
+#rpmbuild -bc ./swift-lang.spec 2>&1 | tee $MYDIR/build-output.txt
+popd
+
+echo Started:_____$START_TS
+echo Ended:_______`date`
diff --git a/last-release.txt b/last-release.txt
new file mode 100644
index 0000000..ae4caf6
--- /dev/null
+++ b/last-release.txt
@@ -0,0 +1 @@
+swift-5.1-DEVELOPMENT-SNAPSHOT-2020-01-28-a \ No newline at end of file
diff --git a/linux-tests-python-3-2.patch b/linux-tests-python-3-2.patch
new file mode 100644
index 0000000..45a1bb6
--- /dev/null
+++ b/linux-tests-python-3-2.patch
@@ -0,0 +1,48 @@
+diff -Naur swift-integration-tests-orig/test-snapshot-binaries/linux_load_commands.py swift-integration-tests/test-snapshot-binaries/linux_load_commands.py
+--- swift-integration-tests-orig/test-snapshot-binaries/linux_load_commands.py 2019-10-07 17:57:28.000000000 -0500
++++ swift-integration-tests/test-snapshot-binaries/linux_load_commands.py 2020-01-29 14:05:33.991180706 -0600
+@@ -85,12 +85,12 @@
+ numberOfLinesSeen = 0
+
+ print("Visiting lib: {}".format(lib))
+- lines = list(reversed(subprocess.check_output([args.read_elf, "-program-headers", lib]).split("\n")[:-1]))
++ lines = list(reversed(subprocess.check_output([args.read_elf, "-program-headers", lib]).split(b"\n")[:-1]))
+ p = ParseState()
+
+ # Until we finish parsing or run out of lines to parse...
+ while len(lines) > 0:
+- l = lines.pop()
++ l = lines.pop().decode("utf-8")
+ print("DUMP: '{}'".format(l))
+ assert(p is not None)
+ curState = p
+@@ -143,7 +143,7 @@
+ "-iname",
+ "*.so"
+ ]
+- return subprocess.check_output(cmd).split("\n")[:-1]
++ return subprocess.check_output(cmd).split(b"\n")[:-1]
+
+ def main():
+ parser = argparse.ArgumentParser()
+@@ -154,7 +154,7 @@
+
+ libraries = get_libraries(args.package_path)
+ for l in libraries:
+- process_library(args, l)
++ process_library(args, l.decode("utf-8"))
+ sys.exit(0)
+
+ if __name__ == "__main__":
+diff -Naur swift-integration-tests-orig/test-sourcekit-lsp/test-sourcekit-lsp.py swift-integration-tests/test-sourcekit-lsp/test-sourcekit-lsp.py
+--- swift-integration-tests-orig/test-sourcekit-lsp/test-sourcekit-lsp.py 2019-10-07 17:57:28.000000000 -0500
++++ swift-integration-tests/test-sourcekit-lsp/test-sourcekit-lsp.py 2020-01-29 18:35:26.953725332 -0600
+@@ -136,7 +136,7 @@
+
+ skargs = [args.sourcekit_lsp, '--sync', '-Xclangd', '-sync']
+ p = subprocess.Popen(skargs, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+- out, _ = p.communicate(lsp.script)
++ out, _ = p.communicate(lsp.script.encode())
+ print(out)
+ print('')
+
diff --git a/llvm.patch b/llvm.patch
new file mode 100644
index 0000000..b9f70d5
--- /dev/null
+++ b/llvm.patch
@@ -0,0 +1,11 @@
+--- llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h.orig 2020-01-29 10:02:44.222689214 -0600
++++ llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h 2020-01-29 10:03:02.007354450 -0600
+@@ -16,6 +16,8 @@
+ #include "llvm/Demangle/DemangleConfig.h"
+ #include "llvm/Demangle/StringView.h"
+ #include <array>
++#include <cstdint>
++#include <string>
+
+ namespace llvm {
+ namespace itanium_demangle {
diff --git a/no-inplace-copy.patch b/no-inplace-copy.patch
deleted file mode 100644
index 585293b..0000000
--- a/no-inplace-copy.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- swift-corelibs-xctest/cmake/modules/SwiftSupport.cmake.orig 2019-03-22 13:10:16.930540857 -0500
-+++ swift-corelibs-xctest/cmake/modules/SwiftSupport.cmake 2019-03-22 15:48:46.960621151 -0500
-@@ -139,12 +139,6 @@
- ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${target}/Resources
- COMMAND
- ${CMAKE_COMMAND} -E copy ${AST_RESOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${target}/Resources)
-- else()
-- add_custom_command(TARGET
-- ${target}
-- POST_BUILD
-- COMMAND
-- ${CMAKE_COMMAND} -E copy ${AST_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR})
- endif()
- endfunction()
-
diff --git a/no-ninja-build.patch b/no-ninja-build.patch
deleted file mode 100644
index 1aeb7a4..0000000
--- a/no-ninja-build.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- swift/utils/build-presets.ini.orig 2019-03-11 08:44:39.664264614 -0500
-+++ swift/utils/build-presets.ini 2019-03-11 08:52:18.038295456 -0500
-@@ -716,12 +716,9 @@
- llbuild
- swiftpm
- xctest
--libicu
--libcxx
-
- dash-dash
-
--build-ninja
- install-swift
- install-lldb
- install-llbuild
diff --git a/nrc.py b/nrc.py
new file mode 100755
index 0000000..90b99ac
--- /dev/null
+++ b/nrc.py
@@ -0,0 +1,116 @@
+#!/usr/bin/python3
+
+import feedparser
+import re
+import datetime
+import requests
+from bs4 import BeautifulSoup
+
+def left(s, amount):
+ return s[:amount]
+
+def right(s, amount):
+ return s[-amount:]
+
+def mid(s, offset, amount):
+ return s[offset:offset+amount]
+
+def getDate(s):
+ # Because we know the format of the string, this is safe to do
+ # (e.g. swift-4.2-DEVELOPMENT-SNAPSHOT-2018-07-17-a)
+ return datetime.datetime.strptime(mid(s.strip(), 31, len(s.strip())-31-2), '%Y-%m-%d').date()
+
+def getGitTag(post):
+ f = requests.get(post.link)
+ soup = BeautifulSoup(f.content, 'html.parser')
+ elems = soup.code
+ return [elem.string for elem in elems][0]
+
+def getSpecFileContents():
+ with open('swift-lang.spec', 'r') as f:
+ return f.read()
+
+def changeData(f, textToFind, textToReplace):
+ p = re.compile(textToFind)
+ s = p.search(f)
+ t = s.group() # This is the line from the file we want to replace
+ # And replace it
+ return f.replace(t, textToReplace)
+
+def changePackageNumber(f):
+ p = re.compile('Release: .*')
+ s = p.search(f)
+ t = s.group()
+
+ # Now we need to get the package number
+ p2 = re.compile('[0-9].[0-9].')
+ s2 = p2.search(t)
+ t2 = s2.group()
+
+ # Now we have our number, so we want to increment that
+ newPN = int(t2.split('.')[1]) + 1
+
+ # And we need to return the fixed line, as well as the new package number so we can use it for
+ # the changelog
+ return f.replace(t, 'Release: 0.' + str(newPN) + '.%{swiftgitdate}git%{swiftgithash}%{?dist}'), newPN
+
+def process(post, postDate):
+ print("Going to work with " + post.title + " from " + post.link)
+ gitHash = getGitTag(post)
+ print("The git hash is " + gitHash)
+ # We need the spec file contents
+ spec = getSpecFileContents()
+ #
+ # Now let's fiddle with the file
+ #
+
+ # First change the file date
+ newTitle = post.title
+ newTitle = newTitle.replace('swift-', '')
+ spec = changeData(spec, 'swifttag .*', 'swifttag ' + newTitle)
+ # Now the tag
+ spec = changeData(spec, 'swiftgithash .*', 'swiftgithash ' + gitHash)
+ # Now the date
+ #newDate = str(postDate.year) + str(postDate.month) + str(postDate.day)
+ newDate = postDate.strftime('%Y%m%d')
+ spec = changeData(spec, 'swiftgitdate .*', 'swiftgitdate ' + newDate)
+ # We have to handle the package number specially as we need to
+ # increment it and return it so we have it for the changelog
+ spec, pn = changePackageNumber(spec)
+ # Now we need to write out the changelog
+ cl = '%changelog\n* ' + datetime.datetime.now().strftime('%a %b %d %Y') + ' Ron Olson <tachoknight@gmail.com> 5.1-0.' + str(pn) + '.' + newDate + 'git' + gitHash + '\n' + '- ' + 'Updated to ' + post.title
+ spec = spec.replace('%changelog', cl)
+
+ nf = open('swift-lang.spec', 'w')
+ nf.write(spec)
+ nf.close()
+
+ # And write out our last-release file
+ nlrf = open('last-release.txt', 'w')
+ nlrf.write(post.title)
+ nlrf.close()
+
+
+lastBuild=''
+with open('last-release.txt', 'r') as lastbuildfile:
+ lastBuild=lastbuildfile.read().replace('\n', '')
+
+print('Last build was ', lastBuild)
+lastDate = getDate(lastBuild)
+
+d = feedparser.parse("https://github.com/apple/swift/releases.atom")
+
+# We're gonna start from the top as that's the latest one
+
+print("Ok, Gonna go through them...")
+for post in d.entries:
+ print(post.title)
+ if left(post.title, 9) == 'swift-5.1':
+ postDate = getDate(post.title)
+ # Okay, is this date newer than the last time we
+ # processed anything?
+ if postDate > lastDate:
+ print("yep, got to do it!")
+ process(post, postDate)
+ break
+
diff --git a/python3-2.patch b/python3-2.patch
new file mode 100644
index 0000000..1feab4f
--- /dev/null
+++ b/python3-2.patch
@@ -0,0 +1,410 @@
+diff -Naur swift-orig/stdlib/public/core/IntegerTypes.swift.gyb swift/stdlib/public/core/IntegerTypes.swift.gyb
+--- swift-orig/stdlib/public/core/IntegerTypes.swift.gyb 2020-01-24 01:22:05.000000000 -0600
++++ swift/stdlib/public/core/IntegerTypes.swift.gyb 2020-01-29 13:23:24.851180231 -0600
+@@ -14,10 +14,9 @@
+ # Utility code for later in this template
+ #
+
+-from SwiftIntTypes import all_integer_types, int_max_bits, should_define_truncating_bit_pattern_init
+-from SwiftFloatingPointTypes import getFtoIBounds
++import SwiftIntTypes
++import SwiftFloatingPointTypes
+
+-from string import maketrans, capitalize
+ from itertools import chain
+
+ # Number of bits in the Builtin.Word type
+@@ -1064,7 +1063,7 @@
+ //===--- Concrete FixedWidthIntegers --------------------------------------===//
+ //===----------------------------------------------------------------------===//
+
+-% for self_type in all_integer_types(word_bits):
++% for self_type in SwiftIntTypes.all_integer_types(word_bits):
+ % bits = self_type.bits
+ % signed = self_type.is_signed
+ % BuiltinName = self_type.builtin_name
+@@ -1125,7 +1124,7 @@
+
+ % for (FloatType, FloatBits) in [
+ % ('Float', 32), ('Double', 64), ('Float80', 80)]:
+-% (lower, upper) = getFtoIBounds(floatBits=FloatBits, intBits=int(bits), signed=signed)
++% (lower, upper) = SwiftFloatingPointTypes.getFtoIBounds(floatBits=FloatBits, intBits=int(bits), signed=signed)
+
+ % if FloatType == 'Float80':
+ #if !(os(Windows) || os(Android)) && (arch(i386) || arch(x86_64))
+@@ -1648,7 +1647,7 @@
+ return Hasher._hash(
+ seed: seed,
+ bytes: UInt64(truncatingIfNeeded: ${U}${Self}(_value)),
+- count: ${bits / 8})
++ count: ${bits // 8})
+ % end
+ }
+ }
+diff -Naur swift-orig/stdlib/public/core/Mirrors.swift.gyb swift/stdlib/public/core/Mirrors.swift.gyb
+--- swift-orig/stdlib/public/core/Mirrors.swift.gyb 2020-01-24 01:22:05.000000000 -0600
++++ swift/stdlib/public/core/Mirrors.swift.gyb 2020-01-29 13:27:07.425509032 -0600
+@@ -12,7 +12,7 @@
+
+ %{
+
+-from SwiftIntTypes import all_integer_types
++import SwiftIntTypes
+
+ # Number of bits in the Builtin.Word type
+ word_bits = int(CMAKE_SIZEOF_VOID_P) * 8
+@@ -26,7 +26,7 @@
+ ('Unicode.Scalar', '.uInt', 'UInt64(self)'),
+ ]
+
+-for self_ty in all_integer_types(word_bits):
++for self_ty in SwiftIntTypes.all_integer_types(word_bits):
+ Self = self_ty.stdlib_name
+ if self_ty.is_signed:
+ Types.append( (Self, '.int', 'Int64(self)') )
+diff -Naur swift-orig/stdlib/public/core/SIMDVectorTypes.swift.gyb swift/stdlib/public/core/SIMDVectorTypes.swift.gyb
+--- swift-orig/stdlib/public/core/SIMDVectorTypes.swift.gyb 2020-01-24 01:22:05.000000000 -0600
++++ swift/stdlib/public/core/SIMDVectorTypes.swift.gyb 2020-01-29 13:30:52.170919077 -0600
+@@ -11,7 +11,7 @@
+ //===----------------------------------------------------------------------===//
+
+ %{
+-from SwiftIntTypes import all_integer_types
++import SwiftIntTypes
+ word_bits = int(CMAKE_SIZEOF_VOID_P) * 8
+ storagescalarCounts = [2,4,8,16,32,64]
+ vectorscalarCounts = storagescalarCounts + [3]
+@@ -90,17 +90,17 @@
+ % if n >= 4:
+ /// Creates a new vector from two half-length vectors.
+ @_transparent
+- public init(lowHalf: SIMD${n/2}<Scalar>, highHalf: SIMD${n/2}<Scalar>) {
++ public init(lowHalf: SIMD${n//2}<Scalar>, highHalf: SIMD${n//2}<Scalar>) {
+ self.init()
+ self.lowHalf = lowHalf
+ self.highHalf = highHalf
+ }
+
+-% for (half,indx) in [('low','i'), ('high',str(n/2)+'+i'), ('even','2*i'), ('odd','2*i+1')]:
++% for (half,indx) in [('low','i'), ('high',str(n//2)+'+i'), ('even','2*i'), ('odd','2*i+1')]:
+ /// A half-length vector made up of the ${half} elements of the vector.
+- public var ${half}Half: SIMD${n/2}<Scalar> {
++ public var ${half}Half: SIMD${n//2}<Scalar> {
+ @inlinable get {
+- var result = SIMD${n/2}<Scalar>()
++ var result = SIMD${n//2}<Scalar>()
+ for i in result.indices { result[i] = self[${indx}] }
+ return result
+ }
+@@ -159,7 +159,7 @@
+ public var debugDescription: String {
+ return "SIMD${n}<\(Scalar.self)>(${', '.join(map(lambda c:
+ '\\(self['+ str(c) + '])',
+- xrange(n)))})"
++ range(n)))})"
+ }
+ }
+
+@@ -203,7 +203,7 @@
+ }
+ }
+
+-%for self_type in all_integer_types(word_bits):
++%for self_type in SwiftIntTypes.all_integer_types(word_bits):
+ % Self = self_type.stdlib_name
+ % BuiltinName = self_type.builtin_name
+ % Mask = Self if self_type.is_signed else self_type.get_opposite_signedness().stdlib_name
+@@ -212,7 +212,7 @@
+ public typealias SIMDMaskScalar = ${Mask}
+
+ % for n in storagescalarCounts:
+-% bytes = n * self_type.bits / 8
++% bytes = n * self_type.bits // 8
+ /// Storage for a vector of ${spelledNumbers[n]} integers.
+ @frozen
+ @_alignment(${bytes if bytes <= 16 else 16})
+@@ -257,7 +257,7 @@
+ public typealias SIMDMaskScalar = Int${bits}
+
+ % for n in storagescalarCounts:
+-% bytes = n * bits / 8
++% bytes = n * bits // 8
+ /// Storage for a vector of ${spelledNumbers[n]} floating-point values.
+ @frozen
+ @_alignment(${bytes if bytes <= 16 else 16})
+diff -Naur swift-orig/stdlib/public/core/Tuple.swift.gyb swift/stdlib/public/core/Tuple.swift.gyb
+--- swift-orig/stdlib/public/core/Tuple.swift.gyb 2020-01-24 01:22:05.000000000 -0600
++++ swift/stdlib/public/core/Tuple.swift.gyb 2020-01-29 13:32:22.287291260 -0600
+@@ -111,7 +111,7 @@
+ % equatableTypeParams = ", ".join(["{}: Equatable".format(c) for c in typeParams])
+
+ % originalTuple = "(\"a\", {})".format(", ".join(map(str, range(1, arity))))
+-% greaterTuple = "(\"a\", {})".format(", ".join(map(str, range(1, arity - 1) + [arity])))
++% greaterTuple = "(\"a\", {})".format(", ".join(map(str, list(range(1, arity - 1)) + [arity])))
+
+ /// Returns a Boolean value indicating whether the corresponding components of
+ /// two tuples are equal.
+diff -Naur swift-orig/utils/gyb_sourcekit_support/__init__.py swift/utils/gyb_sourcekit_support/__init__.py
+--- swift-orig/utils/gyb_sourcekit_support/__init__.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_sourcekit_support/__init__.py 2020-01-29 13:33:22.111521781 -0600
+@@ -14,9 +14,9 @@
+ # utils/gyb_sourcekit_support/ directory as a module.
+ #
+ # ----------------------------------------------------------------------------
+-from UIDs import UID_KEYS
+-from UIDs import UID_KINDS
+-from UIDs import UID_REQUESTS
++from .UIDs import UID_KEYS
++from .UIDs import UID_KINDS
++from .UIDs import UID_REQUESTS
+
+
+ def check_uid_duplication():
+diff -Naur swift-orig/utils/gyb_syntax_support/AttributeNodes.py swift/utils/gyb_syntax_support/AttributeNodes.py
+--- swift-orig/utils/gyb_syntax_support/AttributeNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/AttributeNodes.py 2020-01-29 13:34:03.265044624 -0600
+@@ -1,5 +1,5 @@
+-from Child import Child
+-from Node import Node # noqa: I201
++from .Child import Child
++from .Node import Node # noqa: I201
+
+ ATTRIBUTE_NODES = [
+ # token-list -> token? token-list?
+diff -Naur swift-orig/utils/gyb_syntax_support/AvailabilityNodes.py swift/utils/gyb_syntax_support/AvailabilityNodes.py
+--- swift-orig/utils/gyb_syntax_support/AvailabilityNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/AvailabilityNodes.py 2020-01-29 13:34:33.458161889 -0600
+@@ -1,5 +1,5 @@
+-from Child import Child
+-from Node import Node # noqa: I201
++from .Child import Child
++from .Node import Node # noqa: I201
+
+ AVAILABILITY_NODES = [
+ # availability-spec-list -> availability-entry availability-spec-list?
+diff -Naur swift-orig/utils/gyb_syntax_support/Child.py swift/utils/gyb_syntax_support/Child.py
+--- swift-orig/utils/gyb_syntax_support/Child.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/Child.py 2020-01-29 13:35:02.044219688 -0600
+@@ -1,7 +1,7 @@
+ # flake8: noqa I201
+-from Classification import classification_by_name
+-from Token import SYNTAX_TOKEN_MAP
+-from kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word
++from .Classification import classification_by_name
++from .Token import SYNTAX_TOKEN_MAP
++from .kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word
+
+
+ class Child(object):
+diff -Naur swift-orig/utils/gyb_syntax_support/Classification.py swift/utils/gyb_syntax_support/Classification.py
+--- swift-orig/utils/gyb_syntax_support/Classification.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/Classification.py 2020-01-29 13:46:45.334244147 -0600
+@@ -1,5 +1,5 @@
+-from Node import error
+-from kinds import lowercase_first_word # noqa: I201
++from .Node import error
++from .kinds import lowercase_first_word # noqa: I201
+
+
+ class SyntaxClassification(object):
+diff -Naur swift-orig/utils/gyb_syntax_support/CommonNodes.py swift/utils/gyb_syntax_support/CommonNodes.py
+--- swift-orig/utils/gyb_syntax_support/CommonNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/CommonNodes.py 2020-01-29 13:47:02.390875308 -0600
+@@ -1,5 +1,5 @@
+-from Child import Child
+-from Node import Node # noqa: I201
++from .Child import Child
++from .Node import Node # noqa: I201
+
+ COMMON_NODES = [
+ Node('Decl', kind='Syntax'),
+diff -Naur swift-orig/utils/gyb_syntax_support/DeclNodes.py swift/utils/gyb_syntax_support/DeclNodes.py
+--- swift-orig/utils/gyb_syntax_support/DeclNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/DeclNodes.py 2020-01-29 13:47:30.486914972 -0600
+@@ -1,6 +1,6 @@
+ # flake8: noqa I201
+-from Child import Child
+-from Node import Node
++from .Child import Child
++from .Node import Node
+
+
+ DECL_NODES = [
+diff -Naur swift-orig/utils/gyb_syntax_support/ExprNodes.py swift/utils/gyb_syntax_support/ExprNodes.py
+--- swift-orig/utils/gyb_syntax_support/ExprNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/ExprNodes.py 2020-01-29 13:47:47.095529555 -0600
+@@ -1,5 +1,5 @@
+-from Child import Child
+-from Node import Node # noqa: I201
++from .Child import Child
++from .Node import Node # noqa: I201
+
+ EXPR_NODES = [
+ # An inout expression.
+diff -Naur swift-orig/utils/gyb_syntax_support/GenericNodes.py swift/utils/gyb_syntax_support/GenericNodes.py
+--- swift-orig/utils/gyb_syntax_support/GenericNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/GenericNodes.py 2020-01-29 13:48:04.737182368 -0600
+@@ -1,5 +1,5 @@
+-from Child import Child
+-from Node import Node # noqa: I201
++from .Child import Child
++from .Node import Node # noqa: I201
+
+ GENERIC_NODES = [
+ # generic-where-clause -> 'where' requirement-list
+diff -Naur swift-orig/utils/gyb_syntax_support/__init__.py swift/utils/gyb_syntax_support/__init__.py
+--- swift-orig/utils/gyb_syntax_support/__init__.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/__init__.py 2020-01-29 13:52:03.762062110 -0600
+@@ -1,22 +1,22 @@
+ import textwrap
+-from AttributeNodes import ATTRIBUTE_NODES # noqa: I201
+-from AvailabilityNodes import AVAILABILITY_NODES # noqa: I201
+-import Classification # noqa: I201
+-from CommonNodes import COMMON_NODES # noqa: I201
+-from DeclNodes import DECL_NODES # noqa: I201
+-from ExprNodes import EXPR_NODES # noqa: I201
+-from GenericNodes import GENERIC_NODES # noqa: I201
++from .AttributeNodes import ATTRIBUTE_NODES # noqa: I201
++from .AvailabilityNodes import AVAILABILITY_NODES # noqa: I201
++from . import Classification # noqa: I201
++from .CommonNodes import COMMON_NODES # noqa: I201
++from .DeclNodes import DECL_NODES # noqa: I201
++from .ExprNodes import EXPR_NODES # noqa: I201
++from .GenericNodes import GENERIC_NODES # noqa: I201
+
+-from NodeSerializationCodes import SYNTAX_NODE_SERIALIZATION_CODES, \
++from .NodeSerializationCodes import SYNTAX_NODE_SERIALIZATION_CODES, \
+ get_serialization_code, \
+ verify_syntax_node_serialization_codes
+
+-from PatternNodes import PATTERN_NODES # noqa: I201
+-from StmtNodes import STMT_NODES # noqa: I201
++from .PatternNodes import PATTERN_NODES # noqa: I201
++from .StmtNodes import STMT_NODES # noqa: I201
+
+-import Token
+-from Trivia import TRIVIAS # noqa: I201
+-from TypeNodes import TYPE_NODES # noqa: I201
++from . import Token
++from .Trivia import TRIVIAS # noqa: I201
++from .TypeNodes import TYPE_NODES # noqa: I201
+
+
+ # Re-export global constants
+diff -Naur swift-orig/utils/gyb_syntax_support/Node.py swift/utils/gyb_syntax_support/Node.py
+--- swift-orig/utils/gyb_syntax_support/Node.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/Node.py 2020-01-29 13:52:32.755139868 -0600
+@@ -1,7 +1,7 @@
+ from __future__ import print_function
+ import sys # noqa: I201
+
+-from kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word
++from .kinds import SYNTAX_BASE_KINDS, kind_to_type, lowercase_first_word
+
+
+ def error(msg):
+diff -Naur swift-orig/utils/gyb_syntax_support/NodeSerializationCodes.py swift/utils/gyb_syntax_support/NodeSerializationCodes.py
+--- swift-orig/utils/gyb_syntax_support/NodeSerializationCodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/NodeSerializationCodes.py 2020-01-29 13:52:58.148083796 -0600
+@@ -1,4 +1,4 @@
+-from Node import error
++from .Node import error
+
+
+ SYNTAX_NODE_SERIALIZATION_CODES = {
+diff -Naur swift-orig/utils/gyb_syntax_support/PatternNodes.py swift/utils/gyb_syntax_support/PatternNodes.py
+--- swift-orig/utils/gyb_syntax_support/PatternNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/PatternNodes.py 2020-01-29 13:53:38.452582038 -0600
+@@ -1,5 +1,5 @@
+-from Child import Child
+-from Node import Node # noqa: I201
++from .Child import Child
++from .Node import Node # noqa: I201
+
+ PATTERN_NODES = [
+
+diff -Naur swift-orig/utils/gyb_syntax_support/StmtNodes.py swift/utils/gyb_syntax_support/StmtNodes.py
+--- swift-orig/utils/gyb_syntax_support/StmtNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/StmtNodes.py 2020-01-29 13:53:55.056199243 -0600
+@@ -1,5 +1,5 @@
+-from Child import Child
+-from Node import Node # noqa: I201
++from .Child import Child
++from .Node import Node # noqa: I201
+
+ STMT_NODES = [
+ # continue-stmt -> 'continue' label? ';'?
+diff -Naur swift-orig/utils/gyb_syntax_support/Token.py swift/utils/gyb_syntax_support/Token.py
+--- swift-orig/utils/gyb_syntax_support/Token.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/Token.py 2020-01-29 13:54:12.720855888 -0600
+@@ -1,6 +1,6 @@
+-from Classification import classification_by_name
+-from Node import error # noqa: I201
+-from kinds import lowercase_first_word # noqa: I201
++from .Classification import classification_by_name
++from .Node import error # noqa: I201
++from .kinds import lowercase_first_word # noqa: I201
+
+
+ class Token(object):
+diff -Naur swift-orig/utils/gyb_syntax_support/Trivia.py swift/utils/gyb_syntax_support/Trivia.py
+--- swift-orig/utils/gyb_syntax_support/Trivia.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/Trivia.py 2020-01-29 13:54:41.647931191 -0600
+@@ -1,5 +1,5 @@
+-from Node import error
+-from kinds import lowercase_first_word # noqa: I201
++from .Node import error
++from .kinds import lowercase_first_word # noqa: I201
+
+
+ class Trivia(object):
+diff -Naur swift-orig/utils/gyb_syntax_support/TypeNodes.py swift/utils/gyb_syntax_support/TypeNodes.py
+--- swift-orig/utils/gyb_syntax_support/TypeNodes.py 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/gyb_syntax_support/TypeNodes.py 2020-01-29 13:55:07.952909024 -0600
+@@ -1,5 +1,5 @@
+-from Child import Child
+-from Node import Node # noqa: I201
++from .Child import Child
++from .Node import Node # noqa: I201
+
+ TYPE_NODES = [
+ # simple-type-identifier -> identifier generic-argument-clause?
+diff -Naur swift-orig/utils/line-directive swift/utils/line-directive
+--- swift-orig/utils/line-directive 2020-01-24 01:22:05.000000000 -0600
++++ swift/utils/line-directive 2020-01-29 13:57:12.829551057 -0600
+@@ -61,7 +61,7 @@
+
+ def _make_line_map(target_filename, stream=None):
+ """
+- >>> from StringIO import StringIO
++ >>> from io import StringIO
+ >>> _make_line_map('box',
+ ... StringIO('''// ###sourceLocation(file: "foo.bar", line: 3)
+ ... line 2
+@@ -95,7 +95,7 @@
+
+ def map_line_to_source_file(target_filename, target_line_num):
+ """
+- >>> from tempfile import *
++ >>> from .tempfile import *
+ >>> # On Windows, the name of a NamedTemporaryFile cannot be used to open
+ >>> # the file for a second time if delete=True. Therefore, we have to
+ >>> # manually handle closing and deleting this file to allow us to open
+@@ -145,7 +145,7 @@
+ def map_line_from_source_file(source_filename, source_line_num,
+ target_filename):
+ """
+- >>> from tempfile import *
++ >>> from .tempfile import *
+ >>> # On Windows, the name of a NamedTemporaryFile cannot be used to open
+ >>> # the file for a second time if delete=True. Therefore, we have to
+ >>> # manually handle closing and deleting this file to allow us to open
+@@ -231,7 +231,7 @@
+ def run():
+ """Simulate a couple of gyb-generated files
+
+- >>> from tempfile import *
++ >>> from .tempfile import *
+ >>> # On Windows, the name of a NamedTemporaryFile cannot be used to open
+ >>> # the file for a second time if delete=True. Therefore, we have to
+ >>> # manually handle closing and deleting this file to allow us to open
diff --git a/swift-lang-runtime.conf b/swift-lang-runtime.conf
deleted file mode 100644
index d19930a..0000000
--- a/swift-lang-runtime.conf
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/swift/linux
diff --git a/swift-lang.conf b/swift-lang.conf
deleted file mode 100644
index ce1b5b2..0000000
--- a/swift-lang.conf
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/swift-lldb
diff --git a/swift-lang.spec b/swift-lang.spec
index e2083ae..5cb9cba 100644
--- a/swift-lang.spec
+++ b/swift-lang.spec
@@ -1,50 +1,51 @@
%global debug_package %{nil}
-%global swifttag 5.0.1-RELEASE
-%global swiftgithash 604054e
-%global swiftgitdate 20190418
+%global swifttag 5.2.1-RELEASE
+# Swift syntax seems to only be updated on major releases
+%global swiftsyntax 5.2.1-RELEASE
%global swiftbuild swift-source
-%global __provides_exclude ^/usr/lib/swift-lldb/.*\\.so.*
-
-Name: swift-lang
-Version: 5.0.1
-Release: 0.55.%{swiftgitdate}git%{swiftgithash}%{?dist}
-Summary: Apple's Swift programming language
-License: ASL 2.0
-URL: https://swift.org
-Source0: https://github.com/apple/swift/archive/swift-%{swifttag}.tar.gz#/swift.tar.gz
-Source1: https://github.com/apple/swift-compiler-rt/archive/swift-%{swifttag}.tar.gz#/swift-compiler-rt.tar.gz
-Source2: https://github.com/apple/swift-corelibs-libdispatch/archive/swift-%{swifttag}.tar.gz#/corelibs-libdispatch.tar.gz
-Source3: https://github.com/apple/swift-corelibs-foundation/archive/swift-%{swifttag}.tar.gz#/corelibs-foundation.tar.gz
-Source4: https://github.com/apple/swift-integration-tests/archive/swift-%{swifttag}.tar.gz#/swift-integration-tests.tar.gz
-Source5: https://github.com/apple/swift-corelibs-xctest/archive/swift-%{swifttag}.tar.gz#/corelibs-xctest.tar.gz
-Source6: https://github.com/apple/swift-clang/archive/swift-%{swifttag}.tar.gz#/clang.tar.gz
-Source7: https://github.com/apple/swift-package-manager/archive/swift-%{swifttag}.tar.gz#/package-manager.tar.gz
-Source8: https://github.com/apple/swift-lldb/archive/swift-%{swifttag}.tar.gz#/lldb.tar.gz
-Source9: https://github.com/apple/swift-llvm/archive/swift-%{swifttag}.tar.gz#/llvm.tar.gz
-Source10: https://github.com/apple/swift-llbuild/archive/swift-%{swifttag}.tar.gz#/llbuild.tar.gz
-Source11: https://github.com/apple/swift-cmark/archive/swift-%{swifttag}.tar.gz#/cmark.tar.gz
-Source12: https://github.com/apple/swift-xcode-playground-support/archive/swift-%{swifttag}.tar.gz#/swift-xcode-playground-support.tar.gz
-Source13: swift-lang.conf
-Source14: swift-lang-runtime.conf
-
-Patch0: change-lldb-location.patch
-Patch1: no-ninja-build.patch
-Patch2: clangloc.patch
-Patch3: compiler-rt-fuzzer.patch
-Patch4: swift-unwrapped.patch
-Patch5: no-inplace-copy.patch
-
+%global cmake_version 3.16.5
+
+Name: swift-lang
+Version: 5.2.1
+Release: 3%{?dist}
+Summary: Apple's Swift programming language
+License: ASL 2.0 and Unicode
+URL: https://swift.org
+Source0: https://github.com/apple/swift/archive/swift-%{swifttag}.tar.gz#/swift.tar.gz
+Source1: https://github.com/apple/swift-corelibs-libdispatch/archive/swift-%{swifttag}.tar.gz#/corelibs-libdispatch.tar.gz
+Source2: https://github.com/apple/swift-corelibs-foundation/archive/swift-%{swifttag}.tar.gz#/corelibs-foundation.tar.gz
+Source3: https://github.com/apple/swift-integration-tests/archive/swift-%{swifttag}.tar.gz#/swift-integration-tests.tar.gz
+Source4: https://github.com/apple/swift-corelibs-xctest/archive/swift-%{swifttag}.tar.gz#/corelibs-xctest.tar.gz
+Source5: https://github.com/apple/swift-package-manager/archive/swift-%{swifttag}.tar.gz#/package-manager.tar.gz
+Source6: https://github.com/apple/swift-llbuild/archive/swift-%{swifttag}.tar.gz#/llbuild.tar.gz
+Source7: https://github.com/apple/swift-cmark/archive/swift-%{swifttag}.tar.gz#/cmark.tar.gz
+Source8: https://github.com/apple/swift-xcode-playground-support/archive/swift-%{swifttag}.tar.gz#/swift-xcode-playground-support.tar.gz
+Source9: https://github.com/apple/sourcekit-lsp/archive/swift-%{swifttag}.tar.gz#/sourcekit-lsp.tar.gz
+Source10: https://github.com/apple/indexstore-db/archive/swift-%{swifttag}.tar.gz#/indexstore-db.tar.gz
+Source11: https://github.com/apple/llvm-project/archive/swift-%{swifttag}.tar.gz#/llvm-project.tar.gz
+Source12: https://github.com/unicode-org/icu/archive/release-61-2.tar.gz
+Source13: https://github.com/apple/swift-syntax/archive/swift-%{swiftsyntax}.zip#/swift-syntax.tar.gz
+Source14: https://github.com/Kitware/CMake/releases/download/v%{cmake_version}/cmake-%{cmake_version}.tar.gz
+
+Patch0: build-setup.patch
+Patch1: compiler-rt-fuzzer.patch
+Patch2: python3-2.patch
+Patch3: linux-tests-python-3-2.patch
+Patch4: glibcpthread.patch
+Patch5: swift.patch
+Patch6: llvm.patch
+Patch7: indexstore.patch
+Patch8: build-setup-s390x.patch
+Patch9: ibm-identifier.patch
+
BuildRequires: clang
-BuildRequires: cmake
BuildRequires: swig
BuildRequires: pkgconfig
BuildRequires: perl-podlators
BuildRequires: rsync
-%if 0%{?fedora} > 28
-BuildRequires: python-unversioned-command
-%endif
-BuildRequires: python2
-BuildRequires: python2-devel
+BuildRequires: python3
+BuildRequires: python3-devel
+BuildRequires: python3-distro
BuildRequires: libbsd-devel
BuildRequires: libxml2-devel
BuildRequires: libsqlite3x-devel
@@ -54,21 +55,26 @@ BuildRequires: libcurl-devel
BuildRequires: libuuid-devel
BuildRequires: libedit-devel
BuildRequires: libicu-devel
-# python2-sphinx was removed after f30
-%if 0%{?fedora} > 30
-BuildRequires: python3-sphinx
-%else
-BuildRequires: python2-sphinx
-%endif
BuildRequires: ninja-build
+BuildRequires: /usr/bin/pathfix.py
+BuildRequires: make
+BuildRequires: openssl-devel
-Requires: glibc-devel
-Requires: clang
+Requires: glibc-devel
+%if 0%{?fedora} >= 31
+Requires: binutils-gold
+%else
+Requires: binutils
+%endif
+Requires: gcc
Requires: ncurses-devel
Requires: ncurses-compat-libs
-Requires: %{name}-runtime = %{version}-%{release}
-ExclusiveArch: x86_64 aarch64
+Provides: %{name} = %{version}-%{release}
+Obsoletes: %{name} < %{version}-%{release}
+Obsoletes: %{name}-runtime < %{version}-%{release}
+
+ExclusiveArch: x86_64 aarch64 s390x
%description
@@ -83,182 +89,106 @@ importantly, Swift is designed to make writing and maintaining
correct programs easier for the developer.
-%package runtime
-Summary: Runtime files for Swift programs
-
-
-%description runtime
-Runtime libraries for Swift programs
-
-
%prep
-%setup -q -c -n %{swiftbuild} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12
+# Now we build our own CMake because the one in EPEL8 is too old and
+# we can safely build it for all platforms (though will add some time
+# to the whole build process)
+%setup -q -c -n cmake -a 14
+mkdir cmake-build
+cd cmake-build
+../cmake-%{cmake_version}/bootstrap && make
+
+%setup -q -c -n %{swiftbuild} -a 0 -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13
# The Swift build script requires directories to be named
# in a specific way so renaming the source directories is
# necessary
-mv swift-clang-swift-%{swifttag} clang
mv swift-cmark-swift-%{swifttag} cmark
-mv swift-compiler-rt-swift-%{swifttag} compiler-rt
mv swift-corelibs-foundation-swift-%{swifttag} swift-corelibs-foundation
mv swift-corelibs-libdispatch-swift-%{swifttag} swift-corelibs-libdispatch
mv swift-corelibs-xctest-swift-%{swifttag} swift-corelibs-xctest
mv swift-integration-tests-swift-%{swifttag} swift-integration-tests
mv swift-llbuild-swift-%{swifttag} llbuild
-mv swift-lldb-swift-%{swifttag} lldb
-mv swift-llvm-swift-%{swifttag} llvm
mv swift-package-manager-swift-%{swifttag} swiftpm
mv swift-swift-%{swifttag} swift
mv swift-xcode-playground-support-swift-%{swifttag} swift-xcode-playground-support
+mv sourcekit-lsp-swift-%{swifttag} sourcekit-lsp
+mv indexstore-db-swift-%{swifttag} indexstore-db
+mv llvm-project-swift-%{swifttag} llvm-project
-# This patch tells the Swift executable to look for its Swift-specific
-# lldb executable in /usr/libexec/swift-lldb, not in the same directory
-# as the swift executable (i.e. /usr/bin).
-%patch0 -p0
+# ICU
+mv icu-release-61-2 icu
-# Since we require ninja for building, there's no sense to rebuild it just for Swift
-%patch1 -p0
+# Swift Syntax on its own release (sigh)
+mv swift-syntax-swift-%{swiftsyntax} swift-syntax
-# This changes the location of where the headers and libs are to keep lldb happy
-%patch2 -p0
+# Since we require ninja for building, there's no sense to rebuild it just for Swift
+%ifnarch s390x
+%patch0 -p0
+%else
+# Couple other things for s390x
+%patch8 -p0
+%endif
# Fixes an issue with using std::thread in a vector in compiler-rt
-%patch3 -p0
+%patch1 -p0
+
+# Python 3 is the new default so we need to make the python code work with it
+%patch2 -p0
+%patch3 -p0
-# Patch for handling optional issue with pthreads functions in Swift file
-# in the package mananger
+# Fixes compiler issue with glibc and pthreads after 2.5.0.9000
%patch4 -p0
-# Patch to handle library being copied to same directory; CMake 3.14 zeros
-# out the file
+#
+# 5.2 patches
+#
%patch5 -p0
+# implicit include of cstdint
+%patch6 -p0
+%patch7 -p0
+
+# s390x-specific patches
+%ifarch s390x
+%patch9 -p0
+%endif
+
+# Fix python to python3
+pathfix.py -pni "%{__python3} %{py3_shbang_opts}" swift/utils/api_checker/swift-api-checker.py
%build
export VERBOSE=1
-export PYTHON_DISALLOW_AMBIGUOUS_VERSION=0
+# We may not have /usr/bin/python, so we roll our own
+# because the build script expects there to be one.
+mkdir $PWD/binforpython
+ln -s /usr/bin/python3 $PWD/binforpython/python
+export PATH=$PWD/binforpython:$PATH
+# And for CMake, which we built first
+export PATH=$PWD/../cmake/cmake-build/bin:$PATH
+
+# Here we go!
swift/utils/build-script --preset=buildbot_linux,no_test install_destdir=%{_builddir} installable_package=%{_builddir}/swift-%{version}-fedora.tar.gz
%install
-export PYTHON_DISALLOW_AMBIGUOUS_VERSION=0
-mkdir -p %{buildroot}%{_libexecdir}/swift-lldb
+mkdir -p %{buildroot}%{_libexecdir}/swift/
+cp -r %{_builddir}/usr/* %{buildroot}%{_libexecdir}/swift
mkdir -p %{buildroot}%{_bindir}
-mkdir -p %{buildroot}/usr/lib
-install -m 0755 %{_builddir}/usr/bin/swift %{buildroot}%{_bindir}
-install -m 0755 %{_builddir}/usr/bin/swift-build %{buildroot}%{_bindir}
-install -m 0755 %{_builddir}/usr/bin/swift-build-tool %{buildroot}%{_bindir}
-install -m 0755 %{_builddir}/usr/bin/swift-demangle %{buildroot}%{_bindir}
-install -m 0755 %{_builddir}/usr/bin/swift-package %{buildroot}%{_bindir}
-install -m 0755 %{_builddir}/usr/bin/swift-run %{buildroot}%{_bindir}
-install -m 0755 %{_builddir}/usr/bin/swift-test %{buildroot}%{_bindir}
-ln -fs swift %{buildroot}/usr/bin/swift-autolink-extract
-ln -fs swift %{buildroot}/usr/bin/swiftc
-ln -fs swift %{buildroot}/usr/bin/swift-format
-
-install -m 0755 %{_builddir}/usr/bin/lldb* %{buildroot}%{_libexecdir}/swift-lldb
-install -m 0755 %{_builddir}/usr/bin/repl_swift %{buildroot}%{_libexecdir}/swift-lldb
-
-# Why /usr/lib instead of %{_libdir}?
-# The Swift toolchain is *extermely* sensitive to locations of its files
-# (for example, the need for the patch above in the prep section) and
-# has "lib" hardcoded in many, many places throughout all the projects that
-# make up the Swift toolchain. Since we use subdirectories for the
-# libraries, no actual .so files are dumped in /usr/lib.
-mkdir -p %{buildroot}/usr/lib/swift-lldb
-cp %{_builddir}/usr/lib/liblldb.so.7.0.0 %{buildroot}/usr/lib/swift-lldb
-ln -fs liblldb.so.7.0.0 %{buildroot}/usr/lib/swift-lldb/liblldb.so.7
-ln -fs liblldb.so.7 %{buildroot}/usr/lib/swift-lldb/liblldb.so
-cp %{_builddir}/usr/lib/libsourcekitdInProc.so %{buildroot}/usr/lib/swift-lldb
-cp %{_builddir}/usr/lib/libswiftDemangle.so %{buildroot}/usr/lib/swift-lldb
-cp %{_builddir}/usr/lib/liblldbIntelFeatures.so.7 %{buildroot}/usr/lib/swift-lldb
-ln -fs liblldbIntelFeatures.so.7 %{buildroot}/usr/lib/swift-lldb/liblldbIntelFeatures.so
-ln -fs %{_bindir}/swift %{buildroot}%{_libexecdir}/swift-lldb/swift
-
-mkdir -p %{buildroot}/usr/lib/swift
-cp -r %{_builddir}/usr/lib/swift/* %{buildroot}/usr/lib/swift
-rm %{buildroot}/usr/lib/swift/clang
-cp -r %{_builddir}/usr/lib/clang %{buildroot}/usr/lib/swift
-ln -fs /usr/lib/swift/clang/7.0.0/include %{buildroot}/usr/lib/swift/clang/include
-ln -fs /usr/lib/swift/clang/7.0.0/lib %{buildroot}/usr/lib/swift/clang/lib
-ln -fs /usr/lib/swift/clang/7.0.0/share %{buildroot}/usr/lib/swift/clang/share
-ln -fs /usr/lib/swift %{buildroot}/usr/lib/swift-lldb/swift
-chmod 0755 %{buildroot}/usr/lib/swift/linux/libswiftDispatch.so
-chmod 0755 %{buildroot}/usr/lib/swift/linux/libFoundation.so
-chmod 0755 %{buildroot}/usr/lib/swift/linux/libXCTest.so
-chmod 0755 %{buildroot}/usr/lib/swift/pm/llbuild/libllbuild.so
-chmod 0755 %{buildroot}/usr/lib/swift/pm/llbuild/libllbuildSwift.so
-
-mkdir -p %{buildroot}/usr/lib/swift_static
-cp -r %{_builddir}/usr/lib/swift_static/* %{buildroot}/usr/lib/swift_static
-
-mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d/
-install -m 0644 %{SOURCE13} %{buildroot}/%{_sysconfdir}/ld.so.conf.d/swift-lang.conf
-install -m 0644 %{SOURCE14} %{buildroot}/%{_sysconfdir}/ld.so.conf.d/swift-lang-runtime.conf
-
+ln -fs %{_libexecdir}/swift/bin/swift %{buildroot}%{_bindir}/swift
+ln -fs %{_libexecdir}/swift/bin/swiftc %{buildroot}%{_bindir}/swiftc
+ln -fs %{_libexecdir}/swift/bin/sourcekit-lsp %{buildroot}%{_bindir}/sourcekit-lsp
mkdir -p %{buildroot}%{_mandir}/man1
-install -m 0644 %{_builddir}/usr/share/man/man1/swift.1 %{buildroot}%{_mandir}/man1
-
-
-# This is necessary because in Swift 4 the directories
-# under clang were actual directories. In 5 Apple added
-# an additional layer of indirection, to the compiler
-# version, with the previous directories relocated there.
-# Apparently there is an issue with rpm being able to
-# replace directories with something else (in this case,
-# symlinks), thus making this pre-installation step
-# necessary when upgrading from 4.x to 5.
-%pretrans -p <lua>
-path = "/usr/lib/swift/clang"
-subdirs = {"include", "lib"}
-for _, dir in ipairs(subdirs) do
- fullDir = path .. "/" .. dir
- st = posix.stat(fullDir)
- if st and st.type == "directory" then
- status = os.rename(fullDir, fullDir .. ".rpmmoved")
- if not status then
- suffix = 0
- while not status do
- suffix = suffix + 1
- status = os.rename(fullDir .. ".rpmmoved", fullDir .. ".rpmmoved." .. suffix)
- end
- os.rename(fullDir, fullDir .. ".rpmmoved")
- end
- end
-end
+cp %{_builddir}/usr/share/man/man1/swift.1 %{buildroot}%{_mandir}/man1/swift.1
%files
%license swift/LICENSE.txt
-%{_bindir}/swift*
-%{_mandir}/man1/*
-%ghost /usr/lib/swift/clang/include.rpmmoved
-%ghost /usr/lib/swift/clang/lib.rpmmoved
-/usr/lib/swift-lldb/
-/usr/lib/swift/Block/
-/usr/lib/swift/CoreFoundation/
-/usr/lib/swift/clang/
-/usr/lib/swift/dispatch/
-/usr/lib/swift/migrator/
-/usr/lib/swift/os/
-/usr/lib/swift/pm/
-/usr/lib/swift/shims/
-/usr/lib/swift_static/
-%{_libexecdir}/swift-lldb/
-%{_sysconfdir}/ld.so.conf.d/swift-lang.conf
-
-
-%files runtime
-%ghost /usr/lib/swift/clang/include.rpmmoved
-%ghost /usr/lib/swift/clang/lib.rpmmoved
-%dir /usr/lib/swift
-/usr/lib/swift/linux/
-%ifarch aarch64
-/usr/lib/swift/linux/aarch64/
-%else
-/usr/lib/swift/linux/x86_64/
-%endif
-%{_sysconfdir}/ld.so.conf.d/swift-lang-runtime.conf
+%{_bindir}/swift
+%{_bindir}/swiftc
+%{_bindir}/sourcekit-lsp
+%{_mandir}/man1/swift.1.gz
+%{_libexecdir}/swift/
%post -p /sbin/ldconfig
@@ -266,10 +196,235 @@ end
%changelog
-* Thu Apr 18 2019 Ron Olson <tachoknight@gmail.com> 5.0.1-0.55.20190418git604054e
-- Updated to swift-5.0.1-RELEASE
-* Thu Apr 18 2019 Ron Olson <tachoknight@gmail.com> 5.0-0.54.20190325gitba33f9e
-- And modified it again to allow new installations
+* Sun Apr 12 2020 Ron Olson <tachoknight@gmail.com> 5.2.1-3
+- Put CMake back as a build step because the version in EPEL 8 is too
+ old
+* Sun Apr 12 2020 Ron Olson <tachoknight@gmail.com> 5.2.1-2
+- Added s390x architecture and F30-specific requires
+* Mon Apr 06 2020 Ron Olson <tachoknight@gmail.com> 5.2.1-1
+- Reorganized the package to place everything in a single location,
+ changed the versioning scheme, and removed a number of obsolete patches
+* Wed Apr 01 2020 Ron Olson <tachoknight@gmail.com> 5.2.1-0.1.20200331git2e3b1b3
+- Updated to swift-5.2.1-RELEASE
+* Wed Mar 25 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.10.20200324git443e9a4
+- Updated to swift-5.2-RELEASE
+* Thu Mar 12 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.9.20200311git33150e3
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-03-11-a and switched to
+ using patched version of cmake to get around issues building 5.2 with
+ 3.17
+* Fri Feb 28 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.8.20200227git33150e3
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-02-27-a
+* Sun Feb 02 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.7.20200201git66c06ab
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-02-01-a
+* Sat Feb 01 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.6.20200131gitfab20c6
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-31-a
+* Thu Jan 30 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.5.20200129gita0c1677
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-29-a
+* Tue Jan 28 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.4.20200127git7c02102
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-27-a
+* Mon Jan 20 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.3.20200117git3194881
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-17-a
+* Fri Jan 10 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.2.20200109git880e9e6
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-09-a
+* Tue Jan 07 2020 Ron Olson <tachoknight@gmail.com> 5.2-0.1.20200106git74df113
+- Updated to swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-06-a
+* Sat Dec 21 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.6.20191220git04833a6
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-20-a
+* Fri Dec 20 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.5.20191219git04833a6
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-19-a
+* Thu Dec 19 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.4.20191218git04833a6
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-18-a
+* Wed Dec 18 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.3.20191217git04833a6
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-17-a
+* Tue Dec 17 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.2.20191216git04833a6
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-16-a
+* Fri Dec 13 2019 Ron Olson <tachoknight@gmail.com> 5.1.3-0.1.20191213git005fc1f
+- Updated to swift-5.1.3-RELEASE
+* Fri Dec 13 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.20.20191212gita22eb08
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-12-a
+* Wed Dec 11 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.19.20191210git4a1b378
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-10-a
+* Tue Dec 10 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.18.20191209git4a1b378
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-09-a
+* Mon Dec 09 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.17.20191130gited9117a
+- Release of 5.1.2 with sourcekit-lsp enabled. The user still needs to build
+ and install the plugin for vscode; if they do this version will support
+ code-completion, also works with neovim too
+* Sat Dec 07 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.16.20191206git4b8db65
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-06-a
+* Fri Dec 06 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.15.20191205git4b8db65
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-05-a
+* Thu Dec 05 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.14.20191204git4b8db65
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-04-a
+* Wed Dec 04 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.13.20191203git4b8db65
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-12-03-a
+* Sat Nov 30 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.12.20191129git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-29-a
+* Fri Nov 29 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.11.20191128git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-28-a
+* Thu Nov 28 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.10.20191127git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-27-a
+* Wed Nov 27 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.9.20191126git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-26-a
+* Tue Nov 26 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.8.20191125git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-25-a
+* Mon Nov 25 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.7.20191124git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-24-a
+* Sat Nov 23 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.6.20191122git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-22-a
+* Fri Nov 22 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.5.20191121git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-21-a
+* Tue Nov 19 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.4.20191118git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-18-a
+* Mon Nov 18 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.3.20191117git60f3082
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-17-a
+* Sat Nov 16 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.2.20191115git51fe191
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-15-a
+* Fri Nov 15 2019 Ron Olson <tachoknight@gmail.com> 5.1.3-0.1.20191114gite74feb6
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-14-a
+* Thu Nov 07 2019 Ron Olson <tachoknight@gmail.com> 5.1.2-0.1.20191107git71def56
+- Updated to swift-5.1.2-RELEASE
+* Wed Nov 06 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.7.20191105gitb368b0d
+- Added icu, also updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-05-a
+* Mon Nov 04 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.6.20191101git74328cd
+- Added unpackaged files, switched to new llvm-project-based subproject
+* Sun Nov 03 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.5.20191101git74328cd
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-11-01-a
+* Thu Oct 31 2019 Ron Olson <tachoknight@gmail.com> 5.1.1-0.4.20191004git4242edd
+- Added sourcekit-lsp
+* Wed Oct 30 2019 Ron Olson <tachoknight@gmail.com> 5.1.1-0.3.20191004git4242edd
+- Clang 9 was causing compiler-rt to not build properly due to a macro.
+* Thu Oct 17 2019 Ron Olson <tachoknight@gmail.com> 5.1.1-0.2.20191004git4242edd
+- Fixed issue with installing swift-lang only gave the option for
+ swift-lang-runtime
+* Fri Oct 04 2019 Ron Olson <tachoknight@gmail.com> 5.1.1-0.1.20191004git4242edd
+- Updated to swift-5.1.1-RELEASE
+* Thu Sep 19 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.57.20190919gitfa33242
+- Updated to swift-5.1-RELEASE and removed FrameworkABIBaseline as apparently
+ it disappeared
+* Thu Sep 19 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.56.20190918gite05f800
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-18-a
+* Wed Sep 18 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.55.20190917git1f49050
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-17-a
+* Tue Sep 17 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.54.20190916git279ca88
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-16-a
+* Mon Sep 16 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.53.20190915git279ca88
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-15-a
+* Sun Sep 15 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.52.20190914git279ca88
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-14-a
+* Sat Sep 14 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.51.20190913git11b9972
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-13-a
+* Fri Sep 13 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.50.20190912gitb9d082f
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-12-a
+* Thu Sep 12 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.49.20190911gitb8f4481
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-11-a
+* Tue Sep 10 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.48.20190909git28a0436
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-09-a
+* Mon Sep 09 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.47.20190908git28a0436
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-08-a also added test for
+ Red Hat Enterprise Linux and CentOS (when it is updated to match RHEL 8)
+ Also packaged some new files
+* Fri Sep 06 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.46.20190905git1880eb0
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-05-a
+* Thu Sep 05 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.45.20190904git1880eb0
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-04-a
+* Wed Sep 04 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.44.20190903gitfcc37cd
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-03-a
+* Tue Sep 03 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.43.20190902gitfcc37cd
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-02-a
+* Mon Sep 02 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.42.20190901gitfcc37cd
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-09-01-a
+* Sun Sep 01 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.41.20190831gitfcc37cd
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-31-a
+* Fri Aug 30 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.40.20190829gitfcc37cd
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-29-a
+* Thu Aug 29 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.39.20190828gite90298c
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-28-a and added explicit
+ requirement for python3-distro
+* Wed Aug 28 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.38.20190827gite90298c
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-27-a and added a patch
+ to allow LLDB to be built using Python 3.8 (currently in F32/Rawhide)
+* Tue Aug 27 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.37.20190826git3b0cf9e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-26-a
+* Mon Aug 26 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.36.20190825git3b0cf9e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-25-a
+* Sun Aug 25 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.35.20190824git3b0cf9e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-24-a
+* Sat Aug 24 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.34.20190823git3b0cf9e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-23-a
+* Fri Aug 23 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.33.20190822git3b0cf9e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-22-a
+* Wed Aug 21 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.32.20190820git3b0cf9e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-20-a
+* Mon Aug 19 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.31.20190817git3b0cf9e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-17-a
+* Sat Aug 17 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.30.20190816git1329017
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-16-a
+* Fri Aug 16 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.29.20190815git1329017
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-15-a
+* Wed Aug 14 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.28.20190813git425a146
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-13-a
+* Tue Aug 13 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.27.20190812git425a146
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-08-12-a and added another
+ directory
+* Fri Jul 26 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.26.20190725git0450b7d
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-25-a
+* Thu Jul 25 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.25.20190724gite9b6385
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-24-a
+* Wed Jul 24 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.24.20190723git3e8f631
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-23-a
+* Tue Jul 23 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.23.20190719gitf883175
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-19-a and first version
+ that relies on Python 3 for building
+* Mon Jul 15 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.22.20190714git7b90512
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-14-a
+* Sun Jul 14 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.21.20190713git26c2dbe
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-13-a
+* Sat Jul 13 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.20.20190712gita062b3c
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-12-a
+* Fri Jul 12 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.19.20190711gitacd767e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-11-a
+* Thu Jul 11 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.18.20190710gitd7f811d
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-10-a
+* Wed Jul 10 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.17.20190709gitf67864b
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-09-a
+* Thu Jul 04 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.16.20190703gitd2c038e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-03-a
+* Wed Jul 03 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.15.20190702git2efadfd
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-02-a
+* Tue Jul 02 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.14.20190701git6761ba4
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-07-01-a and removed
+ dependency on python-sphinx as a problem with a pygments lexer was being
+ treated as an error and causing the builds to fail
+* Sun Jun 30 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.13.20190629gitdcde8ac
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-29-a
+* Sat Jun 29 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.12.20190628gitca3c825
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-28-a
+* Fri Jun 28 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.11.20190627git993b248
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-27-a
+* Thu Jun 27 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.10.20190626git16859f1
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-26-a and added patch
+ to remove reference to depreciated header file
+* Wed Jun 26 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.9.20190624git4e7bcdb
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-24-a and got the REPL
+ to work
+* Sun Jun 23 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.8.20190621git9729868
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-21-a
+* Fri Jun 21 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.7.20190620gita5aa0c6
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-20-a
+* Thu Jun 20 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.6.20190619git500333c
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-19-a
+* Thu Jun 20 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.5.20190619git500333c
+- Cleaned up the spec file to remove 4.2 to 5 migration code and some
+ old patches
+* Mon Jun 17 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.4.20190616gitcbfbc8e
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-16-a
+* Sun Jun 02 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.3.20190529git37f230a
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-05-29-a
+* Fri Apr 26 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.2.20190425git6d89fc9
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-25-a
+* Thu Apr 18 2019 Ron Olson <tachoknight@gmail.com> 5.1-0.1.20190416git85a776d
+- Updated to swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-16-a
* Thu Mar 28 2019 Ron Olson <tachoknight@gmail.com> 5.0-0.53.20190325gitba33f9e
- Modified spec file to handle upgrades from 4.2 to 5.0.
* Mon Mar 25 2019 Ron Olson <tachoknight@gmail.com> 5.0-0.52.20190325gitba33f9e
diff --git a/swift-unwrapped.patch b/swift-unwrapped.patch
deleted file mode 100644
index 0f88eb0..0000000
--- a/swift-unwrapped.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- swiftpm/Sources/Basic/Process.swift.orig 2019-03-13 14:27:25.426760197 -0500
-+++ swiftpm/Sources/Basic/Process.swift 2019-03-13 14:28:45.656837626 -0500
-@@ -327,7 +327,7 @@
- let devNull = strdup("/dev/null")
- defer { free(devNull) }
- // Open /dev/null as stdin.
-- posix_spawn_file_actions_addopen(&fileActions, 0, devNull, O_RDONLY, 0)
-+ posix_spawn_file_actions_addopen(&fileActions, 0, devNull!, O_RDONLY, 0)
-
- var outputPipe: [Int32] = [0, 0]
- var stderrPipe: [Int32] = [0, 0]
-@@ -350,7 +350,7 @@
-
- let argv = CStringArray(arguments)
- let env = CStringArray(environment.map({ "\($0.0)=\($0.1)" }))
-- let rv = posix_spawnp(&processID, argv.cArray[0], &fileActions, &attributes, argv.cArray, env.cArray)
-+ let rv = posix_spawnp(&processID, argv.cArray[0]!, &fileActions, &attributes, argv.cArray, env.cArray)
-
- guard rv == 0 else {
- throw SystemError.posix_spawn(rv, arguments)
diff --git a/swift.patch b/swift.patch
new file mode 100644
index 0000000..80cc2c8
--- /dev/null
+++ b/swift.patch
@@ -0,0 +1,23 @@
+diff -Naur swift-orig/utils/build-presets.ini swift/utils/build-presets.ini
+--- swift-orig/utils/build-presets.ini 2020-02-10 23:48:46.000000000 -0600
++++ swift/utils/build-presets.ini 2020-02-13 20:40:30.123310629 -0600
+@@ -527,7 +527,6 @@
+ release
+ assertions
+
+-build-swift-stdlib-unittest-extra
+
+ # We run the OS X tests and validation tests.
+ test
+diff -Naur swift-orig/utils/swift_build_support/swift_build_support/host_specific_configuration.py swift/utils/swift_build_support/swift_build_support/host_specific_configuration.py
+--- swift-orig/utils/swift_build_support/swift_build_support/host_specific_configuration.py 2020-02-10 23:48:46.000000000 -0600
++++ swift/utils/swift_build_support/swift_build_support/host_specific_configuration.py 2020-02-13 20:22:27.615497246 -0600
+@@ -12,7 +12,7 @@
+
+ from argparse import ArgumentError
+
+-import diagnostics
++from . import diagnostics
+
+ from .targets import StdlibDeploymentTarget
+