pk4-replace(1)

πŸ’– pk4-replace β€” the user manual, but make it cute ✨

okay so bestie, you know how we're always like "ugh I built this thing and now I want it installed"? yeah. that's this. welcome to pk4-replace from the pk4 user manuals, she's a real one 🫢


🌸 NAME 🌸

pk4-replace β€” build sources and replace currently installed packages πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

pk4-replace [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: pk4-replace builds the sources sitting in your current directory using sbuild, and then β€” plot twist β€” it takes the subset of binary packages that are currently installed and swaps them out for the shiny new packages it just built. glow up, but for your system ✨


πŸ’… OPTIONS πŸ’…

  • -dry_run β€” prints the build command and then dips. no building, no replacing, just showing you the tea πŸ‘€

πŸ“ EXAMPLES πŸ“

like, imagine you want to fetch the i3 source, apply a bugfix, rebuild and replace installed packages. the way that looks is literally this:

# Fetch the i3 source, apply a bugfix, rebuild and replace installed packages:
pk4 i3
patch -p1 < /tmp/myfix.patch
pk4-replace

iconic behaviour, no notes πŸ’–


🌈 CONFIGURATION FILE 🌈

you can configure the following attributes in ~/.config/pk4/pk4.deb822:

✨ Build-Command strings ✨

the command to use for building the sources in the current directory. important bestie: it must write the path to the resulting .changes file to the pipe /proc/self/fd/3 when it's done. that's the whole handshake. don't skip it πŸ™ˆ

Example (default):

Build-Command:
  sbuild
  --post-build-commands
  echo %SBUILD_CHANGES > /proc/self/fd/3
  -A
  --no-clean-source
  --dpkg-source-opt=--auto-commit

Example (illustrating how one line is one argv element):

Build-Command:
  sbuild
  --post-build-commands
  echo %SBUILD_CHANGES > /proc/self/fd/3
  -d
  stretch
note the second one β€” one line = one argv element. every single line is its own argument. that's the whole point of that example, iykyk 🧚

πŸ‘‘ SEE ALSO πŸ‘‘

  • pk4(1) β€” make available the Debian source package producing the specified package
  • sbuild(1) β€” build debian packages from source

πŸ’œ AUTHOR πŸ’œ

Michael Stapelberg <stapelberg at debian.org>


and that's the whole page, bestie. written by Michael Stapelberg, living on the Linux manual set, dated OCTOBER 2017 β€” yes she's vintage, yes she still ate πŸ’…βœ¨

πŸ“¦ where this page comes from