Commit graph

349 commits

Author SHA1 Message Date
075645289f
add --hook-directory option and a directory with hooks 2020-08-16 00:50:46 +02:00
e2a759967f
put hook listener into its own function and expose it to the CLI via --hook-listener 2020-08-15 22:36:13 +02:00
c2c270390b
implement dpkg-realpath in perl so that we don't need to run tar inside the chroot anymore for modes other than fakechroot and proot 2020-08-15 18:29:17 +02:00
dc67c1f4be
if we got dpkg >= 1.20.0, then we don't have to create certain files and directories ourselves 2020-08-15 18:09:06 +02:00
904274b9f4
adjust genext2fs (>= 1.5.0) interface 2020-07-09 07:34:03 +02:00
112c0a5a6d
add documentation about --{setup,extract,essential,customize}-hooks and --skip option, making them an official interface 2020-06-23 23:14:37 +02:00
40b6155967
add another --dpkgopt example 2020-06-23 23:12:16 +02:00
4d041140d5
instead of 'du' we use File::Find to avoid different results on different filesystems, see https://bugs.debian.org/650077 for a discussion 2020-06-23 22:45:17 +02:00
655857e525
don't use apt sandboxing in fakechroot or proot modes 2020-06-08 15:45:22 +02:00
af13116336
do not hide errors even with --quiet
This change also fixes the problem that when --quiet is given, an error
will never lead to a non-zero exit status because the error function
returns before it runs die()
2020-05-10 13:36:54 +02:00
dc9a5dc281
document how to use mmdebstrap as a debootstrap wrapper 2020-05-03 17:19:03 +02:00
fa12e4f488
create /tmp with chmod 01777 2020-05-03 17:18:34 +02:00
b60893aa83
add --skip=output/dev 2020-05-03 15:06:41 +02:00
e1d0a17751
return immediately if nothing to do in download, extract and essential stages 2020-05-03 15:06:24 +02:00
ccae6de410
fix message 'failed to start' -> 'failed to run' 2020-05-02 23:55:34 +02:00
be2bb0bb7e
do not emit a tarball with xattrs for squashfs and ext2 output because tar2sqfs and genext2fs do not support extended attributes 2020-05-02 23:55:05 +02:00
da88c56b9f
warn if chrootless mode is run by the root user 2020-05-02 23:54:04 +02:00
6af46f0b4a
fix typo squasfs -> squashfs 2020-05-02 23:53:41 +02:00
08319f6c77
Return the same block number irrespective of what is in /dev
Depending on the mode an on whether mknod works (mount options of
$TMPDIR) different stuff might be in /dev. To make the blocksize in of
the ext2 output format reproducible, ignore the content of /dev.
2020-05-02 23:51:58 +02:00
af5841269c
always check if _apt user can access /var/lib/apt/lists/partial 2020-05-02 23:51:33 +02:00
af4e77903b
add instructions how to convert from ext2 to ext3 and ext4 2020-05-02 00:12:31 +02:00
3b67de6d31
add note about the dangers of chrootless mode 2020-05-02 00:12:31 +02:00
5cf209996e
format mmdebstrap bold in POD 2020-05-02 00:12:31 +02:00
4ea784c1bc
add --skip check/empty 2020-05-02 00:12:26 +02:00
1b380e4513
add --skip check/qemu 2020-05-01 07:39:26 +02:00
Helmut Grohne
d7f7f8cb34
skip the emulation check in chrootless mode
Whenever the selected architecture differs from the native architecture
of the system that runs mmdebstrap, mmdebstrap checks whether it can run
the selected architecture. In the majority of cases, this is good and
helps avoid difficult to diagnose issues. However when running in
chrootless mode, we don't actually want to run any binaries from the
target system. For that reason, the emulation check should be skipped in
chrootless mode.
2020-04-14 18:25:55 +02:00
9717faef59
refer to MODES section in docs for directory format 2020-04-12 09:11:35 +02:00
2678ccaf38
mention missing TARGET in docs for auto format 2020-04-12 09:11:21 +02:00
2ce9555dc5
expand docs for unshare mode 2020-04-12 09:10:30 +02:00
a0c097a6fa
TARGET must be italic not bold 2020-04-11 23:10:13 +02:00
f1a952d468
explicitly inform the user why apt-transport-https or apt-transport-tor are getting installed 2020-04-10 12:55:52 +02:00
9195972bef
dump contents of /etc/apt/apt.conf.d/99mmdebstrap and /etc/dpkg/dpkg.cfg.d/99mmdebstrap in debug mode 2020-04-10 12:55:31 +02:00
f6214e343f
add debug output of which command is run in run_progress() 2020-04-10 12:55:02 +02:00
ab5d5777d5
check whether qemu-$arch-static exists early 2020-04-10 12:26:42 +02:00
f50ca9bf6d
also warn if /usr/sbin/update-binfmts has non-zero exit 2020-04-10 12:26:14 +02:00
df1827d991
check if /usr/sbin/update-binfmts exists 2020-04-10 12:26:00 +02:00
a0c393f256
fix /proc/mounts regex to find binfmt_misc 2020-04-10 12:25:45 +02:00
d26f5de912
check whether arch-test exists 2020-04-10 12:25:24 +02:00
46f477f339
add --skip option 2020-04-10 00:00:36 +02:00
1076e9a78d
split up setup() into multiple functions 2020-04-10 00:00:02 +02:00
895c388ede
add --format option and ext2 image output 2020-04-09 20:40:23 +02:00
15d6f5528b
also print apt-get --version output with --debug 2020-04-09 18:40:23 +02:00
8d04ffee64
unset APT_CONFIG env var when running hook 2020-04-09 18:40:23 +02:00
d29bdafb89
add workaround for dpkg bug to docs 2020-04-09 18:40:23 +02:00
323a353548
output tarball if output is named pipe or character special 2020-04-09 18:40:23 +02:00
412039bd66
commit de8b6a45 forgot to also run re-install with /proc, /dev and /sys mounted 2020-04-09 18:40:22 +02:00
02ed5e33f8
add --extract-hook 2020-04-09 18:40:18 +02:00
5fae5e83f9
release 0.6.1 2020-03-08 23:21:16 +01:00
e1008006fc
add stub for future ext2 image support 2020-03-07 23:43:29 +01:00
773249a0ca
document limitation of missing /etc/ld.so.cache when using fakechroot 2020-03-07 23:42:41 +01:00
7bad5fb1e6
in unshare mode, the unshared process might not have enough permissions to rmdir root directory -- try again as normal user 2020-03-07 23:42:19 +01:00
3922851636
use Dpkg::Vendor::Debian and Dpkg::Vendor::Ubuntu for keyring locations, if they are available 2020-03-07 23:41:28 +01:00
89e7dd6756
store temporary files in /tmp inside the rootfs to avoid problems in unshare mode and TMPDIR set 2020-03-07 23:40:55 +01:00
b9db466a26
add note about usage of /usr/sbin/policy-rc.d 2020-03-07 23:39:53 +01:00
ff9b6509fb
add more usage examples 2020-03-07 02:25:55 +01:00
6c6378a6e0
emit more warnings about setting kernel.unprivileged_userns_clone to 1 2020-03-07 02:13:53 +01:00
48914894cb
dump temporary apt.conf with --debug 2020-03-07 02:13:26 +01:00
1ff5ba7e9e
set APT::Immediate-Configure to false in dry-run mode 2020-03-07 02:12:21 +01:00
3e50d09b43
create temporary apt.conf inside chroot because unshared process might not have permissions to write into TMPDIR 2020-03-07 02:11:35 +01:00
9918809a65
add another example about how to use mmdebstrap to make a bootable live system 2020-03-07 02:07:10 +01:00
bd84829595
unset TMPDIR environment variable for everything running inside the chroot 2020-03-07 02:06:11 +01:00
5bf8c3fcf9
add sync, umount and shutdown to guestfish calls 2020-03-04 13:29:07 +01:00
c4a47947ab
mount /sys and /proc as read-only in root mode 2020-01-24 10:14:10 +01:00
d503e4fd96
put fh variables into their own scope 2020-01-22 23:31:00 +01:00
62159d124a
support deb822-style format apt sources 2020-01-22 23:30:28 +01:00
1579d06380
use tempdir(..., TMPDIR => 1) instead of tempdir(..., DIR => File::Spec->tmpdir) 2020-01-22 00:30:12 +01:00
ae15fe3d9f
convert gpg keyring processing to less nesting and abort earlier if possible 2020-01-22 00:29:38 +01:00
c26ec4d6fc
instead of hardcoding /etc/apt/trusted.gpg, read it from apt-config shell 2020-01-22 00:28:48 +01:00
efaea907e9
run apt-cache policy instead of dumping sources.list 2020-01-22 00:28:22 +01:00
c45e7d9baf
print warning if apt trusted cannot be read 2020-01-22 00:27:57 +01:00
75428e37dd
assign the absolute key path and not the relative one 2020-01-21 13:38:53 +01:00
64fedc530e
Restore deterministic tar with pax and xattr support
- all creating and extraction of tarballs respects extended attributes
 - extended attributes require pax format, so explicitly request the
   format
 - to make pax bit-by-bit reproducible, ctime, atime and PID have to be
   removed from the headers with:
   --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime
 - always pass --numeric-owner to tar
 - always pass --xattrs when creating a tar
 - always pass --xattrs --xattrs-include=* when extracting a tar
