Skip to content
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

Add Debian packaging policy and sample package documents. #62

Closed
wants to merge 1 commit into from
Closed

Add Debian packaging policy and sample package documents. #62

wants to merge 1 commit into from

Conversation

futurejones
Copy link
Contributor

@futurejones futurejones commented Nov 23, 2021

Added a Debian Policy document to outline the procedure to get packages accepted into the official Debian repositories. I have included links to reference docs for further information.

Included in the PR are sample build instructions for a ubuntu/focal deb package for initial testing. The test results have been reported in SR-15515.

While testing I created several packages to test the alternate installation locations as discussed in previous PR's opt and libexec.
It appears that like fedora, debian does not allow installation in the opt directory.
Installation into the libexec also caused many warnings.

Copy link
Member

@shahmishal shahmishal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @futurejones for the policy, it looks good to me.

@shahmishal
Copy link
Member

cc: @tomerd for additional review

@shahmishal
Copy link
Member

Installation into the libexec also caused many warnings.

What kind of warnings are we seeing here?

@futurejones
Copy link
Contributor Author

opt gives the following error for every file found in opt

E: swiftlang: dir-or-file-in-opt opt/bin/
N: 
N:    Debian packages should not install into /opt, because it is reserved for
N:    add-on software.
N:    
N:    Refer to Filesystem Hierarchy Standard (/opt : Add-on application
N:    software packages) for details.
N:    
N:    Severity: error
N:    
N:    Check: files/hierarchy-standard

libexec gives the following warning for every file found in libexec

W: swiftlang: file-in-unusual-dir libexec/swift/bin/clang
N: 
N:    This file or symbolic link is in a directory where files are not
N:    normally installed by Debian packages.
N:    
N:    Severity: warning
N:    
N:    Check: files/hierarchy-standard

@shahmishal
Copy link
Member

@drexin pointed out we might be able to use /usr/lib instead of /usr/libexec on Debian. @futurejones thoughts?

https://lists.debian.org/debian-devel/2005/05/msg00401.html

@futurejones
Copy link
Contributor Author

@shahmishal, I was looking at the same thing. /usr/lib is used by a large number of existing installations in Debian and Ubuntu.
The official Debian usage of the /usr/lib directory does allow for more complex programs with subdirectories.
https://manpages.debian.org/bullseye/manpages/hier.7.en.html
Where as the usage /usr/libexec is more restricted.
I will build some new packages using /usr/lib and run some tests.

@shahmishal
Copy link
Member

@futurejones Did /usr/lib option work?

@futurejones
Copy link
Contributor Author

@shahmishal
Yes /usr/lib seems to be a viable option. I have been doing a heap of testing and so far there have been no errors or warnings about using usr/lib.

I was looking at the symlinks needed for swift, swiftc in /usr/bin

ln -fs %{_libexecdir}/swift/bin/swift %{buildroot}%{_bindir}/swift
ln -fs %{_libexecdir}/swift/bin/swiftc %{buildroot}%{_bindir}/swiftc

Currently they are being linked to swift and swiftc but these are already symlinks to swift-frontend.
Should we be linking directly to swift-frontend?

@shahmishal
Copy link
Member

Should we be linking directly to swift-frontend?

I dont think so, do you see any benefits on linking directly?

@futurejones
Copy link
Contributor Author

I don't know of any benefit, I was just wondering as to the reasoning of creating symlinks to symlinks.

@shahmishal
Copy link
Member

@futurejones This is ready to be merged once we update the doc to contain the info about using /usr/lib and which binaries will be symlink.

@futurejones
Copy link
Contributor Author

@shahmishal @tomerd @jblache
#90 indicates that you are no longer taking items discussed and approved in this PR with any importance. Also it is very clear that the whole Debian packaging system is no longer being discussed openly in the community and is being handled in house and only by paid apple employees.
It appears that community input is no longer wanted or needed.
I am closing this PR as it is not relevant anymore.

@tomerd
Copy link
Contributor

tomerd commented Mar 26, 2022

@futurejones sorry to hear that the work on #90 had left this impression, it was not the intention and my guess is that what we have here is a communication breakdown of some sorts

the work on #90 started since this PR and more generally debian packaging had no progress for many months. there is a strong desire to make progress on offering debian packages along side the RPMs swift.org is already offering. very much like this PR, #90 is a proposal - a PR that is open for community review, feedback and discussion. this project welcomes the involvement of everyone that cares to contribute to the effort including Apple employees and community members

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants