]> rtime.felk.cvut.cz Git - novaboot.git/log
novaboot.git
3 years agoUpdate changelog for 20201217 release 20201217
Michal Sojka [Thu, 17 Dec 2020 07:43:37 +0000 (08:43 +0100)]
Update changelog for 20201217 release

3 years agoserver: Call "systemctl is-enabled" with --quiet
Michal Sojka [Thu, 17 Dec 2020 09:04:06 +0000 (10:04 +0100)]
server: Call "systemctl is-enabled" with --quiet

3 years agoRename novaboot-power-off.service to novaboot-delayed-power-off.service
Michal Sojka [Thu, 17 Dec 2020 08:58:17 +0000 (09:58 +0100)]
Rename novaboot-power-off.service to novaboot-delayed-power-off.service

Also rework the logic to not relay on systemd's Conflicts but switch
off the timer explicitly in novaboot-power script.

3 years agoRun pre-commit hook in bash
Michal Sojka [Thu, 17 Dec 2020 07:39:55 +0000 (08:39 +0100)]
Run pre-commit hook in bash

We need "set -o pipefail" and it needs bash.

3 years agoMake novaboot shebang NixOS compatible
Michal Sojka [Thu, 17 Dec 2020 07:15:44 +0000 (08:15 +0100)]
Make novaboot shebang NixOS compatible

3 years agonix: Add derivation for novaboot-server
Michal Sojka [Thu, 17 Dec 2020 07:15:09 +0000 (08:15 +0100)]
nix: Add derivation for novaboot-server

3 years agoserver: Add missing files for delayed power-off
Michal Sojka [Sun, 1 Mar 2020 14:42:39 +0000 (15:42 +0100)]
server: Add missing files for delayed power-off

