On Thu, Feb 22, 2018 at 12:05:00PM +0000, Stuart Henderson wrote:
> On 2018/02/22 04:59, Jiri B wrote:
> > On Thu, Feb 22, 2018 at 10:21:54AM +0100, Landry Breuil wrote:
> > > As for the update itself, i have no opinion. You decided to use 2.1 on
> > > your clients, you assume the choice...
> >
> > Do you want to keep old stable? Should I create new 'branch'
> > for 2.1.x or just update current port?
>
> Since a client may be stuck with an old server that is difficult to get
> updated, carrying multiple branches might be useful. And since this is
> unlikely to be a build dep of other ports, there should be no requirement
> to avoid a conflict between the two.
I have no idea how to solve this - no conflict, thus one could have
old server and would like to install new client or vice-versa.
What to do with configuration files? I have no opinion.
Anyway, here's my current diff.
- I did not touch old port, just move it and made branches
- 2.1.28 does not need some old patches and it uses autoconf/automake
now
(I'm still learning, so please apologize my mistakes.)
Jiri
diff --git sysutils/burp/2.0/Makefile sysutils/burp/2.0/Makefile
new file mode 100644
index 00000000000..329384ba03f
--- /dev/null
+++ sysutils/burp/2.0/Makefile
@@ -0,0 +1,13 @@
+# $OpenBSD: Makefile,v 1.3 2018/02/09 10:41:45 nigel Exp $
+
+GH_TAGNAME = 2.0.54
+REVISION = 1
+
+post-patch:
+ ${SUBST_CMD} ${WRKSRC}/src/client/monitor/status_client_ncurses.c
+
+post-install:
+ @rm -Rf ${WRKINST}/${SYSCONFDIR}/burp/autoupgrade
+ @mv ${WRKINST}/${SYSCONFDIR}/burp ${PREFIX}/share/examples/burp
+
+.include <bsd.port.mk>
diff --git sysutils/burp/2.0/distinfo sysutils/burp/2.0/distinfo
new file mode 100644
index 00000000000..8261a2d01ba
--- /dev/null
+++ sysutils/burp/2.0/distinfo
@@ -0,0 +1,2 @@
+SHA256 (burp-2.0.54.tar.bz2) = rhBHBYbx/uRVbqrls8UreM/A6sQQn0uCU8VJ5/8ADYY=
+SIZE (burp-2.0.54.tar.bz2) = 754566
diff --git sysutils/burp/2.0/patches/patch-Makefile_in
sysutils/burp/2.0/patches/patch-Makefile_in
new file mode 100644
index 00000000000..045e0419c45
--- /dev/null
+++ sysutils/burp/2.0/patches/patch-Makefile_in
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Makefile_in,v 1.1.1.1 2017/11/03 11:31:01 landry Exp $
+
+Index: Makefile.in
+--- Makefile.in.orig
++++ Makefile.in
+@@ -625,7 +625,7 @@ sbindir = @sbindir@
+ scriptdir = @scriptdir@
+ sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
+-sysconfdir = @sysconfdir@
++sysconfdir = @sysconfdir@/burp
+ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
diff --git sysutils/burp/2.0/patches/patch-configs_client_burp_conf_in
sysutils/burp/2.0/patches/patch-configs_client_burp_conf_in
new file mode 100644
index 00000000000..4b0fe24292f
--- /dev/null
+++ sysutils/burp/2.0/patches/patch-configs_client_burp_conf_in
@@ -0,0 +1,14 @@
+$OpenBSD: patch-configs_client_burp_conf_in,v 1.1.1.1 2017/11/03 11:31:01
landry Exp $
+
+Index: configs/client/burp.conf.in
+--- configs/client/burp.conf.in.orig
++++ configs/client/burp.conf.in
+@@ -11,7 +11,7 @@ cname = testclient
+ # with a pseudo mirrored storage on the server and optional rsync). 2 forces
+ # protocol2 mode (inline deduplication with variable length blocks).
+ # protocol = 0
+-pidfile = @runstatedir@/burp.client.pid
++pidfile = @runstatedir@/burp/client.pid
+ syslog = 0
+ stdout = 1
+ progress_counter = 1
diff --git sysutils/burp/2.0/patches/patch-configs_server_burp_conf_in
sysutils/burp/2.0/patches/patch-configs_server_burp_conf_in
new file mode 100644
index 00000000000..e40588384a1
--- /dev/null
+++ sysutils/burp/2.0/patches/patch-configs_server_burp_conf_in
@@ -0,0 +1,26 @@
+$OpenBSD: patch-configs_server_burp_conf_in,v 1.1.1.1 2017/11/03 11:31:01
landry Exp $
+
+Index: configs/server/burp.conf.in
+--- configs/server/burp.conf.in.orig
++++ configs/server/burp.conf.in
+@@ -22,7 +22,7 @@ clientconfdir = @sysconfdir@/clientconfdir
+ # Like many other settings, this can be set per client in the clientconfdir
+ # files.
+ # protocol = 0
+-pidfile = @runstatedir@/burp.server.pid
++pidfile = @runstatedir@/burp/server.pid
+ hardlinked_archive = 0
+ working_dir_recovery_method = delete
+ max_children = 5
+@@ -68,8 +68,9 @@ keep = 7
+ # keep = 6
+
+ # Run as different user/group.
+-# user=graham
+-# group=nogroup
++user=_burp
++group=_burp
++dedup_group=_burp
+
+ # CA options.
+ # If you want your server to be a certificate authority and generate its own
diff --git sysutils/burp/2.0/patches/patch-configs_server_timer_script
sysutils/burp/2.0/patches/patch-configs_server_timer_script
new file mode 100644
index 00000000000..1b1d569ea9f
--- /dev/null
+++ sysutils/burp/2.0/patches/patch-configs_server_timer_script
@@ -0,0 +1,42 @@
+$OpenBSD: patch-configs_server_timer_script,v 1.1.1.1 2017/11/03 11:31:01
landry Exp $
+
+https://github.com/grke/burp/issues/627
+
+Index: configs/server/timer_script
+--- configs/server/timer_script.orig
++++ configs/server/timer_script
+@@ -77,29 +77,12 @@ get_intervals()
+
+ read junk ts < "$timestamp"
+
+- if ! secs=$(LANG=C LC_TIME=C date +%s -d "$ts") \
+- || ! now=$(LANG=C LC_TIME=C date +"%Y-%m-%d %H:%M:%S") \
+- || ! nowsecs=$(LANG=C LC_TIME=C date +%s -d "$now")
+- then
+- echo "$0: Date command returned error for $client."
+- return 0
+- fi
+-
++ mts=$(echo $ts | sed -e 's/-//g; s/ //; s/://; s/:/./')
++ secs=$(LANG=C LC_TIME=C date -j "$mts" +%s)
++ now=$(LANG=C LC_TIME=C date +"%Y-%m-%d %H:%M:%S")
++ nowsecs=$(LANG=C LC_TIME=C date +%s)
+ min_timesecs=$((secs+intervalsecs))
+-
+- # GNU coreutils 'date' command should accept the following (even
+- # slightly old versions).
+- if ! min_time=$(LANG=C LC_TIME=C date -d "Jan 1, 1970 00:00:00 +0000 +
$min_timesecs seconds" +"%Y-%m-%d %H:%M:%S")
+- then
+- # FreeBSD 'date' will return an error with the above, so try
+- # a version that FreeBSD 'date' should be happy with.
+- if ! min_time=$(LANG=C LC_TIME=C date -r $min_timesecs
+"%Y-%m-%d %H:%M:%S")
+- then
+- echo "$0: Date command returned error for $client."
+- return 0
+- fi
+- fi
+-
++ min_time=$(LANG=C LC_TIME=C date -r $min_timesecs +"%Y-%m-%d %H:%M:%S")
+ echo "Last backup: $ts"
+ echo "Next after : $min_time (interval $interval)"
+
diff --git
sysutils/burp/2.0/patches/patch-src_client_monitor_status_client_ncurses_c
sysutils/burp/2.0/patches/patch-src_client_monitor_status_client_ncurses_c
new file mode 100644
index 00000000000..d23ac878275
--- /dev/null
+++ sysutils/burp/2.0/patches/patch-src_client_monitor_status_client_ncurses_c
@@ -0,0 +1,23 @@
+$OpenBSD: patch-src_client_monitor_status_client_ncurses_c,v 1.1.1.1
2017/11/03 11:31:01 landry Exp $
+
+https://github.com/grke/burp/issues/626
+
+Index: src/client/monitor/status_client_ncurses.c
+--- src/client/monitor/status_client_ncurses.c.orig
++++ src/client/monitor/status_client_ncurses.c
+@@ -1453,14 +1453,7 @@ static pid_t fork_monitor(int *csin, int *csout, struc
+ char procpath[32];
+ char buf[PATH_MAX];
+
+- snprintf(procpath, sizeof(procpath), "/proc/%d/exe", getpid());
+- if(!readlink_w(procpath, buf, sizeof(buf)))
+- args[a++]=(char *)buf;
+- else if(is_reg_lstat(prog_long)>0)
+- args[a++]=(char *)prog_long;
+- else
+- args[a++]=(char *)"/usr/sbin/burp";
+-
++ args[a++]=(char *)"${TRUEPREFIX}/sbin/burp";
+ args[a++]=(char *)"-c";
+ args[a++]=get_string(confs[OPT_CONFFILE]);
+ args[a++]=(char *)"-a";
diff --git sysutils/burp/2.0/pkg/DESCR sysutils/burp/2.0/pkg/DESCR
new file mode 100644
index 00000000000..01a51148382
--- /dev/null
+++ sysutils/burp/2.0/pkg/DESCR
@@ -0,0 +1,4 @@
+Burp is a network backup and restore program. It attempts to reduce
+network traffic and the amount of space that is used by each backup,
+and uses VSS (Volume Shadow Copy Service) to make snapshots when
+backing up Windows computers.
diff --git sysutils/burp/2.0/pkg/PLIST sysutils/burp/2.0/pkg/PLIST
new file mode 100644
index 00000000000..767d2faa6e1
--- /dev/null
+++ sysutils/burp/2.0/pkg/PLIST
@@ -0,0 +1,70 @@
+@comment $OpenBSD: PLIST,v 1.1.1.1 2017/11/03 11:31:01 landry Exp $
+@newgroup _burp:794
+@newuser _burp:794:794:daemon:BackUp and Recovery
Daemon:/var/empty:/sbin/nologin
+@bin bin/vss_strip
+@man man/man8/bedup.8
+@man man/man8/bsigs.8
+@man man/man8/burp.8
+@man man/man8/burp_ca.8
+@man man/man8/vss_strip.8
+sbin/bedup
+sbin/bsigs
+@bin sbin/burp
+sbin/burp_ca
+share/burp/
+share/burp/scripts/
+share/burp/scripts/notify_script
+share/burp/scripts/ssl_extra_checks_script
+share/burp/scripts/summary_script
+share/burp/scripts/timer_script
+share/doc/burp/
+share/doc/burp/CHANGELOG
+share/doc/burp/CONTRIBUTORS
+share/doc/burp/DONATIONS
+share/doc/burp/LICENSE
+share/doc/burp/README
+share/doc/burp/UPGRADING
+share/doc/burp/add-remove.txt
+share/doc/burp/autoupgrade.txt
+share/doc/burp/backup_phases.txt
+share/doc/burp/baremetal-windows2008.txt
+share/doc/burp/baremetal-windows7-hirens.txt
+share/doc/burp/baremetal-windows7.txt
+share/doc/burp/baremetal-windows7and8.txt
+share/doc/burp/burp_ca.txt
+share/doc/burp/debug.txt
+share/doc/burp/readwrite.txt
+share/doc/burp/retention.txt
+share/doc/burp/security-models.txt
+share/doc/burp/server-basics.txt
+share/doc/burp/shuffling.txt
+share/doc/burp/status-monitor.txt
+share/doc/burp/tests.txt
+share/doc/burp/timer_script.txt
+share/doc/burp/working_dir.txt
+@mode 770
+@owner _burp
+@group _burp
+share/examples/burp/
+@sample ${SYSCONFDIR}/burp/
+share/examples/burp/CA-client/
+@sample ${SYSCONFDIR}/burp/CA-client/
+share/examples/burp/CA.cnf
+@sample ${SYSCONFDIR}/burp/CA.cnf
+share/examples/burp/burp-server.conf
+@sample ${SYSCONFDIR}/burp/burp-server.conf
+share/examples/burp/burp.conf
+@sample ${SYSCONFDIR}/burp/burp.conf
+share/examples/burp/clientconfdir/
+@sample ${SYSCONFDIR}/burp/clientconfdir/
+share/examples/burp/clientconfdir/incexc/
+@sample ${SYSCONFDIR}/burp/clientconfdir/incexc/
+share/examples/burp/clientconfdir/incexc/example
+@sample ${SYSCONFDIR}/burp/clientconfdir/incexc/example
+share/examples/burp/clientconfdir/testclient
+@sample ${SYSCONFDIR}/burp/clientconfdir/testclient
+@sample /var/spool/burp/
+@mode
+@owner
+@group
+@rcscript ${RCDIR}/burp
diff --git sysutils/burp/2.0/pkg/burp.rc sysutils/burp/2.0/pkg/burp.rc
new file mode 100644
index 00000000000..98d0505c4ac
--- /dev/null
+++ sysutils/burp/2.0/pkg/burp.rc
@@ -0,0 +1,15 @@
+#!/bin/ksh
+#
+# $OpenBSD: burp.rc,v 1.3 2018/01/11 19:27:10 rpe Exp $
+
+daemon="${TRUEPREFIX}/sbin/burp"
+daemon_flags="-c ${SYSCONFDIR}/burp/burp-server.conf"
+
+. /etc/rc.d/rc.subr
+
+rc_pre() {
+ chown _burp ${SYSCONFDIR}/burp/ssl_cert_ca.pem
+ install -d -o _burp -g _burp /var/run/burp
+}
+
+rc_cmd $1
diff --git sysutils/burp/Makefile sysutils/burp/Makefile
new file mode 100644
index 00000000000..c96c48b7e2a
--- /dev/null
+++ sysutils/burp/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD$
+
+ SUBDIR =
+ SUBDIR += 2.0
+ SUBDIR += stable
+
+.include <bsd.port.subdir.mk>
diff --git sysutils/burp/Makefile.inc sysutils/burp/Makefile.inc
new file mode 100644
index 00000000000..b3ac328619b
--- /dev/null
+++ sysutils/burp/Makefile.inc
@@ -0,0 +1,24 @@
+# $OpenBSD$
+
+COMMENT = BackUp and Restore Program
+DISTNAME = burp-${GH_TAGNAME}
+
+GH_ACCOUNT = grke
+GH_PROJECT = burk
+CATEGORIES = sysutils
+HOMEPAGE = http://burp.grke.org/
+
+# AGPLv3
+PERMIT_PACKAGE_CDROM = Yes
+
+CONFIGURE_STYLE = gnu
+INSTALL_TARGET = install-all
+
+# check is used for tests but detected at configure time
+BUILD_DEPENDS = devel/uthash \
+ devel/check
+LIB_DEPENDS = net/librsync
+RUN_DEPENDS = shells/bash
+WANTLIB += b2 c crypto m curses rsync ssl z
+
+SUBST_VARS += TRUEPREFIX
diff --git sysutils/burp/stable/Makefile sysutils/burp/stable/Makefile
new file mode 100644
index 00000000000..2cede2c53c1
--- /dev/null
+++ sysutils/burp/stable/Makefile
@@ -0,0 +1,26 @@
+# $OpenBSD$
+
+GH_TAGNAME = 2.1.28
+
+AUTOCONF_VERSION = 2.69
+AUTOMAKE_VERSION = 1.11
+
+BUILD_DEPENDS = ${MODGNU_AUTOCONF_DEPENDS} \
+ ${MODGNU_AUTOMAKE_DEPENDS}
+
+pre-configure:
+ cd ${WRKSRC} && env ${MAKE_ENV} \
+ AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+ AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
+ autoreconf -vif
+
+post-install:
+ @rm -Rf ${WRKINST}/${SYSCONFDIR}/burp/autoupgrade
+ @mv ${WRKINST}/${SYSCONFDIR}/burp ${PREFIX}/share/examples/burp
+ @perl -pi -e 's,%%LOCALBASE%%,${LOCALBASE},' \
+ ${PREFIX}/share/examples/burp/burp.conf
+
+.include <bsd.port.mk>
+CONFIGURE_ARGS = --sysconfdir="${SYSCONFDIR}/burp" \
+ --mandir="${PREFIX}/man" \
+ --localstatedir="${LOCALSTATEDIR}"
diff --git sysutils/burp/stable/distinfo sysutils/burp/stable/distinfo
new file mode 100644
index 00000000000..a722842c957
--- /dev/null
+++ sysutils/burp/stable/distinfo
@@ -0,0 +1,2 @@
+SHA256 (burp-2.1.28.tar.gz) = pD+ziapoD8XU98U+dBFVGyKKrh02LbRAowQk2Oc1kUM=
+SIZE (burp-2.1.28.tar.gz) = 590482
diff --git sysutils/burp/stable/patches/patch-configs_client_burp_conf_in
sysutils/burp/stable/patches/patch-configs_client_burp_conf_in
new file mode 100644
index 00000000000..9bf29f50442
--- /dev/null
+++ sysutils/burp/stable/patches/patch-configs_client_burp_conf_in
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: configs/client/burp.conf.in
+--- configs/client/burp.conf.in.orig
++++ configs/client/burp.conf.in
+@@ -13,7 +13,8 @@ cname = testclient
+ # with a pseudo mirrored storage on the server and optional rsync). 2 forces
+ # protocol2 mode (inline deduplication with variable length blocks).
+ # protocol = 0
+-pidfile = @runstatedir@/@[email protected]
++pidfile = @runstatedir@/burp/@[email protected]
++monitor_exe = %%LOCALBASE%%/sbin/burp
+ syslog = 0
+ stdout = 1
+ progress_counter = 1
diff --git sysutils/burp/stable/patches/patch-configs_server_burp_conf_in
sysutils/burp/stable/patches/patch-configs_server_burp_conf_in
new file mode 100644
index 00000000000..e9c7fc439a1
--- /dev/null
+++ sysutils/burp/stable/patches/patch-configs_server_burp_conf_in
@@ -0,0 +1,34 @@
+$OpenBSD$
+
+Index: configs/server/burp.conf.in
+--- configs/server/burp.conf.in.orig
++++ configs/server/burp.conf.in
+@@ -23,7 +23,7 @@ max_status_children = 5
+ # max_status_children = 6
+
+ directory = @localstatedir@/spool/@name@
+-dedup_group = global
++dedup_group = _burp
+ clientconfdir = @sysconfdir@/clientconfdir
+ # Choose the protocol to use.
+ # 0 to decide automatically, 1 to force protocol1 mode (file level granularity
+@@ -32,7 +32,7 @@ clientconfdir = @sysconfdir@/clientconfdir
+ # Like many other settings, this can be set per client in the clientconfdir
+ # files.
+ # protocol = 0
+-pidfile = @runstatedir@/@[email protected]
++pidfile = @runstatedir@/burp/@[email protected]
+ hardlinked_archive = 0
+ working_dir_recovery_method = delete
+ umask = 0022
+@@ -76,8 +76,8 @@ keep = 7
+ # keep = 6
+
+ # Run as different user/group.
+-# user=graham
+-# group=nogroup
++user=_burp
++group=_burp
+
+ # CA options.
+ # If you want your server to be a certificate authority and generate its own
diff --git sysutils/burp/stable/pkg/DESCR sysutils/burp/stable/pkg/DESCR
new file mode 100644
index 00000000000..01a51148382
--- /dev/null
+++ sysutils/burp/stable/pkg/DESCR
@@ -0,0 +1,4 @@
+Burp is a network backup and restore program. It attempts to reduce
+network traffic and the amount of space that is used by each backup,
+and uses VSS (Volume Shadow Copy Service) to make snapshots when
+backing up Windows computers.
diff --git sysutils/burp/stable/pkg/PLIST sysutils/burp/stable/pkg/PLIST
new file mode 100644
index 00000000000..31fedd9eb09
--- /dev/null
+++ sysutils/burp/stable/pkg/PLIST
@@ -0,0 +1,72 @@
+@comment $OpenBSD: PLIST,v 1.1.1.1 2017/11/03 11:31:01 landry Exp $
+@newgroup _burp:794
+@newuser _burp:794:794:daemon:BackUp and Recovery
Daemon:/var/empty:/sbin/nologin
+@bin bin/vss_strip
+@man man/man8/bedup.8
+@man man/man8/bsigs.8
+@man man/man8/bsparse.8
+@man man/man8/burp.8
+@man man/man8/burp_ca.8
+@man man/man8/vss_strip.8
+sbin/bedup
+sbin/bsigs
+sbin/bsparse
+@bin sbin/burp
+sbin/burp_ca
+share/burp/
+share/burp/scripts/
+share/burp/scripts/notify_script
+share/burp/scripts/ssl_extra_checks_script
+share/burp/scripts/summary_script
+share/burp/scripts/timer_script
+share/doc/burp/
+share/doc/burp/CHANGELOG
+share/doc/burp/CONTRIBUTORS
+share/doc/burp/DONATIONS
+share/doc/burp/LICENSE
+share/doc/burp/README
+share/doc/burp/UPGRADING
+share/doc/burp/add-remove.txt
+share/doc/burp/autoupgrade.txt
+share/doc/burp/backup_phases.txt
+share/doc/burp/baremetal-windows2008.txt
+share/doc/burp/baremetal-windows7-hirens.txt
+share/doc/burp/baremetal-windows7.txt
+share/doc/burp/baremetal-windows7and8.txt
+share/doc/burp/burp_ca.txt
+share/doc/burp/debug.txt
+share/doc/burp/readwrite.txt
+share/doc/burp/retention.txt
+share/doc/burp/security-models.txt
+share/doc/burp/server-basics.txt
+share/doc/burp/shuffling.txt
+share/doc/burp/status-monitor.txt
+share/doc/burp/tests.txt
+share/doc/burp/timer_script.txt
+share/doc/burp/working_dir.txt
+@mode 770
+@owner _burp
+@group _burp
+share/examples/burp/
+@sample ${SYSCONFDIR}/burp/
+share/examples/burp/CA-client/
+@sample ${SYSCONFDIR}/burp/CA-client/
+share/examples/burp/CA.cnf
+@sample ${SYSCONFDIR}/burp/CA.cnf
+share/examples/burp/burp-server.conf
+@sample ${SYSCONFDIR}/burp/burp-server.conf
+share/examples/burp/burp.conf
+@sample ${SYSCONFDIR}/burp/burp.conf
+share/examples/burp/clientconfdir/
+@sample ${SYSCONFDIR}/burp/clientconfdir/
+share/examples/burp/clientconfdir/incexc/
+@sample ${SYSCONFDIR}/burp/clientconfdir/incexc/
+share/examples/burp/clientconfdir/incexc/example
+@sample ${SYSCONFDIR}/burp/clientconfdir/incexc/example
+share/examples/burp/clientconfdir/testclient
+@sample ${SYSCONFDIR}/burp/clientconfdir/testclient
+@sample /var/spool/burp/
+@mode
+@owner
+@group
+@rcscript ${RCDIR}/burp
diff --git sysutils/burp/stable/pkg/burp.rc sysutils/burp/stable/pkg/burp.rc
new file mode 100644
index 00000000000..98d0505c4ac
--- /dev/null
+++ sysutils/burp/stable/pkg/burp.rc
@@ -0,0 +1,15 @@
+#!/bin/ksh
+#
+# $OpenBSD: burp.rc,v 1.3 2018/01/11 19:27:10 rpe Exp $
+
+daemon="${TRUEPREFIX}/sbin/burp"
+daemon_flags="-c ${SYSCONFDIR}/burp/burp-server.conf"
+
+. /etc/rc.d/rc.subr
+
+rc_pre() {
+ chown _burp ${SYSCONFDIR}/burp/ssl_cert_ca.pem
+ install -d -o _burp -g _burp /var/run/burp
+}
+
+rc_cmd $1