Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2018 02:43:44 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r476717 - in head/archivers/urbackup-client: . files
Message-ID:  <201808090243.w792hiXP093361@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Thu Aug  9 02:43:44 2018
New Revision: 476717
URL: https://svnweb.freebsd.org/changeset/ports/476717

Log:
  archivers/urbackup-client: update 2.2.5 -> 2.2.6
  
  - Add a default configuration file
  - Add log rotation via newsyslog
  
  PR:		227854
  Submitted by:	freebsd@coombscloud.com (maintainer)
  Reviewed by:	koobs
  Relnotes:	https://www.urbackup.org/client_changelog.html

Added:
  head/archivers/urbackup-client/files/patch-client_ConfigPath.cpp   (contents, props changed)
  head/archivers/urbackup-client/files/patch-client_stringtools.cpp   (contents, props changed)
  head/archivers/urbackup-client/files/patch-client_stringtools.h   (contents, props changed)
  head/archivers/urbackup-client/files/urbackupclient.conf-newsyslog   (contents, props changed)
  head/archivers/urbackup-client/files/urbackupclient.conf.sample-daemon.in   (contents, props changed)
Modified:
  head/archivers/urbackup-client/Makefile
  head/archivers/urbackup-client/distinfo
  head/archivers/urbackup-client/files/pkg-message.in
  head/archivers/urbackup-client/files/urbackup_client.in
  head/archivers/urbackup-client/pkg-plist

Modified: head/archivers/urbackup-client/Makefile
==============================================================================
--- head/archivers/urbackup-client/Makefile	Thu Aug  9 02:18:00 2018	(r476716)
+++ head/archivers/urbackup-client/Makefile	Thu Aug  9 02:43:44 2018	(r476717)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	urbackup-client
-DISTVERSION=	2.2.5
+DISTVERSION=	2.2.6
 CATEGORIES=	archivers
 MASTER_SITES=	https://hndl.urbackup.org/Client/${DISTVERSION}/
 
@@ -22,7 +22,7 @@ GUI_LIB_DEPENDS+=	libwx_baseu-3.0.so:x11-toolkits/wxgt
 USERS=		urbackup
 GROUPS=		urbackup
 
-USES=		gettext
+USES=		gettext dos2unix
 GNU_CONFIGURE=	YES
 CPPFLAGS+=	-I${PREFIX}/include
 LDFLAGS+=	-L${PREFIX}/lib
@@ -38,7 +38,7 @@ CONFIGURE_ARGS+=	--enable-headless
 .endif
 
 USE_RC_SUBR=	urbackup_client
-SUB_FILES=	pkg-message
+SUB_FILES=	pkg-message urbackupclient.conf.sample-daemon
 
 CONFFILES=	mariadbdump.conf \
 		mariadbxtrabackup.conf \
@@ -58,6 +58,7 @@ do-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/urbackup/scripts
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc/urbackup
 	${MKDIR} ${STAGEDIR}/var/urbackup/data
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
 
 	${INSTALL_PROGRAM} ${WRKSRC}/urbackupclientctl \
 		${STAGEDIR}${PREFIX}/bin
@@ -67,6 +68,12 @@ do-install:
 
 	(cd ${WRKSRC}/urbackupclient/backup_scripts && 	${COPYTREE_BIN} . \
 		${STAGEDIR}${PREFIX}/share/urbackup/scripts "! -name *\.conf")
