Browse Source

debian: put binaries in sbin, libexec

builder-db and builder-migrations require privileges, and builder-web is
expected to be run from systemd.
pull/123/head
Reynir Björnsson 2 months ago
parent
commit
bac3b3c64b
  1. 2
      packaging/debian/builder-web.service
  2. 11
      packaging/debian/create_package.sh

2
packaging/debian/builder-web.service

@ -6,7 +6,7 @@ After=syslog.target network.target
Type=simple
User=builder
Group=builder
ExecStart=/usr/bin/builder-web
ExecStart=/usr/libexec/builder-web
[Install]
WantedBy=multi-user.target

11
packaging/debian/create_package.sh

@ -11,18 +11,19 @@ basedir=$(realpath "$(dirname "$0")"/../..)
bdir=$basedir/_build/install/default/bin
tmpd=$basedir/_build/stage
rootdir=$tmpd/rootdir
bindir=$rootdir/usr/bin
sbindir=$rootdir/usr/sbin
systemddir=$rootdir/usr/lib/systemd/system
debiandir=$rootdir/DEBIAN
libexecdir=$rootdir/usr/libexec
trap 'rm -rf $tmpd' 0 INT EXIT
mkdir -p "$bindir" "$debiandir" "$systemddir"
mkdir -p "$sbindir" "$debiandir" "$systemddir" "$libexecdir"
# stage app binaries
install $bdir/builder-web $bindir/builder-web
install $bdir/builder-migrations $bindir/builder-migrations
install $bdir/builder-db $bindir/builder-db
install "$bdir/builder-web" "$libexecdir/builder-web"
install "$bdir/builder-migrations" "$sbindir/builder-migrations"
install "$bdir/builder-db" "$sbindir/builder-db"
# service script
install -m 0644 $basedir/packaging/debian/builder-web.service $systemddir/builder-web.service

Loading…
Cancel
Save