These should have been a part of commit 9dffa51 ("Simplify systemd
logic for automated delayed power off", 2019-11-21).

3 years agoCatch errors in pre-commit hook
Michal Sojka [Tue, 13 Oct 2020 21:26:56 +0000 (23:26 +0200)]
Catch errors in pre-commit hook

3 years agoAdd basic Nix support
Michal Sojka [Tue, 13 Oct 2020 21:25:40 +0000 (23:25 +0200)]
Add basic Nix support

3 years agodoc: Cosmetic changes
Michal Sojka [Thu, 6 Aug 2020 13:21:01 +0000 (15:21 +0200)]
doc: Cosmetic changes

3 years agodoc: Add section about booting Linux
Michal Sojka [Thu, 6 Aug 2020 13:20:21 +0000 (15:20 +0200)]
doc: Add section about booting Linux

4 years agoAllow configuring the default value of --netif globally in configuration files
Michal Sojka [Tue, 18 Feb 2020 10:49:30 +0000 (11:49 +0100)]
Allow configuring the default value of --netif globally in configuration files

4 years agoSimplify systemd logic for automated delayed power off
Michal Sojka [Thu, 21 Nov 2019 11:21:39 +0000 (12:21 +0100)]
Simplify systemd logic for automated delayed power off

TODO documentation

4 years agoserver: Use Makefile to install the server
Michal Sojka [Thu, 21 Nov 2019 11:17:53 +0000 (12:17 +0100)]
server: Use Makefile to install the server

This will become handy in the next commit.

4 years agotests: Get rid of asynchronous process substitution
Michal Sojka [Wed, 20 Nov 2019 22:10:07 +0000 (23:10 +0100)]
tests: Get rid of asynchronous process substitution

Under bash, processes substitution is run asynchronously. This means
that the messages printed by the process can be mixed with other
messages, which causes random tests to fail, because the wvtest
protocol lines are corrupted.

Now we run all processes synchronously and the test no longer fail
randomly.

4 years agoserver: User temporary RUN_DIR in $HOME does not exist
Michal Sojka [Mon, 18 Nov 2019 08:20:28 +0000 (09:20 +0100)]
server: User temporary RUN_DIR in $HOME does not exist

This is the case under pbuilder.

4 years agodebian: Add build-depends to be able to run tests under pbuilder
Michal Sojka [Mon, 18 Nov 2019 08:19:00 +0000 (09:19 +0100)]
debian: Add build-depends to be able to run tests under pbuilder

4 years agodebian: Fix version syntax in Depends
Michal Sojka [Mon, 18 Nov 2019 07:36:42 +0000 (08:36 +0100)]
debian: Fix version syntax in Depends

4 years agotests: Remove home directory for server tests
Michal Sojka [Sun, 17 Nov 2019 22:42:31 +0000 (23:42 +0100)]
tests: Remove home directory for server tests

It is not needed since commit 84f456f ("tests: Convert server tests to
use the account from last commit", 2019-11-16),

4 years agoAllow specifying /dev/null as load argument
Michal Sojka [Sun, 17 Nov 2019 20:33:56 +0000 (21:33 +0100)]
Allow specifying /dev/null as load argument

This is useful if only kernel parameters are important, but kernel
image is taken from somewhere else.

4 years agoserver: Ensure that configuration can depend on logged-in user name
Michal Sojka [Sun, 17 Nov 2019 15:44:23 +0000 (16:44 +0100)]
server: Ensure that configuration can depend on logged-in user name

4 years agoRevert "server: Add experimental support for the ssh sub-command"
Michal Sojka [Sun, 17 Nov 2019 14:49:46 +0000 (15:49 +0100)]
Revert "server: Add experimental support for the ssh sub-command"

This reverts commit 65dbc765ea6bb1eb7a5b72f34bfc71323617106a.

It would be better to use SSH port forwarding to access target's SSH.

4 years agotests: Convert server tests to use the account from last commit
Michal Sojka [Sat, 16 Nov 2019 22:30:28 +0000 (23:30 +0100)]
tests: Convert server tests to use the account from last commit

4 years agotest: Add script for creating test account
Michal Sojka [Sat, 16 Nov 2019 22:15:25 +0000 (23:15 +0100)]
test: Add script for creating test account

4 years agoDisable echo in default stty arguments
Jan Kaisrlik [Mon, 4 Nov 2019 16:28:01 +0000 (17:28 +0100)]
Disable echo in default stty arguments

From time to time I observe that the novaboot hangs in the uboot menu
with weird characters on the line like this

    => MC:   mmc@7000: 0^M^JLoading Environment from MMC... OK^M^JIn:    serial@3000^M^JNet:   eth0: ethernet@ff3f0000^M^JHit any key to stop autoboot:  2 ^H^H^H 0^M^J=> MC:   mmc@7000: 0^M^JLoading Environment from MMC... OK^M^JIn:    serial@3000^M^JNet:
    Unknown command 'MC:' - try 'help'

When I tried to play with stty options I realized that the echo option
breaks the communication. The reason is that when echo is
enabled (which is by default), all characters sent by the target are
echoed back to the target, which may interpret them.

To confirm that, I tested the following options:

    --stty="raw -crtscts -onlcr 115200 -echo" (working)
    --stty="raw -crtscts -onlcr 115200 echo" (not working)

It turns out that the problem appears only during the first initial
novaboot conversation with the bootloader after. After switching to
interactive mode, echo is automatically disabled by Expect.pm and for
subsequent boots, echo remains disabled.

[Note: Commit message updated by Michal Sojka based on GitHub
discussion https://github.com/wentasah/novaboot/pull/5 and his
investigation of the issue.]

4 years agotests: Make some server tests more readable
Michal Sojka [Thu, 31 Oct 2019 23:10:44 +0000 (00:10 +0100)]
tests: Make some server tests more readable

4 years agoserver: Always use flock with --no-fork
Michal Sojka [Thu, 31 Oct 2019 22:27:44 +0000 (23:27 +0100)]
server: Always use flock with --no-fork

Without this my test suite fails. The reason for not using --no-fork
was that it didn't work well on some systems. Since I'm annoyed by not
working test suite, I'm willing to investigate --no-fork problems if
they still exist on current Linux systems.

4 years agoImprove an error message
Michal Sojka [Thu, 31 Oct 2019 21:39:40 +0000 (22:39 +0100)]
Improve an error message

4 years agoserver: Add experimental support for the ssh sub-command
Michal Sojka [Thu, 24 Oct 2019 07:18:46 +0000 (09:18 +0200)]
server: Add experimental support for the ssh sub-command

4 years agoserver: Document get-config
Michal Sojka [Thu, 24 Oct 2019 06:50:23 +0000 (08:50 +0200)]
server: Document get-config

4 years agoserver: Mention get-config command in help message
Michal Sojka [Wed, 23 Oct 2019 11:40:25 +0000 (13:40 +0200)]
server: Mention get-config command in help message

4 years agoUpdate changelog for 20191023 release 20191023
Michal Sojka [Wed, 23 Oct 2019 08:28:38 +0000 (10:28 +0200)]
Update changelog for 20191023 release

4 years agoserver: Add novaboot users to the novaboot group
Michal Sojka [Tue, 15 Oct 2019 21:32:47 +0000 (23:32 +0200)]
server: Add novaboot users to the novaboot group

This is mainly intended for allowing "Match Group" configuration in
sshd_config.

4 years agoserver: Mention adduser-novaboot in novaboot-shell documentation
Michal Sojka [Tue, 15 Oct 2019 21:36:03 +0000 (23:36 +0200)]
server: Mention adduser-novaboot in novaboot-shell documentation

4 years agoadduser-novaboot: Reload systemd after adding override units
Michal Sojka [Tue, 15 Oct 2019 21:09:39 +0000 (23:09 +0200)]
adduser-novaboot: Reload systemd after adding override units

4 years agoAdd a picture showing typical use cases
Michal Sojka [Wed, 25 Sep 2019 09:58:08 +0000 (11:58 +0200)]
Add a picture showing typical use cases

5 years agoUpdate changelog for 20181127 release 20181127
Michal Sojka [Tue, 27 Nov 2018 22:57:37 +0000 (23:57 +0100)]
Update changelog for 20181127 release

5 years agoMark --remote-expect* options as safe and improve documentation
Michal Sojka [Tue, 27 Nov 2018 21:40:23 +0000 (22:40 +0100)]
Mark --remote-expect* options as safe and improve documentation

5 years agoFix typo
Michal Sojka [Tue, 27 Nov 2018 21:20:29 +0000 (22:20 +0100)]
Fix typo

5 years agodoc: Fix typos
Michal Sojka [Sat, 10 Nov 2018 22:29:03 +0000 (23:29 +0100)]
doc: Fix typos

5 years agoserver: Grammar fixes in documentation
Michal Sojka [Wed, 18 Jul 2018 20:15:30 +0000 (22:15 +0200)]
server: Grammar fixes in documentation

5 years agoserver: Extend man page
Michal Sojka [Thu, 10 May 2018 21:16:43 +0000 (23:16 +0200)]
server: Extend man page

6 years agoUpdate changelog for 20180323 release 20180323
Michal Sojka [Fri, 23 Mar 2018 13:22:12 +0000 (14:22 +0100)]
Update changelog for 20180323 release

6 years agoAdd --uboot-stop-key option
Michal Sojka [Fri, 23 Mar 2018 13:20:13 +0000 (14:20 +0100)]
Add --uboot-stop-key option

6 years agoFix typo in README
Michal Sojka [Tue, 19 Dec 2017 20:55:34 +0000 (21:55 +0100)]
Fix typo in README

6 years agoserver: Do not use flock --no-fork
Michal Sojka [Fri, 17 Nov 2017 16:23:38 +0000 (17:23 +0100)]
server: Do not use flock --no-fork

It seems to not work reliably - at least in certain cases. More
investigation is needed.

6 years agoserver: Fix typo in a comment
Michal Sojka [Fri, 6 Oct 2017 17:45:56 +0000 (19:45 +0200)]
server: Fix typo in a comment

6 years agoIncrease uboot load timeouts
Michal Sojka [Wed, 27 Sep 2017 11:52:28 +0000 (13:52 +0200)]
Increase uboot load timeouts

We should have command line option for that and allow it to be set from
novaboot-shell, but we postpone the implementation of it until later.

6 years agoChange configuration of ryuglab target to use novaboot-shell
Michal Sojka [Fri, 15 Sep 2017 16:28:43 +0000 (18:28 +0200)]
Change configuration of ryuglab target to use novaboot-shell

6 years agoserver/adduser: Give configuration file proper owner
Michal Sojka [Fri, 15 Sep 2017 15:50:10 +0000 (17:50 +0200)]
server/adduser: Give configuration file proper owner

6 years agoserver: Minor update of systemd files
Michal Sojka [Fri, 15 Sep 2017 11:36:02 +0000 (13:36 +0200)]
server: Minor update of systemd files

This is only to ensure that systemd status or similar
commands give clearer picture of the status of the target
on/off state.

6 years agoUpdate changelog for 20170915 release 20170915
Michal Sojka [Fri, 15 Sep 2017 10:13:29 +0000 (12:13 +0200)]
Update changelog for 20170915 release

6 years agoUpdate .gitignore
Michal Sojka [Fri, 15 Sep 2017 10:12:11 +0000 (12:12 +0200)]
Update .gitignore

6 years agodoc: Update initial examples
Michal Sojka [Fri, 15 Sep 2017 10:10:33 +0000 (12:10 +0200)]
doc: Update initial examples

6 years agodoc: Mention --ssh in examples
Michal Sojka [Fri, 15 Sep 2017 10:02:07 +0000 (12:02 +0200)]
doc: Mention --ssh in examples

6 years agoserver: Rename systemd files to more meaningful names
Michal Sojka [Fri, 15 Sep 2017 08:40:49 +0000 (10:40 +0200)]
server: Rename systemd files to more meaningful names

6 years agoserver: Update systemd units
Michal Sojka [Fri, 15 Sep 2017 08:33:24 +0000 (10:33 +0200)]
server: Update systemd units

This works better than what was there before.

6 years agoserver: Set proper hostname for locally run commands
Michal Sojka [Thu, 14 Sep 2017 18:00:32 +0000 (20:00 +0200)]
server: Set proper hostname for locally run commands

6 years agoserver: Remove useless variable
Michal Sojka [Thu, 14 Sep 2017 17:59:39 +0000 (19:59 +0200)]
server: Remove useless variable

6 years agoserver: Make console the default command
Michal Sojka [Thu, 14 Sep 2017 17:32:26 +0000 (19:32 +0200)]
server: Make console the default command

This is useful, because SSH does not properly terminate the console
command if it is not run on terminal. The command is run on terminal
when ssh is run with -t argument or when there is no command
specified. Hence, with this change, we it will be less likely that
users connect to the console and forget to specify -t.

6 years agoUpdate changelog for 20170907 release 20170907
Michal Sojka [Thu, 7 Sep 2017 09:40:41 +0000 (11:40 +0200)]
Update changelog for 20170907 release

6 years agoFix man page (and lintian warning)
Michal Sojka [Thu, 7 Sep 2017 09:32:57 +0000 (11:32 +0200)]
Fix man page (and lintian warning)

6 years agotests: Do not run SSH tests when ssh agent is not detected
Michal Sojka [Thu, 7 Sep 2017 09:30:56 +0000 (11:30 +0200)]
tests: Do not run SSH tests when ssh agent is not detected

... such as when building debian package.

6 years agoserver: Give hint for using ssh -t with shell
Michal Sojka [Thu, 7 Sep 2017 09:19:23 +0000 (11:19 +0200)]
server: Give hint for using ssh -t with shell

6 years agoserver: Document novaboot-shell
Michal Sojka [Thu, 7 Sep 2017 08:59:23 +0000 (10:59 +0200)]
server: Document novaboot-shell

6 years agoserver: Document adduser-novaboot command
Michal Sojka [Thu, 7 Sep 2017 07:34:18 +0000 (09:34 +0200)]
server: Document adduser-novaboot command

6 years agodebian/server: Mention rsync as dependency
Michal Sojka [Thu, 7 Sep 2017 07:34:38 +0000 (09:34 +0200)]
debian/server: Mention rsync as dependency

6 years agoChange default value of --remote-expect-timeout to infinity
Michal Sojka [Tue, 5 Sep 2017 11:17:04 +0000 (13:17 +0200)]
Change default value of --remote-expect-timeout to infinity

6 years agoserver: Fix creation of tftproot
Michal Sojka [Tue, 5 Sep 2017 06:21:50 +0000 (08:21 +0200)]
server: Fix creation of tftproot

When tftpd-hpa is run with --secure, all data must be under /srv/tftp.
Therefore, we put data directly into /srv/tftp/$user instead of
$HOME/tftproot.

6 years agoObey INTERACTION variable
Michal Sojka [Sun, 3 Sep 2017 23:31:43 +0000 (01:31 +0200)]
Obey INTERACTION variable

6 years agoserver: Better error message of add-key command
Michal Sojka [Sun, 3 Sep 2017 23:29:21 +0000 (01:29 +0200)]
server: Better error message of add-key command

6 years agoChange default novabox configuration
Michal Sojka [Sun, 3 Sep 2017 15:36:55 +0000 (17:36 +0200)]
Change default novabox configuration

6 years agoserver: Minor update to tests
Michal Sojka [Sun, 3 Sep 2017 15:36:41 +0000 (17:36 +0200)]
server: Minor update to tests

6 years agoserver: Simplify config reading
Michal Sojka [Sun, 3 Sep 2017 14:27:25 +0000 (16:27 +0200)]
server: Simplify config reading

... and move it after permission checks.

6 years agoserver: Fix handling of multi-word commands (rsync) without authorized_keys command...
Michal Sojka [Sun, 3 Sep 2017 14:22:39 +0000 (16:22 +0200)]
server: Fix handling of multi-word commands (rsync) without authorized_keys command=user...

6 years agoFix reading of config files when invoked via "make -C dir"
Michal Sojka [Sun, 3 Sep 2017 08:37:29 +0000 (10:37 +0200)]
Fix reading of config files when invoked via "make -C dir"

6 years agoserver: Use simpler detection of unset variables
Michal Sojka [Tue, 29 Aug 2017 21:09:08 +0000 (23:09 +0200)]
server: Use simpler detection of unset variables

6 years agoserver: Store target configuration in a variable, not in a shell function
Michal Sojka [Tue, 29 Aug 2017 21:08:21 +0000 (23:08 +0200)]
server: Store target configuration in a variable, not in a shell function

This will make it easier to implement the novaboot-shell in other
language, should the need arise.

6 years agoProperly terminate remote command even when it ignores SIGHUP
Michal Sojka [Mon, 28 Aug 2017 19:21:59 +0000 (21:21 +0200)]
Properly terminate remote command even when it ignores SIGHUP

6 years agoFix --iprelay-cmd regression
Michal Sojka [Sun, 27 Aug 2017 20:38:05 +0000 (22:38 +0200)]
Fix --iprelay-cmd regression

6 years agoSimplify ssh ctl path
Michal Sojka [Sun, 27 Aug 2017 19:45:12 +0000 (21:45 +0200)]
Simplify ssh ctl path

Now, when we have novaboot PID in the file name, it is not necessary to
have target user, host and port there as well.

6 years agoChange reset_cmd to array
Michal Sojka [Sun, 27 Aug 2017 19:36:39 +0000 (21:36 +0200)]
Change reset_cmd to array

See previous commit for details.

6 years agoRun --ssh's console command without subshell
Michal Sojka [Sun, 27 Aug 2017 19:20:15 +0000 (21:20 +0200)]
Run --ssh's console command without subshell

This requires either not putting shell special characters in $remote_cmd,
which cannot be easily ensured, because some parts are given by a user,
or turning the remote command into array. See exec in perlfun(1).

6 years agoRework system_verbose() to accept string or array, similarly as system() does
Michal Sojka [Sun, 27 Aug 2017 19:31:05 +0000 (21:31 +0200)]
Rework system_verbose() to accept string or array, similarly as system() does

6 years agodebian: Fix typo
Michal Sojka [Sat, 26 Aug 2017 22:30:44 +0000 (00:30 +0200)]
debian: Fix typo

6 years agoDo not share ssh connections across novaboot processes
Michal Sojka [Sat, 26 Aug 2017 22:30:00 +0000 (00:30 +0200)]
Do not share ssh connections across novaboot processes

Without this, when two novaboot instances were run by the same user on the
same host, killing the first one caused disconnection of the other one.

6 years agoUpdate changelog for 20170826 release 20170826
Michal Sojka [Sat, 26 Aug 2017 22:05:06 +0000 (00:05 +0200)]
Update changelog for 20170826 release

6 years agoserver: Explicitly configure parser for remote options
Michal Sojka [Sat, 26 Aug 2017 21:49:03 +0000 (23:49 +0200)]
server: Explicitly configure parser for remote options

It is important that we parse with 'no_pass_through'. It detects potential
security attacks.

6 years agoserver: Fix config file template
Michal Sojka [Sat, 26 Aug 2017 20:09:31 +0000 (22:09 +0200)]
server: Fix config file template

6 years agoFix derivation of prefix from --ssh
Michal Sojka [Sat, 26 Aug 2017 20:09:11 +0000 (22:09 +0200)]
Fix derivation of prefix from --ssh

6 years agoserver: Fix quoting of commands from config file
Michal Sojka [Sat, 26 Aug 2017 14:45:33 +0000 (16:45 +0200)]
server: Fix quoting of commands from config file

6 years agoserver: Admin can get shell access
Michal Sojka [Sat, 26 Aug 2017 12:36:25 +0000 (14:36 +0200)]
server: Admin can get shell access

6 years agoserver: Use flock option --no-fork only when it is available
Michal Sojka [Sat, 26 Aug 2017 10:36:41 +0000 (12:36 +0200)]
server: Use flock option --no-fork only when it is available

It was introduced in util-linux 2.29.

6 years agoserver: Give proper group to created .ssh files
Michal Sojka [Sat, 26 Aug 2017 09:41:40 +0000 (11:41 +0200)]
server: Give proper group to created .ssh files

6 years agoserver: Use $HOME rather than $XDG_RUNTIME_DIR
Michal Sojka [Sat, 26 Aug 2017 09:41:08 +0000 (11:41 +0200)]
server: Use $HOME rather than $XDG_RUNTIME_DIR

When novaboot shell is run as a systemd service XDG_RUNTIME_DIR is not
defined.

6 years agotests: Fix SSH key setup
Michal Sojka [Sat, 26 Aug 2017 09:40:04 +0000 (11:40 +0200)]
tests: Fix SSH key setup

6 years agodebian: Initial packaging of novaboot-server
Michal Sojka [Sat, 26 Aug 2017 06:28:39 +0000 (08:28 +0200)]
debian: Initial packaging of novaboot-server

6 years agoFix and extend --ssh documentation
Michal Sojka [Sat, 26 Aug 2017 06:24:42 +0000 (08:24 +0200)]
Fix and extend --ssh documentation

6 years agoserver: Update .gitignore
Michal Sojka [Fri, 25 Aug 2017 20:01:29 +0000 (22:01 +0200)]
server: Update .gitignore

6 years agoserver: Add adduser-novaboot script
Michal Sojka [Fri, 25 Aug 2017 19:51:23 +0000 (21:51 +0200)]
server: Add adduser-novaboot script