2020-01-21 13:24:49 +01:00
a1df1a9730
fix docs: default variant is 'debootstrap' and not 'required' 2020-01-21 13:17:31 +01:00
bef4c890d8
if /etc/machine-id exists, replace by an empty file 2020-01-21 13:13:58 +01:00
9eaacca795
dump apt config with verbosity level >= 3 2020-01-21 13:12:44 +01:00
6455cda34b
release 0.6.0 2020-01-19 22:24:32 +01:00
c33ded3539
improve differences to debootstrap docs a bit more 2020-01-19 22:22:50 +01:00
98c8c573de
coverage.sh: test taridshift 2020-01-18 23:13:10 +01:00
30ec192c50
some improvements to the docs 2020-01-16 18:03:13 +01:00
6e829ca066
send error package when anything goes wrong in special hook handling 2020-01-16 12:02:11 +01:00
7d152ec7e0
add sync-in and sync-out hooks 2020-01-16 10:38:14 +01:00
7852a33d01
don't forget chrootless in the list of mode names 2020-01-10 12:05:01 +01:00
2cb6438454
add --dry-run and --simulate 2020-01-10 11:44:15 +01:00
9441184bf1
reformat some code to keep opening curly brace on the right 2020-01-10 09:29:34 +01:00
f867384c20
coverage.sh: test with perlcritic 2020-01-09 08:39:40 +01:00
4ba82a41cf
format code with perltidy 2020-01-08 17:46:41 +01:00
bba8922243
reformat code that would exceed 79 character width even after perltidy 2020-01-08 17:41:46 +01:00
6abbb3ebd9
wrap POD to 79 characters width 2020-01-08 17:19:30 +01:00
2782d14348
rewrite comments so that they fit into 79 characters 2020-01-08 17:07:17 +01:00
27bd6df320
add vim modeline 2020-01-08 16:22:51 +01:00
b10177cb6e
use spaces instead of tabs 2020-01-08 15:41:49 +01:00
6d3a824b45
disable Devel::Cover before exec-ing external tools to avoid massive slowdowns 2020-01-08 15:40:42 +01:00
4fed488c35
when re-execing itself, keep Devel::Cover options 2020-01-08 15:33:49 +01:00
dbdf3f34c6
add support for generating squashfs images using tar2sqfs 2020-01-07 17:40:13 +01:00
c6944d0b8f
cleanup leftovers in /tmp inside the chroot 2020-01-06 12:44:49 +01:00
61db086921
also clean package lists and apt cache from sources.d directory 2020-01-06 12:44:29 +01:00
327c0e83ca
further document prerequisites and limitations of different modes 2020-01-04 01:10:46 +01:00
ecd5c7a662
fixup warning message 2020-01-04 01:09:59 +01:00
8abb93633c
warn that creating tarball might also fail in proot mode for extract and custom variants 2020-01-04 00:59:22 +01:00
05e796cd95
add missing error handlers for fork() and open() calls 2020-01-04 00:39:00 +01:00