github pacstall/pacstall 4.0.0
4.0.0 Popstar

latest releases: 6.4.0, 6.3.11, 6.3.10...
2 years ago

Pacstall v4.0.0 Popstar Popstar

This update is a major update focusing on quality of life features and enhanced functionality. Users can update from Pacstall 3.14.0 or higher with pacstall -U pacstall:master, or reinstall using the deb file.

Users

Features

Developers, Developers, Developers...

BREAKING CHANGES

  • Remove old deprecations, move more variables to PACBUILD by @Elsie19 (#926)
    • Add pkgrel variable
    • Cascading errors instead of failing out at the first error

Features

Fixes

  • Skip PACSTALL_PAYLOAD on pacdeps by @Elsie19 (#881)
  • Use declare -p to log pacdeps instead of raw array by @Elsie19 (#939)
  • Split LOGDIR into LOGDIR and METADIR by @Elsie19 (#940)
  • Add foreign dpkg architectures for arch by @oklopfer (#942)
  • Do not force remove dependency by @Elsie19 (#944)
  • Show full URL names on check_url instead of appending possibly wrong text by @Elsie19 (#946)
  • Run preinst if deb pacscript has it by @Elsie19 (#947)

Performance changes

Style changes


How to use features

PACBUILD variables

If you are a pacscript maintainer, there are a couple things you must do:

  1. Merging of version and pkgver() (variable/function)
  2. description -> pkgdesc (variable)
  3. build_depends -> makedepends (array)
  4. postinst -> post_install (function)
  5. preinst -> pre_install (function)
  6. removescript -> post_remove (function)
  7. pkgrel (variable)

For the merging of version and pkgver(), you'll need to do the following steps:

If you are a non-git package, rename version to pkgver. If you are a git package, add the pkgver variable and the pkgver() function. The variable should have the latest tag at the time of updating the pacscript, and the pkgver() function should retrieve the latest shasum.

So basically, if you are a non-git package, you have to change a variable name, and if you are a git package, you remove version="$(pkgver)" and add pkgver=<tag>.

We also are introducing the pkgrel variable. This can be used when you wish to trigger an update on a users computer but ${pkgver} has not been changed, such as fixing a broken build process. Unlike PKGBUILDs, this variable is optional and will default to 1 if not included.

👉 Click here to get a simple script to get the tag
url="put in url here"
ver="$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' "${url}" \
    | cut --delimiter='/' --fields=3     \
    | tr '-' '~'                         \
    | sort --version-sort                \
    | tail --lines=1)"
if [[ -z ${ver} ]]; then
  echo "0.0.1" # pkgver should be 0.0.1 if they have no tags yet
else
  echo "${ver}"
fi
📝 Examples

Here we have an old pacscript snippet:

name="foo"
version="1.0.2"
description="A fast fooer"
build_depends=('foo-dev' 'fork')

To convert to 4.0.0, this pacscript should look like this:

name="foo"
pkgver="1.0.2"
pkgdesc="A fast fooer"
makedepends=('foo-dev' 'fork')

Let's try a git pacscript now:

name="foo"
description="A fast fooer"
build_depends=('foo-dev' 'fork')
pkgver() {
  git ls-remote "${url}" master | cut -f1 | cut -c1-8
}
version="$(pkgver)"

To convert to 4.0.0, we do this:

name="foo"
pkgver="3.15.0"
pkgdesc="A fast fooer"
makedepends=('foo-dev' 'fork')
pkgver() {
  git ls-remote "${url}" master | cut -f1 | cut -c1-8
}

More informational -L

If you run pacstall -L now, you'll be seeing something different than before:
Picture of the new -L flag
This will show you much more information about the package. -Qi can still be used to query an individual package information. If -L detects it's being used non-interactively, it will fallback to the old style, which is much more suited for for scripting, so if you are using the output of pacstall -L in a script, nothing should change for you.

Metadata queries in -Qi

Previously, if you wanted the raw metadata to parse or use, you would have to source the metadata file and run what you needed on that. That's not the most effective, so now you can add a second argument to -Qi, which is the name of the piece of metadata you want. They follow the output of -Qi sections, and spaces are replaced with underscores:
Picture describing how -Qi works

-B downloading url on deb packages

The -B flag, which is used to create but not install a deb, doesn't make much sense to use on a deb pacscript, so now, -B on any deb package will download url instead.


Pacscript for this releases Deb
name="pacstall"
pkgver="4.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 programs without scouring
github repos and the likes"
homepage='https://pacstall.dev'
depends=("bash" "curl" "wget" "unzip" "build-essential" "sensible-utils" "git")
optdepends=(
	"axel: faster file downloads"
)
maintainer="Pacstall Team <pacstall@pm.me>"
url="https://github.com/pacstall/pacstall/archive/refs/tags/${pkgver}.zip"

prepare() {
	sudo mkdir -p "${pkgdir}/usr/bin/"
	sudo mkdir -p "${pkgdir}/usr/share/pacstall/scripts/"
	sudo mkdir -p "${pkgdir}/usr/share/pacstall/repo/"
	sudo mkdir -p "${pkgdir}/usr/share/man/man8/"
	sudo mkdir -p "${pkgdir}/var/log/pacstall/error_log/"
}

package() {
	sudo install -Dm 755 pacstall "${pkgdir}/usr/bin/"
	sudo install -C "misc/scripts"/* "${pkgdir}/usr/share/pacstall/scripts/"
	sudo install "misc/pacstall.8.gz" "${pkgdir}/usr/share/man/man8/"
	echo "https://raw.githubusercontent.com/pacstall/pacstall-programs/master" | sudo tee "${pkgdir}/usr/share/pacstall/repo/pacstallrepo" >/dev/null
	sudo chmod +x "${pkgdir}/usr/share/pacstall/scripts"/*
}

Pac wearing a reddish dress that Kim Petras wore during Unholy

Don't miss a new pacstall release

NewReleases is sending notifications on new releases.