From 1b4e784a0ba636646def1db5ca012fd54ee7a81c Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 6 Jun 2017 20:06:04 -0700 Subject: Fix debuild warnings/errors - Update .gitignore, do not place .gitignore into directories installed in bulk - Remove executable permissions and shebangs from the scripts that are supposed to be invoked only via ct-ng frontent; prepend them with $(bash). Despite what showSamples.sh said, it already has some bashisms. - Remove --with autotools-dev and override dh_update_autotools_config to avoid having config.{sub,guess} clobbered with older versions - Install bash completion where Debian (now) expects it - Update man page to use .\" as the comment delimiter, instead of undefined macro (."); also, minor text edits. - Install kconfig.mk without execute permission. - Remove shell wrappers from 170-localedef-fix-trampoline.patch, we do not use that for applying patches - Revoke execute permissions on 210-expat.sh - Get flags from dpkg-buildflags if available Signed-off-by: Alexey Neyman diff --git a/.gitignore b/.gitignore index 1bdd197..d12732a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ config.status !ct-ng.in paths.* !paths.in +config/configure.in config/gen/ .config diff --git a/Makefile.in b/Makefile.in index 4980346..0cec737 100644 --- a/Makefile.in +++ b/Makefile.in @@ -145,7 +145,7 @@ install: build real-install clean: $(patsubst %,clean-%,$(TARGETS)) distclean: clean - $(call __silent_rm,Makefile config/configure.in) + $(call __silent_rm,Makefile kconfig/Makefile config/configure.in) mrproper: distclean $(call __silent_rmdir,autom4te.cache config/gen) @@ -164,7 +164,6 @@ build-bin: $(PROG_NAME) \ scripts/crosstool-NG.sh \ scripts/saveSample.sh \ scripts/showConfig.sh - $(call __silent,CHMOD,$^)chmod 755 $^ build-lib: paths.mk \ paths.sh @@ -274,7 +273,7 @@ install-lib: $(DESTDIR)$(libdir) \ LIB_SUB_DIR := config contrib patches scripts $(patsubst %,install-lib-%-copy,$(LIB_SUB_DIR)): install-lib-%-copy: $(DESTDIR)$(libdir) - $(call __silent,INSTDIR,$*)tar cf - --exclude='*.sh.in' --exclude='*.in.in' $* \ + $(call __silent,INSTDIR,$*)tar cf - --exclude='*.sh.in' --exclude='*.in.in' --exclude=.gitignore $* \ |(cd "$(DESTDIR)$(libdir)"; tar xf -) # Dependency-only by default. diff --git a/config/.gitignore b/config/.gitignore deleted file mode 100644 index b249ba2..0000000 --- a/config/.gitignore +++ /dev/null @@ -1 +0,0 @@ -configure.in diff --git a/configure.ac b/configure.ac index 869226c..4f7d3d3 100644 --- a/configure.ac +++ b/configure.ac @@ -371,6 +371,8 @@ ACX_SET_KCONFIG_OPTION([svn]) AC_CHECK_PROGS([git], [git]) ACX_SET_KCONFIG_OPTION([git]) +AC_CHECK_PROGS([DPKG_BUILDFLAGS], [dpkg-buildflags]) + #-------------------------------------------------------------------- # Now, for some fun... #-------------------------------------------------------------------- @@ -465,5 +467,5 @@ AS_IF( #-------------------------------------------------------------------- # Finally, generate the output file(s) #-------------------------------------------------------------------- -AC_CONFIG_FILES([Makefile config/configure.in]) +AC_CONFIG_FILES([Makefile kconfig/Makefile config/configure.in]) AC_OUTPUT diff --git a/ct-ng.in b/ct-ng.in index 09ba89c..cf2edd1 100644 --- a/ct-ng.in +++ b/ct-ng.in @@ -140,10 +140,10 @@ show-tuple: .config # Actual build source: .config - $(SILENT)CT_SOURCE=y $(CT_LIB_DIR)/scripts/crosstool-NG.sh + $(SILENT)CT_SOURCE=y $(bash) $(CT_LIB_DIR)/scripts/crosstool-NG.sh build: .config - $(SILENT)$(CT_LIB_DIR)/scripts/crosstool-NG.sh + $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/crosstool-NG.sh build.%: $(SILENT)$(MAKE) -rf $(CT_NG) build CT_JOBS=$* diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..fcb77d2 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,6 @@ +.debhelper +*.log +*.substvars +crosstool-ng +debhelper-build-stamp +files diff --git a/debian/rules b/debian/rules index 9315284..b8fd445 100755 --- a/debian/rules +++ b/debian/rules @@ -19,7 +19,7 @@ include /usr/share/dpkg/default.mk # main packaging script based on dh7 syntax %: - MAKELEVEL=0 dh $@ --with autotools-dev + MAKELEVEL=0 dh $@ # Make sure we call ./bootstrap before running dh_auto_configure override_dh_auto_configure: @@ -29,4 +29,7 @@ override_dh_auto_configure: #Make sure to include bash completion file in the package override_dh_auto_install: MAKELEVEL=0 dh_auto_install - install -D ct-ng.comp $$(pwd)/debian/crosstool-ng/etc/bash_completion.d/ct-ng.comp + install -D -m 0644 ct-ng.comp $$(pwd)/debian/crosstool-ng/usr/share/bash-completion/completions/ct-ng.comp + +override_dh_update_autotools_config: + @: diff --git a/docs/ct-ng.1.in b/docs/ct-ng.1.in index 65a0b0e..4630f30 100644 --- a/docs/ct-ng.1.in +++ b/docs/ct-ng.1.in @@ -1,21 +1,21 @@ -." crosstool-NG man page -." Copyright 2007 Yann E. MORIN -." Licensed under the Creative Commons BY-SA, v2.5 -." -." Beautifying URLs +.\" crosstool-NG man page +.\" Copyright 2007 Yann E. MORIN +.\" Licensed under the Creative Commons BY-SA, v2.5 +.\" +.\" Beautifying URLs .mso www.tmac -." +.\" .TH crosstool-NG 1 "@@CT_DATE@@" "version @@CT_VERSION@@" "User Commands" -." -." +.\" +.\" .SH NAME @@CT_PROG_NAME@@, crosstool-NG \- Build cross-toolchains -." -." +.\" +.\" .SH SYNOPSIS .B @@CT_PROG_NAME@@ ACTION -." -." +.\" +.\" .SH DESCRIPTION Building a cross-toolchain can be a real pain. .PP @@ -23,27 +23,28 @@ Building a cross-toolchain can be a real pain. makes it easy to build cross-toolchains, and allows you to take all the juice out of your target by configuring the different components of the toolchain according to the targeted processor. -." -." +.\" +.\" .SH ACTIONS -Here are the most commonly used actions. For other actions, please see -.I "@@CT_DOCDIR@@/0 - Table of content.txt" +Here are the most commonly used actions. For other actions, please see the +documentation in +.I @@CT_DOCDIR@@ .TP .B help Prints a little help text. -." +.\" .TP .B menuconfig Configures .B crosstool-NG using a configurator menu very similar to that of the Linux kernel. -." +.\" .TP .B oldconfig Apply options found in an existing .I .config file, and ask for newer options if there are any. -." +.\" .TP .B saveconfig Save the current @@ -51,14 +52,10 @@ Save the current configuration, and associated components' config files, into a sample. Samples are saved in their own sub-directory, named after the target's tuple, in the .I samples -sub-directory of the current directory. -If that was not clear: -.I `pwd`/samples/${CT_TARGET}/ - -Samples can be later recalled by calling +sub-directory of the current directory. Samples can be later recalled by calling .B @@CT_PROG_NAME@@ with the target tuple they represent. -." +.\" .TP .B savedefconfig Save the current configuration to a mini-defconfig file, that contains only @@ -85,7 +82,7 @@ is saved. Config files for the components are saved. Use .B saveconfig for that -." +.\" .TP .B defconfig Configure @@ -99,17 +96,17 @@ unless the variable is set, in which case the mini-defconfig will be read from the file referenced by .B $DEFCONFIG -." +.\" .TP .B build Builds the configured toolchain. -." +.\" .TP .B clean Remove files generated by .B crosstool-NG for itself (these are mostly the configurators' binaries). -." +.\" .TP .B distclean Same as @@ -118,14 +115,14 @@ Same as .I .config configuration file. The generated toolchain is left untouched, as well as samples which are not removed. -." +.\" .TP .B regtest Calls the .B crosstool-NG regression test suite. All samples are build, and the regression test suite is run against every one of them. -." +.\" .TP .B updatetools Updates the @@ -135,7 +132,7 @@ and scripts. These scripts are used by .B crosstool-NG to canonicalise the machines' name (host, build and target machines). -." +.\" .SH ENVIRONMENT .TP .B STOP, RESTART @@ -144,7 +141,7 @@ step, a previous build should have run at least to that step, or further. The list of steps is viewable with the action .BR list-steps . -." +.\" .SH EXIT VALUE The .B @@CT_PROG_NAME@@ @@ -153,19 +150,7 @@ frontend is in fact a script. See the man page for .BR make (1) to have the meaning of the exit values. -." -.SH BUGS -As of today (@@CT_DATE@@), building tarballs is broken. It is difficult to -foresee how all parts of -.B crosstool-NG -are going to be installed. Each part is needed to build a tarball, as it -contains all that is needed to rebuild the toolchain from scratch: toolchain -components' sources, -.B crosstool-NG -configuration, but also all -.B crosstool-NG -scripts. -." +.\" .SH SECURITY .B Don't run as root! Great care has been taken to avoid mistakes, but bug-free programs don't @@ -179,15 +164,13 @@ entire important directories could be removed (eg. although .B crosstool-NG will refuse to install toolchains in some well known critical directories. -." +.\" .SH AUTHORS -Please consult the file -.I @@CT_DOCDIR@@/A - Credits.txt -for a list of contributors. -." +Yann E. MORIN and a lot of contributors. +.\" .SH SEE ALSO You can find more in-depth documentation in -.IR "@@CT_DOCDIR@@/0 - Table of content.txt" . +.IR "@@CT_DOCDIR@@" . Please have a look at the .URL "http://www.kegel.com/crosstool" "original crosstool" " by Daniel KEGEL" diff --git a/kconfig/.gitignore b/kconfig/.gitignore index 7f79a8d..473d174 100644 --- a/kconfig/.gitignore +++ b/kconfig/.gitignore @@ -6,3 +6,4 @@ zconf.lex.c zconf.hash.c zconf.tab.c *.exe +Makefile diff --git a/kconfig/Makefile b/kconfig/Makefile deleted file mode 100644 index 4a33ac8..0000000 --- a/kconfig/Makefile +++ /dev/null @@ -1,115 +0,0 @@ -#----------------------------------------------------------- -# Hmmm! Cheesy build! -# Or: where I can unveil my make-fu... :-] - -__silent = $(if $(V),,@printf ' %-7s %s\n' '$1' '$(if $2,$2,$(strip $<))' && ) -__silent_rm = $(call __silent,RM,$1)rm -f $1 - -PROGS = conf mconf nconf - -all: $(PROGS) - @true # Just be silent, you fscking son of a fscking beach... - -# Build flags -CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\"" \ - -DGPERF_LEN_TYPE="$(gperf_len_type)" -LDFLAGS = $(INTL_LIBS) - -# Compiler flags to use gettext -ifeq ($(gettext),) -INTL_CFLAGS = -Wno-format-security -DKBUILD_NO_NLS -endif - -# Compiler and linker flags to use ncurses -NCURSES_CFLAGS = -DCURSES_LOC="\"$(curses_hdr)\"" -NCURSES_LDFLAGS = $(LIBS) - -# Common source files -COMMON_SRC = zconf.tab.c -COMMON_OBJ = $(patsubst %.c,%.o,$(COMMON_SRC)) -COMMON_DEP = $(patsubst %.o,%.dep,$(COMMON_OBJ)) -$(COMMON_OBJ) $(COMMON_DEP): CFLAGS += $(INTL_CFLAGS) -I. - -# lxdialog source files -LX_SRC = $(sort $(wildcard lxdialog/*.c)) -LX_OBJ = $(patsubst %.c,%.o,$(LX_SRC)) -LX_DEP = $(patsubst %.o,%.dep,$(LX_OBJ)) -$(LX_OBJ) $(LX_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS) - -# What's needed to build 'conf' -conf_SRC = conf.c -conf_OBJ = $(patsubst %.c,%.o,$(conf_SRC)) -conf_DEP = $(patsubst %.o,%.dep,$(conf_OBJ)) -$(conf_OBJ) $(conf_DEP): CFLAGS += $(INTL_CFLAGS) - -# What's needed to build 'mconf' -mconf_SRC = mconf.c -mconf_OBJ = $(patsubst %.c,%.o,$(mconf_SRC)) -mconf_DEP = $(patsubst %.c,%.dep,$(mconf_SRC)) -$(mconf_OBJ) $(mconf_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS) -mconf: LDFLAGS += $(NCURSES_LDFLAGS) - -# What's needed to build 'nconf' -nconf_SRC = nconf.c nconf.gui.c -nconf_OBJ = $(patsubst %.c,%.o,$(nconf_SRC)) -nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC)) -$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/include/ncurses -nconf: LDFLAGS += -lmenu -lpanel $(LIBS) - -# These are generated files: -ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ) $(nconf_OBJ)) -ALL_DEPS = $(sort $(COMMON_DEP) $(LX_DEP) $(conf_DEP) $(mconf_DEP) $(nconf_DEP)) - -# Cheesy auto-dependencies -DEPS = $(COMMON_DEP) -DEPS += $(conf_DEP) -DEPS += $(mconf_DEP) $(LX_DEP) -DEPS += $(nconf_DEP) --include $(DEPS) - -# Build the dependency for C files -%.dep: %.c - $(call __silent,DEP,$@)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MM $< |$(sed) -r -e 's|([^:]+.o)( *:+)|$(<:.c=.o) $@\2|;' >$@ - -# Generate the grammar parser -zconf.tab.o: zconf.tab.c zconf.hash.c zconf.lex.c -zconf.tab.dep: zconf.tab.c zconf.hash.c zconf.lex.c - -.PRECIOUS: zconf.tab.c -zconf.tab.c: zconf.y - $(call __silent,BISON)bison -l -b zconf -p zconf $< - -zconf.hash.c: zconf.gperf - $(call __silent,GPERF)$(gperf) -C < $< > $@ - -zconf.lex.c: zconf.l - $(call __silent,LEX)flex -L -Pzconf -o$@ $< - -# Build C files -%.o: %.c - $(call __silent,CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $< - -# Actual link -mconf: $(COMMON_OBJ) $(LX_OBJ) $(mconf_OBJ) - $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) - -nconf: $(COMMON_OBJ) $(nconf_OBJ) - $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) - -conf: $(COMMON_OBJ) $(conf_OBJ) - $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) - -#----------------------------------------------------------- -# Installation -install: $(patsubst %,install-%,$(PROGS)) install-kconfig.mk - -install-%: % - $(call __silent,INSTALL,$<)install $< $(DESTDIR)/$< - -#----------------------------------------------------------- -# Cleaning up the mess... - -clean: - $(call __silent,RM,objs)rm -f $(ALL_OBJS) $(ALL_DEPS) - $(call __silent_rm,$(PROGS)) - $(call __silent_rm,zconf.tab.c zconf.hash.c zconf.lex.c lex.backup) diff --git a/kconfig/Makefile.in b/kconfig/Makefile.in new file mode 100644 index 0000000..403d04b --- /dev/null +++ b/kconfig/Makefile.in @@ -0,0 +1,124 @@ +#----------------------------------------------------------- +# Hmmm! Cheesy build! +# Or: where I can unveil my make-fu... :-] + +__silent = $(if $(V),,@printf ' %-7s %s\n' '$1' '$(if $2,$2,$(strip $<))' && ) +__silent_rm = $(call __silent,RM,$1)rm -f $1 + +PROGS = conf mconf nconf + +all: $(PROGS) + @true # Just be silent, you fscking son of a fscking beach... + +# Build flags +CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\"" \ + -DGPERF_LEN_TYPE="$(gperf_len_type)" +LDFLAGS = $(INTL_LIBS) + +ifneq (@DPKG_BUILDFLAGS@,) +CFLAGS += $(shell @DPKG_BUILDFLAGS@ --get CPPFLAGS) \ + $(shell @DPKG_BUILDFLAGS@ --get CFLAGS) +LDFLAGS += $(shell @DPKG_BUILDFLAGS@ --get LDFLAGS) +endif + +# Compiler flags to use gettext +ifeq ($(gettext),) +INTL_CFLAGS = -Wno-format-security -DKBUILD_NO_NLS +endif + +# Compiler and linker flags to use ncurses +NCURSES_CFLAGS = -DCURSES_LOC="\"$(curses_hdr)\"" +NCURSES_LDFLAGS = $(LIBS) + +# Common source files +COMMON_SRC = zconf.tab.c +COMMON_OBJ = $(patsubst %.c,%.o,$(COMMON_SRC)) +COMMON_DEP = $(patsubst %.o,%.dep,$(COMMON_OBJ)) +$(COMMON_OBJ) $(COMMON_DEP): CFLAGS += $(INTL_CFLAGS) -I. + +# lxdialog source files +LX_SRC = $(sort $(wildcard lxdialog/*.c)) +LX_OBJ = $(patsubst %.c,%.o,$(LX_SRC)) +LX_DEP = $(patsubst %.o,%.dep,$(LX_OBJ)) +$(LX_OBJ) $(LX_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS) + +# What's needed to build 'conf' +conf_SRC = conf.c +conf_OBJ = $(patsubst %.c,%.o,$(conf_SRC)) +conf_DEP = $(patsubst %.o,%.dep,$(conf_OBJ)) +$(conf_OBJ) $(conf_DEP): CFLAGS += $(INTL_CFLAGS) + +# What's needed to build 'mconf' +mconf_SRC = mconf.c +mconf_OBJ = $(patsubst %.c,%.o,$(mconf_SRC)) +mconf_DEP = $(patsubst %.c,%.dep,$(mconf_SRC)) +$(mconf_OBJ) $(mconf_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS) +mconf: LDFLAGS += $(NCURSES_LDFLAGS) + +# What's needed to build 'nconf' +nconf_SRC = nconf.c nconf.gui.c +nconf_OBJ = $(patsubst %.c,%.o,$(nconf_SRC)) +nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC)) +$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/include/ncurses +nconf: LDFLAGS += -lmenu -lpanel $(LIBS) + +# These are generated files: +ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ) $(nconf_OBJ)) +ALL_DEPS = $(sort $(COMMON_DEP) $(LX_DEP) $(conf_DEP) $(mconf_DEP) $(nconf_DEP)) + +# Cheesy auto-dependencies +DEPS = $(COMMON_DEP) +DEPS += $(conf_DEP) +DEPS += $(mconf_DEP) $(LX_DEP) +DEPS += $(nconf_DEP) +-include $(DEPS) + +# Build the dependency for C files +%.dep: %.c + $(call __silent,DEP,$@)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MM $< |$(sed) -r -e 's|([^:]+.o)( *:+)|$(<:.c=.o) $@\2|;' >$@ + +# Generate the grammar parser +zconf.tab.o: zconf.tab.c zconf.hash.c zconf.lex.c +zconf.tab.dep: zconf.tab.c zconf.hash.c zconf.lex.c + +.PRECIOUS: zconf.tab.c +zconf.tab.c: zconf.y + $(call __silent,BISON)bison -l -b zconf -p zconf $< + +zconf.hash.c: zconf.gperf + $(call __silent,GPERF)$(gperf) -C < $< > $@ + +zconf.lex.c: zconf.l + $(call __silent,LEX)flex -L -Pzconf -o$@ $< + +# Build C files +%.o: %.c + $(call __silent,CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $< + +# Actual link +mconf: $(COMMON_OBJ) $(LX_OBJ) $(mconf_OBJ) + $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) + +nconf: $(COMMON_OBJ) $(nconf_OBJ) + $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) + +conf: $(COMMON_OBJ) $(conf_OBJ) + $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) + +#----------------------------------------------------------- +# Installation +install: $(patsubst %,install-%,$(PROGS)) install-kconfig.mk + +$(patsubst %,install-%,$(PROGS)): install-%: % + $(call __silent,INSTALL,$<)install -m 0755 $< $(DESTDIR)/$< + +install-kconfig.mk: kconfig.mk + $(call __silent,INSTALL,$<)install -m 0644 $< $(DESTDIR)/$< + +#----------------------------------------------------------- +# Cleaning up the mess... + +clean: + $(call __silent,RM,objs)rm -f $(ALL_OBJS) $(ALL_DEPS) + $(call __silent_rm,$(PROGS)) + $(call __silent_rm,zconf.tab.c zconf.hash.c zconf.lex.c lex.backup) diff --git a/patches/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch index 0e05844..fb0881d 100644 --- a/patches/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch +++ b/patches/glibc/ports-2.12.1/170-localedef-fix-trampoline.patch @@ -1,5 +1,3 @@ -#! /bin/sh -e - # DP: Description: Fix localedef segfault when run under exec-shield, # PaX or similar. (#231438, #198099) # DP: Dpatch Author: James Troup @@ -7,20 +5,6 @@ # DP: Upstream status: Unknown # DP: Status Details: Unknown # DP: Date: 2004-03-16 - -if [ $# -ne 2 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - diff -durN glibc-2.12.1.orig/locale/programs/3level.h glibc-2.12.1/locale/programs/3level.h --- glibc-2.12.1.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 +++ glibc-2.12.1/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 diff --git a/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch index 4784a07..3cc6559 100644 --- a/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch +++ b/patches/glibc/ports-2.13/170-localedef-fix-trampoline.patch @@ -1,5 +1,3 @@ -#! /bin/sh -e - # DP: Description: Fix localedef segfault when run under exec-shield, # PaX or similar. (#231438, #198099) # DP: Dpatch Author: James Troup @@ -7,20 +5,6 @@ # DP: Upstream status: Unknown # DP: Status Details: Unknown # DP: Date: 2004-03-16 - -if [ $# -ne 2 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h --- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 +++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 diff --git a/patches/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch index 4784a07..3cc6559 100644 --- a/patches/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch +++ b/patches/glibc/ports-2.14.1/170-localedef-fix-trampoline.patch @@ -1,5 +1,3 @@ -#! /bin/sh -e - # DP: Description: Fix localedef segfault when run under exec-shield, # PaX or similar. (#231438, #198099) # DP: Dpatch Author: James Troup @@ -7,20 +5,6 @@ # DP: Upstream status: Unknown # DP: Status Details: Unknown # DP: Date: 2004-03-16 - -if [ $# -ne 2 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h --- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 +++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 diff --git a/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch index 4784a07..3cc6559 100644 --- a/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch +++ b/patches/glibc/ports-2.14/170-localedef-fix-trampoline.patch @@ -1,5 +1,3 @@ -#! /bin/sh -e - # DP: Description: Fix localedef segfault when run under exec-shield, # PaX or similar. (#231438, #198099) # DP: Dpatch Author: James Troup @@ -7,20 +5,6 @@ # DP: Upstream status: Unknown # DP: Status Details: Unknown # DP: Date: 2004-03-16 - -if [ $# -ne 2 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h --- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 +++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 diff --git a/patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch index 4784a07..3cc6559 100644 --- a/patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch +++ b/patches/glibc/ports-2.15/170-localedef-fix-trampoline.patch @@ -1,5 +1,3 @@ -#! /bin/sh -e - # DP: Description: Fix localedef segfault when run under exec-shield, # PaX or similar. (#231438, #198099) # DP: Dpatch Author: James Troup @@ -7,20 +5,6 @@ # DP: Upstream status: Unknown # DP: Status Details: Unknown # DP: Date: 2004-03-16 - -if [ $# -ne 2 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h --- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 +++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 diff --git a/patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch b/patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch index 4784a07..3cc6559 100644 --- a/patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch +++ b/patches/glibc/ports-2.16.0/170-localedef-fix-trampoline.patch @@ -1,5 +1,3 @@ -#! /bin/sh -e - # DP: Description: Fix localedef segfault when run under exec-shield, # PaX or similar. (#231438, #198099) # DP: Dpatch Author: James Troup @@ -7,20 +5,6 @@ # DP: Upstream status: Unknown # DP: Status Details: Unknown # DP: Date: 2004-03-16 - -if [ $# -ne 2 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;; - -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h --- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 +++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 diff --git a/samples/samples.mk b/samples/samples.mk index ce7e7c9..ecd8a15 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -43,7 +43,7 @@ help-env:: PHONY += show-config show-config: .config @cp .config .config.sample - @$(CT_LIB_DIR)/scripts/showSamples.sh -v current + @$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh -v current @rm -f .config.sample # Prints the details of a sample @@ -52,7 +52,7 @@ $(patsubst %,show-%,$(CT_SAMPLES)): show-%: @KCONFIG_CONFIG=$$(pwd)/.config.sample \ $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - @$(CT_LIB_DIR)/scripts/showSamples.sh -v $* + @$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh -v $* @rm -f .config.sample # Prints the details of all samples @@ -76,7 +76,7 @@ $(patsubst %,list-%,$(CT_SAMPLES)): list-%: @KCONFIG_CONFIG=$$(pwd)/.config.sample \ $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - @$(CT_LIB_DIR)/scripts/showSamples.sh $* + @$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh $* @rm -f .config.sample PHONY += list-samples-short @@ -114,16 +114,16 @@ PHONY += wiki-samples wiki-samples: wiki-samples-pre $(patsubst %,wiki-%,$(CT_SAMPLES)) wiki-samples-post wiki-samples-pre: FORCE - $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w + $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh -w wiki-samples-post: FORCE - $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -W $(CT_SAMPLES) + $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh -W $(CT_SAMPLES) $(patsubst %,wiki-%,$(CT_SAMPLES)): wiki-%: $(SILENT)KCONFIG_CONFIG=$$(pwd)/.config.sample \ $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $* + $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh -w $* $(SILENT)rm -f .config.sample # ---------------------------------------------------------- @@ -136,7 +136,7 @@ samples: # Save a sample saveconfig: .config samples - $(SILENT)$(CT_LIB_DIR)/scripts/saveSample.sh + $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/saveSample.sh # The 'sample_dir' function prints the directory in which the sample is, # searching first in local samples, then in global samples diff --git a/scripts/build/companion_libs/210-expat.sh b/scripts/build/companion_libs/210-expat.sh old mode 100755 new mode 100644 diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in index 2eb1f40..d9d999c 100644 --- a/scripts/saveSample.sh.in +++ b/scripts/saveSample.sh.in @@ -1,5 +1,3 @@ -#!@@CT_bash@@ - # This script is responsible for saving the current configuration into a # sample to be used later on as a pre-configured target. diff --git a/scripts/showConfig.sh.in b/scripts/showConfig.sh.in index b439995..9031b3c 100644 --- a/scripts/showConfig.sh.in +++ b/scripts/showConfig.sh.in @@ -1,5 +1,3 @@ -#!@@CT_bash@@ - # What we need: # - the .config file diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh old mode 100755 new mode 100644 index e60e29f..1e5d50b --- a/scripts/showSamples.sh +++ b/scripts/showSamples.sh @@ -1,6 +1,3 @@ -#!/bin/sh -# Yes, this is supposed to be a POSIX-compliant shell script. - # Parses all samples on the command line, and for each of them, prints # the versions of the main tools -- cgit v0.10.2-6-g49f6