aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/makefs
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.Bryan Drewery2014-06-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is currently an opt-in build flag. Once ASLR support is ready and stable it should changed to opt-out and be enabled by default along with ASLR. Each application Makefile uses opt-out to ensure that ASLR will be enabled by default in new directories when the system is compiled with PIE/ASLR. [2] Mark known build failures as NO_PIE for now. The only known runtime failure was rtld. [1] http://www.bsdcan.org/2014/schedule/events/452.en.html Submitted by: Shawn Webb <lattera@gmail.com> Discussed between: des@ and Shawn Webb [2] Notes: svn path=/head/; revision=267233
* | | | | | convert to using the _daddr_t types like newfs was...John-Mark Gurney2014-05-311-8/+4
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put the superblock in the correct possition for UFS2... There is a bug in FFS that if we don't put it here (for UFS2), it will forcefully relocate the superblock, and I believe cause data loss.. I have a fix for that, but w/ how many releases are broken, we won't be able to switch to the better _FLOPPY (block 0) for this for a while.. Notes: svn path=/head/; revision=266930
* | | | | Timestamps may not have a decimal point.Marcel Moolenaar2014-04-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While here, consistently use sbuf_new_auto(). Notes: svn path=/head/; revision=264186
* | | | | Allow comments at end of line.Simon J. Gerraty2014-03-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: marcel Notes: svn path=/head/; revision=262749
* | | | | Record the IEEE P1282 Rock Ridge version 1.12 POSIX File Serial Number,Marius Strobl2013-12-292-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i. e. the POSIX:5.6.1 st_ino field, which can be used to detect hard links in the file system. This is also the default in mkisofs(8) and according to its man page, no system only being able to cope with Rock Ridge version 1.10 is known to exist. PR: 185138 Submitted by: Kurt Lidl MFC after: 1 week Notes: svn path=/head/; revision=260041
* | | | | Provide a helpful diagnostic when the minimum size rounded to the block sizeJuli Mallett2013-11-271-0/+7
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | would exceed the maximum size. This can be a difficult problem to diagnose if one is, for instance, using -s with a fixed size in a script and the bsize calculated for a filesystem image changes, necessitating a re-rounding of the image size or a hand-setting of the bsize. Previously one would get a cryptic message about how the size exceeded the maximum size, which normally only happens if the contents of the image are larger than specified. Notes: svn path=/head/; revision=258695
* | | | Mark the makefs(8) '-p' flag as deprecated in preference forGlen Barber2013-08-162-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the '-Z' flag for compatibility with NetBSD. Submitted by: Eric van Gyzen (via stable@) MFC after: 3 days Notes: svn path=/head/; revision=254397
* | | | - Set the System Identifier in the Primary Volume Descriptor to FreeBSDMarius Strobl2013-07-272-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than NetBSD. - Correctly set the Expiration Time in the Primary Volume Descriptor; according to ISO 9660 8.4.26.1 unspecified date and time are denoted by the digit 0 in RBP 1 to 16 but the number 0 in RBP 17. [1] - Merge iso9660_rrip.c rev. 1.11 from NetBSD: name_len should be read as unsigned byte. [2] Note: This is according to ISO 9660 9.1.10. - Rock Ridge TF entries should use a length of 5, because after the 4 bytes of generic SUSP header there is one byte of flags. See typedef of ISO_RRIP_TF in iso9660_rrip.h. [1] Submitted by: Thomas Schmitt [1] Obtained from: NetBSD [2] MFC after: 3 days Notes: svn path=/head/; revision=253707
* | | | Ensure that makefs.h is included when using ufs_bswap.h so the FFS_EI macroMarius Strobl2013-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is picked up when defined. Previously, ffs_subr.c was always built without support for opposite endianess as it doesn't include makefs.h on its own. MFC after: 3 days Notes: svn path=/head/; revision=253675
* | | | Set st_nlink in the stat structure within the inode to 1 as well.Marcel Moolenaar2013-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cd9660 file system uses that field for the link count and it was 0. This impacts pwd_mkdb(8) as it checks for st_nlink not being 0 as part of closing a race. Notes: svn path=/head/; revision=250605
* | | | Remove duplicated copies of various NetBSD compatibility shims used byBrooks Davis2013-05-098-1401/+16
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | makefs and use libnetbsd, contrib/mtree, and contrib/mknod instead. Sponsored by: DARPA, AFRLo MFC after: 1 month Notes: svn path=/head/; revision=250407
* | | Remove contractions.Joel Dahl2013-04-111-1/+1
| | | | | | | | | | | | Notes: svn path=/head/; revision=249373
* | | Support hardlinks in manifest files by the same logic as the treewalkBrooks Davis2013-02-203-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code. Reviewed by: marcel Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=247052
* | | Allow '.' components in manifest paths. They are always the firstBrooks Davis2013-02-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | component of mtree -C and install -M output and are easily skipped. Reviewed by: marcel Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=247043
* | | Fix the -N option in manifest mode by using pwcache(3). This alsoBrooks Davis2013-02-201-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | speeds up image creation appreciably. Reviewed by: marcel Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=247042
* | | Add a -D flag that causes duplicate entries in an mtree manifest to beBrooks Davis2013-02-204-4/+18
| |/ |/| | | | | | | | | | | | | | | | | treated as warnings rather than errors. Reviewed by: marcel Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=247041
* | If no contents keyword is specified, the default for files isSimon J. Gerraty2012-11-031-0/+47
| | | | | | | | | | | | | | | | | | the named file. Approved by: marcel (mentor) Notes: svn path=/head/; revision=242501
* | Fix usr.bin/ and usr.sbin/ build with a 64-bit ino_t.Matthew D Fleming2012-09-271-2/+3
| | | | | | | | | | | | | | Original code by: Gleb Kurtsou Notes: svn path=/head/; revision=241015
* | Remove trailing whitespace.Joel Dahl2012-08-311-1/+1
| | | | | | | | Notes: svn path=/head/; revision=239952
* | Sort options.Hiroki Sato2012-08-222-3/+2
| | | | | | | | Notes: svn path=/head/; revision=239574
* | Add -p flag to create the image as a sparse file.Hiroki Sato2012-08-224-11/+31
| | | | | | | | | | | | | | | | Submitted by: Shesha Sreenivasamurthy PR: bin/167779 Notes: svn path=/head/; revision=239562
* | Remove unused member of struct indir (in_exists) from UFS and EXT2 code.Mateusz Guzik2012-08-172-3/+0
|/ | | | | | | | | Reviewed by: mckusick Approved by: trasz (mentor) MFC after: 1 week Notes: svn path=/head/; revision=239359
* - Write the ISO9660 descriptor after the apm partition entries.Andreas Tobler2012-04-021-8/+28
| | | | | | | | | | | | | | | - Fill the needed pmPartStatus flags. At least the OpenBIOS implementation relies on these flags. This commit fixes the panic seen on OS-X when inserting a FreeBSD/ppc disc. Additionally OpenBIOS recognizes the partition where the boot code is located. This lets us load a FreeBSD/ppc PowerMac kernel inside qemu. PR: powerpc/162091 MFC after: 1 week Notes: svn path=/head/; revision=233783
* Allow contents of multiple directories to be merged to the current image.Jung-uk Kim2012-01-318-63/+139
| | | | | | | | | | | Note this patch was submitted to NetBSD and they already adopted it. http://mail-index.netbsd.org/source-changes/2012/01/28/msg031078.html MFC after: 1 week Notes: svn path=/head/; revision=230795
* Fix a SIGSEGV problem in directory entry renaming.Hiroki Sato2012-01-251-0/+2
| | | | Notes: svn path=/head/; revision=230529
* Fix warning when compiling with gcc46:Eitan Adler2012-01-201-5/+0
| | | | | | | | | | error: variable 'parentrecnum' set but not used Approved by: dim, cperciva (mentor, blanket for pre-mentorship already-approved commits) MFC after: 3 days Notes: svn path=/head/; revision=230355
* Fix a variety of warnings when compiling with gcc46Eitan Adler2012-01-201-10/+1
| | | | | | | | Approved by: dim, cperciva (mentor, blanket for pre-mentorship already-approved commits) MFC after: 3 days Notes: svn path=/head/; revision=230354
* Fix warning when compiling with gcc46:Eitan Adler2012-01-201-4/+0
| | | | | | | | | | | error: variable 'temp' set but not used Approved by: dim Approved by: cperciva (mentor, blanket for pre-mentorship already-approved commits) MFC after: 3 days Notes: svn path=/head/; revision=230353
* Spelling fixes for usr.sbin/Ulrich Spörlein2011-12-306-8/+8
| | | | Notes: svn path=/head/; revision=228990
* Small cleanups to panic() prototype.Ed Schouten2011-12-202-5/+4
| | | | | | | | | | - Let panic() use _Noreturn and __printflike() instead of GCC-specific attributes. - Remove prototype from ffs_subr.c and let it include ffs_extern.h. - Forward declare struct inode to make ffs_extern.h not depend on it. Notes: svn path=/head/; revision=228733
* - remove device keyword from makefs manpageEitan Adler2011-10-171-2/+1
| | | | | | | | | | | PR: docs/144408 Submitted by: gcooper Approved by: gjb Approved by: sahil (mentor) MFC after: 1 week Notes: svn path=/head/; revision=226482
* Add support to makefs(8) to add UFS labels to images.Nathan Whitehorn2011-10-094-1/+12
| | | | | | | | Submitted by: avg MFC after: 3 days Notes: svn path=/head/; revision=226169
* Fix buffer overflow and possible ISO image corruption in wrongMartin Matuska2011-08-231-7/+3
| | | | | | | | | | | | | | | handling of "." character case in makefs ISO level 1 and 2 filename conversion. Filed as NetBSD PR #45285 http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45285 Reviewed by: Christos Zoulas <christos@netbsd.org> Approved by: re (kib) MFC after: 3 days Notes: svn path=/head/; revision=225121
* Sync makefs(8) ISO 9660 support with NetBSD:Marius Strobl2011-08-106-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o cd9960 -> cd9660 o Move inclusion of sys/endian.h from cd9660_eltorito.c to cd9660.h since actual user is not cd9660_eltorito.c but iso.h and cd9660_eltorito.h. Actually, include order/place of sys/endian.h doesn't matter on netbsd since it is always included by sys/types.h but it's not true on other system. This should fix cross build breakage on freebsd introduced by rev. 1.16 of cd9660_eltorito.c. Problem reported and fix suggested on twitter. o Fix fd leaks in error cases. Found by cppcheck. o RRIP RE length should be 4, not 0 o Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates corrupted cd9660fs), iso9660_rrip.c part: - cd9660_rrip_finalize_node() should check rr_real_parent in node->parent, not in node itself in RRIP_PL case - cd9660_rrip_initialize_node() should update only node passed as arg so handle RRIP_PL in DOTDOT case Fixes malformed dotdot entries in deep (more than 8 level) directories moved into .rr_moved dir. Should be pulled up to netbsd-5. (no official ISO has such deep dirs, but cobalt restorecd is affected) Reviewed by: mm Approved by: re (kib) Obtained from: NetBSD MFC after: 3 days Notes: svn path=/head/; revision=224762
* Fix NetBSD PR bin/44114:Martin Matuska2011-08-071-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | makefs with -t cd9660 -o rockridge against directories with deep structure creates a corrupted cd9660 image. http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44114 Fix NetBSD PR bin/45217: makefs creates ISO9660 images that violate the ECMA-119 (ISO9660) specification. This is caused by erroneously writing 32 bytes with value 0x20 to the volume_set_id field and 128 bytes with value 0x20 to the the following 37-byte fields in the PVD: copyright_file_id, abstract_file_id, bibliographic_file_id This causes, among other unwanted results the reserved4 field to be overwritten with the value 0x20. To comply with the specification, this field muse be zero. As a result, all FreeBSD distribution images created with makefs have not been 100% valid ISO9660 files. http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45217 Reviewed by: kientzle Approved by: re (kib) Obtained from: NetBSD MFC after: 3 days Notes: svn path=/head/; revision=224690
* Add support for using mtree(5) manifest files to define the imageMarcel Moolenaar2011-06-197-18/+1111
| | | | | | | | | | | | | | | | | | | | | | | to be created. The support is based on mtree version 2.0, as used in libarchive, but adds new features on top of it. The current implementation is fully functional, but is envisioned to grow at least the following additional features over time: o Add support for the /include special command so that manifest files can be constructed using includable fragments. o Add support specifying a search path to locate content files. o Content file filters: commands that provide file contents on stdout. The manifest file eliminates the need to first construct a tree as root in order to create an image and allows images (releases) to be created directly from object trees and/or source trees. Reviewed by: deo Sponsored by: Juniper Networks, Inc Notes: svn path=/head/; revision=223306
* Drop the include of <ufs/ffs/ffs_extern.h> from usr.sbin/makefs/ffs/ffs_bswap.cKirk McKusick2011-06-162-16/+1
| | | | | | | | | | | | and usr.sbin/makefs/ffs/ffs_subr.c as they have no need of anything in that file. No other programs or libraries include <ufs/ffs/ffs_extern.h> (nor should they as it is totally in-kernel interfaces). For added protection I enclosed the entire contents of <ufs/ffs/ffs_extern.h> in ifdef _KERNEL. Feedback from: Bruce Evans and Tai-hwa Liang Notes: svn path=/head/; revision=223169
* Use alternative, less messy solution to avoid breakage after r223020:Dimitry Andric2011-06-132-6/+0
| | | | | | | | | put the snapdata structure between #ifdef _KERNEL guards. Suggested by: kib Notes: svn path=/head/; revision=223052
* Apparently makefs needs a few more system headers to compile duringDimitry Andric2011-06-132-0/+5
| | | | | | | buildworld. Notes: svn path=/head/; revision=223029
* Unbreak usr.sbin/makefs after r223020.Dimitry Andric2011-06-121-0/+1
| | | | | | | Pointy hat to: mckusick Notes: svn path=/head/; revision=223025
* Add analogs to the -chrp-boot and -prep-boot options to mkisofs.Nathan Whitehorn2011-05-224-10/+82
| | | | Notes: svn path=/head/; revision=222191
* Simplify this code somewhat by only writing a 512-byte-sector APM map.Nathan Whitehorn2011-05-061-29/+18
| | | | | | | | | All firmwares can read it, we need to write one anyway for old OF versions, and if a 512-byte one is present, OS X ignores the 2048-byte one in favor of it. Notes: svn path=/head/; revision=221536
* Fix boot on old machines (e.g. blue and white G3s) by synthesizing aNathan Whitehorn2011-05-051-0/+19
| | | | | | | 512-byte sector map instead unused space in the first 2048-byte sector. Notes: svn path=/head/; revision=221470
* Add support for synthesizing an APM partition map to map Mac PowerPCNathan Whitehorn2011-05-031-0/+79
| | | | | | | | | bootstrap partitions from the ISO9660 boot catalog. This preserves OS X's ability to mount the CD, while allowing us a way to provide HFS-ified bootstrap code for Open Firmware. Notes: svn path=/head/; revision=221387
* Really fix the confusion, sorry for noiseBaptiste Daroussin2011-03-241-2/+2
| | | | | | | | Submitted by: avg Approved by: cognet Notes: svn path=/head/; revision=219956
* Fix confusion between a-characters and d-charactersBaptiste Daroussin2011-03-241-2/+2
| | | | | | | | Submitted by: avg Approved by: cognet Notes: svn path=/head/; revision=219954
* The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilitiesKirk McKusick2011-01-242-0/+2
| | | | | | | | | | | | | | | | | include sys/time.h instead of time.h. This include is incorrect as per the manpages for the APIs and the POSIX definitions. This commit replaces sys/time.h where necessary with time.h. The commit also includes some minor style(9) header fixup in newfs. This commit is part of a larger effort by Garrett Cooper started in //depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more POSIX compliant. Submitted by: Garrett Cooper yanegomi at gmail dot com Notes: svn path=/head/; revision=217769
* Sync with the latest version from NetBSD. It notably addds ISO9660 support.Olivier Houchard2010-11-0725-383/+6510
| | | | | | | Submitted by: bapt Notes: svn path=/head/; revision=214921
* Fix typos and spelling mistakes.Joel Dahl2010-08-061-1/+1
| | | | Notes: svn path=/head/; revision=210933
* - Merge soft-updates journaling from projects/suj/head into head. ThisJeff Roberson2010-04-241-2/+0
| | | | | | | | | | | brings in support for an optional intent log which eliminates the need for background fsck on unclean shutdown. Sponsored by: iXsystems, Yahoo!, and Juniper. With help from: McKusick and Peter Holm Notes: svn path=/head/; revision=207141