mirror of https://github.com/vitalif/e2fsprogs
Fix build reproducibility for mk_cmds and compile_et
The mk_cmds and compile_et scripts include the build directory, which breaks the build reproducibility goal of Debian. Signed-off-by: Theodore Ts'o <tytso@mit.edu>next
parent
f6acc1212d
commit
a2143b5160
|
@ -633,8 +633,6 @@ BUILD_CFLAGS
|
||||||
MKINSTALLDIRS
|
MKINSTALLDIRS
|
||||||
INCLUDES
|
INCLUDES
|
||||||
DO_TEST_SUITE
|
DO_TEST_SUITE
|
||||||
ET_DIR
|
|
||||||
SS_DIR
|
|
||||||
LDFLAGS_STATIC
|
LDFLAGS_STATIC
|
||||||
root_sysconfdir
|
root_sysconfdir
|
||||||
root_libdir
|
root_libdir
|
||||||
|
@ -13805,10 +13803,6 @@ $as_echo "#define _INTL_REDIRECT_MACROS 1" >>confdefs.h
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
SS_DIR=`cd ${srcdir}/lib/ss; pwd`
|
|
||||||
ET_DIR=`cd ${srcdir}/lib/et; pwd`
|
|
||||||
|
|
||||||
|
|
||||||
if test "$cross_compiling" = yes ; then
|
if test "$cross_compiling" = yes ; then
|
||||||
DO_TEST_SUITE=
|
DO_TEST_SUITE=
|
||||||
else
|
else
|
||||||
|
|
|
@ -1400,13 +1400,6 @@ darwin*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
dnl
|
dnl
|
||||||
dnl Make the ss and et directories work correctly.
|
|
||||||
dnl
|
|
||||||
SS_DIR=`cd ${srcdir}/lib/ss; pwd`
|
|
||||||
ET_DIR=`cd ${srcdir}/lib/et; pwd`
|
|
||||||
AC_SUBST(SS_DIR)
|
|
||||||
AC_SUBST(ET_DIR)
|
|
||||||
dnl
|
|
||||||
dnl Only try to run the test suite if we're not cross compiling.
|
dnl Only try to run the test suite if we're not cross compiling.
|
||||||
dnl
|
dnl
|
||||||
if test "$cross_compiling" = yes ; then
|
if test "$cross_compiling" = yes ; then
|
||||||
|
|
|
@ -14,7 +14,7 @@ INSTALL = @INSTALL@
|
||||||
PROGS= debugfs
|
PROGS= debugfs
|
||||||
MANPAGES= debugfs.8
|
MANPAGES= debugfs.8
|
||||||
|
|
||||||
MK_CMDS= _SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds
|
MK_CMDS= _SS_DIR_OVERRIDE=$(srcdir)/../lib/ss ../lib/ss/mk_cmds
|
||||||
|
|
||||||
DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
|
DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
|
||||||
lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o \
|
lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o \
|
||||||
|
|
|
@ -34,7 +34,7 @@ PROFILED_DEPLIBS= $(DEPPROFILED_LIBSUPPORT) $(PROFILED_LIBEXT2FS) \
|
||||||
$(DEPPROFILED_LIBCOM_ERR) $(DEPPROFILED_LIBBLKID) \
|
$(DEPPROFILED_LIBCOM_ERR) $(DEPPROFILED_LIBBLKID) \
|
||||||
$(DEPPROFILED_LIBUUID) $(DEPPROFILED_LIBE2P)
|
$(DEPPROFILED_LIBUUID) $(DEPPROFILED_LIBE2P)
|
||||||
|
|
||||||
COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
|
COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../lib/et/et ../lib/et/compile_et
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(E) " CC $<"
|
$(E) " CC $<"
|
||||||
|
|
|
@ -140,7 +140,7 @@ uninstall::
|
||||||
check:: compile_et
|
check:: compile_et
|
||||||
for i in $(srcdir)/test_cases/*.et ; do \
|
for i in $(srcdir)/test_cases/*.et ; do \
|
||||||
t=`basename $$i | sed -e 's/.et//'`; \
|
t=`basename $$i | sed -e 's/.et//'`; \
|
||||||
./compile_et --build-tree $$i ; \
|
_ET_DIR_OVERRIDE=$(srcdir) ./compile_et $$i ; \
|
||||||
diff -c $(srcdir)/test_cases/$$t.c $$t.c > $$t.failed; \
|
diff -c $(srcdir)/test_cases/$$t.c $$t.c > $$t.failed; \
|
||||||
if [ $$? -ne 0 ]; then echo Test case $$t failed; exit 1 ; fi ; \
|
if [ $$? -ne 0 ]; then echo Test case $$t failed; exit 1 ; fi ; \
|
||||||
diff -c $(srcdir)/test_cases/$$t.h $$t.h >> $$t.failed; \
|
diff -c $(srcdir)/test_cases/$$t.h $$t.h >> $$t.failed; \
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
|
|
||||||
datarootdir=@datarootdir@
|
datarootdir=@datarootdir@
|
||||||
AWK=@AWK@
|
AWK=@AWK@
|
||||||
DIR="${DIR-@datadir@/et}"
|
DIR=@datadir@/et
|
||||||
ET_DIR="${ET_DIR-@ET_DIR@}"
|
|
||||||
|
|
||||||
if test "$1" = "--build-tree" ; then
|
if test "$1" = "--build-tree" ; then
|
||||||
shift;
|
shift;
|
||||||
|
@ -29,14 +28,14 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if test ! -f "$DIR/et_h.awk" || test ! -f "$DIR/et_c.awk" ; then
|
if test -n "$_ET_DIR_OVERRIDE" ; then
|
||||||
DIR="$ET_DIR"
|
DIR="$_ET_DIR_OVERRIDE";
|
||||||
# echo "Falling back to $DIR..."
|
fi
|
||||||
|
|
||||||
if test ! -f "$DIR/et_h.awk" || test ! -f "$DIR/et_c.awk" ; then
|
if test ! -f "$DIR/et_h.awk" || test ! -f "$DIR/et_c.awk" ; then
|
||||||
echo "compile_et: Couldn't find compile_et's template files."
|
echo "compile_et: Couldn't find compile_et's template files."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
ROOT=`echo $1 | sed -e s/.et$//`
|
ROOT=`echo $1 | sed -e s/.et$//`
|
||||||
BASE=`basename $ROOT`
|
BASE=`basename $ROOT`
|
||||||
|
|
|
@ -13,7 +13,8 @@ DEBUGFS_CFLAGS = -I$(srcdir)/../../e2fsck $(ALL_CFLAGS) -DDEBUGFS
|
||||||
|
|
||||||
@DEBUGFS_CMT@DEBUGFS_LIB_OBJS = bb_compat.o inode_io.o write_bb_file.o
|
@DEBUGFS_CMT@DEBUGFS_LIB_OBJS = bb_compat.o inode_io.o write_bb_file.o
|
||||||
|
|
||||||
MK_CMDS= _SS_DIR_OVERRIDE=../ss ../ss/mk_cmds
|
MK_CMDS= _SS_DIR_OVERRIDE=$(srcdir)/../ss ../ss/mk_cmds
|
||||||
|
COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
|
||||||
|
|
||||||
@RESIZER_CMT@RESIZE_LIB_OBJS = dupfs.o
|
@RESIZER_CMT@RESIZE_LIB_OBJS = dupfs.o
|
||||||
@TEST_IO_CMT@TEST_IO_LIB_OBJS = test_io.o
|
@TEST_IO_CMT@TEST_IO_LIB_OBJS = test_io.o
|
||||||
|
@ -254,8 +255,6 @@ all:: ext2fs.pc
|
||||||
@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
|
@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) -fPIC -shared -o elfshared/$*.o -c $<
|
||||||
@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
|
@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS_SHLIB) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $<
|
||||||
|
|
||||||
COMPILE_ET=../et/compile_et --build-tree
|
|
||||||
|
|
||||||
DISTFILES= Makefile *.c *.h image
|
DISTFILES= Makefile *.c *.h image
|
||||||
|
|
||||||
ext2_err.et: $(DEP_SUBSTITUTE) $(srcdir)/ext2_err.et.in
|
ext2_err.et: $(DEP_SUBSTITUTE) $(srcdir)/ext2_err.et.in
|
||||||
|
|
|
@ -28,8 +28,8 @@ BSDLIB_MYDIR = ss
|
||||||
BSDLIB_INSTALL_DIR = $(root_libdir)
|
BSDLIB_INSTALL_DIR = $(root_libdir)
|
||||||
|
|
||||||
TAGS=etags
|
TAGS=etags
|
||||||
COMPILE_ET=../et/compile_et --build-tree
|
MK_CMDS= _SS_DIR_OVERRIDE=$(srcdir) ./mk_cmds
|
||||||
MK_CMDS=_SS_DIR_OVERRIDE=. ./mk_cmds
|
COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(E) " CC $<"
|
$(E) " CC $<"
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
datarootdir=@datarootdir@
|
datarootdir=@datarootdir@
|
||||||
DIR="${DIR-@datadir@/ss}"
|
DIR=@datadir@/ss
|
||||||
SS_DIR="@SS_DIR@"
|
|
||||||
AWK=@AWK@
|
AWK=@AWK@
|
||||||
SED=@SED@
|
SED=@SED@
|
||||||
|
|
||||||
|
@ -30,13 +29,9 @@ if test -n "$_SS_DIR_OVERRIDE" ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test ! -f $DIR/ct_c.sed || test ! -f $DIR/ct_c.awk ; then
|
if test ! -f $DIR/ct_c.sed || test ! -f $DIR/ct_c.awk ; then
|
||||||
DIR="$SS_DIR"
|
|
||||||
# echo "Falling back to $DIR..."
|
|
||||||
if test ! -f "$DIR/ct_c.sed" || test ! -f "$DIR/ct_c.awk" ; then
|
|
||||||
echo "mk_cmds: Couldn't find mk_cmds's template files."
|
echo "mk_cmds: Couldn't find mk_cmds's template files."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
FILE="$1"
|
FILE="$1"
|
||||||
ROOT=`echo $1 | sed -e s/.ct$//`
|
ROOT=`echo $1 | sed -e s/.ct$//`
|
||||||
|
|
|
@ -41,7 +41,7 @@ LIBDIR= support
|
||||||
@MAKEFILE_LIBRARY@
|
@MAKEFILE_LIBRARY@
|
||||||
@MAKEFILE_PROFILE@
|
@MAKEFILE_PROFILE@
|
||||||
|
|
||||||
COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
|
COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../et ../et/compile_et
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(E) " CC $<"
|
$(E) " CC $<"
|
||||||
|
|
|
@ -115,7 +115,7 @@ STATIC_DEPLIBS= $(DEPLIBSUPPORT) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
|
||||||
LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR)
|
LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR)
|
||||||
DEPLIBS_E2P= $(LIBE2P) $(DEPLIBCOM_ERR)
|
DEPLIBS_E2P= $(LIBE2P) $(DEPLIBCOM_ERR)
|
||||||
|
|
||||||
COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
|
COMPILE_ET= _ET_DIR_OVERRIDE=$(srcdir)/../lib/et/et ../lib/et/compile_et
|
||||||
|
|
||||||
# This nastyness is needed because of jfs_user.h hackery; when we finally
|
# This nastyness is needed because of jfs_user.h hackery; when we finally
|
||||||
# clean up this mess, we should be able to drop it
|
# clean up this mess, we should be able to drop it
|
||||||
|
|
|
@ -11,7 +11,7 @@ INSTALL = @INSTALL@
|
||||||
|
|
||||||
@MCONFIG@
|
@MCONFIG@
|
||||||
|
|
||||||
MK_CMDS= _SS_DIR_OVERRIDE=../../lib/ss ../../lib/ss/mk_cmds
|
MK_CMDS= _SS_DIR_OVERRIDE=$(srcdir)/../../lib/ss ../../lib/ss/mk_cmds
|
||||||
|
|
||||||
PROGS= test_icount crcsum
|
PROGS= test_icount crcsum
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ANDROID_GENERATED_FILES="lib/ext2fs/ext2_err.c lib/ext2fs/ext2_err.h \
|
||||||
SS_DIR=$(pwd)/lib/ss
|
SS_DIR=$(pwd)/lib/ss
|
||||||
MK_CMDS=/tmp/mk_cmds$$.sh
|
MK_CMDS=/tmp/mk_cmds$$.sh
|
||||||
|
|
||||||
sed -e "s;@SS_DIR@;$SS_DIR;" < $SS_DIR/mk_cmds.sh.in \
|
sed -e "s/@AWK@/awk/" < $SS_DIR/mk_cmds.sh.in \
|
||||||
| sed -e "s/@AWK@/awk/" | sed -e "s/@SED@/sed/" > $MK_CMDS
|
| sed -e "s/@SED@/sed/" > $MK_CMDS
|
||||||
|
|
||||||
sed -e "s/@E2FSPROGS_VERSION@/$(git describe)/" < lib/ext2fs/ext2_err.et.in > lib/ext2fs/ext2_err.et
|
sed -e "s/@E2FSPROGS_VERSION@/$(git describe)/" < lib/ext2fs/ext2_err.et.in > lib/ext2fs/ext2_err.et
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ done
|
||||||
for i in lib/ss/std_rqs debugfs/debug_cmds debugfs/ro_debug_cmds \
|
for i in lib/ss/std_rqs debugfs/debug_cmds debugfs/ro_debug_cmds \
|
||||||
debugfs/extent_cmds
|
debugfs/extent_cmds
|
||||||
do
|
do
|
||||||
/bin/sh $MK_CMDS $i.ct
|
_SS_DIR_OVERRIDE=lib/ss /bin/sh $MK_CMDS $i.ct
|
||||||
mv -f $(basename $i).c $i.c
|
mv -f $(basename $i).c $i.c
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
AWK @AWK@
|
AWK @AWK@
|
||||||
SED @SED@
|
SED @SED@
|
||||||
ET_DIR @ET_DIR@
|
|
||||||
SS_DIR @SS_DIR@
|
|
||||||
E2FSPROGS_MONTH @E2FSPROGS_MONTH@
|
E2FSPROGS_MONTH @E2FSPROGS_MONTH@
|
||||||
E2FSPROGS_YEAR @E2FSPROGS_YEAR@
|
E2FSPROGS_YEAR @E2FSPROGS_YEAR@
|
||||||
E2FSPROGS_VERSION @E2FSPROGS_VERSION@
|
E2FSPROGS_VERSION @E2FSPROGS_VERSION@
|
||||||
|
|
Loading…
Reference in New Issue