SHA256
1
0
forked from pool/squidGuard

9 Commits

Author SHA256 Message Date
6c779a247f Accepting request 1291778 from server:proxy
OBS-URL: https://build.opensuse.org/request/show/1291778
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/squidGuard?expand=0&rev=34
2025-07-11 19:29:33 +00:00
Ferdinand Thiessen
94bb99d19c - Fix builds with GCC 15
* fix-build-gcc15.patch

OBS-URL: https://build.opensuse.org/package/show/server:proxy/squidGuard?expand=0&rev=44
2025-07-10 20:16:56 +00:00
82b5a686fd Accepting request 1222481 from server:proxy
- config_exit.patch: fix build failure due to undefined exit() in
  configure.ac scripts
- types.patch: fix types in mysql types

OBS-URL: https://build.opensuse.org/request/show/1222481
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/squidGuard?expand=0&rev=33
2024-11-07 17:17:02 +00:00
835255d197 OBS-URL: https://build.opensuse.org/package/show/server:proxy/squidGuard?expand=0&rev=42 2024-11-07 14:59:31 +00:00
c7ceb9d332 OBS-URL: https://build.opensuse.org/package/show/server:proxy/squidGuard?expand=0&rev=41 2024-11-07 14:57:18 +00:00
8cf063220e OBS-URL: https://build.opensuse.org/package/show/server:proxy/squidGuard?expand=0&rev=40 2024-11-07 14:55:47 +00:00
4f43f3bd15 OBS-URL: https://build.opensuse.org/package/show/server:proxy/squidGuard?expand=0&rev=39 2024-11-07 14:52:13 +00:00
a25f674af8 - types.patch: fix types in mysql types
OBS-URL: https://build.opensuse.org/package/show/server:proxy/squidGuard?expand=0&rev=38
2024-11-07 14:49:49 +00:00
862eece4d2 - config_exit.patch: fix build failure due to undefined exit() in
configure.ac scripts

OBS-URL: https://build.opensuse.org/package/show/server:proxy/squidGuard?expand=0&rev=37
2024-11-07 12:29:51 +00:00
5 changed files with 152 additions and 1 deletions

68
config_exit.patch Normal file
View 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
View 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));

View File

@@ -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>

View File

@@ -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
View 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;
+ }
}
}
}