Commit Graph

591 Commits (main)

Author SHA1 Message Date
Gioele Barabucci 8e6f183b3f mmdebstrap: Install mbr.bin in /boot and keep after installation 2 years ago
Gioele Barabucci 97e6981ddc mmdebstrap: Read extlinux's MBR from /usr/lib/EXTLINUX
`/usr/lib/SYSLINUX` is not available if only `extlinux` is installed.
2 years ago
Gioele Barabucci 22c0ba45a0 mmdebstrap: Use ext4 instead of ext2 in examples 2 years ago
Gioele Barabucci 829df60242 mmdebstrap: Align autopkgtest-build-qemu and USB stick examples
Write the same `guestfish` instructions in the same way in both the
`autopkgtest-build-qemu` and the "Debian desktopn on a USB stick" example.
2 years ago
Johannes Schauer Marin Rodrigues 070a9cecb7
release 0.8.4 2 years ago
Johannes Schauer Marin Rodrigues 38a81e75bb
remove information about kernel.unprivileged_userns_clone from the man page 2 years ago
Johannes Schauer Marin Rodrigues ce8a9f8764
also remove /var/lib/dbus/machine-id 2 years ago
Johannes Schauer Marin Rodrigues e865ce850f
document another advantage of running apt outside the chroot 2 years ago
Johannes Schauer Marin Rodrigues 2b60a932a9
don't install essential packages in run_install() 2 years ago
Johannes Schauer Marin Rodrigues 632a918780
release 0.8.3 2 years ago
Johannes Schauer Marin Rodrigues 6ba6d10c4f
document that 'upload' doesn't retain permissions and ownership 2 years ago
Johannes Schauer Marin Rodrigues 4f811b7117
print errer message if mmdebstrap failed to run 2 years ago
Johannes Schauer Marin Rodrigues ff2910a746
send SIGHUP to children if tar failed 2 years ago
Johannes Schauer Marin Rodrigues 0da6f103a1
hardcode 'stable' to use stable-security mirror 2 years ago
Johannes Schauer Marin Rodrigues 388c7980d3
don't copy in qemu-user-static if we don't need to 2 years ago
Johannes Schauer Marin Rodrigues 8bc6a4daa9
set PATH in main instead of run_setup 2 years ago
Johannes Schauer Marin Rodrigues 0383efc554
don't overwrite existing files in setup 2 years ago
Johannes Schauer Marin Rodrigues 1b0f7f1138
make $@ local, so we don't print "Can't locate Undefined subroutine &Devel::Cover::get_coverage called" in other parts where we evaluate $@ 2 years ago
Johannes Schauer Marin Rodrigues 88619e4d9c
test codename apt pattern as well, requires apt >= 2.3.14
closes: #21
2 years ago
Johannes Schauer Marin Rodrigues 5d8943b739
release 0.8.2 2 years ago
Johannes Schauer Marin Rodrigues 7501708aaf
perltidy 20200110 -> 20210717 2 years ago
Konstantin Demin e4e10b670c
allow custom daemon startup prevention
don't bother with /sbin/start-stop-daemon and /usr/sbin/policy-rc.d
if they're not a regular files (e.g. symlinks)

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
2 years ago
Johannes Schauer Marin Rodrigues c4a43ea0f9
make $@ local, so we don't print "Can't locate Dpkg/Vendor/Debian.pm" in other parts where we evaluate $@ 2 years ago
Johannes Schauer Marin Rodrigues 60d69f6f78
Use apt patters to select priority variants
- requires apt >= 2.3.10
 - we can drop having to run apt-get indextargets and parse Packages
   files ourselves
 - we can drop the layer violation that computed the package set in
   run_download() and passed the package set around in setup() to
   run_install()
 - packages are selected by suite unless the suite is the empty string