+
+	${INSTALL_DATA} ${WRKDIR}/urbackupclient.conf.sample-daemon \
+		${STAGEDIR}${PREFIX}/etc/urbackup/urbackupclient.conf.sample
+
+	${INSTALL_DATA} ${FILESDIR}/urbackupclient.conf-newsyslog \
+		${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/urbackupclient.conf
 
 .for f in ${CONFFILES}
 	${INSTALL_DATA} ${WRKSRC}/urbackupclient/backup_scripts/${f} \

Modified: head/archivers/urbackup-client/distinfo
==============================================================================
--- head/archivers/urbackup-client/distinfo	Thu Aug  9 02:18:00 2018	(r476716)
+++ head/archivers/urbackup-client/distinfo	Thu Aug  9 02:43:44 2018	(r476717)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1521902273
-SHA256 (urbackup-client-2.2.5.tar.gz) = 125180db455c6dd626e1facae77bad2f92b5f2570adfa7e4beeb922f39586d2c
-SIZE (urbackup-client-2.2.5.tar.gz) = 3368914
+TIMESTAMP = 1533504834
+SHA256 (urbackup-client-2.2.6.tar.gz) = 95d5a8d4e8016c23171f12340a7fc28cd8d275d6c815604f28e978a4256eff6f
+SIZE (urbackup-client-2.2.6.tar.gz) = 3370637

Added: head/archivers/urbackup-client/files/patch-client_ConfigPath.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/urbackup-client/files/patch-client_ConfigPath.cpp	Thu Aug  9 02:43:44 2018	(r476717)
@@ -0,0 +1,24 @@
+Build fails on FreeBSD due to a casting error from the wxString Class when using
+wx30-gtk2-3.0.4_1. This patch adds a cast (static_cast<const wchar_t*>) that 
+resolves the error.
+
+--- client/ConfigPath.cpp.orig	2018-08-09 00:18:20.807732000 +0000
++++ client/ConfigPath.cpp	2018-08-09 00:19:21.531197000 +0000
+@@ -60,7 +60,7 @@
+ 		listbox->Append(dirs[i].path);
+ 		if(dirs[i].name.IsEmpty())
+ 		{
+-			dirs[i].name=getDefaultDirname(dirs[i].path.wc_str());
++			dirs[i].name=getDefaultDirname(static_cast<const wchar_t*>(dirs[i].path.wc_str()));
+ 		}
+ 	}
+ 
+@@ -93,7 +93,7 @@
+ 		listbox->Append(ed.GetPath() );
+ 		SBackupDir ad;
+ 		ad.path=ed.GetPath();
+-		ad.name=getDefaultDirname(ad.path.wc_str());
++		ad.name=getDefaultDirname(static_cast<const wchar_t*>(ad.path.wc_str()));
+ 		ad.group=0;
+ 		ad.id=0;
+ 		dirs.push_back(ad);

