summaryrefslogtreecommitdiff
path: root/packages/net-proxy/squid/files/squid-4.1-defaults.patch
blob: b2ae0ebf8df86ad80c05f255e5860abf5fbac756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Source: Wulf C. Krueger <philantrop@exherbo.org>
Upstream: Want it as-is.
Reason:
    - Respect *FLAGS
    - Fix pkg-config
    - Re-define dirs: /usr/local/squid -> FHS

diff -Naur squid-4.1/configure.ac squid-4.1.new/configure.ac
--- squid-4.1/configure.ac	2018-07-02 05:32:06.000000000 +0200
+++ squid-4.1.new/configure.ac	2018-07-27 12:41:10.363253817 +0200
@@ -32,9 +32,9 @@
 PRESET_LDFLAGS="$LDFLAGS"
 
 dnl Set default LDFLAGS
-if test "x$LDFLAGS" = "x" ; then
-  LDFLAGS="-g"
-fi
+dnl if test "x$LDFLAGS" = "x" ; then
+dnl   LDFLAGS="-g"
+dnl fi
 
 # Check for GNU cc
 AC_PROG_CC
@@ -2768,7 +2768,7 @@
 ])
 AS_IF([test "x$with_cppunit" != "xno"],[
   PKG_CHECK_MODULES([LIBCPPUNIT],[cppunit],[
-    squid_cv_cppunit_version="`pkg-config cppunit --version`"
+    squid_cv_cppunit_version="`$PKG_CONFIG cppunit --version`"
     AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version])
     AS_UNSET(squid_cv_cppunit_version)
 
diff -Naur squid-4.1/QUICKSTART squid-4.1.new/QUICKSTART
--- squid-4.1/QUICKSTART	2018-07-02 05:26:07.000000000 +0200
+++ squid-4.1.new/QUICKSTART	2018-07-27 11:59:37.083496051 +0200
@@ -10,10 +10,9 @@
 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
-for now.  We assume you have installed Squid in the default location:
-/usr/local/squid
+for now.
 
-Uncomment and edit the following lines in /usr/local/squid/etc/squid.conf:
+Uncomment and edit the following lines in /etc/squid/squid.conf:
 
 ==============================================================================
 
@@ -52,7 +51,7 @@
     as after startup (typically "nobody" and "nogroup").  Do not use
     "root", for security reasons.
 
-cache_dir ufs /usr/local/squid/var/cache 100 16 256
+cache_dir ufs /var/cache/squid 100 16 256
 
     Add here (first number, here 100) the amount of hard disk space 
     (in megabytes) to devote to caching.
@@ -80,12 +79,12 @@
 line TWICE:
 
 To create any disk cache_dir configured:
-    % /usr/local/squid/sbin/squid -z
+    % /usr/@EXHOST@/bin/squid -z
 
 To start squid:
-    % /usr/local/squid/sbin/squid 
+    % /usr/@EXHOST@/bin/squid 
 
-Check in the cache.log (/usr/local/squid/var/logs/cache.log) that
+Check in the cache.log (/var/log/squid/cache.log) that
 everything is all right.
 
 Once Squid created all its files (it can take several minutes on some
diff -Naur squid-4.1/scripts/check_cache.pl squid-4.1.new/scripts/check_cache.pl
--- squid-4.1/scripts/check_cache.pl	2018-07-02 05:26:07.000000000 +0200
+++ squid-4.1.new/scripts/check_cache.pl	2018-07-27 12:00:23.167522915 +0200
@@ -35,7 +35,7 @@
 	exit;
 }
 
-$squidconf = $opt_c || "/usr/local/squid/etc/squid.conf";
+$squidconf = $opt_c || "/etc/squid/squid.conf";
 open (squidconf) || die "$squidconf: $!\n";
 $no_cachedir = 0;
 $swaplog = '';
@@ -54,7 +54,7 @@
 	}
 }
 close (squidconf);
