forked from pool/squidGuard
Compare commits
9 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 6c779a247f | |||
|
|
94bb99d19c | ||
| 82b5a686fd | |||
| 835255d197 | |||
| c7ceb9d332 | |||
| 8cf063220e | |||
| 4f43f3bd15 | |||
| a25f674af8 | |||
| 862eece4d2 |
68
config_exit.patch
Normal file
68
config_exit.patch
Normal file
@@ -0,0 +1,68 @@
|
||||
Fix configure failure in configure due to undefined `exit`
|
||||
|
||||
Index: maintain_squidguard-upstream-1.6.0/configure.ac
|
||||
===================================================================
|
||||
--- maintain_squidguard-upstream-1.6.0.orig/configure.ac
|
||||
+++ maintain_squidguard-upstream-1.6.0/configure.ac
|
||||
@@ -237,7 +237,7 @@ if test "$with_ldap" = "yes"; then
|
||||
{
|
||||
LDAP *p;
|
||||
p = ldap_init("localhost", LDAP_PORT);
|
||||
- exit(0);
|
||||
+ return 0;
|
||||
}
|
||||
]])],,[
|
||||
echo
|
||||
@@ -271,7 +271,7 @@ if test "$with_mysql" != "no"; then
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for mysql)
|
||||
- MYSQLLINE=" | USERQUERY WORD WORD WORD WORD { sgSourceUserQuery(\$2,\$3,\$4,\$5); }"
|
||||
+ MYSQLLINE=" | USERQUERY WORD { sgSourceUserQuery(\$2); }"
|
||||
|
||||
for i in $mysql_directory; do
|
||||
if test -r $i/include/mysql/mysql.h; then
|
||||
@@ -355,8 +355,8 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#endif
|
||||
ver = major + ((float) minor / 1000);
|
||||
if (ver >= 2.006)
|
||||
- exit (0);
|
||||
- exit (1);
|
||||
+ return 0;
|
||||
+ return 1;
|
||||
}
|
||||
]])],
|
||||
[db_ok_version=yes],
|
||||
@@ -390,8 +390,8 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#endif
|
||||
ver = major + ((float) minor / 1000);
|
||||
if (ver > 2.007 && ver < 3.002)
|
||||
- exit (1);
|
||||
- exit (0);
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
}
|
||||
]])],
|
||||
[db_ok_version=yes],
|
||||
@@ -426,8 +426,8 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#endif
|
||||
ver = major + ((float) minor / 1000);
|
||||
if (ver >= 3.002)
|
||||
- exit (0);
|
||||
- exit (1);
|
||||
+ return 0;
|
||||
+ return 1;
|
||||
}
|
||||
]])],
|
||||
[dbg2_ok_version=yes],
|
||||
@@ -454,8 +454,8 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#endif
|
||||
ver = major + ((float) minor / 1000);
|
||||
if (ver >= 4.002)
|
||||
- exit (0);
|
||||
- exit (1);
|
||||
+ return 0;
|
||||
+ return 1;
|
||||
}
|
||||
]])],
|
||||
[dbg3_ok_version=yes],
|
||||
22
fix-build-gcc15.patch
Normal file
22
fix-build-gcc15.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
Index: b/src/sg.h.in
|
||||
===================================================================
|
||||
--- a/src/sg.h.in
|
||||
+++ b/src/sg.h.in
|
||||
@@ -360,7 +360,7 @@ char *sgStripUrl __P((char *));
|
||||
void sgEmergency __P(());
|
||||
void sgReloadConfig __P(());
|
||||
void sgHandlerSigHUP __P((int));
|
||||
-void sgAlarm __P(());
|
||||
+void sgAlarm __P((int));
|
||||
int sgStrRcmp __P((char *, char *));
|
||||
int sgStrRncmp __P((char *, char *, int));
|
||||
int sgDomStrRncmp __P((char *, char *, int));
|
||||
@@ -431,7 +431,7 @@ void sgFreePatternBuffer __P((struct s
|
||||
int sgRegExpMatch __P((struct sgRegExp *, char *));
|
||||
char *sgRegExpSubst __P((struct sgRegExp *, char *));
|
||||
|
||||
-void sgDbInit __P(());
|
||||
+void sgDbInit __P((struct sgDb *Db, char *file));
|
||||
void sgDbLoadTextFile __P((struct sgDb *, char *, int));
|
||||
void sgDbUpdate __P((struct sgDb *, char *, char *, size_t));
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 10 17:09:16 UTC 2025 - Antonio Teixeira <antonio.teixeira@suse.com>
|
||||
|
||||
- Fix builds with GCC 15
|
||||
* fix-build-gcc15.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 7 12:27:41 UTC 2024 - Adam Majer <adam.majer@suse.de>
|
||||
|
||||
- config_exit.patch: fix build failure due to undefined exit() in
|
||||
configure.ac scripts
|
||||
- types.patch: fix types in mysql types
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 28 12:51:38 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package squidGuard
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -37,6 +37,9 @@ Source3: blocked.gif
|
||||
Patch0: squidGuard-mysql.patch
|
||||
Patch1: squidGuard-config.patch
|
||||
Patch2: default_config_pathfixes.patch
|
||||
Patch3: config_exit.patch
|
||||
Patch4: types.patch
|
||||
Patch5: fix-build-gcc15.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: db-devel
|
||||
BuildRequires: flex
|
||||
@@ -137,7 +140,10 @@ cp ANNOUNCE CHANGELOG FAQ README* %{buildroot}/%{_defaultdocdir}/%{name}/
|
||||
%config(noreplace) %attr(660, squid, squid) %{_localstatedir}/lib/squidGuard/db/blacklist/*
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%{_sbindir}/*
|
||||
%dir /srv/www
|
||||
%dir /srv/www/htdocs
|
||||
%dir %{imgdir}
|
||||
%dir %{cgidir}
|
||||
%{cgidir}/*
|
||||
%{imgdir}/*
|
||||
|
||||
|
||||
42
types.patch
Normal file
42
types.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
Fix type
|
||||
|
||||
Index: maintain_squidguard-upstream-1.6.0/src/sg.y.in
|
||||
===================================================================
|
||||
--- maintain_squidguard-upstream-1.6.0.orig/src/sg.y.in
|
||||
+++ maintain_squidguard-upstream-1.6.0/src/sg.y.in
|
||||
@@ -46,6 +46,8 @@ static int date_switch = 0;
|
||||
|
||||
int numSource = 0;
|
||||
|
||||
+void sgSourceUserQuery(char *query);
|
||||
+
|
||||
void rfc1738_unescape(char *);
|
||||
void
|
||||
rfc1738_unescape(char *s)
|
||||
@@ -720,7 +722,7 @@ void sgSourceUserQuery(query)
|
||||
char *dbhome = NULL, *f;
|
||||
MYSQL *conn;
|
||||
MYSQL_RES *res;
|
||||
- MYSQL_ROW *row;
|
||||
+ MYSQL_ROW row;
|
||||
char line[MAX_BUF];
|
||||
char *my_query, *my_user, *my_pass, *my_db;
|
||||
char *str=";";
|
||||
@@ -2195,11 +2197,12 @@ void sgTimeSetAcl()
|
||||
for(rew = Rewrite; rew != NULL; rew = rew->next){
|
||||
if(rew->time != NULL){
|
||||
rew->active = rew->time->active;
|
||||
- if(rew->within == OUTSIDE)
|
||||
- if(rew->active)
|
||||
- rew->active = 0;
|
||||
- else
|
||||
- rew->active = 1;
|
||||
+ if(rew->within == OUTSIDE) {
|
||||
+ if(rew->active)
|
||||
+ rew->active = 0;
|
||||
+ else
|
||||
+ rew->active = 1;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user