Commit Graph

6240 Commits

Author SHA1 Message Date
Theodore Ts'o
600e95380e debian: remove hard-coded dependency for libss2 in e2fsprogs.shlibs.local
The hard-coded override is very old, and isn't necessary --- in fact,
it's actively harmful because we are using one or two symbols that
were added to libss2 after e2fsprogs 1.34.   So remove it.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:16:27 -04:00
Theodore Ts'o
fcfd0c92df debian: fix up libcom-err2's version dependency handling
We renamed libcomerr2 to libcom-err2 in 1.43.9.  So generating
dependencies of the form libcom-err2 (>= 1.34) don't really make any
sense.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:16:27 -04:00
Theodore Ts'o
72159760cc Add patch: Make sure all release note files have a single trailing empty line
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:16:27 -04:00
Theodore Ts'o
4af763a5fa debian: update to debian policy 4.2.0
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:10:48 -04:00
Theodore Ts'o
674b6dce64 debian: create NEWS.gz in /usr/share/doc/e2fsprogs
Create the full NEWS.gz and put it in /usr/share/doc/e2fsprogs instead
of the RELEASE-NOTES file to comply with the Debian policy 4.2.0.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:10:43 -04:00
Theodore Ts'o
d16afd2cb6 debian: remove hard-coded dependency for libss2 in e2fsprogs.shlibs.local
The hard-coded override is very old, and isn't necessary --- in fact,
it's actively harmful because we are using one or two symbols that
were added to libss2 after e2fsprogs 1.34.   So remove it.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:08:24 -04:00
Theodore Ts'o
0ebf9dc270 debian: fix up libcom-err2's version dependency handling
We renamed libcomerr2 to libcom-err2 in 1.43.9.  So generating
dependencies of the form libcom-err2 (>= 1.34) don't really make any
sense.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:07:54 -04:00
Theodore Ts'o
fb2b139a98 debian: update to debian policy 4.2.0
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:04:24 -04:00
Theodore Ts'o
40ab405c37 debian: create NEWS.gz in /usr/share/doc/e2fsprogs
Create the full NEWS.gz and put it in /usr/share/doc/e2fsprogs instead
of the RELEASE-NOTES file to comply with the Debian policy 4.2.0.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 19:03:59 -04:00
Theodore Ts'o
ed07fd9305 Fix "make install" for configure --enable-subset
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 13:42:23 -04:00
Theodore Ts'o
b1d874a6b8 Make sure all release note files have a single trailing empty line
This is needed so we can assemble a complete release notes file via a
command like:

cat $(/bin/ls -1 doc/RelNotes/v*.txt | tac) | gzip -9n > NEWS.gz

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 00:52:08 -04:00
Artem Blagodarenko
8aa8f063de e2image: copy mmp block when create metadata only image
e2image in modes without data blocks copy (-r, -Q) doesn't copy
mmp block that leads to fsck error:

Superblock has invalid MMP magic.  Fix? no

This patch adds coping this block if mmp is enabled.

Change-Id: I66035ee394a0ff53b9959e82b3e47050f3bf1593
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-22 00:37:54 -04:00
Theodore Ts'o
6155f31492 Cherry-pick "e2fsck: allow verity files to have initialized blocks past i_size"
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-21 16:28:28 -04:00
Eric Biggers
3baafde6a8 e2fsck: allow verity files to have initialized blocks past i_size
Since ext4 verity is going to be an RO_COMPAT feature rather than an
INCOMPAT one, the on-disk i_size of verity inodes needs to be the data
size rather than the full size.  Consequently, verity inodes will have
initialized blocks past i_size, containing the Merkle tree and other
verity metadata.  So e2fsck must not fix the i_size of such inodes as it
normally would.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-21 15:18:25 -04:00
Theodore Ts'o
5c36535a6f Rediff patches for 1.44.4-2 release
Add 0001-tune2fs-fix-dereference-of-freed-memory-after-journa.patch
Add 0002-libe2p-fix-verity-flag-bit.patch
Add 0003-libext2fs-add-verity-flag-to-EXT2_LIB_FEATURE_RO_COM.patch

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-21 11:33:46 -04:00
Eric Biggers
76e28a1339 libext2fs: add verity flag to EXT2_LIB_FEATURE_RO_COMPAT_SUPP
The new ro_compat filesystem feature flag for fs-verity was added to
EXT2_FEATURE_RO_COMPAT_SUPP, but that's not actually used by e2fsprogs
itself.  So contrary to the v1.44.4 release notes, 'mke2fs -O verity'
doesn't actually work, nor does e2fsck allow the filesystem to have the
verity feature.  Fix it by adding the flag to the correct place
(EXT2_LIB_FEATURE_RO_COMPAT_SUPP) too.

