Fix current Arch compatibility and package conversion issues - #123
Open
Wyndar wants to merge 7 commits into
Open
Fix current Arch compatibility and package conversion issues#123Wyndar wants to merge 7 commits into
Wyndar wants to merge 7 commits into
Conversation
If no command is specified, fakeroot will default to using whatever login shell the user has. In my case, this is nushell, which breaks the heredoc script piped into fakeroot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR collects several compatibility and conversion fixes (some of which are from previous PRs of other users with merge conflict issues and simplifies the process for you) needed for debtap to work correctly on a current Arch Linux installation.
The changes include:
Explicitly use Bash when invoking fakeroot, avoiding failures for users whose login shell is not Bash.
Add the missing pacman-contrib / namcap dependencies to the README.
Handle the quoted case "$1" in form in Debian maintainer scripts.
Support the current pkgfile cache naming scheme (core.files, extra.files, etc.) while retaining compatibility with the older suffixed format.
Replace scraping of packages.ubuntu.com for the current Ubuntu release with the machine-readable Ubuntu meta-release data.
Correct handling of Debian version epochs in dependency metadata. Dependencies such as:
libx11-6 (>= 2:1.4.99.1)
could previously become invalid Arch dependencies such as:
libx111.4.99.1
They are now translated correctly, e.g.:
libx11>=1.4.99.1
Preserve maintainer-script syntax more faithfully when generating .INSTALL files:
Do not forcibly indent imported script lines, which breaks ordinary <<EOF heredocs.
Only filter actual shebang / set -e lines rather than lines merely containing those strings.
Restrict the automatically, added, and generated filters to comments so valid function names and shell statements are not removed.
Testing
I tested the changes on a current Arch Linux system using a real Debian package with versioned dependencies, Debian epochs, maintainer-script functions, and a heredoc.
The following paths were exercised successfully:
debtap -u
current pkgfile database detection
Ubuntu release detection and database download
.deb → Arch package conversion
versioned dependency translation
pacman dependency resolution
generated .INSTALL validation with bash -n
installation using pacman -U
launching and using the installed application
The conversion originally exposed the pkgfile, Ubuntu release, dependency-epoch, and maintainer-script issues above; after these changes the package converts, installs, and runs successfully.