summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/e2fsprogs/e2fsprogs
Commit message (Collapse)AuthorAgeFilesLines
* e2fsprogs: Skip slow ptest testsRichard Purdie2019-04-121-1/+1
| | | | | | | | | | | The slow tests run unreliably with our current setup/infrsstructure/timeouts. There are only five slow ones and having the other ~250 run reliably without timeouts is the priority right now. We can revisit the slow tests at some later date if wanted. (From OE-Core rev: 7469c2a5595337fc4407fa7a2ad06b5bf2347545) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: fix file system generation with large filesRoss Burton2019-02-021-0/+50
| | | | | | | | | | | When copying files into the file system the file offset was being truncated to a signed 32-bit value, so any files that are larger than 2^31 bytes were the right size, but no content after that point. (From OE-Core rev: b2ffd2228f0d68d096f8003975f0f7ec28bd4313) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: fix stray quote in test configurationAnuj Mittal2018-10-041-4/+15
| | | | | | | | | | | | Introduced during the last recipe upgrade and was causing tests to fail. Fixes [YOCTO #12946] (From OE-Core rev: 1771cf07c88c27e8cf473b7f1da03db22d94837e) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: 1.44.2 -> 1.44.3Robert Yang2018-08-021-21/+28
| | | | | | | | | Rebased ptest.patch. (From OE-Core rev: 59dfd8246358f32bc5e43fc845c0c685aa4cd428) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: 1.43.8 -> 1.44.2Robert Yang2018-07-052-46/+6
| | | | | | | | | | | - Rebased Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch - Removed backport patch 0001-libext2fs-fix-build-failure-in-swapfs.c-on-big-endia.patch - The LIC_FILES_CHKSUM changed because it updated the address, others are the same (From OE-Core rev: 2577fbed729ddc8deb7a657dbaa695d5bd7ef20d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: refresh patchesRoss Burton2018-03-112-21/+21
| | | | | | | | | | | | | | | | | | | | | The patch tool will apply patches by default with "fuzz", which is where if the hunk context isn't present but what is there is close enough, it will force the patch in. Whilst this is useful when there's just whitespace changes, when applied to source it is possible for a patch applied with fuzz to produce broken code which still compiles (see #10450). This is obviously bad. We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For that to be realistic the existing patches with fuzz need to be rebased and reviewed. (From OE-Core rev: 6a83aca280fece30fd7c17f32f07f592f6300c6c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: 1.43.7 -> 1.43.8Huang Qiyu2018-01-302-3/+47
| | | | | | | | | | | Upgrade e2fsprogs from 1.43.7 to 1.43.8. Backport patch to fix build on BE systems (From OE-Core rev: 6c7f32bd8b27c4dd91c1ac20f091358982e9c275) Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: remove aclocal/acinclude danceRoss Burton2017-11-302-153/+0
| | | | | | | | | | Upstream has fixed their use of aclocal.m4 vs acinclude.m4, so now we can remove some hacks that were previously required. (From OE-Core rev: 502cdfe3dd5ea3cd70937c92ff1bd8d6faa829eb) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: 1.43.5 -> 1.43.7Robert Yang2017-11-211-21/+0
| | | | | | | | | | Remove reproducible-doc.patch which is already in the source. (From OE-Core rev: c76d6f22e72399cab4d2652a7431a390907e1ba2) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: modify ptest scriptJuro Bystricky2017-10-091-8/+7
| | | | | | | | | | | | | | | | | | | | | | e2fsprog testsuite used to log results into its own log file into /usr/lib/e2fsprogs/ptest/test.log. Therefore console output was not available and redirecting ptest-runner output into a log file would not capture output of any individual tests. So overall the whole e2fsprogs testsuite consisting of about 300 tests was evaluated as a single test. This patch ensures the e2fsprogs test_script output is not automatically redirected while executing during run-ptest. Any redirection is up to the user. Additionally, the results of tests are prefixed by more canonical "PASS:" FAIL:" based on the actual test results. Aditionally, remove various files created by the testsuite. [YOCTO #12146] (From OE-Core rev: a218b85dba1a481901548f7414676c0ae6f43316) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: set dir's mode correctlyRobert Yang2017-09-181-0/+41
| | | | | | | | | | | | | | | | | | | | Fixed: 1) in pkg_postinst task set wanted file permissions: ---> chmod -R 521 "$D/opt/my_folder" 2) generate the rootfs image Results: my_folder hasn't correct permissions on rootfs ext4 image -> permissions are changed to 721 But it should be 521. [YOCTO #11652] (From OE-Core rev: 8627329341e5a9e7cf6f070778381635cebc0da6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: fix ptest scriptYi Zhao2017-08-272-7/+20
| | | | | | | | | | | | | | * Fix hardcoded path for ptest script which would cause failure on mulitilib: ls: cannot access '/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory ./test_script: line 54: /usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory * Add missing '$' for shell variable reference (From OE-Core rev: 82d244a9225bd1fa512e696aae917febe051fcf9) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: 1.43.4 -> 1.43.5Robert Yang2017-08-232-385/+0
| | | | | | | | | | | Removed the following 2 patches which are already in the source: - 0001-e2fsck-exit-with-exit-status-0-if-no-errors-were-fix.patch - e2fsprogs-1.43-sysmacros.patch (From OE-Core rev: ce0efa2e38611428aff6d39d52ce29f8a6571813) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs-doc: binary reproducibleJuro Bystricky2017-08-161-0/+21
| | | | | | | | | | | When compressing by gzip, do not save the original file name and time stamp. [YOCTO #11916] (From OE-Core rev: c32d526a056adb8ed1eb8beb9d495bfd01af2342) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add/fix missing Upstream-Status to patchesRichard Purdie2017-06-271-0/+2
| | | | | | | | | This adds or fixes the Upstream-Status for all remaining patches missing it in OE-Core. (From OE-Core rev: 563cab8e823c3fde8ae4785ceaf4d68a5d3e25df) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: Fix wrong error code after optimizationDaniel Schultz2017-03-221-0/+255
| | | | | | | | | | | | | | | | | | | | | fsck.ext will return an error code of 1 if a file systems was checked and successfully repaired. Even when an optimization was performed it will return this error code. This patch will change the error code to 0 if only optimizations had changed the file systems. The reason for this patch is a question I asked at the ext4 ML: http://www.spinics.net/lists/linux-ext4/msg55700.html Backport from git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git Based on commit bf9f3b6d5b10d19218b4ed904c12b22e36ec57dd (From OE-Core rev: 8341ee45d721cf07b19d50c249bb3a77ef1bf100) Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: expand @mkdir_p@ during configurationJoe Slater2017-03-101-0/+20
| | | | | | | | | | | If we do not do this, locale data will not be put into /usr/share/locale. (From OE-Core rev: 19b770d56d8a6db48723e0754e224aaf6de683a3) Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: Fix build with glibc-2.25Martin Jansa2017-03-011-0/+130
| | | | | | | | (From OE-Core rev: 1e8fc70596e27edca428dd78b8095e6b76aa8e58) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: 1.43.3 -> 1.43.4Robert Yang2017-02-151-6/+3
| | | | | | | | | | | * Rebased Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch. * The mkfs.ext4dev is gone. (From OE-Core rev: 54a012bff9430a8e973ddef61d14ac10d9ec9ed3) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: Fix missing check for permission denied.Jackie Huang2016-08-171-0/+32
| | | | | | | | | | | | | | | | | | If the path to "ROOT_SYSCONFDIR /mke2fs.conf" has a permission denied problem, then the get_dirlist() call will return EACCES. But the code in profile_init will treat that as a fatal error and all executions will fail with: Couldn't init profile successfully (error: 13). But the problem should not really be visible for the target package as the path then will be "/etc/mke2fs.conf", and it is not likely that a user have no permission to read /etc. (From OE-Core rev: 9d7c32a88e0670a09e5e1097ff8bca58e9a7943f) Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: tweak mke2fs ext4 featuresHongxu Jia2016-07-011-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | While e2fsprogs upgraded to 1.43, it dropped the patch Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch, we get it back and rebase for 1.43 to fix invoking grub-probe failed. Without the fix: ... root@localhost:~# mkfs.ext4 /dev/sda3 [skip] root@localhost:~# grub-probe --target=fs -d /dev/sda3 grub-probe: error: unknown filesystem. ... After apply the fix: ... root@localhost:~# mkfs.ext4 /dev/sda3 [skip] root@localhost:~# grub-probe --target=fs -d /dev/sda3 ext2 ... (From OE-Core rev: a96ad733cf80716e26882889a130c87a78e5f576) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: 1.42.99+1.43+git -> 1.43Robert Yang2016-06-152-253/+0
| | | | | | | | | | | | | | | * Removed patches already in the source: - Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch - xattr_ordering.patch * COPYING -> NOTICE, the md5sum is the same. * e2fsprogs_git.bb -> e2fsprogs_1.43..bb (From OE-Core rev: e0531174119bff21e9014b95ed1bbd0e1c01af26) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: do not enable non-stable features by defaultJonathan Liu2016-03-031-0/+34
| | | | | | | (From OE-Core rev: 092984669d8590627cfb188a0aa00244e22c4671) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: Update to upstream version of a patchRichard Purdie2016-02-151-47/+200
| | | | | | | | Switch to the upstream version of the xattr patch. (From OE-Core rev: 631217cc3cb15a7ec4f3cdf6e8d1ff67de2a72b3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: Fix multiple xattr handlingRichard Purdie2016-02-111-0/+66
| | | | | | | | | | | There is an ordering issue when adding multiple xattr values to an ext filesystem build using the -d option to mkfs. This patch fixes that issue. Its been posted for discussion with the upstream community. (From OE-Core rev: 4b579c1f13ba20198a390629cd099d8ad470ba32) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: 1.42.9 -> 1.43 (master)Robert Yang2016-01-1821-2183/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade to 1.43 (master) to make "mke2fs -d" support xattr, so that the layer which requires xattr such as meta-selinux can populate images easily. * Remove the following patches since they are alredy in the source. 0001-e2fsprogs-fix-cross-compilation-problem.patch 0001-libext2fs-fix-potential-buffer-overflow-in-closefs.patch 0001-mke2fs-add-the-ability-to-copy-files-from-a-given-di.patch 0002-misc-create_inode.c-copy-files-recursively.patch 0003-misc-create_inode.c-create-special-file.patch 0004-misc-create_inode.c-create-symlink.patch 0005-misc-create_inode.c-copy-regular-file.patch 0006-misc-create_inode.c-create-directory.patch 0007-misc-create_inode.c-set-owner-mode-time-for-the-inod.patch 0008-mke2fs.c-add-an-option-d-root-directory.patch 0009-misc-create_inode.c-handle-hardlinks.patch 0010-debugfs-use-the-functions-in-misc-create_inode.c.patch 0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch 0012-Fix-musl-build-failures.patch CVE-2015-0247.patch copy-in-create-hardlinks-with-the-correct-directory-.patch fix-icache.patch misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch * Remove cache_inode.patch since it is not needed any more * Updated mkdir.patch and ptest.patch * Add --enable-libblkid to EXTRA_OECONF since libblkid is not created by default. * Time of core-image-sato-sdk do_rootfs: - Before upgrade real 3m18.508s user 7m42.088s sys 1m1.984s - After upgrade real 3m21.552s user 7m38.496s sys 1m0.644s The are nearly the same * The "fsck -f" shows the image is OK, and also can boot. [YOCTO #8622] (From OE-Core rev: a1f235ad736d322bb50eb4a4293b6b2f4e5200aa) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add "CVE:" tag to current patches in OE-coreMariano Lopez2016-01-112-1/+2
| | | | | | | | | | | | | | The currnet patches in OE-core doesn't have the "CVE:" tag, now part of the policy of the patches. This is patch add this tag to several patches. There might be patches that I miss; the tag can be added in the future. (From OE-Core rev: 065ebeb3e15311d0d45385e15bf557b1c95b1669) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: backport a patch to fix filetype for hardlinkRobert Yang2015-10-271-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport a patch to fix hardlinks filetype: IMAGE_INSTALL_append = " e2fsprogs" $ ./tmp/sysroots/x86_64-linux/sbin/fsck.ext4 tmp/deploy/images/qemux86/core-image-minimal-qemux86.ext4 -f Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Setting filetype for entry 'fsck.ext2' in /sbin (80) to 1. Setting filetype for entry 'mkfs.ext4' in /sbin (80) to 1. Setting filetype for entry 'fsck.ext4' in /sbin (80) to 1. Setting filetype for entry 'mkfs.ext4dev' in /sbin (80) to 1. Setting filetype for entry 'fsck.ext3' in /sbin (80) to 1. Setting filetype for entry 'mkfs.ext2' in /sbin (80) to 1. Setting filetype for entry 'mkfs.ext3' in /sbin (80) to 1. Setting filetype for entry 'e2fsck' in /sbin (80) to 1. Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information test.img: ***** FILE SYSTEM WAS MODIFIED ***** test.img: 799/65536 files (0.1% non-contiguous), 14652/262144 blocks Now when run it again, we may get: [snip] Pass 3A: Optimizing directories [snip] test.img: ***** FILE SYSTEM WAS MODIFIED ***** test.img: 799/65536 files (0.1% non-contiguous), 14652/262144 blocks This is fine since it is optimizing, from "man e2fsck": e2fsck may sometimes optimize a few directories --- for example, if directory indexing is enabled and a directory is not indexed and would benefit from being indexed, or if the index structures are corrupted and need to be rebuilt. [YOCTO #8544] (From OE-Core rev: 02ad8e3c32656a74fa82284105706ae67e5108f3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Fix Upstream-Status statementsRoss Burton2015-09-123-3/+3
| | | | | | | | | | Fix a variety of problems such as typos, bad punctuations, or incorrect Upstream-Status values. (From OE-Core rev: bd220fe6ce8c3a0805f13a14706d3130ea872604) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: fix the CVE-2015-1572Roy Li2015-05-071-0/+58
| | | | | | | | | | Backport a patch to fix CVE-2015-1572 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-1572 (From OE-Core rev: 203e1024cc7517cad28423cc04f641376cc8f2f5) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: add ptestDmitry Eremin-Solenikov2015-04-212-0/+77
| | | | | | | | | Enable ptest for e2fsprogs by reusing provided testsuite. (From OE-Core rev: 47edd33cf8df3ebbfd5164136fb79ac831f01286) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: CVE-2015-0247Sona Sarmadi2015-03-161-0/+58
| | | | | | | | | | | | | | | Fixes a heap buffer overflow in lib/ext2fs/openfs.c which allows a trivial arbitrary memory write under certain conditions. References http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=f66e6ce4 http://www.ocert.org/advisories/ocert-2015-002.html (From OE-Core rev: 572437720b6698a3a10627fcd9654ef10f827836) Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: Add a patch to speedup mkfsRichard Purdie2015-02-211-0/+52
| | | | | | | | | | | See the patch description, this adds a tweak to an algorithm to improve core-image-sato-sdk mkfs time from over 8 minutes to about 35s. Needs discussion upstream but seems reasonable for our uses of it. (From OE-Core rev: 468fa9a7fac86bb0fcd3cbd18dc1492b57ca25f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: update acinclude.m4Ross Burton2014-09-101-2/+51
| | | | | | | | | | Some macros have been added upstream and were not being executed, so refresh our fork of this file. (From OE-Core rev: 6988baed623c507aa44164801c5359411f462d84) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: Backport fixes for building with muslPaul Barker2014-08-231-0/+54
| | | | | | | | | | | Both of these fixes have been applied upstream and improve general code correctness. They are needed when building with TCLIBC=musl but shouldn't cause any harm with other libc implementations. (From OE-Core rev: 23a533908355b7bb37ce34b073ac91aa20c5776d) Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: return error when failed to populate fsRobert Yang2014-03-211-0/+37
| | | | | | | | | | | | We need return retval when "mke2fs -d" failed, otherwise the "$?" would be 0 which is misleading. [YOCTO #6011] (From OE-Core rev: 46896b601c1c93e276954b674aa30b8b4dc4f611) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: fix cross compilation problemChen Qi2014-03-111-0/+55
| | | | | | | | | | | | | | | | | | When compiling e2fsprogs for qemumips64, we got compilation errors. The root cause is that parse-types.sh script would fail for mips64. However, the type size checking in parse-types.sh doesn't make much sense in case of cross compilation. This is because that the typedef statements in asm_types.h are for the target machine while the generated binary in parse-types.sh script is executed on build machine. This patch fixes such problem. (From OE-Core rev: 45877518e2d277c63d5a561408fbfcd4cb5a2a76) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: populate-extfs.sh: remove itRobert Yang2014-03-071-96/+0
| | | | | | | | | | | | Remove it since we don't need it anymore, and there is one inside the e2fsprogs. [YOCTO #4083] (From OE-Core rev: f3a95ca6886b55e5819b068bdbd2cceb882d91a6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: update the manual for the -d optionRobert Yang2014-03-071-0/+43
| | | | | | | | | | | | Update the manual for the -d option [YOCTO #4083] (From OE-Core rev: 506774e828dff576ac91e8d328d8e84e58455147) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: debugfs: use the functions in misc/create_inode.cRobert Yang2014-03-071-0/+496
| | | | | | | | | | | | | | | | | | | | | | | | * Use the functions in misc/create_inode.c, and remove the duplicated code. * The CREATE_INODE_DEPS in the debugfs/Makefile.in is used for recording create_inode.o's depends which is from misc/Makefile.in, we have to recompile create_inode.o because we need it to print more messages when it is used by debugfs, just like we recompile e2freefrag.o, but it seems that the e2freefrag.o's depends in debugfs/Makefile.in is incorrect, it would not rebuild when its depends (e.g.: lib/config.h) is changed, which would cause unexpected errors. Make duplicated code in debugfs/Makefile.in and misc/Makefile.in is not a good idea, maybe we'd better define CREATE_INODE_DEPS in the top Makefile, I'd like to send another patch and fix the e2freefrag if you are fine with it. [YOCTO #4083] (From OE-Core rev: 460f577379ef2ecf42fb8b7f855c21400c276d4f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: handle hardlinksRobert Yang2014-03-071-0/+210
| | | | | | | | | | | | | | | | | Create the inode and save the native inode number when we meet the hard link (st_nlink > 1) at the first time, use ext2fs_link() to link the name to the target inode number when we meet the same native inode number again. This algorithm is referred from the genext2fs. [YOCTO #4083] (From OE-Core rev: 174ec622bdc00fc26392704fdadeac2c067a33f6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: add an option: -d root-directoryRobert Yang2014-03-071-0/+168
| | | | | | | | | | | | | | This option is used for adding the files from a given directory (the root-directory) to the filesystem, it is similiar to genext2fs, but genext2fs doesn't fully support ext4. [YOCTO #4083] (From OE-Core rev: 83357ef1f6797e48de4870ccd552951b0efb3b53) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: set owner/mode/time for the inodeRobert Yang2014-03-071-0/+81
| | | | | | | | | | | | Set the uid, gid, mode and time for inode. [YOCTO #4083] (From OE-Core rev: 4039dfc38241418d10e5255725ffa9dc5c948815) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: create directoryRobert Yang2014-03-071-0/+62
| | | | | | | | | | | | | | The do_mkdir_internal() is used for making dir on the target fs, most of the code are from debugfs/debugfs.c, the debugfs/debugfs.c will be modified to use this function. [YOCTO #4083] (From OE-Core rev: 30b6ad5067d7a1514c02994c31baf6ec4e5fbcb7) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: copy regular fileRobert Yang2014-03-071-0/+224
| | | | | | | | | | | | | | The do_write_internal() is used for copying file from native fs to target, most of the code are from debugfs/debugfs.c, the debugfs/debugfs.c will be modified to use this function. [YOCTO #4083] (From OE-Core rev: e9a82af1581bcf357dd771765b20c8a16a4ffeb1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: create symlinkRobert Yang2014-03-071-0/+63
| | | | | | | | | | | | | | The do_symlink_internal() is used for creating symlinks, most of the code are from debugfs/debugfs.c, the debugfs/debugfs.c will be modified to use this function. [YOCTO #4083] (From OE-Core rev: 367948c87c682953e98015656814b89b64004c26) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: create special fileRobert Yang2014-03-071-0/+103
| | | | | | | | | | | | | | The do_mknod_internal() is used for creating special file which is block, character and fifo, most of the code are from debugfs/debugfs.c, the debugfs/debugfs.c will be modified to use this function. [YOCTO #4083] (From OE-Core rev: dcb86f12691b346262c0aadbe5b2f3671b4ecd22) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: copy files recursivelyRobert Yang2014-03-071-0/+135
| | | | | | | | | | | | | | | | | Use opendir() and readdir() to read the native directory, then use lstat() to identify the file type and call the corresponding function to add the file to the filesystem, call the populate_fs() recursively if it is a directory. NOTE: the libext2fs can't create the socket file. [YOCTO #4083] (From OE-Core rev: fd0d00dafcf497f23b1c3886d062c8a57e2aa515) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* e2fsprogs: mke2fs: add the ability to copy files from a given directoryRobert Yang2014-03-071-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will add a -d option which will be used for adding the files from a given directory to the filesystem, it is similiar to genext2fs, but genext2fs doesn't fully support ext4. * We already have the basic operations in debugfs: - Copy regular file - Create directory - Create symlink - Create special file We will move these operations into create_inode.h and create_inode.c, then let both mke2fs and debugfs use them. * What we need to do are: - Copy the given directory recursively, this will be done by the populate_fs() - Set the owner, mode and other informations - Handle the hard links TODO: - The libext2fs can't create the socket file (S_IFSOCK), do we have a plan to support it ? [YOCTO #4083] (From OE-Core rev: f050c510b070d919d50e491476e83f2b0ae2b7b2) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "e2fsprogs/populate-extfs.sh: fix a problem on dash"Richard Purdie2014-01-231-1/+1
| | | | | | | | | | | | | This reverts commit 22f90c5aec4f0b0360d1d960226f9965d83d589b. This causes build failures with: | dirname: missing operand | Try 'dirname --help' for more information. under some circumstances. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>