Fixes: faae7aa00d ("Reserve codepoints for the fsverity feature.")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-21 01:22:24 -04:00
Eric Biggers
7e5a95e3d5 libe2p: fix verity flag bit
The verity flag was mapped to EXT4_PROJINHERIT_FL, presumably due to a
copy+paste error.  Fix it.

Fixes: faae7aa00d ("Reserve codepoints for the fsverity feature.")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-21 01:22:24 -04:00
Theodore Ts'o
ed50488ec0 tune2fs: fix dereference of freed memory after journal replay
This can be found by running the test t_replay_and_set under valgrind.

Reported-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-21 01:22:18 -04:00
Theodore Ts'o
eee05549b6 v1.44.4
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAlt41XwACgkQ8vlZVpUN
 gaMJmwf/QY2uY1DA3SmbTW24knha1DdQRR+gPhzb1eIA+O19V4svSDL+v2qC0wgr
 ctsBRQRSX1eufLTp/BoRW5aHG4bpuOhdVYl1becq71I4o7izMKsgZU5Sz7XmCv9t
 b+mo9Xw13qOLVAeTiPGVA1ffmDNMN8sqFgd94eSQ5yKpCMCU9RVdJklyZ7ZESpYG
 /uGlxgMdalMvUQe64YN8lAZ2E5Y5R8KKN9W88EkUeDN2muLvz9i6adl7lIO0AGhD
 sVYbdGlHWITPe7elCce8Es4PePujWXExVDh5Bw7VQJlLDHbN+QaU+UgmIbAnmmiR
 SF5Vv8LeET1tgm8rs+YX+q5QPHZQNQ==
 =rhE5
 -----END PGP SIGNATURE-----

Merge tag 'v1.44.4' into debian/master

