-
Notifications
You must be signed in to change notification settings - Fork 38
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
Debian packaging for Ubuntu 20.04 #90
Conversation
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.
Please include pull request from swift and swift-integration-test repo to keep track for future release.
platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir
Outdated
Show resolved
Hide resolved
@jblache do you have some packages you have built with this system that we can download and test?
This seems to imply there are 2 deb packages being created. Is this correct or am I reading it wrong? |
Soon! We've got some work left to do before we can make these packages available on an experimental basis.
You are correct. There will be a |
@jblache could you explain who 'we' is. It would be good to have some contact details and more information. The concept of having 2 .deb install packages is very strange for this use case. The We have discussed previously about using the |
It depends on what you want to achieve. We're providing flexibility with the split packaging so you can run the latest and greatest as your default, easily-accessible Swift version, and have other versions handy as needed, or the other way around, or any other setup that answers your need of the moment.
Unless you are thinking of alternatives here, postinst should absolutely not create symlinks. All files and symlinks must ship in packages, or be controlled by a proper mechanism (e.g. alternatives). Orphan symlinks are a usability and security nightmare.
Use of When we get to a more modular build that allows for better integration into the system, we'll relocate out of This is only the start, and not the end state. |
This goes against everything we have discussed previously. If the aim now is just to get some deb packages built as quick and easy as possible, and hide all the issues so you don't have to deal with them, there are far better and efficient ways do it than what is proposed in this PR. |
@futurejones @jblache @shahmishal we absolutely can and should use a different location than its worth exploring the two packages solution further. iiuc the idiomatic way of doing this is using alternatives so we should explore how hard it is to adopt that in the initial drop, or if it okay to leave as a second step. |
Updates to address feedback upcoming after a full build completes. |
6924ad6
to
2fe2292
Compare
@jblache Have you tested this?
This will cause the |
That is indeed the goal, it is however not the entire nor sole purpose. Packages are ultimately a convenience, and denying this convenience to users and developers until we perfect the packages to the point they meet the criteria for inclusion does not help anyone. This will be a lengthy journey as there are extensive changes to be made. In recognition of these hard facts, we worked on a phased approach that will gradually improve the quality, correctness, and system integration of the packages as progress is made on the underlying required changes. I understand that you disagree with this approach and I encourage you to share your feedback so we can address any issues that we might have overlooked. As proposed here, the packages are equivalent to deploying the Swift binary tarball to /opt. They are convenient in the sense that they can be used and managed through the package manager, can be depended upon in local packages, and carry dependency information (so you won't remove dependencies by accident). As they stay out of the way of the rest of the system, they are safe and don't risk conflicting with other packages and causing trouble (as I gather happened with lld). I don't think it is ideal, but it is a definite improvement over the current tarball situation. As far as distribution inclusion goes, and speaking for Debian only because that is what I am most familiar with, there are serious obstacles to this in the current state of things. To name a few off the top of my head, and in no particular order:
While some of these may seem easy to fix, the fixes do represent substantial changes to the build system and/or release management process that need to be worked out, scoped, scheduled, and implemented. In the end, libdispatch, Foundation, CMark4Swift (and the ones I'm forgetting, if any) should be self-standing and packaged on their own. The build should use the system's CMake, and if necessary a backported CMake should be provided. Resolving the LLVM situation is something I don't have a good grasp on at this time, and there are a few different routes this could go. At the end of it all, once we'll have achieved the perfect packages, we will have one more piece to add: we'll need to define how Swift software/modules can be packaged, write up the policy, and implement the helper tools to go with it. This is largely a green field, guided by existing, similar mechanisms that exist in Debian today for other languages. Contributions are always welcome; there is a good amount of interesting work to be done, especially on that later bit. If you have any ideas, we're happy to hear them and discuss possible solutions. |
The symlinks listed in that file will be incorporated into the
Any given system can have 1..n |
@tkremenek @tomerd @shahmishal Can you please explain who @jblache is and what position he has in the Packaging for Debian project. His comments above read like a politicians' election speech and show a total lack of knowledge or disregard for all the people who have been working on this for many years.
wtf, lost for words ...
Who is we and where is this happening? Who are the team members, where are the meeting minutes, where are the forum discussions? Where is the project plan, timeline etc.?
@jblache I encourage you to take some time to read other PR's, comments, forum posts and bug reports so you can find all the work that other people have done that you have overlooked. |
@futurejones per our discussions on forums.swift.org following your message from 4/4, we will move forward with this PR in order to make progress with this project. @shahmishal myself and the other contributors involved continue to hold the position that working collaboratively is the best path to success, and would very much like to see you be part of this project. As such things go, it requires all parties to be open to differences in opinions and achieving progress through the principal of "rough consensus and running code". |
This PR introduces the Debian packaging we've been working on; it was done on Ubuntu 20.04 and should port without too much trouble to 18.04 and later versions.
We install Swift under
/opt
to stay out of the way of the packaging system with this monolith package approach; a default package is produced alongside the monolith that installs symlinks in the PATH for a default Swift version. The monolith packages are co-installable, as they are versioned with the Swift release.This produces a large amount of lintian warnings due to files in
/opt
, and those are unfortunately non-overridable. There are other warnings that we can address in time that are more valid, starting with the binaries that embed an RPATH pointing at the package's build directory.The
debian/copyright
file remains a TODO as we have discussed.To build the source package, use
debian/getsource.sh
according to the instructions within.In the current state, the packaging carries a few patches that are a burden for build automation, as patches must apply cleanly (no fuzz) at build time. The script above attempts to help with that by refreshing the patches automatically, however, that will certainly fail at some point in time.
Some packaging files are templated and generated by the
clean
target indebian/rules
; this is to handle the versioned package name for the monolith.Related pull requests corresponding to the patches in
debian/patches
:swiftlang/swift#41738
swiftlang/swift#41739
swiftlang/swift#41758
swiftlang/swift-integration-tests#97