- upgrade to latest upstream 3.0.STABLE1
This commit is contained in:
parent
6e568d9b25
commit
f73a4b2bee
@ -1 +1 @@
|
||||
squid-2.6.STABLE17.tar.bz2
|
||||
squid-3.0.STABLE1.tar.bz2
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
e6face0dff4ea054d3ba94236eb56ea1 squid-2.6.STABLE17.tar.bz2
|
||||
ec7458b00a68341854d91e7f6ece56ba squid-3.0.STABLE1.tar.bz2
|
||||
|
@ -1,8 +0,0 @@
|
||||
--- squid-2.5.STABLE4/contrib/#url-normalizer.pl~ 2004-02-06 14:08:29.000000000 -0500
|
||||
+++ squid-2.5.STABLE4/contrib/url-normalizer.pl 2004-02-06 14:08:29.000000000 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -Tw
|
||||
+#!/usr/bin/perl -Tw
|
||||
|
||||
# From: Markus Gyger <mgyger@itr.ch>
|
||||
#
|
@ -1,124 +0,0 @@
|
||||
diff -up squid-2.6.STABLE16/src/cf.data.pre.config squid-2.6.STABLE16/src/cf.data.pre
|
||||
--- squid-2.6.STABLE16/src/cf.data.pre.config 2007-09-05 23:50:15.000000000 +0200
|
||||
+++ squid-2.6.STABLE16/src/cf.data.pre 2007-09-07 15:11:59.000000000 +0200
|
||||
@@ -692,6 +692,7 @@ http_access deny CONNECT !SSL_ports
|
||||
#http_access allow our_networks
|
||||
|
||||
# And finally deny all other access to this proxy
|
||||
+http_access allow localhost
|
||||
http_access deny all
|
||||
NOCOMMENT_END
|
||||
DOC_END
|
||||
@@ -2250,7 +2251,7 @@ DOC_END
|
||||
|
||||
NAME: logfile_rotate
|
||||
TYPE: int
|
||||
-DEFAULT: 10
|
||||
+DEFAULT: 0
|
||||
LOC: Config.Log.rotateNumber
|
||||
DOC_START
|
||||
Specifies the number of logfile rotations to make when you
|
||||
@@ -2266,6 +2267,8 @@ DOC_START
|
||||
purposes, so -k rotate uses another signal. It is best to get
|
||||
in the habit of using 'squid -k rotate' instead of 'kill -USR1
|
||||
<pid>'.
|
||||
+
|
||||
+logfile_rotate 0
|
||||
DOC_END
|
||||
|
||||
NAME: emulate_httpd_log
|
||||
@@ -3342,11 +3345,11 @@ COMMENT_END
|
||||
|
||||
NAME: cache_mgr
|
||||
TYPE: string
|
||||
-DEFAULT: webmaster
|
||||
+DEFAULT: root
|
||||
LOC: Config.adminEmail
|
||||
DOC_START
|
||||
Email-address of local cache manager who will receive
|
||||
- mail if the cache dies. The default is "webmaster".
|
||||
+ mail if the cache dies. The default is "root".
|
||||
DOC_END
|
||||
|
||||
NAME: mail_from
|
||||
@@ -3374,21 +3377,22 @@ DOC_END
|
||||
|
||||
NAME: cache_effective_user
|
||||
TYPE: string
|
||||
-DEFAULT: nobody
|
||||
+DEFAULT: squid
|
||||
LOC: Config.effectiveUser
|
||||
DOC_START
|
||||
If you start Squid as root, it will change its effective/real
|
||||
UID/GID to the user specified below. The default is to change
|
||||
- to UID to nobody. If you define cache_effective_user, but not
|
||||
+ to UID to squid. If you define cache_effective_user, but not
|
||||
cache_effective_group, Squid sets the GID to the effective
|
||||
user's default group ID (taken from the password file) and
|
||||
supplementary group list from the from groups membership of
|
||||
cache_effective_user.
|
||||
+cache_effective_user squid
|
||||
DOC_END
|
||||
|
||||
NAME: cache_effective_group
|
||||
TYPE: string
|
||||
-DEFAULT: none
|
||||
+DEFAULT: squid
|
||||
LOC: Config.effectiveGroup
|
||||
DOC_START
|
||||
If you want Squid to run with a specific GID regardless of
|
||||
@@ -3398,6 +3402,7 @@ DOC_START
|
||||
and only this GID is effective. If Squid is not started as
|
||||
root the user starting Squid must be member of the specified
|
||||
group.
|
||||
+cache_effective_group squid
|
||||
DOC_END
|
||||
|
||||
NAME: httpd_suppress_version_string
|
||||
@@ -4018,12 +4023,12 @@ COMMENT_END
|
||||
NAME: snmp_port
|
||||
TYPE: ushort
|
||||
LOC: Config.Port.snmp
|
||||
-DEFAULT: 3401
|
||||
+DEFAULT: 0
|
||||
IFDEF: SQUID_SNMP
|
||||
DOC_START
|
||||
Squid can now serve statistics and status information via SNMP.
|
||||
- By default it listens to port 3401 on the machine. If you don't
|
||||
- wish to use SNMP, set this to "0".
|
||||
+ A value of "0" disables SNMP support. If you wish to use SNMP,
|
||||
+ set this to "3401" to use the normal SNMP support.
|
||||
DOC_END
|
||||
|
||||
NAME: snmp_access
|
||||
@@ -4402,15 +4407,22 @@ TYPE: string
|
||||
LOC: Config.errorDirectory
|
||||
DEFAULT: @DEFAULT_ERROR_DIR@
|
||||
DOC_START
|
||||
- If you wish to create your own versions of the default
|
||||
- (English) error files, either to customize them to suit your
|
||||
- language or company copy the template English files to another
|
||||
+ Directory where the error files are read from.
|
||||
+ /usr/lib/squid/errors contains sets of error files
|
||||
+ in different languages. The default error directory
|
||||
+ is /etc/squid/errors, which is a link to one of these
|
||||
+ error sets.
|
||||
+
|
||||
+ If you wish to create your own versions of the error files,
|
||||
+ either to customize them to suit your language or company,
|
||||
+ copy the template English files to another
|
||||
directory and point this tag at them.
|
||||
-
|
||||
- The squid developers are interested in making squid available in
|
||||
- a wide variety of languages. If you are making translations for a
|
||||
- langauge that Squid does not currently provide please consider
|
||||
- contributing your translation back to the project.
|
||||
+
|
||||
+ The squid developers are interested in making squid available in
|
||||
+ a wide variety of languages. If you are making translations for a
|
||||
+ langauge that Squid does not currently provide please consider
|
||||
+ contributing your translation back to the project.
|
||||
+error_directory @DEFAULT_ERROR_DIR@
|
||||
DOC_END
|
||||
|
||||
NAME: error_map
|
@ -1,149 +0,0 @@
|
||||
diff -up squid-2.6.STABLE16/src/tools.c.fd squid-2.6.STABLE16/src/tools.c
|
||||
--- squid-2.6.STABLE16/src/tools.c.fd 2007-09-01 22:09:50.000000000 +0200
|
||||
+++ squid-2.6.STABLE16/src/tools.c 2007-09-21 15:01:32.000000000 +0200
|
||||
@@ -735,46 +735,62 @@ readPidFile(void)
|
||||
}
|
||||
|
||||
|
||||
+/* A little piece of glue for odd systems */
|
||||
+#ifndef RLIMIT_NOFILE
|
||||
+#ifdef RLIMIT_OFILE
|
||||
+#define RLIMIT_NOFILE RLIMIT_OFILE
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+/* Figure out the number of supported filedescriptors */
|
||||
void
|
||||
setMaxFD(void)
|
||||
{
|
||||
-#if HAVE_SETRLIMIT
|
||||
- /* try to use as many file descriptors as possible */
|
||||
- /* System V uses RLIMIT_NOFILE and BSD uses RLIMIT_OFILE */
|
||||
+#if HAVE_SETRLIMIT && defined(RLIMIT_NOFILE)
|
||||
struct rlimit rl;
|
||||
-#if !defined(_SQUID_CYGWIN_)
|
||||
-#if defined(RLIMIT_NOFILE)
|
||||
if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
|
||||
- debug(50, 0) ("setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
|
||||
- } else {
|
||||
- rl.rlim_cur = Squid_MaxFD;
|
||||
- if (rl.rlim_cur > rl.rlim_max)
|
||||
- Squid_MaxFD = rl.rlim_cur = rl.rlim_max;
|
||||
- if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
|
||||
- snprintf(tmp_error_buf, ERROR_BUF_SZ,
|
||||
- "setrlimit: RLIMIT_NOFILE: %s", xstrerror());
|
||||
- fatal_dump(tmp_error_buf);
|
||||
- }
|
||||
+ debug(50, 0) ("setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
|
||||
+ } else if (Config.max_filedescriptors > 0) {
|
||||
+ rl.rlim_cur = Config.max_filedescriptors;
|
||||
+ if (rl.rlim_cur > rl.rlim_max)
|
||||
+ rl.rlim_max = rl.rlim_cur;
|
||||
+ if (setrlimit(RLIMIT_NOFILE, &rl)) {
|
||||
+ debug(50, 0) ("setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
|
||||
+ getrlimit(RLIMIT_NOFILE, &rl);
|
||||
+ rl.rlim_cur = rl.rlim_max;
|
||||
+ if (setrlimit(RLIMIT_NOFILE, &rl)) {
|
||||
+ debug(50, 0) ("setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
-#elif defined(RLIMIT_OFILE)
|
||||
- if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
|
||||
- debug(50, 0) ("setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
|
||||
+ if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
|
||||
+ debug(50, 0) ("setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
|
||||
} else {
|
||||
- rl.rlim_cur = Squid_MaxFD;
|
||||
- if (rl.rlim_cur > rl.rlim_max)
|
||||
- Squid_MaxFD = rl.rlim_cur = rl.rlim_max;
|
||||
- if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
|
||||
- snprintf(tmp_error_buf, ERROR_BUF_SZ,
|
||||
- "setrlimit: RLIMIT_OFILE: %s", xstrerror());
|
||||
- fatal_dump(tmp_error_buf);
|
||||
- }
|
||||
+ Squid_MaxFD = rl.rlim_cur;
|
||||
}
|
||||
-#endif
|
||||
-#endif
|
||||
-#else /* HAVE_SETRLIMIT */
|
||||
- debug(21, 1) ("setMaxFD: Cannot increase: setrlimit() not supported on this system\n");
|
||||
#endif /* HAVE_SETRLIMIT */
|
||||
+}
|
||||
|
||||
+void
|
||||
+setSystemLimits(void)
|
||||
+{
|
||||
+#if HAVE_SETRLIMIT && defined(RLIMIT_NOFILE) && !defined(_SQUID_CYGWIN_)
|
||||
+ /* limit system filedescriptors to our own limit */
|
||||
+ struct rlimit rl;
|
||||
+ if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
|
||||
+ debug(50, 0) ("setrlimit: RLIMIT_NOFILE: %s\n", xstrerror());
|
||||
+ } else {
|
||||
+ rl.rlim_cur = Squid_MaxFD;
|
||||
+ if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
|
||||
+ snprintf(tmp_error_buf, ERROR_BUF_SZ,
|
||||
+ "setrlimit: RLIMIT_NOFILE: %s", xstrerror());
|
||||
+ fatal_dump(tmp_error_buf);
|
||||
+ }
|
||||
+ }
|
||||
+ #endif /* HAVE_SETRLIMIT */
|
||||
+ if (Config.max_filedescriptors > Squid_MaxFD) {
|
||||
+ debug(50, 1) ("NOTICE: Could not increase the number of filedescriptors\n");
|
||||
+ }
|
||||
#if HAVE_SETRLIMIT && defined(RLIMIT_DATA)
|
||||
if (getrlimit(RLIMIT_DATA, &rl) < 0) {
|
||||
debug(50, 0) ("getrlimit: RLIMIT_DATA: %s\n", xstrerror());
|
||||
diff -up squid-2.6.STABLE16/src/cf.data.pre.fd squid-2.6.STABLE16/src/cf.data.pre
|
||||
--- squid-2.6.STABLE16/src/cf.data.pre.fd 2007-09-21 12:52:28.000000000 +0200
|
||||
+++ squid-2.6.STABLE16/src/cf.data.pre 2007-09-21 15:07:15.000000000 +0200
|
||||
@@ -5216,4 +5216,16 @@ DOC_START
|
||||
rounded to 1000.
|
||||
DOC_END
|
||||
|
||||
+NAME: max_filedescriptors max_filedesc
|
||||
+TYPE: int
|
||||
+DEFAULT: 0
|
||||
+LOC: Config.max_filedescriptors
|
||||
+DOC_START
|
||||
+ The maximum number of filedescriptors supported.
|
||||
+
|
||||
+ The default "0" means Squid inherits the current ulimit setting.
|
||||
+
|
||||
+ Note: Changing this requires a restart of Squid. Also
|
||||
+ not all comm loops supports values larger than --with-maxfd.
|
||||
+DOC_END
|
||||
EOF
|
||||
diff -up squid-2.6.STABLE16/src/protos.h.fd squid-2.6.STABLE16/src/protos.h
|
||||
--- squid-2.6.STABLE16/src/protos.h.fd 2007-07-15 11:52:17.000000000 +0200
|
||||
+++ squid-2.6.STABLE16/src/protos.h 2007-09-21 15:03:14.000000000 +0200
|
||||
@@ -1102,6 +1102,7 @@ extern void no_suid(void);
|
||||
extern void writePidFile(void);
|
||||
extern void setSocketShutdownLifetimes(int);
|
||||
extern void setMaxFD(void);
|
||||
+extern void setSystemLimits(void);
|
||||
extern time_t getCurrentTime(void);
|
||||
extern int percent(int, int);
|
||||
extern double dpercent(double, double);
|
||||
diff -up squid-2.6.STABLE16/src/main.c.fd squid-2.6.STABLE16/src/main.c
|
||||
--- squid-2.6.STABLE16/src/main.c.fd 2007-08-31 15:52:10.000000000 +0200
|
||||
+++ squid-2.6.STABLE16/src/main.c 2007-09-21 15:04:01.000000000 +0200
|
||||
@@ -552,6 +552,7 @@ mainInitialize(void)
|
||||
debug(1, 0) ("Running on %s\n", WIN32_OS_string);
|
||||
#endif
|
||||
debug(1, 1) ("Process ID %d\n", (int) getpid());
|
||||
+ setSystemLimits();
|
||||
debug(1, 1) ("With %d file descriptors available\n", Squid_MaxFD);
|
||||
#ifdef _SQUID_MSWIN_
|
||||
debug(1, 1) ("With %d CRT stdio descriptors available\n", _getmaxstdio());
|
||||
diff -up squid-2.6.STABLE16/src/structs.h.fd squid-2.6.STABLE16/src/structs.h
|
||||
--- squid-2.6.STABLE16/src/structs.h.fd 2007-09-05 23:28:34.000000000 +0200
|
||||
+++ squid-2.6.STABLE16/src/structs.h 2007-09-21 15:04:49.000000000 +0200
|
||||
@@ -810,6 +810,7 @@ struct _SquidConfig {
|
||||
#endif
|
||||
time_t refresh_stale_window;
|
||||
int umask;
|
||||
+ int max_filedescriptors;
|
||||
};
|
||||
|
||||
struct _SquidConfig2 {
|
@ -1,149 +0,0 @@
|
||||
--- squid-2.6.STABLE1/configure.fd 2006-07-26 09:58:41.000000000 +0200
|
||||
+++ squid-2.6.STABLE1/configure 2006-07-26 09:58:41.000000000 +0200
|
||||
@@ -2970,6 +2970,34 @@
|
||||
AMDEP_FALSE=
|
||||
fi
|
||||
|
||||
+if false; then
|
||||
+ USE_FD_CONFIG_TRUE=
|
||||
+ USE_FD_CONFIG_FALSE='#'
|
||||
+else
|
||||
+ USE_FD_CONFIG_TRUE='#'
|
||||
+ USE_FD_CONFIG_FALSE=
|
||||
+fi
|
||||
+# Check whether --enable-fd-config or --disable-fd-config was given.
|
||||
+if test "${enable_fd_config+set}" = set; then
|
||||
+ enableval="$enable_fd_config"
|
||||
+ if test "$enableval" = "yes" ; then
|
||||
+ echo "File descriptor config enabled"
|
||||
+ cat >> confdefs.h <<\EOF
|
||||
+#define FD_CONFIG 1
|
||||
+EOF
|
||||
+
|
||||
+
|
||||
+
|
||||
+if true; then
|
||||
+ USE_FD_CONFIG_TRUE=
|
||||
+ USE_FD_CONFIG_FALSE='#'
|
||||
+else
|
||||
+ USE_FD_CONFIG_TRUE='#'
|
||||
+ USE_FD_CONFIG_FALSE=
|
||||
+fi
|
||||
+ fi
|
||||
+
|
||||
+fi
|
||||
|
||||
|
||||
|
||||
--- squid-2.6.STABLE1/include/autoconf.h.in.fd 2006-07-26 09:58:41.000000000 +0200
|
||||
+++ squid-2.6.STABLE1/include/autoconf.h.in 2006-07-26 09:58:41.000000000 +0200
|
||||
@@ -36,6 +36,9 @@
|
||||
/* Traffic management via "delay pools". */
|
||||
#undef DELAY_POOLS
|
||||
|
||||
+/* Filedesc managment */
|
||||
+#undef FD_CONFIG
|
||||
+
|
||||
/* Enable following X-Forwarded-For headers */
|
||||
#undef FOLLOW_X_FORWARDED_FOR
|
||||
|
||||
--- squid-2.6.STABLE1/configure.in.fd 2006-07-26 09:58:41.000000000 +0200
|
||||
+++ squid-2.6.STABLE1/configure.in 2006-07-26 09:58:41.000000000 +0200
|
||||
@@ -501,6 +501,16 @@
|
||||
fi
|
||||
])
|
||||
|
||||
+AM_CONDITIONAL(USE_FD_CONFIG, false)
|
||||
+AC_ARG_ENABLE(fd-config,
|
||||
+[ --enable-fd-config Enable filedesc config to configure maximal number of used filedescriptors],
|
||||
+[ if test "$enableval" = "yes" ; then
|
||||
+ echo "Filedesc config enabled"
|
||||
+ AC_DEFINE(FD_CONFIG)
|
||||
+ AM_CONDITIONAL(USE_FD_CONFIG, true)
|
||||
+ fi
|
||||
+])
|
||||
+
|
||||
dnl This is a developer only option. Developers know how to set defines
|
||||
dnl
|
||||
dnl AC_ARG_ENABLE(mem-gen-trace,
|
||||
--- squid-2.6.STABLE1/src/cf.data.pre.fd 2006-07-26 09:58:41.000000000 +0200
|
||||
+++ squid-2.6.STABLE1/src/cf.data.pre 2006-07-26 10:05:54.000000000 +0200
|
||||
@@ -5027,4 +5027,23 @@
|
||||
or response to be rejected.
|
||||
DOC_END
|
||||
|
||||
+NAME: max_filedesc
|
||||
+IFDEF: FD_CONFIG
|
||||
+TYPE: int
|
||||
+DEFAULT: 1024
|
||||
+LOC: Config.max_filedesc
|
||||
+DOC_START
|
||||
+ The maximum number of open file descriptors.
|
||||
+
|
||||
+ WARNING: Changes of this value isn't respected by reconfigure
|
||||
+ command. This value should be changed only if there isn't
|
||||
+ any active squid process.
|
||||
+
|
||||
+ NOTE: This option is only supported by system with poll()
|
||||
+ or epoll(). You can set this value by --with-maxfd during
|
||||
+ compilation on system whith uses select().
|
||||
+
|
||||
+ The maximum value for max_filedesc is set by --with-maxfd during
|
||||
+ compilation.
|
||||
+DOC_END
|
||||
EOF
|
||||
--- squid-2.6.STABLE1/src/main.c.fd 2006-07-26 09:58:41.000000000 +0200
|
||||
+++ squid-2.6.STABLE1/src/main.c 2006-07-26 09:58:41.000000000 +0200
|
||||
@@ -748,6 +749,8 @@
|
||||
/* Make sure the OS allows core dumps if enabled in squid.conf */
|
||||
enableCoredumps();
|
||||
|
||||
+ setMaxFD();
|
||||
+
|
||||
#if TEST_ACCESS
|
||||
comm_init();
|
||||
comm_select_init();
|
||||
@@ -781,7 +784,6 @@
|
||||
}
|
||||
if (!opt_no_daemon)
|
||||
watch_child(argv);
|
||||
- setMaxFD();
|
||||
|
||||
/* init comm module */
|
||||
comm_init();
|
||||
--- squid-2.6.STABLE1/src/structs.h.fd 2006-07-26 09:58:41.000000000 +0200
|
||||
+++ squid-2.6.STABLE1/src/structs.h 2006-07-26 09:58:41.000000000 +0200
|
||||
@@ -805,6 +805,9 @@
|
||||
#endif
|
||||
time_t refresh_stale_window;
|
||||
int umask;
|
||||
+#if FD_CONFIG
|
||||
+ int max_filedesc;
|
||||
+#endif
|
||||
};
|
||||
|
||||
struct _SquidConfig2 {
|
||||
--- squid-2.6.STABLE1/src/tools.c.fd 2006-07-26 09:58:41.000000000 +0200
|
||||
+++ squid-2.6.STABLE1/src/tools.c 2006-07-26 09:58:41.000000000 +0200
|
||||
@@ -757,6 +757,21 @@
|
||||
void
|
||||
setMaxFD(void)
|
||||
{
|
||||
+
|
||||
+/* Set up number of used filedescriptors from config file */
|
||||
+/* Override the default settings Squid_MaxFD = FD_SETSIZE */
|
||||
+#if FD_CONFIG
|
||||
+ Squid_MaxFD = Config.max_filedesc;
|
||||
+
|
||||
+ /* don't exceed limit which was set during compilation */
|
||||
+ if(SQUID_MAXFD < Squid_MaxFD)
|
||||
+ Squid_MaxFD = SQUID_MAXFD;
|
||||
+#else
|
||||
+ /* don't exceed FD_SETSIZE */
|
||||
+ if(FD_SETSIZE < Squid_MaxFD)
|
||||
+ Squid_MaxFD = FD_SETSIZE;
|
||||
+#endif
|
||||
+
|
||||
#if HAVE_SETRLIMIT
|
||||
/* try to use as many file descriptors as possible */
|
||||
/* System V uses RLIMIT_NOFILE and BSD uses RLIMIT_OFILE */
|
@ -1,70 +1,7 @@
|
||||
--- squid-2.6.STABLE2/errors/Makefile.in.build 2006-06-12 08:09:43.000000000 +0200
|
||||
+++ squid-2.6.STABLE2/errors/Makefile.in 2006-07-31 09:38:42.000000000 +0200
|
||||
@@ -221,8 +221,8 @@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
-errordir = $(datadir)/errors
|
||||
-DEFAULT_ERROR_DIR = $(errordir)
|
||||
+errordir = $(pkgdatadir)/errors
|
||||
+DEFAULT_ERROR_DIR = $(sysconfdir)/errors
|
||||
INSTALL_LANGUAGES = @ERR_LANGUAGES@
|
||||
LANGUAGES = \
|
||||
Azerbaijani \
|
||||
@@ -413,17 +413,17 @@
|
||||
|
||||
install-data-local:
|
||||
@for l in $(INSTALL_LANGUAGES); do \
|
||||
- $(mkinstalldirs) $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l && \
|
||||
+ $(mkinstalldirs) $(DESTDIR)$(errordir)/$$l && \
|
||||
for f in $(srcdir)/$$l/ERR_*; do \
|
||||
- echo "$(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l"; \
|
||||
- $(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; \
|
||||
+ echo "$(INSTALL_DATA) $$f $(DESTDIR)$(errordir)/$$l"; \
|
||||
+ $(INSTALL_DATA) $$f $(DESTDIR)$(errordir)/$$l; \
|
||||
done \
|
||||
done
|
||||
|
||||
uninstall-local:
|
||||
@for l in $(INSTALL_LANGUAGES); do \
|
||||
for f in $(srcdir)/$$l/ERR_*; do \
|
||||
- rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
|
||||
+ rm -f $(DESTDIR)$(errordir)/$$l/`basename $$f`; \
|
||||
done \
|
||||
done
|
||||
|
||||
@@ -436,13 +436,13 @@
|
||||
#
|
||||
addlang: all
|
||||
-@if test -d $(srcdir)/$(ADDLANG); then \
|
||||
- if test -d $(DEFAULT_ERROR_DIR)/$(DESTLANG); then \
|
||||
+ if test -d $(errordir)/$(DESTLANG); then \
|
||||
cd $(srcdir)/$(ADDLANG)/ ; \
|
||||
for f in ERR_*; do \
|
||||
- if test -f $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f ; then \
|
||||
+ if test -f $(errordir)/$(DESTLANG)/$$f ; then \
|
||||
echo "appending $(ADDLANG)/$$f"; \
|
||||
- echo "<HR>" >> $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f ; \
|
||||
- cat $$f >> $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f; \
|
||||
+ echo "<HR>" >> $(errordir)/$(DESTLANG)/$$f ; \
|
||||
+ cat $$f >> $(errordir)/$(DESTLANG)/$$f; \
|
||||
fi; \
|
||||
done; \
|
||||
fi \
|
||||
--- squid-2.6.STABLE2/icons/Makefile.in.build 2006-06-12 08:10:08.000000000 +0200
|
||||
+++ squid-2.6.STABLE2/icons/Makefile.in 2006-07-31 09:38:42.000000000 +0200
|
||||
@@ -258,7 +258,7 @@
|
||||
anthony-xbm.gif \
|
||||
anthony-xpm.gif
|
||||
|
||||
-icondir = $(datadir)/icons
|
||||
+icondir = $(pkgdatadir)/icons
|
||||
icon_DATA = $(ICON1) $(ICON2)
|
||||
EXTRA_DIST = $(ICON1) $(ICON2) icons.shar
|
||||
DISTCLEANFILES =
|
||||
--- squid-2.6.STABLE2/src/Makefile.in.build 2006-07-30 10:56:18.000000000 +0200
|
||||
+++ squid-2.6.STABLE2/src/Makefile.in 2006-07-31 09:47:33.000000000 +0200
|
||||
@@ -586,18 +586,18 @@
|
||||
diff -up squid-3.0.STABLE1/src/Makefile.in.build squid-3.0.STABLE1/src/Makefile.in
|
||||
--- squid-3.0.STABLE1/src/Makefile.in.build 2007-12-05 02:11:21.000000000 +0100
|
||||
+++ squid-3.0.STABLE1/src/Makefile.in 2008-01-23 12:07:50.000000000 +0100
|
||||
@@ -2610,18 +2610,18 @@ DEFAULT_PREFIX = $(prefix)
|
||||
DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
|
||||
DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
|
||||
DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
|
||||
@ -79,17 +16,17 @@
|
||||
+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-daemon | sed '$(transform);s/$$/$(EXEEXT)/'`
|
||||
DEFAULT_DISKD = $(libexecdir)/`echo diskd | sed '$(transform);s/$$/$(EXEEXT)/'`
|
||||
-DEFAULT_ICON_DIR = $(datadir)/icons
|
||||
-DEFAULT_ERROR_DIR = $(datadir)/errors/@ERR_DEFAULT_LANGUAGE@
|
||||
-DEFAULT_MIB_PATH = $(datadir)/mib.txt
|
||||
+DEFAULT_ICON_DIR = $(pkgdatadir)/icons
|
||||
+DEFAULT_ERROR_DIR = $(pkgdatadir)/errors/@ERR_DEFAULT_LANGUAGE@
|
||||
+DEFAULT_MIB_PATH = $(sysconfdir)/mib.txt
|
||||
+DEFAULT_MIB_PATH = $(sysconfigdir)/mib.txt
|
||||
DEFAULT_HOSTS = @OPT_DEFAULT_HOSTS@
|
||||
|
||||
# Don't automatically uninstall config files
|
||||
@@ -842,20 +842,20 @@
|
||||
@@ -4986,20 +4986,20 @@ distclean-libtool:
|
||||
uninstall-info-am:
|
||||
install-dataDATA: $(data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@ -115,3 +52,69 @@
|
||||
done
|
||||
install-sysconfDATA: $(sysconf_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
diff -up squid-3.0.STABLE1/errors/Makefile.in.build squid-3.0.STABLE1/errors/Makefile.in
|
||||
--- squid-3.0.STABLE1/errors/Makefile.in.build 2007-12-05 02:10:48.000000000 +0100
|
||||
+++ squid-3.0.STABLE1/errors/Makefile.in 2008-01-23 12:07:50.000000000 +0100
|
||||
@@ -269,8 +269,8 @@ sharedstatedir = @sharedstatedir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
-errordir = $(datadir)/errors
|
||||
-DEFAULT_ERROR_DIR = $(errordir)
|
||||
+errordir = $(pkgdatadir)/errors
|
||||
+DEFAULT_ERROR_DIR = $(sysconfdir)/errors
|
||||
INSTALL_LANGUAGES = @ERR_LANGUAGES@
|
||||
LANGUAGES = \
|
||||
Armenian \
|
||||
@@ -472,17 +472,17 @@ uninstall-am: uninstall-info-am uninstal
|
||||
|
||||
install-data-local:
|
||||
@for l in $(INSTALL_LANGUAGES); do \
|
||||
- $(mkinstalldirs) $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l && \
|
||||
+ $(mkinstalldirs) $(DESTDIR)$(errordir)/$$l && \
|
||||
for f in $(srcdir)/$$l/ERR_*; do \
|
||||
- echo "$(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l"; \
|
||||
- $(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; \
|
||||
+ echo "$(INSTALL_DATA) $$f $(DESTDIR)$(errordir)/$$l"; \
|
||||
+ $(INSTALL_DATA) $$f $(DESTDIR)$(errordir)/$$l; \
|
||||
done \
|
||||
done
|
||||
|
||||
uninstall-local:
|
||||
@for l in $(INSTALL_LANGUAGES); do \
|
||||
for f in $(srcdir)/$$l/ERR_*; do \
|
||||
- rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
|
||||
+ rm -f $(DESTDIR)$(errordir)/$$l/`basename $$f`; \
|
||||
done \
|
||||
done
|
||||
|
||||
@@ -495,13 +495,13 @@ uninstall-local:
|
||||
#
|
||||
addlang: all
|
||||
-@if test -d $(srcdir)/$(ADDLANG); then \
|
||||
- if test -d $(DEFAULT_ERROR_DIR)/$(DESTLANG); then \
|
||||
+ if test -d $(errordir)/$(DESTLANG); then \
|
||||
cd $(srcdir)/$(ADDLANG)/ ; \
|
||||
for f in ERR_*; do \
|
||||
- if test -f $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f ; then \
|
||||
+ if test -f $(errordir)/$(DESTLANG)/$$f ; then \
|
||||
echo "appending $(ADDLANG)/$$f"; \
|
||||
- echo "<HR>" >> $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f ; \
|
||||
- cat $$f >> $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f; \
|
||||
+ echo "<HR>" >> $(errordir)/$(DESTLANG)/$$f ; \
|
||||
+ cat $$f >> $(errordir)/$(DESTLANG)/$$f; \
|
||||
fi; \
|
||||
done; \
|
||||
fi \
|
||||
diff -up squid-3.0.STABLE1/icons/Makefile.in.build squid-3.0.STABLE1/icons/Makefile.in
|
||||
--- squid-3.0.STABLE1/icons/Makefile.in.build 2007-12-05 02:11:15.000000000 +0100
|
||||
+++ squid-3.0.STABLE1/icons/Makefile.in 2008-01-23 12:07:50.000000000 +0100
|
||||
@@ -306,7 +306,7 @@ ICON2 = anthony-bomb.gif \
|
||||
anthony-xbm.gif \
|
||||
anthony-xpm.gif
|
||||
|
||||
-icondir = $(datadir)/icons
|
||||
+icondir = $(pkgdatadir)/icons
|
||||
icon_DATA = $(ICON1) $(ICON2)
|
||||
EXTRA_DIST = $(ICON1) $(ICON2) icons.shar
|
||||
DISTCLEANFILES =
|
86
squid-3.0.STABLE1-config.patch
Normal file
86
squid-3.0.STABLE1-config.patch
Normal file
@ -0,0 +1,86 @@
|
||||
diff -up squid-3.0.STABLE1/src/cf.data.pre.config squid-3.0.STABLE1/src/cf.data.pre
|
||||
--- squid-3.0.STABLE1/src/cf.data.pre.config 2007-11-16 00:33:05.000000000 +0100
|
||||
+++ squid-3.0.STABLE1/src/cf.data.pre 2008-01-23 12:11:12.000000000 +0100
|
||||
@@ -673,6 +673,7 @@ http_access deny CONNECT !SSL_ports
|
||||
http_access allow localnet
|
||||
|
||||
# And finally deny all other access to this proxy
|
||||
+http_access allow localhost
|
||||
http_access deny all
|
||||
NOCOMMENT_END
|
||||
DOC_END
|
||||
@@ -2080,7 +2081,7 @@ DOC_END
|
||||
|
||||
NAME: logfile_rotate
|
||||
TYPE: int
|
||||
-DEFAULT: 10
|
||||
+DEFAULT: 0
|
||||
LOC: Config.Log.rotateNumber
|
||||
DOC_START
|
||||
Specifies the number of logfile rotations to make when you
|
||||
@@ -2096,6 +2097,7 @@ DOC_START
|
||||
purposes, so -k rotate uses another signal. It is best to get
|
||||
in the habit of using 'squid -k rotate' instead of 'kill -USR1
|
||||
<pid>'.
|
||||
+logfile_rotate 0
|
||||
DOC_END
|
||||
|
||||
NAME: emulate_httpd_log
|
||||
@@ -3198,11 +3200,11 @@ COMMENT_END
|
||||
|
||||
NAME: cache_mgr
|
||||
TYPE: string
|
||||
-DEFAULT: webmaster
|
||||
+DEFAULT: root
|
||||
LOC: Config.adminEmail
|
||||
DOC_START
|
||||
Email-address of local cache manager who will receive
|
||||
- mail if the cache dies. The default is "webmaster."
|
||||
+ mail if the cache dies. The default is "root."
|
||||
DOC_END
|
||||
|
||||
NAME: mail_from
|
||||
@@ -3242,7 +3244,7 @@ DOC_END
|
||||
|
||||
NAME: cache_effective_group
|
||||
TYPE: string
|
||||
-DEFAULT: none
|
||||
+DEFAULT: squid
|
||||
LOC: Config.effectiveGroup
|
||||
DOC_START
|
||||
Squid sets the GID to the effective user's default group ID
|
||||
@@ -3260,6 +3262,7 @@ DOC_START
|
||||
This option is not recommended by the Squid Team.
|
||||
Our preference is for administrators to configure a secure
|
||||
user account for squid with UID/GID matching system policies.
|
||||
+cache_effective_group squid
|
||||
DOC_END
|
||||
|
||||
NAME: httpd_suppress_version_string
|
||||
@@ -4354,15 +4357,23 @@ TYPE: string
|
||||
LOC: Config.errorDirectory
|
||||
DEFAULT: @DEFAULT_ERROR_DIR@
|
||||
DOC_START
|
||||
- If you wish to create your own versions of the default
|
||||
- (English) error files, either to customize them to suit your
|
||||
- language or company copy the template English files to another
|
||||
+ Directory where the error files are read from.
|
||||
+ /usr/lib/squid/errors contains sets of error files
|
||||
+ in different languages. The default error directory
|
||||
+ is /etc/squid/errors, which is a link to one of these
|
||||
+ error sets.
|
||||
+
|
||||
+ If you wish to create your own versions of the error files,
|
||||
+ either to customize them to suit your language or company,
|
||||
+ copy the template English files to another
|
||||
directory and point this tag at them.
|
||||
|
||||
The squid developers are interested in making squid available in
|
||||
a wide variety of languages. If you are making translations for a
|
||||
langauge that Squid does not currently provide please consider
|
||||
contributing your translation back to the project.
|
||||
+
|
||||
+error_directory @DEFAULT_ERROR_DIR@
|
||||
DOC_END
|
||||
|
||||
NAME: err_html_text
|
@ -1,6 +1,7 @@
|
||||
--- squid-2.5.STABLE4/QUICKSTART.location 2003-07-18 04:53:27.000000000 -0400
|
||||
+++ squid-2.5.STABLE4/QUICKSTART 2003-09-23 15:52:16.000000000 -0400
|
||||
@@ -12,10 +12,9 @@
|
||||
diff -up squid-3.0.STABLE1/QUICKSTART.location squid-3.0.STABLE1/QUICKSTART
|
||||
--- squid-3.0.STABLE1/QUICKSTART.location 2003-07-18 13:10:32.000000000 +0200
|
||||
+++ squid-3.0.STABLE1/QUICKSTART 2008-01-23 12:07:50.000000000 +0100
|
||||
@@ -12,10 +12,9 @@ After you retrieved, compiled and instal
|
||||
INSTALL in the same directory), you have to configure the squid.conf
|
||||
file. This is the list of the values you *need* to change, because no
|
||||
sensible defaults could be defined. Do not touch the other variables
|
||||
@ -13,7 +14,7 @@
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -26,7 +25,7 @@
|
||||
@@ -26,7 +25,7 @@ cache_peer, never_direct/always_direct
|
||||
always ask permission before adding a parent cache. See also the
|
||||
never_direct/always_direct directives.
|
||||
|
||||
@ -22,7 +23,7 @@
|
||||
|
||||
Add here (first number, here 100) the amount of hard disk space
|
||||
(in megabytes) to devote to caching.
|
||||
@@ -69,8 +68,8 @@
|
||||
@@ -69,8 +68,8 @@ visible_hostname
|
||||
After editing squid.conf to your liking, run Squid from the command
|
||||
line TWICE:
|
||||
|
9
squid-3.0.STABLE1-perlpath.patch
Normal file
9
squid-3.0.STABLE1-perlpath.patch
Normal file
@ -0,0 +1,9 @@
|
||||
diff -up squid-3.0.STABLE1/contrib/url-normalizer.pl.perlpath squid-3.0.STABLE1/contrib/url-normalizer.pl
|
||||
--- squid-3.0.STABLE1/contrib/url-normalizer.pl.perlpath 1996-12-06 18:54:31.000000000 +0100
|
||||
+++ squid-3.0.STABLE1/contrib/url-normalizer.pl 2008-01-23 12:07:50.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl -Tw
|
||||
+#!/usr/bin/perl -Tw
|
||||
|
||||
# From: Markus Gyger <mgyger@itr.ch>
|
||||
#
|
@ -1,5 +1,6 @@
|
||||
--- squid-2.5.STABLE12/helpers/basic_auth/SMB/Makefile.am.old 2002-08-12 03:13:42.000000000 +0200
|
||||
+++ squid-2.5.STABLE12/helpers/basic_auth/SMB/Makefile.am 2005-12-29 14:49:24.000000000 +0100
|
||||
diff -up squid-3.0.STABLE1/helpers/basic_auth/SMB/Makefile.am.smb-path squid-3.0.STABLE1/helpers/basic_auth/SMB/Makefile.am
|
||||
--- squid-3.0.STABLE1/helpers/basic_auth/SMB/Makefile.am.smb-path 2003-01-23 01:35:40.000000000 +0100
|
||||
+++ squid-3.0.STABLE1/helpers/basic_auth/SMB/Makefile.am 2008-01-23 12:17:22.000000000 +0100
|
||||
@@ -7,14 +7,14 @@
|
||||
#
|
||||
|
||||
@ -17,9 +18,10 @@
|
||||
SMB_AUTH_HELPER_PATH = $(libexecdir)/$(SMB_AUTH_HELPER)
|
||||
|
||||
libexec_SCRIPTS = $(SMB_AUTH_HELPER)
|
||||
--- squid-2.5.STABLE12/helpers/basic_auth/SMB/Makefile.in.old 2005-09-28 22:57:19.000000000 +0200
|
||||
+++ squid-2.5.STABLE12/helpers/basic_auth/SMB/Makefile.in 2005-12-29 14:49:16.000000000 +0100
|
||||
@@ -22,7 +22,7 @@
|
||||
diff -up squid-3.0.STABLE1/helpers/basic_auth/SMB/Makefile.in.smb-path squid-3.0.STABLE1/helpers/basic_auth/SMB/Makefile.in
|
||||
--- squid-3.0.STABLE1/helpers/basic_auth/SMB/Makefile.in.smb-path 2007-12-05 02:10:56.000000000 +0100
|
||||
+++ squid-3.0.STABLE1/helpers/basic_auth/SMB/Makefile.in 2008-01-23 12:17:22.000000000 +0100
|
||||
@@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
# SAMBAPREFIX must point to the directory where Samba has been installed.
|
||||
@ -28,12 +30,12 @@
|
||||
# by using the --prefix option when configuring Samba, you need to change
|
||||
# SAMBAPREFIX accordingly.
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
makesnmplib = @makesnmplib@
|
||||
|
||||
@@ -306,7 +306,7 @@ subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SMB_AUTH_HELPER = smb_auth.sh
|
||||
-SAMBAPREFIX = /usr/local/samba
|
||||
+SAMBAPREFIX = /usr
|
||||
SMB_AUTH_HELPER_PATH = $(libexecdir)/$(SMB_AUTH_HELPER)
|
||||
|
||||
libexec_SCRIPTS = $(SMB_AUTH_HELPER)
|
||||
smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\"
|
@ -36,7 +36,7 @@ SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-100}
|
||||
# determine the name of the squid binary
|
||||
[ -f /usr/sbin/squid ] && SQUID=squid
|
||||
|
||||
if [ $1 == 'status' ]; then
|
||||
if [ "$1" == "status" ]; then
|
||||
[ -z "$SQUID" ] && exit 4
|
||||
else
|
||||
[ -z "$SQUID" ] && exit 1
|
||||
|
135
squid.spec
135
squid.spec
@ -2,15 +2,15 @@
|
||||
%define __perl_requires %{SOURCE98}
|
||||
## % define __find_requires %{SOURCE99}
|
||||
|
||||
Summary: The Squid proxy caching server
|
||||
Name: squid
|
||||
Version: 2.6.STABLE17
|
||||
Version: 3.0.STABLE1
|
||||
Release: 1%{?dist}
|
||||
Summary: The Squid proxy caching server
|
||||
Epoch: 7
|
||||
License: GPL
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.squid-cache.org
|
||||
Source: http://www.squid-cache.org/Squid/Versions/v2/2.6/squid-%{version}.tar.bz2
|
||||
Source: http://www.squid-cache.org/Squid/Versions/v3/3.0/squid-%{version}.tar.bz2
|
||||
Source1: FAQ.sgml
|
||||
Source2: squid.init
|
||||
Source3: squid.logrotate
|
||||
@ -26,20 +26,19 @@ Source98: perl-requires-squid.sh
|
||||
# Local patches
|
||||
# Applying upstream patches first makes it less likely that local patches
|
||||
# will break upstream ones.
|
||||
Patch201: squid-2.6.STABLE16-config.patch
|
||||
Patch202: squid-2.5.STABLE4-location.patch
|
||||
Patch203: squid-2.6.STABLE2-build.patch
|
||||
Patch204: squid-2.5.STABLE4-perlpath.patch
|
||||
Patch205: squid-2.5.STABLE12-smb-path.patch
|
||||
#Patch206: squid-2.6.STABLE5-fd-config.patch
|
||||
Patch206: squid-2.6.STABLE16-fd.patch
|
||||
Patch201: squid-3.0.STABLE1-config.patch
|
||||
Patch202: squid-3.0.STABLE1-location.patch
|
||||
Patch203: squid-3.0.STABLE1-build.patch
|
||||
Patch204: squid-3.0.STABLE1-perlpath.patch
|
||||
Patch205: squid-3.0.STABLE1-smb-path.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
Prereq: /sbin/chkconfig logrotate shadow-utils
|
||||
Requires: bash >= 2.0
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): chkconfig
|
||||
BuildPrereq: openjade linuxdoc-tools openldap-devel pam-devel openssl-devel
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(preun): /sbin/service /sbin/chkconfig
|
||||
Requires(postun): /sbin/service
|
||||
BuildRequires: openjade linuxdoc-tools openldap-devel pam-devel openssl-devel
|
||||
Obsoletes: squid-novm
|
||||
|
||||
%description
|
||||
@ -61,11 +60,10 @@ lookup program (dnsserver), a program for retrieving FTP data
|
||||
%patch202 -p1 -b .location
|
||||
%patch203 -p1 -b .build
|
||||
%patch204 -p1 -b .perlpath
|
||||
%patch205 -p1 -b .smb
|
||||
%patch206 -p1 -b .fd
|
||||
%patch205 -p1 -b .smb-path
|
||||
|
||||
%build
|
||||
export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS=-pie ;
|
||||
export CXXFLAGS="-fPIE" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS="-pie" ;
|
||||
%configure \
|
||||
--exec_prefix=/usr \
|
||||
--bindir=%{_sbindir} \
|
||||
@ -73,40 +71,44 @@ lookup program (dnsserver), a program for retrieving FTP data
|
||||
--localstatedir=/var \
|
||||
--datadir=%{_datadir} \
|
||||
--sysconfdir=/etc/squid \
|
||||
--enable-epoll \
|
||||
--enable-snmp \
|
||||
--enable-removal-policies="heap,lru" \
|
||||
--enable-storeio="aufs,coss,diskd,null,ufs" \
|
||||
--enable-ssl \
|
||||
--with-openssl=/usr/kerberos \
|
||||
--enable-delay-pools \
|
||||
--enable-linux-netfilter \
|
||||
--with-pthreads \
|
||||
--enable-ntlm-auth-helpers="SMB,fakeauth" \
|
||||
--enable-external-acl-helpers="ip_user,ldap_group,unix_group,wbinfo_group" \
|
||||
--enable-auth="basic,digest,ntlm" \
|
||||
--enable-digest-auth-helpers="password" \
|
||||
--with-winbind-auth-challenge \
|
||||
--enable-useragent-log \
|
||||
--enable-referer-log \
|
||||
--disable-dependency-tracking \
|
||||
--enable-cachemgr-hostname=localhost \
|
||||
--enable-underscores \
|
||||
--enable-arp-acl \
|
||||
--enable-auth="basic,digest,ntlm" \
|
||||
--enable-basic-auth-helpers="LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL" \
|
||||
--enable-cache-digests \
|
||||
--enable-cachemgr-hostname=localhost \
|
||||
--enable-delay-pools \
|
||||
--enable-digest-auth-helpers="password" \
|
||||
--enable-epoll \
|
||||
--enable-external-acl-helpers="ip_user,ldap_group,unix_group,wbinfo_group" \
|
||||
--enable-icap-client \
|
||||
--enable-ident-lookups \
|
||||
%ifnarch ppc64 ia64 x86_64 s390x
|
||||
--with-large-files \
|
||||
%endif
|
||||
--enable-follow-x-forwarded-for \
|
||||
--enable-linux-netfilter \
|
||||
--enable-ntlm-auth-helpers="SMB,fakeauth" \
|
||||
--enable-referer-log \
|
||||
--enable-removal-policies="heap,lru" \
|
||||
--enable-snmp \
|
||||
--enable-ssl \
|
||||
--enable-storeio="aufs,coss,diskd,null,ufs" \
|
||||
--enable-useragent-log \
|
||||
--enable-wccpv2 \
|
||||
--enable-fd-config \
|
||||
--with-maxfd=16384 \
|
||||
--enable-arp-acl \
|
||||
--with-aio \
|
||||
--with-default-user="squid" \
|
||||
--with-dl \
|
||||
--with-openssl=/usr/kerberos \
|
||||
--with-pthreads \
|
||||
|
||||
# following options are no longer supported
|
||||
# --with-winbind-auth-challenge \
|
||||
# --enable-follow-x-forwarded-for \
|
||||
# --enable-fd-config \
|
||||
# --with-maxfd=16384 \
|
||||
# --enable-underscores \
|
||||
|
||||
|
||||
export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS=-pie ;
|
||||
export CXXFLAGS="-fPIE" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS="-pie" ;
|
||||
make %{?_smp_mflags}
|
||||
|
||||
mkdir faq
|
||||
@ -114,16 +116,13 @@ cp %{SOURCE1} faq
|
||||
cd faq
|
||||
sgml2html FAQ.sgml
|
||||
|
||||
#cd ..
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%makeinstall \
|
||||
sysconfdir=$RPM_BUILD_ROOT/etc/squid \
|
||||
localstatedir=$RPM_BUILD_ROOT/var \
|
||||
bindir=$RPM_BUILD_ROOT/%{_sbindir} \
|
||||
libexecdir=$RPM_BUILD_ROOT/%{_libdir}/squid
|
||||
|
||||
sysconfdir=$RPM_BUILD_ROOT/etc/squid \
|
||||
localstatedir=$RPM_BUILD_ROOT/var \
|
||||
bindir=$RPM_BUILD_ROOT/%{_sbindir} \
|
||||
libexecdir=$RPM_BUILD_ROOT/%{_libdir}/squid
|
||||
echo "
|
||||
#
|
||||
# This is /etc/httpd/conf.d/squid.conf
|
||||
@ -140,8 +139,8 @@ ScriptAlias /Squid/cgi-bin/cachemgr.cgi %{_libdir}/squid/cachemgr.cgi
|
||||
</Location>" > $RPM_BUILD_ROOT/squid.httpd.tmp
|
||||
|
||||
|
||||
ln -s %{_datadir}/squid/errors/English $RPM_BUILD_ROOT/etc/squid/errors
|
||||
ln -s %{_datadir}/squid/icons $RPM_BUILD_ROOT/etc/squid/icons
|
||||
ln -s ../../%{_datadir}/squid/errors/English $RPM_BUILD_ROOT/etc/squid/errors
|
||||
ln -s ../../%{_datadir}/squid/icons $RPM_BUILD_ROOT/etc/squid/icons
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
||||
@ -155,6 +154,9 @@ install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/squid
|
||||
install -m 644 $RPM_BUILD_ROOT/squid.httpd.tmp $RPM_BUILD_ROOT/etc/httpd/conf.d/squid.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/squid
|
||||
mkdir -p $RPM_BUILD_ROOT/var/spool/squid
|
||||
chmod 644 contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl
|
||||
iconv -f ISO88591 -t UTF8 ChangeLog -o ChangeLog.tmp
|
||||
mv -f ChangeLog.tmp ChangeLog
|
||||
|
||||
# remove unpackaged files from the buildroot
|
||||
rm -f $RPM_BUILD_ROOT%{_sbindir}/{RunAccel,RunCache}
|
||||
@ -165,17 +167,15 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc faq/* README ChangeLog QUICKSTART doc/*
|
||||
%doc faq/*\.html README ChangeLog QUICKSTART
|
||||
%doc contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl
|
||||
|
||||
%attr(755,root,root) %dir /etc/squid
|
||||
%attr(755,root,root) %dir %{_libdir}/squid
|
||||
%attr(750,squid,squid) %dir /var/log/squid
|
||||
%attr(750,squid,squid) %dir /var/spool/squid
|
||||
%attr(644,root,root) /etc/pam.d/squid
|
||||
%attr(4750,root,squid) %{_libdir}/squid/ncsa_auth
|
||||
%attr(4750,root,squid) %{_libdir}/squid/pam_auth
|
||||
%attr(755,root,root) %{_sbindir}/cossdump
|
||||
|
||||
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/squid.conf
|
||||
%config(noreplace) %attr(640,root,squid) /etc/squid/squid.conf
|
||||
@ -184,16 +184,18 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%config(noreplace) /etc/sysconfig/squid
|
||||
%config(noreplace) /etc/squid/msntauth.conf
|
||||
%config(noreplace) /etc/squid/mib.txt
|
||||
# These are not noreplace because they are just sample config files
|
||||
%config /etc/squid/msntauth.conf.default
|
||||
%config /etc/squid/squid.conf.default
|
||||
%config /etc/squid/mime.conf.default
|
||||
%config(noreplace) /etc/pam.d/squid
|
||||
%config(noreplace) /etc/logrotate.d/squid
|
||||
|
||||
%config(noreplace) /etc/squid/errors
|
||||
%dir %{_datadir}/squid
|
||||
%config(noreplace) %{_datadir}/squid/errors
|
||||
%config(noreplace) /etc/squid/icons
|
||||
%attr(-,root,root) %{_datadir}/squid/errors
|
||||
%attr(-,root,root) /etc/squid/icons
|
||||
%attr(755,root,root) /etc/rc.d/init.d/squid
|
||||
%attr(755,root,root) /etc/logrotate.d/squid
|
||||
%{_datadir}/squid/icons
|
||||
%{_sbindir}/squid
|
||||
%{_sbindir}/squidclient
|
||||
@ -210,11 +212,11 @@ if ! getent passwd squid >/dev/null 2>&1 ; then
|
||||
fi
|
||||
|
||||
for i in /var/log/squid /var/spool/squid ; do
|
||||
if [ -d $i ] ; then
|
||||
for adir in `find $i -maxdepth 0 \! -user squid`; do
|
||||
chown -R squid:squid $adir
|
||||
done
|
||||
fi
|
||||
if [ -d $i ] ; then
|
||||
for adir in `find $i -maxdepth 0 \! -user squid`; do
|
||||
chown -R squid:squid $adir
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
@ -313,14 +315,14 @@ fi
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ] ; then
|
||||
service squid stop >/dev/null 2>&1
|
||||
rm -f /var/log/squid/*
|
||||
/sbin/chkconfig --del squid
|
||||
service squid stop >/dev/null 2>&1
|
||||
rm -f /var/log/squid/*
|
||||
/sbin/chkconfig --del squid
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ "$1" -ge "1" ] ; then
|
||||
service squid condrestart >/dev/null 2>&1
|
||||
service squid condrestart >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
%triggerin -- samba-common
|
||||
@ -328,6 +330,9 @@ fi
|
||||
chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Wed Jan 23 2008 Martin Nagy <mnagy@redhat.com> - 7:3.0.STABLE1-1
|
||||
- upgrade to latest upstream 3.0.STABLE1
|
||||
|
||||
* Tue Dec 04 2007 Martin Bacovsky <mbacovsk@redhat.com> - 2.6.STABLE17-1
|
||||
- upgrade to latest upstream 2.6.STABLE17
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user