-
Notifications
You must be signed in to change notification settings - Fork 40
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
Package 5.7.2 for Ubuntu (focal, jammy), re-divide into lib / dev / bin + metapkg, automated ppa:swiftlang/swiftlang deploy #162
base: main
Are you sure you want to change the base?
Changes from all commits
aaa7206
4eebf68
8d0350e
8b38ef9
e300a23
7dd1572
febb450
c367a8c
579af96
a30222a
d4a372f
ccfce2e
9e25fbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build signed src package for Launchpad binary build & PPA distrib | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build-ubuntu-packages: | ||
strategy: | ||
matrix: | ||
os: [{version: ubuntu-20.04, codename: focal}, {version: ubuntu-22.04, codename: jammy}] | ||
runs-on: ${{ matrix.os.version }} | ||
environment: swiftlang-ppa | ||
steps: | ||
- name: Import GPG Key | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install build dependencies | ||
run: | | ||
sudo apt install -y --no-install-recommends devscripts dpkg-dev dput equivs rsync | ||
|
||
- name: Build source package | ||
working-directory: platforms/Linux/DEB/Ubuntu/${{ matrix.os.codename }} | ||
run: | | ||
sudo mkdir -p /output | ||
sudo chown $USER /output | ||
bash ./build_deb.sh -s | ||
|
||
- name: Sign source package | ||
working-directory: /output | ||
run: | | ||
debsign -k $DEBSIGN_KEYID swiftlang_*_source.changes | ||
env: | ||
DEBEMAIL: ${{ secrets.DEBEMAIL }} | ||
DEBFULLNAME: ${{ secrets.DEBFULLNAME }} | ||
DEBSIGN_KEYID: ${{secrets.DEBSIGN_KEYID }} | ||
|
||
- name: Copy dput configuration in place | ||
working-directory: platforms/Linux/DEB/Ubuntu | ||
run: cp .dput.cf ~/.dput.cf | ||
|
||
- name: Upload to Launchpad for binary build | ||
working-directory: /output | ||
run: dput ppa:swiftlang/swiftlang swiftlang_*_source.changes | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,37 +10,66 @@ | |
|
||
set -eux | ||
|
||
source_only_pkg=FALSE # build binary deb by default | ||
while getopts ":s" option; do | ||
case $option in | ||
s) | ||
source_only_pkg=TRUE | ||
;; | ||
esac | ||
done | ||
|
||
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# load version definitions | ||
. ${here}/versions.sh | ||
|
||
# working in /tmp since docker file sharing makes this very slow to do dirctly on the share | ||
# working in /tmp since docker file sharing makes this very slow to do directly on the share | ||
staging_dir=/tmp/swift-deb-builder | ||
package_dir=${staging_dir}/swiftlang-${debversion} | ||
|
||
# clean | ||
rm -rf ${package_dir} && mkdir -p ${package_dir} | ||
|
||
# copy control files to pakcage build directory | ||
cp -r ${here}/debian ${package_dir}/ | ||
cp -r ${package_dir}/debian/control.in ${package_dir}/debian/control | ||
# use rsync to copy control, rules, patches files to package build directory, | ||
# including relative symlink targets | ||
rsync --archive --copy-links ${here}/debian ${package_dir}/ | ||
cp ${package_dir}/debian/control.in ${package_dir}/debian/control | ||
|
||
# build the source package | ||
${here}/build_source_package.sh ${staging_dir} | ||
|
||
# install the build dependencies | ||
cd ${staging_dir} | ||
mk-build-deps --install ${package_dir}/debian/control.in --tool 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends' | ||
|
||
if [ -f /.dockerenv ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This conditional was added since I noticed as part of building in Jammy and Focal LXC containers with non-privileged accounts that it was necessary (and conversely plainly adding |
||
root_cmd="" # no --root-cmd assumed needed when executing in container | ||
else | ||
root_cmd="--root-cmd=sudo" | ||
fi | ||
|
||
mk-build-deps --install ${package_dir}/debian/control ${root_cmd} --remove --tool 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends' | ||
|
||
|
||
# build the installable package | ||
# TODO: add signing key information | ||
cd ${package_dir} | ||
DEB_BUILD_OPTIONS=parallel=64 debuild | ||
|
||
if [ "$source_only_pkg" == "TRUE" ]; then | ||
DEB_BUILD_OPTIONS=parallel=64 debuild -uc -us -sa -S | ||
else | ||
DEB_BUILD_OPTIONS=parallel=64 debuild | ||
fi | ||
|
||
# copy the final packages to /output | ||
cd ${staging_dir} | ||
cp *.deb /output/ | ||
cp *.ddeb /output/ | ||
|
||
if [ "$source_only_pkg" == "FALSE" ]; then | ||
cp *.deb /output/ | ||
cp *.ddeb /output/ | ||
fi | ||
|
||
cp *.dsc /output/ | ||
cp *.tar.* /output/ | ||
cp *.changes /output/ | ||
cp *.buildinfo /output/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[swiftlang] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a config file needed for uploading the (signed) source package to Launchpad. |
||
fqdn = ppa.launchpad.net | ||
method = sftp | ||
incoming = ~swiftlang/ubuntu/swiftlang/ | ||
login = swiftlang-uploader | ||
allow_unsigned_uploads = 0 | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
swiftlang (5.7.2-0~focal5) focal; urgency=medium | ||
|
||
* Replaces `swiftlang` + `swiftlang-X.Y.Z` packages with `libswiftlang-X.Y.Z`, `libswiftlang-X.Y.Z-dev`, `swiftlang-X.Y.Z-bin` and meta-package `swiftlang`. | ||
|
||
-- Matias Piipari <[email protected]> Tue, 6 Dec 2022 15:53:00 +0200 | ||
|
||
swiftlang (5.6.0-1) focal; urgency=medium | ||
|
||
* Debian packaging introduction for Swift 5.6. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,45 +3,46 @@ Section: devel | |
Priority: optional | ||
Maintainer: Swift Maintainers <[email protected]> | ||
Build-Depends: debhelper-compat (= 12), devscripts, | ||
clang, cmake, git, icu-devtools, ninja-build, pkg-config, | ||
libcurl4-openssl-dev, libedit-dev, libicu-dev, libncurses5-dev, | ||
libpython3-dev, libsqlite3-dev, libxml2-dev, | ||
python, python-six, python2-dev, python3-six, python3-distutils, python3-psutil, | ||
rsync, swig, systemtap-sdt-dev, tzdata, unzip, uuid-dev | ||
Standards-Version: 4.4.1 | ||
clang, cmake, git, icu-devtools, ninja-build, pkg-config, | ||
libcurl4-openssl-dev, libedit-dev, libicu-dev, libncurses5-dev, | ||
libpython3-dev, libsqlite3-dev, libxml2-dev, | ||
python, python-six, python2-dev, python3-six, python3-distutils, python3-psutil, | ||
rsync, swig, systemtap-sdt-dev, tzdata, unzip, uuid-dev | ||
Standards-Version: 4.6.1 | ||
Homepage: https://www.swift.org | ||
|
||
Package: swiftlang | ||
Architecture: all | ||
Depends: swiftlang-x.y.z, ${misc:Depends} | ||
Description: Swift programming language | ||
Swift is a general-purpose programming language built using | ||
a modern approach to safety, performance, and software design | ||
patterns. | ||
. | ||
The goal of the Swift project is to create the best available | ||
language for uses ranging from systems programming, to mobile | ||
and desktop apps, scaling up to cloud services. Most | ||
importantly, Swift is designed to make writing and maintaining | ||
correct programs easier for the developer. | ||
. | ||
This package contains the convenience symlinks for the latest | ||
version of Swift. | ||
Package: libswiftlang-x.y.z | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends} | ||
Description: Runtime libraries for the Swift programming language | ||
|
||
Package: libswiftlang-x.y.z-dev | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends}, | ||
libc6-dev, libcurl4-openssl-dev, libgcc-9-dev, libstdc++-9-dev, libxml2-dev, | ||
libz3-dev, uuid-dev, zlib1g-dev | ||
Description: Headers, static libraries for the Swift programming language | ||
|
||
Package: swiftlang-x.y.z | ||
Architecture: amd64 arm64 | ||
Package: swiftlang-x.y.z-bin | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends}, | ||
libc6-dev, libcurl4-openssl-dev, libgcc-9-dev, libstdc++-9-dev, libxml2-dev, | ||
libz3-dev, uuid-dev, zlib1g-dev, | ||
binutils, git, pkg-config, tzdata, unzip | ||
python3 | ||
Description: Swift programming language, release x.y.z | ||
Swift is a general-purpose programming language built using | ||
a modern approach to safety, performance, and software design | ||
patterns. | ||
. | ||
The goal of the Swift project is to create the best available | ||
language for uses ranging from systems programming, to mobile | ||
and desktop apps, scaling up to cloud services. Most | ||
importantly, Swift is designed to make writing and maintaining | ||
correct programs easier for the developer. | ||
libswiftlang-x.y.z, libswiftlang-x.y.z-dev, | ||
binutils, git, pkg-config, tzdata, unzip, | ||
python3 | ||
Description: Swift programming language | ||
Swift is a general-purpose programming language built using | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't very sure if perhaps this longer schpiel about Swift should be repeated in the different packages, or should be there only in the meta-package? If the package division in this style is something you want to keep, the descriptions to the individual packages probably needs revisiting still, either way. |
||
a modern approach to safety, performance, and software design | ||
patterns. | ||
The goal of the Swift project is to create the best available | ||
language for uses ranging from systems programming, to mobile | ||
and desktop apps, scaling up to cloud services. Most | ||
importantly, Swift is designed to make writing and maintaining | ||
correct programs easier for the developer. | ||
This package contains the convenience symlinks for the latest | ||
version of Swift. | ||
|
||
Package: swiftlang | ||
Architecture: any | ||
Depends: | ||
libswiftlang-x.y.z, libswiftlang-x.y.z-dev, swiftlang-x.y.z-bin | ||
Description: Virtual package that provides the most recent version of the Swift programming language |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../shared/debian/libswiftlang-dev.install.in |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../shared/debian/libswiftlang.install.in |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared/debian/patches/build-preset-install-dir |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared/debian/patches/cmake_parallel_bootstrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A
-s
option was added to optionally build a source package withbuild_deb.sh
(source package's assets would then be signed and uploaded to an external build server to build the binary package in case of the PPA or later perhaps an Ubuntu or Debian distribution intended package).