3 years ago
Johannes Schauer Marin Rodrigues 3b41fe6805
document mmdebstrap as docker/podman replacement 3 years ago
Raul Tambre c61e81a244 Relax dpkg version regex
For non-release builds the version will include the number of commits since last release and the commit hash with dashes, e.g. 1.20.8-46-g0881.
For downstream distros it seems it may include their identification strings, e.g. 1.20.9ubuntu2.

Make the regex match everything after the version number to avoid incorrectly erroring on such versions.

Fixes #18
3 years ago
Johannes Schauer Marin Rodrigues 7a062661e5
release 0.8.1 3 years ago
Johannes Schauer Marin Rodrigues 1d2a7ef71a
enforce dpkg >= 1.20.0 and remove dead code 3 years ago
Johannes Schauer Marin Rodrigues 4f278deadf
use rm and find instead of remove_tree()
* remove_tree() requires the CWD to be accessible or fails with
   cannot chdir to $CWD from $DIR_TO_DELETE: Permission denied, aborting.
 * CWD is not always accessible -- example: run mmdebstrap from a
   directory only accessible by the current user (like a tempdir) in
   unshare mode
 * find from findutils *also* requires CWD to be accessible but it's
   easier to temporarily change CWD in a subprocess because using
   there is no utility in perl core that changes CWD temporarily and
   cleans up after itself
 * we need to use find from findutils instead of rm in unshare mode
   because the root directory itself might not be removable by the
   unshared user so we only want to remove its subdirectories
