Skip to contentSkip to conversation

patch for cups which had some build bugs in former version and update to autotargets

Buildroot New Marcus Osdoba 1 participant 2 messages Sep 30, 2010

lore
Share & tools
lore
#0 lore raw

Hi mailinglist,

the former version of cups in br installed its libraries under usr/lib64 (at least if building on 64bit host)
which made cups not work by plain run through

this patch coverts cups to autotargets and updates to new version 1.4.4

furthermore the init.d skript was named cups - inittab launches a skript which starts all S* skripts in init.d, so cups need to be prefixed with S?? too

Regards,
Ossy

#1 lore raw

PATCH 1/1 cups: updating to version 1.4.x and autotargets

this patch introduces
- new version 1.4.4

this patch fixes
- do not install libs under target/usr/lib64
- rename etc/init.d-skript from cups->S89cups (which makes it run by default inittab)
- build only 32bit (need to be sure if building on 64bit hosts)

problems encountered
- this version still builds some executables, which are launched during the build process, if cross comiling, this won't work
e.g. man2html -> modifying former patch from cups 1.3.x
- ppdc runs during build process, this is not desired for cross compiling, Open Embedded solved these issues with switching off these optional features, patches for switching off running ppdc on host were borrowed from OE

---
 package/cups/cups-configure.patch                 |  117 ++++++++++++++++++
 package/cups/cups-fix-stack-protector-check.patch |   25 ----
 package/cups/cups-mantohtml.patch                 |    8 +-
 package/cups/cups-no-tests-man.patch              |   13 --
 package/cups/cups-skip-tools.patch                |   51 ++++++++
 package/cups/cups.mk                              |  132 ++++++---------------
 6 files changed, 209 insertions(+), 137 deletions(-)
 create mode 100644 package/cups/cups-configure.patch
 delete mode 100644 package/cups/cups-fix-stack-protector-check.patch
 delete mode 100644 package/cups/cups-no-tests-man.patch
 create mode 100644 package/cups/cups-skip-tools.patch
package/cups/cups-configure.patch new file +117 -0
new file mode 100644
index 0000000..877e8d3
@@ -0,0 +1,117 @@
+--- cups-1.4.3/configure.orig	2010-04-08 11:14:19.092296014 +0200
++++ cups-1.4.3/configure	2010-04-08 11:19:02.661417938 +0200
+@@ -10940,114 +10940,6 @@
+     		OPTIM="-fPIC $OPTIM"
+ 	fi
+ 
+-	# The -fstack-protector option is available with some versions of
+-	# GCC and adds "stack canaries" which detect when the return address
+-	# has been overwritten, preventing many types of exploit attacks.
+-	{ echo "$as_me:$LINENO: checking if GCC supports -fstack-protector" >&5
+-echo $ECHO_N "checking if GCC supports -fstack-protector... $ECHO_C" >&6; }
+-	OLDCFLAGS="$CFLAGS"
+-	CFLAGS="$CFLAGS -fstack-protector"
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_link") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest$ac_exeext &&
+-       $as_test_x conftest$ac_exeext; then
+-  OPTIM="$OPTIM -fstack-protector"
+-		{ echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	{ echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+-      conftest$ac_exeext conftest.$ac_ext
+-	CFLAGS="$OLDCFLAGS"
+-
+-	# The -pie option is available with some versions of GCC and adds
+-	# randomization of addresses, which avoids another class of exploits
+-	# that depend on a fixed address for common functions.
+-	{ echo "$as_me:$LINENO: checking if GCC supports -pie" >&5
+-echo $ECHO_N "checking if GCC supports -pie... $ECHO_C" >&6; }
+-	OLDCFLAGS="$CFLAGS"
+-	CFLAGS="$CFLAGS -pie -fPIE"
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_c_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  PIEFLAGS="-pie -fPIE"
+-		{ echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	{ echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-	CFLAGS="$OLDCFLAGS"
+-
+ 	if test "x$with_optim" = x; then
+ 		# Add useful warning options for tracking down problems...
+ 		OPTIM="-Wall -Wno-format-y2k $OPTIM"
package/cups/cups-fix-stack-protector-check.patch deleted +0 -25
deleted file mode 100644
index 1db35ff..0000000
@@ -1,25 +0,0 @@
-[PATCH]: use AC_TRY_LINK for stack protector check
-
-Actually try to link an executable to test for stack protector support,
-as gcc seems to accept the -fstack-protector argument even when it's
-compiled with --disable-libssp (but linking fails with a error
-finding -lssp_nonshared).
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- config-scripts/cups-compiler.m4 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: cups-1.3.9/config-scripts/cups-compiler.m4
-===================================================================
---- cups-1.3.9.orig/config-scripts/cups-compiler.m4
-+++ cups-1.3.9/config-scripts/cups-compiler.m4
-@@ -109,7 +109,7 @@ if test -n "$GCC"; then
- 	AC_MSG_CHECKING(if GCC supports -fstack-protector)
- 	OLDCFLAGS="$CFLAGS"
- 	CFLAGS="$CFLAGS -fstack-protector"
--	AC_TRY_COMPILE(,,
-+	AC_TRY_LINK(,,
- 		OPTIM="$OPTIM -fstack-protector"
- 		AC_MSG_RESULT(yes),
- 		AC_MSG_RESULT(no))
package/cups/cups-mantohtml.patch +4 -4
index e6a10b0..0b24573 100644
@@ -1,10 +1,10 @@
---- cups-1.3.5/man/Makefile	2007-07-12 21:01:14.000000000 -0400
-+++ cups-1.3.5/man/Makefile	2008-02-11 08:55:24.000000000 -0500
-@@ -173,7 +173,7 @@ html:	$(MAN1) $(MAN5) $(MAN7) $(MAN8) ma
+--- cups-1.4.4.orig/man/Makefile	2007-07-12 21:01:14.000000000 -0400
++++ cups-1.4.4/man/Makefile	2008-02-11 08:55:24.000000000 -0500
+@@ -230,7 +230,7 @@ html:	$(MAN1) $(MAN5) $(MAN7) $(MAN8) ma
  	done
  
  mantohtml:	mantohtml.o
--	$(CC) $(LDFLAGS) -o $@ mantohtml.o
+-	$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ mantohtml.o
 +	gcc -I/usr/include -I../ -L/usr/lib mantohtml.c -o mantohtml
  
  
package/cups/cups-no-tests-man.patch deleted +0 -13
deleted file mode 100644
index 567c801..0000000
@@ -1,13 +0,0 @@
---- cups-1.3.5/Makefile	2007-12-06 15:09:39.000000000 -0500
-+++ cups-1.3.5/Makefile	2008-02-09 21:53:03.000000000 -0500
-@@ -19,8 +19,8 @@ include Makedefs
- # Directories to make...
- #
- 
--DIRS	=	cups backend berkeley cgi-bin filter locale man monitor \
--		notifier $(PDFTOPS) scheduler systemv test \
-+DIRS	=	cups backend berkeley cgi-bin filter locale monitor \
-+		notifier $(PDFTOPS) scheduler systemv \
- 		$(PHPDIR) \
- 		conf data doc $(FONTS) ppd templates
- 
package/cups/cups-skip-tools.patch new file +51 -0

51 lines not on this page · raw message

package/cups/cups.mk +37 -95

158 lines not on this page · raw message

Signature · 1 line
1.7.1