aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/makefs
Commit message (Collapse)AuthorAgeFilesLines
* Fix getopt(3) argument after r290180; I forgot to change -r to -REnji Cooper2015-12-291-1/+1
| | | | | | | | | | | | by accident MFC after: 3 days Pointyhat to: ngie Reported by: vangyzen Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292884
* makefs: use ENTRY macro for diff reduction with NetBSDEd Maste2015-12-211-3/+6
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=292549
* Remove clauses 3 and 4 from makefs newfs_extern.hEd Maste2015-11-191-6/+1
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=291052
* Bump .DdEnji Cooper2015-11-091-1/+1
| | | | Notes: svn path=/head/; revision=290602
* Follow up to r290259 dealing with makefs(8)Enji Cooper2015-11-091-3/+2
| | | | | | | | | | | | | | - Don't use contractions (don't -> do not) - Change "throw away" to "discard" when describing the -o keep-bad-images option - Revert author e-mail split I brought over from NetBSD, effectively reverting the change bapt made in r267668 MFC after: 3 days Submitted by: bjk Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290601
* Add testcases for -t ffs -o version=[12]Enji Cooper2015-11-021-1/+66
| | | | | | | | | | | Verify the filesystem type using dumpfs. Add preliminary support for NetBSD (needs to be validated) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290270
* Sync minor whitespace / type changes in ffs_csum_swap and ffs_sb_swap withEnji Cooper2015-11-021-4/+4
| | | | | | | | | | | src/sys/ufs/ffs/ffs_bswap.c@1.39 Obtained from: NetBSD MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290268
* Clean up mtree keyword support a slight bit and add a few more default keywordsEnji Cooper2015-11-023-3/+10
| | | | | | | | | | | | - Parameterize the mtree keywords as $DEFAULT_MTREE_KEYWORDS - Test with the extra mtree keywords, `mode,gid,uid`. - Add a note about mtrees with time support not working with makefs right now MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290267
* Add testcases for -t cd9660 -o isolevel=[1-3]Enji Cooper2015-11-021-0/+58
| | | | | | | | | | | | | | | -- -o isolevel=1 currently fails because of path comparison issues, so mark it as an expected failure. -- -o isolevel=3 is not implemented, so expect it to fail as an out of bounds value [*]. PR: 203645 MFC after: 1 week X-MFC with: r290264 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290265
* Limit isoLevel to 1 and 2 to avoid segfaulting when isoLevel is set to 3 byEnji Cooper2015-11-021-2/+4
| | | | | | | | | | | | | | dereferencing a NULL function pointer Add some asserts to ensure that isolevel is always either 1 or 2. PR: 203645 Reported by: Thomas Schmitt <scdbackup@gmx.net> MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290264
* Fix spelling of `isolevel` cd9660 optionEnji Cooper2015-11-021-1/+1
| | | | | | | | | MFC after: 1 week X-MFC with: r290260 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290262
* Bump .Dd for r290259 and r290260Enji Cooper2015-11-021-1/+1
| | | | Notes: svn path=/head/; revision=290261
* Document undocumented long options for -t cd9660Enji Cooper2015-11-021-6/+20
| | | | | | | | | | | | | Note which options have been implemented and which options haven't been implemented Submitted as the following NetBSD PRs: bin/50390 and bin/50392 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290260
* Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53Enji Cooper2015-11-021-18/+21
| | | | | | | | | | | | Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and options have been omitted. MFC after: 1 week Obtained from: NetBSD Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290259
* Follow up to roundup feature addition in r289203Enji Cooper2015-10-302-8/+13
| | | | | | | | | | | | | | | | | | | - Rename -r to -R to avoid the clash with makefs -r in NetBSD - Note that -R is an FFS-specific option because it's not implemented in cd9660 today - Rename the roundup variable to "roundup-size" in the manpage and help text for consistency with other variables. - Bump .Dd (missed in r289203) PR: 203707 MFC after: 1 week X-MFC with: r289203 Differential Revision: https://reviews.freebsd.org/D3959 Reviewed by: adrian (earlier patch), emaste Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290180
* Add a regression test for r289899 to validate rockridge encodingEnji Cooper2015-10-241-0/+27
| | | | | | | | | | | of device types X-MFC with: r289899 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289902
* Remove an ls -l I was using for debuggingEnji Cooper2015-10-241-1/+0
| | | | | | | | | MFC after: 2 weeks X-MFC with: r289897 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289901
* Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding ofEnji Cooper2015-10-241-4/+5
| | | | | | | | | | | | | | | | device nodes In particular, use st_rdev (the device type), not st_dev (the device inode), and fix the comparison to be correct with the st_rdev field Bug 203648 MFC after: 2 weeks Submitted by: Thomas Schmitt <scdbackup@gmx.net> Coverity CID: 1008927 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289899
* Add more cd9660/FFS makefs testcasesEnji Cooper2015-10-243-37/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | General changes: - Parameterize out the mount command. - Use mtree to verify the contents of an image (check_image_contents) instead of using diff (diff verifies content, but not file metadata). - Move common logic out to functions (common_cleanup, mount_image, check_image_contents) - Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 192839) - Add a note about the ISO-9660 and rockridge specs - Add testcases that exercise: -- Creating disk images from an mtree and multiple directories. -- -F flag use (not really an extensive testcase right now) cd9660-specific test changes: - Remove an XXX comment about symlinks; I forgot that non-rockridge images turn symlinks into hardlinks. - Add testcases that exercise: -- -o allow-deep-trees -- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs) -- -o preparer (existence in image; not conformance to spec) -- -o publisher (existence in image; not conformance to spec) -- -o rockridge (basic) MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289897
* Revise "create_test_inputs" to simplify the file structure asEnji Cooper2015-10-223-23/+30
| | | | | | | | | | | | | | | | | | | | | | | these testcases don't need to be nested as much as bin/ls/ls_tests.sh do when verifying ls -a, ls -A, etc. This allows the tests to make all paths relative to the top of the temporary directory instead of always tacking on $ATF_TMPDIR, thus complicating things unnecessarily Create non-empty files in create_test_inputs as well now, similar to create_test_inputs2 in bin/ls/ls_tests.sh Compare the input files to the output file contents using diff where possible: - Skip over the fifo comparison for now because it always fails - Skip over the symlink comparison on cd9660 because it always fails today Sponsored by: EMC / Isilon Storage Division MFC after: 2 weeks X-MFC with: r289739 Notes: svn path=/head/; revision=289743
* Correctly reintroduce the rudimentary smoke tests I botched upEnji Cooper2015-10-225-0/+228
| | | | | | | | | | in r289684 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289739
* Revert r289694Enji Cooper2015-10-218-248/+11
| | | | | | | I committed some other undesirable local changes by accident Notes: svn path=/head/; revision=289695
* Add some rudimentary [smoke] testcases for makefsEnji Cooper2015-10-218-11/+248
| | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289694
* Unbreak makefs -t cd9660 after r289687Enji Cooper2015-10-211-1/+1
| | | | | | | | | | | | | | | | buffer_head needs to be freed -- not buffer Detected by jemalloc, i.e. running makefs failed the arena assert because my copy of malloc on CURRENT is compiled with the default !MALLOC_PRODUCTION asserts on Pointyhat to: ngie PR: 203647 X-MFC with: r289687 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289693
* Free buffer before returning from cd9660_write_path_table to avoidEnji Cooper2015-10-211-2/+4
| | | | | | | | | | | | | leaking it after returning from the function MFC after: 1 week PR: 203647 Submitted by: Thomas Schmitt <scdbackup@gmx.net> Coverity CID: 978431 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289687
* Fix a ton of speelling errorsEitan Adler2015-10-211-1/+1
| | | | | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337 Notes: svn path=/head/; revision=289677
* Don't check if `val` is NULL before calling free; free(3) alreadyEnji Cooper2015-10-191-2/+1
| | | | | | | | | | | | | handles this MFC after: 1 week PR: 203649 Submitted by: Thomas Schmitt <scdbackup@gmx.net> Coverity CID: 1305659 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289601
* makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easilySean Bruno2015-10-131-1/+2
| | | | | | | | | | | | | checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel module sanity checks do not like zero fs_old_size value and skips such UFS1 file system while tasting (fs_old_size derives from sblock.fs_providersize). PR: 203704 Submitted by: eugen@grosbein.net Reviewed by: marcel Notes: svn path=/head/; revision=289225
* makefs: introduce a new option to specify what to round the resultingAdrian Chadd2015-10-134-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | image up to. From ticket: While trying to run FreeBSD/mips on some device having very small flash media, one is forced to compress file system with mkulzma(8) utility. It is desirable to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8) and big compression block size like 65535 bytes to mkulzma at the same time. Then one obtains very good comression ratios (like 75% and more) but faces the following problem. geom_uncompress kernel module reports GEOM provider size rounded up to its compression block size. Generally, this changes original media size and now it fails to match the size of embedded UFS file system that leads to other problems, f.e. geom_label kernel module does not like this and skips the file system while tasting the GEOM and looking for UFS label. This makes it impossible to refer to the file system using known UFS label instead of something like /dev/map/rootfs.uncompress. The following patch introduces new command line option "-r roundup" for makefs that makes it round up the image to specified block size. Hence, geom_uncompress does not change GEOM media size for images rounded that way and geom_label accepts such GEOMs just fine. With the patch applied, one can use following commands: $ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs $ mkulzma -s 65536 -o fs.img.ulzma fs.img PR: bin/203707 Submitted by: <eugen@grosbein.net> Notes: svn path=/head/; revision=289203
* Don't leak 'var'.Xin LI2015-09-031-1/+3
| | | | | | | Reported by: clang static analyzer Notes: svn path=/head/; revision=287417
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-8/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-192-3/+2
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-193-14/+11
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge headSimon J. Gerraty2014-04-284-4/+21
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | | Updated dependenciesSimon J. Gerraty2013-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256419
| * | | | Merge from headSimon J. Gerraty2013-09-0514-1412/+42
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ \ sync from headSimon J. Gerraty2013-04-125-23/+54
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | | Sync from headSimon J. Gerraty2012-11-048-17/+81
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | Fix a typo in the FFS maxbpg option, it was erroneously spelled maxbpf.Christian Brueffer2015-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error exists in the NetBSD upstream version as well and will be reported back. PR: 196598 Submitted by: Dan McGregor MFC after: 1 week Notes: svn path=/head/; revision=277085
* | | | | | | | Convert makefs to LIBADDBaptiste Daroussin2014-11-241-7/+1
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add definition of libnetbsd in src.libnames.mk Notes: svn path=/head/; revision=274990
* | | | | | | r258695 introduces a sanity check for makefs in order to verify thatDavide Italiano2014-09-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the minimum image size specified is always less than the maximum image size. If makefs(1) is invoked specifying minimum image size, but not maximum one, the program exits with an error. Example: # sudo -E makefs -M 538968064 -B be /home/davide/disk.img $DESTDIR makefs: `/home/davide/tftproot/mips' minsize of 538968064 rounded up to ffs bsize of 8192 exceeds maxsize 0. Lower bsize, or round the minimum and maximum sizes to bsize. Assert then that minsize < maxsize iff maxsize is specified. This change allows me to build MIPS images using makefs(1) and following what specified in the wiki again. Reviewed by: jmallett, ngie Notes: svn path=/head/; revision=271736
* | | | | | | Revert r267233 for now. PIE support needs to be reworked.Bryan Drewery2014-08-191-2/+0
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed. We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled. Reported by: kib Notes: svn path=/head/; revision=270168
* | | | | | use .Mt to mark up email addresses consistently (part2)Baptiste Daroussin2014-06-201-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267668