Commit Graph

50 Commits

Author SHA1 Message Date
Romain Tartière
157125c4af Relax validation of -BETA / -RC releases
Accross the code, release names are checked against some variation of
-BETAx / -RCx which are inconsistent in the range of accepted values for
`x`.

As  a consequence, some commands cannot be successfuly run while they
are valid, e.g. `bastille create test 14.0-RC4 10.0.0.2` is rejected
because only `*-RC1` and `*-RC2` are accepted as a RC release name.

Find out these lists of specific BETA and RC patterns and adjust them to
allow any one-digit value at the end.  We generaly do up to 4 BETA / RC
releases, so a one digit limit is probably enough for the time being.
2023-11-10 08:09:51 -10:00
JRGTH
72bd211f7b Validate jib during jail import 2023-07-19 10:56:20 -04:00
Christer Edwards
4efcc5021c update copyright dates 2023-07-14 21:02:14 -06:00
Lars Engels
64c3b6045e Allow running bastille and subcomands with help flags as regular user 2023-03-16 20:58:11 +01:00
Christer Edwards
aafc2b3323 0.9.20220216 release 2022-02-16 23:28:09 -07:00
Rob Arnold
c98d03a8e5 Import basic vnet settings from iocage
There's quite a bit more we could do here, but this hits my basic usage
with vnets. Future work here would be things like ipv6 support or trying
to infer what a custom `interfaces` setting means.
2022-01-13 21:04:15 -08:00
Rob Arnold
523c3f0bde Import iocage basejails as Bastille thin jails
I think these are the same concept, but with slightly different execution.
The main idea is to have a central base system that is shared (readonly) among
multiple jails. When this base system is updated, all the jails that reference
it immediately see the new system files.

This is implemented in iocage as a set of individual zfs mounts, one per
system directory. In Bastille, each system directory is symlinked into a
subdirectory of a single zfs mount.

