From 4bcc0c934c057b869322e1e36705643f4cf22eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Nordstr=C3=B6m?= Date: Mon, 7 Sep 2009 07:42:04 +0000 Subject: [PATCH] Use proper configure options instead of patching in pkgdata etc.. --- squid-3.1.0.13-build.patch | 257 ------------------------------------- squid.spec | 21 ++- 2 files changed, 10 insertions(+), 268 deletions(-) delete mode 100644 squid-3.1.0.13-build.patch diff --git a/squid-3.1.0.13-build.patch b/squid-3.1.0.13-build.patch deleted file mode 100644 index f23b399..0000000 --- a/squid-3.1.0.13-build.patch +++ /dev/null @@ -1,257 +0,0 @@ -diff -up squid-3.1.0.13/errors/Makefile.am.build squid-3.1.0.13/errors/Makefile.am ---- squid-3.1.0.13/errors/Makefile.am.build 2009-08-04 15:32:08.000000000 +0200 -+++ squid-3.1.0.13/errors/Makefile.am 2009-09-04 04:11:29.000000000 +0200 -@@ -3,7 +3,7 @@ - # $Id$ - # - --errordir = $(datadir)/errors -+errordir = $(pkgdatadir)/errors - - ##dist-hook eveything - -diff -up squid-3.1.0.13/errors/Makefile.in.build squid-3.1.0.13/errors/Makefile.in ---- squid-3.1.0.13/errors/Makefile.in.build 2009-08-04 15:32:30.000000000 +0200 -+++ squid-3.1.0.13/errors/Makefile.in 2009-09-04 04:19:05.000000000 +0200 -@@ -221,7 +221,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --errordir = $(datadir)/errors -+errordir = $(pkgdatadir)/errors - DEFAULT_ERROR_DIR = $(errordir) - DEFAULT_STYLESHEET = $(sysconfdir)/errorpage.css - TRANSLATIONPO = `ls -1 $(top_srcdir)/errors/*.po | grep -o -E "[a-z\-]+\.po" | sed s/.po//` -diff -up squid-3.1.0.13/icons/Makefile.am.build squid-3.1.0.13/icons/Makefile.am ---- squid-3.1.0.13/icons/Makefile.am.build 2009-08-04 15:32:10.000000000 +0200 -+++ squid-3.1.0.13/icons/Makefile.am 2009-09-04 04:11:29.000000000 +0200 -@@ -29,7 +29,7 @@ ICONS = anthony-binhex.gif \ - anthony-xbm.gif \ - anthony-xpm.gif - --icondir = $(datadir)/icons -+icondir = $(pkgdatadir)/icons - icon_DATA = $(ICONS) - EXTRA_DIST = $(ICONS) - DISTCLEANFILES = -diff -up squid-3.1.0.13/icons/Makefile.in.build squid-3.1.0.13/icons/Makefile.in ---- squid-3.1.0.13/icons/Makefile.in.build 2009-08-04 15:32:35.000000000 +0200 -+++ squid-3.1.0.13/icons/Makefile.in 2009-09-04 04:19:10.000000000 +0200 -@@ -258,7 +258,7 @@ ICONS = anthony-binhex.gif \ - anthony-xbm.gif \ - anthony-xpm.gif - --icondir = $(datadir)/icons -+icondir = $(pkgdatadir)/icons - icon_DATA = $(ICONS) - EXTRA_DIST = $(ICONS) - DISTCLEANFILES = -diff -up squid-3.1.0.13/src/Makefile.am.build squid-3.1.0.13/src/Makefile.am ---- squid-3.1.0.13/src/Makefile.am.build 2009-08-04 15:32:13.000000000 +0200 -+++ squid-3.1.0.13/src/Makefile.am 2009-09-04 04:18:01.000000000 +0200 -@@ -639,7 +639,9 @@ sysconf_DATA = \ - squid.conf.documented \ - mime.conf.default - --data_DATA = \ -+# This really should be installed where snmpget & friends will find it, -+# not used by Squid as such. -+pkgdata_DATA = \ - mib.txt - - LDADD = $(COMMON_LIBS) -L../lib -lmiscutil @XTRA_LIBS@ @EPOLL_LIBS@ @MINGW_LIBS@ -@@ -712,17 +714,17 @@ DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_ - DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log - DEFAULT_PID_FILE = @DEFAULT_PIDFILE@ - DEFAULT_NETDB_FILE = $(DEFAULT_LOG_PREFIX)/netdb.state --DEFAULT_SWAP_DIR = $(localstatedir)/cache -+DEFAULT_SWAP_DIR = $(localstatedir)/spool/squid - DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` - DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'` - DEFAULT_DISKD = $(libexecdir)/`echo diskd | sed '$(transform);s/$$/$(EXEEXT)/'` --DEFAULT_ICON_DIR = $(datadir)/icons --DEFAULT_ERROR_DIR = $(datadir)/errors --DEFAULT_MIB_PATH = $(datadir)/mib.txt -+DEFAULT_ICON_DIR = $(pkgdatadir)/icons -+DEFAULT_ERROR_DIR = $(pkgdatadir)/errors -+DEFAULT_MIB_PATH = $(pkgdatadir)/mib.txt - DEFAULT_HOSTS = @OPT_DEFAULT_HOSTS@ - - # Make location configure settings available to the code --DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\" -+DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(pkgdatadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\" - - snmp_core.o snmp_agent.o: ../snmplib/libsnmp.a $(top_srcdir)/include/cache_snmp.h - -@@ -785,7 +787,7 @@ cf.data: cf.data.pre Makefile - repl_modules.cc: repl_modules.sh Makefile - $(SHELL) $(srcdir)/repl_modules.sh $(REPL_POLICIES) > repl_modules.cc - --install-data-local: install-sysconfDATA install-dataDATA -+install-data-local: install-sysconfDATA - @if test -f $(DESTDIR)$(DEFAULT_MIME_TABLE) ; then \ - echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_MIME_TABLE)" ; \ - else \ -diff -up squid-3.1.0.13/src/Makefile.in.build squid-3.1.0.13/src/Makefile.in ---- squid-3.1.0.13/src/Makefile.in.build 2009-08-04 15:32:36.000000000 +0200 -+++ squid-3.1.0.13/src/Makefile.in 2009-09-04 04:19:11.000000000 +0200 -@@ -130,7 +130,7 @@ am_libsquid_la_OBJECTS = comm.lo CommCal - SquidConfig.lo TextException.lo - libsquid_la_OBJECTS = $(am_libsquid_la_OBJECTS) - am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \ -- "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(datadir)" \ -+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgdatadir)" \ - "$(DESTDIR)$(sysconfdir)" - binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) - @USE_DNSSERVER_TRUE@am__EXEEXT_1 = dnsserver$(EXEEXT) -@@ -1317,9 +1317,9 @@ am__vpath_adj = case $$p in \ - *) f=$$p;; \ - esac; - am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; --dataDATA_INSTALL = $(INSTALL_DATA) -+pkgdataDATA_INSTALL = $(INSTALL_DATA) - sysconfDATA_INSTALL = $(INSTALL_DATA) --DATA = $(data_DATA) $(sysconf_DATA) -+DATA = $(pkgdata_DATA) $(sysconf_DATA) - HEADERS = $(noinst_HEADERS) - RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -@@ -1361,7 +1361,7 @@ DEFAULT_PIDFILE = @DEFAULT_PIDFILE@ - - # Make location configure settings available to the code - DEFS = @DEFS@ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" \ -- -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" \ -+ -DDEFAULT_SQUID_DATA_DIR=\"$(pkgdatadir)\" \ - -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\" - DEPDIR = @DEPDIR@ - DIGEST_AUTH_HELPERS = @DIGEST_AUTH_HELPERS@ -@@ -1850,7 +1850,10 @@ sysconf_DATA = \ - squid.conf.documented \ - mime.conf.default - --data_DATA = \ -+ -+# This really should be installed where snmpget & friends will find it, -+# not used by Squid as such. -+pkgdata_DATA = \ - mib.txt - - LDADD = $(COMMON_LIBS) -L../lib -lmiscutil @XTRA_LIBS@ @EPOLL_LIBS@ @MINGW_LIBS@ -@@ -1920,13 +1923,13 @@ DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFI - DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log - DEFAULT_PID_FILE = @DEFAULT_PIDFILE@ - DEFAULT_NETDB_FILE = $(DEFAULT_LOG_PREFIX)/netdb.state --DEFAULT_SWAP_DIR = $(localstatedir)/cache -+DEFAULT_SWAP_DIR = $(localstatedir)/spool/squid - DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` - DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'` - DEFAULT_DISKD = $(libexecdir)/`echo diskd | sed '$(transform);s/$$/$(EXEEXT)/'` --DEFAULT_ICON_DIR = $(datadir)/icons --DEFAULT_ERROR_DIR = $(datadir)/errors --DEFAULT_MIB_PATH = $(datadir)/mib.txt -+DEFAULT_ICON_DIR = $(pkgdatadir)/icons -+DEFAULT_ERROR_DIR = $(pkgdatadir)/errors -+DEFAULT_MIB_PATH = $(pkgdatadir)/mib.txt - DEFAULT_HOSTS = @OPT_DEFAULT_HOSTS@ - - # stock tools for unit tests - library independent versions of dlink_list -@@ -4023,22 +4026,22 @@ clean-libtool: - -rm -rf .libs _libs - -rm -rf DiskIO/DiskDaemon/.libs DiskIO/DiskDaemon/_libs - -rm -rf tests/.libs tests/_libs --install-dataDATA: $(data_DATA) -+install-pkgdataDATA: $(pkgdata_DATA) - @$(NORMAL_INSTALL) -- test -z "$(datadir)" || $(MKDIR_P) "$(DESTDIR)$(datadir)" -- @list='$(data_DATA)'; for p in $$list; do \ -+ test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" -+ @list='$(pkgdata_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ -- echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \ -- $(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \ -+ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ -+ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ - done - --uninstall-dataDATA: -+uninstall-pkgdataDATA: - @$(NORMAL_UNINSTALL) -- @list='$(data_DATA)'; for p in $$list; do \ -+ @list='$(pkgdata_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ -- echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \ -- rm -f "$(DESTDIR)$(datadir)/$$f"; \ -+ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ -+ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ - done - install-sysconfDATA: $(sysconf_DATA) - @$(NORMAL_INSTALL) -@@ -4313,7 +4316,7 @@ all-am: Makefile $(LIBRARIES) $(LTLIBRAR - $(HEADERS) - installdirs: installdirs-recursive - installdirs-am: -- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(datadir)" "$(DESTDIR)$(sysconfdir)"; do \ -+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sysconfdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done - install: $(BUILT_SOURCES) -@@ -4378,7 +4381,7 @@ info: info-recursive - - info-am: - --install-data-am: install-data-local install-dataDATA -+install-data-am: install-data-local install-pkgdataDATA - - install-dvi: install-dvi-recursive - -@@ -4415,9 +4418,9 @@ ps: ps-recursive - - ps-am: - --uninstall-am: uninstall-binPROGRAMS uninstall-dataDATA \ -- uninstall-libexecPROGRAMS uninstall-local \ -- uninstall-sbinPROGRAMS uninstall-sysconfDATA -+uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \ -+ uninstall-local uninstall-pkgdataDATA uninstall-sbinPROGRAMS \ -+ uninstall-sysconfDATA - - .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip -@@ -4430,19 +4433,19 @@ uninstall-am: uninstall-binPROGRAMS unin - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ -- install-data install-data-am install-data-local \ -- install-dataDATA install-dvi install-dvi-am install-exec \ -- install-exec-am install-html install-html-am install-info \ -- install-info-am install-libexecPROGRAMS install-man \ -- install-pdf install-pdf-am install-ps install-ps-am \ -+ install-data install-data-am install-data-local install-dvi \ -+ install-dvi-am install-exec install-exec-am install-html \ -+ install-html-am install-info install-info-am \ -+ install-libexecPROGRAMS install-man install-pdf install-pdf-am \ -+ install-pkgdataDATA install-ps install-ps-am \ - install-sbinPROGRAMS install-strip install-sysconfDATA \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ -- uninstall-binPROGRAMS uninstall-dataDATA \ -- uninstall-libexecPROGRAMS uninstall-local \ -- uninstall-sbinPROGRAMS uninstall-sysconfDATA -+ uninstall-binPROGRAMS uninstall-libexecPROGRAMS \ -+ uninstall-local uninstall-pkgdataDATA uninstall-sbinPROGRAMS \ -+ uninstall-sysconfDATA - - - $(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h -@@ -4508,7 +4511,7 @@ cf.data: cf.data.pre Makefile - repl_modules.cc: repl_modules.sh Makefile - $(SHELL) $(srcdir)/repl_modules.sh $(REPL_POLICIES) > repl_modules.cc - --install-data-local: install-sysconfDATA install-dataDATA -+install-data-local: install-sysconfDATA - @if test -f $(DESTDIR)$(DEFAULT_MIME_TABLE) ; then \ - echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_MIME_TABLE)" ; \ - else \ diff --git a/squid.spec b/squid.spec index a2e3867..8b43327 100644 --- a/squid.spec +++ b/squid.spec @@ -4,7 +4,7 @@ Name: squid Version: 3.1.0.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Squid proxy caching server Epoch: 7 License: GPLv2+ @@ -36,7 +36,6 @@ Patch005: squid-3.1.0.13-alias-link.patch # will break upstream ones. Patch201: squid-3.1.0.9-config.patch Patch202: squid-3.1.0.9-location.patch -Patch203: squid-3.1.0.13-build.patch Patch204: squid-3.0.STABLE1-perlpath.patch Patch205: squid-3.1.0.13-smb-path.patch Patch208: squid-3.0.STABLE7-from_manpg.patch @@ -72,7 +71,6 @@ lookup program (dnsserver), a program for retrieving FTP data %patch005 -p0 -b .alias-link %patch201 -p1 -b .config %patch202 -p1 -b .location -%patch203 -p1 -b .build %patch204 -p1 -b .perlpath %patch205 -p1 -b .smb-path %patch208 -p1 -b .from_manpg @@ -83,7 +81,7 @@ export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned --exec_prefix=/usr \ --libexecdir=%{_libdir}/squid \ --localstatedir=/var \ - --datadir=%{_datadir} \ + --datadir=%{_datadir}/squid \ --sysconfdir=/etc/squid \ --with-logdir='$(localstatedir)/log/squid' \ --with-pidfile='$(localstatedir)/run/squid.pid' \ @@ -116,21 +114,22 @@ export CXXFLAGS="-fPIE %{optflags}" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned --with-default-user="squid" \ --with-filedescriptors=16384 \ --with-dl \ - --with-openssl=/usr/kerberos \ + --with-openssl \ --with-pthreads -# following options should be enabled but fails building +# following options should be enabled but fails Fedora QA chechs # --enable-negotiate-auth-helpers="squid_kerb_auth" export CXXFLAGS="-fPIE" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS="-pie" ; -make %{?_smp_mflags} +make \ + DEFAULT_SWAP_DIR='$(localstatedir)/spool/squid' \ + %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -%makeinstall \ - sysconfdir=$RPM_BUILD_ROOT/etc/squid \ - localstatedir=$RPM_BUILD_ROOT/var \ - libexecdir=$RPM_BUILD_ROOT/%{_libdir}/squid +make \ + DESTDIR=$RPM_BUILD_ROOT \ + install echo " # # This is /etc/httpd/conf.d/squid.conf