Skip to content

Update the filename from swift-lang to swiftlang #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions platforms/Linux/Fedora/34/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ RUN yum install -y rpmdevtools yum-utils

# Add the spec
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
ADD swift-lang.spec /root/rpmbuild/SPECS/swift-lang.spec
ADD swiftlang.spec /root/rpmbuild/SPECS/swiftlang.spec


# Install all the dependencies needed to build Swift from the spec file itself
RUN yum-builddep -y /root/rpmbuild/SPECS/swift-lang.spec
RUN yum-builddep -y /root/rpmbuild/SPECS/swiftlang.spec

# Get the sources for Swift as defined in the spec file
RUN spectool -g -R /root/rpmbuild/SPECS/swift-lang.spec
RUN spectool -g -R /root/rpmbuild/SPECS/swiftlang.spec

# Add the patches
ADD patches/*.patch /root/rpmbuild/SOURCES/
Expand Down
2 changes: 1 addition & 1 deletion platforms/Linux/Fedora/34/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ yum -y update
# will have two files: a SRPM file which contains the source files
# as well as a regular RPM file that can be installed via `dnf' or `yum'
pushd $HOME/rpmbuild/SPECS
rpmbuild -ba ./swift-lang.spec 2>&1 | tee $HOME/build-output.txt
rpmbuild -ba ./swiftlang.spec 2>&1 | tee $HOME/build-output.txt
popd

# Include the build log which can be used to determine what went
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%global swift_crypto_version 1.1.5
%global ninja_version 1.10.2

Name: swift-lang
Name: swiftlang
Version: 5.5
Release: 1%{?dist}
Summary: Apple's Swift programming language
Expand Down
6 changes: 3 additions & 3 deletions platforms/Linux/Fedora/35/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ RUN yum install -y rpmdevtools yum-utils

# Add the spec
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
ADD swift-lang.spec /root/rpmbuild/SPECS/swift-lang.spec
ADD swiftlang.spec /root/rpmbuild/SPECS/swiftlang.spec


# Install all the dependencies needed to build Swift from the spec file itself
RUN yum-builddep -y /root/rpmbuild/SPECS/swift-lang.spec
RUN yum-builddep -y /root/rpmbuild/SPECS/swiftlang.spec

# Get the sources for Swift as defined in the spec file
RUN spectool -g -R /root/rpmbuild/SPECS/swift-lang.spec
RUN spectool -g -R /root/rpmbuild/SPECS/swiftlang.spec

# Add the patches
ADD patches/*.patch /root/rpmbuild/SOURCES/
Expand Down
2 changes: 1 addition & 1 deletion platforms/Linux/Fedora/35/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ yum -y update
# will have two files: a SRPM file which contains the source files
# as well as a regular RPM file that can be installed via `dnf' or `yum'
pushd $HOME/rpmbuild/SPECS
rpmbuild -ba ./swift-lang.spec 2>&1 | tee $HOME/build-output.txt
rpmbuild -ba ./swiftlang.spec 2>&1 | tee $HOME/build-output.txt
popd

# Include the build log which can be used to determine what went
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%global swift_crypto_version 1.1.5
%global ninja_version 1.10.2

Name: swift-lang
Name: swiftlang
Version: 5.5
Release: 1%{?dist}
Summary: Apple's Swift programming language
Expand Down
16 changes: 8 additions & 8 deletions platforms/Linux/Fedora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Builds the container image
### `patches/*.patch`
Any post-release patches that have not yet been merged upstream that are
temporarily necessary to build Swift.
### `swift-lang.spec`
### `swiftlang.spec`
The "recipe" the RPM packaging tools use to build Swift.

## Building Swift Via Linux Containers
Expand Down Expand Up @@ -54,17 +54,17 @@ locally
RPMs are built in the `$HOME/rpmbuild` directory, which has several subdirectories
for specific purposes.
1. `mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}`
2. `cp swift-lang.spec $HOME/rpmbuild/SPECS`
2. `cp swiftlang.spec $HOME/rpmbuild/SPECS`
3. `cp *.patch $HOME/rpmbuild/SOURCES`
#### Install all the dependencies necessary to build Swift:
4. `sudo dnf builddep -y $HOME/rpmbuild/SPECS/swift-lang.spec`
4. `sudo dnf builddep -y $HOME/rpmbuild/SPECS/swiftlang.spec`
#### Download the Swift source tarballs:
5. `spectool -g -R $HOME/rpmbuild/SPECS/swift-lang.spec`
5. `spectool -g -R $HOME/rpmbuild/SPECS/swiftlang.spec`
### Building Swift
The RPM tools perform both building and packaging. _This process may take several
hours depending on the hardware Fedora is running on._

`rpmbuild -ba $HOME/rpmbuild/SPECS/swift-lang.spec 2>&1 | tee $HOME/build-output.txt`
`rpmbuild -ba $HOME/rpmbuild/SPECS/swiftlang.spec 2>&1 | tee $HOME/build-output.txt`

If there were no errors, the resulting Swift RPM file will be located in
`$HOME/rpmbuild/RPMS/` in a subdirectory for the current processor architecture
Expand All @@ -73,8 +73,8 @@ If there were no errors, the resulting Swift RPM file will be located in
## Installing Swift
### Name format
If Swift was built successfully there should
be a file with the name format similar to `swift-lang-5.5-1.fc34.x86_64.rpm` where
`5.5` is the version of Swift specified in `swift-lang.spec`, `fc34` is the version
be a file with the name format similar to `swiftlang-5.5-1.fc34.x86_64.rpm` where
`5.5` is the version of Swift specified in `swiftlang.spec`, `fc34` is the version
of Fedora that was used to build Swift, and `x86_64` is the processor architecture.

### Note about Fedora versions
Expand All @@ -85,6 +85,6 @@ a Swift RPM built for Fedora 34 can only be installed on Fedora 34.
To install the Swift RPM, change to the directory that contains the RPM file and
run `sudo dnf install` _the Swift RPM file_ e.g.

`sudo dnf install ./swift-lang-5.5-1.fc34.x86_64.rpm`
`sudo dnf install ./swiftlang-5.5-1.fc34.x86_64.rpm`


6 changes: 3 additions & 3 deletions platforms/Linux/Fedora/rawhide/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ RUN yum install -y rpmdevtools yum-utils

# Add the spec
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
ADD swift-lang.spec /root/rpmbuild/SPECS/swift-lang.spec
ADD swiftlang.spec /root/rpmbuild/SPECS/swiftlang.spec


# Install all the dependencies needed to build Swift from the spec file itself
RUN yum-builddep -y /root/rpmbuild/SPECS/swift-lang.spec
RUN yum-builddep -y /root/rpmbuild/SPECS/swiftlang.spec

# Get the sources for Swift as defined in the spec file
RUN spectool -g -R /root/rpmbuild/SPECS/swift-lang.spec
RUN spectool -g -R /root/rpmbuild/SPECS/swiftlang.spec

# Add the patches
ADD patches/*.patch /root/rpmbuild/SOURCES/
Expand Down
2 changes: 1 addition & 1 deletion platforms/Linux/Fedora/rawhide/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ yum -y update
# will have two files: a SRPM file which contains the source files
# as well as a regular RPM file that can be installed via `dnf' or `yum'
pushd $HOME/rpmbuild/SPECS
rpmbuild -ba ./swift-lang.spec 2>&1 | tee $HOME/build-output.txt
rpmbuild -ba ./swiftlang.spec 2>&1 | tee $HOME/build-output.txt
popd

# Include the build log which can be used to determine what went
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%global swift_crypto_version 1.1.5
%global ninja_version 1.10.2

Name: swift-lang
Name: swiftlang
Version: 5.5
Release: 1%{?dist}
Summary: Apple's Swift programming language
Expand Down
4 changes: 2 additions & 2 deletions platforms/Linux/amazonlinux/2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ RUN yum install -y rpmdevtools yum-utils createrepo
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# Optimization: Install all the dependencies needed to build Swift from the spec file itself
ADD swift-lang.spec /tmp/swift-lang.spec
ADD swiftlang.spec /tmp/swiftlang.spec
RUN touch /tmp/metadata.inc # fake metadata is okay for this optimization
RUN cd /tmp && yum-builddep -y swift-lang.spec
RUN cd /tmp && yum-builddep -y swiftlang.spec
8 changes: 4 additions & 4 deletions platforms/Linux/amazonlinux/2/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ yum update -y
mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

# Add the spec
cp swift-lang.spec $HOME/rpmbuild/SPECS/
cp swiftlang.spec $HOME/rpmbuild/SPECS/
# Add the metadata for this swift version
cp /shared/metadata.inc $HOME/rpmbuild/SPECS/
# Add any patches
cp patches/*.patch $HOME/rpmbuild/SOURCES/

pushd $HOME/rpmbuild/SPECS
# install all the dependencies needed to build Swift from the spec file itself
yum-builddep -y ./swift-lang.spec
yum-builddep -y ./swiftlang.spec
# get the sources for Swift as defined in the spec file
spectool -g -R ./swift-lang.spec
spectool -g -R ./swiftlang.spec
# Now we proceed to build Swift. If this is successful, we
# will have two files: a SRPM file which contains the source files
# as well as a regular RPM file that can be installed via `dnf' or `yum'
rpmbuild -ba ./swift-lang.spec 2>&1 | tee /root/build-output.txt
rpmbuild -ba ./swiftlang.spec 2>&1 | tee /root/build-output.txt
popd

# Include the build log which can be used to determine what went
Expand Down
4 changes: 2 additions & 2 deletions platforms/Linux/centos/7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ RUN yum install -y rpmdevtools yum-utils createrepo
RUN yum install -y epel-release centos-release-scl

# Optimization: Install all the dependencies needed to build Swift from the spec file itself
ADD swift-lang.spec /tmp/swift-lang.spec
ADD swiftlang.spec /tmp/swiftlang.spec
RUN touch /tmp/metadata.inc # fake metadata is okay for this optimization
RUN cd /tmp && yum-builddep -y swift-lang.spec
RUN cd /tmp && yum-builddep -y swiftlang.spec
8 changes: 4 additions & 4 deletions platforms/Linux/centos/7/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ yum update -y
mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

# Add the spec
cp swift-lang.spec $HOME/rpmbuild/SPECS/
cp swiftlang.spec $HOME/rpmbuild/SPECS/
# Add the metadata for this swift version
cp /shared/metadata.inc $HOME/rpmbuild/SPECS/
# Add any patches
cp patches/*.patch $HOME/rpmbuild/SOURCES/

pushd $HOME/rpmbuild/SPECS
# install all the dependencies needed to build Swift from the spec file itself
yum-builddep -y ./swift-lang.spec
yum-builddep -y ./swiftlang.spec
# Workaround to support clang-3.5 or a later version
echo -e ". /opt/rh/sclo-git25/enable\n. /opt/rh/llvm-toolset-7/enable\n. /opt/rh/devtoolset-8/enable\n" >> $HOME/.bashrc
source $HOME/.bashrc
sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h
# get the sources for Swift as defined in the spec file
spectool -g -R ./swift-lang.spec
spectool -g -R ./swiftlang.spec
# Now we proceed to build Swift. If this is successful, we
# will have two files: a SRPM file which contains the source files
# as well as a regular RPM file that can be installed via `dnf' or `yum'
rpmbuild -ba ./swift-lang.spec 2>&1 | tee /root/build-output.txt
rpmbuild -ba ./swiftlang.spec 2>&1 | tee /root/build-output.txt
popd

# Include the build log which can be used to determine what went
Expand Down
4 changes: 2 additions & 2 deletions platforms/Linux/centos/8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.n
RUN yum config-manager --set-enabled powertools

# Optimization: Install all the dependencies needed to build Swift from the spec file itself
ADD swift-lang.spec /tmp/swift-lang.spec
ADD swiftlang.spec /tmp/swiftlang.spec
RUN touch /tmp/metadata.inc # fake metadata is okay for this optimization
RUN cd /tmp && yum-builddep -y swift-lang.spec
RUN cd /tmp && yum-builddep -y swiftlang.spec
8 changes: 4 additions & 4 deletions platforms/Linux/centos/8/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ yum update -y
mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

# Add the spec
cp swift-lang.spec $HOME/rpmbuild/SPECS/
cp swiftlang.spec $HOME/rpmbuild/SPECS/
# Add the metadata for this swift version
cp /shared/metadata.inc $HOME/rpmbuild/SPECS/
# Add any patches
cp patches/*.patch $HOME/rpmbuild/SOURCES/

pushd $HOME/rpmbuild/SPECS
# install all the dependencies needed to build Swift from the spec file itself
yum-builddep -y ./swift-lang.spec
yum-builddep -y ./swiftlang.spec
# get the sources for Swift as defined in the spec file
spectool -g -R ./swift-lang.spec
spectool -g -R ./swiftlang.spec
# Now we proceed to build Swift. If this is successful, we
# will have two files: a SRPM file which contains the source files
# as well as a regular RPM file that can be installed via `dnf' or `yum'
rpmbuild -ba ./swift-lang.spec 2>&1 | tee /root/build-output.txt
rpmbuild -ba ./swiftlang.spec 2>&1 | tee /root/build-output.txt
popd

# Include the build log which can be used to determine what went
Expand Down