5.0.0 Canary
Pacstall v5.0.0 Canary ![Canary](https://camo.githubusercontent.com/01f468cfaa1d40e08c5902c800e05ce4abab17ecf1a6b5b29cca23c4f5abfcad/68747470733a2f2f7777772e68746d6c637373636f6c6f722e636f6d2f707265766965772f313238783132382f4646454630302e706e67)
This update is a major update focusing on quality of life features and enhanced security and functionality. Users can update from Pacstall 4.0.0 or higher with pacstall -U pacstall:master
, or reinstall using the deb file.
Developers, Developers, Developers...
BREAKING CHANGES
- Use
bwrap
when running functions by @D-Brox & @oklopfer (#1068, #1069, #1075) url
->source[@]
by @oklopfer (#1038)homepage
->url
by @oklopfer (#1051)replace
->replaces
by @Elsie19 (#1016)SRCDIR
->PACDIR
by @oklopfer (#1045)name
->pkgname
by @Elsie19 (#1017)hash
->*sums[@]
by @oklopfer (#1053)maintainer
->maintainer[@]
by @Elsie19 (#1022)STOWDIR
->STAGEDIR
by @D-Brox (#1097)- Mark
pacdeps
as deps for-deb
packages by @oklopfer (#1062) - Require
cd
forbuild/prepare/check/package
functions by @oklopfer (#1059)
Features
- Add version constraints to all
*depends
arrays by @Elsie19 (#1021) - Add
check()
function and-Nc/--nocheck
optional flag by @oklopfer (#1056) - Add
{pre,post}_upgrade
&pre_remove
functions by @oklopfer (#1055) - Add
conflicts
array by @oklopfer (#1054) - Add
nosubmodules
array by @oklopfer (#1060) - Add
license
array by @oklopfer (#1063) - Add
var_CARCH
style arrays by @oklopfer (#1073) - Add
checkdepends
array by @oklopfer (#1072) - Add
-Qa/--quality-assurance
command by @oklopfer (#1089) - Add
-Q/--quiet
optional flag by @oklopfer (#1092) - Show if you are in a develop branch when using
-V
by @D-Brox (#1081)
Bug Fixes
- Fix upgrading with multiple repos by @D-Brox & @oklopfer (#1049, #1071)
- Export
CARCH
&DISTRO
on upgrades by @oklopfer (#1047) - Unset
compatible
during building by @oklopfer (#1058) - Reenable prompting on pacdeps when not using the
-P
flag by @D-Brox (#1079) - Fix argument parsing and handling by @D-Brox (#1080)
For the Pacscript Maintainers
How to use the new features and deal with the breaking changes
bwrap
- Remove
sudo
calls in pacscripts - Internet access is restricted while pacscript functions are running (bypass if you need to with
external_connection=true
).
With bwrap, potentially dangerous scripts are locked down, by giving the child processes read-only access to every directory except the $PACDIR
source directory and the pkgdir
staging directory. This will also kill any child processes after bwrap is finished, meaning that no extra code could possibly be left running after.
Require cd
for functions
With the introduction of source[@]
, pacscript functions will no longer be run from the unarchived download, instead they will be run from $srcdir
. To maintain compatibility with pre-5.0.0 scripts, we have put cd "${_archive}"
into all pacscript functions on our 5.0.0 master
branch, which can be used to enter source[0]
once extracted.
Version constraints & alternative dependencies
Sometimes when making a pacscript, only certain versions of an apt package will work in conjunction with your package, and until now, the only way to solve that was to make a pacdep on the appropriate version, which is clunky, so now, you can optionally specify version constraints and alternate dependencies on packages. The syntax is as follows:
You may include a version constraint after a package name in the form of pkg>=version
, pkg<=version
, pkg=version
, pkg>version
, pkg<version
.
After the version with an optional constraint, you may use a pipe to provide alternate dependencies.
depends=("foo>=1.2.3 | bar<=1.2.3")
makedepends=("libfoo=1.0.1")
optdepends=("libidk:i386<5.2.3 | libidk:i386>1.2.5: provides libidk support")
url
to source[@]
You can now include multiple files to be downloaded by pacstall, meaning you won't have to make pacscripts like neovide-bin, upscayl-app or sidequest. This should remove a lot of headaches with download files.
You can even have sources defined by multiple architectures, such as if you ever needed to download a specific config file for a specific architecture.
To change from pre-5.0.0 scripts into 5.0.0, change all instances of url
(variable) into source
(array). Architecture specific sources are defined like source_$arch
.
π Examples
Let's take amfora-bin
for example (https://github.com/pacstall/pacstall-programs/blob/76398ebda1f31e140c48b2d4b562d1127bd37a8b/packages/amfora-bin/amfora-bin.pacscript):
url="https://github.com/makeworld-the-better-one/amfora/releases/download/v${pkgver}/amfora_${pkgver}_linux_64-bit"
hash="a468f97f0e3fa1d69868980fd0e5893388ccd9c849874d26e4d0b426fd6bff3e"
...
wget -q https://roboticoverlords.org/amfora.png
if [[ "$(sha256sum amfora.png | cut -d' ' -f 1)" != "3d029d05cff8c42e82685ce7a61fcaa2118e4cbb6a547816a7d5150868a11092" ]]; then
fancy_message error "Checksum for amfora.png failed"
return 1
fi
wget -q https://raw.githubusercontent.com/makeworld-the-better-one/amfora/master/amfora.desktop
if [[ "$(sha256sum amfora.desktop | cut -d' ' -f 1)" != "812e1faad6f6d4817eac60d36813472afebe2980cd2e661151a3d98669274207" ]]; then
fancy_message error "Checksum for amfora.desktop failed"
return 1
fi
We can now do something like:
sha256sums=(
"a468f97f0e3fa1d69868980fd0e5893388ccd9c849874d26e4d0b426fd6bff3e"
"3d029d05cff8c42e82685ce7a61fcaa2118e4cbb6a547816a7d5150868a11092"
"812e1faad6f6d4817eac60d36813472afebe2980cd2e661151a3d98669274207"
)
source_amd64=(
"https://github.com/makeworld-the-better-one/amfora/releases/download/v${pkgver}/amfora_${pkgver}_linux_64-bit"
"https://roboticoverlords.org/amfora.png"
"https://raw.githubusercontent.com/makeworld-the-betterne/amfora/master/amfora.desktop"
)
nosubmodules
array
Pacstall by default will clone git sources with submodules, but some maintainers may not need that, so now you may use the nosubmodules
array which takes destination names from source[@]
. For instance:
source=(
"https://github.com/rhino-linux/rhino-pkg.git"
"https://github.com/tamton-aquib/stuff.nvim.git"
)
nosubmodules=("rhino-pkg")
will clone rhino-pkg.git
without submodules but will clone with submodules for stuff.nvim.git
.
homepage
to url
This is a simple name change to conform to PKGBUILDs.
replace
to replaces
This is a simple name change to conform to PKGBUILDs.
hash
to *sums
To conform to PKGBUILDs, the hash
variable has been replaced with an array *sums
. You now have the following options for specifying hashs:
sha256sums
(should be used by default; what pacstall pre-5.0.0 used)sha512sums
sha384sums
sha224sums
sha1sums
md5sums
b2sums
Along with these, you can have architecture specific sums arrays, which should compliment source_$arch
in the form of *sums_$arch
. If you want to include some hashes to check, but not for certain files, you can put SKIP
as the value corresponding to the source
array.
maintainer
to maintainer[@]
The maintainer
variable is now an array, where the first value becomes what apt sees as the maintainer, and everyone after will be seen as an "uploader".
check()
function
The check
function is used just like it is in PKGBUILDs, which will be run between build()
and package()
. Here is where maintainers should run any tests to check that the final binary or source code runs as it should. You can skip this function with the -Nc/--nocheck
flag.
conflicts
array
On pre-5.0.0 pacstall, the only way to prevent certain packages from replacing others was with breaks
, but dpkg can get more specific. Both breaks
and conflicts
will declare incompatibilities, but they have very subtle differences during installation:
breaks
will tell dpkg that the two packages can be unpacked on the system at the same time, even though one will be uninstalled soon.
conflicts
will tell dpkg that both cannot be unpacked on the system at the same time; one must be uninstalled before the other one is installed. A common example of this is two packages that both have a file in the same location.
If you are a pacscript maintainer and you have an array like this:
breaks=("${gives}-git" "${gives}-bin")
That should now be using the conflicts
array.
license
array
You may now specify licenses. Licenses must be one of the identifiers on https://spdx.org/licenses/, or to specify a custom license, prefix the value with custom:
-Qa/--quality-assurance
command
This is an internalization of https://github.com/pacstall/pacstall-qa, rewritten purely in Bash. You can pass this command to test a package PR before it fully lands upstream. The syntax looks like one of the following:
pacstall -Qa firefox-bin#5853
pacstall -Qa firefox-bin#5853@github:pacstall/pacstall-programs
pacstall -Qa firefox-bin@github:pacstall/pacstall-programs#5853
Where:
- the
package
is given first, followed by the pull requestNUM
, separated by a#
. - Optionally, a
metalink
separated by a@
may be provided before or after the#NUM
.- The
metalink
is broken down into 3 parts:provider
,owner
, andrepo
. - The
owner
should be the owner of the repository the PR is being merged into, not the user who created the PR.
- The
- No other flags should be provided to this command.
Pacscript for this releases Deb
pkgname="pacstall"
pkgver="5.0.0"
pkgdesc="An AUR-inspired package manager for Ubuntu
Pacstall is the AUR Ubuntu wishes it had. It takes the concept of the AUR
and puts a spin on it, making it easier to install and update downstream programs,
without scouring github repos and the likes."
url='https://pacstall.dev'
depends=(
'bash'
'curl'
'wget'
'git'
'unzip'
'zstd'
'tar'
'sensible-utils'
'iputils-ping'
'lsb-release'
'aptitude'
'bubblewrap'
'build-essential'
'ninja-build'
'meson'
'jq'
)
optdepends=(
"axel: faster file downloads"
)
maintainer=(
"Pacstall Team <pacstall@pm.me>"
"Elsie19 <hwengerstickel@pm.me>"
)
backup=('usr/share/pacstall/repo/pacstallrepo' 'usr/share/pacstall/update')
source=("https://github.com/pacstall/pacstall/archive/refs/tags/${pkgver}.zip")
prepare() {
cd "${pkgname}-${pkgver}"
mkdir -p "${pkgdir}/usr/bin/"
mkdir -p "${pkgdir}/usr/share/pacstall/scripts/"
mkdir -p "${pkgdir}/usr/share/pacstall/repo/"
mkdir -p "${pkgdir}/usr/share/man/man8/"
mkdir -p "${pkgdir}/usr/share/bash-completion/completions"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d"
mkdir -p "${pkgdir}/var/log/pacstall/error_log/"
mkdir -p "${pkgdir}/var/lib/pacstall/metadata/"
mkdir -p "${pkgdir}/var/cache/pacstall/"
mkdir -p "${pkgdir}/usr/src/pacstall/"
}
package() {
cd "${pkgname}-${pkgver}"
install -Dm755 pacstall "${pkgdir}/usr/bin/"
install -Dm755 "misc/scripts"/* "${pkgdir}/usr/share/pacstall/scripts/"
install "misc/pacstall.8.gz" "${pkgdir}/usr/share/man/man8/"
install "misc/completion/fish" "${pkgdir}/usr/share/fish/vendor_completions.d/pacstall.fish"
install "misc/completion/bash" "${pkgdir}/usr/share/bash-completion/completions/pacstall"
echo "https://raw.githubusercontent.com/pacstall/pacstall-programs/master" | tee "${pkgdir}/usr/share/pacstall/repo/pacstallrepo" > /dev/null
}
![Yellow Pac with wings](https://private-user-images.githubusercontent.com/58742515/323412343-0bb3ca31-f9e3-4a45-baa7-ba40f4ba4d31.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwODA0MzEsIm5iZiI6MTcxODA4MDEzMSwicGF0aCI6Ii81ODc0MjUxNS8zMjM0MTIzNDMtMGJiM2NhMzEtZjllMy00YTQ1LWJhYTctYmE0MGY0YmE0ZDMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjExVDA0Mjg1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY5NmVmYWVkYzRjNGVhNDljMDE2MTliM2I0NmNjOTA1ZDNmNTI0MTM0NGZlYmM3ZTU0NGM0NDdhYTA2NzBjY2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.OK53txxuF6Ze0dFCDlF-JrPscZPZwbTmnRziOXLpFFA)