You are not logged in.
Pages: 1
I'm making a PKGFILE for the Guix binary installation. It has some read-only files in the src directory, which gives errors during extraction the second time around. Should I be trying to clear out the src directory while working on the PKGFILE or just using "makepkg -e"?
Also, is it acceptable to start systemd services post-install? Some post-install tasks require the service be running. Start then stop it? Or make a separate setup script to be run manually after install?
Offline
Post the PKGBUILD you have so far.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Also, is it acceptable to start systemd services post-install? Some post-install tasks require the service be running. Start then stop it? Or make a separate setup script to be run manually after install?
Never start/stop services automatically on install. Just echo a message telling the user what to do - if you want to provide a script for it, go ahead.
Offline
This is what I have so far for PKGBUILD:
# Maintainer: Al McElrath <hello yrns org>
pkgname=guix-bin
pkgver=0.8.3
pkgrel=1
pkgdesc="GNU Guix package manager"
arch=('x86_64' 'i686')
url="https://www.gnu.org/software/guix/"
license=('GPL')
makedepends=()
depends=()
optdepends=('emacs: Emacs interface')
provides=('guix')
conflicts=('guix')
install="$pkgname.install"
source_x86_64=("ftp://alpha.gnu.org/gnu/guix/guix-binary-${pkgver}.x86_64-linux.tar.xz"{,.sig})
source_i686=("ftp://alpha.gnu.org/gnu/guix/guix-binary-${pkgver}.i686-linux.tar.xz"{,.sig})
sha256sums_x86_64=('04e751c9b8d7a6c131b67540127ab6038d58a602c64c35064febf47dc9a1b0f0'
'SKIP')
sha256sums_i686=('21ecd872a3b31143372a3ed293f9d9d18e258f77663e1193d522dcda68d6bdc5'
'SKIP')
validpgpkeys=('3CE464558A84FDC69DB40CFB090B11993D9AEBB5')
mk_ln() {
mkdir -p $(dirname "$2") && ln -s "$1" "$2"
}
package() {
cp -a var "$pkgdir"
cp -a gnu "$pkgdir"
chmod 1775 "$pkgdir/gnu/store"
profile=/var/guix/profiles/per-user/root/guix-profile
service=lib/systemd/system/guix-daemon.service
mk_ln "$profile" "$pkgdir/root/.guix-profile"
chmod 750 "$pkgdir/root"
mk_ln "$profile/$service" "$pkgdir/usr/$service"
mk_ln "$profile/bin/guix" "$pkgdir/usr/bin/guix"
}
And guix-bin.install:
post_install() {
groupadd --system guixbuild
for i in `seq -w 1 10`;
do
useradd -g guixbuild -G guixbuild \
-d /var/empty -s `which nologin` \
-c "Guix build user $i" --system \
guixbuilder$i;
done
instructions
}
pre_remove() {
for i in `seq -w 1 10`;
do
userdel guixbuilder$i;
done
groupdel guixbuild
}
instructions() {
/bin/cat <<EOF
The following is gleaned from https://www.gnu.org/software/guix/manual/
(binary installation):
--> Enable/start the guix service:
'systemctl start guix-daemon'
--> Authorize substitutes if you don't want to build everything from source:
'guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub'
--> Install locales:
'guix package -i glibc-locales'
'export LOCPATH=$HOME/.guix-profile/lib/locale' or similar
To get rid of the warnings from the daemon, install locales again as root,
and 'systemctl set-environment LOCPATH=~root/.guix-profile/lib/locale'.
--> Add ~/.guix-profile/bin to your path.
--> Install emacs interface (optional):
'guix package -i guix'
Add '~/.guix-profile/share/emacs/site-lisp/' to your load-path.
EOF
}
Offline
Pages: 1