diff options
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | core/e2fsprogs/.gitignore | 1 | ||||
| -rw-r--r-- | core/e2fsprogs/blkid_types.h | 1 | ||||
| -rw-r--r-- | core/e2fsprogs/config.h | 188 | ||||
| -rw-r--r-- | core/e2fsprogs/dirpaths.h | 2 | ||||
| -rw-r--r-- | core/e2fsprogs/ext2_types.h | 3 | ||||
| -rw-r--r-- | core/e2fsprogs/gen.rc | 197 | ||||
| m--------- | core/e2fsprogs/src | 0 | ||||
| -rw-r--r-- | core/gen.rc | 1 | ||||
| -rwxr-xr-x | fetch.rc | 1 | ||||
| -rw-r--r-- | rules.ninja | 5 |
11 files changed, 401 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules index b7dc5d93..7392b4e8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,9 @@ [submodule "core/curl/src"] path = core/curl/src url = https://github.com/curl/curl +[submodule "core/e2fsprogs/src"] + path = core/e2fsprogs/src + url = https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git [submodule "core/file/src"] path = core/file/src url = https://github.com/file/file diff --git a/core/e2fsprogs/.gitignore b/core/e2fsprogs/.gitignore new file mode 100644 index 00000000..012dc66e --- /dev/null +++ b/core/e2fsprogs/.gitignore @@ -0,0 +1 @@ +/tools.ninja diff --git a/core/e2fsprogs/blkid_types.h b/core/e2fsprogs/blkid_types.h new file mode 100644 index 00000000..ee9b980a --- /dev/null +++ b/core/e2fsprogs/blkid_types.h @@ -0,0 +1 @@ +#include <linux/types.h> diff --git a/core/e2fsprogs/config.h b/core/e2fsprogs/config.h new file mode 100644 index 00000000..6f018398 --- /dev/null +++ b/core/e2fsprogs/config.h @@ -0,0 +1,188 @@ +#include <config-posix.h> + +/* #undef AC_APPLE_UNIVERSAL_BUILD */ +/* #undef CONFIG_BLKID_DEBUG */ +#define CONFIG_BUILD_FINDFS 1 +/* #undef CONFIG_JBD_DEBUG */ +#define CONFIG_MMP 1 +/* #undef CONFIG_TDB */ +/* #undef CONFIG_TESTIO_DEBUG */ +/* #undef CRAY_STACKSEG_END */ +/* #undef C_ALLOCA */ +/* #undef DISABLE_BACKTRACE */ +#define ENABLE_BMAP_STATS 1 +/* #undef ENABLE_BMAP_STATS_OPS */ +/* #undef ENABLE_NLS */ +/* #undef HAVE_ADD_KEY */ +#define HAVE_ALLOCA 1 +#define HAVE_ALLOCA_H 1 +/* #undef HAVE_ARGZ_COUNT */ +/* #undef HAVE_ARGZ_H */ +/* #undef HAVE_ARGZ_NEXT */ +/* #undef HAVE_ARGZ_STRINGIFY */ +#define HAVE_ASPRINTF 1 +/* #undef HAVE_ATTR_XATTR_H */ +/* #undef HAVE_BACKTRACE */ +/* #undef HAVE_BLKID_PROBE_ENABLE_PARTITIONS */ +/* #undef HAVE_BLKID_PROBE_GET_TOPOLOGY */ +#define HAVE_BUILTIN_EXPECT 1 +/* #undef HAVE_CFLOCALECOPYCURRENT */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ +/* #undef HAVE_CHFLAGS */ +/* #undef HAVE_DCGETTEXT */ +#define HAVE_DECL_FEOF_UNLOCKED 1 +#define HAVE_DECL_FGETS_UNLOCKED 1 +#define HAVE_DECL_GETC_UNLOCKED 1 +#define HAVE_DECL__SNPRINTF 0 +#define HAVE_DECL__SNWPRINTF 0 +/* #undef HAVE_DOPRNT */ +/* #undef HAVE_EXECINFO_H */ +#define HAVE_EXT2_IOCTLS 1 +/* #undef HAVE_FADVISE64 */ +#define HAVE_FALLOCATE 1 +#define HAVE_FALLOCATE64 1 +#define HAVE_FEATURES_H 1 +#define HAVE_FSTAT64 1 +#define HAVE_FTRUNCATE64 1 +/* #undef HAVE_FUSE_H */ +#define HAVE_FUTIMES 1 +#define HAVE_GETDTABLESIZE 1 +/* #undef HAVE_GETMNTINFO */ +#define HAVE_GETOPT_H 1 +#define HAVE_GETPAGESIZE 1 +/* #undef HAVE_GETTEXT */ +#define HAVE_INTPTR_T 1 +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +/* #undef HAVE_KEYCTL */ +#define HAVE_LANGINFO_CODESET 1 +#define HAVE_LC_MESSAGES 1 +/* #undef HAVE_LINUX_FALLOC_H */ +/* #undef HAVE_LINUX_FD_H */ +/* #undef HAVE_LINUX_LOOP_H */ +/* #undef HAVE_LINUX_MAJOR_H */ +#define HAVE_LLISTXATTR 1 +/* #undef HAVE_LLSEEK */ +/* #undef HAVE_LLSEEK_PROTOTYPE */ +#define HAVE_LONG_LONG_INT 1 +#define HAVE_LSEEK64 1 +#define HAVE_LSEEK64_PROTOTYPE 1 +/* #undef HAVE_MAGIC_H */ +/* #undef HAVE_MALLINFO */ +#define HAVE_MALLOC_H 1 +#define HAVE_MEMALIGN 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MEMPCPY 1 +#define HAVE_MNTENT_H 1 +/* #undef HAVE_NET_IF_DL_H */ +#define HAVE_OPEN64 1 +/* #undef HAVE_OPTRESET */ +#define HAVE_PATHS_H 1 +#define HAVE_POSIX_FADVISE64 1 +#define HAVE_POSIX_PRINTF 1 +#define HAVE_PRCTL 1 +#define HAVE_PREAD64 1 +#define HAVE_PTHREAD_MUTEX_RECURSIVE 1 +#define HAVE_PTHREAD_RWLOCK 1 +#define HAVE_PWRITE64 1 +#define HAVE_RECLEN_DIRENT 1 +/* #undef HAVE_SA_LEN */ +/* #undef HAVE_SECURE_GETENV */ +#define HAVE_SETMNTENT 1 +#define HAVE_SETRESGID 1 +#define HAVE_SETRESUID 1 +/* #undef HAVE_STAT_FLAGS */ +#define HAVE_STDINT_H_WITH_UINTMAX 1 +#define HAVE_STRUCT_STAT_ST_ATIM 1 +#define HAVE_SYNC_FILE_RANGE 1 +/* #undef HAVE_SYS_ACL_H */ +/* #undef HAVE_SYS_DISKLABEL_H */ +/* #undef HAVE_SYS_DISK_H */ +#define HAVE_SYS_FILE_H 1 +#define HAVE_SYS_IOCTL_H 1 +/* #undef HAVE_SYS_KEY_H */ +/* #undef HAVE_SYS_MKDEV_H */ +#define HAVE_SYS_MOUNT_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_PRCTL_H 1 +/* #undef HAVE_SYS_SOCKIO_H */ +#define HAVE_SYS_SYSCALL_H 1 +/* #undef HAVE_SYS_SYSCTL_H */ +#define HAVE_SYS_SYSMACROS_H 1 +/* #undef HAVE_TERMIO_H */ +#define HAVE_TYPE_SSIZE_T 1 +#define HAVE_UNSIGNED_LONG_LONG_INT 1 +#define HAVE_USLEEP 1 +#define HAVE_VALLOC 1 +#define HAVE_VISIBILITY 1 +#define HAVE_WCHAR_T 1 +#define HAVE_WINT_T 1 +#define HAVE_WORKING_O_NOATIME 1 +#define HAVE_WORKING_O_NOFOLLOW 1 +#define HAVE___FSETLOCKING 1 +/* #undef HAVE___SECURE_GETENV */ +#define ICONV_CONST +#define INTDIV0_RAISES_SIGFPE 1 +#define PACKAGE "e2fsprogs" +#define PACKAGE_BUGREPORT "" +#define PACKAGE_NAME "" +#define PACKAGE_STRING "" +#define PACKAGE_TARNAME "" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "" +/* #undef PRI_MACROS_BROKEN */ +/* #undef PTHREAD_IN_USE_DETECTION_HARD */ +#define SIZEOF_INT 4 +#define SIZEOF_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_OFF_T 8 +#define SIZEOF_SHORT 2 +#define SIZEOF_TIME_T 8 +#ifndef SIZE_MAX +/* # undef SIZE_MAX */ +#endif +/* #undef STACK_DIRECTION */ +#define TLS _Thread_local +#define USE_POSIX_THREADS 1 +#define USE_POSIX_THREADS_WEAK 1 +/* #undef USE_PTH_THREADS */ +/* #undef USE_PTH_THREADS_WEAK */ +/* #undef USE_SOLARIS_THREADS */ +/* #undef USE_SOLARIS_THREADS_WEAK */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* #undef USE_UUIDD */ +/* #undef USE_WINDOWS_THREADS */ +#define VERSION "0.14.1" +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif +/* #undef _INTL_REDIRECT_MACROS */ +/* #undef _MINIX */ +/* #undef _POSIX_1_SOURCE */ +/* #undef _POSIX_SOURCE */ +#ifndef __cplusplus +/* #undef inline */ +#endif +/* #undef ptrdiff_t */ +/* #undef size_t */ +/* #undef uintmax_t */ +#include <dirpaths.h> diff --git a/core/e2fsprogs/dirpaths.h b/core/e2fsprogs/dirpaths.h new file mode 100644 index 00000000..6b0ac378 --- /dev/null +++ b/core/e2fsprogs/dirpaths.h @@ -0,0 +1,2 @@ +#define LOCALEDIR "/share/locale" +#define ROOT_SYSCONFDIR "/etc" diff --git a/core/e2fsprogs/ext2_types.h b/core/e2fsprogs/ext2_types.h new file mode 100644 index 00000000..c0c25c09 --- /dev/null +++ b/core/e2fsprogs/ext2_types.h @@ -0,0 +1,3 @@ +#include <sys/types.h> +#include <linux/types.h> +#define __force diff --git a/core/e2fsprogs/gen.rc b/core/e2fsprogs/gen.rc new file mode 100644 index 00000000..e92032d6 --- /dev/null +++ b/core/e2fsprogs/gen.rc @@ -0,0 +1,197 @@ +version=1.43.1 +cflags\ + -D HAVE_CONFIG_H\ + -I include\ + -I '$dir' \ + -I '$outdir'/include\ + -I '$outdir'/internal\ + -I '$outdir'/internal/support\ + -I '$srcdir'/lib + +set subst\ + -e s,@E2FSPROGS_VERSION@,$version,\ + -e s,@E2FSPROGS_MONTH@,June,\ + -e s,@E2FSPROGS_YEAR@,2016,\ + -e s,@JDEV@,, + +fn et { + et=$1 src='$outdir'/$2 hdr='$outdir'/$3 + let expr '-f $srcdir/lib/et/et_c.awk -v outfile=/dev/stdout outfn='`{basename $src} --\ + build $src awk $et '|' '$srcdir'/lib/et/et_c.awk + let expr '-f $srcdir/lib/et/et_h.awk -v outfile=/dev/stdout outfn='`{basename $hdr} --\ + build $hdr awk $et '|' '$srcdir'/lib/et/et_h.awk +} + +fn subst { + let expr '$subst' -- build '$outdir'/$1 sed '$srcdir'/$2 +} + +fn man { + src=$1 + base=`{basename $src} + sec=`{printf $base | tail -c 1} + subst $base $1 + file share/man/man$sec/$base '$outdir'/$base 644 +} + +subst ext2_err.et lib/ext2fs/ext2_err.et.in +et '$outdir'/ext2_err.et ext2_err.c include/ext2fs/ext2_err.h +et '$srcdir'/lib/support/prof_err.et prof_err.c internal/support/prof_err.h + +build '$outdir'/include/blkid/blkid.h copy '$srcdir'/lib/blkid/blkid.h.in +build '$outdir'/include/ext2fs/ext2_types.h copy '$dir'/ext2_types.h +build '$outdir'/include/uuid/uuid.h copy '$srcdir'/lib/uuid/uuid.h.in +build '$outdir'/internal/blkid/blkid_types.h copy '$dir'/blkid_types.h + +{ + include 'toolchain/$host_toolchain.ninja' + exe gen_crc32ctable '$srcdir'/lib/ext2fs/gen_crc32ctable.c +} >../tools.ninja +subninja '$dir'/tools.ninja +rule gen_crc32ctable '$outdir/gen_crc32ctable >$out.tmp && mv $out.tmp $out' +build '$outdir'/internal/crc32c_table.h gen_crc32ctable '|' '$outdir'/gen_crc32ctable + +phony headers '$outdir'/include/^(\ + blkid/blkid.h\ + ext2fs/^(ext2_err.h ext2_types.h)\ + uuid/uuid.h\ +) +phony internal '$outdir'/internal/^(\ + blkid/blkid_types.h support/prof_err.h crc32c_table.h\ +) + +deps=phony/'$dir'/^(headers internal) + +lib libcomm_err.a -d $"deps\ + lib/et/^(error_message.c et_name.c init_et.c com_err.c com_right.c) +lib libblkid.a -d $"deps lib/blkid/^(\ + cache.c dev.c devname.c devno.c getsize.c llseek.c probe.c\ + read.c resolve.c save.c tag.c version.c\ +) +lib libe2p.a -d $"deps lib/e2p/^(\ + feature.c fgetflags.c fsetflags.c fgetversion.c fsetversion.c\ + getflags.c getversion.c hashstr.c iod.c ls.c mntopts.c\ + parse_num.c pe.c pf.c ps.c setflags.c setversion.c uuid.c\ + ostype.c percent.c crypto_mode.c fgetproject.c fsetproject.c\ +) +lib libext2fs.a -d $"deps '$outdir'/ext2_err.c lib/ext2fs/^(\ + alloc.c\ + alloc_sb.c\ + alloc_stats.c\ + alloc_tables.c\ + atexit.c\ + badblocks.c\ + bb_inode.c\ + bitmaps.c\ + bitops.c\ + blkmap64_ba.c\ + blkmap64_rb.c\ + blknum.c\ + block.c\ + bmap.c\ + check_desc.c\ + closefs.c\ + crc16.c\ + crc32c.c\ + csum.c\ + dblist.c\ + dblist_dir.c\ + dirblock.c\ + dirhash.c\ + dir_iterate.c\ + expanddir.c\ + ext_attr.c\ + extent.c\ + fallocate.c\ + fileio.c\ + finddev.c\ + flushb.c\ + freefs.c\ + gen_bitmap.c\ + gen_bitmap64.c\ + get_num_dirs.c\ + get_pathname.c\ + getsize.c\ + getsectsize.c\ + i_block.c\ + icount.c\ + ind_block.c\ + initialize.c\ + inline.c\ + inline_data.c\ + inode.c\ + io_manager.c\ + ismounted.c\ + link.c\ + llseek.c\ + lookup.c\ + mkdir.c\ + mkjournal.c\ + mmp.c\ + namei.c\ + native.c\ + newdir.c\ + openfs.c\ + progress.c\ + punch.c\ + qcow2.c\ + read_bb.c\ + read_bb_file.c\ + res_gdt.c\ + rw_bitmaps.c\ + sha512.c\ + swapfs.c\ + symlink.c\ + undo_io.c\ + unix_io.c\ + unlink.c\ + valid_blk.c\ + version.c\ + rbtree.c\ + \ + dupfs.c\ +) +lib libsupport.a -d $"deps '$outdir'/prof_err.c lib/support/^(\ + mkquota.c\ + plausible.c\ + profile.c\ + parse_qtype.c\ + profile_helpers.c\ + quotaio.c\ + quotaio_v2.c\ + quotaio_tree.c\ + dict.c\ +) +lib libuuid.a -d $"deps lib/uuid/^(\ + clear.c\ + compare.c\ + copy.c\ + gen_uuid.c\ + isnull.c\ + pack.c\ + parse.c\ + unpack.c\ + unparse.c\ + uuid_time.c\ +) + +libs=(libext2fs.a libe2p.a libblkid.a libuuid.a libcomm_err.a libsupport.a) + +exe bin/e2fsck -d 'phony/$dir/headers' e2fsck/^(\ + unix.c e2fsck.c super.c pass1.c pass1b.c pass2.c\ + pass3.c pass4.c pass5.c journal.c badblocks.c util.c dirinfo.c\ + dx_dirinfo.c ehandler.c problem.c message.c quota.c recovery.c\ + region.c revoke.c ea_refcount.c rehash.c\ + logfile.c sigcatcher.c readahead.c\ + extents.c\ +) $libs +file bin/e2fsck '$outdir'/bin/e2fsck 755 +man e2fsck/e2fsck.8.in +man e2fsck/e2fsck.conf.5.in + +exe bin/resize2fs -d 'phony/$dir/headers' resize/^(\ + extent.c resize2fs.c main.c online.c resource_track.c\ + sim_progress.c\ +) $libs +file bin/resize2fs '$outdir'/bin/resize2fs 755 +man resize/resize2fs.8.in diff --git a/core/e2fsprogs/src b/core/e2fsprogs/src new file mode 160000 +Subproject 48203a389d2d9f45dd0768f0963cb2b3ffbc12d diff --git a/core/gen.rc b/core/gen.rc index efd64176..df7a8e6f 100644 --- a/core/gen.rc +++ b/core/gen.rc @@ -2,6 +2,7 @@ subgen awk subgen bc subgen bzip2 subgen curl +subgen e2fsprogs subgen file subgen git subgen iproute2 @@ -71,6 +71,7 @@ fetch core/awk git fetch core/bc curl fetch core/bzip2 curl fetch core/curl git +fetch core/e2fsprogs git fetch core/file git fetch core/git git fetch core/iproute2 git diff --git a/rules.ninja b/rules.ninja index 3e1ac487..5614d4b3 100644 --- a/rules.ninja +++ b/rules.ninja @@ -37,7 +37,10 @@ rule yacc command = oldcwd=$$PWD && cd $outdir && $yacc $yaccflags $$oldcwd/$in rule sed - command = sed $expr >$out.tmp $in && mv $out.tmp $out + command = sed $expr $in >$out.tmp && mv $out.tmp $out + +rule awk + command = awk $expr $in >$out.tmp && mv $out.tmp $out rule githash command = rc ./scripts/hash.rc $builddir/$repo.git $out $args $in |