-push (@cachedir, '/usr/local/squid/cache') unless ($#cachedir > $[-1);
+push (@cachedir, '/var/cache/squid') unless ($#cachedir > $[-1);
 $swaplog = $cachedir[0] . '/log' unless ($swaplog);
 $no_cachedir = $#cachedir + 1;
 print "$no_cachedir CACHE DIRS: ", join(' ', @cachedir), "\n" if ($opt_d);
diff -Naur squid-4.1/scripts/fileno-to-pathname.pl squid-4.1.new/scripts/fileno-to-pathname.pl
--- squid-4.1/scripts/fileno-to-pathname.pl	2018-07-02 05:26:07.000000000 +0200
+++ squid-4.1.new/scripts/fileno-to-pathname.pl	2018-07-27 12:00:42.580533539 +0200
@@ -27,7 +27,7 @@
 my $SWAP_DIR_SHIFT=24;
 my $SWAP_FILE_MASK=0x00FFFFFF;
 
-my $CF = $opt_c || '/usr/local/squid/etc/squid.conf';
+my $CF = $opt_c || '/etc/squid/squid.conf';
 &usage unless (open (CF,"<$CF"));
 
 my $ncache_dirs = 0;
diff -Naur squid-4.1/src/acl/external/session/ext_session_acl.8 squid-4.1.new/src/acl/external/session/ext_session_acl.8
--- squid-4.1/src/acl/external/session/ext_session_acl.8	2018-07-02 05:26:07.000000000 +0200
+++ squid-4.1.new/src/acl/external/session/ext_session_acl.8	2018-07-27 11:57:01.494408167 +0200
@@ -79,7 +79,7 @@
 .PP
 Passive session configuration example using the default automatic mode
 .if !'po4a'hide' .RS
-.if !'po4a'hide' .B external_acl_type session ttl=300 negative_ttl=0 children=1 concurrency=200 %LOGIN /usr/local/squid/libexec/ext_session_acl
+.if !'po4a'hide' .B external_acl_type session ttl=300 negative_ttl=0 children=1 concurrency=200 %LOGIN /usr/@EXHOST@/squid/libexec/ext_session_acl
 .if !'po4a'hide' .br
 .if !'po4a'hide' .B acl session external session
 .if !'po4a'hide' .br
diff -Naur squid-4.1/src/acl/external/unix_group/ext_unix_group_acl.8 squid-4.1.new/src/acl/external/unix_group/ext_unix_group_acl.8
--- squid-4.1/src/acl/external/unix_group/ext_unix_group_acl.8	2018-07-02 05:26:07.000000000 +0200
+++ squid-4.1.new/src/acl/external/unix_group/ext_unix_group_acl.8	2018-07-27 11:57:26.943406607 +0200
@@ -46,7 +46,7 @@
 .I group3
 .
 .if !'po4a'hide' .RS
-.if !'po4a'hide' .B external_acl_type unix_group %LOGIN /usr/local/squid/libexec/ext_unix_group_acl -p
+.if !'po4a'hide' .B external_acl_type unix_group %LOGIN /usr/@EXHOST@/squid/libexec/ext_unix_group_acl -p
 .if !'po4a'hide' .br
 .if !'po4a'hide' .B acl usergroup1 external unix_group group1
 .if !'po4a'hide' .br
diff -Naur squid-4.1/src/ipc/Makefile.am squid-4.1.new/src/ipc/Makefile.am
--- squid-4.1/src/ipc/Makefile.am	2018-07-02 05:26:07.000000000 +0200
+++ squid-4.1.new/src/ipc/Makefile.am	2018-07-27 12:10:49.841732170 +0200
@@ -66,7 +66,7 @@
 	mem/Segment.cc \
 	mem/Segment.h
 
-DEFS += -DDEFAULT_STATEDIR=\"$(localstatedir)/run/squid\"
+DEFS += -DDEFAULT_STATEDIR=\"/run/squid\"
 
 install-data-local:
-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/squid;
+	$(mkinstalldirs) $(DESTDIR)/run/squid;
diff -Naur squid-4.1/src/log/access_log.cc squid-4.1.new/src/log/access_log.cc
--- squid-4.1/src/log/access_log.cc	2018-07-02 05:26:07.000000000 +0200
+++ squid-4.1.new/src/log/access_log.cc	2018-07-27 12:11:31.186739537 +0200
@@ -404,7 +404,7 @@
 
 #if HEADERS_LOG
 
-    headerslog = logfileOpen("/usr/local/squid/logs/headers.log", 512);
+    headerslog = logfileOpen("/var/log/squid/headers.log", 512);
 
     assert(NULL != headerslog);
 
diff -Naur squid-4.1/tools/cachemgr.cgi.8 squid-4.1.new/tools/cachemgr.cgi.8
--- squid-4.1/tools/cachemgr.cgi.8	2018-07-02 05:39:09.000000000 +0200
+++ squid-4.1.new/tools/cachemgr.cgi.8	2018-07-27 12:14:45.402768335 +0200
@@ -21,7 +21,7 @@
 .PP
 .if !'po4a'hide' .I ./cachemgr.conf
 .br
-.if !'po4a'hide' .I /usr/local/squid/etc/cachemgr.conf
+.if !'po4a'hide' .I /etc/squid/cachemgr.conf
 .RS
 The access configuration file defining which Squid servers may
 be managed via this
diff -Naur squid-4.1/tools/purge/purge.1 squid-4.1.new/tools/purge/purge.1
--- squid-4.1/tools/purge/purge.1	2018-07-02 05:26:07.000000000 +0200
+++ squid-4.1.new/tools/purge/purge.1	2018-07-27 12:16:43.338782051 +0200
@@ -41,7 +41,7 @@
 by parsing squid.conf. It knows about both ways of Squid\-2 cache_dir
 specifications, and will automatically try to use the correct one.
 .br
-default: /usr/local/squid/etc/squid.conf
+default: /etc/squid/squid.conf
 .
 .if !'po4a'hide' .TP
 .if !'po4a'hide' .B \-C cf