Skip to content

Commit cf967d5

Browse files
authored
Merge pull request swiftlang#34 from tachoknight/main
Changes to make Fedora more similar to CentOS scripts
2 parents a9e146c + aee9e01 commit cf967d5

22 files changed

+106
-2099
lines changed

platforms/Linux/Fedora/34/Dockerfile

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,28 @@ LABEL PURPOSE="This image is configured to build Swift for the version of Fedora
33

44
WORKDIR /root
55

6+
RUN yum -y update
7+
8+
# RPM and yum development tools
9+
RUN yum install -y rpmdevtools yum-utils
10+
11+
# Add the spec
612
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
713
ADD swift-lang.spec /root/rpmbuild/SPECS/swift-lang.spec
8-
ADD *.patch /root/rpmbuild/SOURCES/
9-
10-
ADD build_swift_rpm.sh /root/build_swift_rpm.sh
11-
RUN chmod +x /root/build_swift_rpm.sh
1214

13-
RUN dnf -y update
1415

15-
# Required for the "rpmbuild" command
16-
RUN dnf install -y fedora-packager fedora-review
16+
# Install all the dependencies needed to build Swift from the spec file itself
17+
RUN yum-builddep -y /root/rpmbuild/SPECS/swift-lang.spec
1718

18-
# Install all the dependencies needed to build Swift from the
19-
# spec file itself
20-
RUN dnf builddep -y /root/rpmbuild/SPECS/swift-lang.spec
21-
# And now get the sources for Swift as defined in the spec file
19+
# Get the sources for Swift as defined in the spec file
2220
RUN spectool -g -R /root/rpmbuild/SPECS/swift-lang.spec
2321

24-
CMD ["/root/build_swift_rpm.sh"]
22+
# Add the patches
23+
ADD patches/*.patch /root/rpmbuild/SOURCES/
24+
25+
# Add the driver script
26+
ADD build_rpm.sh /root/build_rpm.sh
27+
RUN chmod +x /root/build_rpm.sh
28+
29+
30+
CMD ["/root/build_rpm.sh"]

platforms/Linux/Fedora/34/build_swift_rpm.sh renamed to platforms/Linux/Fedora/34/build_rpm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ then
1313
fi
1414

1515
# Always make sure we're up to date
16-
dnf -y update
16+
yum -y update
1717

1818
# Now we proceed to build Swift. If this is successful, we
1919
# will have two files: a SRPM file which contains the source files

platforms/Linux/Fedora/34/swift-for-fedora.patch

Lines changed: 0 additions & 46 deletions
This file was deleted.

platforms/Linux/Fedora/34/swift-lang.spec

Lines changed: 13 additions & 638 deletions
Large diffs are not rendered by default.

platforms/Linux/Fedora/35/Dockerfile

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,28 @@ LABEL PURPOSE="This image is configured to build Swift for the version of Fedora
33

44
WORKDIR /root
55

6+
RUN yum -y update
7+
8+
# RPM and yum development tools
9+
RUN yum install -y rpmdevtools yum-utils
10+
11+
# Add the spec
612
RUN mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
713
ADD swift-lang.spec /root/rpmbuild/SPECS/swift-lang.spec
8-
ADD *.patch /root/rpmbuild/SOURCES/
9-
10-
ADD build_swift_rpm.sh /root/build_swift_rpm.sh
11-
RUN chmod +x /root/build_swift_rpm.sh
1214

13-
RUN dnf -y update
1415

15-
# Required for the "rpmbuild" command
16-
RUN dnf install -y fedora-packager fedora-review
16+
# Install all the dependencies needed to build Swift from the spec file itself
17+
RUN yum-builddep -y /root/rpmbuild/SPECS/swift-lang.spec
1718

18-
# Install all the dependencies needed to build Swift from the
19-
# spec file itself
20-
RUN dnf builddep -y /root/rpmbuild/SPECS/swift-lang.spec
21-
# And now get the sources for Swift as defined in the spec file
19+
# Get the sources for Swift as defined in the spec file
2220
RUN spectool -g -R /root/rpmbuild/SPECS/swift-lang.spec
2321

24-
CMD ["/root/build_swift_rpm.sh"]
22+
# Add the patches
23+
ADD patches/*.patch /root/rpmbuild/SOURCES/
24+
25+
# Add the driver script
26+
ADD build_rpm.sh /root/build_rpm.sh
27+
RUN chmod +x /root/build_rpm.sh
28+
29+
30+
CMD ["/root/build_rpm.sh"]

platforms/Linux/Fedora/rawhide/build_swift_rpm.sh renamed to platforms/Linux/Fedora/35/build_rpm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ then
1313
fi
1414

1515
# Always make sure we're up to date
16-
dnf -y update
16+
yum -y update
1717

1818
# Now we proceed to build Swift. If this is successful, we
1919
# will have two files: a SRPM file which contains the source files

platforms/Linux/Fedora/35/swift-for-fedora.patch

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)