Added: head/archivers/urbackup-client/files/patch-client_stringtools.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/urbackup-client/files/patch-client_stringtools.cpp	Thu Aug  9 02:43:44 2018	(r476717)
@@ -0,0 +1,49 @@
+Build fails on FreeBSD due to urbackup's local definitions of isnumber()
+conflicting with a library function. This patch renames the port's definition to
+resolve the conflict. Analogous changes are also made in client/stringtools.h
+
+--- client/stringtools.cpp.orig	2018-08-09 00:15:57.062820000 +0000
++++ client/stringtools.cpp	2018-08-09 00:16:38.573398000 +0000
+@@ -825,7 +825,7 @@
+ //--------------------------------------------------------------------
+ /**
+ */
+-bool isnumber(char ch)
++bool isnumber_local(char ch)
+ {
+ 	if( ch>=48 && ch <=57 )
+ 		return true;
+@@ -848,7 +848,7 @@
+ //--------------------------------------------------------------------
+ /**
+ */
+-bool isnumber(wchar_t ch)
++bool isnumber_local(wchar_t ch)
+ {
+ 	if( ch>=48 && ch <=57 )
+ 		return true;
+@@ -928,7 +928,7 @@
+ 	bool start=false;
+ 	for(size_t i=0;i<pStr.size();++i)
+ 	{
+-		if( isnumber(pStr[i] ) )
++		if( isnumber_local(pStr[i] ) )
+ 		{
+ 			num+=pStr[i];
+ 			start=true;
+@@ -1445,7 +1445,7 @@
+ {
+ 	for(size_t i=0;i<str.size();++i)
+ 	{
+-		if(isletter(str[i])==false && isnumber(str[i])==false)
++		if(isletter(str[i])==false && isnumber_local(str[i])==false)
+ 		{
+ 			str[i]=rch;
+ 		}
+@@ -1497,4 +1497,4 @@
+ 		}
+ 	}
+ 	return ret;
+-}
+\ No newline at end of file
++}

Added: head/archivers/urbackup-client/files/patch-client_stringtools.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/urbackup-client/files/patch-client_stringtools.h	Thu Aug  9 02:43:44 2018	(r476717)
@@ -0,0 +1,18 @@
+Build fails on FreeBSD due to urbackup's local definitions of isnumber() 
+conflicting with a library function. This patch renames the port's definition to 
+resolve the conflict. Analogous changes are also made in client/stringtools.cpp
+
+--- client/stringtools.h.orig	2018-08-09 00:27:09.254786000 +0000
++++ client/stringtools.h	2018-08-09 00:27:23.137354000 +0000
+@@ -69,9 +69,9 @@
+ void Tokenize(std::string& str, std::vector<std::string> &tokens, std::string seps);
+ void Tokenize(std::wstring& str, std::vector<std::wstring> &tokens, std::wstring seps);
+ void TokenizeMail(std::string& str, std::vector<std::string> &tokens, std::string seps);
+-bool isnumber(char ch);
++bool isnumber_local(char ch);
+ bool isletter(char ch);
+-bool isnumber(wchar_t ch);
++bool isnumber_local(wchar_t ch);
+ bool isletter(wchar_t ch);
+ void strupper(std::string *pStr);
+ void strupper(std::wstring *pStr);

Modified: head/archivers/urbackup-client/files/pkg-message.in
==============================================================================
--- head/archivers/urbackup-client/files/pkg-message.in	Thu Aug  9 02:18:00 2018	(r476716)
+++ head/archivers/urbackup-client/files/pkg-message.in	Thu Aug  9 02:43:44 2018	(r476717)
@@ -9,6 +9,12 @@ sysrc urbackup_client_enable=YES
 START MANUALLY:
 service urbackup_client start
 
+The client daemon's configuration file is located at:
+%%PREFIX%%/etc/urbackup/urbackupclient.conf
+
+Log rotation can be configured at:
+%%PREFIX%%/etc/newsyslog.conf.d/urbackupclient.conf
+
 If the GTK2 GUI was built, it can be launched via:
 %%PREFIX%%/bin/urbackupclientctl
 

Modified: head/archivers/urbackup-client/files/urbackup_client.in
==============================================================================
--- head/archivers/urbackup-client/files/urbackup_client.in	Thu Aug  9 02:18:00 2018	(r476716)
+++ head/archivers/urbackup-client/files/urbackup_client.in	Thu Aug  9 02:43:44 2018	(r476717)
@@ -25,6 +25,6 @@ load_rc_config $name
 command=%%PREFIX%%/sbin/urbackupclientbackend
 pidfile=/var/run/urbackupclientbackend.pid
 
-command_args="-d -w $pidfile"
+command_args="-d -w $pidfile -c %%PREFIX%%/etc/urbackup/urbackupclient.conf"
 
 run_rc_command "$1"

Added: head/archivers/urbackup-client/files/urbackupclient.conf-newsyslog
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/urbackup-client/files/urbackupclient.conf-newsyslog	Thu Aug  9 02:43:44 2018	(r476717)
@@ -0,0 +1,2 @@
+# logfilename			[owner:group]	mode	count	size(kb)	when	flags	[/pid_file]				[sig_num]
+/var/log/urbackupclient.log	root:wheel	644  	10	5120		*	JC	/var/run/urbackupclientbackend.pid

Added: head/archivers/urbackup-client/files/urbackupclient.conf.sample-daemon.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/urbackup-client/files/urbackupclient.conf.sample-daemon.in	Thu Aug  9 02:43:44 2018	(r476717)
@@ -0,0 +1,29 @@
+#
+# This is parsed as a key=value file
+#
+
+#logfile name
+#If you change the LOGFILE, you should also change the "logfilename" in %%PREFIX%%/etc/newsyslog.conf.d/urbackupclient.conf
+LOGFILE="/var/log/urbackupclient.log"
+
+#Either debug,warn,info or error
+LOGLEVEL=warn
+
+#Tmp file directory
+DAEMON_TMPDIR="/tmp"
+
+# Valid settings:
+#
+# "client-confirms": If you have the GUI component the currently active user
+#                    will need to confirm restores from the web interface.
+#                    If you have no GUI component this will cause restores
+#                    from the server web interface to not work
+# "server-confirms": The server will ask the user starting the restore on 
+#                    the web interface for confirmation
+# "disabled":        Restores via web interface are disabled.
+#                    Restores via urbackupclientctl still work
+#
+RESTORE=disabled
+
+#If true client will not bind to any external network ports (either true or false)
+INTERNET_ONLY=false

Modified: head/archivers/urbackup-client/pkg-plist
==============================================================================
--- head/archivers/urbackup-client/pkg-plist	Thu Aug  9 02:18:00 2018	(r476716)
+++ head/archivers/urbackup-client/pkg-plist	Thu Aug  9 02:43:44 2018	(r476717)
@@ -2,11 +2,12 @@ bin/urbackupclientctl
 %%GUI%%bin/urbackupclientgui
 sbin/urbackupclientbackend
 @(,,0444) man/man1/urbackupclientbackend.1.gz
-@mode 0700
+@mode 0600
 @sample etc/urbackup/mariadbdump.conf.sample
 @sample etc/urbackup/mariadbxtrabackup.conf.sample
 @sample etc/urbackup/postgresbase.conf.sample
 @sample etc/urbackup/postgresqldump.conf.sample
+@mode 0700
 share/urbackup/scripts/list
 share/urbackup/scripts/mariadbdump
 share/urbackup/scripts/mariadbpostbackup
@@ -20,6 +21,8 @@ share/urbackup/scripts/restore-mariadbbackup
 share/urbackup/scripts/setup-mariadbbackup
 share/urbackup/scripts/setup-postgresbackup
 @mode 0644
+@sample etc/urbackup/urbackupclient.conf.sample
+etc/newsyslog.conf.d/urbackupclient.conf
 share/urbackup/updates_h.dat
 %%GUI%%share/urbackup/info.txt
 %%GUI%%share/urbackup/logo1.png



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808090243.w792hiXP093361>