1 # Maintainer: taca <taca@kadisius.eu>
8 'nosh-service-management'
9 'nosh-service-management-extras'
10 'nosh-terminal-management'
11 'nosh-terminal-extras'
19 'nosh-service-command-shim'
25 'nosh-ucspi-tcp-shims'
27 #'nosh-logrotate-shims'
28 'nosh-bcron-as-cron-shims'
29 'nosh-desktop-bus-shims'
31 'nosh-debian-crontab-no-anacron'
32 'nosh-debian-crontab-anacron'
33 'nosh-run-system-manager'
34 'nosh-run-debian-desktop-base'
35 'nosh-run-debian-server-base'
38 'nosh-run-via-systemd'
39 'nosh-run-virtualbox-guest'
40 'nosh-run-freedesktop-system-bus'
41 'nosh-run-freedesktop-kits'
42 'nosh-run-openssh-server'
45 'nosh-run-systemd-udev'
46 'nosh-run-busybox-mdev'
47 'nosh-run-suckless-mdev'
49 'nosh-run-local-syslog'
55 pkgdesc="A suite of system-level utilities for initializing and running a BSD or Linux system, for managing daemons, for managing terminals, and for managing logging."
57 url="https://jdebp.eu/Softwares/nosh/index.html"
58 license=('custom:MIT Expat' 'custom:FreeBSD' 'custom:ISC' 'custom:Simplified BSD')
61 makedepends=('pax' 'docbook-xml' 'docbook-xsl' 'xmlto' 'redo-jdebp')
70 changelog="archnosh.changelog"
72 # packages with maintenance scripts
75 "nosh-desktop-bus-shims"
77 "nosh-run-busybox-mdev"
78 "nosh-run-debian-desktop-base"
79 "nosh-run-debian-server-base"
80 "nosh-run-freedesktop-kits"
81 "nosh-run-freedesktop-system-bus"
84 "nosh-run-local-syslog"
85 "nosh-run-openssh-server"
86 "nosh-run-suckless-mdev"
87 "nosh-run-systemd-udev"
88 "nosh-run-system-manager"
91 "nosh-run-via-systemd"
92 "nosh-run-virtualbox-guest"
93 "nosh-service-management"
96 # no point in distributing empty files, create them now, they are filled in later
97 for i in ${_pkginstalls[@]}
102 source=("https://jdebp.eu/Repository/freebsd/nosh-$pkgver.tar.gz"
104 "maintenance-scripts.patch"
105 "scriptletbuilder.sh"
109 "nosh-bundles.install"
110 "nosh-desktop-bus-shims.install"
111 "nosh-run-bcron.install"
112 "nosh-run-busybox-mdev.install"
113 "nosh-run-debian-desktop-base.install"
114 "nosh-run-debian-server-base.install"
115 "nosh-run-freedesktop-kits.install"
116 "nosh-run-freedesktop-system-bus.install"
117 "nosh-run-kernel-vt.install"
118 "nosh-run-klog.install"
119 "nosh-run-local-syslog.install"
120 "nosh-run-openssh-server.install"
121 "nosh-run-suckless-mdev.install"
122 "nosh-run-systemd-udev.install"
123 "nosh-run-system-manager.install"
124 "nosh-run-udev.install"
125 "nosh-run-user-vt.install"
126 "nosh-run-via-systemd.install"
127 "nosh-run-virtualbox-guest.install"
128 "nosh-service-management.install"
132 'df3bcf09f6f038844c51812390762c2806a22434ce641a68a89b774edee3ac03' # nosh-1.39.tar.gz
133 '21f94e9eb2ddb4f3e1590177f62385b30a263fc43281b5d4cace38abb7723bb5' # staging.patch
134 '1713514f1e702b1fa663a84108c37d2cd28f70e1eea31e4c4ffb7d5ff940fa03' # maintenance-scripts.patch
135 '907d92546845ab087be38515fcbd04bec68b68a250534063695e73646241454c' # scriptletbuilder.sh
136 '6262acc51f648b3c43ec65223e4968c513d49fd4b4b24bf0d728c468aa26385c' # misc-1.39.patch
139 'SKIP' # nosh-bundles.install
140 'SKIP' # nosh-desktop-bus-shims.install
141 'SKIP' # nosh-run-bcron.install
142 'SKIP' # nosh-run-busybox-mdev.install
143 'SKIP' # nosh-run-debian-desktop-base.install
144 'SKIP' # nosh-run-debian-server-base.install
145 'SKIP' # nosh-run-freedesktop-kits.install
146 'SKIP' # nosh-run-freedesktop-system-bus.install
147 'SKIP' # nosh-run-kernel-vt.install
148 'SKIP' # nosh-run-klog.install
149 'SKIP' # nosh-run-local-syslog.install
150 'SKIP' # nosh-run-openssh-server.install
151 'SKIP' # nosh-run-suckless-mdev.install
152 'SKIP' # nosh-run-systemd-udev.install
153 'SKIP' # nosh-run-system-manager.install
154 'SKIP' # nosh-run-udev.install
155 'SKIP' # nosh-run-user-vt.install
156 'SKIP' # nosh-run-via-systemd.install
157 'SKIP' # nosh-run-virtualbox-guest.install
158 'SKIP' # nosh-service-management.install
164 # ncurses headers different to Debian layout, patch out the ncursesw directory in cpp Includes
165 # taken from https://github.com/atweiden/pkgbuilds/blob/master/nosh/PKGBUILD
166 msg2 "Fix ncurses header import issues"
167 cd "${srcdir}"/source
168 find . -type f -print0 | xargs -0 sed -i 's@ncursesw/curses\.h@curses.h@g'
170 # patch package/stage for Archlinux filesystem layout
171 msg2 "Align staging with Arch FS hierarchy guidelines"
173 patch -p1 -i "${srcdir}"/staging.patch
175 # patch debian maintenance scripts
176 msg2 "Adapting maintenance scripts"
177 cd "${srcdir}"/package/debian
178 sed -i 's@usr/local/lib@usr/lib@g' nosh-run-via-systemd.post_install.extra nosh-run-via-systemd.post_upgrade.extra
180 patch -p1 -i "${srcdir}"/maintenance-scripts.patch
183 msg2 "Fix some 1.39 issues (typo and missing user shell check)"
185 patch -p1 -i "${srcdir}"/misc-1.39.patch
190 msg2 "Building main source"
191 "${srcdir}"/package/compile
193 msg2 "Generating .install files"
194 source "${srcdir}"/scriptletbuilder.sh
195 for i in ${_pkginstalls[@]}
197 echo "Bulding $i.install"
198 _buildinstall $i > $i.install
201 msg2 "Staging packages"
202 # stage packages to 'staging' directory
203 "${srcdir}"/package/stage "${srcdir}" "${srcdir}"/staging
207 # no test available for the moment
208 msg "Checking skipped..."
211 package_nosh-common() {
213 # provide license (can't be done in each package, it creates file conflicts on install)
214 install -Dm 644 "${srcdir}"/source/COPYING "${pkgdir}"/usr/share/licenses/nosh/COPYING
218 # refactor the packaging, need special case for non-conforming package
219 for _pkg in ${pkgname[@]}
221 if test "$_pkg" != "nosh-common"
223 eval "package_${_pkg}() { _package $_pkg; }"
231 pkgdesc="User guide for the various nosh-* packages"
232 depends+=( 'nosh-common')
235 pkgdesc="Minimal non-shell script processor and various chain-load utilities useful for services"
236 depends+=( 'nosh-common')
237 conflicts+=( 'daemontools' 'daemontools-encore' 'nosh-bundles<=1.33')
239 nosh-service-management)
240 pkgdesc="Service and system management utilities"
241 depends+=( 'nosh-common' 'glibc>=2.13')
242 conflicts+=( 'nosh-bundles<=1.30' 'daemontools' 'daemontools-encore' )
243 install="nosh-service-management.install"
245 nosh-service-management-extras)
246 pkgdesc="Extra service and system management utilities"
247 depends+=( 'nosh-common' 'glibc>=2.13' )
248 conflicts+=( 'nosh-bundles<=1.30' )
250 nosh-terminal-management)
251 pkgdesc="Virtual terminal, pseudo-terminal, and TUI login tools"
252 depends+=( 'nosh-common' 'nosh-service-management>=1.14' )
253 conflicts+=( 'nosh-bundles<=1.20')
255 nosh-terminal-extras)
256 pkgdesc="Extra terminal utilities"
257 depends+=( 'nosh-common' 'nosh-terminal-management' )
260 pkgdesc="Z Shell completion functions for the nosh toolset"
261 depends+=( 'nosh-common')
262 optdepends=( 'zsh: for actual ZSH support' )
265 pkgdesc="BSD and System 5 shim service and system management utilities"
266 depends+=( 'nosh-common' 'nosh-service-management' )
267 conflicts+=( 'systemd-sysvcompat')
270 pkgdesc="Systemd shim service and system management utilities"
271 depends+=( 'nosh-common' 'nosh-service-management' )
272 #conflicts+=( 'systemd' ) # conflict not set, to allow selective pacman --overwrite
275 pkgdesc="Upstart shim service and system management utilities"
276 depends+=( 'nosh-common' 'nosh-service-management' )
279 pkgdesc="Execline utility shims"
280 depends+=( 'nosh-common' 'nosh-exec' )
281 conflicts+=( 'execline' )
284 pkgdesc="Core utility shims"
285 depends+=( 'nosh-common' 'nosh-exec' )
286 #conflicts+=( 'coreutils' 'util-linux' ) # conflict not set, to allow selective pacman --overwrite
289 pkgdesc="Linux utility shims"
290 depends+=( 'nosh-common' 'nosh-exec' 'nosh-terminal-management' )
291 #conflicts+=( 'coreutils' 'util-linux' ) # conflict not set, to allow selective pacman --overwrite
293 nosh-service-command-shim)
294 pkgdesc="Shim for the old BSD and System 5 service command"
295 depends+=( 'nosh-common' 'nosh-service-management' 'nosh-systemv-shims' )
296 conflicts+=( 'systemd-sysvcompat' 'sysvinit' 'nosh-systemv-shims<=1.36')
299 pkgdesc="Debian shim service and system management utilities"
300 depends+=( 'nosh-common' 'nosh-service-management' 'nosh-service-command-shim' 'nosh-systemv-shims' )
301 conflicts+=( 'upstart' 'sysvinit' 'systemd' )
304 pkgdesc="OpenRC shim service and system management utilities"
305 depends+=( 'nosh-common' 'nosh-service-management' 'nosh-systemv-shims' )
306 conflicts+=( 'openrc' 'upstart' 'sysvinit' 'systemd' )
309 pkgdesc="OpenBSD shim service and system management utilities"
310 depends+=( 'nosh-common' 'nosh-service-management' 'nosh-systemv-shims>=1.28' )
311 conflicts+=( 'nosh-systemv-shims<=1.27')
314 pkgdesc="FreeBSD shim service and system management utilities"
315 depends+=( 'nosh-terminal-management' )
316 conflicts+=( 'nosh-systemv-shims<=1.27' )
319 pkgdesc="BSD shim service and system management utilities"
320 depends+=( 'nosh-common' 'nosh-service-management' )
321 conflicts+=( 'android-tools' )
323 nosh-ucspi-tcp-shims)
324 pkgdesc="Bernstein UCSPI-TCP shim service utilities"
325 depends+=( 'nosh-common' 'nosh-exec' )
326 conflicts+=( 'ucspi-tcp' 'nosh-exec<=1.32')
329 pkgdesc="Shim kbd utilities"
330 depends+=( 'nosh-common' 'nosh-terminal-management' )
333 #nosh-logrotate-shims)
334 # pkgdesc="Shim for the logrotate package"
335 # depends+=( 'nosh-common' 'nosh-bundles' )
337 nosh-bcron-as-cron-shims)
338 pkgdesc="Shim for the bcron package"
339 depends+=( 'nosh-common' 'bcron' )
341 nosh-desktop-bus-shims)
342 pkgdesc="Replacements for Desktop Bus utilities"
343 depends+=( 'nosh-common' 'nosh-exec>=1.38' )
344 install="nosh-desktop-bus-shims.install"
347 pkgdesc="Service bundles"
348 depends+=( 'nosh-common' 'nosh-service-management>=1.38' 'nosh-exec>=1.38' 'nosh-terminal-management>=1.22' 'shadow' )
349 install="nosh-bundles.install"
351 nosh-debian-crontab-no-anacron)
352 pkgdesc="Debian common crontab (not-anacron version)"
353 depends+=( 'nosh-common' )
354 conflicts+=( 'anacron' 'nosh-debian-crontab-anacron' )
356 nosh-debian-crontab-anacron)
357 pkgdesc="Debian common crontab (anacron version)"
358 depends+=( 'nosh-common' )
359 conflicts+=( 'nosh-debian-crontab-no-anacron' )
361 nosh-run-system-manager)
362 pkgdesc="Run the nosh system manager"
363 depends+=( 'nosh-common' 'nosh-service-management>=1.33' 'nosh-exec' 'nosh-bundles' 'redo-jdebp' )
364 conflicts+=( 'nosh-run-via-systemd' 'upstart' 'sysvinit' 'systemd-sysvcompat') #'systemd'
365 install="nosh-run-system-manager.install"
367 nosh-run-debian-desktop-base)
368 pkgdesc="Run the local syslog service"
369 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.33' 'nosh-terminal-management' )
370 conflicts+=( 'nosh-run-debian-server-base' 'nosh-bundles<=1.32')
371 install="nosh-run-debian-desktop-base.install"
372 backup=( 'usr/share/system-control/presets/90-linux-static-networking.preset'
373 'usr/share/system-control/presets/50-Debian-Server-Basic.preset'
374 'usr/share/system-control/presets/50-Debian-Desktop-Basic.preset'
375 'usr/share/system-control/presets/90-linux-boot-essentials.preset'
376 'usr/share/system-control/presets/90-common-boot-essentials.preset'
379 nosh-run-debian-server-base)
380 pkgdesc="Run the local syslog service"
381 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.33' 'nosh-terminal-management' )
382 conflicts+=( 'nosh-run-debian-desktop-base' 'nosh-bundles<=1.32')
383 install="nosh-run-debian-server-base.install"
384 backup=( 'usr/share/system-control/presets/90-linux-static-networking.preset'
385 'usr/share/system-control/presets/50-Debian-Server-Basic.preset'
386 'usr/share/system-control/presets/90-linux-boot-essentials.preset'
387 'usr/share/system-control/presets/90-common-boot-essentials.preset'
391 pkgdesc="Run old-style kernel virtual terminals"
392 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-terminal-management' 'nosh-bundles' )
393 install="nosh-run-kernel-vt.install"
394 backup=( 'usr/share/system-control/presets/80-linux-ttylogin-tty.preset'
395 'usr/share/system-control/presets/80-enable-kernel-vt.preset'
399 pkgdesc="Run new-style application-mode virtual terminals"
400 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-terminal-management' 'nosh-bundles' )
401 install="nosh-run-user-vt.install"
402 backup=( 'usr/share/system-control/presets/80-enable-user-vt.preset'
403 'usr/share/system-control/presets/80-linux-ttylogin-vc.preset'
406 nosh-run-via-systemd)
407 pkgdesc="Run the nosh service manager and daemontools service scanner via systemd"
408 depends+=( 'nosh-common' 'nosh-service-management>=1.33' 'systemd' 'nosh-bundles' )
409 install="nosh-run-via-systemd.install"
410 backup=( 'usr/share/system-control/presets/80-disable-sysinit.preset'
411 'usr/share/system-control/presets/80-disable-dbus.preset'
412 'usr/share/system-control/presets/80-disable-local-syslog.preset'
413 'usr/share/system-control/presets/80-disable-remote-fs.preset'
414 'usr/share/system-control/presets/80-disable-networking.preset'
415 'usr/lib/systemd/system/service-manager-svscan.path'
416 'usr/lib/systemd/system/system-control-normal.service'
417 'usr/lib/systemd/system/service-manager.socket'
418 'usr/lib/systemd/system/service-manager-svscan.service'
419 'usr/lib/systemd/system/vc-getty@.service'
420 'usr/lib/systemd/system/service-manager.service'
421 'usr/lib/tmpfiles.d/terminal-emulator.conf'
422 'usr/lib/tmpfiles.d/service-manager.conf'
423 'usr/lib/tmpfiles.d/system-manager.conf'
426 nosh-run-virtualbox-guest)
427 pkgdesc="Run VirtualBox guest additions"
428 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
429 install="nosh-run-virtualbox-guest.install"
430 backup=( 'usr/share/system-control/presets/80-virtualbox-guest.preset' )
432 nosh-run-freedesktop-system-bus)
433 pkgdesc="Run the system-wide message bus from freedesktop.org"
434 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
435 install="nosh-run-freedesktop-system-bus.install"
436 backup=('usr/share/system-control/presets/80-enable-freedesktop-system-bus.preset' )
438 nosh-run-freedesktop-kits)
439 pkgdesc="Run the various "kit" programs from freedesktop.org"
440 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
441 install="nosh-run-freedesktop-kits.install"
442 backup=( 'usr/share/system-control/presets/40-PackageKit.preset'
443 'usr/share/system-control/presets/40-PolicyKit.preset'
444 'usr/share/system-control/presets/40-UPower.preset'
445 'usr/share/system-control/presets/40-ColourManager.preset'
446 'usr/share/system-control/presets/40-ConsoleKit.preset'
447 'usr/share/system-control/presets/40-UDisks.preset'
448 'usr/share/system-control/presets/40-NetworkManager.preset'
449 'usr/share/system-control/presets/40-ModemManager.preset'
450 'usr/share/system-control/presets/40-Avahi.preset'
453 nosh-run-openssh-server)
454 pkgdesc="Run the OpenSSH server"
455 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
456 install="nosh-run-openssh-server.install"
457 backup=( 'usr/share/system-control/presets/40-OpenSSHServer.preset' )
460 pkgdesc="Run the various AppleTalk service"
461 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
462 backup=( 'usr/share/system-control/presets/40-AppleTalk.preset' )
465 pkgdesc="Run udev as the device manager"
466 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
467 optdepends+=( 'eudev: alternative udev implementation' )
468 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
469 install="nosh-run-udev.install"
470 backup=( 'usr/share/system-control/presets/80-enable-udev.preset' )
472 nosh-run-systemd-udev)
473 pkgdesc="Run systemd-udev as the device manager"
474 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles>=1.34' 'systemd')
475 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-udev')
476 install="nosh-run-systemd-udev.install"
477 backup=( 'usr/share/system-control/presets/80-enable-systemd-udev.preset' )
479 nosh-run-busybox-mdev)
480 pkgdesc="Run BusyBox mdev as the device manager"
481 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' 'busybox')
482 conflicts+=('nosh-run-udev' 'nosh-run-suckless-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
483 install="nosh-run-busybox-mdev.install"
484 backup=( 'usr/share/system-control/presets/80-enable-busybox-mdev.preset' )
486 nosh-run-suckless-mdev)
487 pkgdesc="Run SuckLess mdev as the device manager"
488 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' 'smdev')
489 conflicts+=('nosh-run-udev' 'nosh-run-busybox-mdev' 'nosh-run-vdev' 'nosh-run-systemd-udev')
490 install="nosh-run-suckless-mdev.install"
491 backup=( 'usr/share/system-control/presets/80-enable-suckless-mdev.preset' )
494 pkgdesc="Run vdev as the device manager"
495 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management' 'nosh-bundles' 'vdev-git')
496 conflicts+=('nosh-run-busybox-mdev' 'nosh-run-suckless-mdev' 'nosh-run-udev' 'nosh-run-systemd-udev')
497 # no run script so far
498 # install="nosh-run-vdev.install"
499 backup=( 'usr/share/system-control/presets/80-enable-vdev.preset' )
501 nosh-run-local-syslog)
502 pkgdesc="Run the local syslog service"
503 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
504 conflicts+=( 'systemd-sysvcompat' )
505 install="nosh-run-local-syslog.install"
506 backup=( 'usr/share/system-control/presets/80-enable-local-syslog.preset' )
509 pkgdesc="Run the klog service"
510 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' )
511 conflicts+=( 'systemd-sysvcompat' )
512 install="nosh-run-klog.install"
513 backup=( 'usr/share/system-control/presets/80-enable-klog.preset' )
516 pkgdesc="Run the bcron services"
517 depends+=( 'nosh-common' 'nosh-exec' 'nosh-service-management>=1.33' 'nosh-bundles' 'bcron' )
518 conflicts=( 'bcron-run' )
519 provides=( 'bcron-run' )
523 # copy over the staging files
524 (cd "${srcdir}"/staging/"${1}"/ && pax -r -w -l -- * "${pkgdir}"/)