v1.44.4
2018-08-18 22:50:55 -04:00
Theodore Ts'o
40e66e2e8b Update release notes, etc., for the 1.44.4 release
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 22:26:58 -04:00
Theodore Ts'o
8e529e4223 debian: add configuration file for git-buildpackage
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 22:26:58 -04:00
Theodore Ts'o
3936178264 debian: declare that the debian packaging will be found in debian/master
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 22:26:58 -04:00
Theodore Ts'o
f0b597444d debian: fix where docs are installed in the comerr-dev and ss-dev packages
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 22:26:58 -04:00
Sen Jiang
e80915ea6e AOSP: e2fsdroid: Set android_configure when product out is passed.
The only place that's using |product_out| is android_configure_fs().

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: 111439984
Test: generated image has correct permission
Change-Id: I2602686b6b92c3e61a541b8794d266b1ee6a00d1
From AOSP commit: 57c92af0ac608dbb27de9f882336e28de7bb1fa2
2018-08-18 16:00:18 -04:00
Jeff Sharkey
c258774300 AOSP: Ignore quotes in safe_print().
If the value being printed has embedded quotes ("), then printing
those quotes could confuse other tools when parsing the value.

This is the simplest CL to fix the security issue, and we can circle
back to think about more robust escaping in a future CL.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: 80436257
Test: manual
Change-Id: Ica17f2c5701573bceafe34f20110d230a3925483
From AOSP commit: efe90c297a8df591c051fdbfacb92b5283390bba
2018-08-18 15:59:58 -04:00
Upendra
0c625fed12 AOSP: blkid: Correct the label name for exfat
Volume label name is 16 bit unicode string according to spec.
Currently blkid labels the device without converting it to
utf-8 chars due to which incorrect label is displayed.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: 74184636
Test: manual
Change-Id: Ib16204c75c2cdf675d480e9c66f484bb3c51108e
From AOSP commit: 25715073b170970469126426196c9e5084613c37
2018-08-18 15:59:40 -04:00
Göran Uddeborg
4490f853e1 po: update sv.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 14:28:35 -04:00
Antonio Ceballos
615b38cd29 po: update es.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 14:28:35 -04:00
Joe Hansen
1d32c06e2f po: update da.po (from translationproject.org)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 14:28:35 -04:00
Theodore Ts'o
dd3b4cc367 libext2fs: fix uninitialized length in rep_strdup()
For platforms whose libc don't supply strdup(), the replacement strdup
function in lib/ext2fs/tdb.c needs to always initialize the length
variable.

Reported-by: Vladyslav Tsilytskyi <ykp@protonmail.ch>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 13:32:25 -04:00
Theodore Ts'o
0afb9be6aa Drop subset tarball and replace it with "configure --enable-subset"
There's no point creating two separate tarfiles.  It's not clear
anyone was actually using the subset tarball --- and if they are, they
can replace it by the full source distribution and using the
--enable-subset option.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 11:21:30 -04:00
Theodore Ts'o
e5f0f3eebe Stop generating e2fsprogs.spec automatically
It adds extra complexity for not much gain, and stands in the way of
generating the release tarfile via git archive.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 11:06:23 -04:00
Theodore Ts'o
ef9186ea43 Remove obsolete files from the repository
They are removed when we generate the tarball, and they serve no
useful purpose, so let's remove them.  This will be help us to create
the tarball using git archive more easily.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 09:55:26 -04:00
Theodore Ts'o
748d60575c gen-tarball: handle symlinks correctly in the created the tar file
Now that we use a symlink for the top-level RELEASE-NOTES file, the
previous strategy of using a symlink to force the prefix in the tar
file and then using tar -h won't work.  So change how we generate the
tar file to take advantage of GNU tar's --transform option.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-18 00:06:40 -04:00
Theodore Ts'o
0e4727e896 v1.44.3
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAltERwcACgkQ8vlZVpUN
 gaNGqAf/QnBqHNi3UeyMMjHjqI8+wzl4J1g62ElMdkCuJUhVg5XqLS2pcMX0Qyii
 11FBYPsSTex1KwcroFUIrj/Hj61piTaq1kYgRQdYh1UjKSqqHgwQpUfI7oUUGTfA
 SCFLwA+1Dv485kyZzP+/YDs6v4rkVCZcaN9inUZ3dMngV3lBbLOsv3a5kcr72FFx
 qvYRRS4REnrh5D+dNc5gS1IB8bgEPqWU0VzMLBj9bOV4mBqu3v9qKGTfTvCncooQ
 zEQPw5L6l/DDgmjydx3MTG15Uj9ebq39klLwqWMOs6T77tKStfzbavLWiOg1hr3v
 VdO1XncgcCSnFBTA8AQ0FLQicuN9rg==
 =BQdh
 -----END PGP SIGNATURE-----

Merge tag 'v1.44.3' into debian-packaging

v1.44.3
2018-08-17 23:03:42 -04:00
Lukas Czerner
80a55276b3 tests: mke2fs must not create fs with resize_inode and meta_bg
Test that mke2fs does not allow to create file system with both
resize_inode and meta_bg features enabled.

This was fixes with commit 42e77d5d ("libext2fs: don't create
filesystems with meta_bg and resize_inode").

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-14 13:06:19 -04:00
Lukas Czerner
99a0dffcd3 tests: e2fsck must be able fix fs with resize_inode and meta_bg
Test if the e2fsck can fix file system with resize_inode and meta_bg
features enabled simultaneously.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-14 10:04:42 -04:00
Theodore Ts'o
faae7aa00d Reserve codepoints for the fsverity feature.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-13 22:39:27 -04:00
Theodore Ts'o
ac5936d78d e2fsck: fix fd leak in reserve_stdio_fds
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
2018-08-13 21:32:55 -04:00
Lukas Czerner
06a276e2c3 remove unused datarootdir
Remove unused datarootdir variable from compile_et and mk_cmds.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11 20:13:18 -04:00
Lukas Czerner
74848259f0 e2fsck: remove resize inode if both resize_inode and meta_bg are enabled
Previous e2fsprogs versions allowed to create a file system with both
resize_inode and meta_bg enabled. This was fixed by upstream commit
42e77d5d ("libext2fs: don't create filesystems with meta_bg and resize_inode")

However e2fsck still does not recognize the conflict and will attempt to
clear and recreate resize_inode if it's corrupted due to this incompatible
feature combination, though it will create it in the same wrong layout.

Fix it by teaching e2fsck to recognize resize_inode and meta_bg
conflict and fixing it by disabling and clearing resize inode.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11 19:04:38 -04:00
Ross Burton
5abc041492 build: use MKDIR_P instead of MKINSTALLDIRS
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11 15:29:48 -04:00
Fedor Uporov
cdca044059 libext2fs: support devices w/ non-512 byte block size on Apple Darwin
Signed-off-by: Fedor Uporov <thisisadrgreenthumb@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11 14:01:56 -04:00
Isaac Chen
f4f701db32 AOSP: ODR violation in e2fsck during host build
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: 112062612
Test: $ m SANITIZE_HOST=address $OUT_DIR/host/linux-x86/bin/e2fsck $OUT_DIR/host/linux-x86/bin/llvm-symbolizer
      $ $OUT_DIR/host/linux-x86/bin/e2fsck

Change-Id: I3f1a18d6d72116d864a79f0acef37625124f4c1a
From AOSP commit: 3271c69c97f486914fea833a36eaf5d86938c76d
2018-08-05 14:17:16 -04:00
David Anderson
aa975a572d AOSP: Fix macOS build.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: 111839488
Test: e2fsprogs builds on macOS.
Change-Id: I4ddf332cc244fa44f928cba68470b7f9aa48a556
From AOSP commit: 4dc2456f0e6d10c73372e829e1875ec4095e8fa6
2018-08-05 13:58:26 -04:00
David Anderson
0958bc6327 AOSP: Update Android.bp files.
debugfs now links to a new libext2_support library, which only includes
cstring.c (Android separates other pieces of libsupport into separate
libraries).

e2fsck now builds with -Wno-unused-variable to work around an unused
variable introduced by cabde4999d.

libext_e2p builds the new ljs.c file, and links to ws2_32 on Windows for
ntohl().

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Change-Id: I42edce0478f1529f44acdbef1495ec5270e3a61e
From AOSP commit: af14814afe0cb3389ecc4b9e9422bd7e8962e0ed
2018-08-05 13:54:26 -04:00
David Anderson
8f1b0898ac AOSP: e2fsck: Remove unused variable.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Bug: N/A
Test: e2fsck builds
Change-Id: I48e33920d8aa369808fb47143f2a46ecaa03f6c3
From AOSP commit: 4d2e95e15a4df94e556c2bfbf77b7b1d8e43b446
2018-08-05 13:42:18 -04:00
David Anderson
c4062e7acf AOSP: Always define HAVE_SYS_SYSMACROS_H on Android.
This is needed after 3fb715b554 which
conditionally included sysmacros.h.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Change-Id: I52e3da4d9ea0f5efbf685a9c4a266f33357f8d8c
From AOSP commit: a5deff7b7ee15a5ba5d65516326ce4c42daa1027
2018-08-05 12:22:42 -04:00
David Anderson
dfae277e8b AOSP: Conditionally define __bitwise__ on Android.
bionic does not define _LINUX_TYPES_H but does define __bitwise, so we
conditionally define it here.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Change-Id: I500ccd469ea7de2e53ab8bd75720a412c86cf18b
From AOSP commit: 77f2eea2717e18e80a31d80c7721b9e0ed8e0cba
2018-08-05 12:20:39 -04:00
Jaco Kroon
4a30e2ae7c debugfs: fix ncheck so it handles hard links correctly
Due to hard links inodes can have multiple names (except for folders),
ncheck should find all of the names (equal to the number of links to the
inodes, directories excepted), not names to the count of the provided
inodes.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-05 12:07:20 -04:00