diff --git a/README.rst b/README.rst index 33bd01e3a..09f8d1b04 100644 --- a/README.rst +++ b/README.rst @@ -56,6 +56,7 @@ Contributors: * Richard Berger * Lucas Caudill +* Krishna Chilleri * Rusty Davis * Hunter Easterday * Oliver Freyermuth diff --git a/bin/Makefile b/bin/Makefile new file mode 100644 index 000000000..cd1185bc8 --- /dev/null +++ b/bin/Makefile @@ -0,0 +1,872 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# bin/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Bugs in this Makefile: +# +# 1. $(EXEEXT) not included for scripts. + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/charliecloud +pkgincludedir = $(includedir)/charliecloud +pkglibdir = $(libdir)/charliecloud +pkglibexecdir = $(libexecdir)/charliecloud +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = aarch64-unknown-linux-gnu +host_triplet = aarch64-unknown-linux-gnu +target_triplet = aarch64-unknown-linux-gnu +bin_PROGRAMS = ch-checkns$(EXEEXT) ch-run$(EXEEXT) +am__append_1 = ch_fuse.h ch_fuse.c +am__append_2 = ch-image +subdir = bin +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/misc/m4/ax_check_compile_flag.m4 \ + $(top_srcdir)/misc/m4/ax_compare_version.m4 \ + $(top_srcdir)/misc/m4/ax_pthread.m4 \ + $(top_srcdir)/misc/m4/ax_with_prog.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_ch_checkns_OBJECTS = ch-checkns.$(OBJEXT) ch_misc.$(OBJEXT) +ch_checkns_OBJECTS = $(am_ch_checkns_OBJECTS) +ch_checkns_LDADD = $(LDADD) +am__ch_run_SOURCES_DIST = ch-run.c ch_core.h ch_core.c ch_misc.h \ + ch_misc.c ch_fuse.h ch_fuse.c +am__objects_1 = ch_run-ch_fuse.$(OBJEXT) +am_ch_run_OBJECTS = ch_run-ch-run.$(OBJEXT) ch_run-ch_core.$(OBJEXT) \ + ch_run-ch_misc.$(OBJEXT) $(am__objects_1) +ch_run_OBJECTS = $(am_ch_run_OBJECTS) +am__DEPENDENCIES_1 = +ch_run_DEPENDENCIES = $(am__DEPENDENCIES_1) +ch_run_LINK = $(CCLD) $(ch_run_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +SCRIPTS = $(bin_SCRIPTS) $(dist_bin_SCRIPTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/ch-checkns.Po ./$(DEPDIR)/ch_misc.Po \ + ./$(DEPDIR)/ch_run-ch-run.Po ./$(DEPDIR)/ch_run-ch_core.Po \ + ./$(DEPDIR)/ch_run-ch_fuse.Po ./$(DEPDIR)/ch_run-ch_misc.Po +am__mv = mv -f +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(ch_checkns_SOURCES) $(ch_run_SOURCES) +DIST_SOURCES = $(ch_checkns_SOURCES) $(am__ch_run_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/build-aux/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} '/usr/local/src/charliecloud/build-aux/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AUTOCONF = ${SHELL} '/usr/local/src/charliecloud/build-aux/missing' autoconf +AUTOHEADER = ${SHELL} '/usr/local/src/charliecloud/build-aux/missing' autoheader +AUTOMAKE = ${SHELL} '/usr/local/src/charliecloud/build-aux/missing' automake-1.16 +AWK = mawk +BATS = bats +BATS_VERSION_NOTE = ok (1.8.2) +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -O0 -g -fmax-errors=1 -std=c99 -Wall -Werror -I/usr/include/fuse3 +CH_RUN_LIBS = -lsquashfuse_ll -lfuse3 -lrt -lm +CPP = gcc -E +CPPFLAGS = +CSCOPE = cscope +CTAGS = ctags +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DOCUTILS_VERSION_NOTE = ok (0.19) +DOT = dot +DOT_VERSION_NOTE = ok (2.43.0) +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +ETAGS = etags +EXEEXT = +GIT = git +GIT2DOT = git2dot.py +GIT2DOT_VERSION_NOTE = ok (0.8.3) +GIT_VERSION_NOTE = ok (2.39.2) +GREP = /usr/bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} '/usr/local/src/charliecloud/build-aux/missing' makeinfo +MKDIR_P = install -d -m 0755 +MKSQUASHFS = mksquashfs +MKSQUASHFS_VERSION_NOTE = ok (4.5.1) +NVIDIA_CLI = +NVIDIA_CLI_VERSION_NOTE = not found +OBJEXT = o +PACKAGE = charliecloud +PACKAGE_BUGREPORT = https://github.com/hpc/charliecloud +PACKAGE_NAME = Charliecloud +PACKAGE_STRING = Charliecloud 0.38~pre+runocibundles1754.3033595 +PACKAGE_TARNAME = charliecloud +PACKAGE_URL = +PACKAGE_VERSION = 0.38~pre+runocibundles1754.3033595 +PATH_SEPARATOR = : +PTHREAD_CC = gcc +PTHREAD_CFLAGS = -pthread +PTHREAD_CXX = +PTHREAD_LIBS = -lpthread +PYTHON = python3 +PYTHON_SHEBANG = /usr/bin/env python3 +PYTHON_VERSION_NOTE = ok (3.11.2) +REQUESTS_VERSION_NOTE = ok (2.28.1) +RSYNC = rsync +RSYNC_VERSION_NOTE = ok (3.2.7) +RTD_VERSION_NOTE = ok (1.2.0) +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/bash +SHELLCHECK = shellcheck +SHELLCHECK_VERSION_NOTE = ok (0.10.0) +SPHINX = /usr/bin/sphinx-build +SPHINX_VERSION_NOTE = ok (5.3.0) +SQUASHFUSE = squashfuse +SQUASHFUSE_VERSION_NOTE = ok (0.5.2) +STRIP = +VERSION = 0.38~pre+runocibundles1754.3033595 +WGET = wget +WGET_VERSION_NOTE = ok (1.21.3) +_BASH = bash +_BASH_VERSION_NOTE = ok (5.2.15(1)-release) +abs_builddir = /usr/local/src/charliecloud/bin +abs_srcdir = /usr/local/src/charliecloud/bin +abs_top_builddir = /usr/local/src/charliecloud +abs_top_srcdir = /usr/local/src/charliecloud +ac_ct_CC = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +ax_pthread_config = +bindir = ${exec_prefix}/bin +build = aarch64-unknown-linux-gnu +build_alias = +build_cpu = aarch64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +have_pkg_config = yes +host = aarch64-unknown-linux-gnu +host_alias = +host_cpu = aarch64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /usr/local/src/charliecloud/build-aux/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /tmp/foo +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target = aarch64-unknown-linux-gnu +target_alias = +target_cpu = aarch64 +target_os = linux-gnu +target_vendor = unknown +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +ch_checkns_SOURCES = ch-checkns.c ch_misc.h ch_misc.c +ch_run_SOURCES = ch-run.c ch_core.h ch_core.c ch_misc.h ch_misc.c \ + $(am__append_1) +ch_run_CFLAGS = $(CFLAGS) $(PTHREAD_CFLAGS) +ch_run_LDADD = $(CH_RUN_LIBS) +dist_bin_SCRIPTS = ch-convert \ + ch-fromhost \ + ch-test + +bin_SCRIPTS = ch-run-oci $(am__append_2) +EXTRA_SCRIPTS = ch-image # more scripts that *may* be built +EXTRA_DIST = ch-image.py.in ch-run-oci.py.in +CLEANFILES = $(bin_SCRIPTS) $(EXTRA_SCRIPTS) +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign bin/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status bin/config.h +$(srcdir)/config.h.in: # $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +ch-checkns$(EXEEXT): $(ch_checkns_OBJECTS) $(ch_checkns_DEPENDENCIES) $(EXTRA_ch_checkns_DEPENDENCIES) + @rm -f ch-checkns$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ch_checkns_OBJECTS) $(ch_checkns_LDADD) $(LIBS) + +ch-run$(EXEEXT): $(ch_run_OBJECTS) $(ch_run_DEPENDENCIES) $(EXTRA_ch_run_DEPENDENCIES) + @rm -f ch-run$(EXEEXT) + $(AM_V_CCLD)$(ch_run_LINK) $(ch_run_OBJECTS) $(ch_run_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) +install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-dist_binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/ch-checkns.Po # am--include-marker +include ./$(DEPDIR)/ch_misc.Po # am--include-marker +include ./$(DEPDIR)/ch_run-ch-run.Po # am--include-marker +include ./$(DEPDIR)/ch_run-ch_core.Po # am--include-marker +include ./$(DEPDIR)/ch_run-ch_fuse.Po # am--include-marker +include ./$(DEPDIR)/ch_run-ch_misc.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ch_run-ch-run.o: ch-run.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -MT ch_run-ch-run.o -MD -MP -MF $(DEPDIR)/ch_run-ch-run.Tpo -c -o ch_run-ch-run.o `test -f 'ch-run.c' || echo '$(srcdir)/'`ch-run.c + $(AM_V_at)$(am__mv) $(DEPDIR)/ch_run-ch-run.Tpo $(DEPDIR)/ch_run-ch-run.Po +# $(AM_V_CC)source='ch-run.c' object='ch_run-ch-run.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -c -o ch_run-ch-run.o `test -f 'ch-run.c' || echo '$(srcdir)/'`ch-run.c + +ch_run-ch-run.obj: ch-run.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -MT ch_run-ch-run.obj -MD -MP -MF $(DEPDIR)/ch_run-ch-run.Tpo -c -o ch_run-ch-run.obj `if test -f 'ch-run.c'; then $(CYGPATH_W) 'ch-run.c'; else $(CYGPATH_W) '$(srcdir)/ch-run.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/ch_run-ch-run.Tpo $(DEPDIR)/ch_run-ch-run.Po +# $(AM_V_CC)source='ch-run.c' object='ch_run-ch-run.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -c -o ch_run-ch-run.obj `if test -f 'ch-run.c'; then $(CYGPATH_W) 'ch-run.c'; else $(CYGPATH_W) '$(srcdir)/ch-run.c'; fi` + +ch_run-ch_core.o: ch_core.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -MT ch_run-ch_core.o -MD -MP -MF $(DEPDIR)/ch_run-ch_core.Tpo -c -o ch_run-ch_core.o `test -f 'ch_core.c' || echo '$(srcdir)/'`ch_core.c + $(AM_V_at)$(am__mv) $(DEPDIR)/ch_run-ch_core.Tpo $(DEPDIR)/ch_run-ch_core.Po +# $(AM_V_CC)source='ch_core.c' object='ch_run-ch_core.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -c -o ch_run-ch_core.o `test -f 'ch_core.c' || echo '$(srcdir)/'`ch_core.c + +ch_run-ch_core.obj: ch_core.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -MT ch_run-ch_core.obj -MD -MP -MF $(DEPDIR)/ch_run-ch_core.Tpo -c -o ch_run-ch_core.obj `if test -f 'ch_core.c'; then $(CYGPATH_W) 'ch_core.c'; else $(CYGPATH_W) '$(srcdir)/ch_core.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/ch_run-ch_core.Tpo $(DEPDIR)/ch_run-ch_core.Po +# $(AM_V_CC)source='ch_core.c' object='ch_run-ch_core.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -c -o ch_run-ch_core.obj `if test -f 'ch_core.c'; then $(CYGPATH_W) 'ch_core.c'; else $(CYGPATH_W) '$(srcdir)/ch_core.c'; fi` + +ch_run-ch_misc.o: ch_misc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -MT ch_run-ch_misc.o -MD -MP -MF $(DEPDIR)/ch_run-ch_misc.Tpo -c -o ch_run-ch_misc.o `test -f 'ch_misc.c' || echo '$(srcdir)/'`ch_misc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/ch_run-ch_misc.Tpo $(DEPDIR)/ch_run-ch_misc.Po +# $(AM_V_CC)source='ch_misc.c' object='ch_run-ch_misc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -c -o ch_run-ch_misc.o `test -f 'ch_misc.c' || echo '$(srcdir)/'`ch_misc.c + +ch_run-ch_misc.obj: ch_misc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -MT ch_run-ch_misc.obj -MD -MP -MF $(DEPDIR)/ch_run-ch_misc.Tpo -c -o ch_run-ch_misc.obj `if test -f 'ch_misc.c'; then $(CYGPATH_W) 'ch_misc.c'; else $(CYGPATH_W) '$(srcdir)/ch_misc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/ch_run-ch_misc.Tpo $(DEPDIR)/ch_run-ch_misc.Po +# $(AM_V_CC)source='ch_misc.c' object='ch_run-ch_misc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -c -o ch_run-ch_misc.obj `if test -f 'ch_misc.c'; then $(CYGPATH_W) 'ch_misc.c'; else $(CYGPATH_W) '$(srcdir)/ch_misc.c'; fi` + +ch_run-ch_fuse.o: ch_fuse.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -MT ch_run-ch_fuse.o -MD -MP -MF $(DEPDIR)/ch_run-ch_fuse.Tpo -c -o ch_run-ch_fuse.o `test -f 'ch_fuse.c' || echo '$(srcdir)/'`ch_fuse.c + $(AM_V_at)$(am__mv) $(DEPDIR)/ch_run-ch_fuse.Tpo $(DEPDIR)/ch_run-ch_fuse.Po +# $(AM_V_CC)source='ch_fuse.c' object='ch_run-ch_fuse.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -c -o ch_run-ch_fuse.o `test -f 'ch_fuse.c' || echo '$(srcdir)/'`ch_fuse.c + +ch_run-ch_fuse.obj: ch_fuse.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -MT ch_run-ch_fuse.obj -MD -MP -MF $(DEPDIR)/ch_run-ch_fuse.Tpo -c -o ch_run-ch_fuse.obj `if test -f 'ch_fuse.c'; then $(CYGPATH_W) 'ch_fuse.c'; else $(CYGPATH_W) '$(srcdir)/ch_fuse.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/ch_run-ch_fuse.Tpo $(DEPDIR)/ch_run-ch_fuse.Po +# $(AM_V_CC)source='ch_fuse.c' object='ch_run-ch_fuse.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ch_run_CFLAGS) $(CFLAGS) -c -o ch_run-ch_fuse.obj `if test -f 'ch_fuse.c'; then $(CYGPATH_W) 'ch_fuse.c'; else $(CYGPATH_W) '$(srcdir)/ch_fuse.c'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/ch-checkns.Po + -rm -f ./$(DEPDIR)/ch_misc.Po + -rm -f ./$(DEPDIR)/ch_run-ch-run.Po + -rm -f ./$(DEPDIR)/ch_run-ch_core.Po + -rm -f ./$(DEPDIR)/ch_run-ch_fuse.Po + -rm -f ./$(DEPDIR)/ch_run-ch_misc.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-dist_binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/ch-checkns.Po + -rm -f ./$(DEPDIR)/ch_misc.Po + -rm -f ./$(DEPDIR)/ch_run-ch-run.Po + -rm -f ./$(DEPDIR)/ch_run-ch_core.Po + -rm -f ./$(DEPDIR)/ch_run-ch_fuse.Po + -rm -f ./$(DEPDIR)/ch_run-ch_misc.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-dist_binSCRIPTS + +.MAKE: all install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic distclean-hdr \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-binSCRIPTS \ + install-data install-data-am install-dist_binSCRIPTS \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-dist_binSCRIPTS + +.PRECIOUS: Makefile + + +ch-image: ch-image.py.in +ch-run-oci: ch-run-oci.py.in + +$(bin_SCRIPTS): %: %.py.in + rm -f $@ + sed -E 's|%PYTHON_SHEBANG%|/usr/bin/env python3|' < $< > $@ + chmod +rx,-w $@ # respects umask + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/bin/ch-run.c b/bin/ch-run.c index bf3c41934..f0778704e 100644 --- a/bin/ch-run.c +++ b/bin/ch-run.c @@ -16,6 +16,7 @@ #include "ch_core.h" #include "ch_misc.h" +#include "cJSON.h" /** Constants and macros **/ @@ -63,6 +64,7 @@ const struct argp_option options[] = { { "test", -17, "TEST", 0, "do test TEST" }, { "mount", 'm', "DIR", 0, "SquashFS mount point"}, { "no-passwd", -9, 0, 0, "don't bind-mount /etc/{passwd,group}"}, + { "oci", 'o', 0, 0, "run as an oci bundle" }, { "private-tmp", 't', 0, 0, "use container-private /tmp" }, { "quiet", 'q', 0, 0, "print less output (can be repeated)"}, #ifdef HAVE_SECCOMP @@ -96,6 +98,7 @@ struct args { #ifdef HAVE_SECCOMP bool seccomp_p; #endif + char *oci_version; char *storage_dir; bool unsafe; }; @@ -116,6 +119,41 @@ char *storage_default(void); extern void warnings_reprint(void); +/** Types and function prototypes for running an OCI bundle */ + +struct json_dispatch { + char *name; + struct json_dispatch *children; + void (*f)(cJSON *, struct args *args); +}; + +void readJSONFile(const char *filename, struct args *args); +void visit(struct json_dispatch actions[], cJSON *json, struct args *args); +void dispatch(struct json_dispatch action, cJSON *json, struct args *args); +void oci_ociVersion(cJSON *json, struct args *args); +void oci_env(cJSON *json, struct args *args); +void oci_cwd(cJSON *json, struct args *args); +void oci_path(cJSON *json, struct args *args); +void oci_readonly(cJSON *json, struct args *args); + +struct json_dispatch oci_process[] = { + { "env", NULL, oci_env }, + { "cwd", NULL, oci_cwd }, + { } +}; +struct json_dispatch oci_root[] = { + { "path", NULL, oci_path }, + { "readonly", NULL, oci_readonly }, + { } +}; +struct json_dispatch oci_top[] = { + { "ociVersion", NULL, oci_ociVersion }, + { "process", oci_process }, + { "root", oci_root }, + { } +}; + + /** Global variables **/ const struct argp argp = { options, parse_opt, args_doc, usage }; @@ -172,6 +210,7 @@ int main(int argc, char *argv[]) #ifdef HAVE_SECCOMP .seccomp_p = false, #endif + .oci_version = NULL, .storage_dir = storage_default(), .unsafe = false }; @@ -194,7 +233,10 @@ int main(int argc, char *argv[]) args.c.img_ref = argv[arg_next++]; args.c.newroot = realpath_(args.c.newroot, true); args.storage_dir = realpath_(args.storage_dir, true); - args.c.type = image_type(args.c.img_ref, args.storage_dir); + + if (args.c.type != IMG_OCI_BUNDLE) { + args.c.type = image_type(args.c.img_ref, args.storage_dir); + } switch (args.c.type) { case IMG_DIRECTORY: @@ -208,6 +250,16 @@ int main(int argc, char *argv[]) Tf (!args.c.writable || args.unsafe, "--write invalid when running by name"); break; + case IMG_OCI_BUNDLE: + // Parse config.json file and distribute argument values to container + char *rootfs = path_join(args.c.img_ref, "rootfs"); + char *conff = path_join(args.c.img_ref, "config.json"); + + Tf (path_exists(rootfs, NULL, true), "%s: No such file or directory", rootfs); + Tf (path_exists(conff, NULL, true), "%s: No such file or directory", conff); + + readJSONFile(conff, &args); + break; case IMG_SQUASH: #ifndef HAVE_LIBSQUASHFUSE FATAL(0, "this ch-run does not support internal SquashFS mounts"); @@ -542,6 +594,9 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) Ze ((arg[0] == '\0'), "mount point can't be empty string"); args->c.newroot = arg; break; + case 'o': // --oci + args->c.type = IMG_OCI_BUNDLE; + break; case 's': // --storage args->storage_dir = arg; if (!path_exists(arg, NULL, false)) @@ -646,3 +701,101 @@ char *storage_default(void) return storage; } + +void readJSONFile(const char *filename, struct args *args) { + + FILE *file = fopen(filename, "rb"); + char *buffer = NULL; + size_t length; + + if (file == NULL) { + fprintf(stderr, "Error: could not open file %s\n", filename); + return; + } + + // Get the file length + fseek(file, 0, SEEK_END); + length = ftell(file); + fseek(file, 0, SEEK_SET); + // Allocate content buffer + buffer = malloc(length); + fread(buffer, 1, length, file); + + fclose(file); + + // Parse the JSON data + cJSON *json = cJSON_Parse(buffer); + // Check if parsing was successful + if (json == NULL) { + const char *error_ptr = cJSON_GetErrorPtr(); + if (error_ptr != NULL) { + fprintf(stderr, "Error before: %s\n", error_ptr); + } + goto end; + } + + // Process the JSON data + visit(oci_top, json, args); + + // Clean up +end: + cJSON_Delete(json); + free(buffer); +} + +void dispatch(struct json_dispatch action, cJSON *json, struct args *args) { + if (action.f != NULL) + action.f(json, args); + if (action.children != NULL) + visit(action.children, json, args); +} + + +void visit(struct json_dispatch actions[], cJSON *json, struct args *args) { + for (int i =0; actions[i].name != NULL; i++) { + cJSON *subtree = cJSON_GetObjectItem(json, actions[i].name); + if (cJSON_IsArray(subtree)) { + cJSON *elem; + cJSON_ArrayForEach(elem, subtree) + dispatch(actions[i], elem, args); + } else { + dispatch(actions[i], subtree, args); + } + } +} + +void oci_ociVersion(cJSON *json, struct args *args) { + // Log oci version just in case + args->oci_version = strdup(json->valuestring); +} + + +void oci_env(cJSON *json, struct args *args) { + // Corresponds to --set-env + parse_set_env(args, json->valuestring, '\n'); +} + + +void oci_cwd(cJSON *json, struct args *args) { + // Corresponds to --cd + if (args->initial_dir == NULL) { + args->initial_dir = strdup(json->valuestring); + } +} + + +void oci_path(cJSON *json, struct args *args) { + args->c.newroot = strdup(json->valuestring); + // Takes care of absolute/relative paths + if (!path_exists(args->c.newroot, NULL, true)) { + args->c.newroot = path_join(args->c.img_ref, json->valuestring); + } +} + + +void oci_readonly(cJSON *json, struct args *args) { + // Corresponds to --write if readonly is false + if (cJSON_IsFalse(json)) { + args->c.writable = true; + } +} diff --git a/bin/ch_core.c b/bin/ch_core.c index 60dcd1097..7e995121f 100644 --- a/bin/ch_core.c +++ b/bin/ch_core.c @@ -401,8 +401,9 @@ enum img_type image_type(const char *ref, const char *storage_dir) Zf (stat(ref, &st), "can't stat: %s", ref); // If ref is the path to a directory, then it’s a directory. - if (S_ISDIR(st.st_mode)) + if (S_ISDIR(st.st_mode)) { return IMG_DIRECTORY; + } // Now we know it’s file-like enough to read. See if it has the SquashFS // magic number. diff --git a/bin/ch_core.h b/bin/ch_core.h index f65cfc083..6a315f613 100644 --- a/bin/ch_core.h +++ b/bin/ch_core.h @@ -25,6 +25,7 @@ enum img_type { IMG_SQUASH, // SquashFS archive file (not yet mounted) IMG_NAME, // name of image in storage IMG_NONE, // image type is not set yet + IMG_OCI_BUNDLE, // contains rootfs img_directory and config.json file }; struct container { diff --git a/bin/config.json b/bin/config.json new file mode 100644 index 000000000..754fae2d1 --- /dev/null +++ b/bin/config.json @@ -0,0 +1,176 @@ +{ + "ociVersion": "1.0.2-dev", + "process": { + "terminal": true, + "user": {}, + + "args": [ + "sh", "redis-server", "--bind", "0.0.0.0" + ], + "env": [ + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "TERM=xterm" + ], + "cwd": "/", + "capabilities": { + "bounding": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "effective": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "permitted": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "ambient": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ] + }, + "rlimits": [ + { + "type": "RLIMIT_NOFILE", + "hard": 1024, + "soft": 1024 + } + ], + "noNewPrivileges": true + }, + "root": { + "path": "rootfs", + "readonly": true + }, + "hostname": "runc", + "mounts": [ + { + "destination": "/proc", + "type": "proc", + "source": "proc" + }, + { + "destination": "/dev", + "type": "tmpfs", + "source": "tmpfs", + "options": [ + "nosuid", + "strictatime", + "mode=755", + "size=65536k" + ] + }, + { + "destination": "/dev/pts", + "type": "devpts", + "source": "devpts", + "options": [ + "nosuid", + "noexec", + "newinstance", + "ptmxmode=0666", + "mode=0620", + "gid=5" + ] + }, + { + "destination": "/dev/shm", + "type": "tmpfs", + "source": "shm", + "options": [ + "nosuid", + "noexec", + "nodev", + "mode=1777", + "size=65536k" + ] + }, + { + "destination": "/dev/mqueue", + "type": "mqueue", + "source": "mqueue", + "options": [ + "nosuid", + "noexec", + "nodev" + ] + }, + { + "destination": "/sys", + "type": "sysfs", + "source": "sysfs", + "options": [ + "nosuid", + "noexec", + "nodev", + "ro" + ] + }, + { + "destination": "/sys/fs/cgroup", + "type": "cgroup", + "source": "cgroup", + "options": [ + "nosuid", + "noexec", + "nodev", + "relatime", + "ro" + ] + } + ], + "linux": { + "resources": { + "devices": [ + { + "allow": false, + "access": "rwm" + } + ] + }, + "namespaces": [ + { + "type": "pid" + }, + { + "type": "network" + }, + { + "type": "ipc" + }, + { + "type": "uts" + }, + { + "type": "mount" + }, + { + "type": "cgroup" + } + ], + "maskedPaths": [ + "/proc/acpi", + "/proc/asound", + "/proc/kcore", + "/proc/keys", + "/proc/latency_stats", + "/proc/timer_list", + "/proc/timer_stats", + "/proc/sched_debug", + "/sys/firmware", + "/proc/scsi" + ], + "readonlyPaths": [ + "/proc/bus", + "/proc/fs", + "/proc/irq", + "/proc/sys", + "/proc/sysrq-trigger" + ] + } +}