3 years ago
Johannes Schauer Marin Rodrigues c2d988b475
enforce apt >= 2.3.7 and remove dead code (closes: #14) 3 years ago
Johannes Schauer Marin Rodrigues 28cb757742
do not run xz and zstd with --threads=0
There are now systems with 160 cores (debci runs on two Ampere Altra
ARMv8 Neoverse-N1), which makes xz fail with: "xz: (stdin): Cannot
allocate memory"
3 years ago
Johannes Schauer Marin Rodrigues 12ec2c50aa
also create cmethopt and available in chrootless mode
- this allows bit-by-bit identical output of chrootless mode compared
   to other modes
3 years ago
Johannes Schauer Marin Rodrigues 1a4491b4d3
release 0.8.0 3 years ago
Johannes Schauer Marin Rodrigues 2c945e4c87
improve fakechroot LD_LIBRARY_PATH
- use /etc/ld.so.conf from the chroot instead of the host
 - parse /etc/ld.so.conf instead of blindly accessing /etc/ld.so.conf.d
 - add libraries from the chroot instead of the host
3 years ago
Johannes Schauer Marin Rodrigues ddb642a1dc
update apt MR urls 3 years ago
Johannes Schauer Marin Rodrigues dceb881bd0
drop DPkg::Install::Recursive::force=true (requires apt >= 2.3.7) 3 years ago
Johannes Schauer Marin Rodrigues 6d59d51a4a
add ldconfig.fakechroot and translate symlinks for bit-by-bit identical buildd variant 3 years ago
Johannes Schauer Marin Rodrigues 6a22e05d59
document that zstd is also called with --threads=0 3 years ago
Johannes Schauer Marin Rodrigues c7390f648b
be more permissive in the FAKECHROOT_DETECT version format 3 years ago
Johannes Schauer Marin Rodrigues 631b103ca7
check for symlink first to compute disk usage because -f und -s otherwise follow symlinks 3 years ago
Johannes Schauer Marin Rodrigues 101229aa04
add a newline to /etc/machine-id as systemd does the same 3 years ago
Johannes Schauer Marin Rodrigues 5b0bb46421
add gpgvnoexpkeysig 3 years ago
Johannes Schauer Marin Rodrigues 6851cd7cb4
move hooks/setup00-merged-usr.sh -> hooks/merged-usr/setup00.sh, expand docs 3 years ago
Johannes Schauer Marin Rodrigues 6a8fbae9d8
make fakechroot mode bit-by-bit identical to the others 3 years ago
Johannes Schauer Marin Rodrigues 7d472ca116
document on how to use mmdebstrap with podman 3 years ago
Johannes Schauer Marin Rodrigues 047619967e
also check whether CAP_SYS_ADMIN is in the bounding set 3 years ago
Johannes Schauer Marin Rodrigues 5a5f57b404
Automatically skip using mount if that's not possible
- instead of throwing an error, just print a warning
 - can now run as root without cap_sys_admin
 - can now run without mount installed
 - --skip=check/canmount is not needed anymore
3 years ago
Johannes Schauer Marin Rodrigues 1a18160fe8
document that apt-transport-https, ca-certificates and apt-transport-tor are no longer installed automatically 3 years ago
Johannes Schauer Marin Rodrigues 91d8be5f9c
Do not use gpg --trust-model=always
- gpg will not create a trustdb when running with --update-trustdb with
   --trust-model=always:
       gpg: no need for a trustdb update with 'always' trust model
 - subsequent gpg calls will fail because there is no trustdb in GPGHOME
3 years ago
Johannes Schauer Marin Rodrigues 850eeb24d5
more code comments 3 years ago
Johannes Schauer Marin Rodrigues 8b12375de3
add more references to #808203 3 years ago
Johannes Schauer Marin Rodrigues c627606110
document copy:// vs. file:// 3 years ago
Johannes Schauer Marin Rodrigues 60dba1c19e
fixup read_subuid_subgid
- use $REAL_USER_ID from English instead of $<
 - use getgrgid $REAL_GROUP_ID to get the group name instead of assuming
   the group name to be equal to the user name
 - also check whether /etc/subgid exists and is readable
3 years ago
Joe Groocock 15029c1c3b
improve error message for missing /etc/subuid entry (closes: #9) 3 years ago
Johannes Schauer Marin Rodrigues 3c37d692a0
write 'uninitialized' to /etc/machine-id to support systemd ConditionFirstBoot (closes: #10) 3 years ago
Nicolas Vigier 5283d74dfe
Remove files inside the auxfiles directory
This is fixing the error:
  cannot rmdir /var/lib/apt/lists/auxfiles: Directory not empty at ./mmdebstrap/mmdebstrap line 3084.
which happens when using apt-transport-mirror.
3 years ago
Johannes Schauer Marin Rodrigues ea82b267c9
only run test_unshare_userns() if not root user 3 years ago
Johannes Schauer Marin Rodrigues dfbf9cdcef
several fixes to chrootless mode 3 years ago
Johannes Schauer Marin Rodrigues f868073b6e
add --skip=setup, --skip=update and --skip=cleanup 3 years ago
Johannes Schauer Marin Rodrigues 98f1f0abde
use apt pattern to select essential set 3 years ago
Johannes Schauer Marin Rodrigues 3e488dd1dd
use apt from the outside by setting DPkg::Chroot-Directory 3 years ago
Johannes Schauer Marin Rodrigues c63ad87310
changes for release of Debian 11 Buster 3 years ago
Johannes Schauer Marin Rodrigues 594ea3c72e
improve busybox and --hook-dir examples in man page -- thanks Jochen Sprickerhof! 3 years ago
Johannes Schauer Marin Rodrigues 3f79c18a0d
since apt 2.1.16 we can use --error-on=any and do not anymore need to error out on all W: lines (closes: #6) 3 years ago
Benjamin Drung 0378c101bb
Pass extended attributes (excluding system) to tar2sqfs
/bin/ping (from iputils-ping) uses the security capabilities to allow
users to use the program:

```
$ getcap /bin/ping
/bin/ping cap_net_raw=ep
```

Debian testing/unstable images (variant important) contain security and
system attributes:

```
$ mmdebstrap --variant=important bullseye root.tar
$ tar --xattrs --xattrs-include='*' -vv -tf root.tar | grep -B 1 '^ '
-rwxr-xr-x* 0/0           77432 2021-02-02 18:49 ./bin/ping
  x: 20 security.capability
--
drwxr-sr-x* 0/102             0 2021-05-07 15:10 ./var/log/journal/
  x: 44 system.posix_acl_access
  x: 44 system.posix_acl_default
```

When generating a squashfs image with mmdebstrap 0.7.5-2, these security
capabilities are lost. Example for building a squashfs image in a
minimal Debian unstable schroot:

```
$ apt install -y mmdebstrap squashfs-tools-ng
$ mmdebstrap --variant=important buster root.squashfs
$ rdsquashfs -x /bin/ping root.squashfs
$
```

tar2sqfs from squashfs-tools-ng 1.0.4-1 supports encoding extended
attributes from the namespace `user`, `trusted`, and `security` (see
`include/sqfs/xattr.h`). GNU tar (version 1.34) supports these three
namespaces plus the namespace `system`.

Passing extended attributes from the `system` namespace to tar2sqfs will
produce an error:

```
ERROR: squashfs does not support xattr prefix of system.posix_acl_default
```

So pass the extended attributes to tar2sqfs, but exclude the `system`
namespace. Then ping will keep its security attributes:

```
$ rdsquashfs -x /bin/ping root.squashfs
security.capability=0x0100000200200000000000000000000000000000
```

Closes: #988100
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
3 years ago
Johannes Schauer Marin Rodrigues 88a031477a
add --skip=cleanup/apt/lists and --skip=cleanup/apt/cache 3 years ago
Vagrant Cascadian c51fb24c7b
Use all cores when compressing with zstd. 3 years ago
Johannes Schauer Marin Rodrigues 236b84a486
tarfilter: add --pax-exclude and --pax-include to strip extended attributes because tar2sqfs only supports user.*, trusted.* and security.* 3 years ago
Johannes Schauer Marin Rodrigues ebfac91738
also choose null format if stdout is /dev/null and check whether major and minor number of /dev/null are as expected to avoid false positives 3 years ago
Konstantin Demin ccd4b5c163
gpg: handle ASCII-armored keyrings as well
gpg command "--list-keys" requires input files to be passed with
option "--keyring" and each file must match type "public keyring v4"
while gpg command "--show-keys" doesn't require extra options and
handles also ASCII-armored public keyrings as well.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
3 years ago
Helmut Grohne 2767b051bc
implement --format=null 3 years ago
Johannes Schauer Marin Rodrigues 4c17f36072
better document the TMPDIR env var 3 years ago
Johannes Schauer Marin Rodrigues 5a3d1ab5c4
Rework /dev, /sys, /proc mounting
- assume all entries in @devfiles to be in /dev
 - allow for /dev, /sys and /proc not to exist in the target and print warning
 - allow for /dev entries as well as /sys and /proc not to exist on the outside
 - simplify umount by storing special options in @umountopts
 - remove superfluous checks for root and unshare mode
 - make sure /dev entries are less than 100 chars in size for tar
3 years ago
Johannes Schauer Marin Rodrigues d52eaa4814
instead of checking for defined-ness and then comparing with the empty string, we can just use 'length' which returns undef if its argument is undef 3 years ago
Johannes Schauer Marin Rodrigues 270fd09b43
update copyright information 3 years ago
Johannes Schauer Marin Rodrigues d5c8a85ace
document problems with chrootless mode in man page 3 years ago
Johannes Schauer Marin Rodrigues ecbc10794c
warn if --dpkgopt is used in chrootless mode because of #808203 3 years ago
Johannes Schauer Marin Rodrigues 49f464e7da
create /etc/dpkg/dpkg.cfg.d/ if --dpkgopt is used 3 years ago
Johannes Schauer Marin Rodrigues 067daaf4c2
also run unshare with --propagation unchanged in root mode 3 years ago
Josh Triplett f8fc7d9bbf
Fix typo in hook directory example 3 years ago
Johannes Schauer Marin Rodrigues 976cc9c1c4
release 0.7.5 3 years ago
Johannes Schauer Marin Rodrigues 73cd7cd2e8
run unshare --mount with --propagation unchanged to prevent 'cannot change root filesystem propagation' when running mmdebstrap from inside a chroot 3 years ago
Johannes Schauer Marin Rodrigues 39167dbc30
expose hook name to hooks via MMDEBSTRAP_HOOK environment variable 3 years ago
Johannes Schauer Marin Rodrigues 8a4f4d90ab
remove example showing mmdebstrap as debootstrap replacement for sbuild-createchroot as it doesn't work in unshare mode 3 years ago
Johannes Schauer Marin Rodrigues e1e0df7799
skip emulation check for extract variant 3 years ago
Johannes Schauer Marin Rodrigues c740b01dc8
unset TMPDIR in hooks because there is no value that works inside as well as outside the chroot 3 years ago
Johannes Schauer Marin Rodrigues 0595c5c220
add new suite name trixie 3 years ago
Johannes Schauer Marin Rodrigues 7a43ff89dc
improve dpkg and apt version parsing 3 years ago
Johannes 'josch' Schauer d9633d05fe
release 0.7.4 3 years ago
Johannes 'josch' Schauer 7bd733fb8b
In root mode, check whether it's possible to mount
- even if the user is root, they might not have permission to mount
 - check for CAP_SYS_ADMIN and unshare --mount before proceeding
 - allow one to disable the check with --skip=check/canmount
 - this is useful in container environments like docker
3 years ago
Johannes 'josch' Schauer 205f5c2692
document how to use mmdebstrap to create a docker chroot 3 years ago
Johannes 'josch' Schauer 4693034138
allow unshare as root user
- this is useful when you are already root and want the benefits of
   unsharing the mount namespace to prevent messing up your system
 - if the unshare mode is used as root, the user namespace is not unshared
   anymore and newuidmap, setuid and friends are not called anymore
 - if the unshare mode is used as non-root test if the user namespace can be
   unshared, otherwise test if the mount namespace can be unshared
3 years ago
Johannes 'josch' Schauer ea6bbc1d9c
#898446 got closed and the default of kernel.unprivileged_userns_clone changed to 1 3 years ago
Johannes 'josch' Schauer 62bcf3261e
do not run an additional env command inside the chroot 3 years ago
Johannes 'josch' Schauer 7ff3f53fb9
apt 2.1.16 fixed immediate configure 3 years ago
Johannes 'josch' Schauer ac21074243
set MMDEBSTRAP_APT_CONFIG, MMDEBSTRAP_MODE and MMDEBSTRAP_HOOKSOCK for hook scripts 3 years ago
Johannes 'josch' Schauer 9484107392
set PATH if it's unset or empty 3 years ago
Johannes 'josch' Schauer 2d03a81997
coverage.sh: reenabling tests because bugs got fixed
- systemd didn't get fixed but somehow the order matches again (bug #963788)
 - python is installable again (bug #968217)
 - apt immediate configure was not fixed but src:glibc changed to not
   trigger the bug anymore (bugs #973305, #973325 and #972552)
3 years ago
Johannes 'josch' Schauer 0b2a0c5a55
release 0.7.3 3 years ago
Johannes 'josch' Schauer 43ca8a5211
it is wrong to match the suite for the package set selection if more than one apt index is given (because the suite name might be equal) instead check whether there is more than zero matching and more than zero not-matching suites 3 years ago
Johannes 'josch' Schauer 2c232e0661
don't ignore packages added via --include if multiple apt indices are used 3 years ago
Johannes 'josch' Schauer 85328c5c7e
mmdebstrap: check for defined-ness before integer comparison 3 years ago
Johannes 'josch' Schauer 165cc82f97
preserve permissions of /etc/resolv.conf and /etc/hostname and resolve symlinks as debootstrap does it 3 years ago
Johannes 'josch' Schauer beb0b8c177
name solver mmdebstrap-dump-solution in official apt path 3 years ago
Johannes 'josch' Schauer f76bcb5750
release 0.7.2 3 years ago
Johannes 'josch' Schauer 732fde54f8
documentation improvements, add OPERATION section 3 years ago
Johannes 'josch' Schauer da449be3fe
fix missing I in front of <> 3 years ago
Johannes 'josch' Schauer 2e19a8bda4
remove nonsense code comment 3 years ago
Johannes 'josch' Schauer 96f45ec2e7
info messages start with lower case character 3 years ago
Johannes 'josch' Schauer b7e257871d
use Debian::DistroInfo if available 3 years ago
Johannes 'josch' Schauer b2ea7b230f
remove no-op if statement 3 years ago
Johannes 'josch' Schauer 1e7e002eb1
print explicit info message about installing essential packages 3 years ago
Johannes 'josch' Schauer ad56754a2a
pkgs_to_install might contain duplicates when multiple suites are used -- avoid that by using a hash instead of an array 4 years ago
Johannes 'josch' Schauer 0c990abc48
coverage.sh: only consider non-POD parts for maximum line length check 4 years ago
Johannes 'josch' Schauer 534798dbd2
add example for how to use a cache directory 4 years ago
Johannes 'josch' Schauer 12b26a8817
use /usr/share/distro-info/debian.csv to figure out the security mirror for bullseye and beyond 4 years ago
Johannes 'josch' Schauer 9d32dee3f5
if a suite name was specified, use the matching apt index to figure out the package set to install 4 years ago
Johannes 'josch' Schauer 21a26b5dac
pass verbosity to hook-listener 4 years ago
Johannes 'josch' Schauer e71487af5e
improve hook-helper and hook-listener debug output 4 years ago
Johannes 'josch' Schauer bf87e83bdb
make it possible to seed /var/cache/apt/archives with deb packages 4 years ago
Johannes 'josch' Schauer 50d8d5edae
check whether dpkg, apt and others are installed (closes: #18) 4 years ago
Johannes 'josch' Schauer 0a985948cf
create temporary test ext2 image in TMPDIR and not in CWD 4 years ago
Johannes 'josch' Schauer 1000a033e8
release 0.7.1 4 years ago
Johannes 'josch' Schauer 259a188e06
fix typo: 3030 -> 2020 (thanks Trent W. Buck!) 4 years ago
Johannes 'josch' Schauer 65e40c8c34
redirect stderr of dpkg --version to /dev/null to prevent error output if dpkg is too old (thanks Trent W. Buck!) 4 years ago
Johannes 'josch' Schauer 58925dc493
add two more debug messages 4 years ago
Johannes 'josch' Schauer 400b51ad7b
release 0.7.0 4 years ago
Johannes 'josch' Schauer 3713735240
document non-functional --variant=standard due to bug #968217 4 years ago
Johannes 'josch' Schauer 7c752fa8a0
print elapsed time after successful run 4 years ago
Johannes 'josch' Schauer 74725ac451
coverage.sh: test eatmydata and merged-usr hooks 4 years ago
Johannes 'josch' Schauer 465c056434
no longer needs to install twice when --depkgopt=path-exclude is given by filtering the tarball with new tarfilter utility 4 years ago
Johannes 'josch' Schauer 8f09c3e02f
unless in chrootless mode, omitting stuff in /var/lib/dpkg does not depend on the dpkg version outside, but on the version inside the chroot (and we don't know that one yet) 4 years ago
Johannes 'josch' Schauer dd64e8220d
use distro-info-data and debootstrap to help with suite name and keyring discovery 4 years ago
Johannes 'josch' Schauer 87d383d754
replace -t STDERR with a common function that explains the 'no critic' annotation 4 years ago
Johannes 'josch' Schauer 307cbf5a41
prefix certain progress bars with what is being done (closes: #16) 4 years ago
Johannes 'josch' Schauer df18304449
add a new pipe to communicate the number of blocks to the parent instead of abusing the hookhelper/listener 4 years ago
Johannes 'josch' Schauer a5ea38cbad
fix docs: there are four hooks, not three 4 years ago
Johannes 'josch' Schauer 0451d5f004
do not suggest using --dpkgopt=force-unsafe-io because it barely brings any speedups, see Debian bug #613428 4 years ago
Johannes 'josch' Schauer 614ef0e43d
make it clear that --aptopt and --dpkgopt add their content permamently 4 years ago
Johannes 'josch' Schauer 23fb2055e4
fix error message to specify the right command 4 years ago
Johannes 'josch' Schauer 501e29fdeb
fix closedir calls 4 years ago
Johannes 'josch' Schauer 12f41ad33f
fix syntax for perltidy 4 years ago
Johannes 'josch' Schauer 075645289f
add --hook-directory option and a directory with hooks 4 years ago
Johannes 'josch' Schauer e2a759967f
put hook listener into its own function and expose it to the CLI via --hook-listener 4 years ago
Johannes 'josch' Schauer 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 4 years ago
Johannes 'josch' Schauer dc67c1f4be
if we got dpkg >= 1.20.0, then we don't have to create certain files and directories ourselves 4 years ago
Johannes 'josch' Schauer 904274b9f4
adjust genext2fs (>= 1.5.0) interface 4 years ago
Johannes 'josch' Schauer 112c0a5a6d
add documentation about --{setup,extract,essential,customize}-hooks and --skip option, making them an official interface 4 years ago
Johannes 'josch' Schauer 40b6155967
add another --dpkgopt example 4 years ago
Johannes 'josch' Schauer 4d041140d5
instead of 'du' we use File::Find to avoid different results on different filesystems, see https://bugs.debian.org/650077 for a discussion 4 years ago
Johannes 'josch' Schauer 655857e525
don't use apt sandboxing in fakechroot or proot modes 4 years ago
Johannes 'josch' Schauer 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()
4 years ago
Johannes 'josch' Schauer dc9a5dc281
document how to use mmdebstrap as a debootstrap wrapper 4 years ago
Johannes 'josch' Schauer fa12e4f488
create /tmp with chmod 01777 4 years ago
Johannes 'josch' Schauer b60893aa83
add --skip=output/dev 4 years ago
Johannes 'josch' Schauer e1d0a17751
return immediately if nothing to do in download, extract and essential stages 4 years ago
Johannes 'josch' Schauer ccae6de410
fix message 'failed to start' -> 'failed to run' 4 years ago
Johannes 'josch' Schauer be2bb0bb7e
do not emit a tarball with xattrs for squashfs and ext2 output because tar2sqfs and genext2fs do not support extended attributes 4 years ago
Johannes 'josch' Schauer da88c56b9f
warn if chrootless mode is run by the root user 4 years ago
Johannes 'josch' Schauer 6af46f0b4a
fix typo squasfs -> squashfs 4 years ago
Johannes 'josch' Schauer 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.
4 years ago
Johannes 'josch' Schauer af5841269c
always check if _apt user can access /var/lib/apt/lists/partial 4 years ago
Johannes 'josch' Schauer af4e77903b
add instructions how to convert from ext2 to ext3 and ext4 4 years ago
Johannes 'josch' Schauer 3b67de6d31
add note about the dangers of chrootless mode 4 years ago
Johannes 'josch' Schauer 5cf209996e
format mmdebstrap bold in POD 4 years ago
Johannes 'josch' Schauer 4ea784c1bc
add --skip check/empty 4 years ago
Johannes 'josch' Schauer 1b380e4513
add --skip check/qemu 4 years ago
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.
4 years ago
Johannes 'josch' Schauer 9717faef59
refer to MODES section in docs for directory format 4 years ago
Johannes 'josch' Schauer 2678ccaf38
mention missing TARGET in docs for auto format 4 years ago
Johannes 'josch' Schauer 2ce9555dc5
expand docs for unshare mode 4 years ago
Johannes 'josch' Schauer a0c097a6fa
TARGET must be italic not bold 4 years ago
Johannes 'josch' Schauer f1a952d468
explicitly inform the user why apt-transport-https or apt-transport-tor are getting installed 4 years ago
Johannes 'josch' Schauer 9195972bef
dump contents of /etc/apt/apt.conf.d/99mmdebstrap and /etc/dpkg/dpkg.cfg.d/99mmdebstrap in debug mode 4 years ago
Johannes 'josch' Schauer f6214e343f
add debug output of which command is run in run_progress() 4 years ago
Johannes 'josch' Schauer ab5d5777d5
check whether qemu-$arch-static exists early 4 years ago
Johannes 'josch' Schauer f50ca9bf6d
also warn if /usr/sbin/update-binfmts has non-zero exit 4 years ago
Johannes 'josch' Schauer df1827d991
check if /usr/sbin/update-binfmts exists 4 years ago
Johannes 'josch' Schauer a0c393f256
fix /proc/mounts regex to find binfmt_misc 4 years ago
Johannes 'josch' Schauer d26f5de912
check whether arch-test exists 4 years ago
Johannes 'josch' Schauer 46f477f339
add --skip option 4 years ago
Johannes 'josch' Schauer 1076e9a78d
split up setup() into multiple functions 4 years ago
Johannes 'josch' Schauer 895c388ede
add --format option and ext2 image output 4 years ago
Johannes 'josch' Schauer 15d6f5528b
also print apt-get --version output with --debug 4 years ago
Johannes 'josch' Schauer 8d04ffee64
unset APT_CONFIG env var when running hook 4 years ago
Johannes 'josch' Schauer d29bdafb89
add workaround for dpkg bug to docs 4 years ago
Johannes 'josch' Schauer 323a353548
output tarball if output is named pipe or character special 4 years ago
Johannes 'josch' Schauer 412039bd66
commit de8b6a45 forgot to also run re-install with /proc, /dev and /sys mounted 4 years ago
Johannes 'josch' Schauer 02ed5e33f8
add --extract-hook 4 years ago
Johannes 'josch' Schauer 5fae5e83f9
release 0.6.1 4 years ago
Johannes 'josch' Schauer e1008006fc
add stub for future ext2 image support 4 years ago
Johannes 'josch' Schauer 773249a0ca
document limitation of missing /etc/ld.so.cache when using fakechroot 4 years ago
Johannes 'josch' Schauer 7bad5fb1e6
in unshare mode, the unshared process might not have enough permissions to rmdir root directory -- try again as normal user 4 years ago
Johannes 'josch' Schauer 3922851636
use Dpkg::Vendor::Debian and Dpkg::Vendor::Ubuntu for keyring locations, if they are available 4 years ago
Johannes 'josch' Schauer 89e7dd6756
store temporary files in /tmp inside the rootfs to avoid problems in unshare mode and TMPDIR set 4 years ago
Johannes 'josch' Schauer b9db466a26
add note about usage of /usr/sbin/policy-rc.d 4 years ago
Johannes 'josch' Schauer ff9b6509fb
add more usage examples 4 years ago
Johannes 'josch' Schauer 6c6378a6e0
emit more warnings about setting kernel.unprivileged_userns_clone to 1 4 years ago
Johannes 'josch' Schauer 48914894cb
dump temporary apt.conf with --debug 4 years ago
Johannes 'josch' Schauer 1ff5ba7e9e
set APT::Immediate-Configure to false in dry-run mode 4 years ago