My test plan here was to import an exported iocage basejail and verify that
its Bastille version has the right fstab and symlink changes:
```
Validating file: ssl_2021-11-19.zip...
File validation successful!
Importing 'ssl' from foreign compressed .zip archive.
Archive:  ssl_2021-11-19.zip
 extracting: ssl_2021-11-19
 extracting: ssl_2021-11-19_root
Receiving ZFS data stream...
Generating jail.conf...
Updating symlinks...
ln: usr/src: Directory not empty
Warning: directory usr/src on imported jail was not empty and will not be updated by Bastille
Container 'ssl' imported successfully.
```
2022-01-09 18:05:05 -08:00
Christer Edwards
faf3b2b691 use full path when calling jls binary 2021-12-17 19:09:49 -07:00
Rob Arnold
5aba3df6ae Use the devfs_ruleset number from imported iocage jails
This property is not set by default on all iocage jails. By default, iocage assumes this value is 4. Confusingly, if you query this value from iocage while the jail is running, it will give a dynamically generated value. However, a jail must be stopped to be exported, so we can trust the value in config.json.
2021-11-19 21:46:22 -08:00
JRGTH
f39168b9c2 Be more specific with export/import command options 2021-07-14 15:02:12 -04:00
JRGTH
50c09d0359 Feature to disable output colors 2021-07-13 04:49:25 -04:00
JRGTH
ee2c25697c Cleanup obsolete code 2021-07-10 09:01:28 -04:00
JRGTH
0a7db32490 Restored usage after file debug 2021-07-10 08:52:08 -04:00
JRGTH
f0c3620fac Add export/import standard I/O redirection
This update enhances the export and import command to fully support jail export/import user standard input/output redirection
2021-07-10 08:35:50 -04:00
JRGTH
d73645facb Add the new tgz compress format to UFS systems too 2021-07-08 17:41:27 -04:00
JRGTH
17ea19bf65 Deprecate command parameters not starting with dash here too 2021-07-08 15:37:36 -04:00
JRGTH
5c4d69775f Deprecate command parameters not starting with dash 2021-07-08 15:29:31 -04:00
JRGTH
b0f947ca00 Standardized options position in export/import commands, improve option checks 2021-07-08 13:48:02 -04:00
JRGTH
961731b063 New features and improvements revised and re-added 2021-07-07 05:05:38 -04:00
Jose
89c6ce9e78 Revert the improved import command due conflicts, later re add. 2021-05-15 08:16:10 -04:00
Jose
5583ab1d78 Add support bastille RAW image exports/imports, also extended help usage 2021-02-03 18:31:41 -04:00
Christer Edwards
6fa744bbda update 2021 copyright 2021-01-15 20:00:26 -07:00
Chris Wells
5e9578ca5e Use uppercase ZFS when appropriate. 2020-11-27 19:20:47 -05:00
Chris Wells
8b4d18f8f3 Create info() and warn() for cleaner print statements. 2020-11-25 21:19:08 -05:00
Chris Wells
aaffc882f9 Create and leverage global error functions 2020-08-30 10:57:14 -04:00
Jose
3c19c5b183 Initial alternate architecture fetch/create support 2020-07-24 10:47:28 -04:00
Jose
c98ea0a380 Improve checks in rename, update any spaces/tabs in jail.conf, remove redundant code 2020-05-12 02:47:26 -04:00
Marius van Witzenburg
f28054b47e Cleanup whitespace 2020-04-14 11:53:11 +02:00
Christer Edwards
945944feb4 release validation fixes 2020-04-12 19:06:27 -06:00
Christer Edwards
106c566c88 network cleanup; default route addition for vnet 2020-04-12 17:04:37 -06:00
Jose
4d538da4f8 Support for 'qjail' imports, import cmd improvements and fixes 2020-04-11 11:12:03 -04:00
Jose
00443ccdd1 Destroy related datasets on target, simplify snapshot naming 2020-04-09 06:32:00 -04:00
Jose
241ce01074 Let zfs mountpoints be inherited on standard archive imports 2020-04-08 06:47:33 -04:00
Jose
bfa500a183 Always check if user specified path exist 2020-04-04 10:23:43 -04:00
Jose
7db47f3dac Allow the user specify path for Export/Import on-the-fly 2020-04-04 09:46:56 -04:00
Jose
c2fefc5f16 Support for 'ezjail' archive import, improvements and fixes 2020-04-03 07:56:28 -04:00
Sven R
4bd0a9d00d Merge branch 'master' into import_fix 2020-02-27 07:43:52 +01:00
Sven R
659517b595 fix_import 2020-02-25 12:48:52 +01:00
Sven R
73e97ab18f fix_import 2020-02-25 12:43:16 +01:00
Sven R
c342b5cdc0 fix_import 2020-02-25 12:37:01 +01:00
Jose
9b3fde59b8 Fix Thickjail mountpoint inheritance in the root dataset 2020-02-21 11:35:35 -04:00
Jose
01eaccc1da Add double quotes to prevent globbing/word splitting, general code consistency improvements 2020-02-20 18:06:31 -04:00
Jose
5b25dbcdc5 Initial support to import foreign containers, ignore fstab update if don't exist. 2020-02-18 19:58:59 -04:00
Jose
015558c4bc Don't set jail ZFS dataset mountpoint, let be inherited from the system 2020-02-15 07:57:33 -04:00
Jose
d1709b7199 Add HardenedBSD support for convert, import and rename commands 2020-02-10 15:22:41 -04:00
Jose
96fcc6b591 Remove unneeded cat command 2020-02-04 15:56:52 -04:00
Jose
b3f4064d08 Compare/update fstab if both variables are set 2020-02-04 13:37:20 -04:00
Christer Edwards
97417b5b4f updating import usage output 2020-01-28 17:36:30 -07:00
Jose
38ae0ed4a6 Update list command and config 2020-01-28 18:57:51 -04:00
Jose
095075b142 Initial support for container export and import 2020-01-26 19:45:26 -04:00