From 9a6f1fef723f827f041b5c510edeff1aed8598bd Mon Sep 17 00:00:00 2001 From: roland Date: Mon, 18 Jul 2005 23:53:09 +0000 Subject: [PATCH 001/145] auto-import monotone-0.21-1.fc5 on branch devel from monotone-0.21-1.fc5.src.rpm New package monotone, starting with upstream version 0.21 --- .cvsignore | 1 + monotone.spec | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 106 insertions(+) create mode 100644 monotone.spec diff --git a/.cvsignore b/.cvsignore index e69de29..91d0a8d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +monotone-0.21.tar.gz diff --git a/monotone.spec b/monotone.spec new file mode 100644 index 0000000..be14d0e --- /dev/null +++ b/monotone.spec @@ -0,0 +1,104 @@ +Name: monotone +Version: 0.21 +Release: 1%{?dist} + +Summary: A free, distributed version control system +Group: Development/Tools +License: GPL + +URL: http://www.venge.net/monotone/ +Source0: http://www.venge.net/monotone/downloads/%{name}-%{version}.tar.gz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: boost-devel >= 1.32.0 +BuildRequires: lua +%if 1 +%define bundled_sqlite yes +%else +# in fact, monotone has a locally-hacked 3.2.2, so we can't replace it +BuildRequires: sqlite-devel >= 3.2.2 +%define bundled_sqlite no +%endif + +BuildRequires: emacs + +Requires(post): /sbin/install-info +Requires(postun): /sbin/install-info + +%description +monotone is a free, distributed version control system. +It provides fully disconnected operation, manages complete +tree versions, keeps its state in a local transactional +database, supports overlapping branches and extensible +metadata, exchanges work over plain network protocols, +performs history-sensitive merging, and delegates trust +functions to client-side RSA certificates. + +%prep +%setup -q + +%build +%configure --with-bundled-lua=no --with-bundled-sqlite=%{bundled_sqlite} +make %{?_smp_mflags} + +%check +make %{?_smp_mflags} check + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} +rm -f %{buildroot}/%{_infodir}/dir + +lispdir=%{buildroot}/%{_datadir}/emacs/site-lisp +mkdir -p ${lispdir} +%{__install} -c -m 0444 contrib/monotone.el ${lispdir}/monotone.el +emacs -batch -f batch-byte-compile ${lispdir}/monotone.el + +%clean +rm -rf %{buildroot} + +%post +if [ $1 -eq 1 ] +then + /sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : +fi + +%postun +if [ $1 -eq 0 ] +then + /sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : +fi + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING ChangeLog INSTALL NEWS README README.changesets UPGRADE +%doc monotone.html + +%{_bindir}/monotone +%{_infodir}/monotone.info* +%{_mandir}/man1/monotone.1* +%{_datadir}/emacs/site-lisp/monotone.el* + +%changelog +* Mon Jul 18 2005 Roland McGrath - 0.21-1 +- Updated for 0.21 release. +- Install Emacs support. + +* Thu Jul 7 2005 Roland McGrath - 0.20-0.1 +- Updated for 0.20 release. +- Added %%check section. +- Cannot use FC4 native sqlite3, need newer bundled one. + +* Mon Apr 18 2005 Jeffrey C. Ollie - 0.18-0.4 +- Modified summary so that it doesn't contain the name + +* Thu Apr 14 2005 Jeffrey C. Ollie - 0.18-0.3 +- Modified install-info commands to prevent errors in case of --excludedocs + +* Wed Apr 13 2005 Jeffrey C. Ollie - 0.18-0.2 +- Added post and postun scripts to take care of .info file +- Added parallel make flags + +* Wed Apr 13 2005 Jeffrey C. Ollie - 0.18-0.1 +- First version. diff --git a/sources b/sources index e69de29..cdf272a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c30c96b97ae56268cac567bd8837b991 monotone-0.21.tar.gz From 9189ede517e8286ff500bfc1d5854cc937259f40 Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 27 Jul 2005 19:38:53 +0000 Subject: [PATCH 002/145] - Include monotone-nav.el too. - Add BuildRequires on cvs so the test suite can run. --- monotone.spec | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/monotone.spec b/monotone.spec index be14d0e..86e3298 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.21 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -21,6 +21,9 @@ BuildRequires: sqlite-devel >= 3.2.2 %define bundled_sqlite no %endif +# The test suite needs cvs. +BuildRequires: cvs + BuildRequires: emacs Requires(post): /sbin/install-info @@ -52,8 +55,8 @@ rm -f %{buildroot}/%{_infodir}/dir lispdir=%{buildroot}/%{_datadir}/emacs/site-lisp mkdir -p ${lispdir} -%{__install} -c -m 0444 contrib/monotone.el ${lispdir}/monotone.el -emacs -batch -f batch-byte-compile ${lispdir}/monotone.el +%{__install} -c -m 0444 contrib/monotone*.el ${lispdir} +emacs -batch -f batch-byte-compile ${lispdir} %clean rm -rf %{buildroot} @@ -78,9 +81,13 @@ fi %{_bindir}/monotone %{_infodir}/monotone.info* %{_mandir}/man1/monotone.1* -%{_datadir}/emacs/site-lisp/monotone.el* +%{_datadir}/emacs/site-lisp/monotone*.el* %changelog +* Wed Jul 27 2005 Roland McGrath - 0.21-2 +- Include monotone-nav.el too. +- Add BuildRequires on cvs so the test suite can run. + * Mon Jul 18 2005 Roland McGrath - 0.21-1 - Updated for 0.21 release. - Install Emacs support. From 6d6e5786ae1905d51b19296d573cc9196b40bbdc Mon Sep 17 00:00:00 2001 From: roland Date: Sun, 7 Aug 2005 10:06:40 +0000 Subject: [PATCH 003/145] Work around non-root build user owning / in mock chroot builds. --- monotone-0.21-xfail-if-root.patch | 22 ++++++++++++++++++++++ monotone.spec | 10 +++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 monotone-0.21-xfail-if-root.patch diff --git a/monotone-0.21-xfail-if-root.patch b/monotone-0.21-xfail-if-root.patch new file mode 100644 index 0000000..8e5a9ca --- /dev/null +++ b/monotone-0.21-xfail-if-root.patch @@ -0,0 +1,22 @@ +--- monotone-0.21/tests/t_checkout_dir.at ++++ monotone-0.21/tests/t_checkout_dir.at +@@ -16,7 +16,7 @@ AT_CHECK(MONOTONE --branch=testbranch ch + mkdir test_dir3 + chmod 444 test_dir3 + # XFAIL if run as root (hi Gentoo!) +-AT_XFAIL_IF(test -O /) ++AT_XFAIL_IF(test -O /usr) + AT_CHECK(MONOTONE --branch=testbranch checkout test_dir3, + [1], [ignore], [ignore]) + AT_CHECK(MONOTONE --branch=testbranch checkout test_dir3/subdir, +--- monotone-0.21/testsuite ++++ monotone-0.21/testsuite +@@ -67905,7 +67905,7 @@ $at_traceon + at_desc='checkout validates target directory' + $at_quiet $ECHO_N " 64: checkout validates target directory $ECHO_C" + at_xfail=no +- test -O / && at_xfail=yes ++ test -O /usr && at_xfail=yes + ( + echo "64. t_checkout_dir.at:1: testing ..." + $at_traceon diff --git a/monotone.spec b/monotone.spec index 86e3298..54e6bec 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.21 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -9,6 +9,8 @@ License: GPL URL: http://www.venge.net/monotone/ Source0: http://www.venge.net/monotone/downloads/%{name}-%{version}.tar.gz +Patch1: monotone-0.21-xfail-if-root.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: boost-devel >= 1.32.0 @@ -24,6 +26,7 @@ BuildRequires: sqlite-devel >= 3.2.2 # The test suite needs cvs. BuildRequires: cvs +# We need Emacs to byte-compile the Emacs Lisp code. BuildRequires: emacs Requires(post): /sbin/install-info @@ -41,6 +44,8 @@ functions to client-side RSA certificates. %prep %setup -q +%patch1 -p1 + %build %configure --with-bundled-lua=no --with-bundled-sqlite=%{bundled_sqlite} make %{?_smp_mflags} @@ -84,6 +89,9 @@ fi %{_datadir}/emacs/site-lisp/monotone*.el* %changelog +* Sun Aug 7 2005 Roland McGrath - 0.21-3 +- Work around non-root build user owning / in mock chroot builds. + * Wed Jul 27 2005 Roland McGrath - 0.21-2 - Include monotone-nav.el too. - Add BuildRequires on cvs so the test suite can run. From b39bb3c95afe9f5eac5acc7ba7e38c4e8661cde4 Mon Sep 17 00:00:00 2001 From: roland Date: Mon, 22 Aug 2005 20:50:44 +0000 Subject: [PATCH 004/145] New upstream version 0.22 --- .cvsignore | 2 +- monotone.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 91d0a8d..437146a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.21.tar.gz +monotone-0.22.tar.gz diff --git a/monotone.spec b/monotone.spec index 54e6bec..a53f57a 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.21 -Release: 3%{?dist} +Version: 0.22 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -89,6 +89,9 @@ fi %{_datadir}/emacs/site-lisp/monotone*.el* %changelog +* Mon Aug 22 2005 Roland McGrath - 0.22-1 +- Updated for 0.22 release. + * Sun Aug 7 2005 Roland McGrath - 0.21-3 - Work around non-root build user owning / in mock chroot builds. diff --git a/sources b/sources index cdf272a..4df563c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c30c96b97ae56268cac567bd8837b991 monotone-0.21.tar.gz +ee0f25577b8a640df3015113e67bb718 monotone-0.22.tar.gz From 63f67d8034c006682105a5c8943a1eb1bf69c9d1 Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 23 Aug 2005 07:04:05 +0000 Subject: [PATCH 005/145] auto-import monotone-0.22-4.fc5 on branch devel from monotone-0.22-4.fc5.src.rpm --- monotone.init | 125 +++++++++++++++++++++++++++++++++++++++++++++ monotone.spec | 64 +++++++++++++++++++++-- monotone.sysconfig | 9 ++++ 3 files changed, 193 insertions(+), 5 deletions(-) create mode 100644 monotone.init create mode 100644 monotone.sysconfig diff --git a/monotone.init b/monotone.init new file mode 100644 index 0000000..dc7c910 --- /dev/null +++ b/monotone.init @@ -0,0 +1,125 @@ +#!/bin/sh +# +# This script starts and stops the monotone server. +# +# chkconfig: 2345 90 10 +# description: Monotone netsync protocol server +# processname: monotone-server +# pidfile: /var/run/monotone-server.pid +# config: /etc/sysconfig/monotone +# config: /etc/monotonerc + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +# Get configuration settings. +[ -f /etc/sysconfig/monotone ] && . /etc/sysconfig/monotone + +# By default it's all good +RETVAL=0 + +MT=/usr/bin/monotone +MTSERVER=/usr/sbin/monotone-server +MONOTONE_LOGFILE=${MONOTONE_LOGFILE:-/var/log/monotone.log} + +random_passphrase() +{ + dd if=/dev/urandom count=1 2> /dev/null | sha1sum | + { read sum rest; echo $sum; } +} + +umask 077 + +# See how we were called. +case "$1" in + start) + [ -e $MONOTONE_DBFILE ] || { $0 init && $0 genkey; } + RETVAL=$? + if [ $RETVAL = 0 ]; then + # Start daemon. + echo -n $"Starting monotone server: " + { + exec 3>> $MONOTONE_LOGFILE && + echo >&3 "Server restart at `date`" && + daemon --user=${MONOTONE_USER:-monotone} $MTSERVER \ + $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS \ + serve --pid-file=/var/run/monotone-server.pid \ + "$MONOTONE_SERVE_OPTS" ">&3 2>&3 &" + } && success || failure + RETVAL=$? + echo + fi + [ $RETVAL = 0 ] && touch /var/lock/subsys/monotone + ;; + stop) + # Stop daemons. + echo -n "Stopping monotone server: " + killproc $MTSERVER + RETVAL=$? + [ $RETVAL = 0 ] && rm -f /var/lock/subsys/monotone + echo + ;; + restart) + $0 stop + $0 start + ;; + condrestart) + [ -e /var/lock/subsys/monotone ] && $0 restart + ;; + status) + status monotone-server + RETVAL=$? + ;; + init) + echo -n $"Initializing $MONOTONE_DBFILE: " + { [ -d /var/db/monotone ] || + /usr/bin/install -o ${MONOTONE_USER:-monotone} \ + -g ${MONOTONE_GROUP:-monotone} \ + -m 0770 -d /var/db/monotone; } && + runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c \ + "$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS db init" && + success $"database initialization" || + failure $"database initialization" + RETVAL=$? + echo + ;; + genkey) + MONOTONE_KEYID=${MONOTONE_KEYID:-`/bin/hostname -f`} + MONOTONE_PPFILE=${MONOTONE_PPFILE:-/var/db/monotone/passphrase.lua} + echo -n $"Generating RSA key for server $MONOTONE_KEYID" + tmp=/tmp/mtserver$$ + if + passphrase=`random_passphrase` && + { echo $passphrase; echo $passphrase; } | + runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c \ + "$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \ + genkey $MONOTONE_KEYID" > /dev/null 2>&1 && + cat > $tmp <= 1.32.0 BuildRequires: lua %if 1 @@ -41,6 +44,15 @@ metadata, exchanges work over plain network protocols, performs history-sensitive merging, and delegates trust functions to client-side RSA certificates. +%package server +Summary: Standalone server setup for monotone +Requires: monotone = %{version}-%{release} +Group: Development/Tools + +%description server +This package provides an easy-to-use standalone server setup for monotone. + + %prep %setup -q @@ -51,18 +63,32 @@ functions to client-side RSA certificates. make %{?_smp_mflags} %check -make %{?_smp_mflags} check +make check || (cat testsuite.log; exit 2) %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} -rm -f %{buildroot}/%{_infodir}/dir +rm -f %{buildroot}%{_infodir}/dir -lispdir=%{buildroot}/%{_datadir}/emacs/site-lisp +lispdir=%{buildroot}%{_datadir}/emacs/site-lisp mkdir -p ${lispdir} %{__install} -c -m 0444 contrib/monotone*.el ${lispdir} emacs -batch -f batch-byte-compile ${lispdir} +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}/etc/init.d +mkdir -p %{buildroot}/etc/sysconfig +mkdir -p %{buildroot}/var/db +ln -snf ../bin/monotone %{buildroot}%{_sbindir}/monotone-server +%{__install} -c -m 0555 %{SOURCE1} %{buildroot}/etc/init.d/monotone +%{__install} -c -m 0644 %{SOURCE2} %{buildroot}/etc/sysconfig/monotone +%{__install} -c -m 0644 /dev/null %{buildroot}/etc/monotonerc +%{__install} -d -m 0770 %{buildroot}/var/db/monotone + +# These do not actually wind up in the package, due to %%ghost. +touch %{buildroot}/var/db/monotone/server.db +touch %{buildroot}/var/db/monotone/passphrase.lua + %clean rm -rf %{buildroot} @@ -88,9 +114,37 @@ fi %{_mandir}/man1/monotone.1* %{_datadir}/emacs/site-lisp/monotone*.el* + +%files server +%defattr(-,root,root,-) +%{_sbindir}/monotone-server +/etc/init.d/monotone +%config(noreplace) /etc/sysconfig/monotone +%config(noreplace) /etc/monotonerc +%dir %attr(0770,monotone,monotone) /var/db/monotone +%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/monotone/server.db +%attr(0600,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/monotone/passphrase.lua + +%pre server +# Add the "monotone" user +/usr/sbin/useradd -c "Monotone Netsync Server" \ + -s /sbin/nologin -r -d /var/db/monotone apache 2> /dev/null || : + +%post server +# Register the monotone service +/sbin/chkconfig --add monotone + +%preun server +if [ $1 = 0 ]; then + /sbin/service monotone stop > /dev/null 2>&1 + /sbin/chkconfig --del monotone +fi + + %changelog -* Mon Aug 22 2005 Roland McGrath - 0.22-1 +* Mon Aug 22 2005 Roland McGrath - 0.22-4 - Updated for 0.22 release. +- Added monotone-server package. * Sun Aug 7 2005 Roland McGrath - 0.21-3 - Work around non-root build user owning / in mock chroot builds. diff --git a/monotone.sysconfig b/monotone.sysconfig new file mode 100644 index 0000000..bd8993d --- /dev/null +++ b/monotone.sysconfig @@ -0,0 +1,9 @@ +MONOTONERC=/etc/monotonerc +MONOTONE_DBFILE=/var/db/monotone/server.db +MONOTONE_PPFILE=/var/db/monotone/passphrase.lua + +MONOTONE_RCOPTS="--norc --rcfile=$MONOTONERC" +MONOTONE_DBOPTS="--db=$MONOTONE_DBFILE" +MONOTONE_PPOPTS="--rcfile=$MONOTONE_PPFILE" + +MONOTONE_SERVE_OPTS="0.0.0.0 '*'" From 614ba346e2c165083a8b9752b5629bf188fed792 Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 4 Oct 2005 03:45:52 +0000 Subject: [PATCH 006/145] New upstream version 0.23 --- .cvsignore | 2 +- monotone-0.21-xfail-if-root.patch | 22 ---------------------- monotone-xfail-if-root.patch | 22 ++++++++++++++++++++++ monotone.init | 10 ++++++---- monotone.spec | 21 +++++++++++++-------- sources | 2 +- 6 files changed, 43 insertions(+), 36 deletions(-) delete mode 100644 monotone-0.21-xfail-if-root.patch create mode 100644 monotone-xfail-if-root.patch diff --git a/.cvsignore b/.cvsignore index 437146a..85e3261 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.22.tar.gz +monotone-0.23.tar.gz diff --git a/monotone-0.21-xfail-if-root.patch b/monotone-0.21-xfail-if-root.patch deleted file mode 100644 index 8e5a9ca..0000000 --- a/monotone-0.21-xfail-if-root.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- monotone-0.21/tests/t_checkout_dir.at -+++ monotone-0.21/tests/t_checkout_dir.at -@@ -16,7 +16,7 @@ AT_CHECK(MONOTONE --branch=testbranch ch - mkdir test_dir3 - chmod 444 test_dir3 - # XFAIL if run as root (hi Gentoo!) --AT_XFAIL_IF(test -O /) -+AT_XFAIL_IF(test -O /usr) - AT_CHECK(MONOTONE --branch=testbranch checkout test_dir3, - [1], [ignore], [ignore]) - AT_CHECK(MONOTONE --branch=testbranch checkout test_dir3/subdir, ---- monotone-0.21/testsuite -+++ monotone-0.21/testsuite -@@ -67905,7 +67905,7 @@ $at_traceon - at_desc='checkout validates target directory' - $at_quiet $ECHO_N " 64: checkout validates target directory $ECHO_C" - at_xfail=no -- test -O / && at_xfail=yes -+ test -O /usr && at_xfail=yes - ( - echo "64. t_checkout_dir.at:1: testing ..." - $at_traceon diff --git a/monotone-xfail-if-root.patch b/monotone-xfail-if-root.patch new file mode 100644 index 0000000..523eca4 --- /dev/null +++ b/monotone-xfail-if-root.patch @@ -0,0 +1,22 @@ +--- monotone-0.23/testsuite.~1~ 2005-10-03 17:56:39.000000000 -0700 ++++ monotone-0.23/testsuite 2005-10-03 17:57:22.000000000 -0700 +@@ -67479,7 +67479,7 @@ $at_traceon + at_desc='checkout validates target directory' + $at_quiet $ECHO_N " 64: checkout validates target directory $ECHO_C" + at_xfail=no +- test -O / && at_xfail=yes ++ test -O /usr && at_xfail=yes + ( + echo "64. t_checkout_dir.at:1: testing ..." + $at_traceon +--- monotone-0.23/tests/t_checkout_dir.at.~1~ 2005-10-03 17:56:38.000000000 -0700 ++++ monotone-0.23/tests/t_checkout_dir.at 2005-10-03 17:57:25.000000000 -0700 +@@ -20,7 +20,7 @@ AT_CHECK(MONOTONE --branch=testbranch ch + mkdir test_dir4 + chmod 444 test_dir4 + # XFAIL if run as root (hi Gentoo!) +-AT_XFAIL_IF(test -O /) ++AT_XFAIL_IF(test -O /usr) + AT_CHECK(MONOTONE --branch=testbranch checkout test_dir4, + [1], [ignore], [ignore]) + AT_CHECK(MONOTONE --branch=testbranch checkout test_dir4/subdir, diff --git a/monotone.init b/monotone.init index dc7c910..1e73134 100644 --- a/monotone.init +++ b/monotone.init @@ -2,7 +2,7 @@ # # This script starts and stops the monotone server. # -# chkconfig: 2345 90 10 +# chkconfig: - 90 10 # description: Monotone netsync protocol server # processname: monotone-server # pidfile: /var/run/monotone-server.pid @@ -30,7 +30,8 @@ MONOTONE_LOGFILE=${MONOTONE_LOGFILE:-/var/log/monotone.log} random_passphrase() { - dd if=/dev/urandom count=1 2> /dev/null | sha1sum | + # As of 0.22, 32 chars is the maximum pass phrase length. + dd if=/dev/urandom count=1 2> /dev/null | md5sum | { read sum rest; echo $sum; } } @@ -82,8 +83,8 @@ case "$1" in /usr/bin/install -o ${MONOTONE_USER:-monotone} \ -g ${MONOTONE_GROUP:-monotone} \ -m 0770 -d /var/db/monotone; } && - runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c \ - "$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS db init" && + runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c "umask 007; \ + $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS db init" && success $"database initialization" || failure $"database initialization" RETVAL=$? @@ -114,6 +115,7 @@ EOF failure $"key generation" fi RETVAL=$? + rm -f $tmp echo ;; *) diff --git a/monotone.spec b/monotone.spec index ed27e50..e24de75 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.22 -Release: 4%{?dist} +Version: 0.23 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -11,7 +11,7 @@ Source0: http://www.venge.net/monotone/downloads/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig -Patch1: monotone-0.21-xfail-if-root.patch +Patch1: monotone-xfail-if-root.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -21,8 +21,8 @@ BuildRequires: lua %if 1 %define bundled_sqlite yes %else -# in fact, monotone has a locally-hacked 3.2.2, so we can't replace it -BuildRequires: sqlite-devel >= 3.2.2 +# In fact, monotone has a locally-hacked 3.2.7, so we can't replace it. +BuildRequires: sqlite-devel >= 3.2.7 %define bundled_sqlite no %endif @@ -63,13 +63,15 @@ This package provides an easy-to-use standalone server setup for monotone. make %{?_smp_mflags} %check -make check || (cat testsuite.log; exit 2) +make check || { cat testsuite.log; false; } %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_infodir}/dir +%find_lang %{name} + lispdir=%{buildroot}%{_datadir}/emacs/site-lisp mkdir -p ${lispdir} %{__install} -c -m 0444 contrib/monotone*.el ${lispdir} @@ -104,7 +106,7 @@ then /sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : fi -%files +%files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README README.changesets UPGRADE %doc monotone.html @@ -128,7 +130,7 @@ fi %pre server # Add the "monotone" user /usr/sbin/useradd -c "Monotone Netsync Server" \ - -s /sbin/nologin -r -d /var/db/monotone apache 2> /dev/null || : + -s /sbin/nologin -r -d /var/db/monotone monotone 2> /dev/null || : %post server # Register the monotone service @@ -142,6 +144,9 @@ fi %changelog +* Mon Oct 3 2005 Roland McGrath - 0.23-1 +- Updated for 0.23 release. + * Mon Aug 22 2005 Roland McGrath - 0.22-4 - Updated for 0.22 release. - Added monotone-server package. diff --git a/sources b/sources index 4df563c..79889d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee0f25577b8a640df3015113e67bb718 monotone-0.22.tar.gz +6d9e909480c2be0b23e2820c3a42e6f1 monotone-0.23.tar.gz From 24a6ee3167eabc1dc1c34cf8b9a6e9ce03b154ea Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 13 Dec 2005 07:35:07 +0000 Subject: [PATCH 007/145] 0.24 update copied from FC-4 branch --- .cvsignore | 2 +- README.monotone-server | 42 +++++++++++++++++++++++ monotone-xfail-if-root.patch | 22 ------------ monotone.init | 66 ++++++++++++++++++++++++++++++------ monotone.spec | 45 +++++++++++++++++------- monotone.sysconfig | 11 +++--- sources | 2 +- 7 files changed, 139 insertions(+), 51 deletions(-) create mode 100644 README.monotone-server delete mode 100644 monotone-xfail-if-root.patch diff --git a/.cvsignore b/.cvsignore index 85e3261..c83798f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.23.tar.gz +monotone-0.24.tar.gz diff --git a/README.monotone-server b/README.monotone-server new file mode 100644 index 0000000..26e96ab --- /dev/null +++ b/README.monotone-server @@ -0,0 +1,42 @@ +The Fedora Extras build of monotone provides an extra RPM monotone-server. +This package is intended to make it easy to set up an unattended server +installation for Monotone's Netsync protocol (i.e. "monotone serve"). + +The package a standard Fedora-style init.d script with chkconfig support +for running the server, installed as /usr/sbin/monotone-server. +(This is just a symlink to monotone that the init script runs instead. +This enables matching "monotone-server" processes with ps to distinguish +server instances from people using monotone.) + +The /etc/monotone directory serves as ~/.monotone for the server. This +directory and its contents are not writable by the "monotone" user ID under +which the network server runs. The database lives in /var/db/monotone, +which the "monotone" user ID must write to. + +The init.d script will generate a private key for the server to use, if +none exists yet. The key identification will be the host's FQDN (from +/bin/hostname -f). You can use "service monotone genkey [IDENT]" to +generate the private key by hand and set up the unattended server to use +it, supplying a different key identification string if you like. + +Before starting the server, the script will migrate an old database +format if you had a previous version of the monotone-server installation. +(This includes converting private keys from the old format.) +You can always do this explicitly with "service monotone migrate". + +Access to the server is controlled by the /etc/monotone/read-permissions and +/etc/monotone/write-permissions files, unless you write your own Lua hooks +in /etc/monotone/monotonerc. These files are not created or editted by the +RPM scripts, you must create them. These files refer to key identification +strings for keys already the database. Anyone allowed write access by the +netwrok server can put new keys in the database with "monotone push" using +the --key-to-push option. To bootstrap this, /etc/monotone/write-permission +must allow some key and that key must be in the database already. You can +put a key in the server's database easily with "service monotone import", +e.g. to import the public key for a private key in ~/.monotone/keys: + + monotone pubkey me@my.com | sudo service monotone import + +For problems with this package or its scripts, please file bugs +at http://bugzilla.redhat.com/ for the "monotone" component +in th "Fedora Extras" product. diff --git a/monotone-xfail-if-root.patch b/monotone-xfail-if-root.patch deleted file mode 100644 index 523eca4..0000000 --- a/monotone-xfail-if-root.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- monotone-0.23/testsuite.~1~ 2005-10-03 17:56:39.000000000 -0700 -+++ monotone-0.23/testsuite 2005-10-03 17:57:22.000000000 -0700 -@@ -67479,7 +67479,7 @@ $at_traceon - at_desc='checkout validates target directory' - $at_quiet $ECHO_N " 64: checkout validates target directory $ECHO_C" - at_xfail=no -- test -O / && at_xfail=yes -+ test -O /usr && at_xfail=yes - ( - echo "64. t_checkout_dir.at:1: testing ..." - $at_traceon ---- monotone-0.23/tests/t_checkout_dir.at.~1~ 2005-10-03 17:56:38.000000000 -0700 -+++ monotone-0.23/tests/t_checkout_dir.at 2005-10-03 17:57:25.000000000 -0700 -@@ -20,7 +20,7 @@ AT_CHECK(MONOTONE --branch=testbranch ch - mkdir test_dir4 - chmod 444 test_dir4 - # XFAIL if run as root (hi Gentoo!) --AT_XFAIL_IF(test -O /) -+AT_XFAIL_IF(test -O /usr) - AT_CHECK(MONOTONE --branch=testbranch checkout test_dir4, - [1], [ignore], [ignore]) - AT_CHECK(MONOTONE --branch=testbranch checkout test_dir4/subdir, diff --git a/monotone.init b/monotone.init index 1e73134..ffbf8aa 100644 --- a/monotone.init +++ b/monotone.init @@ -7,7 +7,7 @@ # processname: monotone-server # pidfile: /var/run/monotone-server.pid # config: /etc/sysconfig/monotone -# config: /etc/monotonerc +# config: /etc/monotone/monotonerc # Source function library. . /etc/rc.d/init.d/functions @@ -31,7 +31,7 @@ MONOTONE_LOGFILE=${MONOTONE_LOGFILE:-/var/log/monotone.log} random_passphrase() { # As of 0.22, 32 chars is the maximum pass phrase length. - dd if=/dev/urandom count=1 2> /dev/null | md5sum | + dd if=/dev/urandom bs=32 count=1 2> /dev/null | md5sum | { read sum rest; echo $sum; } } @@ -40,8 +40,16 @@ umask 077 # See how we were called. case "$1" in start) - [ -e $MONOTONE_DBFILE ] || { $0 init && $0 genkey; } + if [ -e $MONOTONE_DBFILE ]; then + $0 migrate + else + $0 init + fi RETVAL=$? + if [ $RETVAL = 0 ] && [ "x`ls $MONOTONE_KEYDIR`" = x ]; then + $0 genkey + RETVAL=$? + fi if [ $RETVAL = 0 ]; then # Start daemon. echo -n $"Starting monotone server: " @@ -60,7 +68,7 @@ case "$1" in ;; stop) # Stop daemons. - echo -n "Stopping monotone server: " + echo -n $"Stopping monotone server: " killproc $MTSERVER RETVAL=$? [ $RETVAL = 0 ] && rm -f /var/lock/subsys/monotone @@ -78,7 +86,7 @@ case "$1" in RETVAL=$? ;; init) - echo -n $"Initializing $MONOTONE_DBFILE: " + echo -n $"Initializing database" "$MONOTONE_DBFILE" ": " { [ -d /var/db/monotone ] || /usr/bin/install -o ${MONOTONE_USER:-monotone} \ -g ${MONOTONE_GROUP:-monotone} \ @@ -91,7 +99,7 @@ case "$1" in echo ;; genkey) - MONOTONE_KEYID=${MONOTONE_KEYID:-`/bin/hostname -f`} + MONOTONE_KEYID=${2:-${MONOTONE_KEYID:-`/bin/hostname -f`}} MONOTONE_PPFILE=${MONOTONE_PPFILE:-/var/db/monotone/passphrase.lua} echo -n $"Generating RSA key for server $MONOTONE_KEYID" tmp=/tmp/mtserver$$ @@ -106,9 +114,8 @@ function get_passphrase(keyid) return "$passphrase" end EOF - /usr/bin/install -o ${MONOTONE_USER:-monotone} \ - -g ${MONOTONE_GROUP:-monotone} \ - -m 0600 $tmp ${MONOTONE_PPFILE} + /usr/bin/install -o root -g ${MONOTONE_GROUP:-monotone} \ + -m 0440 $tmp ${MONOTONE_PPFILE} then success $"key generation" else @@ -118,8 +125,47 @@ EOF rm -f $tmp echo ;; + migrate) + oppfile=/var/db/monotone/passphrase.lua + RETVAL=0 + if [ ! -e $MONOTONE_PPFILE ] && [ -e $oppfile ]; then + echo -n $"Moving old server passphrase file to new location: " + /usr/bin/install -o root -g ${MONOTONE_GROUP:-monotone} \ + -m 0440 $oppfile ${MONOTONE_PPFILE} && + success $"move passphrase file" || + failure $"move passphrase file" + RETVAL=$? + echo + fi + [ $RETVAL -eq 0 ] || exit $RETVAL + # Note this must run as root in case migration is writing + # into /etc/monotone/private-keys. + echo $"Checking database format in" "${MONOTONE_DBFILE}:" + (umask 027 + $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db migrate && + /bin/chgrp -R ${MONOTONE_GROUP:-monotone} $MONOTONE_KEYDIR) + success $"database check" || + failure $"database check" + RETVAL=$? + echo + ;; + # Use "monotone pubkey me@my.com | service monotone import" + # to import the first keys to enable in /etc/monotone/write-permission. + # Thereafter, those with write permission can add other keys via + # netsync with "monotone push --key-to-push=IDENT" and then IDENT + # can be used in the read-permission and write-permission files. + import) + echo -n $"Importing packets to monotone database: " + runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c "umask 007; \ + $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS read" && + success $"packet import" || + failure $"packet import" + RETVAL=$? + echo + ;; *) - echo "Usage: $0 {start|stop|restart|status|condrestart|init|genkey}" + echo "\ +Usage: $0 {start|stop|restart|status|condrestart|init|import|genkey [IDENT]}" RETVAL=1 ;; esac diff --git a/monotone.spec b/monotone.spec index e24de75..9bf8786 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.23 +Version: 0.24 Release: 1%{?dist} Summary: A free, distributed version control system @@ -10,14 +10,12 @@ URL: http://www.venge.net/monotone/ Source0: http://www.venge.net/monotone/downloads/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig - -Patch1: monotone-xfail-if-root.patch +Source3: README.monotone-server BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.32.0 -BuildRequires: lua %if 1 %define bundled_sqlite yes %else @@ -25,6 +23,11 @@ BuildRequires: lua BuildRequires: sqlite-devel >= 3.2.7 %define bundled_sqlite no %endif +# monotone has local hacks in lua 5.0.2 as well, sigh. +%define bundled_lua 1 +%if %{bundled_lua} == 0 +BuildRequires: lua +%endif # The test suite needs cvs. BuildRequires: cvs @@ -56,10 +59,9 @@ This package provides an easy-to-use standalone server setup for monotone. %prep %setup -q -%patch1 -p1 - %build -%configure --with-bundled-lua=no --with-bundled-sqlite=%{bundled_sqlite} +%configure --with-bundled-lua=%{bundled_lua} \ + --with-bundled-sqlite=%{bundled_sqlite} make %{?_smp_mflags} %check @@ -84,14 +86,21 @@ mkdir -p %{buildroot}/var/db ln -snf ../bin/monotone %{buildroot}%{_sbindir}/monotone-server %{__install} -c -m 0555 %{SOURCE1} %{buildroot}/etc/init.d/monotone %{__install} -c -m 0644 %{SOURCE2} %{buildroot}/etc/sysconfig/monotone -%{__install} -c -m 0644 /dev/null %{buildroot}/etc/monotonerc +%{__install} -d -m 0755 %{buildroot}/etc/monotone +%{__install} -d -m 0750 %{buildroot}/etc/monotone/private-keys %{__install} -d -m 0770 %{buildroot}/var/db/monotone # These do not actually wind up in the package, due to %%ghost. +%{__install} -c -m 0440 /dev/null %{buildroot}/etc/monotone/passphrase.lua +%{__install} -c -m 0640 /dev/null %{buildroot}/etc/monotone/read-permissions +%{__install} -c -m 0640 /dev/null %{buildroot}/etc/monotone/write-permissions +%{__install} -c -m 0644 /dev/null %{buildroot}/etc/monotone/monotonerc touch %{buildroot}/var/db/monotone/server.db -touch %{buildroot}/var/db/monotone/passphrase.lua + +cp %{SOURCE3} . %clean +rm -f README.monotone-server rm -rf %{buildroot} %post @@ -118,14 +127,20 @@ fi %files server +%doc README.monotone-server %defattr(-,root,root,-) %{_sbindir}/monotone-server /etc/init.d/monotone -%config(noreplace) /etc/sysconfig/monotone -%config(noreplace) /etc/monotonerc +%config /etc/sysconfig/monotone +%dir %attr(0755,root,monotone) /etc/monotone +%dir %attr(0750,root,monotone) /etc/monotone/private-keys +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/monotonerc +%attr(0440,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/passphrase.lua +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/read-permissions +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/write-permissions + %attr(0750,root,monotone) /etc/monotone/private-keys %dir %attr(0770,monotone,monotone) /var/db/monotone %attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/monotone/server.db -%attr(0600,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/monotone/passphrase.lua %pre server # Add the "monotone" user @@ -136,6 +151,9 @@ fi # Register the monotone service /sbin/chkconfig --add monotone +# Restart the running server, which will update its db format when needed. +/sbin/service monotone condrestart + %preun server if [ $1 = 0 ]; then /sbin/service monotone stop > /dev/null 2>&1 @@ -144,6 +162,9 @@ fi %changelog +* Sun Dec 11 2005 Roland McGrath - 0.24-1 +- Updated for 0.24 release. + * Mon Oct 3 2005 Roland McGrath - 0.23-1 - Updated for 0.23 release. diff --git a/monotone.sysconfig b/monotone.sysconfig index bd8993d..bd27b30 100644 --- a/monotone.sysconfig +++ b/monotone.sysconfig @@ -1,9 +1,10 @@ -MONOTONERC=/etc/monotonerc +MONOTONE_CONFDIR=/etc/monotone +MONOTONE_KEYDIR=/etc/monotone/private-keys MONOTONE_DBFILE=/var/db/monotone/server.db -MONOTONE_PPFILE=/var/db/monotone/passphrase.lua +MONOTONE_PPFILE=/etc/monotone/passphrase.lua -MONOTONE_RCOPTS="--norc --rcfile=$MONOTONERC" -MONOTONE_DBOPTS="--db=$MONOTONE_DBFILE" +MONOTONE_RCOPTS="--confdir=$MONOTONE_CONFDIR" +MONOTONE_DBOPTS="--db=$MONOTONE_DBFILE --keydir=$MONOTONE_KEYDIR" MONOTONE_PPOPTS="--rcfile=$MONOTONE_PPFILE" -MONOTONE_SERVE_OPTS="0.0.0.0 '*'" +MONOTONE_SERVE_OPTS="'*'" diff --git a/sources b/sources index 79889d1..f28f510 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6d9e909480c2be0b23e2820c3a42e6f1 monotone-0.23.tar.gz +8193203c8b48104500d956f9e524bfcd monotone-0.24.tar.gz From f0b66f093fc984d601cfe07d160e65df1186ceb9 Mon Sep 17 00:00:00 2001 From: roland Date: Sun, 18 Dec 2005 06:15:35 +0000 Subject: [PATCH 008/145] Patched to work with gcc 4.1. --- monotone-0.24-gcc41.patch | 33 +++++++++++++++++++++++++++++++++ monotone.spec | 9 ++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 monotone-0.24-gcc41.patch diff --git a/monotone-0.24-gcc41.patch b/monotone-0.24-gcc41.patch new file mode 100644 index 0000000..ae1ccc0 --- /dev/null +++ b/monotone-0.24-gcc41.patch @@ -0,0 +1,33 @@ +2005-12-17 Roland McGrath + + * work.hh (struct file_itemizer): Remove extraneous qualifier on + visit_file declaration. + * app_state.hh (class app_state): Remove extraneous qualifier on + set_restriction declaration. + +--- monotone-0.24/app_state.hh ++++ monotone-0.24/app_state.hh +@@ -88,9 +88,9 @@ public: + void require_working_copy(std::string const & explanation = ""); + void create_working_copy(system_path const & dir); + +- void app_state::set_restriction(path_set const & valid_paths, +- std::vector const & paths, +- bool respect_ignore = true); ++ void set_restriction(path_set const & valid_paths, ++ std::vector const & paths, ++ bool respect_ignore = true); + bool restriction_includes(file_path const & path); + + // Set the branch name. If you only invoke set_branch, the branch +--- monotone-0.24/work.hh ++++ monotone-0.24/work.hh +@@ -56,7 +56,7 @@ struct file_itemizer : public tree_walke + path_set & ignored; + file_itemizer(app_state & a, path_set & k, path_set & u, path_set & i) + : app(a), known(k), unknown(u), ignored(i) {} +- virtual void file_itemizer::visit_file(file_path const & path); ++ virtual void visit_file(file_path const & path); + }; + + void diff --git a/monotone.spec b/monotone.spec index 9bf8786..14aa1be 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.24 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -12,6 +12,8 @@ Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server +Patch1: monotone-0.24-gcc41.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel @@ -59,6 +61,8 @@ This package provides an easy-to-use standalone server setup for monotone. %prep %setup -q +%patch1 -p1 + %build %configure --with-bundled-lua=%{bundled_lua} \ --with-bundled-sqlite=%{bundled_sqlite} @@ -162,6 +166,9 @@ fi %changelog +* Sat Dec 17 2005 Roland McGrath - 0.24-2 +- Patched to work with gcc 4.1. + * Sun Dec 11 2005 Roland McGrath - 0.24-1 - Updated for 0.24 release. From 21ac64c6e825c20eb6e51afe9010899e45567f5f Mon Sep 17 00:00:00 2001 From: roland Date: Fri, 6 Jan 2006 11:34:11 +0000 Subject: [PATCH 009/145] Update to 0.25 --- .cvsignore | 2 +- monotone-xfail-if-root.patch | 22 ++++++++++++++++++++++ monotone.spec | 11 +++++++---- sources | 2 +- 4 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 monotone-xfail-if-root.patch diff --git a/.cvsignore b/.cvsignore index c83798f..83e6c9b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.24.tar.gz +monotone-0.25.tar.gz diff --git a/monotone-xfail-if-root.patch b/monotone-xfail-if-root.patch new file mode 100644 index 0000000..6b59986 --- /dev/null +++ b/monotone-xfail-if-root.patch @@ -0,0 +1,22 @@ +--- monotone-0.23/testsuite ++++ monotone-0.23/testsuite +@@ -67479,7 +67479,7 @@ $at_traceon + at_desc='checkout validates target directory' + $at_quiet $ECHO_N " 64: checkout validates target directory $ECHO_C" + at_xfail=no +- test -O / && at_xfail=yes ++ test -w test_dir4 && at_xfail=yes + ( + echo "64. t_checkout_dir.at:1: testing ..." + $at_traceon +--- monotone-0.23/tests/t_checkout_dir.at ++++ monotone-0.23/tests/t_checkout_dir.at +@@ -20,7 +20,7 @@ AT_CHECK(MONOTONE --branch=testbranch ch + mkdir test_dir4 + chmod 444 test_dir4 + # XFAIL if run as root (hi Gentoo!) +-AT_XFAIL_IF(test -O /) ++AT_XFAIL_IF(test -w test_dir4) + AT_CHECK(MONOTONE --branch=testbranch checkout test_dir4, + [1], [ignore], [ignore]) + AT_CHECK(MONOTONE --branch=testbranch checkout test_dir4/subdir, diff --git a/monotone.spec b/monotone.spec index 14aa1be..67ee756 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.24 +Version: 0.25 Release: 2%{?dist} Summary: A free, distributed version control system @@ -12,7 +12,7 @@ Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server -Patch1: monotone-0.24-gcc41.patch +Patch1: monotone-xfail-if-root.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -166,8 +166,11 @@ fi %changelog -* Sat Dec 17 2005 Roland McGrath - 0.24-2 -- Patched to work with gcc 4.1. +* Fri Jan 6 2006 Roland McGrath - 0.25-2 +- Restore testsuite fix for nonroot owner of / in build chroot. + +* Thu Jan 5 2006 Roland McGrath - 0.25-1 +- Updated for 0.25 release. * Sun Dec 11 2005 Roland McGrath - 0.24-1 - Updated for 0.24 release. diff --git a/sources b/sources index f28f510..ca48a2d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8193203c8b48104500d956f9e524bfcd monotone-0.24.tar.gz +fb0ad449cd0093854c55dbd5c6fc07e2 monotone-0.25.tar.gz From a6d41da2a9ba12b32ac11303a051d682479f54b0 Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 28 Feb 2006 18:58:17 +0000 Subject: [PATCH 010/145] Bump release for rebuild. --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 67ee756..6582b95 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.25 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -166,6 +166,9 @@ fi %changelog +* Tue Feb 28 2006 Roland McGrath - 0.25-3 +- Rebuilt. + * Fri Jan 6 2006 Roland McGrath - 0.25-2 - Restore testsuite fix for nonroot owner of / in build chroot. From 8e98bb9c188341da105a7906c91184295447ce1c Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 11 Apr 2006 21:10:32 +0000 Subject: [PATCH 011/145] New upstream version 0.26 --- .cvsignore | 2 +- README.monotone-server | 2 +- monotone-xfail-if-root.patch | 28 ++++++++++++++-------------- monotone.init | 10 ++++++++-- monotone.spec | 21 +++++++++++---------- monotone.sysconfig | 2 +- sources | 2 +- 7 files changed, 37 insertions(+), 30 deletions(-) diff --git a/.cvsignore b/.cvsignore index 83e6c9b..0b7b20b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.25.tar.gz +monotone-0.26.tar.gz diff --git a/README.monotone-server b/README.monotone-server index 26e96ab..d5d2299 100644 --- a/README.monotone-server +++ b/README.monotone-server @@ -35,7 +35,7 @@ must allow some key and that key must be in the database already. You can put a key in the server's database easily with "service monotone import", e.g. to import the public key for a private key in ~/.monotone/keys: - monotone pubkey me@my.com | sudo service monotone import + mtn pubkey me@my.com | sudo service monotone import For problems with this package or its scripts, please file bugs at http://bugzilla.redhat.com/ for the "monotone" component diff --git a/monotone-xfail-if-root.patch b/monotone-xfail-if-root.patch index 6b59986..b2541b0 100644 --- a/monotone-xfail-if-root.patch +++ b/monotone-xfail-if-root.patch @@ -1,6 +1,17 @@ ---- monotone-0.23/testsuite -+++ monotone-0.23/testsuite -@@ -67479,7 +67479,7 @@ $at_traceon +--- monotone/tests/t_checkout_dir.at ++++ monotone/tests/t_checkout_dir.at +@@ -20,7 +20,7 @@ AT_CHECK(MTN --branch=testbranch checkou + mkdir test_dir4 + chmod 444 test_dir4 + # XFAIL if run as root (hi Gentoo!) +-AT_XFAIL_IF(test -O /) ++AT_XFAIL_IF(test -w test_dir4) + AT_CHECK(MTN --branch=testbranch checkout test_dir4, + [1], [ignore], [ignore]) + AT_CHECK(MTN --branch=testbranch checkout test_dir4/subdir, +--- monotone/testsuite ++++ monotone/testsuite +@@ -69608,7 +69608,7 @@ $at_traceon at_desc='checkout validates target directory' $at_quiet $ECHO_N " 64: checkout validates target directory $ECHO_C" at_xfail=no @@ -9,14 +20,3 @@ ( echo "64. t_checkout_dir.at:1: testing ..." $at_traceon ---- monotone-0.23/tests/t_checkout_dir.at -+++ monotone-0.23/tests/t_checkout_dir.at -@@ -20,7 +20,7 @@ AT_CHECK(MONOTONE --branch=testbranch ch - mkdir test_dir4 - chmod 444 test_dir4 - # XFAIL if run as root (hi Gentoo!) --AT_XFAIL_IF(test -O /) -+AT_XFAIL_IF(test -w test_dir4) - AT_CHECK(MONOTONE --branch=testbranch checkout test_dir4, - [1], [ignore], [ignore]) - AT_CHECK(MONOTONE --branch=testbranch checkout test_dir4/subdir, diff --git a/monotone.init b/monotone.init index ffbf8aa..6940aeb 100644 --- a/monotone.init +++ b/monotone.init @@ -24,9 +24,10 @@ # By default it's all good RETVAL=0 -MT=/usr/bin/monotone +MT=/usr/bin/mtn MTSERVER=/usr/sbin/monotone-server MONOTONE_LOGFILE=${MONOTONE_LOGFILE:-/var/log/monotone.log} +MONOTONE_OLDDB=/var/db/monotone/server.db random_passphrase() { @@ -42,6 +43,11 @@ case "$1" in start) if [ -e $MONOTONE_DBFILE ]; then $0 migrate + elif [ -e $MONOTONE_OLDDB ]; then + echo -n $"Pre-0.26 monotone database must be migrated by hand: " + failure + echo + false else $0 init fi @@ -86,7 +92,7 @@ case "$1" in RETVAL=$? ;; init) - echo -n $"Initializing database" "$MONOTONE_DBFILE" ": " + echo -n $"Initializing database" "${MONOTONE_DBFILE}: " { [ -d /var/db/monotone ] || /usr/bin/install -o ${MONOTONE_USER:-monotone} \ -g ${MONOTONE_GROUP:-monotone} \ diff --git a/monotone.spec b/monotone.spec index 6582b95..c1bdfe3 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.25 -Release: 3%{?dist} +Version: 0.26 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -75,6 +75,7 @@ make check || { cat testsuite.log; false; } rm -rf %{buildroot} make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_infodir}/dir +rm -f %{buildroot}%{_datadir}/doc/monotone/monotone.html %find_lang %{name} @@ -87,7 +88,7 @@ mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}/etc/init.d mkdir -p %{buildroot}/etc/sysconfig mkdir -p %{buildroot}/var/db -ln -snf ../bin/monotone %{buildroot}%{_sbindir}/monotone-server +ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server %{__install} -c -m 0555 %{SOURCE1} %{buildroot}/etc/init.d/monotone %{__install} -c -m 0644 %{SOURCE2} %{buildroot}/etc/sysconfig/monotone %{__install} -d -m 0755 %{buildroot}/etc/monotone @@ -99,7 +100,7 @@ ln -snf ../bin/monotone %{buildroot}%{_sbindir}/monotone-server %{__install} -c -m 0640 /dev/null %{buildroot}/etc/monotone/read-permissions %{__install} -c -m 0640 /dev/null %{buildroot}/etc/monotone/write-permissions %{__install} -c -m 0644 /dev/null %{buildroot}/etc/monotone/monotonerc -touch %{buildroot}/var/db/monotone/server.db +touch %{buildroot}/var/db/monotone/server.mtn cp %{SOURCE3} . @@ -124,9 +125,9 @@ fi %doc AUTHORS COPYING ChangeLog INSTALL NEWS README README.changesets UPGRADE %doc monotone.html -%{_bindir}/monotone +%{_bindir}/mtn %{_infodir}/monotone.info* -%{_mandir}/man1/monotone.1* +%{_mandir}/man1/mtn.1* %{_datadir}/emacs/site-lisp/monotone*.el* @@ -142,9 +143,8 @@ fi %attr(0440,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/passphrase.lua %attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/read-permissions %attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/write-permissions - %attr(0750,root,monotone) /etc/monotone/private-keys %dir %attr(0770,monotone,monotone) /var/db/monotone -%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/monotone/server.db +%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/monotone/server.mtn %pre server # Add the "monotone" user @@ -166,8 +166,9 @@ fi %changelog -* Tue Feb 28 2006 Roland McGrath - 0.25-3 -- Rebuilt. +* Mon Apr 10 2006 Roland McGrath - 0.26-1 +- Updated for 0.25 release. + - Major changes; see UPGRADE doc file for details. * Fri Jan 6 2006 Roland McGrath - 0.25-2 - Restore testsuite fix for nonroot owner of / in build chroot. diff --git a/monotone.sysconfig b/monotone.sysconfig index bd27b30..a0a5c23 100644 --- a/monotone.sysconfig +++ b/monotone.sysconfig @@ -1,6 +1,6 @@ MONOTONE_CONFDIR=/etc/monotone MONOTONE_KEYDIR=/etc/monotone/private-keys -MONOTONE_DBFILE=/var/db/monotone/server.db +MONOTONE_DBFILE=/var/db/monotone/server.mtn MONOTONE_PPFILE=/etc/monotone/passphrase.lua MONOTONE_RCOPTS="--confdir=$MONOTONE_CONFDIR" diff --git a/sources b/sources index ca48a2d..2887cc8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fb0ad449cd0093854c55dbd5c6fc07e2 monotone-0.25.tar.gz +21b902d1b48ffb868536d04c4ad38155 monotone-0.26.tar.gz From 6778404ac78f96c6ef3a7ba9bc5ee75c992d5ae0 Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 11 Apr 2006 21:12:27 +0000 Subject: [PATCH 012/145] Nuke obsolete patch --- monotone-0.24-gcc41.patch | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 monotone-0.24-gcc41.patch diff --git a/monotone-0.24-gcc41.patch b/monotone-0.24-gcc41.patch deleted file mode 100644 index ae1ccc0..0000000 --- a/monotone-0.24-gcc41.patch +++ /dev/null @@ -1,33 +0,0 @@ -2005-12-17 Roland McGrath - - * work.hh (struct file_itemizer): Remove extraneous qualifier on - visit_file declaration. - * app_state.hh (class app_state): Remove extraneous qualifier on - set_restriction declaration. - ---- monotone-0.24/app_state.hh -+++ monotone-0.24/app_state.hh -@@ -88,9 +88,9 @@ public: - void require_working_copy(std::string const & explanation = ""); - void create_working_copy(system_path const & dir); - -- void app_state::set_restriction(path_set const & valid_paths, -- std::vector const & paths, -- bool respect_ignore = true); -+ void set_restriction(path_set const & valid_paths, -+ std::vector const & paths, -+ bool respect_ignore = true); - bool restriction_includes(file_path const & path); - - // Set the branch name. If you only invoke set_branch, the branch ---- monotone-0.24/work.hh -+++ monotone-0.24/work.hh -@@ -56,7 +56,7 @@ struct file_itemizer : public tree_walke - path_set & ignored; - file_itemizer(app_state & a, path_set & k, path_set & u, path_set & i) - : app(a), known(k), unknown(u), ignored(i) {} -- virtual void file_itemizer::visit_file(file_path const & path); -+ virtual void visit_file(file_path const & path); - }; - - void From 211a81a4e258cb2a9c00be06657c8ccfdc7a30b8 Mon Sep 17 00:00:00 2001 From: roland Date: Mon, 8 May 2006 19:50:21 +0000 Subject: [PATCH 013/145] Fix service script genkey subcommand. --- monotone.init | 7 ++++--- monotone.spec | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/monotone.init b/monotone.init index 6940aeb..442c65a 100644 --- a/monotone.init +++ b/monotone.init @@ -112,9 +112,10 @@ case "$1" in if passphrase=`random_passphrase` && { echo $passphrase; echo $passphrase; } | - runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c \ - "$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \ - genkey $MONOTONE_KEYID" > /dev/null 2>&1 && + (umask 027; $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \ + genkey $MONOTONE_KEYID > /dev/null 2>&1) && + /bin/chgrp ${MONOTONE_GROUP:-monotone} \ + "$MONOTONE_KEYDIR/$MONOTONE_KEYID" && cat > $tmp < - 0.26-2 +- Fix service script genkey subcommand. + * Mon Apr 10 2006 Roland McGrath - 0.26-1 - Updated for 0.25 release. - Major changes; see UPGRADE doc file for details. From 67f6966a34a06c3c710cc89198b977d39c69a937 Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 12 Jul 2006 07:07:51 +0000 Subject: [PATCH 014/145] New upstream version 0.27 --- .cvsignore | 2 +- monotone-xfail-if-root.patch | 22 ---------------------- monotone.spec | 13 ++++++------- sources | 2 +- 4 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 monotone-xfail-if-root.patch diff --git a/.cvsignore b/.cvsignore index 0b7b20b..4b068b6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.26.tar.gz +monotone-0.27.tar.gz diff --git a/monotone-xfail-if-root.patch b/monotone-xfail-if-root.patch deleted file mode 100644 index b2541b0..0000000 --- a/monotone-xfail-if-root.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- monotone/tests/t_checkout_dir.at -+++ monotone/tests/t_checkout_dir.at -@@ -20,7 +20,7 @@ AT_CHECK(MTN --branch=testbranch checkou - mkdir test_dir4 - chmod 444 test_dir4 - # XFAIL if run as root (hi Gentoo!) --AT_XFAIL_IF(test -O /) -+AT_XFAIL_IF(test -w test_dir4) - AT_CHECK(MTN --branch=testbranch checkout test_dir4, - [1], [ignore], [ignore]) - AT_CHECK(MTN --branch=testbranch checkout test_dir4/subdir, ---- monotone/testsuite -+++ monotone/testsuite -@@ -69608,7 +69608,7 @@ $at_traceon - at_desc='checkout validates target directory' - $at_quiet $ECHO_N " 64: checkout validates target directory $ECHO_C" - at_xfail=no -- test -O / && at_xfail=yes -+ test -w test_dir4 && at_xfail=yes - ( - echo "64. t_checkout_dir.at:1: testing ..." - $at_traceon diff --git a/monotone.spec b/monotone.spec index 13a789f..d649659 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.26 -Release: 2%{?dist} +Version: 0.27 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -12,8 +12,6 @@ Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server -Patch1: monotone-xfail-if-root.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel @@ -61,8 +59,6 @@ This package provides an easy-to-use standalone server setup for monotone. %prep %setup -q -%patch1 -p1 - %build %configure --with-bundled-lua=%{bundled_lua} \ --with-bundled-sqlite=%{bundled_sqlite} @@ -166,11 +162,14 @@ fi %changelog +* Tue Jul 11 2006 Roland McGrath - 0.27-1 +- Updated for 0.27 release. + * Mon May 8 2006 Roland McGrath - 0.26-2 - Fix service script genkey subcommand. * Mon Apr 10 2006 Roland McGrath - 0.26-1 -- Updated for 0.25 release. +- Updated for 0.26 release. - Major changes; see UPGRADE doc file for details. * Fri Jan 6 2006 Roland McGrath - 0.25-2 diff --git a/sources b/sources index 2887cc8..0996c4d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -21b902d1b48ffb868536d04c4ad38155 monotone-0.26.tar.gz +cf3d8f26b7570d0d65834c3949913e2d monotone-0.27.tar.gz From 0291f1f287952ba5c592f95fb770402d5aea78e5 Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 3 Aug 2006 20:28:49 +0000 Subject: [PATCH 015/145] Update to 0.28 --- .cvsignore | 2 +- monotone.init | 17 +++++++++------- monotone.spec | 56 ++++++++++++++++++++++++++++----------------------- sources | 2 +- 4 files changed, 43 insertions(+), 34 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4b068b6..e3abea9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.27.tar.gz +monotone-0.28.tar.gz diff --git a/monotone.init b/monotone.init index 442c65a..b50829c 100644 --- a/monotone.init +++ b/monotone.init @@ -5,7 +5,7 @@ # chkconfig: - 90 10 # description: Monotone netsync protocol server # processname: monotone-server -# pidfile: /var/run/monotone-server.pid +# pidfile: /var/run/monotone/monotone-server.pid # config: /etc/sysconfig/monotone # config: /etc/monotone/monotonerc @@ -26,6 +26,7 @@ RETVAL=0 MT=/usr/bin/mtn MTSERVER=/usr/sbin/monotone-server +MONOTONE_PIDFILE=/var/run/monotone/monotone-server.pid MONOTONE_LOGFILE=${MONOTONE_LOGFILE:-/var/log/monotone.log} MONOTONE_OLDDB=/var/db/monotone/server.db @@ -62,10 +63,12 @@ case "$1" in { exec 3>> $MONOTONE_LOGFILE && echo >&3 "Server restart at `date`" && - daemon --user=${MONOTONE_USER:-monotone} $MTSERVER \ - $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS \ - serve --pid-file=/var/run/monotone-server.pid \ - "$MONOTONE_SERVE_OPTS" ">&3 2>&3 &" + daemon --user=${MONOTONE_USER:-monotone} \ + --pidfile $MONOTONE_PIDFILE \ + $MTSERVER \ + $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS \ + serve --pid-file=$MONOTONE_PIDFILE \ + "$MONOTONE_SERVE_OPTS" ">&3 2>&3 &" } && success || failure RETVAL=$? echo @@ -75,7 +78,7 @@ case "$1" in stop) # Stop daemons. echo -n $"Stopping monotone server: " - killproc $MTSERVER + killproc -p $MONOTONE_PIDFILE $MTSERVER RETVAL=$? [ $RETVAL = 0 ] && rm -f /var/lock/subsys/monotone echo @@ -88,7 +91,7 @@ case "$1" in [ -e /var/lock/subsys/monotone ] && $0 restart ;; status) - status monotone-server + status -p $MONOTONE_PIDFILE monotone-server RETVAL=$? ;; init) diff --git a/monotone.spec b/monotone.spec index d649659..348ee85 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.27 +Version: 0.28 Release: 1%{?dist} Summary: A free, distributed version control system @@ -81,22 +81,23 @@ mkdir -p ${lispdir} emacs -batch -f batch-byte-compile ${lispdir} mkdir -p %{buildroot}%{_sbindir} -mkdir -p %{buildroot}/etc/init.d -mkdir -p %{buildroot}/etc/sysconfig -mkdir -p %{buildroot}/var/db +mkdir -p %{buildroot}%{_sysconfdir}/init.d +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig +mkdir -p %{buildroot}%{_localstatedir}/db ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server -%{__install} -c -m 0555 %{SOURCE1} %{buildroot}/etc/init.d/monotone -%{__install} -c -m 0644 %{SOURCE2} %{buildroot}/etc/sysconfig/monotone -%{__install} -d -m 0755 %{buildroot}/etc/monotone -%{__install} -d -m 0750 %{buildroot}/etc/monotone/private-keys -%{__install} -d -m 0770 %{buildroot}/var/db/monotone +%{__install} -c -m 0555 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/monotone +%{__install} -c -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone +%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/monotone +%{__install} -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys +%{__install} -d -m 0770 %{buildroot}%{_localstatedir}/db/monotone +%{__install} -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone # These do not actually wind up in the package, due to %%ghost. -%{__install} -c -m 0440 /dev/null %{buildroot}/etc/monotone/passphrase.lua -%{__install} -c -m 0640 /dev/null %{buildroot}/etc/monotone/read-permissions -%{__install} -c -m 0640 /dev/null %{buildroot}/etc/monotone/write-permissions -%{__install} -c -m 0644 /dev/null %{buildroot}/etc/monotone/monotonerc -touch %{buildroot}/var/db/monotone/server.mtn +%{__install} -c -m 0440 /dev/null %{buildroot}%{_sysconfdir}/monotone/passphrase.lua +%{__install} -c -m 0640 /dev/null %{buildroot}%{_sysconfdir}/monotone/read-permissions +%{__install} -c -m 0640 /dev/null %{buildroot}%{_sysconfdir}/monotone/write-permissions +%{__install} -c -m 0644 /dev/null %{buildroot}%{_sysconfdir}/monotone/monotonerc +touch %{buildroot}%{_localstatedir}/db/monotone/server.mtn cp %{SOURCE3} . @@ -131,21 +132,22 @@ fi %doc README.monotone-server %defattr(-,root,root,-) %{_sbindir}/monotone-server -/etc/init.d/monotone -%config /etc/sysconfig/monotone -%dir %attr(0755,root,monotone) /etc/monotone -%dir %attr(0750,root,monotone) /etc/monotone/private-keys -%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/monotonerc -%attr(0440,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/passphrase.lua -%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/read-permissions -%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/monotone/write-permissions -%dir %attr(0770,monotone,monotone) /var/db/monotone -%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/monotone/server.mtn +%{_sysconfdir}/init.d/monotone +%dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone +%config %{_sysconfdir}/sysconfig/monotone +%dir %attr(0755,root,monotone) %{_sysconfdir}/monotone +%dir %attr(0750,root,monotone) %{_sysconfdir}/monotone/private-keys +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/monotonerc +%attr(0440,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/passphrase.lua +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/read-permissions +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/write-permissions +%dir %attr(0770,monotone,monotone) %{_localstatedir}/db/monotone +%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/db/monotone/server.mtn %pre server # Add the "monotone" user /usr/sbin/useradd -c "Monotone Netsync Server" \ - -s /sbin/nologin -r -d /var/db/monotone monotone 2> /dev/null || : + -s /sbin/nologin -r -d %{_localstatedir}/db/monotone monotone 2> /dev/null || : %post server # Register the monotone service @@ -162,6 +164,10 @@ fi %changelog +* Thu Aug 3 2006 Roland McGrath - 0.28-1 +- Updated for 0.28 release. (#198652) +- Move server PID file into /var/run/monotone subdirectory. (#198761) + * Tue Jul 11 2006 Roland McGrath - 0.27-1 - Updated for 0.27 release. diff --git a/sources b/sources index 0996c4d..08dc1b1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf3d8f26b7570d0d65834c3949913e2d monotone-0.27.tar.gz +8c2e81152e12fed543a8702792232ed3 monotone-0.28.tar.gz From 26043cbf24933ffafeb8ff08fbb7533b46432538 Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 3 Aug 2006 22:23:36 +0000 Subject: [PATCH 016/145] Propagate from FC-5 --- monotone.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monotone.spec b/monotone.spec index 348ee85..50935d3 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.28 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -65,7 +65,7 @@ This package provides an easy-to-use standalone server setup for monotone. make %{?_smp_mflags} %check -make check || { cat testsuite.log; false; } +make check || { cat tester_dir/tester.log; false; } %install rm -rf %{buildroot} @@ -164,7 +164,7 @@ fi %changelog -* Thu Aug 3 2006 Roland McGrath - 0.28-1 +* Thu Aug 3 2006 Roland McGrath - 0.28-2 - Updated for 0.28 release. (#198652) - Move server PID file into /var/run/monotone subdirectory. (#198761) From 0dc1ceb8329b8a738601cee07f9d5f7aa06def69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 27 Aug 2006 20:41:10 +0000 Subject: [PATCH 017/145] http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild --- needs.rebuild | 1 + 1 file changed, 1 insertion(+) create mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild new file mode 100644 index 0000000..815fd29 --- /dev/null +++ b/needs.rebuild @@ -0,0 +1 @@ +http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From 15f456b30fe6b59d7e9dea3d972815f397b436d6 Mon Sep 17 00:00:00 2001 From: roland Date: Fri, 8 Sep 2006 20:52:46 +0000 Subject: [PATCH 018/145] Release bump for rebuild. --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 50935d3..8319538 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.28 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -164,6 +164,9 @@ fi %changelog +* Fri Sep 8 2006 Roland McGrath - 0.28-3 +- FC6 mass rebuild + * Thu Aug 3 2006 Roland McGrath - 0.28-2 - Updated for 0.28 release. (#198652) - Move server PID file into /var/run/monotone subdirectory. (#198761) From e7170ee424ed14478d4e94bc18a83db0ff5d9c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 18 Sep 2006 18:40:53 +0000 Subject: [PATCH 019/145] Remove rebuild needed flag for maintained packages that were actually rebuilt. --- needs.rebuild | 1 - 1 file changed, 1 deletion(-) delete mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild deleted file mode 100644 index 815fd29..0000000 --- a/needs.rebuild +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From da39877c4b51b2f065fd792cd65f22ce0a74eb30 Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 11 Oct 2006 19:33:15 +0000 Subject: [PATCH 020/145] 0.30 release --- .cvsignore | 2 +- monotone.init | 2 ++ monotone.spec | 9 +++++---- sources | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index e3abea9..064b2ba 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.28.tar.gz +monotone-0.30.tar.gz diff --git a/monotone.init b/monotone.init index b50829c..b367162 100644 --- a/monotone.init +++ b/monotone.init @@ -80,6 +80,7 @@ case "$1" in echo -n $"Stopping monotone server: " killproc -p $MONOTONE_PIDFILE $MTSERVER RETVAL=$? + rm -f $MONOTONE_PIDFILE [ $RETVAL = 0 ] && rm -f /var/lock/subsys/monotone echo ;; @@ -153,6 +154,7 @@ EOF echo $"Checking database format in" "${MONOTONE_DBFILE}:" (umask 027 $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db migrate && + $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db regenerate_rosters && /bin/chgrp -R ${MONOTONE_GROUP:-monotone} $MONOTONE_KEYDIR) success $"database check" || failure $"database check" diff --git a/monotone.spec b/monotone.spec index 8319538..57a3d60 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.28 -Release: 3%{?dist} +Version: 0.30 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -164,8 +164,9 @@ fi %changelog -* Fri Sep 8 2006 Roland McGrath - 0.28-3 -- FC6 mass rebuild +* Tue Oct 10 2006 Roland McGrath - 0.30-1 +- Updated for 0.30 release. +- Fix service script to work around buggy init.d/functions. (#198761) * Thu Aug 3 2006 Roland McGrath - 0.28-2 - Updated for 0.28 release. (#198652) diff --git a/sources b/sources index 08dc1b1..88f2945 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8c2e81152e12fed543a8702792232ed3 monotone-0.28.tar.gz +94a1f8369162f7a7df8596b365a1d846 monotone-0.30.tar.gz From ba5dccdf60c596ba54b275b1ace4f195752f2a6d Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 11 Oct 2006 19:54:20 +0000 Subject: [PATCH 021/145] update boost buildreq --- monotone.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 57a3d60..124fef5 100644 --- a/monotone.spec +++ b/monotone.spec @@ -15,7 +15,7 @@ Source3: README.monotone-server BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel -BuildRequires: boost-devel >= 1.32.0 +BuildRequires: boost-devel >= 1.33.1 %if 1 %define bundled_sqlite yes %else From e65fa756216c931d927f6c5f094cb5708512aa85 Mon Sep 17 00:00:00 2001 From: roland Date: Sun, 12 Nov 2006 03:14:05 +0000 Subject: [PATCH 022/145] New upstream version 0.31 --- .cvsignore | 2 +- monotone.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 064b2ba..dcd2556 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.30.tar.gz +monotone-0.31.tar.gz diff --git a/monotone.spec b/monotone.spec index 124fef5..0eb8c8e 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.30 +Version: 0.31 Release: 1%{?dist} Summary: A free, distributed version control system @@ -164,6 +164,9 @@ fi %changelog +* Sat Nov 11 2006 Roland McGrath - 0.31-1 +- Updated for 0.31 release. + * Tue Oct 10 2006 Roland McGrath - 0.30-1 - Updated for 0.30 release. - Fix service script to work around buggy init.d/functions. (#198761) diff --git a/sources b/sources index 88f2945..33af319 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -94a1f8369162f7a7df8596b365a1d846 monotone-0.30.tar.gz +5a5feb8d053a5993ab516a1186bb5883 monotone-0.31.tar.gz From 2f99056d226641edf1fc64e9b71b90ef992b6392 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 22 Dec 2006 05:27:21 +0000 Subject: [PATCH 023/145] Bump and rebuild to fix upgrade path --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 0eb8c8e..c38a886 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.31 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -164,6 +164,9 @@ fi %changelog +* Thu Dec 21 2006 Kevin Fenzi - 0.31-2 +- Bump and rebuild to fix upgrade path + * Sat Nov 11 2006 Roland McGrath - 0.31-1 - Updated for 0.31 release. From 51046cfd1dcd0d6db0b99bc4ab273bc3b037efb1 Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 28 Feb 2007 21:37:42 +0000 Subject: [PATCH 024/145] Update to 0.32 --- .cvsignore | 2 +- monotone.init | 2 +- monotone.spec | 11 +++++++---- monotone.sysconfig | 2 +- sources | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index dcd2556..8d98952 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.31.tar.gz +monotone-0.32.tar.gz diff --git a/monotone.init b/monotone.init index b367162..9ddd4ab 100644 --- a/monotone.init +++ b/monotone.init @@ -154,7 +154,7 @@ EOF echo $"Checking database format in" "${MONOTONE_DBFILE}:" (umask 027 $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db migrate && - $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db regenerate_rosters && + $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS db regenerate_caches && /bin/chgrp -R ${MONOTONE_GROUP:-monotone} $MONOTONE_KEYDIR) success $"database check" || failure $"database check" diff --git a/monotone.spec b/monotone.spec index c38a886..96d9fa3 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,13 +1,13 @@ Name: monotone -Version: 0.31 -Release: 2%{?dist} +Version: 0.32 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPL -URL: http://www.venge.net/monotone/ -Source0: http://www.venge.net/monotone/downloads/%{name}-%{version}.tar.gz +URL: http://monotone.ca/ +Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server @@ -164,6 +164,9 @@ fi %changelog +* Wed Feb 28 2007 Roland McGrath - 0.32-1 +- Updated for 0.32 release. + * Thu Dec 21 2006 Kevin Fenzi - 0.31-2 - Bump and rebuild to fix upgrade path diff --git a/monotone.sysconfig b/monotone.sysconfig index a0a5c23..128c0f3 100644 --- a/monotone.sysconfig +++ b/monotone.sysconfig @@ -7,4 +7,4 @@ MONOTONE_RCOPTS="--confdir=$MONOTONE_CONFDIR" MONOTONE_DBOPTS="--db=$MONOTONE_DBFILE --keydir=$MONOTONE_KEYDIR" MONOTONE_PPOPTS="--rcfile=$MONOTONE_PPFILE" -MONOTONE_SERVE_OPTS="'*'" +MONOTONE_SERVE_OPTS="" diff --git a/sources b/sources index 33af319..8511572 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5a5feb8d053a5993ab516a1186bb5883 monotone-0.31.tar.gz +98b7ac7d680c0ba768bf74628fa74de9 monotone-0.32.tar.gz From 405d52c916c6a1bda7b2f4ee02b6173a002534c6 Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 1 Mar 2007 22:14:22 +0000 Subject: [PATCH 025/145] Update to 0.33 --- .cvsignore | 2 +- monotone.spec | 19 ++++++++++++------- sources | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.cvsignore b/.cvsignore index 8d98952..6184ddb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.32.tar.gz +monotone-0.33.tar.gz diff --git a/monotone.spec b/monotone.spec index 96d9fa3..5c0bfd2 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.32 +Version: 0.33 Release: 1%{?dist} Summary: A free, distributed version control system @@ -75,18 +75,20 @@ rm -f %{buildroot}%{_datadir}/doc/monotone/monotone.html %find_lang %{name} +compldir=%{buildroot}%{_sysconfdir}/bash_completion.d +mkdir -p ${compldir} +%{__install} -c -m 0444 contrib/monotone.bash_completion ${compldir} + lispdir=%{buildroot}%{_datadir}/emacs/site-lisp mkdir -p ${lispdir} %{__install} -c -m 0444 contrib/monotone*.el ${lispdir} emacs -batch -f batch-byte-compile ${lispdir} mkdir -p %{buildroot}%{_sbindir} -mkdir -p %{buildroot}%{_sysconfdir}/init.d -mkdir -p %{buildroot}%{_sysconfdir}/sysconfig mkdir -p %{buildroot}%{_localstatedir}/db ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server -%{__install} -c -m 0555 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/monotone -%{__install} -c -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone +%{__install} -D -m 0555 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/monotone +%{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/monotone %{__install} -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys %{__install} -d -m 0770 %{buildroot}%{_localstatedir}/db/monotone @@ -124,9 +126,8 @@ fi %{_bindir}/mtn %{_infodir}/monotone.info* -%{_mandir}/man1/mtn.1* %{_datadir}/emacs/site-lisp/monotone*.el* - +%{_sysconfdir}/bash_completion.d %files server %doc README.monotone-server @@ -164,6 +165,10 @@ fi %changelog +* Thu Mar 1 2007 Roland McGrath - 0.33-1 +- Updated for 0.33 release. +- Install monotone.bash_completion file. + * Wed Feb 28 2007 Roland McGrath - 0.32-1 - Updated for 0.32 release. diff --git a/sources b/sources index 8511572..3429cc7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -98b7ac7d680c0ba768bf74628fa74de9 monotone-0.32.tar.gz +bfbc7842c13e9be23299ca0348b2d0c2 monotone-0.33.tar.gz From a08584bd9acdd84d23b8d58aca8c08e1f503f81a Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 5 Apr 2007 06:48:50 +0000 Subject: [PATCH 026/145] Updated for 0.34 release. --- .cvsignore | 2 +- monotone.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6184ddb..77d7e97 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.33.tar.gz +monotone-0.34.tar.gz diff --git a/monotone.spec b/monotone.spec index 5c0bfd2..a1507bd 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.33 +Version: 0.34 Release: 1%{?dist} Summary: A free, distributed version control system @@ -165,6 +165,9 @@ fi %changelog +* Wed Apr 4 2007 Roland McGrath - 0.34-1 +- Updated for 0.34 release. + * Thu Mar 1 2007 Roland McGrath - 0.33-1 - Updated for 0.33 release. - Install monotone.bash_completion file. diff --git a/sources b/sources index 3429cc7..b3658d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bfbc7842c13e9be23299ca0348b2d0c2 monotone-0.33.tar.gz +b7a3cd2d4fcb17287641ee2e33f660fd monotone-0.34.tar.gz From 8093092c01d4d1e19fd71c175cd6375a50828a77 Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 10 May 2007 01:41:40 +0000 Subject: [PATCH 027/145] Update to 0.35 --- .cvsignore | 2 +- monotone.init | 12 +++++++++++- monotone.spec | 8 ++++++-- sources | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 77d7e97..d98fed1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.34.tar.gz +monotone-0.35.tar.gz diff --git a/monotone.init b/monotone.init index 9ddd4ab..60f1963 100644 --- a/monotone.init +++ b/monotone.init @@ -39,11 +39,21 @@ random_passphrase() umask 077 +check_db_version() +{ + db_version=`runuser -s /bin/bash - ${MONOTONE_USER:-monotone} \ + -c "$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \ + db version"` || exit 2 + set -- $db_version + [ "$5" == "(usable)" ] + return $? +} + # See how we were called. case "$1" in start) if [ -e $MONOTONE_DBFILE ]; then - $0 migrate + check_db_version || $0 migrate elif [ -e $MONOTONE_OLDDB ]; then echo -n $"Pre-0.26 monotone database must be migrated by hand: " failure diff --git a/monotone.spec b/monotone.spec index a1507bd..1304e5f 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.34 +Version: 0.35 Release: 1%{?dist} Summary: A free, distributed version control system @@ -65,7 +65,7 @@ This package provides an easy-to-use standalone server setup for monotone. make %{?_smp_mflags} %check -make check || { cat tester_dir/tester.log; false; } +make %{?_smp_mflags} check || { cat tester_dir/tester.log; false; } %install rm -rf %{buildroot} @@ -165,6 +165,10 @@ fi %changelog +* Wed May 9 2007 Roland McGrath - 0.35-1 +- Updated for 0.35 release. +- Avoid unnecessary "db migrate" in monotone-server init script. (#213893) + * Wed Apr 4 2007 Roland McGrath - 0.34-1 - Updated for 0.34 release. diff --git a/sources b/sources index b3658d6..534277c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b7a3cd2d4fcb17287641ee2e33f660fd monotone-0.34.tar.gz +9b53046dda8ba7549fa5ce765e14fa65 monotone-0.35.tar.gz From 2719010fd7e4a2083ad4d2a6e921e667c9b288d1 Mon Sep 17 00:00:00 2001 From: roland Date: Mon, 14 May 2007 22:32:08 +0000 Subject: [PATCH 028/145] Patch from upstream to fix test suite failures from running in parallel with another instance. --- monotone-0.35-parallel-tests.patch | 90 ++++++++++++++++++++++++++++++ monotone.spec | 3 + 2 files changed, 93 insertions(+) create mode 100644 monotone-0.35-parallel-tests.patch diff --git a/monotone-0.35-parallel-tests.patch b/monotone-0.35-parallel-tests.patch new file mode 100644 index 0000000..4c7c7b3 --- /dev/null +++ b/monotone-0.35-parallel-tests.patch @@ -0,0 +1,90 @@ +----------------------------------------------------------------- +Revision: 0b7ded5189d26b1c15b070fd801308f8ee791ab8 +Ancestor: 30a13ba4c31afddded095fbbcb7a4b874b544ee4 +Author: Matthew Gregan +Date: 2007-05-12T22:55:48 +Branch: net.venge.monotone +ChangeLog: + + Don't seed PRNG with a value that can be the same for parallel + invocations of the testsuite. Fixes bug#19517. + * luaext_platform.cc (LUAEXT(get_pid)): Expose portable way to get + process ID. + * tests/common/netsync.lua (netsync.setup): Use process ID as the + initial seed to the Lua PRNG. + +============================================================ +--- luaext_platform.cc 85950c0a7933f6df1c9261172a4df13a0b354255 ++++ luaext_platform.cc 2ce777d5ba2573e64f08e7d68ee8c24b2ddaa770 +@@ -162,8 +162,13 @@ LUAEXT(sleep, ) + return 1; + } + ++LUAEXT(get_pid, ) ++{ ++ pid_t pid = get_process_id(); ++ lua_pushnumber(L, pid); ++ return 1; ++} + +- + // Local Variables: + // mode: C++ + // fill-column: 76 +============================================================ +--- tests/common/netsync.lua 128824e21a9a92c02b9f21eecc0f1c73556c766e ++++ tests/common/netsync.lua 9e04e633e1a8abec93b4a71d704593fa064ed935 +@@ -16,7 +16,7 @@ function netsync.setup() + check(copy("test.db", "test3.db")) + check(copy("keys", "keys3")) + check(getstd("common/netsync-hooks.lua", "netsync.lua")) +- math.randomseed(os.time()) ++ math.randomseed(get_pid()) + end + + function netsync.setup_with_notes() +@@ -51,7 +51,7 @@ function netsync.start(opts, n, min) + end + local args = {} + local fn = mtn +- local addr = "localhost:" .. math.random(20000, 50000) ++ local addr = "localhost:" .. math.random(1024, 65535) + table.insert(args, "--dump=_MTN/server_dump") + table.insert(args, "--bind="..addr) + if min then +----------------------------------------------------------------- +Revision: 29c0149c0786b57a88c4b76e3cfad90571d7b053 +Ancestor: dc96217431b80ee988fccab0628d234687d3c4da +Author: Matthew Gregan +Date: 2007-05-13T00:19:13 +Branch: net.venge.monotone +ChangeLog: + + * tests/netsync,--set-default, tests/netsync_verifies_server_keys: + Use get_pid() rather than os.time() to seed PRNG. + +============================================================ +--- tests/netsync,--set-default/__driver__.lua f1b758e020bccd96da24fdf9015bb06d5c4e0725 ++++ tests/netsync,--set-default/__driver__.lua a57657e4a57c507335db1d41123a3f30641ffd97 +@@ -1,8 +1,8 @@ netsync.setup() + + include("common/netsync.lua") + mtn_setup() + netsync.setup() +-rseed = os.time() ++rseed = get_pid() + + addfile("testfile", "foo") + commit() +============================================================ +--- tests/netsync_verifies_server_keys/__driver__.lua 13305be95a16b088e491e320e7d6a53a5fe6aa4a ++++ tests/netsync_verifies_server_keys/__driver__.lua 1faebbe461222b8dcf29847c982088237c12cd17 +@@ -8,7 +8,7 @@ check(mtn("genkey", "foo@bar"), 0, false + -- Once to let the client note down the key... + -- We need to set the random seed, because each time a server is + -- started it picks a new random port. +-seed = os.time() ++seed = get_pid() + math.randomseed(seed) + netsync.pull("testbranch") + diff --git a/monotone.spec b/monotone.spec index 1304e5f..fecccbd 100644 --- a/monotone.spec +++ b/monotone.spec @@ -12,6 +12,8 @@ Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server +Patch1: monotone-0.35-parallel-tests.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel @@ -58,6 +60,7 @@ This package provides an easy-to-use standalone server setup for monotone. %prep %setup -q +%patch1 -p0 %build %configure --with-bundled-lua=%{bundled_lua} \ From 64b2d64a5e5ef7b1f98e01dc640a39afcf1fc2e5 Mon Sep 17 00:00:00 2001 From: roland Date: Mon, 14 May 2007 22:32:48 +0000 Subject: [PATCH 029/145] Forgot release bump in last commit. --- monotone.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monotone.spec b/monotone.spec index fecccbd..1eb9128 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.35 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -168,7 +168,7 @@ fi %changelog -* Wed May 9 2007 Roland McGrath - 0.35-1 +* Wed May 9 2007 Roland McGrath - 0.35-2 - Updated for 0.35 release. - Avoid unnecessary "db migrate" in monotone-server init script. (#213893) From 8197d81595bb2841b4d0cd33549a7db3f953fad7 Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 17 May 2007 00:21:00 +0000 Subject: [PATCH 030/145] - Fix locale dependency in monotone-server init script. (#213893) --- monotone.init | 3 ++- monotone.spec | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/monotone.init b/monotone.init index 60f1963..922cbd6 100644 --- a/monotone.init +++ b/monotone.init @@ -42,7 +42,8 @@ umask 077 check_db_version() { db_version=`runuser -s /bin/bash - ${MONOTONE_USER:-monotone} \ - -c "$MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \ + -c "LC_ALL=C \ + $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \ db version"` || exit 2 set -- $db_version [ "$5" == "(usable)" ] diff --git a/monotone.spec b/monotone.spec index 1eb9128..f313cfc 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.35 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -168,6 +168,9 @@ fi %changelog +* Wed May 16 2007 Roland McGrath - 0.35-3 +- Fix locale dependency in monotone-server init script. (#213893) + * Wed May 9 2007 Roland McGrath - 0.35-2 - Updated for 0.35 release. - Avoid unnecessary "db migrate" in monotone-server init script. (#213893) From 46e6bb39c97bc40311dbf0dc3eecdfb4ac690e51 Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Fri, 6 Jul 2007 11:34:14 +0000 Subject: [PATCH 031/145] - add more requires --- monotone.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/monotone.spec b/monotone.spec index f313cfc..49baa25 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.35 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -38,7 +38,7 @@ BuildRequires: cvs BuildRequires: emacs Requires(post): /sbin/install-info -Requires(postun): /sbin/install-info +Requires(preun): /sbin/install-info %description monotone is a free, distributed version control system. @@ -52,6 +52,9 @@ functions to client-side RSA certificates. %package server Summary: Standalone server setup for monotone Requires: monotone = %{version}-%{release} +Requires(pre): /usr/sbin/useradd +Requires(post): /sbin/service, /sbin/chkconfig +Requires(preun): /sbin/service, /sbin/chkconfig Group: Development/Tools %description server @@ -116,7 +119,7 @@ then /sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : fi -%postun +%preun if [ $1 -eq 0 ] then /sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : @@ -168,6 +171,9 @@ fi %changelog +* Fri Jul 06 2007 Florian La Roche - 0.35-4 +- add more requires + * Wed May 16 2007 Roland McGrath - 0.35-3 - Fix locale dependency in monotone-server init script. (#213893) From 9ee5058876b552649468812706fca2b9b619ecf4 Mon Sep 17 00:00:00 2001 From: roland Date: Fri, 3 Aug 2007 11:06:18 +0000 Subject: [PATCH 032/145] New upstream version 0.36 --- .cvsignore | 2 +- monotone-0.35-parallel-tests.patch | 90 ------------------------------ monotone.init | 3 +- monotone.spec | 10 ++-- sources | 2 +- 5 files changed, 9 insertions(+), 98 deletions(-) delete mode 100644 monotone-0.35-parallel-tests.patch diff --git a/.cvsignore b/.cvsignore index d98fed1..fbfaa3e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.35.tar.gz +monotone-0.36.tar.gz diff --git a/monotone-0.35-parallel-tests.patch b/monotone-0.35-parallel-tests.patch deleted file mode 100644 index 4c7c7b3..0000000 --- a/monotone-0.35-parallel-tests.patch +++ /dev/null @@ -1,90 +0,0 @@ ------------------------------------------------------------------ -Revision: 0b7ded5189d26b1c15b070fd801308f8ee791ab8 -Ancestor: 30a13ba4c31afddded095fbbcb7a4b874b544ee4 -Author: Matthew Gregan -Date: 2007-05-12T22:55:48 -Branch: net.venge.monotone -ChangeLog: - - Don't seed PRNG with a value that can be the same for parallel - invocations of the testsuite. Fixes bug#19517. - * luaext_platform.cc (LUAEXT(get_pid)): Expose portable way to get - process ID. - * tests/common/netsync.lua (netsync.setup): Use process ID as the - initial seed to the Lua PRNG. - -============================================================ ---- luaext_platform.cc 85950c0a7933f6df1c9261172a4df13a0b354255 -+++ luaext_platform.cc 2ce777d5ba2573e64f08e7d68ee8c24b2ddaa770 -@@ -162,8 +162,13 @@ LUAEXT(sleep, ) - return 1; - } - -+LUAEXT(get_pid, ) -+{ -+ pid_t pid = get_process_id(); -+ lua_pushnumber(L, pid); -+ return 1; -+} - -- - // Local Variables: - // mode: C++ - // fill-column: 76 -============================================================ ---- tests/common/netsync.lua 128824e21a9a92c02b9f21eecc0f1c73556c766e -+++ tests/common/netsync.lua 9e04e633e1a8abec93b4a71d704593fa064ed935 -@@ -16,7 +16,7 @@ function netsync.setup() - check(copy("test.db", "test3.db")) - check(copy("keys", "keys3")) - check(getstd("common/netsync-hooks.lua", "netsync.lua")) -- math.randomseed(os.time()) -+ math.randomseed(get_pid()) - end - - function netsync.setup_with_notes() -@@ -51,7 +51,7 @@ function netsync.start(opts, n, min) - end - local args = {} - local fn = mtn -- local addr = "localhost:" .. math.random(20000, 50000) -+ local addr = "localhost:" .. math.random(1024, 65535) - table.insert(args, "--dump=_MTN/server_dump") - table.insert(args, "--bind="..addr) - if min then ------------------------------------------------------------------ -Revision: 29c0149c0786b57a88c4b76e3cfad90571d7b053 -Ancestor: dc96217431b80ee988fccab0628d234687d3c4da -Author: Matthew Gregan -Date: 2007-05-13T00:19:13 -Branch: net.venge.monotone -ChangeLog: - - * tests/netsync,--set-default, tests/netsync_verifies_server_keys: - Use get_pid() rather than os.time() to seed PRNG. - -============================================================ ---- tests/netsync,--set-default/__driver__.lua f1b758e020bccd96da24fdf9015bb06d5c4e0725 -+++ tests/netsync,--set-default/__driver__.lua a57657e4a57c507335db1d41123a3f30641ffd97 -@@ -1,8 +1,8 @@ netsync.setup() - - include("common/netsync.lua") - mtn_setup() - netsync.setup() --rseed = os.time() -+rseed = get_pid() - - addfile("testfile", "foo") - commit() -============================================================ ---- tests/netsync_verifies_server_keys/__driver__.lua 13305be95a16b088e491e320e7d6a53a5fe6aa4a -+++ tests/netsync_verifies_server_keys/__driver__.lua 1faebbe461222b8dcf29847c982088237c12cd17 -@@ -8,7 +8,7 @@ check(mtn("genkey", "foo@bar"), 0, false - -- Once to let the client note down the key... - -- We need to set the random seed, because each time a server is - -- started it picks a new random port. --seed = os.time() -+seed = get_pid() - math.randomseed(seed) - netsync.pull("testbranch") - diff --git a/monotone.init b/monotone.init index 922cbd6..9a225d0 100644 --- a/monotone.init +++ b/monotone.init @@ -99,7 +99,7 @@ case "$1" in $0 stop $0 start ;; - condrestart) + condrestart|try-restart) [ -e /var/lock/subsys/monotone ] && $0 restart ;; status) @@ -131,6 +131,7 @@ case "$1" in genkey $MONOTONE_KEYID > /dev/null 2>&1) && /bin/chgrp ${MONOTONE_GROUP:-monotone} \ "$MONOTONE_KEYDIR/$MONOTONE_KEYID" && + /bin/chmod 0640 "$MONOTONE_KEYDIR/$MONOTONE_KEYID" && cat > $tmp < - 0.36-1 +- Updated for 0.36 release. + * Fri Jul 06 2007 Florian La Roche - 0.35-4 - add more requires diff --git a/sources b/sources index 534277c..f5f0884 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9b53046dda8ba7549fa5ce765e14fa65 monotone-0.35.tar.gz +ba6733ebd9992c8c7b48b9e2226f9fb7 monotone-0.36.tar.gz From 885becd59589927d5d06bc4ba6b05b7cf86ffaad Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 28 Aug 2007 07:39:05 +0000 Subject: [PATCH 033/145] Exclude ppc for #259161 miscompilation issue. --- monotone.spec | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/monotone.spec b/monotone.spec index daaeaab..9fe963b 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,10 @@ Name: monotone Version: 0.36 -Release: 1%{?dist} +Release: 2%{?dist} + +# XXX temporary pending bug fix for miscompilation(?) on ppc +# See https://bugzilla.redhat.com/show_bug.cgi?id=259161 +ExcludeArch: ppc ppc64 Summary: A free, distributed version control system Group: Development/Tools @@ -50,7 +54,7 @@ functions to client-side RSA certificates. %package server Summary: Standalone server setup for monotone Requires: monotone = %{version}-%{release} -Requires(pre): /usr/sbin/useradd +Requires(pre): shadow-utils Requires(post): /sbin/service, /sbin/chkconfig Requires(preun): /sbin/service, /sbin/chkconfig Group: Development/Tools @@ -149,9 +153,12 @@ fi %attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/db/monotone/server.mtn %pre server -# Add the "monotone" user -/usr/sbin/useradd -c "Monotone Netsync Server" \ - -s /sbin/nologin -r -d %{_localstatedir}/db/monotone monotone 2> /dev/null || : +# Add "monotone" user per http://fedoraproject.org/wiki/Packaging/UsersAndGroups +getent group monotone > /dev/null || groupadd -r monotone +getent passwd monotone > /dev/null || +useradd -r -g monotone -r -d %{_localstatedir}/db/monotone -s /sbin/nologin \ + -c "Monotone Netsync Server" +exit 0 %post server # Register the monotone service @@ -168,6 +175,10 @@ fi %changelog +* Tue Aug 28 2007 Roland McGrath - 0.36-2 +- Clean up %%pre script per packaging guidelines. +- Disable ppc and ppc64 builds temporarily since make check fails. (#259161) + * Fri Aug 3 2007 Roland McGrath - 0.36-1 - Updated for 0.36 release. From b5ae4591a7895d2d6df34b5fd7830d29d4c62d96 Mon Sep 17 00:00:00 2001 From: roland Date: Sun, 28 Oct 2007 04:35:59 +0000 Subject: [PATCH 034/145] Update to 0.37 --- .cvsignore | 2 +- monotone.init | 22 +++++++++++++++++++++- monotone.spec | 11 ++++++----- sources | 2 +- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index fbfaa3e..79cff5d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.36.tar.gz +monotone-0.37.tar.gz diff --git a/monotone.init b/monotone.init index 9a225d0..9178650 100644 --- a/monotone.init +++ b/monotone.init @@ -8,6 +8,20 @@ # pidfile: /var/run/monotone/monotone-server.pid # config: /etc/sysconfig/monotone # config: /etc/monotone/monotonerc +# +### BEGIN INIT INFO +# Provides: monotone +# Required-Start: $local_fs $network $named $time +# Required-Stop: $local_fs $network +# Short-Description: start and stop Monotone netsync protocol server +# Description: Monotone is a free, distributed version control system. +# It provides fully disconnected operation, manages complete +# tree versions, keeps its state in a local transactional +# database, supports overlapping branches and extensible +# metadata, exchanges work over plain network protocols, +# performs history-sensitive merging, and delegates trust +# functions to client-side RSA certificates. +### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions @@ -95,7 +109,7 @@ case "$1" in [ $RETVAL = 0 ] && rm -f /var/lock/subsys/monotone echo ;; - restart) + restart|force-reload) $0 stop $0 start ;; @@ -122,6 +136,12 @@ case "$1" in genkey) MONOTONE_KEYID=${2:-${MONOTONE_KEYID:-`/bin/hostname -f`}} MONOTONE_PPFILE=${MONOTONE_PPFILE:-/var/db/monotone/passphrase.lua} + if [ -s "$MONOTONE_PPFILE" -a -s "$MONOTONE_DBFILE" ] + then + echo >&2 "$0:" $"Server key already installed" + echo >&2 "$0:" $"To lose old key remove file" "$MONOTONE_PPFILE" + exit 1 + fi echo -n $"Generating RSA key for server $MONOTONE_KEYID" tmp=/tmp/mtserver$$ if diff --git a/monotone.spec b/monotone.spec index 9fe963b..d671059 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,11 +1,7 @@ Name: monotone -Version: 0.36 +Version: 0.37 Release: 2%{?dist} -# XXX temporary pending bug fix for miscompilation(?) on ppc -# See https://bugzilla.redhat.com/show_bug.cgi?id=259161 -ExcludeArch: ppc ppc64 - Summary: A free, distributed version control system Group: Development/Tools License: GPL @@ -175,6 +171,11 @@ fi %changelog +* Sat Oct 27 2007 Roland McGrath - 0.37-2 +- Updated for 0.37 release. +- Prevent destroying old passphrase file with 'service monotone genkey'. +- Put LSB standard comments in monotone.init for monotone-server subpackage. + * Tue Aug 28 2007 Roland McGrath - 0.36-2 - Clean up %%pre script per packaging guidelines. - Disable ppc and ppc64 builds temporarily since make check fails. (#259161) diff --git a/sources b/sources index f5f0884..29b9c0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ba6733ebd9992c8c7b48b9e2226f9fb7 monotone-0.36.tar.gz +d06193f2738626570692bed2173144c1 monotone-0.37.tar.gz From 1baaf5e88a8ec27d3ee8c7c4f573109250e13602 Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 30 Oct 2007 07:47:54 +0000 Subject: [PATCH 035/145] rebuild --- monotone.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monotone.spec b/monotone.spec index d671059..4894483 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.37 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -68,7 +68,7 @@ This package provides an easy-to-use standalone server setup for monotone. make %{?_smp_mflags} %check -make %{?_smp_mflags} check || { cat tester_dir/tester.log; false; } +make %{?_smp_mflags} check || { cat tester_dir/*.log; false; } %install rm -rf %{buildroot} @@ -171,7 +171,7 @@ fi %changelog -* Sat Oct 27 2007 Roland McGrath - 0.37-2 +* Sat Oct 27 2007 Roland McGrath - 0.37-3 - Updated for 0.37 release. - Prevent destroying old passphrase file with 'service monotone genkey'. - Put LSB standard comments in monotone.init for monotone-server subpackage. From af90489c961752cba257900b0ce56bf7516becca Mon Sep 17 00:00:00 2001 From: roland Date: Sat, 22 Dec 2007 00:06:31 +0000 Subject: [PATCH 036/145] Updated for 0.38 release. --- .cvsignore | 2 +- monotone.init | 2 +- monotone.spec | 7 +++++-- sources | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 79cff5d..529fe03 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.37.tar.gz +monotone-0.38.tar.gz diff --git a/monotone.init b/monotone.init index 9178650..5c262c6 100644 --- a/monotone.init +++ b/monotone.init @@ -136,7 +136,7 @@ case "$1" in genkey) MONOTONE_KEYID=${2:-${MONOTONE_KEYID:-`/bin/hostname -f`}} MONOTONE_PPFILE=${MONOTONE_PPFILE:-/var/db/monotone/passphrase.lua} - if [ -s "$MONOTONE_PPFILE" -a -s "$MONOTONE_DBFILE" ] + if [ -s "$MONOTONE_PPFILE" -a -s "$MONOTONE_KEYDIR/$MONOTONE_KEYID" ] then echo >&2 "$0:" $"Server key already installed" echo >&2 "$0:" $"To lose old key remove file" "$MONOTONE_PPFILE" diff --git a/monotone.spec b/monotone.spec index 4894483..6853a79 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.37 -Release: 3%{?dist} +Version: 0.38 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -171,6 +171,9 @@ fi %changelog +* Fri Dec 21 2007 Roland McGrath - 0.38-1 +- Updated for 0.38 release. + * Sat Oct 27 2007 Roland McGrath - 0.37-3 - Updated for 0.37 release. - Prevent destroying old passphrase file with 'service monotone genkey'. diff --git a/sources b/sources index 29b9c0b..930bdba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d06193f2738626570692bed2173144c1 monotone-0.37.tar.gz +c1a0d2619f451a664289b042c104860d monotone-0.38.tar.gz From 2b04714bfd81497f12f75d582ef2c5b2ef91b794 Mon Sep 17 00:00:00 2001 From: roland Date: Sat, 22 Dec 2007 23:55:36 +0000 Subject: [PATCH 037/145] Fix some monotone-server packaging bugs. --- README.monotone-server | 2 +- monotone.init | 28 +++++++++++++++++++++------- monotone.spec | 33 +++++++++++++++++++++------------ monotone.sysconfig | 2 +- 4 files changed, 44 insertions(+), 21 deletions(-) diff --git a/README.monotone-server b/README.monotone-server index d5d2299..a2640d3 100644 --- a/README.monotone-server +++ b/README.monotone-server @@ -10,7 +10,7 @@ server instances from people using monotone.) The /etc/monotone directory serves as ~/.monotone for the server. This directory and its contents are not writable by the "monotone" user ID under -which the network server runs. The database lives in /var/db/monotone, +which the network server runs. The database lives in /var/lib/monotone, which the "monotone" user ID must write to. The init.d script will generate a private key for the server to use, if diff --git a/monotone.init b/monotone.init index 5c262c6..967ab15 100644 --- a/monotone.init +++ b/monotone.init @@ -43,6 +43,8 @@ MTSERVER=/usr/sbin/monotone-server MONOTONE_PIDFILE=/var/run/monotone/monotone-server.pid MONOTONE_LOGFILE=${MONOTONE_LOGFILE:-/var/log/monotone.log} MONOTONE_OLDDB=/var/db/monotone/server.db +MONOTONE_OLDDBFILE=/var/db/monotone/server.mtn +MONOTONE_OLDPPFILE=/var/db/monotone/passphrase.lua random_passphrase() { @@ -67,6 +69,18 @@ check_db_version() # See how we were called. case "$1" in start) + if [ -e $MONOTONE_OLDDBFILE -a ! -e $MONOTONE_DBFILE ]; then + echo -n $"Moving" "$MONOTONE_OLDDBFILE" $"to" "$MONOTONE_DBFILE" + if mv "$MONOTONE_OLDDBFILE" "$MONOTONE_DBFILE"; then + failure + echo + exit + else + success + echo + fi + rmdir 2> /dev/null /var/db/monotone + fi if [ -e $MONOTONE_DBFILE ]; then check_db_version || $0 migrate elif [ -e $MONOTONE_OLDDB ]; then @@ -122,10 +136,10 @@ case "$1" in ;; init) echo -n $"Initializing database" "${MONOTONE_DBFILE}: " - { [ -d /var/db/monotone ] || + { [ -d /var/lib/monotone ] || /usr/bin/install -o ${MONOTONE_USER:-monotone} \ -g ${MONOTONE_GROUP:-monotone} \ - -m 0770 -d /var/db/monotone; } && + -m 0770 -d /var/lib/monotone; } && runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c "umask 007; \ $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS db init" && success $"database initialization" || @@ -134,8 +148,8 @@ case "$1" in echo ;; genkey) - MONOTONE_KEYID=${2:-${MONOTONE_KEYID:-`/bin/hostname -f`}} - MONOTONE_PPFILE=${MONOTONE_PPFILE:-/var/db/monotone/passphrase.lua} + MONOTONE_KEYID=${2:-${MONOTONE_KEYID:-monotone@`/bin/hostname -f`}} + MONOTONE_PPFILE=${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua} if [ -s "$MONOTONE_PPFILE" -a -s "$MONOTONE_KEYDIR/$MONOTONE_KEYID" ] then echo >&2 "$0:" $"Server key already installed" @@ -169,12 +183,12 @@ EOF echo ;; migrate) - oppfile=/var/db/monotone/passphrase.lua RETVAL=0 - if [ ! -e $MONOTONE_PPFILE ] && [ -e $oppfile ]; then + if [ ! -e $MONOTONE_PPFILE ] && [ -e $MONOTONE_OLDPPFILE ]; then echo -n $"Moving old server passphrase file to new location: " /usr/bin/install -o root -g ${MONOTONE_GROUP:-monotone} \ - -m 0440 $oppfile ${MONOTONE_PPFILE} && + -m 0440 \ + $MONOTONE_OLDPPFILE ${MONOTONE_PPFILE} && success $"move passphrase file" || failure $"move passphrase file" RETVAL=$? diff --git a/monotone.spec b/monotone.spec index 6853a79..0ba579c 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.38 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -88,21 +88,25 @@ mkdir -p ${lispdir} emacs -batch -f batch-byte-compile ${lispdir} mkdir -p %{buildroot}%{_sbindir} -mkdir -p %{buildroot}%{_localstatedir}/db +mkdir -p %{buildroot}%{_localstatedir}/lib ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server %{__install} -D -m 0555 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/monotone %{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/monotone %{__install} -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys -%{__install} -d -m 0770 %{buildroot}%{_localstatedir}/db/monotone +%{__install} -d -m 0770 %{buildroot}%{_localstatedir}/lib/monotone %{__install} -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone # These do not actually wind up in the package, due to %%ghost. -%{__install} -c -m 0440 /dev/null %{buildroot}%{_sysconfdir}/monotone/passphrase.lua -%{__install} -c -m 0640 /dev/null %{buildroot}%{_sysconfdir}/monotone/read-permissions -%{__install} -c -m 0640 /dev/null %{buildroot}%{_sysconfdir}/monotone/write-permissions -%{__install} -c -m 0644 /dev/null %{buildroot}%{_sysconfdir}/monotone/monotonerc -touch %{buildroot}%{_localstatedir}/db/monotone/server.mtn +%{__install} -c -m 0440 /dev/null \ + %{buildroot}%{_sysconfdir}/monotone/passphrase.lua +%{__install} -c -m 0640 /dev/null \ + %{buildroot}%{_sysconfdir}/monotone/read-permissions +%{__install} -c -m 0640 /dev/null \ + %{buildroot}%{_sysconfdir}/monotone/write-permissions +%{__install} -c -m 0644 /dev/null \ + %{buildroot}%{_sysconfdir}/monotone/monotonerc +touch %{buildroot}%{_localstatedir}/lib/monotone/server.mtn cp %{SOURCE3} . @@ -145,15 +149,15 @@ fi %attr(0440,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/passphrase.lua %attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/read-permissions %attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/write-permissions -%dir %attr(0770,monotone,monotone) %{_localstatedir}/db/monotone -%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/db/monotone/server.mtn +%dir %attr(0770,monotone,monotone) %{_localstatedir}/lib/monotone +%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/lib/monotone/server.mtn %pre server # Add "monotone" user per http://fedoraproject.org/wiki/Packaging/UsersAndGroups getent group monotone > /dev/null || groupadd -r monotone getent passwd monotone > /dev/null || -useradd -r -g monotone -r -d %{_localstatedir}/db/monotone -s /sbin/nologin \ - -c "Monotone Netsync Server" +useradd -r -g monotone -r -d %{_localstatedir}/lib/monotone -s /sbin/nologin \ + -c "Monotone Netsync Server" monotone exit 0 %post server @@ -171,6 +175,11 @@ fi %changelog +* Sat Dec 22 2007 Roland McGrath - 0.38-2 +- Fix monotone-server user creation. (#426607) +- Moved monotone-server database to /var/lib. (#426608) +- Use monotone@ in server key name. (#426609) + * Fri Dec 21 2007 Roland McGrath - 0.38-1 - Updated for 0.38 release. diff --git a/monotone.sysconfig b/monotone.sysconfig index 128c0f3..a61496a 100644 --- a/monotone.sysconfig +++ b/monotone.sysconfig @@ -1,6 +1,6 @@ MONOTONE_CONFDIR=/etc/monotone MONOTONE_KEYDIR=/etc/monotone/private-keys -MONOTONE_DBFILE=/var/db/monotone/server.mtn +MONOTONE_DBFILE=/var/lib/monotone/server.mtn MONOTONE_PPFILE=/etc/monotone/passphrase.lua MONOTONE_RCOPTS="--confdir=$MONOTONE_CONFDIR" From 22c30226de8f235914c4d2e3e0b0cafb5f731bfe Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 19 Feb 2008 22:21:27 +0000 Subject: [PATCH 038/145] - Autorebuild for GCC 4.3 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 0ba579c..14fae50 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.38 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -175,6 +175,9 @@ fi %changelog +* Tue Feb 19 2008 Fedora Release Engineering - 0.38-3 +- Autorebuild for GCC 4.3 + * Sat Dec 22 2007 Roland McGrath - 0.38-2 - Fix monotone-server user creation. (#426607) - Moved monotone-server database to /var/lib. (#426608) From 350fd2619c40c3b0d0005cb4f4c7e54dfa59bfea Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 26 Feb 2008 02:52:27 +0000 Subject: [PATCH 039/145] Updated for 0.39 release. --- .cvsignore | 2 +- monotone.spec | 8 ++++---- sources | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 529fe03..763e744 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.38.tar.gz +monotone-0.39.tar.gz diff --git a/monotone.spec b/monotone.spec index 14fae50..ff2b07a 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.38 -Release: 3%{?dist} +Version: 0.39 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -175,8 +175,8 @@ fi %changelog -* Tue Feb 19 2008 Fedora Release Engineering - 0.38-3 -- Autorebuild for GCC 4.3 +* Mon Feb 25 2008 Roland McGrath - 0.39-1 +- Updated for 0.39 release. * Sat Dec 22 2007 Roland McGrath - 0.38-2 - Fix monotone-server user creation. (#426607) diff --git a/sources b/sources index 930bdba..4abcb2e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c1a0d2619f451a664289b042c104860d monotone-0.38.tar.gz +522c90c99e18a35c31e3dfa5f8499034 monotone-0.39.tar.gz From a64188c4459f50dd78af8b85a1c8ddf171eadd3a Mon Sep 17 00:00:00 2001 From: roland Date: Mon, 14 Apr 2008 19:46:48 +0000 Subject: [PATCH 040/145] - Updated for 0.40 release. - Tweaked trivia for packaging guidelines nits. --- .cvsignore | 2 +- monotone.spec | 25 +++++++++++++++++-------- sources | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.cvsignore b/.cvsignore index 763e744..ef8af55 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.39.tar.gz +monotone-0.40.tar.gz diff --git a/monotone.spec b/monotone.spec index ff2b07a..a2fd4db 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.39 +Version: 0.40 Release: 1%{?dist} Summary: A free, distributed version control system @@ -51,8 +51,9 @@ functions to client-side RSA certificates. Summary: Standalone server setup for monotone Requires: monotone = %{version}-%{release} Requires(pre): shadow-utils -Requires(post): /sbin/service, /sbin/chkconfig -Requires(preun): /sbin/service, /sbin/chkconfig +Requires(post): chkconfig +Requires(preun): initscripts, chkconfig +Requires(postun): initscripts Group: Development/Tools %description server @@ -90,7 +91,8 @@ emacs -batch -f batch-byte-compile ${lispdir} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server -%{__install} -D -m 0555 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/monotone +%{__install} -D -m 0555 %{SOURCE1} \ + %{buildroot}%{_sysconfdir}/rc.d/init.d/monotone %{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/monotone %{__install} -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys @@ -140,7 +142,7 @@ fi %doc README.monotone-server %defattr(-,root,root,-) %{_sbindir}/monotone-server -%{_sysconfdir}/init.d/monotone +%{_sysconfdir}/rc.d/init.d/monotone %dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone %config %{_sysconfdir}/sysconfig/monotone %dir %attr(0755,root,monotone) %{_sysconfdir}/monotone @@ -164,17 +166,24 @@ exit 0 # Register the monotone service /sbin/chkconfig --add monotone -# Restart the running server, which will update its db format when needed. -/sbin/service monotone condrestart - %preun server if [ $1 = 0 ]; then /sbin/service monotone stop > /dev/null 2>&1 /sbin/chkconfig --del monotone fi +%postun +if [ $1 -gt 1 ]; then + # Restart the running server: updates its db format when needed. + /sbin/service monotone condrestart > /dev/null 2>&1 || : +fi + %changelog +* Mon Apr 14 2008 Roland McGrath - 0.40-1 +- Updated for 0.40 release. +- Tweaked trivia for packaging guidelines nits. + * Mon Feb 25 2008 Roland McGrath - 0.39-1 - Updated for 0.39 release. diff --git a/sources b/sources index 4abcb2e..fd688eb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -522c90c99e18a35c31e3dfa5f8499034 monotone-0.39.tar.gz +4d90776beaff7445e7a2d8774378fbba monotone-0.40.tar.gz From cbb473d85a48b2e66de650e1363f21fffee2ab10 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 11 Aug 2008 15:28:30 +0000 Subject: [PATCH 041/145] fix license tag --- monotone.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/monotone.spec b/monotone.spec index a2fd4db..b92ca16 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,10 +1,10 @@ Name: monotone Version: 0.40 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools -License: GPL +License: GPLv2+ URL: http://monotone.ca/ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz @@ -180,6 +180,9 @@ fi %changelog +* Mon Aug 11 2008 Tom "spot" Callaway - 0.40-2 +- fix license tag + * Mon Apr 14 2008 Roland McGrath - 0.40-1 - Updated for 0.40 release. - Tweaked trivia for packaging guidelines nits. From 87280f93b597e2c1e8fa7f64811099fd8f90744e Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 12 Sep 2008 20:24:20 +0000 Subject: [PATCH 042/145] - Updated for 0.41 release. - Added mtnopt helper. --- .cvsignore | 2 +- monotone.spec | 11 ++++++++--- sources | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index ef8af55..4cd35d1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.40.tar.gz +monotone-0.41.tar.gz diff --git a/monotone.spec b/monotone.spec index b92ca16..00a9f0f 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.40 -Release: 2%{?dist} +Version: 0.41 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -134,13 +134,14 @@ fi %doc monotone.html %{_bindir}/mtn +%{_bindir}/mtnopt %{_infodir}/monotone.info* %{_datadir}/emacs/site-lisp/monotone*.el* %{_sysconfdir}/bash_completion.d %files server -%doc README.monotone-server %defattr(-,root,root,-) +%doc README.monotone-server %{_sbindir}/monotone-server %{_sysconfdir}/rc.d/init.d/monotone %dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone @@ -180,6 +181,10 @@ fi %changelog +* Fri Sep 12 2008 Thomas Moschny - 0.41-1 +- Updated for 0.41 release. +- Added mtnopt helper. + * Mon Aug 11 2008 Tom "spot" Callaway - 0.40-2 - fix license tag diff --git a/sources b/sources index fd688eb..662e6a3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4d90776beaff7445e7a2d8774378fbba monotone-0.40.tar.gz +f4ee37fb6853719933561fef901e2a07 monotone-0.41.tar.gz From 301a3c3760d024dfcff93b715f00c8b95c4812d3 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 2 Jan 2009 17:10:51 +0000 Subject: [PATCH 043/145] Updated for 0.42 release. Removed tabs from specfile. --- .cvsignore | 2 +- import.log | 1 + monotone.spec | 31 +++++++++++++++++-------------- sources | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 import.log diff --git a/.cvsignore b/.cvsignore index 4cd35d1..61594c7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.41.tar.gz +monotone-0.42.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..2a6968c --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +monotone-0_42-1_fc10:HEAD:monotone-0.42-1.fc10.src.rpm:1230916116 diff --git a/monotone.spec b/monotone.spec index 00a9f0f..0e24b70 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.41 +Version: 0.42 Release: 1%{?dist} Summary: A free, distributed version control system @@ -65,7 +65,7 @@ This package provides an easy-to-use standalone server setup for monotone. %build %configure --with-bundled-lua=%{bundled_lua} \ - --with-bundled-sqlite=%{bundled_sqlite} + --with-bundled-sqlite=%{bundled_sqlite} make %{?_smp_mflags} %check @@ -92,7 +92,7 @@ mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server %{__install} -D -m 0555 %{SOURCE1} \ - %{buildroot}%{_sysconfdir}/rc.d/init.d/monotone + %{buildroot}%{_sysconfdir}/rc.d/init.d/monotone %{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/monotone %{__install} -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys @@ -101,13 +101,13 @@ ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server # These do not actually wind up in the package, due to %%ghost. %{__install} -c -m 0440 /dev/null \ - %{buildroot}%{_sysconfdir}/monotone/passphrase.lua + %{buildroot}%{_sysconfdir}/monotone/passphrase.lua %{__install} -c -m 0640 /dev/null \ - %{buildroot}%{_sysconfdir}/monotone/read-permissions + %{buildroot}%{_sysconfdir}/monotone/read-permissions %{__install} -c -m 0640 /dev/null \ - %{buildroot}%{_sysconfdir}/monotone/write-permissions + %{buildroot}%{_sysconfdir}/monotone/write-permissions %{__install} -c -m 0644 /dev/null \ - %{buildroot}%{_sysconfdir}/monotone/monotonerc + %{buildroot}%{_sysconfdir}/monotone/monotonerc touch %{buildroot}%{_localstatedir}/lib/monotone/server.mtn cp %{SOURCE3} . @@ -119,13 +119,13 @@ rm -rf %{buildroot} %post if [ $1 -eq 1 ] then - /sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : + /sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : fi %preun if [ $1 -eq 0 ] then - /sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : + /sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : fi %files -f %{name}.lang @@ -160,7 +160,7 @@ fi getent group monotone > /dev/null || groupadd -r monotone getent passwd monotone > /dev/null || useradd -r -g monotone -r -d %{_localstatedir}/lib/monotone -s /sbin/nologin \ - -c "Monotone Netsync Server" monotone + -c "Monotone Netsync Server" monotone exit 0 %post server @@ -169,18 +169,21 @@ exit 0 %preun server if [ $1 = 0 ]; then - /sbin/service monotone stop > /dev/null 2>&1 - /sbin/chkconfig --del monotone + /sbin/service monotone stop > /dev/null 2>&1 + /sbin/chkconfig --del monotone fi %postun if [ $1 -gt 1 ]; then - # Restart the running server: updates its db format when needed. - /sbin/service monotone condrestart > /dev/null 2>&1 || : + # Restart the running server: updates its db format when needed. + /sbin/service monotone condrestart > /dev/null 2>&1 || : fi %changelog +* Fri Jan 2 2009 Thomas Moschny - 0.42-1 +- Updated for 0.42 release. + * Fri Sep 12 2008 Thomas Moschny - 0.41-1 - Updated for 0.41 release. - Added mtnopt helper. diff --git a/sources b/sources index 662e6a3..ec72068 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f4ee37fb6853719933561fef901e2a07 monotone-0.41.tar.gz +c8e916d674b6608369d9f447700a8830 monotone-0.42.tar.gz From 559d88970023053397f473901b422443181ff6ac Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 2 Jan 2009 21:50:38 +0000 Subject: [PATCH 044/145] Pack Monotone.pm (in a subpackage). (#450267) --- import.log | 1 + monotone.spec | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/import.log b/import.log index 2a6968c..ab5d830 100644 --- a/import.log +++ b/import.log @@ -1 +1,2 @@ monotone-0_42-1_fc10:HEAD:monotone-0.42-1.fc10.src.rpm:1230916116 +monotone-0_42-2_fc10:HEAD:monotone-0.42-2.fc10.src.rpm:1230932958 diff --git a/monotone.spec b/monotone.spec index 0e24b70..28fa362 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.42 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -59,6 +59,15 @@ Group: Development/Tools %description server This package provides an easy-to-use standalone server setup for monotone. +%package -n perl-Monotone +Summary: Perl Module for monotone +Requires: monotone = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Group: Development/Tools + +%description -n perl-Monotone +This is a simple Perl module to start a monotone automate sub-process +and then pass commands to it. %prep %setup -q @@ -112,6 +121,9 @@ touch %{buildroot}%{_localstatedir}/lib/monotone/server.mtn cp %{SOURCE3} . +%{__install} -D -m 0644 -p contrib/Monotone.pm \ + %{buildroot}%{perl_vendorlib}/Monotone.pm + %clean rm -f README.monotone-server rm -rf %{buildroot} @@ -139,13 +151,17 @@ fi %{_datadir}/emacs/site-lisp/monotone*.el* %{_sysconfdir}/bash_completion.d +%files -n perl-Monotone +%defattr(-,root,root,-) +%{perl_vendorlib}/Monotone.pm + %files server %defattr(-,root,root,-) %doc README.monotone-server %{_sbindir}/monotone-server %{_sysconfdir}/rc.d/init.d/monotone %dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone -%config %{_sysconfdir}/sysconfig/monotone +%config(noreplace) %{_sysconfdir}/sysconfig/monotone %dir %attr(0755,root,monotone) %{_sysconfdir}/monotone %dir %attr(0750,root,monotone) %{_sysconfdir}/monotone/private-keys %attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/monotonerc @@ -181,6 +197,9 @@ fi %changelog +* Fri Jan 2 2009 Thomas Moschny - 0.42-2 +- Pack Monotone.pm (in a subpackage). (#450267) + * Fri Jan 2 2009 Thomas Moschny - 0.42-1 - Updated for 0.42 release. From 31f681fcc3493de29fed950e4dff82a424e3bb0a Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 9 Feb 2009 15:15:02 +0000 Subject: [PATCH 045/145] Add two patches from trunk. --- import.log | 1 + monotone-0.42-gcc44.patch | 90 ++++++++++++++++++++++++++++++++ monotone-0.42-netsync.patch | 101 ++++++++++++++++++++++++++++++++++++ monotone.spec | 18 ++++++- 4 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 monotone-0.42-gcc44.patch create mode 100644 monotone-0.42-netsync.patch diff --git a/import.log b/import.log index ab5d830..d90cccb 100644 --- a/import.log +++ b/import.log @@ -1,2 +1,3 @@ monotone-0_42-1_fc10:HEAD:monotone-0.42-1.fc10.src.rpm:1230916116 monotone-0_42-2_fc10:HEAD:monotone-0.42-2.fc10.src.rpm:1230932958 +monotone-0_42-3_fc10:HEAD:monotone-0.42-3.fc10.src.rpm:1234192456 diff --git a/monotone-0.42-gcc44.patch b/monotone-0.42-gcc44.patch new file mode 100644 index 0000000..6e46048 --- /dev/null +++ b/monotone-0.42-gcc44.patch @@ -0,0 +1,90 @@ +diff -up monotone-0.42/key_store.cc.orig monotone-0.42/key_store.cc +--- monotone-0.42/key_store.cc.orig 2008-12-14 00:02:12.000000000 +0100 ++++ monotone-0.42/key_store.cc 2009-02-07 17:23:27.000000000 +0100 +@@ -460,30 +460,30 @@ key_store::cache_decrypted_key(const rsa + + void + key_store::create_key_pair(database & db, +- rsa_keypair_id const & id, ++ rsa_keypair_id const & ident, + utf8 const * maybe_passphrase, + id * maybe_pubhash, + id * maybe_privhash) + { + conditional_transaction_guard guard(db); + +- bool exists = key_pair_exists(id); ++ bool exists = key_pair_exists(ident); + if (db.database_specified()) + { + guard.acquire(); +- exists = exists || db.public_key_exists(id); ++ exists = exists || db.public_key_exists(ident); + } +- N(!exists, F("key '%s' already exists") % id); ++ N(!exists, F("key '%s' already exists") % ident); + + utf8 prompted_passphrase; + if (!maybe_passphrase) + { +- get_passphrase(prompted_passphrase, id, true, true); ++ get_passphrase(prompted_passphrase, ident, true, true); + maybe_passphrase = &prompted_passphrase; + } + + // okay, now we can create the key +- P(F("generating key-pair '%s'") % id); ++ P(F("generating key-pair '%s'") % ident); + RSA_PrivateKey priv(*s->rng, static_cast(constants::keylen)); + + // serialize and maybe encrypt the private key +@@ -514,20 +514,20 @@ key_store::create_key_pair(database & db + % kp.priv().size()); + + // and save it. +- P(F("storing key-pair '%s' in %s/") % id % get_key_dir()); +- put_key_pair(id, kp); ++ P(F("storing key-pair '%s' in %s/") % ident % get_key_dir()); ++ put_key_pair(ident, kp); + + if (db.database_specified()) + { +- P(F("storing public key '%s' in %s") % id % db.get_filename()); +- db.put_key(id, kp.pub); ++ P(F("storing public key '%s' in %s") % ident % db.get_filename()); ++ db.put_key(ident, kp.pub); + guard.commit(); + } + + if (maybe_pubhash) +- key_hash_code(id, kp.pub, *maybe_pubhash); ++ key_hash_code(ident, kp.pub, *maybe_pubhash); + if (maybe_privhash) +- key_hash_code(id, kp.priv, *maybe_privhash); ++ key_hash_code(ident, kp.priv, *maybe_privhash); + } + + void +diff -up monotone-0.42/key_store.hh.orig monotone-0.42/key_store.hh +--- monotone-0.42/key_store.hh.orig 2008-10-03 15:30:21.000000000 +0200 ++++ monotone-0.42/key_store.hh 2009-02-07 17:21:54.000000000 +0100 +@@ -64,7 +64,7 @@ public: + + void cache_decrypted_key(rsa_keypair_id const & id); + +- void create_key_pair(database & db, rsa_keypair_id const & id, ++ void create_key_pair(database & db, rsa_keypair_id const & ident, + utf8 const * maybe_passphrase = NULL, + id * maybe_pubhash = NULL, + id * maybe_privhash = NULL); +diff -up monotone-0.42/sanity.hh.orig monotone-0.42/sanity.hh +--- monotone-0.42/sanity.hh.orig 2008-11-23 22:32:49.000000000 +0100 ++++ monotone-0.42/sanity.hh 2009-02-07 17:21:42.000000000 +0100 +@@ -12,6 +12,7 @@ + + #include + #include ++#include + + #include "boost/current_function.hpp" + diff --git a/monotone-0.42-netsync.patch b/monotone-0.42-netsync.patch new file mode 100644 index 0000000..49ebdb7 --- /dev/null +++ b/monotone-0.42-netsync.patch @@ -0,0 +1,101 @@ +diff -up monotone-0.42/netsync.cc.orig monotone-0.42/netsync.cc +--- monotone-0.42/netsync.cc.orig 2009-02-04 13:53:00.000000000 +0100 ++++ monotone-0.42/netsync.cc 2009-02-04 13:53:49.000000000 +0100 +@@ -353,7 +353,7 @@ unsigned int reactable::count = 0; + + class session_base : public reactable + { +- bool read_some(); ++ void read_some(bool & failed, bool & eof); + bool write_some(); + void mark_recent_io() + { +@@ -468,10 +468,12 @@ session_base::which_events() + return ret; + } + +-bool +-session_base::read_some() ++void ++session_base::read_some(bool & failed, bool & eof) + { + I(inbuf.size() < constants::netcmd_maxsz); ++ eof = false; ++ failed = false; + char tmp[constants::bufsz]; + Netxx::signed_size_type count = str->read(tmp, sizeof(tmp)); + if (count > 0) +@@ -479,17 +481,38 @@ session_base::read_some() + L(FL("read %d bytes from fd %d (peer %s)") + % count % str->get_socketfd() % peer_id); + if (encountered_error) +- { +- L(FL("in error unwind mode, so throwing them into the bit bucket")); +- return true; +- } ++ L(FL("in error unwind mode, so throwing them into the bit bucket")); ++ + inbuf.append(tmp,count); + mark_recent_io(); + note_bytes_in(count); +- return true; ++ } ++ else if (count == 0) ++ { ++ // Returning 0 bytes after select() marks the file descriptor as ++ // ready for reading signifies EOF. ++ ++ switch (protocol_state) ++ { ++ case working_state: ++ P(F("peer %s IO terminated connection in working state (error)") ++ % peer_id); ++ break; ++ ++ case shutdown_state: ++ P(F("peer %s IO terminated connection in shutdown state " ++ "(possibly client misreported error)") ++ % peer_id); ++ break; ++ ++ case confirmed_state: ++ break; ++ } ++ ++ eof = true; + } + else +- return false; ++ failed = true; + } + + bool +@@ -531,11 +554,14 @@ bool + session_base::do_io(Netxx::Probe::ready_type what) + { + bool ok = true; ++ bool eof = false; + try + { + if (what & Netxx::Probe::ready_read) + { +- if (!read_some()) ++ bool failed; ++ read_some(failed, eof); ++ if (failed) + ok = false; + } + if (what & Netxx::Probe::ready_write) +@@ -578,7 +604,11 @@ session_base::do_io(Netxx::Probe::ready_ + % peer_id); + ok = false; + } +- return ok; ++ ++ // Return false in case we reached EOF, so as to prevent further calls ++ // to select()s on this stream, as recommended by the select_tut man ++ // page. ++ return ok && !eof; + } + + //////////////////////////////////////////////////////////////////////// diff --git a/monotone.spec b/monotone.spec index 28fa362..f131a10 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.42 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -12,6 +12,11 @@ Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server +# rediffed changeset f18abebd.. from upstream +Patch0: monotone-0.42-netsync.patch +# rediffed changesets 33022690.. and 76e258cb.. from upstream +Patch1: monotone-0.42-gcc44.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel @@ -71,6 +76,8 @@ and then pass commands to it. %prep %setup -q +%patch0 -p1 -b .gcc44 +%patch1 -p1 -b .netsync %build %configure --with-bundled-lua=%{bundled_lua} \ @@ -78,7 +85,8 @@ and then pass commands to it. make %{?_smp_mflags} %check -make %{?_smp_mflags} check || { cat tester_dir/*.log; false; } +# disable parallel runs in the testsuite for now +make check || { cat tester_dir/*.log; false; } %install rm -rf %{buildroot} @@ -197,6 +205,12 @@ fi %changelog +* Mon Feb 9 2009 Thomas Moschny - 0.42-3 +- Disable %%{_smp_mflags} in the testsuite, causes strange errors. +- Fix two issues with gcc44. +- Add patch from upstream fixing netsync printing an error message of + the form "peer [...] IO failed in confirmed state (success)". + * Fri Jan 2 2009 Thomas Moschny - 0.42-2 - Pack Monotone.pm (in a subpackage). (#450267) From 7cc7ab348eed9804b54039fdbc2a112ab3c26350 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 26 Feb 2009 02:40:00 +0000 Subject: [PATCH 046/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index f131a10..6d9cf2e 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.42 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -205,6 +205,9 @@ fi %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 0.42-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Mon Feb 9 2009 Thomas Moschny - 0.42-3 - Disable %%{_smp_mflags} in the testsuite, causes strange errors. - Fix two issues with gcc44. From f21cc786735ea7f3c6b86d0783224efbab222bf8 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 27 Feb 2009 20:05:58 +0000 Subject: [PATCH 047/145] Add one more netsync related patch from trunk. --- import.log | 1 + monotone-0.42-netsync2.patch | 12 ++++++++++++ monotone.spec | 8 +++++++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 monotone-0.42-netsync2.patch diff --git a/import.log b/import.log index d90cccb..8339a9c 100644 --- a/import.log +++ b/import.log @@ -1,3 +1,4 @@ monotone-0_42-1_fc10:HEAD:monotone-0.42-1.fc10.src.rpm:1230916116 monotone-0_42-2_fc10:HEAD:monotone-0.42-2.fc10.src.rpm:1230932958 monotone-0_42-3_fc10:HEAD:monotone-0.42-3.fc10.src.rpm:1234192456 +monotone-0_42-5_fc10:HEAD:monotone-0.42-5.fc10.src.rpm:1235765112 diff --git a/monotone-0.42-netsync2.patch b/monotone-0.42-netsync2.patch new file mode 100644 index 0000000..7dbeaa0 --- /dev/null +++ b/monotone-0.42-netsync2.patch @@ -0,0 +1,12 @@ +diff -up monotone-0.42/netsync.cc.orig monotone-0.42/netsync.cc +--- monotone-0.42/netsync.cc.orig 2008-12-14 00:02:12.000000000 +0100 ++++ monotone-0.42/netsync.cc 2009-02-27 19:19:37.000000000 +0100 +@@ -374,7 +374,7 @@ protected: + } + bool output_overfull() const + { +- return outbuf.size() > constants::bufsz * 10; ++ return outbuf_size > constants::bufsz * 10; + } + public: + string peer_id; diff --git a/monotone.spec b/monotone.spec index 6d9cf2e..588e693 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.42 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -16,6 +16,8 @@ Source3: README.monotone-server Patch0: monotone-0.42-netsync.patch # rediffed changesets 33022690.. and 76e258cb.. from upstream Patch1: monotone-0.42-gcc44.patch +# rediffed changeset 16184688.. from upstream +Patch2: monotone-0.42-netsync2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -78,6 +80,7 @@ and then pass commands to it. %setup -q %patch0 -p1 -b .gcc44 %patch1 -p1 -b .netsync +%patch2 -p1 -b .netsync2 %build %configure --with-bundled-lua=%{bundled_lua} \ @@ -205,6 +208,9 @@ fi %changelog +* Fri Feb 27 2009 Thomas Moschny - 0.42-5 +- Add one more netsync related patch from trunk. + * Wed Feb 25 2009 Fedora Release Engineering - 0.42-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From cfd6e7f04cc780c612308d70bebcc4e41adc3f1f Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 28 Mar 2009 10:57:55 +0000 Subject: [PATCH 048/145] Update to 0.43. --- .cvsignore | 2 +- import.log | 1 + monotone-0.42-gcc44.patch | 90 ------------------------------- monotone-0.42-netsync.patch | 101 ----------------------------------- monotone-0.42-netsync2.patch | 12 ----- monotone.spec | 36 +++++-------- sources | 2 +- 7 files changed, 15 insertions(+), 229 deletions(-) delete mode 100644 monotone-0.42-gcc44.patch delete mode 100644 monotone-0.42-netsync.patch delete mode 100644 monotone-0.42-netsync2.patch diff --git a/.cvsignore b/.cvsignore index 61594c7..57b54ef 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.42.tar.gz +monotone-0.43.tar.gz diff --git a/import.log b/import.log index 8339a9c..5b19a7d 100644 --- a/import.log +++ b/import.log @@ -2,3 +2,4 @@ monotone-0_42-1_fc10:HEAD:monotone-0.42-1.fc10.src.rpm:1230916116 monotone-0_42-2_fc10:HEAD:monotone-0.42-2.fc10.src.rpm:1230932958 monotone-0_42-3_fc10:HEAD:monotone-0.42-3.fc10.src.rpm:1234192456 monotone-0_42-5_fc10:HEAD:monotone-0.42-5.fc10.src.rpm:1235765112 +monotone-0_43-1_fc10:HEAD:monotone-0.43-1.fc10.src.rpm:1238237776 diff --git a/monotone-0.42-gcc44.patch b/monotone-0.42-gcc44.patch deleted file mode 100644 index 6e46048..0000000 --- a/monotone-0.42-gcc44.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff -up monotone-0.42/key_store.cc.orig monotone-0.42/key_store.cc ---- monotone-0.42/key_store.cc.orig 2008-12-14 00:02:12.000000000 +0100 -+++ monotone-0.42/key_store.cc 2009-02-07 17:23:27.000000000 +0100 -@@ -460,30 +460,30 @@ key_store::cache_decrypted_key(const rsa - - void - key_store::create_key_pair(database & db, -- rsa_keypair_id const & id, -+ rsa_keypair_id const & ident, - utf8 const * maybe_passphrase, - id * maybe_pubhash, - id * maybe_privhash) - { - conditional_transaction_guard guard(db); - -- bool exists = key_pair_exists(id); -+ bool exists = key_pair_exists(ident); - if (db.database_specified()) - { - guard.acquire(); -- exists = exists || db.public_key_exists(id); -+ exists = exists || db.public_key_exists(ident); - } -- N(!exists, F("key '%s' already exists") % id); -+ N(!exists, F("key '%s' already exists") % ident); - - utf8 prompted_passphrase; - if (!maybe_passphrase) - { -- get_passphrase(prompted_passphrase, id, true, true); -+ get_passphrase(prompted_passphrase, ident, true, true); - maybe_passphrase = &prompted_passphrase; - } - - // okay, now we can create the key -- P(F("generating key-pair '%s'") % id); -+ P(F("generating key-pair '%s'") % ident); - RSA_PrivateKey priv(*s->rng, static_cast(constants::keylen)); - - // serialize and maybe encrypt the private key -@@ -514,20 +514,20 @@ key_store::create_key_pair(database & db - % kp.priv().size()); - - // and save it. -- P(F("storing key-pair '%s' in %s/") % id % get_key_dir()); -- put_key_pair(id, kp); -+ P(F("storing key-pair '%s' in %s/") % ident % get_key_dir()); -+ put_key_pair(ident, kp); - - if (db.database_specified()) - { -- P(F("storing public key '%s' in %s") % id % db.get_filename()); -- db.put_key(id, kp.pub); -+ P(F("storing public key '%s' in %s") % ident % db.get_filename()); -+ db.put_key(ident, kp.pub); - guard.commit(); - } - - if (maybe_pubhash) -- key_hash_code(id, kp.pub, *maybe_pubhash); -+ key_hash_code(ident, kp.pub, *maybe_pubhash); - if (maybe_privhash) -- key_hash_code(id, kp.priv, *maybe_privhash); -+ key_hash_code(ident, kp.priv, *maybe_privhash); - } - - void -diff -up monotone-0.42/key_store.hh.orig monotone-0.42/key_store.hh ---- monotone-0.42/key_store.hh.orig 2008-10-03 15:30:21.000000000 +0200 -+++ monotone-0.42/key_store.hh 2009-02-07 17:21:54.000000000 +0100 -@@ -64,7 +64,7 @@ public: - - void cache_decrypted_key(rsa_keypair_id const & id); - -- void create_key_pair(database & db, rsa_keypair_id const & id, -+ void create_key_pair(database & db, rsa_keypair_id const & ident, - utf8 const * maybe_passphrase = NULL, - id * maybe_pubhash = NULL, - id * maybe_privhash = NULL); -diff -up monotone-0.42/sanity.hh.orig monotone-0.42/sanity.hh ---- monotone-0.42/sanity.hh.orig 2008-11-23 22:32:49.000000000 +0100 -+++ monotone-0.42/sanity.hh 2009-02-07 17:21:42.000000000 +0100 -@@ -12,6 +12,7 @@ - - #include - #include -+#include - - #include "boost/current_function.hpp" - diff --git a/monotone-0.42-netsync.patch b/monotone-0.42-netsync.patch deleted file mode 100644 index 49ebdb7..0000000 --- a/monotone-0.42-netsync.patch +++ /dev/null @@ -1,101 +0,0 @@ -diff -up monotone-0.42/netsync.cc.orig monotone-0.42/netsync.cc ---- monotone-0.42/netsync.cc.orig 2009-02-04 13:53:00.000000000 +0100 -+++ monotone-0.42/netsync.cc 2009-02-04 13:53:49.000000000 +0100 -@@ -353,7 +353,7 @@ unsigned int reactable::count = 0; - - class session_base : public reactable - { -- bool read_some(); -+ void read_some(bool & failed, bool & eof); - bool write_some(); - void mark_recent_io() - { -@@ -468,10 +468,12 @@ session_base::which_events() - return ret; - } - --bool --session_base::read_some() -+void -+session_base::read_some(bool & failed, bool & eof) - { - I(inbuf.size() < constants::netcmd_maxsz); -+ eof = false; -+ failed = false; - char tmp[constants::bufsz]; - Netxx::signed_size_type count = str->read(tmp, sizeof(tmp)); - if (count > 0) -@@ -479,17 +481,38 @@ session_base::read_some() - L(FL("read %d bytes from fd %d (peer %s)") - % count % str->get_socketfd() % peer_id); - if (encountered_error) -- { -- L(FL("in error unwind mode, so throwing them into the bit bucket")); -- return true; -- } -+ L(FL("in error unwind mode, so throwing them into the bit bucket")); -+ - inbuf.append(tmp,count); - mark_recent_io(); - note_bytes_in(count); -- return true; -+ } -+ else if (count == 0) -+ { -+ // Returning 0 bytes after select() marks the file descriptor as -+ // ready for reading signifies EOF. -+ -+ switch (protocol_state) -+ { -+ case working_state: -+ P(F("peer %s IO terminated connection in working state (error)") -+ % peer_id); -+ break; -+ -+ case shutdown_state: -+ P(F("peer %s IO terminated connection in shutdown state " -+ "(possibly client misreported error)") -+ % peer_id); -+ break; -+ -+ case confirmed_state: -+ break; -+ } -+ -+ eof = true; - } - else -- return false; -+ failed = true; - } - - bool -@@ -531,11 +554,14 @@ bool - session_base::do_io(Netxx::Probe::ready_type what) - { - bool ok = true; -+ bool eof = false; - try - { - if (what & Netxx::Probe::ready_read) - { -- if (!read_some()) -+ bool failed; -+ read_some(failed, eof); -+ if (failed) - ok = false; - } - if (what & Netxx::Probe::ready_write) -@@ -578,7 +604,11 @@ session_base::do_io(Netxx::Probe::ready_ - % peer_id); - ok = false; - } -- return ok; -+ -+ // Return false in case we reached EOF, so as to prevent further calls -+ // to select()s on this stream, as recommended by the select_tut man -+ // page. -+ return ok && !eof; - } - - //////////////////////////////////////////////////////////////////////// diff --git a/monotone-0.42-netsync2.patch b/monotone-0.42-netsync2.patch deleted file mode 100644 index 7dbeaa0..0000000 --- a/monotone-0.42-netsync2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up monotone-0.42/netsync.cc.orig monotone-0.42/netsync.cc ---- monotone-0.42/netsync.cc.orig 2008-12-14 00:02:12.000000000 +0100 -+++ monotone-0.42/netsync.cc 2009-02-27 19:19:37.000000000 +0100 -@@ -374,7 +374,7 @@ protected: - } - bool output_overfull() const - { -- return outbuf.size() > constants::bufsz * 10; -+ return outbuf_size > constants::bufsz * 10; - } - public: - string peer_id; diff --git a/monotone.spec b/monotone.spec index 588e693..203fa52 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.42 -Release: 5%{?dist} +Version: 0.43 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -12,29 +12,15 @@ Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server -# rediffed changeset f18abebd.. from upstream -Patch0: monotone-0.42-netsync.patch -# rediffed changesets 33022690.. and 76e258cb.. from upstream -Patch1: monotone-0.42-gcc44.patch -# rediffed changeset 16184688.. from upstream -Patch2: monotone-0.42-netsync2.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 -%if 1 -%define bundled_sqlite yes -%else -# In fact, monotone has a locally-hacked 3.2.7, so we can't replace it. -BuildRequires: sqlite-devel >= 3.2.7 -%define bundled_sqlite no -%endif -# monotone has local hacks in lua 5.0.2 as well, sigh. -%define bundled_lua 1 -%if %{bundled_lua} == 0 -BuildRequires: lua -%endif +BuildRequires: botan-devel >= 1.6.3 +BuildRequires: pcre-devel >= 7.4 +BuildRequires: sqlite-devel >= 3.3.8 +BuildRequires: lua-devel >= 5.1 +BuildRequires: libidn-devel # The test suite needs cvs. BuildRequires: cvs @@ -78,9 +64,6 @@ and then pass commands to it. %prep %setup -q -%patch0 -p1 -b .gcc44 -%patch1 -p1 -b .netsync -%patch2 -p1 -b .netsync2 %build %configure --with-bundled-lua=%{bundled_lua} \ @@ -208,6 +191,11 @@ fi %changelog +* Fri Mar 27 2009 Thomas Moschny - 0.43-1 +- Update to 0.43. +- Add BRs for libraries monotone doesn't bundle anylonger. +- Drop patches applied upstream. + * Fri Feb 27 2009 Thomas Moschny - 0.42-5 - Add one more netsync related patch from trunk. diff --git a/sources b/sources index ec72068..6678497 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c8e916d674b6608369d9f447700a8830 monotone-0.42.tar.gz +a9e82b899ff7f676f620c450d6aff4cf monotone-0.43.tar.gz From a69e04797f16809e51bf9b0c28720cc2966b640e Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 25 Apr 2009 18:30:13 +0000 Subject: [PATCH 049/145] Rebuilt for new botan version. --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 203fa52..0709382 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.43 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -191,6 +191,9 @@ fi %changelog +* Sat Apr 25 2009 Thomas Moschny - 0.43-2 +- Rebuilt for new botan version. + * Fri Mar 27 2009 Thomas Moschny - 0.43-1 - Update to 0.43. - Add BRs for libraries monotone doesn't bundle anylonger. From 616bb1debd0d432e54c27c8342a03b71d20bf47d Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 15 May 2009 18:04:49 +0000 Subject: [PATCH 050/145] Update to 0.44. --- .cvsignore | 2 +- import.log | 1 + monotone.spec | 7 +++++-- sources | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 57b54ef..044b7fb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.43.tar.gz +monotone-0.44.tar.gz diff --git a/import.log b/import.log index 5b19a7d..180c7f1 100644 --- a/import.log +++ b/import.log @@ -3,3 +3,4 @@ monotone-0_42-2_fc10:HEAD:monotone-0.42-2.fc10.src.rpm:1230932958 monotone-0_42-3_fc10:HEAD:monotone-0.42-3.fc10.src.rpm:1234192456 monotone-0_42-5_fc10:HEAD:monotone-0.42-5.fc10.src.rpm:1235765112 monotone-0_43-1_fc10:HEAD:monotone-0.43-1.fc10.src.rpm:1238237776 +monotone-0_44-1_fc11:HEAD:monotone-0.44-1.fc11.src.rpm:1242410660 diff --git a/monotone.spec b/monotone.spec index 0709382..be1ce3d 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.43 -Release: 2%{?dist} +Version: 0.44 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -191,6 +191,9 @@ fi %changelog +* Wed May 13 2009 Thomas Moschny - 0.44-1 +- Update to 0.44. + * Sat Apr 25 2009 Thomas Moschny - 0.43-2 - Rebuilt for new botan version. diff --git a/sources b/sources index 6678497..7419efe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a9e82b899ff7f676f620c450d6aff4cf monotone-0.43.tar.gz +6cc1f5f31df2e41bdfe502310463924a monotone-0.44.tar.gz From 29f5551eadc04be5dfcc9fbd616834cac2f13eae Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 25 Jul 2009 15:04:09 +0000 Subject: [PATCH 051/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index be1ce3d..7e35bec 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.44 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -191,6 +191,9 @@ fi %changelog +* Sat Jul 25 2009 Fedora Release Engineering - 0.44-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed May 13 2009 Thomas Moschny - 0.44-1 - Update to 0.44. From 4a39fbd83eee7bd696fb9688eda2c501c7867c76 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sun, 13 Sep 2009 10:03:48 +0000 Subject: [PATCH 052/145] Update to 0.45. --- .cvsignore | 2 +- import.log | 1 + monotone-0.45-ls-output.patch | 9 +++++++++ monotone.spec | 9 +++++++-- sources | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 monotone-0.45-ls-output.patch diff --git a/.cvsignore b/.cvsignore index 044b7fb..4449a32 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.44.tar.gz +monotone-0.45.tar.gz diff --git a/import.log b/import.log index 180c7f1..1ee8393 100644 --- a/import.log +++ b/import.log @@ -4,3 +4,4 @@ monotone-0_42-3_fc10:HEAD:monotone-0.42-3.fc10.src.rpm:1234192456 monotone-0_42-5_fc10:HEAD:monotone-0.42-5.fc10.src.rpm:1235765112 monotone-0_43-1_fc10:HEAD:monotone-0.43-1.fc10.src.rpm:1238237776 monotone-0_44-1_fc11:HEAD:monotone-0.44-1.fc11.src.rpm:1242410660 +monotone-0_45-1_fc11:HEAD:monotone-0.45-1.fc11.src.rpm:1252835264 diff --git a/monotone-0.45-ls-output.patch b/monotone-0.45-ls-output.patch new file mode 100644 index 0000000..da03f38 --- /dev/null +++ b/monotone-0.45-ls-output.patch @@ -0,0 +1,9 @@ +============================================================ +--- tests/key_files_created_securely/__driver__.lua 63a9bd279770dc1fcefec5eb6cead7fd3e061982 ++++ tests/key_files_created_securely/__driver__.lua 2a0d5d0376174967369a15795f30a6e081af81b6 +@@ -25,4 +25,4 @@ check({ "ls", "-l", "keys/foobar." .. ke + keyid = string.sub(line, 0, 40) + + check({ "ls", "-l", "keys/foobar." .. keyid }, 0, true, nil) +-check(qgrep("^-rw------- .*keys/foobar." .. keyid, "stdout")) ++check(qgrep("^-rw-------[.+]? .*keys/foobar." .. keyid, "stdout")) diff --git a/monotone.spec b/monotone.spec index 7e35bec..92ad616 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.44 -Release: 2%{?dist} +Version: 0.45 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -11,6 +11,7 @@ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server +Patch0: monotone-0.45-ls-output.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -64,6 +65,7 @@ and then pass commands to it. %prep %setup -q +%patch0 -p0 -b .ls-output %build %configure --with-bundled-lua=%{bundled_lua} \ @@ -191,6 +193,9 @@ fi %changelog +* Sat Sep 12 2009 Thomas Moschny - 0.45-1 +- Update to 0.45. + * Sat Jul 25 2009 Fedora Release Engineering - 0.44-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 7419efe..647a075 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6cc1f5f31df2e41bdfe502310463924a monotone-0.44.tar.gz +bd37c3d75e3fd1974a17f556499b42ab monotone-0.45.tar.gz From e064b06ff021b6b478eec4d459b66f2b4b9d1203 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:18:58 +0000 Subject: [PATCH 053/145] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 659e999..6fced2f 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: monotone -# $Id$ +# $Id: Makefile,v 1.1 2005/07/18 23:50:55 roland Exp $ NAME := monotone SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 60bf42a6b409320f199f59eb7a3fc8b36065bf1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Kasal?= Date: Mon, 7 Dec 2009 17:43:32 +0000 Subject: [PATCH 054/145] - rebuild against perl 5.10.1 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 92ad616..473eb1f 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.45 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -193,6 +193,9 @@ fi %changelog +* Mon Dec 7 2009 Stepan Kasal - 0.45-2 +- rebuild against perl 5.10.1 + * Sat Sep 12 2009 Thomas Moschny - 0.45-1 - Update to 0.45. From 8ddafc9bec81a2fccbf6e9cfebfe218e79cd9fc8 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 23 Jan 2010 22:10:02 +0000 Subject: [PATCH 055/145] Update to 0.46. --- .cvsignore | 2 +- import.log | 1 + monotone-0.45-ls-output.patch | 9 ------- monotone-0.46-netsync_large_file.patch | 36 ++++++++++++++++++++++++++ monotone.spec | 26 +++++++++++-------- sources | 2 +- 6 files changed, 54 insertions(+), 22 deletions(-) delete mode 100644 monotone-0.45-ls-output.patch create mode 100644 monotone-0.46-netsync_large_file.patch diff --git a/.cvsignore b/.cvsignore index 4449a32..c325f79 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.45.tar.gz +monotone-0.46.tar.gz diff --git a/import.log b/import.log index 1ee8393..665e6ae 100644 --- a/import.log +++ b/import.log @@ -5,3 +5,4 @@ monotone-0_42-5_fc10:HEAD:monotone-0.42-5.fc10.src.rpm:1235765112 monotone-0_43-1_fc10:HEAD:monotone-0.43-1.fc10.src.rpm:1238237776 monotone-0_44-1_fc11:HEAD:monotone-0.44-1.fc11.src.rpm:1242410660 monotone-0_45-1_fc11:HEAD:monotone-0.45-1.fc11.src.rpm:1252835264 +monotone-0_46-1_fc12:HEAD:monotone-0.46-1.fc12.src.rpm:1264284544 diff --git a/monotone-0.45-ls-output.patch b/monotone-0.45-ls-output.patch deleted file mode 100644 index da03f38..0000000 --- a/monotone-0.45-ls-output.patch +++ /dev/null @@ -1,9 +0,0 @@ -============================================================ ---- tests/key_files_created_securely/__driver__.lua 63a9bd279770dc1fcefec5eb6cead7fd3e061982 -+++ tests/key_files_created_securely/__driver__.lua 2a0d5d0376174967369a15795f30a6e081af81b6 -@@ -25,4 +25,4 @@ check({ "ls", "-l", "keys/foobar." .. ke - keyid = string.sub(line, 0, 40) - - check({ "ls", "-l", "keys/foobar." .. keyid }, 0, true, nil) --check(qgrep("^-rw------- .*keys/foobar." .. keyid, "stdout")) -+check(qgrep("^-rw-------[.+]? .*keys/foobar." .. keyid, "stdout")) diff --git a/monotone-0.46-netsync_large_file.patch b/monotone-0.46-netsync_large_file.patch new file mode 100644 index 0000000..f9a9c88 --- /dev/null +++ b/monotone-0.46-netsync_large_file.patch @@ -0,0 +1,36 @@ +# +# +# patch "netxx/socket.cxx" +# from [ca9a59bb394a41f6aae1527678162678d5e60419] +# to [16b61df71104d616a1dc68adc6da02160ce1714a] +# +============================================================ +--- netxx/socket.cxx ca9a59bb394a41f6aae1527678162678d5e60419 ++++ netxx/socket.cxx 16b61df71104d616a1dc68adc6da02160ce1714a +@@ -172,9 +172,9 @@ Netxx::signed_size_type Netxx::Socket::w + Netxx::signed_size_type Netxx::Socket::write (const void *buffer, size_type length, const Timeout &timeout) + { + const char *buffer_ptr = static_cast(buffer); +- signed_size_type rc, bytes_written=0; ++ signed_size_type rc; + +- while (length) { ++ for (;;) { + if (timeout && !writable(timeout)) return -1; + + if ( (rc = send(socketfd_, buffer_ptr, length, 0)) < 0) { +@@ -213,12 +213,10 @@ Netxx::signed_size_type Netxx::Socket::w + } + } + +- buffer_ptr += rc; +- bytes_written += rc; +- length -= rc; ++ break; + } + +- return bytes_written; ++ return rc; + } + //#################################################################### + Netxx::signed_size_type Netxx::Socket::read (void *buffer, size_type length, const Timeout &timeout) diff --git a/monotone.spec b/monotone.spec index 473eb1f..340bd69 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.45 -Release: 2%{?dist} +Version: 0.46 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -11,7 +11,7 @@ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server -Patch0: monotone-0.45-ls-output.patch +Patch0: monotone-0.46-netsync_large_file.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -65,22 +65,20 @@ and then pass commands to it. %prep %setup -q -%patch0 -p0 -b .ls-output +%patch0 -p0 -b .netsync-large-file %build -%configure --with-bundled-lua=%{bundled_lua} \ - --with-bundled-sqlite=%{bundled_sqlite} +%configure make %{?_smp_mflags} %check -# disable parallel runs in the testsuite for now -make check || { cat tester_dir/*.log; false; } +make check %{?_smp_mflags} || { cat tester_dir/*.log; false; } %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_infodir}/dir -rm -f %{buildroot}%{_datadir}/doc/monotone/monotone.html +mv %{buildroot}%{_datadir}/doc/%{name} _doc %find_lang %{name} @@ -139,8 +137,7 @@ fi %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README README.changesets UPGRADE -%doc monotone.html - +%doc _doc/* %{_bindir}/mtn %{_bindir}/mtnopt %{_infodir}/monotone.info* @@ -193,6 +190,13 @@ fi %changelog +* Sat Jan 23 2010 Thomas Moschny - 0.46-1 +- Update to 0.46. +- Remove patch applied upstream +- Add patch from trunk for failing test. +- Fix installation of documentation: include figures in the package. +- Let tests in the testsuite run in parallel. + * Mon Dec 7 2009 Stepan Kasal - 0.45-2 - rebuild against perl 5.10.1 diff --git a/sources b/sources index 647a075..5070437 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bd37c3d75e3fd1974a17f556499b42ab monotone-0.45.tar.gz +405286223efcf375cd022dabf2f1c845 monotone-0.46.tar.gz From f4f58357273863148c85495add3c25a32a8b5e10 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sun, 11 Apr 2010 12:16:11 +0000 Subject: [PATCH 056/145] Update to 0.47. --- .cvsignore | 2 +- import.log | 1 + monotone-0.46-netsync_large_file.patch | 36 -------------------------- monotone.spec | 10 ++++--- sources | 2 +- 5 files changed, 9 insertions(+), 42 deletions(-) delete mode 100644 monotone-0.46-netsync_large_file.patch diff --git a/.cvsignore b/.cvsignore index c325f79..0e1e13b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.46.tar.gz +monotone-0.47.tar.gz diff --git a/import.log b/import.log index 665e6ae..b247241 100644 --- a/import.log +++ b/import.log @@ -6,3 +6,4 @@ monotone-0_43-1_fc10:HEAD:monotone-0.43-1.fc10.src.rpm:1238237776 monotone-0_44-1_fc11:HEAD:monotone-0.44-1.fc11.src.rpm:1242410660 monotone-0_45-1_fc11:HEAD:monotone-0.45-1.fc11.src.rpm:1252835264 monotone-0_46-1_fc12:HEAD:monotone-0.46-1.fc12.src.rpm:1264284544 +monotone-0_47-1_fc12:HEAD:monotone-0.47-1.fc12.src.rpm:1270988125 diff --git a/monotone-0.46-netsync_large_file.patch b/monotone-0.46-netsync_large_file.patch deleted file mode 100644 index f9a9c88..0000000 --- a/monotone-0.46-netsync_large_file.patch +++ /dev/null @@ -1,36 +0,0 @@ -# -# -# patch "netxx/socket.cxx" -# from [ca9a59bb394a41f6aae1527678162678d5e60419] -# to [16b61df71104d616a1dc68adc6da02160ce1714a] -# -============================================================ ---- netxx/socket.cxx ca9a59bb394a41f6aae1527678162678d5e60419 -+++ netxx/socket.cxx 16b61df71104d616a1dc68adc6da02160ce1714a -@@ -172,9 +172,9 @@ Netxx::signed_size_type Netxx::Socket::w - Netxx::signed_size_type Netxx::Socket::write (const void *buffer, size_type length, const Timeout &timeout) - { - const char *buffer_ptr = static_cast(buffer); -- signed_size_type rc, bytes_written=0; -+ signed_size_type rc; - -- while (length) { -+ for (;;) { - if (timeout && !writable(timeout)) return -1; - - if ( (rc = send(socketfd_, buffer_ptr, length, 0)) < 0) { -@@ -213,12 +213,10 @@ Netxx::signed_size_type Netxx::Socket::w - } - } - -- buffer_ptr += rc; -- bytes_written += rc; -- length -= rc; -+ break; - } - -- return bytes_written; -+ return rc; - } - //#################################################################### - Netxx::signed_size_type Netxx::Socket::read (void *buffer, size_type length, const Timeout &timeout) diff --git a/monotone.spec b/monotone.spec index 340bd69..aa2a689 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.46 +Version: 0.47 Release: 1%{?dist} Summary: A free, distributed version control system @@ -11,7 +11,6 @@ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server -Patch0: monotone-0.46-netsync_large_file.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -65,7 +64,6 @@ and then pass commands to it. %prep %setup -q -%patch0 -p0 -b .netsync-large-file %build %configure @@ -190,9 +188,13 @@ fi %changelog +* Sun Apr 11 2010 Thomas Moschny - 0.47-1 +- Update to 0.47. +- Remove patch applied upstream. + * Sat Jan 23 2010 Thomas Moschny - 0.46-1 - Update to 0.46. -- Remove patch applied upstream +- Remove patch applied upstream. - Add patch from trunk for failing test. - Fix installation of documentation: include figures in the package. - Let tests in the testsuite run in parallel. diff --git a/sources b/sources index 5070437..d12fa91 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -405286223efcf375cd022dabf2f1c845 monotone-0.46.tar.gz +21da9c44a197f2e5e379a5bb4e42797e monotone-0.47.tar.gz From 9f472647778601da70f9863eb1b686f701df1286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Thu, 29 Apr 2010 14:03:00 +0000 Subject: [PATCH 057/145] - Mass rebuild with perl-5.12.0 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index aa2a689..77c5557 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.47 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -188,6 +188,9 @@ fi %changelog +* Thu Apr 29 2010 Marcela Maslanova - 0.47-2 +- Mass rebuild with perl-5.12.0 + * Sun Apr 11 2010 Thomas Moschny - 0.47-1 - Update to 0.47. - Remove patch applied upstream. From 5f8c95b896c06ed299727bb5e2ea7efac3762b10 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 8 May 2010 21:27:43 +0000 Subject: [PATCH 058/145] Add patch from upstream fixing a regression for netsync over pipes. --- import.log | 1 + monotone-0.47-netsync_over_pipe.patch | 14 ++++++++++++++ monotone.spec | 11 +++++++++-- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 monotone-0.47-netsync_over_pipe.patch diff --git a/import.log b/import.log index b247241..d325194 100644 --- a/import.log +++ b/import.log @@ -7,3 +7,4 @@ monotone-0_44-1_fc11:HEAD:monotone-0.44-1.fc11.src.rpm:1242410660 monotone-0_45-1_fc11:HEAD:monotone-0.45-1.fc11.src.rpm:1252835264 monotone-0_46-1_fc12:HEAD:monotone-0.46-1.fc12.src.rpm:1264284544 monotone-0_47-1_fc12:HEAD:monotone-0.47-1.fc12.src.rpm:1270988125 +monotone-0_47-3_fc12:HEAD:monotone-0.47-3.fc12.src.rpm:1273353985 diff --git a/monotone-0.47-netsync_over_pipe.patch b/monotone-0.47-netsync_over_pipe.patch new file mode 100644 index 0000000..ec098ce --- /dev/null +++ b/monotone-0.47-netsync_over_pipe.patch @@ -0,0 +1,14 @@ +--- network/reactor.cc a90cee5442d3c77d8082d7bb91d4d23170bf25fb ++++ network/reactor.cc 3c94489a6e1ce701dbdcac568cb30e5e9e764342 +@@ -87,9 +87,9 @@ void reactor::remove(shared_ptrremove_from_probe(probe); ++ have_pipe = false; + } + } + diff --git a/monotone.spec b/monotone.spec index 77c5557..4911d6c 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.47 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -11,6 +11,8 @@ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server +# this is uppstream revision cb7a30cb.. +Patch0: monotone-0.47-netsync_over_pipe.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -64,13 +66,14 @@ and then pass commands to it. %prep %setup -q +%patch0 -p0 %build %configure make %{?_smp_mflags} %check -make check %{?_smp_mflags} || { cat tester_dir/*.log; false; } +make %{?_smp_mflags} check || { cat tester_dir/*.log; false; } %install rm -rf %{buildroot} @@ -188,6 +191,10 @@ fi %changelog +* Sat May 8 2010 Thomas Moschny - 0.47-3 +- Add patch from upstream for a bug that prevents successful execution + of push / pull / sync over pipes. + * Thu Apr 29 2010 Marcela Maslanova - 0.47-2 - Mass rebuild with perl-5.12.0 From 34b31720887bb456ec8f630e8264e41d8b8d5a9a Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 2 Jul 2010 20:03:06 +0000 Subject: [PATCH 059/145] Update to 0.48. --- .cvsignore | 2 +- import.log | 1 + monotone-0.47-netsync_over_pipe.patch | 14 -------------- monotone.spec | 10 +++++----- sources | 2 +- 5 files changed, 8 insertions(+), 21 deletions(-) delete mode 100644 monotone-0.47-netsync_over_pipe.patch diff --git a/.cvsignore b/.cvsignore index 0e1e13b..cb87ca6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -monotone-0.47.tar.gz +monotone-0.48.tar.gz diff --git a/import.log b/import.log index d325194..701788f 100644 --- a/import.log +++ b/import.log @@ -8,3 +8,4 @@ monotone-0_45-1_fc11:HEAD:monotone-0.45-1.fc11.src.rpm:1252835264 monotone-0_46-1_fc12:HEAD:monotone-0.46-1.fc12.src.rpm:1264284544 monotone-0_47-1_fc12:HEAD:monotone-0.47-1.fc12.src.rpm:1270988125 monotone-0_47-3_fc12:HEAD:monotone-0.47-3.fc12.src.rpm:1273353985 +monotone-0_48-1_fc13:HEAD:monotone-0.48-1.fc13.src.rpm:1278100952 diff --git a/monotone-0.47-netsync_over_pipe.patch b/monotone-0.47-netsync_over_pipe.patch deleted file mode 100644 index ec098ce..0000000 --- a/monotone-0.47-netsync_over_pipe.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- network/reactor.cc a90cee5442d3c77d8082d7bb91d4d23170bf25fb -+++ network/reactor.cc 3c94489a6e1ce701dbdcac568cb30e5e9e764342 -@@ -87,9 +87,9 @@ void reactor::remove(shared_ptrremove_from_probe(probe); -+ have_pipe = false; - } - } - diff --git a/monotone.spec b/monotone.spec index 4911d6c..4688ed1 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.47 -Release: 3%{?dist} +Version: 0.48 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -11,8 +11,6 @@ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server -# this is uppstream revision cb7a30cb.. -Patch0: monotone-0.47-netsync_over_pipe.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -66,7 +64,6 @@ and then pass commands to it. %prep %setup -q -%patch0 -p0 %build %configure @@ -191,6 +188,9 @@ fi %changelog +* Mon Jun 14 2010 Thomas Moschny - 0.48-1 +- Update to 0.48. + * Sat May 8 2010 Thomas Moschny - 0.47-3 - Add patch from upstream for a bug that prevents successful execution of push / pull / sync over pipes. diff --git a/sources b/sources index d12fa91..f894a39 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -21da9c44a197f2e5e379a5bb4e42797e monotone-0.47.tar.gz +330a1fe1d92c899d1ad539606f85a9f8 monotone-0.48.tar.gz From 6b2abff1753d6cafe782aa8c1e77f63197e0b768 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 03:40:11 +0000 Subject: [PATCH 060/145] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 11 ----------- 3 files changed, 32 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 6fced2f..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: monotone -# $Id: Makefile,v 1.1 2005/07/18 23:50:55 roland Exp $ -NAME := monotone -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 701788f..0000000 --- a/import.log +++ /dev/null @@ -1,11 +0,0 @@ -monotone-0_42-1_fc10:HEAD:monotone-0.42-1.fc10.src.rpm:1230916116 -monotone-0_42-2_fc10:HEAD:monotone-0.42-2.fc10.src.rpm:1230932958 -monotone-0_42-3_fc10:HEAD:monotone-0.42-3.fc10.src.rpm:1234192456 -monotone-0_42-5_fc10:HEAD:monotone-0.42-5.fc10.src.rpm:1235765112 -monotone-0_43-1_fc10:HEAD:monotone-0.43-1.fc10.src.rpm:1238237776 -monotone-0_44-1_fc11:HEAD:monotone-0.44-1.fc11.src.rpm:1242410660 -monotone-0_45-1_fc11:HEAD:monotone-0.45-1.fc11.src.rpm:1252835264 -monotone-0_46-1_fc12:HEAD:monotone-0.46-1.fc12.src.rpm:1264284544 -monotone-0_47-1_fc12:HEAD:monotone-0.47-1.fc12.src.rpm:1270988125 -monotone-0_47-3_fc12:HEAD:monotone-0.47-3.fc12.src.rpm:1273353985 -monotone-0_48-1_fc13:HEAD:monotone-0.48-1.fc13.src.rpm:1278100952 From 9589e206d00460700984d60ea0ea71e7be6660fd Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Wed, 27 Oct 2010 17:45:36 +0200 Subject: [PATCH 061/145] - Update to 0.48.1. - Add patch from upstream to support newer sqlite. --- .gitignore | 1 + monotone.spec | 8 +++++++- sources | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cb87ca6..cf0d8d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ monotone-0.48.tar.gz +/monotone-0.48.1.tar.gz diff --git a/monotone.spec b/monotone.spec index 4688ed1..ecc3be3 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.48 +Version: 0.48.1 Release: 1%{?dist} Summary: A free, distributed version control system @@ -11,6 +11,7 @@ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server +Patch0: monotone-sqlite-3.7.3.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -64,6 +65,7 @@ and then pass commands to it. %prep %setup -q +%patch0 -p0 %build %configure @@ -188,6 +190,10 @@ fi %changelog +* Wed Oct 27 2010 Thomas Moschny - 0.48.1-1 +- Update to 0.48.1. +- Add patch from upstream to support newer sqlite. + * Mon Jun 14 2010 Thomas Moschny - 0.48-1 - Update to 0.48. diff --git a/sources b/sources index f894a39..e6505fd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -330a1fe1d92c899d1ad539606f85a9f8 monotone-0.48.tar.gz +b5fa9e3b02ca3dcaf58fb7a2519ef956 monotone-0.48.1.tar.gz From f67cf279fe5d841b8f514394d379fce13949dbcc Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Wed, 27 Oct 2010 17:51:25 +0200 Subject: [PATCH 062/145] Add missing patch file. --- monotone-sqlite-3.7.3.patch | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 monotone-sqlite-3.7.3.patch diff --git a/monotone-sqlite-3.7.3.patch b/monotone-sqlite-3.7.3.patch new file mode 100644 index 0000000..36ad909 --- /dev/null +++ b/monotone-sqlite-3.7.3.patch @@ -0,0 +1,33 @@ +# +# +# patch "database.cc" +# from [0afa3ff4bd9c9ee3bc62b10bcf6295a9f5388d64] +# to [8bfff559a0894259fe3668294bd3906ae837129b] +# +============================================================ +--- database.cc 0afa3ff4bd9c9ee3bc62b10bcf6295a9f5388d64 ++++ database.cc 8bfff559a0894259fe3668294bd3906ae837129b +@@ -1531,12 +1531,19 @@ database_impl::fetch(results & res, + vector row; + for (int col = 0; col < ncol; col++) + { ++ // We never store NULLs, so we should never see one. ++ int const datatype = sqlite3_column_type(i->second.stmt(), col); ++ E(datatype != SQLITE_NULL, origin::database, ++ F("null result in query: %s") % query.sql_cmd); + const char * value = (const char*)sqlite3_column_blob(i->second.stmt(), col); + int bytes = sqlite3_column_bytes(i->second.stmt(), col); +- E(value, origin::database, +- F("null result in query: %s") % query.sql_cmd); +- row.push_back(string(value, value + bytes)); +- //L(FL("row %d col %d value='%s'") % nrow % col % value); ++ if (value) { ++ row.push_back(string(value, value + bytes)); ++ } else { ++ // sqlite3_column_blob() returns null for zero-length ++ I(bytes == 0); ++ row.push_back(string()); ++ } + } + res.push_back(row); + } From a3a566156d96f89d89de792f9d785ddffdd007d8 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Thu, 28 Oct 2010 01:15:28 +0200 Subject: [PATCH 063/145] Update patch from upstream 0.48.x branch. --- monotone-sqlite-3.7.3.patch | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/monotone-sqlite-3.7.3.patch b/monotone-sqlite-3.7.3.patch index 36ad909..93afcd1 100644 --- a/monotone-sqlite-3.7.3.patch +++ b/monotone-sqlite-3.7.3.patch @@ -1,13 +1,17 @@ # # # patch "database.cc" -# from [0afa3ff4bd9c9ee3bc62b10bcf6295a9f5388d64] -# to [8bfff559a0894259fe3668294bd3906ae837129b] +# from [0bc6ce7bb27323c3724ee95f099985a3abad21f3] +# to [b2b6048b199175b85cdf2c290302cb8da095c12a] +# +# patch "tests/fail_cleanly_on_unreadable_db/__driver__.lua" +# from [1ec557d1aef9eac9ee53a22d07f4ba0f3456da5e] +# to [8875c78a070bef87904bb840ed3cffa0acba4399] # ============================================================ ---- database.cc 0afa3ff4bd9c9ee3bc62b10bcf6295a9f5388d64 -+++ database.cc 8bfff559a0894259fe3668294bd3906ae837129b -@@ -1531,12 +1531,19 @@ database_impl::fetch(results & res, +--- database.cc 0bc6ce7bb27323c3724ee95f099985a3abad21f3 ++++ database.cc b2b6048b199175b85cdf2c290302cb8da095c12a +@@ -1489,12 +1489,19 @@ database_impl::fetch(results & res, vector row; for (int col = 0; col < ncol; col++) { @@ -31,3 +35,14 @@ } res.push_back(row); } +============================================================ +--- tests/fail_cleanly_on_unreadable_db/__driver__.lua 1ec557d1aef9eac9ee53a22d07f4ba0f3456da5e ++++ tests/fail_cleanly_on_unreadable_db/__driver__.lua 8875c78a070bef87904bb840ed3cffa0acba4399 +@@ -48,7 +48,6 @@ check(mtn("--db=subdir/foo.db", "db", "v + check(mtn("--db=subdir/foo.db", "ls", "branches"), 0, false, false) + check(mtn("--db=subdir/foo.db", "db", "info"), 0, false, false) + check(mtn("--db=subdir/foo.db", "db", "version"), 0, false, false) +-check(mtn("--db=subdir/foo.db", "db", "migrate"), 1, false, false) + check(mtn("--db=subdir/bar.db", "db", "load"), 1, false, false) + check(mtn("--db=subdir/baz.db", "db", "init"), 1, false, false) + check({"chmod", "a+w", "subdir"}) From 602161c5a69fc74f700d0d5463ab4a39cff589f4 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 29 Oct 2010 16:42:35 +0200 Subject: [PATCH 064/145] - Update to 0.99. - Remove patch already applied upstream. - Add patch for monotone bug #100. - Include the monotone manpage in the package. - Specfile cleanups. --- .gitignore | 1 + monotone-0.99-bug-100.patch | 11 ++++ monotone-sqlite-3.7.3.patch | 48 ----------------- monotone.spec | 105 +++++++++++++++++++++--------------- sources | 2 +- 5 files changed, 75 insertions(+), 92 deletions(-) create mode 100644 monotone-0.99-bug-100.patch delete mode 100644 monotone-sqlite-3.7.3.patch diff --git a/.gitignore b/.gitignore index cf0d8d6..1f0c783 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ monotone-0.48.tar.gz /monotone-0.48.1.tar.gz +/monotone-0.99.tar.gz diff --git a/monotone-0.99-bug-100.patch b/monotone-0.99-bug-100.patch new file mode 100644 index 0000000..11aa9d9 --- /dev/null +++ b/monotone-0.99-bug-100.patch @@ -0,0 +1,11 @@ +--- pcrewrap.cc 08ac10d9a75557faba316d1b0a242b8ed3cd4243 ++++ pcrewrap.cc 42611610af4de2f7d1da39bf5c023038b7590be7 +@@ -144,7 +144,7 @@ namespace pcre + // because pcre_exec might not signal trailing unmatched subpatterns + // i.e. if "abc" matches "(abc)(de)?", the match count is two, not + // the expected three +- size_t cap_count; ++ size_t cap_count = 0; + int rc = pcre_fullinfo(basedat, extradat, PCRE_INFO_CAPTURECOUNT, &cap_count); + I(rc == 0); + diff --git a/monotone-sqlite-3.7.3.patch b/monotone-sqlite-3.7.3.patch deleted file mode 100644 index 93afcd1..0000000 --- a/monotone-sqlite-3.7.3.patch +++ /dev/null @@ -1,48 +0,0 @@ -# -# -# patch "database.cc" -# from [0bc6ce7bb27323c3724ee95f099985a3abad21f3] -# to [b2b6048b199175b85cdf2c290302cb8da095c12a] -# -# patch "tests/fail_cleanly_on_unreadable_db/__driver__.lua" -# from [1ec557d1aef9eac9ee53a22d07f4ba0f3456da5e] -# to [8875c78a070bef87904bb840ed3cffa0acba4399] -# -============================================================ ---- database.cc 0bc6ce7bb27323c3724ee95f099985a3abad21f3 -+++ database.cc b2b6048b199175b85cdf2c290302cb8da095c12a -@@ -1489,12 +1489,19 @@ database_impl::fetch(results & res, - vector row; - for (int col = 0; col < ncol; col++) - { -+ // We never store NULLs, so we should never see one. -+ int const datatype = sqlite3_column_type(i->second.stmt(), col); -+ E(datatype != SQLITE_NULL, origin::database, -+ F("null result in query: %s") % query.sql_cmd); - const char * value = (const char*)sqlite3_column_blob(i->second.stmt(), col); - int bytes = sqlite3_column_bytes(i->second.stmt(), col); -- E(value, origin::database, -- F("null result in query: %s") % query.sql_cmd); -- row.push_back(string(value, value + bytes)); -- //L(FL("row %d col %d value='%s'") % nrow % col % value); -+ if (value) { -+ row.push_back(string(value, value + bytes)); -+ } else { -+ // sqlite3_column_blob() returns null for zero-length -+ I(bytes == 0); -+ row.push_back(string()); -+ } - } - res.push_back(row); - } -============================================================ ---- tests/fail_cleanly_on_unreadable_db/__driver__.lua 1ec557d1aef9eac9ee53a22d07f4ba0f3456da5e -+++ tests/fail_cleanly_on_unreadable_db/__driver__.lua 8875c78a070bef87904bb840ed3cffa0acba4399 -@@ -48,7 +48,6 @@ check(mtn("--db=subdir/foo.db", "db", "v - check(mtn("--db=subdir/foo.db", "ls", "branches"), 0, false, false) - check(mtn("--db=subdir/foo.db", "db", "info"), 0, false, false) - check(mtn("--db=subdir/foo.db", "db", "version"), 0, false, false) --check(mtn("--db=subdir/foo.db", "db", "migrate"), 1, false, false) - check(mtn("--db=subdir/bar.db", "db", "load"), 1, false, false) - check(mtn("--db=subdir/baz.db", "db", "init"), 1, false, false) - check({"chmod", "a+w", "subdir"}) diff --git a/monotone.spec b/monotone.spec index ecc3be3..4711b50 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,37 +1,31 @@ -Name: monotone -Version: 0.48.1 -Release: 1%{?dist} - -Summary: A free, distributed version control system -Group: Development/Tools -License: GPLv2+ - -URL: http://monotone.ca/ -Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz -Source1: monotone.init -Source2: monotone.sysconfig -Source3: README.monotone-server -Patch0: monotone-sqlite-3.7.3.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: zlib-devel -BuildRequires: boost-devel >= 1.33.1 -BuildRequires: botan-devel >= 1.6.3 -BuildRequires: pcre-devel >= 7.4 -BuildRequires: sqlite-devel >= 3.3.8 -BuildRequires: lua-devel >= 5.1 -BuildRequires: libidn-devel - +Name: monotone +Version: 0.99 +Release: 1%{?dist} +Summary: A free, distributed version control system +Group: Development/Tools +License: GPLv2+ +URL: http://monotone.ca/ +Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz +Source1: monotone.init +Source2: monotone.sysconfig +Source3: README.monotone-server +Patch0: monotone-0.99-bug-100.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel +BuildRequires: boost-devel >= 1.33.1 +BuildRequires: botan-devel >= 1.6.3 +BuildRequires: pcre-devel >= 7.4 +BuildRequires: sqlite-devel >= 3.3.8 +BuildRequires: lua-devel >= 5.1 +BuildRequires: libidn-devel # The test suite needs cvs. -BuildRequires: cvs - +BuildRequires: cvs # We need Emacs to byte-compile the Emacs Lisp code. -BuildRequires: emacs - -Requires(post): /sbin/install-info +BuildRequires: emacs +Requires(post): /sbin/install-info Requires(preun): /sbin/install-info + %description monotone is a free, distributed version control system. It provides fully disconnected operation, manages complete @@ -41,6 +35,7 @@ metadata, exchanges work over plain network protocols, performs history-sensitive merging, and delegates trust functions to client-side RSA certificates. + %package server Summary: Standalone server setup for monotone Requires: monotone = %{version}-%{release} @@ -50,19 +45,23 @@ Requires(preun): initscripts, chkconfig Requires(postun): initscripts Group: Development/Tools + %description server This package provides an easy-to-use standalone server setup for monotone. + %package -n perl-Monotone Summary: Perl Module for monotone Requires: monotone = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Group: Development/Tools + %description -n perl-Monotone This is a simple Perl module to start a monotone automate sub-process and then pass commands to it. + %prep %setup -q %patch0 -p0 @@ -71,9 +70,11 @@ and then pass commands to it. %configure make %{?_smp_mflags} + %check make %{?_smp_mflags} check || { cat tester_dir/*.log; false; } + %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} @@ -84,56 +85,60 @@ mv %{buildroot}%{_datadir}/doc/%{name} _doc compldir=%{buildroot}%{_sysconfdir}/bash_completion.d mkdir -p ${compldir} -%{__install} -c -m 0444 contrib/monotone.bash_completion ${compldir} +install -c -m 0444 contrib/monotone.bash_completion ${compldir} lispdir=%{buildroot}%{_datadir}/emacs/site-lisp mkdir -p ${lispdir} -%{__install} -c -m 0444 contrib/monotone*.el ${lispdir} +install -c -m 0444 contrib/monotone*.el ${lispdir} emacs -batch -f batch-byte-compile ${lispdir} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server -%{__install} -D -m 0555 %{SOURCE1} \ +install -D -m 0555 %{SOURCE1} \ %{buildroot}%{_sysconfdir}/rc.d/init.d/monotone -%{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone -%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/monotone -%{__install} -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys -%{__install} -d -m 0770 %{buildroot}%{_localstatedir}/lib/monotone -%{__install} -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone +install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone +install -d -m 0755 %{buildroot}%{_sysconfdir}/monotone +install -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys +install -d -m 0770 %{buildroot}%{_localstatedir}/lib/monotone +install -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone # These do not actually wind up in the package, due to %%ghost. -%{__install} -c -m 0440 /dev/null \ +install -c -m 0440 /dev/null \ %{buildroot}%{_sysconfdir}/monotone/passphrase.lua -%{__install} -c -m 0640 /dev/null \ +install -c -m 0640 /dev/null \ %{buildroot}%{_sysconfdir}/monotone/read-permissions -%{__install} -c -m 0640 /dev/null \ +install -c -m 0640 /dev/null \ %{buildroot}%{_sysconfdir}/monotone/write-permissions -%{__install} -c -m 0644 /dev/null \ +install -c -m 0644 /dev/null \ %{buildroot}%{_sysconfdir}/monotone/monotonerc touch %{buildroot}%{_localstatedir}/lib/monotone/server.mtn cp %{SOURCE3} . -%{__install} -D -m 0644 -p contrib/Monotone.pm \ +install -D -m 0644 -p contrib/Monotone.pm \ %{buildroot}%{perl_vendorlib}/Monotone.pm + %clean rm -f README.monotone-server rm -rf %{buildroot} + %post if [ $1 -eq 1 ] then /sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : fi + %preun if [ $1 -eq 0 ] then /sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : fi + %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README README.changesets UPGRADE @@ -143,11 +148,14 @@ fi %{_infodir}/monotone.info* %{_datadir}/emacs/site-lisp/monotone*.el* %{_sysconfdir}/bash_completion.d +%{_mandir}/man1/*.1* + %files -n perl-Monotone %defattr(-,root,root,-) %{perl_vendorlib}/Monotone.pm + %files server %defattr(-,root,root,-) %doc README.monotone-server @@ -164,6 +172,7 @@ fi %dir %attr(0770,monotone,monotone) %{_localstatedir}/lib/monotone %attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/lib/monotone/server.mtn + %pre server # Add "monotone" user per http://fedoraproject.org/wiki/Packaging/UsersAndGroups getent group monotone > /dev/null || groupadd -r monotone @@ -172,16 +181,19 @@ useradd -r -g monotone -r -d %{_localstatedir}/lib/monotone -s /sbin/nologin \ -c "Monotone Netsync Server" monotone exit 0 + %post server # Register the monotone service /sbin/chkconfig --add monotone + %preun server if [ $1 = 0 ]; then /sbin/service monotone stop > /dev/null 2>&1 /sbin/chkconfig --del monotone fi + %postun if [ $1 -gt 1 ]; then # Restart the running server: updates its db format when needed. @@ -190,6 +202,13 @@ fi %changelog +* Fri Oct 29 2010 Thomas Moschny - 0.99-1 +- Update to 0.99. +- Remove patch already applied upstream. +- Add patch for monotone bug #100. +- Include the monotone manpage in the package. +- Specfile cleanups. + * Wed Oct 27 2010 Thomas Moschny - 0.48.1-1 - Update to 0.48.1. - Add patch from upstream to support newer sqlite. diff --git a/sources b/sources index e6505fd..262fcbd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b5fa9e3b02ca3dcaf58fb7a2519ef956 monotone-0.48.1.tar.gz +d9ff611f02b808bb746118ec06c02644 monotone-0.99.tar.gz From b5ccf08516d560fb95e4b7e7c1a2d625f2bb86c0 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sun, 31 Oct 2010 23:57:17 +0100 Subject: [PATCH 065/145] - Update to 0.99.1. - Remove patch already applied upstream. --- .gitignore | 1 + monotone-0.99-bug-100.patch | 11 ----------- monotone.spec | 8 +++++--- sources | 2 +- 4 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 monotone-0.99-bug-100.patch diff --git a/.gitignore b/.gitignore index 1f0c783..1174fc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ monotone-0.48.tar.gz /monotone-0.48.1.tar.gz /monotone-0.99.tar.gz +/monotone-0.99.1.tar.gz diff --git a/monotone-0.99-bug-100.patch b/monotone-0.99-bug-100.patch deleted file mode 100644 index 11aa9d9..0000000 --- a/monotone-0.99-bug-100.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- pcrewrap.cc 08ac10d9a75557faba316d1b0a242b8ed3cd4243 -+++ pcrewrap.cc 42611610af4de2f7d1da39bf5c023038b7590be7 -@@ -144,7 +144,7 @@ namespace pcre - // because pcre_exec might not signal trailing unmatched subpatterns - // i.e. if "abc" matches "(abc)(de)?", the match count is two, not - // the expected three -- size_t cap_count; -+ size_t cap_count = 0; - int rc = pcre_fullinfo(basedat, extradat, PCRE_INFO_CAPTURECOUNT, &cap_count); - I(rc == 0); - diff --git a/monotone.spec b/monotone.spec index 4711b50..36e344e 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,5 +1,5 @@ Name: monotone -Version: 0.99 +Version: 0.99.1 Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -9,7 +9,6 @@ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar. Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server -Patch0: monotone-0.99-bug-100.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 @@ -64,7 +63,6 @@ and then pass commands to it. %prep %setup -q -%patch0 -p0 %build %configure @@ -202,6 +200,10 @@ fi %changelog +* Sun Oct 31 2010 Thomas Moschny - 0.99.1-1 +- Update to 0.99.1. +- Remove patch already applied upstream. + * Fri Oct 29 2010 Thomas Moschny - 0.99-1 - Update to 0.99. - Remove patch already applied upstream. diff --git a/sources b/sources index 262fcbd..e9bf657 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d9ff611f02b808bb746118ec06c02644 monotone-0.99.tar.gz +61c586f340fa3ca2b0974f6b5c455b0e monotone-0.99.1.tar.gz From 8720a1b5b2dcfa3be0ab5d6a3f09e1c8efbfcce1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 14:46:23 -0600 Subject: [PATCH 066/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 36e344e..e9cdb53 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.99.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -200,6 +200,9 @@ fi %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 0.99.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sun Oct 31 2010 Thomas Moschny - 0.99.1-1 - Update to 0.99.1. - Remove patch already applied upstream. From 094c4fe324e7247883a93ea2ec9d6e0ad4472ea3 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 14 May 2011 15:18:30 +0200 Subject: [PATCH 067/145] Update to 1.0. - Upstream ships bzip2 archives now. - monotone.el is no longer shipped. - Bash completion is installed by 'make install'. - Add BR on bash-completion, needed for the testsuite. - Fix postun snippet for -server package. - On Fedora 15 and later, use the tmpfiles.d service to create the /var/run/monotone directory. - Add a patch to prevent a name clash with struct file_handle defined by fcntl.h in glibc 2.14. - Add a patch fixing broken helptexts and manpage. - Explicitly disable network access by the testsuite. - Fix some rpmlint warnings. --- .gitignore | 1 + monotone-1.0-file_handle.patch | 155 +++++++++++++++++++++++++++++++++ monotone-1.0-fix-help.patch | 21 +++++ monotone-server-tmpfiles.conf | 1 + monotone.spec | 91 ++++++++++++------- sources | 2 +- 6 files changed, 240 insertions(+), 31 deletions(-) create mode 100644 monotone-1.0-file_handle.patch create mode 100644 monotone-1.0-fix-help.patch create mode 100644 monotone-server-tmpfiles.conf diff --git a/.gitignore b/.gitignore index 1174fc6..86e8bd6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ monotone-0.48.tar.gz /monotone-0.48.1.tar.gz /monotone-0.99.tar.gz /monotone-0.99.1.tar.gz +/monotone-1.0.tar.bz2 diff --git a/monotone-1.0-file_handle.patch b/monotone-1.0-file_handle.patch new file mode 100644 index 0000000..f295f25 --- /dev/null +++ b/monotone-1.0-file_handle.patch @@ -0,0 +1,155 @@ +# +# +# patch "src/rcs_file.cc" +# from [885b3fbe7b6cfed78816f0e57cd71d44616213c6] +# to [03cf68912a4a708545ebce3d415c0e970ddead0b] +# +============================================================ +--- src/rcs_file.cc 885b3fbe7b6cfed78816f0e57cd71d44616213c6 ++++ src/rcs_file.cc 03cf68912a4a708545ebce3d415c0e970ddead0b +@@ -42,12 +42,12 @@ struct + + #ifdef HAVE_MMAP + struct +-file_handle ++rcs_file_handle + { + string const & filename; + off_t length; + int fd; +- file_handle(string const & fn) : ++ rcs_file_handle(string const & fn) : + filename(fn), + length(0), + fd(-1) +@@ -60,13 +60,13 @@ file_handle + if (fd == -1) + throw oops("open of " + filename + " failed"); + } +- ~file_handle() ++ ~rcs_file_handle() + { + if (close(fd) == -1) + throw oops("close of " + filename + " failed"); + } + }; +-struct file_source ++struct rcs_file_source + { + string const & filename; + int fd; +@@ -91,7 +91,7 @@ struct file_source + ++pos; + return good(); + } +- file_source(string const & fn, ++ rcs_file_source(string const & fn, + int f, + off_t len) : + filename(fn), +@@ -104,7 +104,7 @@ struct file_source + if (mapping == MAP_FAILED) + throw oops("mmap of " + filename + " failed"); + } +- ~file_source() ++ ~rcs_file_source() + { + if (munmap(mapping, length) == -1) + throw oops("munmapping " + filename + " failed, after reading RCS file"); +@@ -112,12 +112,12 @@ struct + }; + #elif defined(WIN32) + struct +-file_handle ++rcs_file_handle + { + string const & filename; + off_t length; + HANDLE fd; +- file_handle(string const & fn) : ++ rcs_file_handle(string const & fn) : + filename(fn), + length(0), + fd(NULL) +@@ -134,7 +134,7 @@ file_handle + if (fd == NULL) + throw oops("open of " + filename + " failed"); + } +- ~file_handle() ++ ~rcs_file_handle() + { + if (CloseHandle(fd)==0) + throw oops("close of " + filename + " failed"); +@@ -142,7 +142,7 @@ struct + }; + + struct +-file_source ++rcs_file_source + { + string const & filename; + HANDLE fd,map; +@@ -167,7 +167,7 @@ file_source + ++pos; + return good(); + } +- file_source(string const & fn, ++ rcs_file_source(string const & fn, + HANDLE f, + off_t len) : + filename(fn), +@@ -183,7 +183,7 @@ file_source + if (mapping==NULL) + throw oops("MapViewOfFile of " + filename + " failed"); + } +- ~file_source() ++ ~rcs_file_source() + { + if (UnmapViewOfFile(mapping)==0) + throw oops("UnmapViewOfFile of " + filename + " failed"); +@@ -193,7 +193,7 @@ file_source + }; + #else + // no mmap at all +-typedef istream file_source; ++typedef istream rcs_file_source; + #endif + + typedef enum +@@ -220,7 +220,7 @@ static token_type + } + + static token_type +-get_token(file_source & ist, ++get_token(rcs_file_source & ist, + string & str, + size_t & line, + size_t & col) +@@ -303,14 +303,14 @@ struct parser + + struct parser + { +- file_source & ist; ++ rcs_file_source & ist; + rcs_file & r; + string token; + token_type ttype; + + size_t line, col; + +- parser(file_source & s, ++ parser(rcs_file_source & s, + rcs_file & r) + : ist(s), r(r), line(1), col(1) + {} +@@ -489,8 +489,8 @@ parse_rcs_file(string const & filename, + parse_rcs_file(string const & filename, rcs_file & r) + { + #if defined(HAVE_MMAP) || defined(WIN32) +- file_handle handle(filename); +- file_source ifs(filename, handle.fd, handle.length); ++ rcs_file_handle handle(filename); ++ rcs_file_source ifs(filename, handle.fd, handle.length); + #else + ifstream ifs(filename.c_str()); + ifs.unsetf(ios_base::skipws); diff --git a/monotone-1.0-fix-help.patch b/monotone-1.0-fix-help.patch new file mode 100644 index 0000000..abbb024 --- /dev/null +++ b/monotone-1.0-fix-help.patch @@ -0,0 +1,21 @@ +# +# +# patch "src/options_list.hh" +# from [0462e302b89179f4acb28ecb91f4255140d4a4a7] +# to [27c44e89ebc9a828ac0a7b91505f997884646062] +# +============================================================ +--- src/options_list.hh 0462e302b89179f4acb28ecb91f4255140d4a4a7 ++++ src/options_list.hh 27c44e89ebc9a828ac0a7b91505f997884646062 +@@ -381,9 +381,9 @@ SIMPLE_OPTION(move_conflicting_paths, + SIMPLE_OPTION(move_conflicting_paths, + "move-conflicting-paths/no-move-conflicting-paths", + bool, +- (F("move conflicting, unversioned paths into '%s' " ++ strdup((F("move conflicting, unversioned paths into '%s' " + "before proceeding with any workspace change") % +- bookkeeping_resolutions_dir).str().c_str()) ++ bookkeeping_resolutions_dir).str().c_str())) + + OPTSET_REL(globals, ssh_sign) + SIMPLE_INITIALIZED_OPTION(ssh_sign, "ssh-sign", enum_string, "yes,no,only,check", diff --git a/monotone-server-tmpfiles.conf b/monotone-server-tmpfiles.conf new file mode 100644 index 0000000..ab4cc78 --- /dev/null +++ b/monotone-server-tmpfiles.conf @@ -0,0 +1 @@ +D /var/run/monotone 0755 monotone monotone - diff --git a/monotone.spec b/monotone.spec index e9cdb53..64fcfa0 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,14 +1,19 @@ Name: monotone -Version: 0.99.1 -Release: 2%{?dist} +Version: 1.0 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ URL: http://monotone.ca/ -Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.gz +Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.bz2 Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server +Source4: monotone-server-tmpfiles.conf +# rev da62cad1 from upstream +Patch0: monotone-1.0-file_handle.patch +# rev a570769b from upstream +Patch1: monotone-1.0-fix-help.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 @@ -17,13 +22,14 @@ BuildRequires: pcre-devel >= 7.4 BuildRequires: sqlite-devel >= 3.3.8 BuildRequires: lua-devel >= 5.1 BuildRequires: libidn-devel -# The test suite needs cvs. +# Required by the test suite: BuildRequires: cvs -# We need Emacs to byte-compile the Emacs Lisp code. -BuildRequires: emacs +BuildRequires: bash-completion Requires(post): /sbin/install-info Requires(preun): /sbin/install-info +# Filter unwanted dependencies +%{?perl_default_filter} %description monotone is a free, distributed version control system. @@ -63,14 +69,19 @@ and then pass commands to it. %prep %setup -q +%patch0 -p0 +%patch1 -p0 + %build +export LC_MESSAGES=en_US %configure make %{?_smp_mflags} %check -make %{?_smp_mflags} check || { cat tester_dir/*.log; false; } +export DISABLE_NETWORK_TESTS=1 +make %{?_smp_mflags} check || { head -n-0 test/work/*.log; false; } %install @@ -81,38 +92,35 @@ mv %{buildroot}%{_datadir}/doc/%{name} _doc %find_lang %{name} -compldir=%{buildroot}%{_sysconfdir}/bash_completion.d -mkdir -p ${compldir} -install -c -m 0444 contrib/monotone.bash_completion ${compldir} - -lispdir=%{buildroot}%{_datadir}/emacs/site-lisp -mkdir -p ${lispdir} -install -c -m 0444 contrib/monotone*.el ${lispdir} -emacs -batch -f batch-byte-compile ${lispdir} - mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server -install -D -m 0555 %{SOURCE1} \ +ln -snf mtn.1 %{buildroot}%{_mandir}/man1/monotone-server.1 +install -D -m 0755 -p %{SOURCE1} \ %{buildroot}%{_sysconfdir}/rc.d/init.d/monotone -install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone +install -D -m 0644 -p %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone install -d -m 0755 %{buildroot}%{_sysconfdir}/monotone install -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys install -d -m 0770 %{buildroot}%{_localstatedir}/lib/monotone install -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone +%if 0%{?fedora} >= 15 +install -D -m 0644 %{SOURCE4} \ + %{buildroot}%{_sysconfdir}/tmpfiles.d/monotone.conf +%endif # These do not actually wind up in the package, due to %%ghost. -install -c -m 0440 /dev/null \ +install -m 0440 /dev/null \ %{buildroot}%{_sysconfdir}/monotone/passphrase.lua -install -c -m 0640 /dev/null \ +install -m 0640 /dev/null \ %{buildroot}%{_sysconfdir}/monotone/read-permissions -install -c -m 0640 /dev/null \ +install -m 0640 /dev/null \ %{buildroot}%{_sysconfdir}/monotone/write-permissions -install -c -m 0644 /dev/null \ +install -m 0644 /dev/null \ %{buildroot}%{_sysconfdir}/monotone/monotonerc -touch %{buildroot}%{_localstatedir}/lib/monotone/server.mtn +install -m 0640 /dev/null \ + %{buildroot}%{_localstatedir}/lib/monotone/server.mtn -cp %{SOURCE3} . +install -m 0644 -p %{SOURCE3} . install -D -m 0644 -p contrib/Monotone.pm \ %{buildroot}%{perl_vendorlib}/Monotone.pm @@ -139,14 +147,17 @@ fi %files -f %{name}.lang %defattr(-,root,root,-) -%doc AUTHORS COPYING ChangeLog INSTALL NEWS README README.changesets UPGRADE +%doc AUTHORS COPYING NEWS README UPGRADE %doc _doc/* %{_bindir}/mtn %{_bindir}/mtnopt +%{_bindir}/mtn-cleanup %{_infodir}/monotone.info* -%{_datadir}/emacs/site-lisp/monotone*.el* %{_sysconfdir}/bash_completion.d -%{_mandir}/man1/*.1* +%{_mandir}/man1/mtn.1* +%{_mandir}/man1/mtnopt.1* +%{_mandir}/man1/mtn-cleanup.1* +%{_datadir}/monotone %files -n perl-Monotone @@ -158,8 +169,13 @@ fi %defattr(-,root,root,-) %doc README.monotone-server %{_sbindir}/monotone-server +%{_mandir}/man1/monotone-server.1* %{_sysconfdir}/rc.d/init.d/monotone %dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone +%if 0%{?fedora} >= 15 +# https://fedoraproject.org/wiki/Packaging:Tmpfiles.d +%config(noreplace) %{_sysconfdir}/tmpfiles.d/monotone.conf +%endif %config(noreplace) %{_sysconfdir}/sysconfig/monotone %dir %attr(0755,root,monotone) %{_sysconfdir}/monotone %dir %attr(0750,root,monotone) %{_sysconfdir}/monotone/private-keys @@ -186,20 +202,35 @@ exit 0 %preun server -if [ $1 = 0 ]; then +if [ $1 -eq 0 ]; then /sbin/service monotone stop > /dev/null 2>&1 /sbin/chkconfig --del monotone fi -%postun -if [ $1 -gt 1 ]; then +%postun server +if [ $1 -ge 1 ]; then # Restart the running server: updates its db format when needed. /sbin/service monotone condrestart > /dev/null 2>&1 || : fi %changelog +* Sat May 14 2011 Thomas Moschny - 1.0-1 +- Update to 1.0. + - Upstream ships bzip2 archives now. + - monotone.el is no longer shipped. + - Bash completion is installed by 'make install'. + - Add BR on bash-completion, needed for the testsuite. +- Fix postun snippet for -server package. +- On Fedora 15 and later, use the tmpfiles.d service to create the + /var/run/monotone directory. +- Add a patch to prevent a name clash with struct file_handle defined + by fcntl.h in glibc 2.14. +- Add a patch fixing broken helptexts and manpage. +- Explicitly disable network access by the testsuite. +- Fix some rpmlint warnings. + * Tue Feb 08 2011 Fedora Release Engineering - 0.99.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index e9bf657..b9eb4ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -61c586f340fa3ca2b0974f6b5c455b0e monotone-0.99.1.tar.gz +6a0b5d8560f08d76a950172f9ed0feff monotone-1.0.tar.bz2 From 3f8bf5295f6be169699d3b1d23afb4d84f0d5347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Thu, 9 Jun 2011 17:08:50 +0200 Subject: [PATCH 068/145] Perl 5.14 mass rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 64fcfa0..9d0712f 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ fi %changelog +* Thu Jun 09 2011 Marcela Mašláňová - 1.0-2 +- Perl 5.14 mass rebuild + * Sat May 14 2011 Thomas Moschny - 1.0-1 - Update to 1.0. - Upstream ships bzip2 archives now. From 2e083aa8dc3ace573945c2387bf1853f9908f98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Mon, 20 Jun 2011 17:43:50 +0200 Subject: [PATCH 069/145] Perl mass rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 9d0712f..fea9d47 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ fi %changelog +* Mon Jun 20 2011 Marcela Mašláňová - 1.0-3 +- Perl mass rebuild + * Thu Jun 09 2011 Marcela Mašláňová - 1.0-2 - Perl 5.14 mass rebuild From 70a224e841867905823885788b2d96dff49ac5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 26 Sep 2011 18:15:04 +0200 Subject: [PATCH 070/145] fix FTBFS due a symbol conflict with boost --- monotone-1.0-disable-xdelta-test.patch | 41 ++++++++++++++++++++++++++ monotone.spec | 9 +++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 monotone-1.0-disable-xdelta-test.patch diff --git a/monotone-1.0-disable-xdelta-test.patch b/monotone-1.0-disable-xdelta-test.patch new file mode 100644 index 0000000..e4b3b64 --- /dev/null +++ b/monotone-1.0-disable-xdelta-test.patch @@ -0,0 +1,41 @@ +diff -up monotone-1.0/Makefile.am.orig monotone-1.0/Makefile.am +--- monotone-1.0/Makefile.am.orig 2011-09-26 17:57:52.000000000 +0200 ++++ monotone-1.0/Makefile.am 2011-09-26 17:58:13.000000000 +0200 +@@ -191,7 +191,7 @@ UNIT_TESTERS = \ + test/unit/tests/restrictions.cc test/unit/tests/revision.cc \ + test/unit/tests/simplestring_xform.cc test/unit/tests/transforms.cc \ + test/unit/tests/uri.cc test/unit/tests/vocab.cc \ +- test/unit/tests/xdelta.cc test/unit/tests/numeric_vocab.cc \ ++ test/unit/tests/numeric_vocab.cc \ + test/unit/tests/sha1.cc test/unit/tests/string_queue.cc \ + test/unit/unit_tester.cc + +diff -up monotone-1.0/Makefile.in.orig monotone-1.0/Makefile.in +--- monotone-1.0/Makefile.in.orig 2011-09-26 17:57:58.000000000 +0200 ++++ monotone-1.0/Makefile.in 2011-09-26 17:59:19.000000000 +0200 +@@ -422,7 +422,6 @@ am__objects_19 = test/unit/tests/basic_i + test/unit/tests/simplestring_xform.$(OBJEXT) \ + test/unit/tests/transforms.$(OBJEXT) \ + test/unit/tests/uri.$(OBJEXT) test/unit/tests/vocab.$(OBJEXT) \ +- test/unit/tests/xdelta.$(OBJEXT) \ + test/unit/tests/numeric_vocab.$(OBJEXT) \ + test/unit/tests/sha1.$(OBJEXT) \ + test/unit/tests/string_queue.$(OBJEXT) \ +@@ -887,7 +886,7 @@ UNIT_TESTERS = \ + test/unit/tests/restrictions.cc test/unit/tests/revision.cc \ + test/unit/tests/simplestring_xform.cc test/unit/tests/transforms.cc \ + test/unit/tests/uri.cc test/unit/tests/vocab.cc \ +- test/unit/tests/xdelta.cc test/unit/tests/numeric_vocab.cc \ ++ test/unit/tests/numeric_vocab.cc \ + test/unit/tests/sha1.cc test/unit/tests/string_queue.cc \ + test/unit/unit_tester.cc + +@@ -1774,8 +1773,6 @@ test/unit/tests/uri.$(OBJEXT): test/unit + test/unit/tests/$(DEPDIR)/$(am__dirstamp) + test/unit/tests/vocab.$(OBJEXT): test/unit/tests/$(am__dirstamp) \ + test/unit/tests/$(DEPDIR)/$(am__dirstamp) +-test/unit/tests/xdelta.$(OBJEXT): test/unit/tests/$(am__dirstamp) \ +- test/unit/tests/$(DEPDIR)/$(am__dirstamp) + test/unit/tests/numeric_vocab.$(OBJEXT): \ + test/unit/tests/$(am__dirstamp) \ + test/unit/tests/$(DEPDIR)/$(am__dirstamp) diff --git a/monotone.spec b/monotone.spec index fea9d47..c9068eb 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -14,6 +14,9 @@ Source4: monotone-server-tmpfiles.conf Patch0: monotone-1.0-file_handle.patch # rev a570769b from upstream Patch1: monotone-1.0-fix-help.patch +# FTBFS (symbol conflict with boost) +# https://code.monotone.ca/p/monotone/issues/191/ +Patch2: monotone-1.0-disable-xdelta-test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 @@ -71,6 +74,7 @@ and then pass commands to it. %setup -q %patch0 -p0 %patch1 -p0 +%patch2 -p1 %build @@ -216,6 +220,9 @@ fi %changelog +* Mon Sep 26 2011 Dan Horák - 1.0-4 +- fix FTBFS due a symbol conflict with boost + * Mon Jun 20 2011 Marcela Mašláňová - 1.0-3 - Perl mass rebuild From 0e74ded29d76366cf695983abee1ea3122499833 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 04:25:34 -0600 Subject: [PATCH 071/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index c9068eb..5ba2b7d 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -220,6 +220,9 @@ fi %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 1.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Mon Sep 26 2011 Dan Horák - 1.0-4 - fix FTBFS due a symbol conflict with boost From 7dac4470139e1f1012a75a717c2dfcb527354189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 10 Feb 2012 11:23:26 +0100 Subject: [PATCH 072/145] Rebuild against PCRE 8.30 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 5ba2b7d..0094588 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -220,6 +220,9 @@ fi %changelog +* Fri Feb 10 2012 Petr Pisar - 1.0-6 +- Rebuild against PCRE 8.30 + * Fri Jan 13 2012 Fedora Release Engineering - 1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 295457e2f0e25ef2b79965307a1556c638af5d5d Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Thu, 16 Feb 2012 10:11:31 +0100 Subject: [PATCH 073/145] Add patch to fix building with newer pcre. --- monotone-1.0-pcre.patch | 11 +++++++++++ monotone.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 monotone-1.0-pcre.patch diff --git a/monotone-1.0-pcre.patch b/monotone-1.0-pcre.patch new file mode 100644 index 0000000..9abd4ac --- /dev/null +++ b/monotone-1.0-pcre.patch @@ -0,0 +1,11 @@ +diff -up monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore.orig monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore +--- monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore.orig 2011-03-26 07:41:05.000000000 +0100 ++++ monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore 2012-02-15 19:40:06.282866594 +0100 +@@ -21,7 +21,6 @@ abc\3 + [[:fnord:]] + \\x{123456} + (?(0)) +-(?<=\C) + \l + (?C256) + (?C1 diff --git a/monotone.spec b/monotone.spec index 0094588..208613b 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -17,6 +17,8 @@ Patch1: monotone-1.0-fix-help.patch # FTBFS (symbol conflict with boost) # https://code.monotone.ca/p/monotone/issues/191/ Patch2: monotone-1.0-disable-xdelta-test.patch +# Fix a failing test with pcre >= 8.21 +Patch3: monotone-1.0-pcre.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 @@ -75,6 +77,7 @@ and then pass commands to it. %patch0 -p0 %patch1 -p0 %patch2 -p1 +%patch3 -p1 %build @@ -220,6 +223,9 @@ fi %changelog +* Thu Feb 16 2012 Thomas Moschny - 1.0-7 +- Add patch to fix building with newer pcre. + * Fri Feb 10 2012 Petr Pisar - 1.0-6 - Rebuild against PCRE 8.30 From 526f23c3d68a3df84426c4934b39a74df53b5dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 8 Jun 2012 12:26:43 +0200 Subject: [PATCH 074/145] Perl 5.16 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 208613b..a31c52c 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -223,6 +223,9 @@ fi %changelog +* Fri Jun 08 2012 Petr Pisar - 1.0-8 +- Perl 5.16 rebuild + * Thu Feb 16 2012 Thomas Moschny - 1.0-7 - Add patch to fix building with newer pcre. From 0e2e8a1370055e0f8ab55dfab750239066b5209f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 21:47:50 -0500 Subject: [PATCH 075/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index a31c52c..b612a7c 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -223,6 +223,9 @@ fi %changelog +* Fri Jul 20 2012 Fedora Release Engineering - 1.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Jun 08 2012 Petr Pisar - 1.0-8 - Perl 5.16 rebuild From 9cf08f27c4b180b8263578d7fb00f948c846855f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 01:29:45 -0600 Subject: [PATCH 076/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index b612a7c..da1a587 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -223,6 +223,9 @@ fi %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 1.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Fri Jul 20 2012 Fedora Release Engineering - 1.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 8a72001ce848c0724cc28a3e5d2641cf5adf88c0 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sun, 10 Mar 2013 18:41:20 +0100 Subject: [PATCH 077/145] Fix building against Boost 1.53 (FTBFS bug rhbz#914191). - Fix failing bash completion test. - Add patch to temporarily disable a failing check in one test (rhbz#919827). --- monotone-1.0-fix-bash_completion-test.patch | 24 +++++++++++++++++++++ monotone-1.0-fix-diff_patch_drop-test.patch | 11 ++++++++++ monotone.spec | 18 +++++++++++++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 monotone-1.0-fix-bash_completion-test.patch create mode 100644 monotone-1.0-fix-diff_patch_drop-test.patch diff --git a/monotone-1.0-fix-bash_completion-test.patch b/monotone-1.0-fix-bash_completion-test.patch new file mode 100644 index 0000000..e6e74be --- /dev/null +++ b/monotone-1.0-fix-bash_completion-test.patch @@ -0,0 +1,24 @@ +diff -up monotone-1.0/test/extra/bash_completion/bashrc.orig monotone-1.0/test/extra/bash_completion/bashrc +--- monotone-1.0/test/extra/bash_completion/bashrc.orig 2011-03-26 07:41:02.000000000 +0100 ++++ monotone-1.0/test/extra/bash_completion/bashrc 2013-03-09 18:44:36.811369952 +0100 +@@ -18,6 +18,8 @@ if [ "$BASH_COMPLETION" = "" ]; then + . /etc/bash_completion + elif [ -f /usr/local/etc/bash_completion ]; then + . /usr/local/etc/bash_completion ++ elif [ -f /usr/share/bash-completion/bash_completion ] ; then ++ . /usr/share/bash-completion/bash_completion + else + echo No bash completion package present. + exit +diff -up monotone-1.0/test/extra/bash_completion/library.exp.orig monotone-1.0/test/extra/bash_completion/library.exp +--- monotone-1.0/test/extra/bash_completion/library.exp.orig 2011-03-26 07:41:02.000000000 +0100 ++++ monotone-1.0/test/extra/bash_completion/library.exp 2013-03-09 18:42:07.087240069 +0100 +@@ -16,7 +16,7 @@ set timeout 2 + set env(initial_dir) $initial_dir + set env(srcdir) $srcdir + # some user's ~/.bash_profile start xserver etc; don't do that +-spawn "bash" "--init-file" "/dev/nul" "--rcfile" "$srcdir/extra/bash_completion/bashrc" ++spawn "bash" "--init-file" "/dev/null" "--rcfile" "$srcdir/extra/bash_completion/bashrc" + # If there is no completion package, it's no point trying this. + # Make sure we do get a prompt. + expect { diff --git a/monotone-1.0-fix-diff_patch_drop-test.patch b/monotone-1.0-fix-diff_patch_drop-test.patch new file mode 100644 index 0000000..8940cde --- /dev/null +++ b/monotone-1.0-fix-diff_patch_drop-test.patch @@ -0,0 +1,11 @@ +diff -up monotone-1.0/test/func/diff_patch_drop/__driver__.lua.orig monotone-1.0/test/func/diff_patch_drop/__driver__.lua +--- monotone-1.0/test/func/diff_patch_drop/__driver__.lua.orig 2011-03-26 07:41:04.000000000 +0100 ++++ monotone-1.0/test/func/diff_patch_drop/__driver__.lua 2013-03-10 16:17:05.508555733 +0100 +@@ -36,5 +36,6 @@ else + -- but it is a little aggressive and removes the dir too! + check({"patch", "-p0"}, 0, false, false, true) + check(not exists("dir/file")) +- check(not exists("dir")) ++ -- patch 2.7.1 does not remove the dir ++ -- check(not exists("dir")) + end diff --git a/monotone.spec b/monotone.spec index da1a587..e49562a 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -19,6 +19,10 @@ Patch1: monotone-1.0-fix-help.patch Patch2: monotone-1.0-disable-xdelta-test.patch # Fix a failing test with pcre >= 8.21 Patch3: monotone-1.0-pcre.patch +# Fix failing bash completion test +Patch4: monotone-1.0-fix-bash_completion-test.patch +# See rhbz#919827 +Patch5: monotone-1.0-fix-diff_patch_drop-test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 @@ -30,6 +34,7 @@ BuildRequires: libidn-devel # Required by the test suite: BuildRequires: cvs BuildRequires: bash-completion +BuildRequires: expect Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -78,6 +83,12 @@ and then pass commands to it. %patch1 -p0 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +# fix FTBFS rhbz#914191 +sed -e "s|shared_dynamic_cast|dynamic_pointer_cast|g" \ + -i src/key_store.cc src/ssh_agent.cc src/database.cc %build @@ -223,6 +234,11 @@ fi %changelog +* Sat Mar 9 2013 Thomas Moschny - 1.0-11 +- Fix building against Boost 1.53 (FTBFS bug rhbz#914191). +- Fix failing bash completion test. +- Add patch to temporarily disable a failing check in one test (rhbz#919827). + * Thu Feb 14 2013 Fedora Release Engineering - 1.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 66a6f65f55de519a983dff0c363ff553a3b2653d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 17 Jul 2013 11:32:21 +0200 Subject: [PATCH 078/145] Perl 5.18 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index e49562a..9491e38 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -234,6 +234,9 @@ fi %changelog +* Wed Jul 17 2013 Petr Pisar - 1.0-12 +- Perl 5.18 rebuild + * Sat Mar 9 2013 Thomas Moschny - 1.0-11 - Fix building against Boost 1.53 (FTBFS bug rhbz#914191). - Fix failing bash completion test. From 90794ef20c868255199e7ebaeb1d108e6b3bc864 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 30 Jul 2013 14:27:19 +0200 Subject: [PATCH 079/145] Rebuild for boost 1.54.0 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 9491e38..c328dac 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -234,6 +234,9 @@ fi %changelog +* Tue Jul 30 2013 Petr Machata - 1.0-13 +- Rebuild for boost 1.54.0 + * Wed Jul 17 2013 Petr Pisar - 1.0-12 - Perl 5.18 rebuild From 540fbaad4ac06d0aa8a394a0ec36f7cd4e1720b0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 06:47:04 -0500 Subject: [PATCH 080/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index c328dac..2696f24 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 13%{?dist} +Release: 14%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -234,6 +234,9 @@ fi %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 1.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Tue Jul 30 2013 Petr Machata - 1.0-13 - Rebuild for boost 1.54.0 From 5235e919579bd021c86bc7dd1f6b208e7033db7c Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Tue, 8 Oct 2013 21:44:31 +0200 Subject: [PATCH 081/145] Add patches for building with Botan 1.10, Lua 5.2, and Texinfo >= 5.0. --- monotone-1.0-botan-1.10.patch | 944 +++++++++++++++++++++++++++++++++ monotone-1.0-fix-texinfo.patch | 623 ++++++++++++++++++++++ monotone-1.0-lua-5.2.patch | 752 ++++++++++++++++++++++++++ monotone.spec | 18 +- 4 files changed, 2336 insertions(+), 1 deletion(-) create mode 100644 monotone-1.0-botan-1.10.patch create mode 100644 monotone-1.0-fix-texinfo.patch create mode 100644 monotone-1.0-lua-5.2.patch diff --git a/monotone-1.0-botan-1.10.patch b/monotone-1.0-botan-1.10.patch new file mode 100644 index 0000000..0da8f2f --- /dev/null +++ b/monotone-1.0-botan-1.10.patch @@ -0,0 +1,944 @@ +From: Thomas Moschny +Subject: [PATCH] t/botan-1.10 + +Botan 1.10 support. + +Apply patches from these upstream commits: + +f4feb3fdc68e4f955909450b2dcb3ff9312dbc9e +9ff6e41adc6f40ae054fb4487f356bf69324dbdb +8861f8555ef90a04a99404e9f8d5510b2ddb10e6 + +--- + src/database.cc | 42 ++++++++++++------ + src/gzip.cc | 48 +++++++++++++------- + src/gzip.hh | 17 ++++++- + src/key_packet.cc | 4 +- + src/key_store.cc | 129 +++++++++++++++++++++++++++++++++++++++++++++--------- + src/monotone.cc | 56 +++++++++++++++++------- + src/packet.cc | 22 ++++++++-- + src/packet.hh | 19 ++++++++ + src/sha1.cc | 5 ++- + src/ssh_agent.cc | 6 +-- + src/transforms.cc | 15 ++++--- + 11 files changed, 279 insertions(+), 84 deletions(-) + +diff --git a/src/database.cc b/src/database.cc +index 520fddd..c18517c 100644 +--- a/src/database.cc ++++ b/src/database.cc +@@ -98,12 +98,15 @@ using boost::get; + using boost::tuple; + using boost::lexical_cast; + ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,5) ++using Botan::PK_Encryptor_EME; ++#else + using Botan::PK_Encryptor; ++#endif + using Botan::PK_Verifier; + using Botan::SecureVector; + using Botan::X509_PublicKey; + using Botan::RSA_PublicKey; +-using Botan::get_pk_encryptor; + + int const one_row = 1; + int const one_col = 1; +@@ -3425,9 +3428,8 @@ database::encrypt_rsa(key_id const & pub_id, + rsa_pub_key pub; + get_key(pub_id, pub); + +- SecureVector pub_block; +- pub_block.set(reinterpret_cast(pub().data()), +- pub().size()); ++ SecureVector pub_block ++ (reinterpret_cast(pub().data()), pub().size()); + + shared_ptr x509_key(Botan::X509::load_key(pub_block)); + shared_ptr pub_key +@@ -3436,23 +3438,32 @@ database::encrypt_rsa(key_id const & pub_id, + throw recoverable_failure(origin::system, + "Failed to get RSA encrypting key"); + ++ SecureVector ct; ++ ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,5) ++ PK_Encryptor_EME encryptor(*pub_key, "EME1(SHA-1)"); ++ ct = encryptor.encrypt( ++ reinterpret_cast(plaintext.data()), ++ plaintext.size(), lazy_rng::get()); ++#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) + shared_ptr + encryptor(get_pk_encryptor(*pub_key, "EME1(SHA-1)")); + +- SecureVector ct; +- +-#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) + ct = encryptor->encrypt( + reinterpret_cast(plaintext.data()), + plaintext.size(), lazy_rng::get()); + #else ++ shared_ptr ++ encryptor(Botan::get_pk_encryptor(*pub_key, "EME1(SHA-1)")); ++ + ct = encryptor->encrypt( + reinterpret_cast(plaintext.data()), + plaintext.size()); + #endif +- ciphertext = rsa_oaep_sha_data(string(reinterpret_cast(ct.begin()), +- ct.size()), +- origin::database); ++ ++ ciphertext = rsa_oaep_sha_data( ++ string(reinterpret_cast(ct.begin()), ct.size()), ++ origin::database); + } + + cert_status +@@ -3471,14 +3482,13 @@ database::check_signature(key_id const & id, + else + { + rsa_pub_key pub; +- SecureVector pub_block; + + if (!public_key_exists(id)) + return cert_unknown; + + get_key(id, pub); +- pub_block.set(reinterpret_cast(pub().data()), +- pub().size()); ++ SecureVector pub_block ++ (reinterpret_cast(pub().data()), pub().size()); + + L(FL("building verifier for %d-byte pub key") % pub_block.size()); + shared_ptr x509_key(Botan::X509::load_key(pub_block)); +@@ -3488,7 +3498,11 @@ database::check_signature(key_id const & id, + E(pub_key, id.inner().made_from, + F("Failed to get RSA verifying key for %s") % id); + +- verifier.reset(get_pk_verifier(*pub_key, "EMSA3(SHA-1)")); ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ verifier.reset(new Botan::PK_Verifier(*pub_key, "EMSA3(SHA1)")); ++#else ++ verifier.reset(Botan::get_pk_verifier(*pub_key, "EMSA3(SHA-1)")); ++#endif + + /* XXX This is ugly. We need to keep the key around + * as long as the verifier is around, but the shared_ptr will go +diff --git a/src/gzip.cc b/src/gzip.cc +index b74af6d..2cfea09 100644 +--- a/src/gzip.cc ++++ b/src/gzip.cc +@@ -110,7 +110,7 @@ Gzip_Compression::Gzip_Compression(u32bit l) : + if(deflateInit2(&(zlib->stream), level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY) != Z_OK) + { + delete zlib; zlib = 0; +- throw Exception("Gzip_Compression: Memory allocation error"); ++ throw Memory_Exhaustion(); + } + } + +@@ -137,7 +137,7 @@ void Gzip_Compression::start_msg() + /************************************************* + * Compress Input with Gzip * + *************************************************/ +-void Gzip_Compression::write(const byte input[], u32bit length) ++void Gzip_Compression::write(const byte input[], filter_length_t length) + { + + count += length; +@@ -152,7 +152,7 @@ void Gzip_Compression::write(const byte input[], u32bit length) + zlib->stream.avail_out = buffer.size(); + int rc = deflate(&(zlib->stream), Z_NO_FLUSH); + if (rc != Z_OK && rc != Z_STREAM_END) +- throw Exception("Internal error in Gzip_Compression deflate."); ++ throw Invalid_State("Internal error in Gzip_Compression deflate."); + send(buffer.begin(), buffer.size() - zlib->stream.avail_out); + } + } +@@ -172,7 +172,7 @@ void Gzip_Compression::end_msg() + zlib->stream.avail_out = buffer.size(); + rc = deflate(&(zlib->stream), Z_FINISH); + if (rc != Z_OK && rc != Z_STREAM_END) +- throw Exception("Internal error in Gzip_Compression finishing deflate."); ++ throw Invalid_State("Internal error in Gzip_Compression finishing deflate."); + send(buffer.begin(), buffer.size() - zlib->stream.avail_out); + } + +@@ -228,7 +228,7 @@ Gzip_Decompression::Gzip_Decompression() : buffer(DEFAULT_BUFFERSIZE), + no_writes(true), pipe(new Hash_Filter("CRC32")), footer(0) + { + if (DEFAULT_BUFFERSIZE < sizeof(GZIP::GZIP_HEADER)) +- throw Exception("DEFAULT_BUFFERSIZE is too small"); ++ throw Decoding_Error("DEFAULT_BUFFERSIZE is too small"); + + zlib = new Zlib_Stream; + +@@ -237,7 +237,7 @@ Gzip_Decompression::Gzip_Decompression() : buffer(DEFAULT_BUFFERSIZE), + if(inflateInit2(&(zlib->stream), -15) != Z_OK) + { + delete zlib; zlib = 0; +- throw Exception("Gzip_Decompression: Memory allocation error"); ++ throw Memory_Exhaustion(); + } + } + +@@ -256,7 +256,7 @@ Gzip_Decompression::~Gzip_Decompression() + void Gzip_Decompression::start_msg() + { + if (!no_writes) +- throw Exception("Gzip_Decompression: start_msg after already writing"); ++ throw Decoding_Error("Gzip_Decompression: start_msg after already writing"); + + pipe.start_msg(); + datacount = 0; +@@ -267,7 +267,7 @@ void Gzip_Decompression::start_msg() + /************************************************* + * Decompress Input with Gzip * + *************************************************/ +-void Gzip_Decompression::write(const byte input[], u32bit length) ++void Gzip_Decompression::write(const byte input[], filter_length_t length) + { + if(length) no_writes = false; + +@@ -277,15 +277,16 @@ void Gzip_Decompression::write(const byte input[], u32bit length) + u32bit eat_len = eat_footer(input, length); + input += eat_len; + length -= eat_len; +- if (length == 0) +- return; + } + ++ if (length == 0) ++ return; ++ + // Check the gzip header + if (pos < sizeof(GZIP::GZIP_HEADER)) + { +- u32bit len = std::min((u32bit)sizeof(GZIP::GZIP_HEADER)-pos, length); +- u32bit cmplen = len; ++ filter_length_t len = std::min((filter_length_t)sizeof(GZIP::GZIP_HEADER)-pos, length); ++ filter_length_t cmplen = len; + // The last byte is the OS flag - we don't care about that + if (pos + len - 1 >= GZIP::HEADER_POS_OS) + cmplen--; +@@ -317,8 +318,8 @@ void Gzip_Decompression::write(const byte input[], u32bit length) + if(rc == Z_NEED_DICT) + throw Decoding_Error("Gzip_Decompression: Need preset dictionary"); + if(rc == Z_MEM_ERROR) +- throw Exception("Gzip_Decompression: Memory allocation error"); +- throw Exception("Gzip_Decompression: Unknown decompress error"); ++ throw Memory_Exhaustion(); ++ throw Decoding_Error("Gzip_Decompression: Unknown decompress error"); + } + send(buffer.begin(), buffer.size() - zlib->stream.avail_out); + pipe.write(buffer.begin(), buffer.size() - zlib->stream.avail_out); +@@ -346,8 +347,14 @@ u32bit Gzip_Decompression::eat_footer(const byte input[], u32bit length) + if (footer.size() >= GZIP::FOOTER_LENGTH) + throw Decoding_Error("Gzip_Decompression: Data integrity error in footer"); + ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++ size_t eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(), ++ static_cast(length)); ++ footer += std::make_pair(input, eat_len); ++#else + u32bit eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(), length); + footer.append(input, eat_len); ++#endif + + if (footer.size() == GZIP::FOOTER_LENGTH) + { +@@ -364,7 +371,7 @@ u32bit Gzip_Decompression::eat_footer(const byte input[], u32bit length) + void Gzip_Decompression::check_footer() + { + if (footer.size() != GZIP::FOOTER_LENGTH) +- throw Exception("Gzip_Decompression: Error finalizing decompression"); ++ throw Decoding_Error("Gzip_Decompression: Error finalizing decompression"); + + pipe.end_msg(); + +@@ -377,7 +384,12 @@ void Gzip_Decompression::check_footer() + for (int i = 0; i < 4; i++) + buf[3-i] = tmpbuf[i]; + ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++ tmpbuf.resize(4); ++ tmpbuf.copy(footer.begin(), 4); ++#else + tmpbuf.set(footer.begin(), 4); ++#endif + if (buf != tmpbuf) + throw Decoding_Error("Gzip_Decompression: Data integrity error - CRC32 error"); + +@@ -400,7 +412,7 @@ void Gzip_Decompression::end_msg() + // read, clear() will reset no_writes + if(no_writes) return; + +- throw Exception("Gzip_Decompression: didn't find footer"); ++ throw Decoding_Error("Gzip_Decompression: didn't find footer"); + + } + +@@ -412,7 +424,11 @@ void Gzip_Decompression::clear() + no_writes = true; + inflateReset(&(zlib->stream)); + ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++ footer.clear(); ++#else + footer.destroy(); ++#endif + pos = 0; + datacount = 0; + } +diff --git a/src/gzip.hh b/src/gzip.hh +index f3ea628..5c25fc9 100644 +--- a/src/gzip.hh ++++ b/src/gzip.hh +@@ -7,11 +7,18 @@ + #ifndef BOTAN_EXT_GZIP_H__ + #define BOTAN_EXT_GZIP_H__ + ++#include + #include + #include + + namespace Botan { + ++#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,4) ++// Only 1.9.4 and newer export the Memory_Exception. Give this gzip ++// implementation something compatible to work with. ++typedef std::bad_alloc Memory_Exhaustion; ++#endif ++ + namespace GZIP { + + /* A basic header - we only need to set the IDs and compression method */ +@@ -30,13 +37,19 @@ namespace GZIP { + + } + ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++typedef size_t filter_length_t; ++#else ++typedef u32bit filter_length_t; ++#endif ++ + /************************************************* + * Gzip Compression Filter * + *************************************************/ + class Gzip_Compression : public Filter + { + public: +- void write(const byte input[], u32bit length); ++ void write(const byte input[], filter_length_t length); + void start_msg(); + void end_msg(); + std::string name() const { return "Gzip_Compression"; } +@@ -60,7 +73,7 @@ class Gzip_Compression : public Filter + class Gzip_Decompression : public Filter + { + public: +- void write(const byte input[], u32bit length); ++ void write(const byte input[], filter_length_t length); + void start_msg(); + void end_msg(); + std::string name() const { return "Gzip_Decompression"; } +diff --git a/src/key_packet.cc b/src/key_packet.cc +index ccd0e06..3a56c69 100644 +--- a/src/key_packet.cc ++++ b/src/key_packet.cc +@@ -106,8 +106,8 @@ namespace + void validate_public_key_data(string const & name, string const & keydata) const + { + string decoded = decode_base64_as(keydata, origin::user); +- Botan::SecureVector key_block; +- key_block.set(reinterpret_cast(decoded.c_str()), decoded.size()); ++ Botan::SecureVector key_block ++ (reinterpret_cast(decoded.c_str()), decoded.size()); + try + { + Botan::X509::load_key(key_block); +diff --git a/src/key_store.cc b/src/key_store.cc +index ac8b8bb..a0c6494 100644 +--- a/src/key_store.cc ++++ b/src/key_store.cc +@@ -55,6 +55,7 @@ using Botan::PK_Signer; + using Botan::Pipe; + using Botan::get_pk_decryptor; + using Botan::get_cipher; ++using Botan::byte; + + + typedef pair key_info; +@@ -572,13 +573,21 @@ key_store_state::decrypt_private_key(key_id const & id, + try // with empty passphrase + { + Botan::DataSource_Memory ds(kp.priv()); +-#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++ pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), Dummy_UI())); ++#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) + pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), "")); + #else + pkcs8_key.reset(Botan::PKCS8::load_key(ds, "")); + #endif + } ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++ catch (Passphrase_Required & e) ++#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) ++ catch (Botan::Invalid_Argument & e) ++#else + catch (Botan::Exception & e) ++#endif + { + L(FL("failed to load key with no passphrase: %s") % e.what()); + +@@ -605,13 +614,18 @@ key_store_state::decrypt_private_key(key_id const & id, + { + Botan::DataSource_Memory ds(kp.priv()); + #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) +- pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), phrase())); ++ pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), ++ phrase())); + #else + pkcs8_key.reset(Botan::PKCS8::load_key(ds, phrase())); + #endif + break; + } ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) ++ catch (Botan::Invalid_Argument) ++#else + catch (Botan::Exception & e) ++#endif + { + cycles++; + L(FL("decrypt_private_key: failure %d to load encrypted key: %s") +@@ -697,9 +711,18 @@ key_store::create_key_pair(database & db, + + // serialize and maybe encrypt the private key + keypair kp; +- SecureVector pubkey, privkey; ++ SecureVector pubkey, privkey; + + unfiltered_pipe->start_msg(); ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ if ((*maybe_passphrase)().length()) ++ unfiltered_pipe->write( ++ Botan::PKCS8::BER_encode(priv, lazy_rng::get(), ++ (*maybe_passphrase)(), ++ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)")); ++ else ++ unfiltered_pipe->write(Botan::PKCS8::PEM_encode(priv)); ++#else + if ((*maybe_passphrase)().length()) + Botan::PKCS8::encrypt_key(priv, *unfiltered_pipe, + #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) +@@ -710,13 +733,20 @@ key_store::create_key_pair(database & db, + Botan::RAW_BER); + else + Botan::PKCS8::encode(priv, *unfiltered_pipe); ++#endif + unfiltered_pipe->end_msg(); +- kp.priv = rsa_priv_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), +- origin::internal); ++ ++ kp.priv = rsa_priv_key( ++ unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), ++ origin::internal); + + // serialize the public key + unfiltered_pipe->start_msg(); ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ unfiltered_pipe->write(Botan::X509::BER_encode(priv)); ++#else + Botan::X509::encode(priv, *unfiltered_pipe, Botan::RAW_BER); ++#endif + unfiltered_pipe->end_msg(); + kp.pub = rsa_pub_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), + origin::internal); +@@ -783,6 +813,15 @@ key_store::change_key_passphrase(key_id const & id) + get_passphrase(new_phrase, name, id, true, false); + + unfiltered_pipe->start_msg(); ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ if (new_phrase().length()) ++ unfiltered_pipe->write( ++ Botan::PKCS8::BER_encode(*priv, lazy_rng::get(), ++ new_phrase(), ++ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)")); ++ else ++ unfiltered_pipe->write(Botan::PKCS8::PEM_encode(*priv)); ++#else + if (new_phrase().length()) + Botan::PKCS8::encrypt_key(*priv, *unfiltered_pipe, + #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) +@@ -793,6 +832,7 @@ key_store::change_key_passphrase(key_id const & id) + Botan::RAW_BER); + else + Botan::PKCS8::encode(*priv, *unfiltered_pipe); ++#endif + + unfiltered_pipe->end_msg(); + kp.priv = rsa_priv_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), +@@ -813,19 +853,32 @@ key_store::decrypt_rsa(key_id const & id, + load_key_pair(*this, id, kp); + shared_ptr priv_key = s->decrypt_private_key(id); + ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ Botan::PK_Decryptor_EME decryptor(*priv_key, "EME1(SHA-1)"); ++ ++ SecureVector plain = ++ decryptor.decrypt(reinterpret_cast(ciphertext().data()), ++ ciphertext().size()); ++ plaintext = string(plain.begin(), plain.end()); ++#else + shared_ptr +- decryptor(get_pk_decryptor(*priv_key, "EME1(SHA-1)")); ++ decryptor(Botan::get_pk_decryptor(*priv_key, "EME1(SHA-1)")); + +- SecureVector plain = +- decryptor->decrypt(reinterpret_cast(ciphertext().data()), ++ SecureVector plain = ++ decryptor->decrypt(reinterpret_cast(ciphertext().data()), + ciphertext().size()); + plaintext = string(reinterpret_cast(plain.begin()), + plain.size()); ++#endif + } +- catch (Botan::Exception & ex) ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) ++ catch (std::exception & e) ++#else ++ catch (Botan::Exception & e) ++#endif + { + E(false, ciphertext.made_from, +- F("Botan error decrypting data: '%s'") % ex.what()); ++ F("Botan error decrypting data: '%s'") % e.what()); + } + } + +@@ -856,9 +909,9 @@ key_store::make_signature(database & db, + { + if (agent.connected()) { + //grab the monotone public key as an RSA_PublicKey +- SecureVector pub_block; +- pub_block.set(reinterpret_cast(key.pub().data()), +- key.pub().size()); ++ SecureVector pub_block ++ (reinterpret_cast(key.pub().data()), ++ key.pub().size()); + L(FL("make_signature: building %d-byte pub key") % pub_block.size()); + shared_ptr x509_key = + shared_ptr(Botan::X509::load_key(pub_block)); +@@ -884,7 +937,7 @@ key_store::make_signature(database & db, + || s->ssh_sign_mode == "check" + || s->ssh_sign_mode == "no") + { +- SecureVector sig; ++ SecureVector sig; + + // we permit the user to relax security here, by caching a decrypted key + // (if they permit it) through the life of a program run. this helps when +@@ -908,7 +961,13 @@ key_store::make_signature(database & db, + L(FL("make_signature: adding private key (%s) to ssh-agent") % id); + agent.add_identity(*priv_key, name()); + } +- signer = shared_ptr(get_pk_signer(*priv_key, "EMSA3(SHA-1)")); ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ signer = shared_ptr( ++ new PK_Signer(*priv_key, "EMSA3(SHA-1)")); ++#else ++ signer = shared_ptr( ++ get_pk_signer(*priv_key, "EMSA3(SHA-1)")); ++#endif + + /* If persist_phrase is true, the RSA_PrivateKey object is + cached in s->active_keys and will survive as long as the +@@ -919,11 +978,11 @@ key_store::make_signature(database & db, + + #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) + sig = signer->sign_message( +- reinterpret_cast(tosign.data()), ++ reinterpret_cast(tosign.data()), + tosign.size(), lazy_rng::get()); + #else + sig = signer->sign_message( +- reinterpret_cast(tosign.data()), ++ reinterpret_cast(tosign.data()), + tosign.size()); + #endif + sig_string = string(reinterpret_cast(sig.begin()), sig.size()); +@@ -988,6 +1047,15 @@ key_store::export_key_for_agent(key_id const & id, + // This pipe cannot sensibly be recycled. + Pipe p(new Botan::DataSink_Stream(os)); + p.start_msg(); ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ if (new_phrase().length()) ++ p.write(Botan::PKCS8::PEM_encode(*priv, ++ lazy_rng::get(), ++ new_phrase(), ++ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)")); ++ else ++ p.write(Botan::PKCS8::PEM_encode(*priv)); ++#else + if (new_phrase().length()) + Botan::PKCS8::encrypt_key(*priv, + p, +@@ -998,6 +1066,7 @@ key_store::export_key_for_agent(key_id const & id, + "PBE-PKCS5v20(SHA-1,TripleDES/CBC)"); + else + Botan::PKCS8::encode(*priv, p); ++#endif + p.end_msg(); + } + +@@ -1013,7 +1082,7 @@ key_store_state::migrate_old_key_pair + rsa_pub_key const & pub) + { + keypair kp; +- SecureVector arc4_key; ++ SecureVector arc4_key; + utf8 phrase; + shared_ptr pkcs8_key; + shared_ptr priv_key; +@@ -1031,8 +1100,14 @@ key_store_state::migrate_old_key_pair + for (;;) + try + { +- arc4_key.set(reinterpret_cast(phrase().data()), ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++ arc4_key.resize(phrase().size()); ++ arc4_key.copy(reinterpret_cast(phrase().data()), ++ phrase().size()); ++#else ++ arc4_key.set(reinterpret_cast(phrase().data()), + phrase().size()); ++#endif + + Pipe arc4_decryptor(get_cipher("ARC4", arc4_key, Botan::DECRYPTION)); + +@@ -1041,7 +1116,7 @@ key_store_state::migrate_old_key_pair + // This is necessary because PKCS8::load_key() cannot currently + // recognize an unencrypted, raw-BER blob as such, but gets it + // right if it's PEM-coded. +- SecureVector arc4_decrypt(arc4_decryptor.read_all()); ++ SecureVector arc4_decrypt(arc4_decryptor.read_all()); + Botan::DataSource_Memory ds(Botan::PEM_Code::encode(arc4_decrypt, + "PRIVATE KEY")); + #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) +@@ -1051,7 +1126,11 @@ key_store_state::migrate_old_key_pair + #endif + break; + } ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) ++ catch (Botan::Invalid_Argument & e) ++#else + catch (Botan::Exception & e) ++#endif + { + L(FL("migrate_old_key_pair: failure %d to load old private key: %s") + % cycles % e.what()); +@@ -1070,6 +1149,11 @@ key_store_state::migrate_old_key_pair + + // now we can write out the new key + unfiltered_pipe->start_msg(); ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ unfiltered_pipe->write(Botan::PKCS8::BER_encode( ++ *priv_key, lazy_rng::get(), phrase(), ++ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)")); ++#else + Botan::PKCS8::encrypt_key(*priv_key, *unfiltered_pipe, + #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) + lazy_rng::get(), +@@ -1077,6 +1161,7 @@ key_store_state::migrate_old_key_pair + phrase(), + "PBE-PKCS5v20(SHA-1,TripleDES/CBC)", + Botan::RAW_BER); ++#endif + unfiltered_pipe->end_msg(); + kp.priv = rsa_priv_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), + origin::internal); +@@ -1085,7 +1170,11 @@ key_store_state::migrate_old_key_pair + // Botan for the X.509 encoding of the private key implies that we want + // it to derive and produce the public key) + unfiltered_pipe->start_msg(); ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) ++ unfiltered_pipe->write(Botan::X509::BER_encode(*priv_key)); ++#else + Botan::X509::encode(*priv_key, *unfiltered_pipe, Botan::RAW_BER); ++#endif + unfiltered_pipe->end_msg(); + kp.pub = rsa_pub_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), + origin::internal); +diff --git a/src/monotone.cc b/src/monotone.cc +index 281e940..f2c844a 100644 +--- a/src/monotone.cc ++++ b/src/monotone.cc +@@ -156,27 +156,53 @@ cpp_main(int argc, char ** argv) + E(linked_botan_version != BOTAN_VERSION_CODE_FOR(1,7,14), origin::system, + F("monotone does not support Botan 1.7.14")); + +-#if BOTAN_VERSION_CODE <= BOTAN_VERSION_CODE_FOR(1,7,6) ++ // In Botan 1.9.9, the DataSink_Stream cannot be instantiated per ++ // se. As 1.10.1 is already out, let's simply disable support for ++ // that specific (testing) version of botan. ++ E(linked_botan_version != BOTAN_VERSION_CODE_FOR(1,9,9), origin::system, ++ F("monotone does not support Botan 1.9.9")); ++ ++#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,7,7) ++ // motonote binary compiled against botan younger than 1.7.7 + E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,6,3), origin::system, + F("this monotone binary requires Botan 1.6.3 or newer")); +- E(linked_botan_version <= BOTAN_VERSION_CODE_FOR(1,7,6), origin::system, +- F("this monotone binary does not work with Botan newer than 1.7.6")); +-#elif BOTAN_VERSION_CODE <= BOTAN_VERSION_CODE_FOR(1,7,22) +- E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,6), origin::system, ++ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,7,7), origin::system, ++ F("this monotone binary does not work with Botan 1.7.7 or newer")); ++ ++#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,7,22) ++ // motonote binary compiled against botan 1.7.7 - 1.7.21 ++ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,7,7), origin::system, + F("this monotone binary requires Botan 1.7.7 or newer")); +- // While compiling against 1.7.22 or newer is recommended, because +- // it enables new features of Botan, the monotone binary compiled +- // against Botan 1.7.21 and before should still work with newer Botan +- // versions, including all of the stable branch 1.8.x. +- E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system, +- F("this monotone binary does not work with Botan 1.9.x")); +-#else +- E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,22), origin::system, ++ // While compiling against 1.7.22 or newer is recommended, because it ++ // enables new features of Botan, the monotone binary compiled against ++ // Botan 1.7.21 and before should still work with newer Botan version, ++ // including all of the stable branch 1.8.x, up to and including ++ // 1.9.3. ++ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,4), origin::system, ++ F("this monotone binary does not work with Botan 1.9.4 or newer")); ++ ++#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,4) ++ // motonote binary compiled against botan 1.7.22 - 1.9.3 ++ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,7,22), origin::system, + F("this monotone binary requires Botan 1.7.22 or newer")); +- E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system, +- F("this monotone binary does not work with Botan 1.9.x")); ++ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,4), origin::system, ++ F("this monotone binary does not work with Botan 1.9.4 or newer")); ++ ++#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11) ++ // motonote binary compiled against botan 1.9.4 - 1.9.10 ++#pragma message ( "The resulting monotone binary won't be able to run with any stable release of botan." ) ++ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,9,4), origin::system, ++ F("this monotone binary requires Botan 1.9.4 or newer")); ++ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,11), origin::system, ++ F("this monotone binary does not work with Botan 1.9.11 or newer")); ++ ++#else ++ // motonote binary compiled against botan 1.9.11 and newer ++ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,9,11), origin::system, ++ F("this monotone binary requires Botan 1.9.11 or newer")); + #endif + ++ + app_state app; + try + { +diff --git a/src/packet.cc b/src/packet.cc +index 87ff24a..f592d50 100644 +--- a/src/packet.cc ++++ b/src/packet.cc +@@ -156,8 +156,8 @@ namespace + void validate_public_key_data(string const & name, string const & keydata) const + { + string decoded = decode_base64_as(keydata, origin::user); +- Botan::SecureVector key_block; +- key_block.set(reinterpret_cast(decoded.c_str()), decoded.size()); ++ Botan::SecureVector key_block ++ (reinterpret_cast(decoded.c_str()), decoded.size()); + try + { + Botan::X509::load_key(key_block); +@@ -175,7 +175,9 @@ namespace + Botan::DataSource_Memory ds(decoded); + try + { +-#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++ Botan::PKCS8::load_key(ds, lazy_rng::get(), Dummy_UI()); ++#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) + Botan::PKCS8::load_key(ds, lazy_rng::get(), string()); + #else + Botan::PKCS8::load_key(ds, string()); +@@ -189,7 +191,11 @@ namespace + } + // since we do not want to prompt for a password to decode it finally, + // we ignore all other exceptions ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++ catch (Passphrase_Required) {} ++#else + catch (Botan::Invalid_Argument) {} ++#endif + } + void validate_certname(string const & cn) const + { +@@ -460,7 +466,15 @@ read_packets(istream & in, packet_consumer & cons) + return count; + } + +- ++// Dummy User_Interface implementation for Botan ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++std::string ++Dummy_UI::get_passphrase(const std::string &, const std::string &, ++ Botan::User_Interface::UI_Result&) const ++{ ++ throw Passphrase_Required("Passphrase required"); ++} ++#endif + + // Local Variables: + // mode: C++ +diff --git a/src/packet.hh b/src/packet.hh +index 239f996..3d5c1b5 100644 +--- a/src/packet.hh ++++ b/src/packet.hh +@@ -10,6 +10,10 @@ + #ifndef __PACKET_HH__ + #define __PACKET_HH__ + ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++#include ++#endif ++ + #include "vocab.hh" + + struct cert; +@@ -84,6 +88,21 @@ struct packet_writer : public packet_consumer + + size_t read_packets(std::istream & in, packet_consumer & cons); + ++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) ++// A helper class implementing Botan::User_Interface - which doesn't really ++// interface with the user, but provides the necessary plumbing for Botan. ++// ++// See Botan commit 2d09d7d0cd4bd0e7155d001dd65a4f29103b158c ++typedef std::runtime_error Passphrase_Required; ++ ++class Dummy_UI : public Botan::User_Interface ++{ ++public: ++ virtual std::string get_passphrase(const std::string &, const std::string &, ++ Botan::User_Interface::UI_Result &) const; ++}; ++#endif ++ + #endif + + // Local Variables: +diff --git a/src/sha1.cc b/src/sha1.cc +index d4d7232..5f47f90 100644 +--- a/src/sha1.cc ++++ b/src/sha1.cc +@@ -50,9 +50,12 @@ CMD_HIDDEN(benchmark_sha1, "benchmark_sha1", "", CMD_REF(debug), "", + Botan::Default_Benchmark_Timer timer; + std::map results = + Botan::algorithm_benchmark("SHA-1", milliseconds, timer, rng, af); +-#else ++#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11) + std::map results = + Botan::algorithm_benchmark("SHA-1", milliseconds, rng, af); ++#else ++ std::map results = ++ Botan::algorithm_benchmark("SHA-1", af, rng, milliseconds, 16); + #endif + + for(std::map::const_iterator i = results.begin(); +diff --git a/src/ssh_agent.cc b/src/ssh_agent.cc +index 157f59a..051e2f7 100644 +--- a/src/ssh_agent.cc ++++ b/src/ssh_agent.cc +@@ -385,9 +385,9 @@ bool + ssh_agent::has_key(const keypair & key) + { + //grab the monotone public key as an RSA_PublicKey +- SecureVector pub_block; +- pub_block.set(reinterpret_cast((key.pub)().data()), +- (key.pub)().size()); ++ SecureVector pub_block ++ (reinterpret_cast((key.pub)().data()), ++ (key.pub)().size()); + L(FL("has_key: building %d-byte pub key") % pub_block.size()); + shared_ptr x509_key = + shared_ptr(Botan::X509::load_key(pub_block)); +diff --git a/src/transforms.cc b/src/transforms.cc +index e4d9443..546d5ab 100644 +--- a/src/transforms.cc ++++ b/src/transforms.cc +@@ -53,15 +53,16 @@ using Botan::Hash_Filter; + // paradigm "must" be used. this program is intended for source code + // control and I make no bones about it. + +-NORETURN(static inline void error_in_transform(Botan::Exception & e)); ++NORETURN(static inline void error_in_transform(std::exception & e)); + + static inline void +-error_in_transform(Botan::Exception & e, origin::type caused_by) ++error_in_transform(std::exception & e, origin::type caused_by) + { + // these classes can all indicate data corruption + if (typeid(e) == typeid(Botan::Encoding_Error) + || typeid(e) == typeid(Botan::Decoding_Error) + || typeid(e) == typeid(Botan::Stream_IO_Error) ++ || typeid(e) == typeid(Botan::Invalid_Argument) + || typeid(e) == typeid(Botan::Integrity_Failure)) + { + // clean up the what() string a little: throw away the +@@ -107,7 +108,7 @@ error_in_transform(Botan::Exception & e, origin::type caused_by) + pipe->process_msg(in); \ + out = pipe->read_all_as_string(Pipe::LAST_MESSAGE); \ + } \ +- catch (Botan::Exception & e) \ ++ catch (std::exception & e) \ + { \ + pipe.reset(new Pipe(new T(carg))); \ + error_in_transform(e, made_from); \ +@@ -173,7 +174,7 @@ template<> string xform(string const & in, + { + throw Botan::Decoding_Error(string("invalid hex character '") + (char)c + "'"); + } +- catch(Botan::Exception & e) ++ catch(std::exception & e) + { + error_in_transform(e, made_from); + } +@@ -219,7 +220,7 @@ void pack(T const & in, base64< gzip > & out) + tmp = pipe->read_all_as_string(Pipe::LAST_MESSAGE); + out = base64< gzip >(tmp, in.made_from); + } +- catch (Botan::Exception & e) ++ catch (std::exception & e) + { + pipe.reset(new Pipe(new Gzip_Compression, + new Base64_Encoder)); +@@ -237,7 +238,7 @@ void unpack(base64< gzip > const & in, T & out) + pipe->process_msg(in()); + out = T(pipe->read_all_as_string(Pipe::LAST_MESSAGE), in.made_from); + } +- catch (Botan::Exception & e) ++ catch (std::exception & e) + { + pipe.reset(new Pipe(new Base64_Decoder, + new Gzip_Decompression)); +@@ -264,7 +265,7 @@ calculate_ident(data const & dat, + p->process_msg(dat()); + ident = id(p->read_all_as_string(Pipe::LAST_MESSAGE), dat.made_from); + } +- catch (Botan::Exception & e) ++ catch (std::exception & e) + { + p.reset(new Pipe(new Hash_Filter("SHA-160"))); + error_in_transform(e, dat.made_from); +-- +tg: (1150daa..) t/botan-1.10 (depends on: master) diff --git a/monotone-1.0-fix-texinfo.patch b/monotone-1.0-fix-texinfo.patch new file mode 100644 index 0000000..6a4e1ec --- /dev/null +++ b/monotone-1.0-fix-texinfo.patch @@ -0,0 +1,623 @@ +Description: fix texinfo errors with texinfo >= 5.0 +Origin: upstream, commit: 0d22697daf2fd169db15445cd88f8a7be7371f64 +Author: Markus Wanner +--- a/doc/monotone.texi ++++ b/doc/monotone.texi +@@ -4779,7 +4779,7 @@ + Cancel all previous @option{--rcfile} options (standard rcfiles are + still loaded). See @ref{rcfiles}. + +-@itemx --root ++@item --root + Limit the search for a workspace to the specified root directory + + @item --ssh-sign +@@ -6150,7 +6150,7 @@ + Specifying only the pathname "." will restrict the search for unknown + files to the current subdirectory of the workspace. + +-@itemx mtn list vars [@var{domain}] ++@item mtn list vars [@var{domain}] + @itemx mtn ls vars + @command{ls vars} is an alias for @command{list vars}. + +--- a/doc/pcrepattern.texi ++++ b/doc/pcrepattern.texi +@@ -74,32 +74,32 @@ + brackets, the metacharacters are as follows: + + @table @code +-@itemx \ ++@item \ + general escape character with several uses +-@itemx ^ ++@item ^ + assert start of string (or line, in multiline mode) +-@itemx $ ++@item $ + assert end of string (or line, in multiline mode) +-@itemx . ++@item . + match any character except newline (by default) +-@itemx [ ++@item [ + start character class definition +-@itemx | ++@item | + start of alternative branch +-@itemx ( ++@item ( + start subpattern +-@itemx ) ++@item ) + end subpattern +-@itemx ? ++@item ? + extends the meaning of @samp{(} + also 0 or 1 quantifier + also quantifier minimizer +-@itemx * ++@item * + 0 or more quantifier +-@itemx + ++@item + + 1 or more quantifier + also ``possessive quantifier'' +-@itemx @{ ++@item @{ + start min/max quantifier + @end table + +@@ -108,16 +108,16 @@ + class". In a character class the only metacharacters are: + + @table @code +-@itemx \ ++@item \ + general escape character +-@itemx ^ ++@item ^ + negate the class, but only if the first character +-@itemx - ++@item - + indicates character range +-@itemx [ ++@item [ + POSIX character class (only if followed by POSIX + syntax) +-@itemx ] ++@item ] + terminates the character class + @end table + +@@ -159,25 +159,25 @@ + represents: + + @table @code +-@itemx \a ++@item \a + alarm, that is, the BEL character (hex 07) +-@itemx \c@var{x} ++@item \c@var{x} + "control-@var{x}", where @var{x} is any character +-@itemx \e ++@item \e + escape (hex 1B) +-@itemx \f ++@item \f + formfeed (hex 0C) +-@itemx \n ++@item \n + linefeed (hex 0A) +-@itemx \r ++@item \r + carriage return (hex 0D) +-@itemx \t ++@item \t + tab (hex 09) +-@itemx \@var{ddd} ++@item \@var{ddd} + character with octal code @var{ddd}, or backreference +-@itemx \x@var{hh} ++@item \x@var{hh} + character with hex code @var{hh} +-@itemx \x@{@var{hhh...}@} ++@item \x@{@var{hhh...}@} + character with hex code @var{hhh...} + @end table + +@@ -244,27 +244,27 @@ + @samp{\777} are permitted. For example: + + @table @code +-@itemx \040 ++@item \040 + is another way of writing a space +-@itemx \40 ++@item \40 + is the same, provided there are fewer than 40 + previous capturing subpatterns +-@itemx \7 ++@item \7 + is always a back reference +-@itemx \11 ++@item \11 + might be a back reference, or another way of + writing a tab +-@itemx \011 ++@item \011 + is always a tab +-@itemx \0113 ++@item \0113 + is a tab followed by the character @samp{3} +-@itemx \113 ++@item \113 + might be a back reference, otherwise the + character with octal code 113 +-@itemx \377 ++@item \377 + might be a back reference, otherwise + the byte consisting entirely of 1 bits +-@itemx \81 ++@item \81 + is either a back reference, or a binary zero + followed by the two characters @samp{8} and @samp{1} + @end table +@@ -294,25 +294,25 @@ + following are always recognized: + + @table @code +-@itemx \d ++@item \d + any decimal digit +-@itemx \D ++@item \D + any character that is not a decimal digit +-@itemx \h ++@item \h + any horizontal whitespace character +-@itemx \H ++@item \H + any character that is not a horizontal whitespace character +-@itemx \s ++@item \s + any whitespace character +-@itemx \S ++@item \S + any character that is not a whitespace character +-@itemx \v ++@item \v + any vertical whitespace character +-@itemx \V ++@item \V + any character that is not a vertical whitespace character +-@itemx \w ++@item \w + any ``word'' character +-@itemx \W ++@item \W + any ``non-word'' character + @end table + +@@ -342,43 +342,43 @@ + characters are: + + @table @code +-@itemx U+0009 ++@item U+0009 + Horizontal tab +-@itemx U+0020 ++@item U+0020 + Space +-@itemx U+00A0 ++@item U+00A0 + Non-break space +-@itemx U+1680 ++@item U+1680 + Ogham space mark +-@itemx U+180E ++@item U+180E + Mongolian vowel separator + @item U+2000 + En quad +-@itemx U+2001 ++@item U+2001 + Em quad +-@itemx U+2002 ++@item U+2002 + En space +-@itemx U+2003 ++@item U+2003 + Em space +-@itemx U+2004 ++@item U+2004 + Three-per-em space +-@itemx U+2005 ++@item U+2005 + Four-per-em space +-@itemx U+2006 ++@item U+2006 + Six-per-em space + @item U+2007 + Figure space +-@itemx U+2008 ++@item U+2008 + Punctuation space +-@itemx U+2009 ++@item U+2009 + Thin space +-@itemx U+200A ++@item U+200A + Hair space +-@itemx U+202F ++@item U+202F + Narrow no-break space +-@itemx U+205F ++@item U+205F + Medium mathematical space +-@itemx U+3000 ++@item U+3000 + Ideographic space + @end table + +@@ -386,19 +386,19 @@ + The vertical space characters are: + + @table @code +-@itemx U+000A ++@item U+000A + Linefeed +-@itemx U+000B ++@item U+000B + Vertical tab +-@itemx U+000C ++@item U+000C + Formfeed +-@itemx U+000D ++@item U+000D + Carriage return +-@itemx U+0085 ++@item U+0085 + Next line +-@itemx U+2028 ++@item U+2028 + Line separator +-@itemx U+2029 ++@item U+2029 + Paragraph separator + @end table + +@@ -418,15 +418,15 @@ + the following five sequences: + + @table @code +-@itemx (*CR) ++@item (*CR) + carriage return +-@itemx (*LF) ++@item (*LF) + linefeed +-@itemx (*CRLF) ++@item (*CRLF) + carriage return, followed by linefeed +-@itemx (*ANYCRLF) ++@item (*ANYCRLF) + any of the three above +-@itemx (*ANY) ++@item (*ANY) + all Unicode newline sequences + @end table + +@@ -474,9 +474,9 @@ + pattern string with one of the following sequences: + + @table @code +-@itemx (*BSR_ANYCRLF) ++@item (*BSR_ANYCRLF) + @key{CR}, @key{LF}, or @key{CR}@key{LF} only +-@itemx (*BSR_UNICODE) ++@item (*BSR_UNICODE) + any Unicode newline sequence (the default) + @end table + +@@ -501,11 +501,11 @@ + 256, but they do work in this mode. The extra escape sequences are: + + @table @code +-@itemx \p@{@var{xx}@} ++@item \p@{@var{xx}@} + a character with the @var{xx} property +-@itemx \P@{@var{xx}@} ++@item \P@{@var{xx}@} + a character without the @var{xx} property +-@itemx \X ++@item \X + an extended Unicode sequence + @end table + +@@ -618,83 +618,83 @@ + @table @code + @item C + Other +-@itemx Cc ++@item Cc + Control +-@itemx Cf ++@item Cf + Format +-@itemx Cn ++@item Cn + Unassigned +-@itemx Co ++@item Co + Private use +-@itemx Cs ++@item Cs + Surrogate + + @item L + Letter +-@itemx Ll ++@item Ll + Lower case letter +-@itemx Lm ++@item Lm + Modifier letter +-@itemx Lo ++@item Lo + Other letter +-@itemx Lt ++@item Lt + Title case letter +-@itemx Lu ++@item Lu + Upper case letter + + @item M + Mark +-@itemx Mc ++@item Mc + Spacing mark +-@itemx Me ++@item Me + Enclosing mark +-@itemx Mn ++@item Mn + Non-spacing mark + + @item N + Number +-@itemx Nd ++@item Nd + Decimal number +-@itemx Nl ++@item Nl + Letter number +-@itemx No ++@item No + Other number + + @item P + Punctuation +-@itemx Pc ++@item Pc + Connector punctuation +-@itemx Pd ++@item Pd + Dash punctuation +-@itemx Pe ++@item Pe + Close punctuation +-@itemx Pf ++@item Pf + Final punctuation +-@itemx Pi ++@item Pi + Initial punctuation +-@itemx Po ++@item Po + Other punctuation +-@itemx Ps ++@item Ps + Open punctuation + + @item S + Symbol +-@itemx Sc ++@item Sc + Currency symbol +-@itemx Sk ++@item Sk + Modifier symbol +-@itemx Sm ++@item Sm + Mathematical symbol +-@itemx So ++@item So + Other symbol + + @item Z + Separator +-@itemx Zl ++@item Zl + Line separator +-@itemx Zp ++@item Zp + Paragraph separator +-@itemx Zs ++@item Zs + Space separator + @end table + +@@ -771,18 +771,18 @@ + described below. The backslashed assertions are: + + @table @code +-@itemx \b ++@item \b + matches at a word boundary +-@itemx \B ++@item \B + matches when not at a word boundary +-@itemx \A ++@item \A + matches at the start of the subject +-@itemx \Z ++@item \Z + matches at the end of the subject + also matches before a newline at the end of the subject +-@itemx \z ++@item \z + matches only at the end of the subject +-@itemx \G ++@item \G + matches at the first matching position in the subject + @end table + +@@ -993,33 +993,33 @@ + supported class names are + + @table @code +-@itemx alnum ++@item alnum + letters and digits +-@itemx alpha ++@item alpha + letters +-@itemx ascii ++@item ascii + character codes 0 -- 127 +-@itemx blank ++@item blank + space or tab only +-@itemx cntrl ++@item cntrl + control characters +-@itemx digit ++@item digit + decimal digits (same as @samp{\d}) +-@itemx graph ++@item graph + printing characters, excluding space +-@itemx lower ++@item lower + lower case letters +-@itemx print ++@item print + printing characters, including space +-@itemx punct ++@item punct + printing characters, excluding letters and digits +-@itemx space ++@item space + white space (not quite the same as @samp{\s}) +-@itemx upper ++@item upper + upper case letters +-@itemx word ++@item word + ``word'' characters (same as @samp{\w}) +-@itemx xdigit ++@item xdigit + hexadecimal digits + @end table + +@@ -1071,22 +1071,22 @@ + @samp{)}. The option letters are + + @table @code +-@itemx i ++@item i + Caseless: characters in one case match the corresponding + characters in other cases as well. +-@itemx m ++@item m + Multiline: @samp{^} and @samp{$} match at newlines + as well as at beginning and end of string. +-@itemx s ++@item s + Dotall: dot matches any character, including newline characters. +-@itemx x ++@item x + Extended syntax: unescaped white space is ignored and embedded + comments are possible. +-@itemx J ++@item J + Dupnames: names for capturing subpattern need not be unique. +-@itemx U ++@item U + Ungreedy: quantifiers match as few times as possible by default. +-@itemx X ++@item X + Extra: for forward compatibility, give an error if any escape sequence + with no defined meaning appears. + @end table +@@ -1358,11 +1358,11 @@ + single-character abbreviations: + + @table @code +-@itemx * ++@item * + is equivalent to @{0,@} +-@itemx + ++@item + + is equivalent to @{1,@} +-@itemx ? ++@item ? + is equivalent to @{0,1@} + @end table + +@@ -2302,7 +2302,7 @@ + The following verbs act as soon as they are encountered: + + @table @code +-@itemx (*ACCEPT) ++@item (*ACCEPT) + + This verb causes the match to end successfully, skipping the remainder + of the pattern. When inside a recursion, only the innermost pattern is +@@ -2317,7 +2317,7 @@ + This matches @samp{AB}, @samp{AAD}, or @samp{ACD}, but when it matches + @samp{AB}, no data is captured. + +-@itemx (*FAIL) @r{or} (*F) ++@item (*FAIL) @r{or} (*F) + + This verb causes the match to fail, forcing backtracking to occur. It + is equivalent to @samp{(?!)} but easier to read. It is not clear +@@ -2334,7 +2334,7 @@ + occurs. + + @table @code +-@itemx (*COMMIT) ++@item (*COMMIT) + + This verb causes the whole match to fail outright if the rest of the + pattern does not match. Even if the pattern is unanchored, no further +@@ -2350,7 +2350,7 @@ + This matches @samp{xxaab} but not @samp{aacaab}. It can be thought of + as a kind of dynamic anchor, or ``I've started, so I must finish.'' + +-@itemx (*PRUNE) ++@item (*PRUNE) + + This verb causes the match to fail at the current position if the rest + of the pattern does not match. If the pattern is unanchored, the +@@ -2363,7 +2363,7 @@ + are some uses of @code{(*PRUNE)} that cannot be expressed in any other + way. + +-@itemx (*SKIP) ++@item (*SKIP) + + This verb is like @code{(*PRUNE)}, except that if the pattern is + unanchored, the "bumpalong" advance is not to the next character, but +@@ -2383,7 +2383,7 @@ + attempt would start at the second character instead of skipping on to + @samp{c}. + +-@itemx (*THEN) ++@item (*THEN) + + This verb causes a skip to the next alternation if the rest of the + pattern does not match. That is, it cancels pending backtracking, but diff --git a/monotone-1.0-lua-5.2.patch b/monotone-1.0-lua-5.2.patch new file mode 100644 index 0000000..2493490 --- /dev/null +++ b/monotone-1.0-lua-5.2.patch @@ -0,0 +1,752 @@ +From: Thomas Moschny +Subject: [PATCH] lua-5.2 + +Support Lua 5.2. + +Apply patches from these upstream commits: +53e02eaa302bc05e96a18e3882b0e9843b53cf9a (partially) +fd98d953ca93454c66a55aadf2adbeb87de86f69 (with some tweaking) +fe1180f754da5d552c308b61e8129e59039bc559 + +--- + extra/mtn-hooks/monotone-cvs-ignore.lua | 2 +- + src/lua.cc | 40 +++++++++++--- + src/lua.hh | 14 ++--- + src/luaext_parse_basic_io.cc | 4 ++ + src/luaext_platform.cc | 62 ++++++++++++++++------ + src/std_hooks.lua | 9 +++- + test/func-testsuite.lua | 7 +++ + test/func/automate_get_attributes/__driver__.lua | 2 +- + .../func/automate_interface_version/__driver__.lua | 2 +- + .../automate_inventory_ignore_dirs/__driver__.lua | 2 +- + test/func/automate_put_revision/__driver__.lua | 2 +- + .../automate_set_drop_attribute/__driver__.lua | 4 +- + .../func/automate_stdio_band_output/__driver__.lua | 10 ++-- + test/func/clone_weird_branch_names/__driver__.lua | 2 +- + test/func/list_databases/__driver__.lua | 6 +-- + test/func/list_workspaces/__driver__.lua | 8 +-- + .../log_--no-files_and_--merges/__driver__.lua | 4 +- + test/func/manpage/__driver__.lua | 2 +- + test/func/netsync_negotiation/__driver__.lua | 8 +-- + test/func/serve-automate-single-run/__driver__.lua | 2 +- + test/func/serve-automate/__driver__.lua | 4 +- + test/func/ssh_agent/__driver__.lua | 8 +-- + .../__driver__.lua | 4 +- + test/func/user_commands/extra_rc | 3 +- + test/src/testlib.lua | 39 +++++++------- + 25 files changed, 161 insertions(+), 89 deletions(-) + +diff --git a/extra/mtn-hooks/monotone-cvs-ignore.lua b/extra/mtn-hooks/monotone-cvs-ignore.lua +index 6a59d12..0e9feb5 100644 +--- a/extra/mtn-hooks/monotone-cvs-ignore.lua ++++ b/extra/mtn-hooks/monotone-cvs-ignore.lua +@@ -23,7 +23,7 @@ do + + local handle, msg = io.open(dir .. ".cvsignore") + if (handle) then +- for line in handle:lines(dir .. ".cvsignore") do ++ for line in handle:lines() do + pat2 = _glob_to_pattern(line) .. "$" + if (string.find(name, pat1 .. pat2)) then + return true +diff --git a/src/lua.cc b/src/lua.cc +index 29f1033..9456c64 100644 +--- a/src/lua.cc ++++ b/src/lua.cc +@@ -44,7 +44,11 @@ dump_stack(lua_State * st) + switch (t) { + case LUA_TSTRING: /* strings */ + out += '`'; ++#ifdef lua_strlen + out += string(lua_tostring(st, i), lua_strlen(st, i)); ++#else ++ out += string(lua_tostring(st, i), lua_rawlen(st, i)); ++#endif + out += '\''; + break; + +@@ -95,7 +99,11 @@ void + Lua::report_error() + { + // I(lua_isstring(st, -1)); ++#ifdef lua_strlen + string err = string(lua_tostring(st, -1), lua_strlen(st, -1)); ++#else ++ string err = string(lua_tostring(st, -1), lua_rawlen(st, -1)); ++#endif + W(i18n_format("%s") % err); + L(FL("lua stack: %s") % dump_stack(st)); + lua_pop(st, 1); +@@ -107,7 +115,11 @@ Lua::check_stack(int count) + { + if (!lua_checkstack(st, count)) + { ++#ifdef LUAI_MAXCSTACK + fail((FL("lua stack limit '%d' reached") % LUAI_MAXCSTACK).str()); ++#else ++ fail((FL("lua stack limit '%d' reached") % LUAI_MAXSTACK).str()); ++#endif + return false; + } + return true; +@@ -119,17 +131,27 @@ Lua & + Lua::get(int idx) + { + if (failed) return *this; +- if (!lua_istable (st, idx)) +- { +- fail("istable() in get"); +- return *this; +- } + if (lua_gettop (st) < 1) + { + fail("stack top > 0 in get"); + return *this; + } +- lua_gettable(st, idx); ++ if (idx) ++ { ++ if (!lua_istable (st, idx)) ++ { ++ fail("istable() in get"); ++ return *this; ++ } ++ lua_gettable(st, idx); ++ } ++ else ++ { ++ string name; ++ extract_str(name); ++ pop(); ++ lua_getglobal(st, name.c_str()); ++ } + return *this; + } + +@@ -194,7 +216,11 @@ Lua::extract_str_nolog(string & str) + fail("isstring() in extract_str"); + return *this; + } ++#ifdef lua_strlen + str = string(lua_tostring(st, -1), lua_strlen(st, -1)); ++#else ++ str = string(lua_tostring(st, -1), lua_rawlen(st, -1)); ++#endif + return *this; + } + +@@ -460,7 +486,7 @@ void add_functions(lua_State * st) + { + lua_newtable(st); + lua_pushvalue(st, -1); +- lua_setfield(st, LUA_GLOBALSINDEX, table.c_str()); ++ lua_setglobal(st, table.c_str()); + } + for (luaext::fmap::const_iterator j = i->second.begin(); + j != i->second.end(); ++j) +diff --git a/src/lua.hh b/src/lua.hh +index ae87329..6f9783a 100644 +--- a/src/lua.hh ++++ b/src/lua.hh +@@ -37,13 +37,13 @@ Lua + void report_error(); + bool check_stack(int count); + +- // getters +- Lua & get(int idx = LUA_GLOBALSINDEX); +- Lua & get_fn(int idx = LUA_GLOBALSINDEX); +- Lua & get_tab(int idx = LUA_GLOBALSINDEX); +- Lua & get_str(int idx = LUA_GLOBALSINDEX); +- Lua & get_num(int idx = LUA_GLOBALSINDEX); +- Lua & get_bool(int idx = LUA_GLOBALSINDEX); ++ // getters (0 is an invalid index in lua, and is used here to represent the global table) ++ Lua & get(int idx = 0); ++ Lua & get_fn(int idx = 0); ++ Lua & get_tab(int idx = 0); ++ Lua & get_str(int idx = 0); ++ Lua & get_num(int idx = 0); ++ Lua & get_bool(int idx = 0); + + // extractors + Lua & extract_str_nolog(std::string & str); +diff --git a/src/luaext_parse_basic_io.cc b/src/luaext_parse_basic_io.cc +index 84cea98..4d2308a 100644 +--- a/src/luaext_parse_basic_io.cc ++++ b/src/luaext_parse_basic_io.cc +@@ -23,7 +23,11 @@ LUAEXT(parse_basic_io, ) + // followed by one or more string or hex values. It returns a table of + // lines. + vector > > res; ++#ifdef lua_strlen + const string str(luaL_checkstring(LS, -1), lua_strlen(LS, -1)); ++#else ++ const string str(luaL_checkstring(LS, -1), lua_rawlen(LS, -1)); ++#endif + basic_io::input_source in(str, "monotone_parse_basic_io_for_lua"); + in.made_from = origin::user; + basic_io::tokenizer tok(in); +diff --git a/src/luaext_platform.cc b/src/luaext_platform.cc +index 643250c..c89b45a 100644 +--- a/src/luaext_platform.cc ++++ b/src/luaext_platform.cc +@@ -96,31 +96,58 @@ LUAEXT(spawn_redirected, ) + return 1; + } + +-// borrowed from lua/liolib.cc +-// Note that making C functions that return FILE* in Lua is tricky ++// Making C functions that return FILE* in Lua is tricky. Especially if it ++// actually needs to work with multiple lua versions. ++// ++// The following routines are inspired by lua/liolib.c from both versions. ++// The mtn_lua_Stream struct is closer to the 5.2 variant, but the ++// additional field compared to 5.1 (which only uses FILE*) shouldn't hurt ++// in Lua 5.1. ++// + // There is a Lua FAQ entitled: + // "Why does my library-created file segfault on :close() but work otherwise?" ++// ++// However, it's advice seems out-dated and applies more to 5.1. ++ ++typedef struct mtn_lua_Stream { ++ FILE *f; ++ lua_CFunction closef; ++} mtn_lua_Stream; ++ ++#define topfile(LS) ((mtn_lua_Stream *)luaL_checkudata(LS, 1, LUA_FILEHANDLE)) + +-#define topfile(LS) ((FILE **)luaL_checkudata(LS, 1, LUA_FILEHANDLE)) ++static int io_pclose (lua_State *LS) { ++ mtn_lua_Stream *s = topfile(LS); ++ ++ // Note that in Lua 5.2, aux_close() already resets s->closef to NULL and for ++ // Lua 5.1, it's not relevant, at all. But we've set it to &io_pclose(), so ++ // contents of s->closef different between Lua versions. ++ ++ int ok; ++ if (s->f != NULL) ++ ok = (pclose(s->f) == 0); ++ ++ s->f = NULL; ++ s->closef = NULL; // just to be extra sure this won't do any harm + +-static int io_fclose (lua_State *LS) { +- FILE **p = topfile(LS); +- int ok = (fclose(*p) == 0); +- *p = NULL; + lua_pushboolean(LS, ok); + return 1; + } + +-static FILE **newfile (lua_State *LS) { +- FILE **pf = (FILE **)lua_newuserdata(LS, sizeof(FILE *)); +- *pf = NULL; /* file handle is currently `closed' */ ++static mtn_lua_Stream *newstream (lua_State *LS) { ++ mtn_lua_Stream *s = (mtn_lua_Stream *)lua_newuserdata(LS, sizeof(mtn_lua_Stream)); ++ s->f = NULL; /* file handle is currently `closed' */ ++ s->closef = NULL; + luaL_getmetatable(LS, LUA_FILEHANDLE); + lua_setmetatable(LS, -2); + +- lua_pushcfunction(LS, io_fclose); ++#ifdef LUA_ENVIRONINDEX ++ // Lua 5.2 removes C function environments ++ lua_pushcfunction(LS, io_pclose); + lua_setfield(LS, LUA_ENVIRONINDEX, "__close"); ++#endif + +- return pf; ++ return s; + } + + LUAEXT(spawn_pipe, ) +@@ -136,12 +163,13 @@ LUAEXT(spawn_pipe, ) + for (i=0; iclosef = &io_pclose; ++ ++ mtn_lua_Stream *outs = newstream(LS); ++ outs->closef = &io_pclose; + +- pid = process_spawn_pipe(argv, inpf, outpf); ++ pid = process_spawn_pipe(argv, &ins->f, &outs->f); + free(argv); + + lua_pushnumber(LS, pid); +diff --git a/src/std_hooks.lua b/src/std_hooks.lua +index bfef561..7099f83 100644 +--- a/src/std_hooks.lua ++++ b/src/std_hooks.lua +@@ -10,6 +10,13 @@ + -- this is the standard set of lua hooks for monotone; + -- user-provided files can override it or add to it. + ++-- Since Lua 5.2, unpack and loadstrings are deprecated and are either moved ++-- to table.unpack() or replaced by load(). If lua was compiled without ++-- LUA_COMPAT_UNPACK and/or LUA_COMPAT_LOADSTRING, these two are not ++-- available and we add a similar compatibility layer, ourselves. ++unpack = unpack or table.unpack ++loadstring = loadstring or load ++ + function temp_file(namehint) + local tdir + tdir = os.getenv("TMPDIR") +@@ -1465,7 +1472,7 @@ do + return true, warning + end + function push_hook_functions(functions) +- local n = table.maxn(hook_functions) + 1 ++ local n = #hook_functions + 1 + return add_hook_functions(functions, n) + end + +diff --git a/test/func-testsuite.lua b/test/func-testsuite.lua +index 64a6f26..454cd9c 100755 +--- a/test/func-testsuite.lua ++++ b/test/func-testsuite.lua +@@ -10,6 +10,13 @@ + monotone_path = nil + no_network_tests = false + ++-- Since Lua 5.2, unpack and loadstrings are deprecated and are either moved ++-- to table.unpack() or replaced by load(). If lua was compiled without ++-- LUA_COMPAT_UNPACK and/or LUA_COMPAT_LOADSTRING, these two are not ++-- available and we add a similar compatibility layer, ourselves. ++unpack = unpack or table.unpack ++loadstring = loadstring or load ++ + function safe_mtn(...) + if monotone_path == nil then + monotone_path = os.getenv("mtn") +diff --git a/test/func/automate_get_attributes/__driver__.lua b/test/func/automate_get_attributes/__driver__.lua +index 2e92654..eb91015 100644 +--- a/test/func/automate_get_attributes/__driver__.lua ++++ b/test/func/automate_get_attributes/__driver__.lua +@@ -28,7 +28,7 @@ check(mtn("automate", "get_attributes", "testfile"), 0, true, true) + check(fsize("stderr") == 0) + parsed = parse_basic_io(readfile("stdout")) + -- make sure the output generated 8 stanzas +-check(table.getn(parsed) == 8) ++check(#parsed == 8) + lastkey = "" + checked = {} + for _,l in pairs(parsed) do +diff --git a/test/func/automate_interface_version/__driver__.lua b/test/func/automate_interface_version/__driver__.lua +index d969d7d..7ff79e9 100644 +--- a/test/func/automate_interface_version/__driver__.lua ++++ b/test/func/automate_interface_version/__driver__.lua +@@ -7,4 +7,4 @@ rename("stdout", "a_v") + -- MinGW's wc produces " 1" as output. Arithmetic comparison works, string comparison doesn't + check(numlines("a_v") == 1) + -- This is really ^[0-9]+\.[0-9]+$, but m4 is obfuscatory. +-check(qgrep("^[0-9]+\.[0-9]+$", "a_v")) ++check(qgrep("^[0-9]+\\.[0-9]+$", "a_v")) +diff --git a/test/func/automate_inventory_ignore_dirs/__driver__.lua b/test/func/automate_inventory_ignore_dirs/__driver__.lua +index bfb5c25..72a89bb 100644 +--- a/test/func/automate_inventory_ignore_dirs/__driver__.lua ++++ b/test/func/automate_inventory_ignore_dirs/__driver__.lua +@@ -14,7 +14,7 @@ function sortContentsByLine(input) + table.insert(lines, string.sub(input, theStart)) + table.sort(lines) + +- local len = table.getn(lines) ++ local len = #lines + local output = lines[1] + for i = 2, len do + output = output .. delimiter .. lines[i] +diff --git a/test/func/automate_put_revision/__driver__.lua b/test/func/automate_put_revision/__driver__.lua +index 2626ec3..32bdacb 100644 +--- a/test/func/automate_put_revision/__driver__.lua ++++ b/test/func/automate_put_revision/__driver__.lua +@@ -33,5 +33,5 @@ check(mtn("automate", "put_revision", rev), 3, false, false) + -- but this should work (tests that we can use put_revision to commit a + -- single-parent revision) + check(mtn("automate", "put_file", ""), 0, false, false) +-rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision [4c2c1d846fa561601254200918fba1fd71e6795d]\n\patch \"foo\"\n from [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145] to [da39a3ee5e6b4b0d3255bfef95601890afd80709]\n" ++rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision [4c2c1d846fa561601254200918fba1fd71e6795d]\n\npatch \"foo\"\n from [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145] to [da39a3ee5e6b4b0d3255bfef95601890afd80709]\n" + check(mtn("automate", "put_revision", rev), 0, false, false) +diff --git a/test/func/automate_set_drop_attribute/__driver__.lua b/test/func/automate_set_drop_attribute/__driver__.lua +index 5369cd9..12ff4dc 100644 +--- a/test/func/automate_set_drop_attribute/__driver__.lua ++++ b/test/func/automate_set_drop_attribute/__driver__.lua +@@ -25,7 +25,7 @@ check(mtn("automate", "set_attribute", "testfile", "foo", "bar"), 0, false, fals + check(mtn("automate", "get_attributes", "testfile"), 0, true, false) + parsed = parse_basic_io(readfile("stdout")) + +-check(table.getn(parsed) == 2) ++check(#parsed == 2) + for _,l in pairs(parsed) do + if l.name == "attr" then + key = l.values[1] +@@ -44,7 +44,7 @@ check(mtn("automate", "drop_attribute", "testfile", "foo"), 0, true, true) + -- check if it has been really dropped + check(mtn("automate", "get_attributes", "testfile"), 0, true, false) + parsed = parse_basic_io(readfile("stdout")) +-check(table.getn(parsed) == 0) ++check(#parsed == 0) + + -- check if it escalates properly if there is no such attr to drop + check(mtn("automate", "drop_attribute", "testfile", "foo"), 1, false, true) +diff --git a/test/func/automate_stdio_band_output/__driver__.lua b/test/func/automate_stdio_band_output/__driver__.lua +index 4262d0e..88c8d63 100755 +--- a/test/func/automate_stdio_band_output/__driver__.lua ++++ b/test/func/automate_stdio_band_output/__driver__.lua +@@ -4,13 +4,13 @@ mtn_setup() + + -- check informational messages, warnings and errors + out = run_stdio("l8:bandtest4:infoe", 0, 0, "p") +-check(type(out) == "table" and table.maxn(out) == 1) ++check(type(out) == "table" and #out == 1) + + out = run_stdio("l8:bandtest7:warninge", 0, 0, "w") +-check(type(out) == "table" and table.maxn(out) == 1) ++check(type(out) == "table" and #out == 1) + + out = run_stdio("l8:bandtest5:errore", 2, 0, "e") +-check(type(out) == "table" and table.maxn(out) == 1) ++check(type(out) == "table" and #out == 1) + + -- check tickers + tickers = run_stdio("l8:bandtest6:tickere", 0, 0, "t") +@@ -38,7 +38,7 @@ end + ticker_data = {} + for _,tick in ipairs(tickers) do + ticks = split(tick, ";") +- check(table.maxn(ticks) > 0) ++ check(#ticks > 0) + for _,mtick in ipairs(ticks) do + if string.len(mtick) > 0 then + local begin,End,short,ticktype,content = +@@ -78,6 +78,6 @@ for _,tick in ipairs(tickers) do + end + + -- finally check if all tickers are completed +-check(table.maxn(ticker_data) == 0) ++check(#ticker_data == 0) + + +diff --git a/test/func/clone_weird_branch_names/__driver__.lua b/test/func/clone_weird_branch_names/__driver__.lua +index 4948a72..a97c6ea 100644 +--- a/test/func/clone_weird_branch_names/__driver__.lua ++++ b/test/func/clone_weird_branch_names/__driver__.lua +@@ -7,7 +7,7 @@ commit("my-branch[1,2]-1^3") + + copy("test.db", "test-clone.db") + -- some of the special chars need to get double-escaped to get "through" +-testURI="file://" .. test.root .. "/test-clone.db?my-branch\\\[1,2\\\]-1^3" ++testURI="file://" .. test.root .. "/test-clone.db?my-branch\\[1,2\\]-1^3" + + check(nodb_mtn("clone", testURI), 0, false, false) + check(exists("my-branch[1,2]-1^3")) +diff --git a/test/func/list_databases/__driver__.lua b/test/func/list_databases/__driver__.lua +index e3da0e9..48cd75c 100644 +--- a/test/func/list_databases/__driver__.lua ++++ b/test/func/list_databases/__driver__.lua +@@ -25,15 +25,15 @@ check(mt("db", "init", "-d", ":bar"), 0, false, false) + check(exists("managed_databases/bar.mtn")) + + check(mt("ls", "dbs"), 0, true, false) +-check(qgrep(":bar.mtn.+in.+list_databases\/managed_databases", "stdout")) ++check(qgrep(":bar.mtn.+in.+list_databases/managed_databases", "stdout")) + check(qgrep("\tno known valid workspaces", "stdout")) + + check(mt("setup", "-d", ":bar", "-b", "test.foo.branch", "test_foo"), 0, false, false) + + check(mt("ls", "dbs"), 0, true, false) + check(not qgrep("\tno known valid workspaces", "stdout")) +-check(qgrep("\ttest.foo.branch.+in.+list_databases\/test_foo", "stdout")) ++check(qgrep("\ttest.foo.branch.+in.+list_databases/test_foo", "stdout")) + + check(rename("managed_databases/bar.mtn", "managed_databases/bar.db")) + check(mt("ls", "dbs"), 0, true, false) +-check(qgrep(":bar.db.+in.+list_databases\/managed_databases", "stdout")) ++check(qgrep(":bar.db.+in.+list_databases/managed_databases", "stdout")) +diff --git a/test/func/list_workspaces/__driver__.lua b/test/func/list_workspaces/__driver__.lua +index 06dbfef..8895ed4 100644 +--- a/test/func/list_workspaces/__driver__.lua ++++ b/test/func/list_workspaces/__driver__.lua +@@ -10,17 +10,17 @@ check(samelines("stdout", {"no known valid workspaces"})) + check(raw_mtn("setup", "-d", "test.mtn", "-b", "test.branch1", "work1"), 0, false, false) + + check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false) +-check(qgrep("test.branch1.+in.+list_workspaces\/work1", "stdout")) ++check(qgrep("test.branch1.+in.+list_workspaces/work1", "stdout")) + + check(raw_mtn("setup", "-d", "test.mtn", "-b", "test.branch2", "work2"), 0, false, false) + check(rename("work1", "work3")) + + check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false) +-check(qgrep("test.branch2.+in.+list_workspaces\/work2", "stdout")) +-check(not qgrep("test.branch1.+in.+list_workspaces\/work1", "stdout")) ++check(qgrep("test.branch2.+in.+list_workspaces/work2", "stdout")) ++check(not qgrep("test.branch1.+in.+list_workspaces/work1", "stdout")) + + check(indir("work3", raw_mtn("register_workspace", "-d", "../test.mtn")), 0, false, false) + + check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false) +-check(qgrep("test.branch1.+in.+list_workspaces\/work3", "stdout")) ++check(qgrep("test.branch1.+in.+list_workspaces/work3", "stdout")) + +diff --git a/test/func/log_--no-files_and_--merges/__driver__.lua b/test/func/log_--no-files_and_--merges/__driver__.lua +index b27551e..de4d26d 100644 +--- a/test/func/log_--no-files_and_--merges/__driver__.lua ++++ b/test/func/log_--no-files_and_--merges/__driver__.lua +@@ -29,8 +29,8 @@ R2=base_revision() + + -- check that merge is included by default + check(mtn("log"), 0, true, false) +-check(qgrep("^[\\|\\\\\/ ]+Revision.*"..R2, "stdout")) ++check(qgrep("^[\\|\\\\/ ]+Revision.*"..R2, "stdout")) + + -- and that it is excluded by --no-merges + check(mtn("log", "--no-merges"), 0, true, false) +-check(not qgrep("^[\\|\\\\\/ ]+Revision.*"..R2, "stdout")) ++check(not qgrep("^[\\|\\\\/ ]+Revision.*"..R2, "stdout")) +diff --git a/test/func/manpage/__driver__.lua b/test/func/manpage/__driver__.lua +index 775714e..38e5ee7 100644 +--- a/test/func/manpage/__driver__.lua ++++ b/test/func/manpage/__driver__.lua +@@ -5,7 +5,7 @@ rename("stdout", "manpage") + + -- check for a proper header line + check(mtn("version"), 0, true, false) +-local s,e,version = string.find(readfile("stdout"), "(monotone %d+\.%d+%S*)") ++local s,e,version = string.find(readfile("stdout"), "(monotone %d+%.%d+%S*)") + check(qgrep(".TH \"monotone\" 1 \"[0-9]{4}-[0-9]{2}-[0-9]{2}\" \"" .. version .. "\"", "manpage")) + + -- check required sections +diff --git a/test/func/netsync_negotiation/__driver__.lua b/test/func/netsync_negotiation/__driver__.lua +index 2efe421..c776f93 100644 +--- a/test/func/netsync_negotiation/__driver__.lua ++++ b/test/func/netsync_negotiation/__driver__.lua +@@ -87,10 +87,10 @@ function check_same_revs(cmd1, cmd2) + check(cmd2, 0, true, false) + local data2 = {} + for l in io.lines("stdout") do table.insert(data2, l) end +- L("Command 1 has ", table.getn(data1), " lines.") +- L("Command 2 has ", table.getn(data2), " lines.") +- check(table.getn(data1) == table.getn(data2)) +- for i = 1, table.getn(data1) do ++ L("Command 1 has ", #data1, " lines.") ++ L("Command 2 has ", #data2, " lines.") ++ check(#data1 == #data2) ++ for i = 1, #data1 do + local hash_len = 40 + check(data1[i]:sub(1, hash_len) == data2[i]:sub(1, hash_len)) + end +diff --git a/test/func/serve-automate-single-run/__driver__.lua b/test/func/serve-automate-single-run/__driver__.lua +index 87b1ab7..b65b9c1 100644 +--- a/test/func/serve-automate-single-run/__driver__.lua ++++ b/test/func/serve-automate-single-run/__driver__.lua +@@ -28,7 +28,7 @@ server = netsync.start({"--rcfile=allow-automate.lua"}) + + check(mtn2("automate", "remote", "--remote-stdio-host", server.address, + "interface_version"), 0, true, false) +-check(qgrep("^[0-9]{2,}\.[0-9]+$", "stdout")) ++check(qgrep("^[0-9]{2,}\\.[0-9]+$", "stdout")) + + check(mtn2("automate", "remote", "--remote-stdio-host", server.address, + "leaves"), 0, true, false) +diff --git a/test/func/serve-automate/__driver__.lua b/test/func/serve-automate/__driver__.lua +index 32b2eaf..9e993dc 100644 +--- a/test/func/serve-automate/__driver__.lua ++++ b/test/func/serve-automate/__driver__.lua +@@ -14,7 +14,7 @@ server = netsync.start({"--rcfile=deny-automate.lua"}) + + local errors = run_remote_stdio(server, "l17:interface_versione", 1, 0, "e") + check( +- table.maxn(errors) == 1 and ++ #errors == 1 and + errors[1] == "misuse: Sorry, you aren't allowed to do that." + ) + +@@ -45,7 +45,7 @@ check( + + local errors = run_remote_stdio(server, "l5:stdioe", 1, 0, "e") + check( +- table.maxn(errors) == 1 and ++ #errors == 1 and + errors[1] == "error: sorry, that can't be run remotely or over stdio" + ) + +diff --git a/test/func/ssh_agent/__driver__.lua b/test/func/ssh_agent/__driver__.lua +index d927360..a36ce90 100644 +--- a/test/func/ssh_agent/__driver__.lua ++++ b/test/func/ssh_agent/__driver__.lua +@@ -81,7 +81,7 @@ end + + check({"ssh-agent"}, 0, true, false) + for line in io.lines("stdout") do +- for k, v in string.gmatch(line, "([%w_]+)=([%w/\.-]+)") do ++ for k, v in string.gmatch(line, "([%w_]+)=([%w/%.-]+)") do + set_env(k, v) + end + end +@@ -91,7 +91,7 @@ check(mtn("ssh_agent_add"), 0, false, false) + check({"ssh-add", "-l"}, 0, true, false) + ok = false + for line in io.lines("stdout") do +- for k in string.gmatch(line, "tester@test\.net") do ++ for k in string.gmatch(line, "tester@test%.net") do + ok = true + end + end +@@ -288,7 +288,7 @@ check(mtn("ssh_agent_add", "--key", "test2@tester.net"), 0, false, false) + check({"ssh-add", "-l"}, 0, true, false) + ok = false + for line in io.lines("stdout") do +- for k in string.gmatch(line, "test2@tester\.net") do ++ for k in string.gmatch(line, "test2@tester%.net") do + ok = true + end + end +@@ -338,7 +338,7 @@ check(mtn("ssh_agent_add", "--key", "test_pass@tester.net"), 0, false, false, "p + check({"ssh-add", "-l"}, 0, true, false) + ok = false + for line in io.lines("stdout") do +- for k in string.gmatch(line, "test_pass@tester\.net") do ++ for k in string.gmatch(line, "test_pass@tester%.net") do + ok = true + end + end +diff --git a/test/func/two_parent_workspace_inodeprints/__driver__.lua b/test/func/two_parent_workspace_inodeprints/__driver__.lua +index bd6c558..66d5150 100644 +--- a/test/func/two_parent_workspace_inodeprints/__driver__.lua ++++ b/test/func/two_parent_workspace_inodeprints/__driver__.lua +@@ -19,13 +19,13 @@ check(mtn("merge_into_workspace", other), 0, false, false) + + -- check that we've got the expected initial status + check(mtn("status"), 0, true, false) +-check(qgrep("patched[ ]\+foo", "stdout")) ++check(qgrep("patched[ ]+foo", "stdout")) + + -- enable inodeprints + writefile("_MTN/inodeprints") + + check(mtn("status"), 0, true, false) +-check(qgrep("patched[ ]\+foo", "stdout")) ++check(qgrep("patched[ ]+foo", "stdout")) + + sleep(5) + +diff --git a/test/func/user_commands/extra_rc b/test/func/user_commands/extra_rc +index 2ec5f9f..aad3764 100644 +--- a/test/func/user_commands/extra_rc ++++ b/test/func/user_commands/extra_rc +@@ -5,7 +5,8 @@ function check_head(...) + io.stderr:write("automate call failed\n") + return + end +- arghead = unpack(arg) ++ local arg = {...} ++ arghead = arg[1] + heads = heads:gsub("^%s*(.-)%s*$", "%1") -- trim leading and trailing whitespace + if (heads == arghead) then + io.write("heads are equal\n") +diff --git a/test/src/testlib.lua b/test/src/testlib.lua +index 6d21a93..19eb278 100644 +--- a/test/src/testlib.lua ++++ b/test/src/testlib.lua +@@ -30,6 +30,13 @@ files = {stdout = nil, stdin = nil, stderr = nil} + -- for convenience, this is the first word of what get_ostype() returns. + ostype = string.sub(get_ostype(), 1, string.find(get_ostype(), " ")-1) + ++-- Since Lua 5.2, unpack and loadstrings are deprecated and are either moved ++-- to table.unpack() or replaced by load(). If lua was compiled without ++-- LUA_COMPAT_UNPACK and/or LUA_COMPAT_LOADSTRING, these two are not ++-- available and we add a similar compatibility layer, ourselves. ++unpack = unpack or table.unpack ++loadstring = loadstring or load ++ + -- table of per-test values + test = {} + -- misc per-test values +@@ -310,17 +317,11 @@ end + -- to want to include from the dir for the current test, + -- since in that case it could just go in the driver file. + function include(name) +- local func, e = loadfile(testdir.."/"..name) +- if func == nil then err(e, 2) end +- setfenv(func, getfenv(2)) +- func() ++ dofile(testdir.."/"..name) + end + + function includecommon(name) +- local func, e = loadfile(srcdir.."/common/"..name) +- if func == nil then err(e, 2) end +- setfenv(func, getfenv(2)) +- func() ++ dofile(srcdir.."/common/"..name) + end + + function trim(str) +@@ -479,12 +480,11 @@ end + function samelines(f, t) + local fl = {} + for l in io.lines(f) do table.insert(fl, l) end +- if not (table.getn(fl) == table.getn(t)) then +- L(locheader(), string.format("file has %s lines; table has %s\n", +- table.getn(fl), table.getn(t))) ++ if not (#fl == #t) then ++ L(locheader(), string.format("file has %s lines; table has %s\n", #fl, #t)) + return false + end +- for i=1,table.getn(t) do ++ for i=1,#t do + if fl[i] ~= t[i] then + if fl[i] then + L(locheader(), string.format("file[%d] = '%s'; table[%d] = '%s'\n", +@@ -502,12 +502,11 @@ end + function greplines(f, t) + local fl = {} + for l in io.lines(f) do table.insert(fl, l) end +- if not (table.getn(fl) == table.getn(t)) then +- L(locheader(), string.format("file has %s lines; table has %s\n", +- table.getn(fl), table.getn(t))) ++ if not (#fl == #t) then ++ L(locheader(), string.format("file has %s lines; table has %s\n", #fl, #t)) + return false + end +- for i=1,table.getn(t) do ++ for i=1,#t do + if not regex.search(t[i], fl[i]) then + L(locheader(), string.format("file[i] = '%s'; table[i] = '%s'\n", + fl[i], t[i])) +@@ -577,7 +576,7 @@ function tail(...) + local mylines = {} + for l in io.lines(file) do + table.insert(mylines, l) +- if table.getn(mylines) > num then ++ if #mylines > num then + table.remove(mylines, 1) + end + end +@@ -932,8 +931,8 @@ function run_tests(debugging, list_only, run_dir, logname, args, progress) + if _1 then + l = l + 0 + r = r + 0 +- if l < 1 then l = table.getn(tests) + l + 1 end +- if r < 1 then r = table.getn(tests) + r + 1 end ++ if l < 1 then l = #tests + l + 1 end ++ if r < 1 then r = #tests + r + 1 end + if l > r then l,r = r,l end + for j = l,r do + torun[j] = tests[j] +@@ -941,7 +940,7 @@ function run_tests(debugging, list_only, run_dir, logname, args, progress) + run_all = false + elseif string.find(a, "^-?%d+$") then + r = a + 0 +- if r < 1 then r = table.getn(tests) + r + 1 end ++ if r < 1 then r = #tests + r + 1 end + torun[r] = tests[r] + run_all = false + else +-- +tg: (1150daa..) lua-5.2 (depends on: master) diff --git a/monotone.spec b/monotone.spec index 2696f24..57e244a 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 14%{?dist} +Release: 15%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -23,6 +23,13 @@ Patch3: monotone-1.0-pcre.patch Patch4: monotone-1.0-fix-bash_completion-test.patch # See rhbz#919827 Patch5: monotone-1.0-fix-diff_patch_drop-test.patch +# Fix FTBFS for Botan 1.10.X +# https://code.monotone.ca/p/monotone/issues/182/ +Patch6: monotone-1.0-botan-1.10.patch +# Fix FTBFS for Lua 5.2 +Patch7: monotone-1.0-lua-5.2.patch +# Fix texinfo errors with texinfo >= 5.0 +Patch8: monotone-1.0-fix-texinfo.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 @@ -85,6 +92,9 @@ and then pass commands to it. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 # fix FTBFS rhbz#914191 sed -e "s|shared_dynamic_cast|dynamic_pointer_cast|g" \ @@ -98,12 +108,14 @@ make %{?_smp_mflags} %check +export LC_MESSAGES=en_US export DISABLE_NETWORK_TESTS=1 make %{?_smp_mflags} check || { head -n-0 test/work/*.log; false; } %install rm -rf %{buildroot} +export LC_MESSAGES=en_US make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_infodir}/dir mv %{buildroot}%{_datadir}/doc/%{name} _doc @@ -234,6 +246,10 @@ fi %changelog +* Tue Oct 8 2013 Thomas Moschny - 1.0-15 +- Add patches for building with Botan 1.10, Lua 5.2, + and Texinfo >= 5.0. + * Sat Aug 03 2013 Fedora Release Engineering - 1.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 145a2d18ef6fdb0c73344a0e17612019dce8b780 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 23 May 2014 01:45:28 +0200 Subject: [PATCH 082/145] Rebuild for boost 1.55.0 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 57e244a..6d29799 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 15%{?dist} +Release: 16%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -246,6 +246,9 @@ fi %changelog +* Fri May 23 2014 Petr Machata - 1.0-16 +- Rebuild for boost 1.55.0 + * Tue Oct 8 2013 Thomas Moschny - 1.0-15 - Add patches for building with Botan 1.10, Lua 5.2, and Texinfo >= 5.0. From f3ac9099362da6054eaf87b8ff83b27d93cde726 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 06:02:38 -0500 Subject: [PATCH 083/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 6d29799..6d1d354 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.0 -Release: 16%{?dist} +Release: 17%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -246,6 +246,9 @@ fi %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Fri May 23 2014 Petr Machata - 1.0-16 - Rebuild for boost 1.55.0 From 682939d04c113963dc6ed658520c7bf56f4001c7 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 19 Jul 2014 19:19:17 +0200 Subject: [PATCH 084/145] Update to 1.1. - Remove patches and fixes not needed anymore. - Modernize spec file. --- .gitignore | 1 + monotone-1.0-botan-1.10.patch | 944 -------------------- monotone-1.0-disable-xdelta-test.patch | 41 - monotone-1.0-file_handle.patch | 155 ---- monotone-1.0-fix-bash_completion-test.patch | 24 - monotone-1.0-fix-diff_patch_drop-test.patch | 11 - monotone-1.0-fix-help.patch | 21 - monotone-1.0-fix-texinfo.patch | 623 ------------- monotone-1.0-lua-5.2.patch | 752 ---------------- monotone-1.0-pcre.patch | 11 - monotone-1.0-stacktrace-on-crash.patch | 63 ++ monotone.spec | 57 +- sources | 2 +- 13 files changed, 76 insertions(+), 2629 deletions(-) delete mode 100644 monotone-1.0-botan-1.10.patch delete mode 100644 monotone-1.0-disable-xdelta-test.patch delete mode 100644 monotone-1.0-file_handle.patch delete mode 100644 monotone-1.0-fix-bash_completion-test.patch delete mode 100644 monotone-1.0-fix-diff_patch_drop-test.patch delete mode 100644 monotone-1.0-fix-help.patch delete mode 100644 monotone-1.0-fix-texinfo.patch delete mode 100644 monotone-1.0-lua-5.2.patch delete mode 100644 monotone-1.0-pcre.patch create mode 100644 monotone-1.0-stacktrace-on-crash.patch diff --git a/.gitignore b/.gitignore index 86e8bd6..8cc96f4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ monotone-0.48.tar.gz /monotone-0.99.tar.gz /monotone-0.99.1.tar.gz /monotone-1.0.tar.bz2 +/monotone-1.1.tar.bz2 diff --git a/monotone-1.0-botan-1.10.patch b/monotone-1.0-botan-1.10.patch deleted file mode 100644 index 0da8f2f..0000000 --- a/monotone-1.0-botan-1.10.patch +++ /dev/null @@ -1,944 +0,0 @@ -From: Thomas Moschny -Subject: [PATCH] t/botan-1.10 - -Botan 1.10 support. - -Apply patches from these upstream commits: - -f4feb3fdc68e4f955909450b2dcb3ff9312dbc9e -9ff6e41adc6f40ae054fb4487f356bf69324dbdb -8861f8555ef90a04a99404e9f8d5510b2ddb10e6 - ---- - src/database.cc | 42 ++++++++++++------ - src/gzip.cc | 48 +++++++++++++------- - src/gzip.hh | 17 ++++++- - src/key_packet.cc | 4 +- - src/key_store.cc | 129 +++++++++++++++++++++++++++++++++++++++++++++--------- - src/monotone.cc | 56 +++++++++++++++++------- - src/packet.cc | 22 ++++++++-- - src/packet.hh | 19 ++++++++ - src/sha1.cc | 5 ++- - src/ssh_agent.cc | 6 +-- - src/transforms.cc | 15 ++++--- - 11 files changed, 279 insertions(+), 84 deletions(-) - -diff --git a/src/database.cc b/src/database.cc -index 520fddd..c18517c 100644 ---- a/src/database.cc -+++ b/src/database.cc -@@ -98,12 +98,15 @@ using boost::get; - using boost::tuple; - using boost::lexical_cast; - -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,5) -+using Botan::PK_Encryptor_EME; -+#else - using Botan::PK_Encryptor; -+#endif - using Botan::PK_Verifier; - using Botan::SecureVector; - using Botan::X509_PublicKey; - using Botan::RSA_PublicKey; --using Botan::get_pk_encryptor; - - int const one_row = 1; - int const one_col = 1; -@@ -3425,9 +3428,8 @@ database::encrypt_rsa(key_id const & pub_id, - rsa_pub_key pub; - get_key(pub_id, pub); - -- SecureVector pub_block; -- pub_block.set(reinterpret_cast(pub().data()), -- pub().size()); -+ SecureVector pub_block -+ (reinterpret_cast(pub().data()), pub().size()); - - shared_ptr x509_key(Botan::X509::load_key(pub_block)); - shared_ptr pub_key -@@ -3436,23 +3438,32 @@ database::encrypt_rsa(key_id const & pub_id, - throw recoverable_failure(origin::system, - "Failed to get RSA encrypting key"); - -+ SecureVector ct; -+ -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,5) -+ PK_Encryptor_EME encryptor(*pub_key, "EME1(SHA-1)"); -+ ct = encryptor.encrypt( -+ reinterpret_cast(plaintext.data()), -+ plaintext.size(), lazy_rng::get()); -+#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) - shared_ptr - encryptor(get_pk_encryptor(*pub_key, "EME1(SHA-1)")); - -- SecureVector ct; -- --#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) - ct = encryptor->encrypt( - reinterpret_cast(plaintext.data()), - plaintext.size(), lazy_rng::get()); - #else -+ shared_ptr -+ encryptor(Botan::get_pk_encryptor(*pub_key, "EME1(SHA-1)")); -+ - ct = encryptor->encrypt( - reinterpret_cast(plaintext.data()), - plaintext.size()); - #endif -- ciphertext = rsa_oaep_sha_data(string(reinterpret_cast(ct.begin()), -- ct.size()), -- origin::database); -+ -+ ciphertext = rsa_oaep_sha_data( -+ string(reinterpret_cast(ct.begin()), ct.size()), -+ origin::database); - } - - cert_status -@@ -3471,14 +3482,13 @@ database::check_signature(key_id const & id, - else - { - rsa_pub_key pub; -- SecureVector pub_block; - - if (!public_key_exists(id)) - return cert_unknown; - - get_key(id, pub); -- pub_block.set(reinterpret_cast(pub().data()), -- pub().size()); -+ SecureVector pub_block -+ (reinterpret_cast(pub().data()), pub().size()); - - L(FL("building verifier for %d-byte pub key") % pub_block.size()); - shared_ptr x509_key(Botan::X509::load_key(pub_block)); -@@ -3488,7 +3498,11 @@ database::check_signature(key_id const & id, - E(pub_key, id.inner().made_from, - F("Failed to get RSA verifying key for %s") % id); - -- verifier.reset(get_pk_verifier(*pub_key, "EMSA3(SHA-1)")); -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ verifier.reset(new Botan::PK_Verifier(*pub_key, "EMSA3(SHA1)")); -+#else -+ verifier.reset(Botan::get_pk_verifier(*pub_key, "EMSA3(SHA-1)")); -+#endif - - /* XXX This is ugly. We need to keep the key around - * as long as the verifier is around, but the shared_ptr will go -diff --git a/src/gzip.cc b/src/gzip.cc -index b74af6d..2cfea09 100644 ---- a/src/gzip.cc -+++ b/src/gzip.cc -@@ -110,7 +110,7 @@ Gzip_Compression::Gzip_Compression(u32bit l) : - if(deflateInit2(&(zlib->stream), level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY) != Z_OK) - { - delete zlib; zlib = 0; -- throw Exception("Gzip_Compression: Memory allocation error"); -+ throw Memory_Exhaustion(); - } - } - -@@ -137,7 +137,7 @@ void Gzip_Compression::start_msg() - /************************************************* - * Compress Input with Gzip * - *************************************************/ --void Gzip_Compression::write(const byte input[], u32bit length) -+void Gzip_Compression::write(const byte input[], filter_length_t length) - { - - count += length; -@@ -152,7 +152,7 @@ void Gzip_Compression::write(const byte input[], u32bit length) - zlib->stream.avail_out = buffer.size(); - int rc = deflate(&(zlib->stream), Z_NO_FLUSH); - if (rc != Z_OK && rc != Z_STREAM_END) -- throw Exception("Internal error in Gzip_Compression deflate."); -+ throw Invalid_State("Internal error in Gzip_Compression deflate."); - send(buffer.begin(), buffer.size() - zlib->stream.avail_out); - } - } -@@ -172,7 +172,7 @@ void Gzip_Compression::end_msg() - zlib->stream.avail_out = buffer.size(); - rc = deflate(&(zlib->stream), Z_FINISH); - if (rc != Z_OK && rc != Z_STREAM_END) -- throw Exception("Internal error in Gzip_Compression finishing deflate."); -+ throw Invalid_State("Internal error in Gzip_Compression finishing deflate."); - send(buffer.begin(), buffer.size() - zlib->stream.avail_out); - } - -@@ -228,7 +228,7 @@ Gzip_Decompression::Gzip_Decompression() : buffer(DEFAULT_BUFFERSIZE), - no_writes(true), pipe(new Hash_Filter("CRC32")), footer(0) - { - if (DEFAULT_BUFFERSIZE < sizeof(GZIP::GZIP_HEADER)) -- throw Exception("DEFAULT_BUFFERSIZE is too small"); -+ throw Decoding_Error("DEFAULT_BUFFERSIZE is too small"); - - zlib = new Zlib_Stream; - -@@ -237,7 +237,7 @@ Gzip_Decompression::Gzip_Decompression() : buffer(DEFAULT_BUFFERSIZE), - if(inflateInit2(&(zlib->stream), -15) != Z_OK) - { - delete zlib; zlib = 0; -- throw Exception("Gzip_Decompression: Memory allocation error"); -+ throw Memory_Exhaustion(); - } - } - -@@ -256,7 +256,7 @@ Gzip_Decompression::~Gzip_Decompression() - void Gzip_Decompression::start_msg() - { - if (!no_writes) -- throw Exception("Gzip_Decompression: start_msg after already writing"); -+ throw Decoding_Error("Gzip_Decompression: start_msg after already writing"); - - pipe.start_msg(); - datacount = 0; -@@ -267,7 +267,7 @@ void Gzip_Decompression::start_msg() - /************************************************* - * Decompress Input with Gzip * - *************************************************/ --void Gzip_Decompression::write(const byte input[], u32bit length) -+void Gzip_Decompression::write(const byte input[], filter_length_t length) - { - if(length) no_writes = false; - -@@ -277,15 +277,16 @@ void Gzip_Decompression::write(const byte input[], u32bit length) - u32bit eat_len = eat_footer(input, length); - input += eat_len; - length -= eat_len; -- if (length == 0) -- return; - } - -+ if (length == 0) -+ return; -+ - // Check the gzip header - if (pos < sizeof(GZIP::GZIP_HEADER)) - { -- u32bit len = std::min((u32bit)sizeof(GZIP::GZIP_HEADER)-pos, length); -- u32bit cmplen = len; -+ filter_length_t len = std::min((filter_length_t)sizeof(GZIP::GZIP_HEADER)-pos, length); -+ filter_length_t cmplen = len; - // The last byte is the OS flag - we don't care about that - if (pos + len - 1 >= GZIP::HEADER_POS_OS) - cmplen--; -@@ -317,8 +318,8 @@ void Gzip_Decompression::write(const byte input[], u32bit length) - if(rc == Z_NEED_DICT) - throw Decoding_Error("Gzip_Decompression: Need preset dictionary"); - if(rc == Z_MEM_ERROR) -- throw Exception("Gzip_Decompression: Memory allocation error"); -- throw Exception("Gzip_Decompression: Unknown decompress error"); -+ throw Memory_Exhaustion(); -+ throw Decoding_Error("Gzip_Decompression: Unknown decompress error"); - } - send(buffer.begin(), buffer.size() - zlib->stream.avail_out); - pipe.write(buffer.begin(), buffer.size() - zlib->stream.avail_out); -@@ -346,8 +347,14 @@ u32bit Gzip_Decompression::eat_footer(const byte input[], u32bit length) - if (footer.size() >= GZIP::FOOTER_LENGTH) - throw Decoding_Error("Gzip_Decompression: Data integrity error in footer"); - -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+ size_t eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(), -+ static_cast(length)); -+ footer += std::make_pair(input, eat_len); -+#else - u32bit eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(), length); - footer.append(input, eat_len); -+#endif - - if (footer.size() == GZIP::FOOTER_LENGTH) - { -@@ -364,7 +371,7 @@ u32bit Gzip_Decompression::eat_footer(const byte input[], u32bit length) - void Gzip_Decompression::check_footer() - { - if (footer.size() != GZIP::FOOTER_LENGTH) -- throw Exception("Gzip_Decompression: Error finalizing decompression"); -+ throw Decoding_Error("Gzip_Decompression: Error finalizing decompression"); - - pipe.end_msg(); - -@@ -377,7 +384,12 @@ void Gzip_Decompression::check_footer() - for (int i = 0; i < 4; i++) - buf[3-i] = tmpbuf[i]; - -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+ tmpbuf.resize(4); -+ tmpbuf.copy(footer.begin(), 4); -+#else - tmpbuf.set(footer.begin(), 4); -+#endif - if (buf != tmpbuf) - throw Decoding_Error("Gzip_Decompression: Data integrity error - CRC32 error"); - -@@ -400,7 +412,7 @@ void Gzip_Decompression::end_msg() - // read, clear() will reset no_writes - if(no_writes) return; - -- throw Exception("Gzip_Decompression: didn't find footer"); -+ throw Decoding_Error("Gzip_Decompression: didn't find footer"); - - } - -@@ -412,7 +424,11 @@ void Gzip_Decompression::clear() - no_writes = true; - inflateReset(&(zlib->stream)); - -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+ footer.clear(); -+#else - footer.destroy(); -+#endif - pos = 0; - datacount = 0; - } -diff --git a/src/gzip.hh b/src/gzip.hh -index f3ea628..5c25fc9 100644 ---- a/src/gzip.hh -+++ b/src/gzip.hh -@@ -7,11 +7,18 @@ - #ifndef BOTAN_EXT_GZIP_H__ - #define BOTAN_EXT_GZIP_H__ - -+#include - #include - #include - - namespace Botan { - -+#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,4) -+// Only 1.9.4 and newer export the Memory_Exception. Give this gzip -+// implementation something compatible to work with. -+typedef std::bad_alloc Memory_Exhaustion; -+#endif -+ - namespace GZIP { - - /* A basic header - we only need to set the IDs and compression method */ -@@ -30,13 +37,19 @@ namespace GZIP { - - } - -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+typedef size_t filter_length_t; -+#else -+typedef u32bit filter_length_t; -+#endif -+ - /************************************************* - * Gzip Compression Filter * - *************************************************/ - class Gzip_Compression : public Filter - { - public: -- void write(const byte input[], u32bit length); -+ void write(const byte input[], filter_length_t length); - void start_msg(); - void end_msg(); - std::string name() const { return "Gzip_Compression"; } -@@ -60,7 +73,7 @@ class Gzip_Compression : public Filter - class Gzip_Decompression : public Filter - { - public: -- void write(const byte input[], u32bit length); -+ void write(const byte input[], filter_length_t length); - void start_msg(); - void end_msg(); - std::string name() const { return "Gzip_Decompression"; } -diff --git a/src/key_packet.cc b/src/key_packet.cc -index ccd0e06..3a56c69 100644 ---- a/src/key_packet.cc -+++ b/src/key_packet.cc -@@ -106,8 +106,8 @@ namespace - void validate_public_key_data(string const & name, string const & keydata) const - { - string decoded = decode_base64_as(keydata, origin::user); -- Botan::SecureVector key_block; -- key_block.set(reinterpret_cast(decoded.c_str()), decoded.size()); -+ Botan::SecureVector key_block -+ (reinterpret_cast(decoded.c_str()), decoded.size()); - try - { - Botan::X509::load_key(key_block); -diff --git a/src/key_store.cc b/src/key_store.cc -index ac8b8bb..a0c6494 100644 ---- a/src/key_store.cc -+++ b/src/key_store.cc -@@ -55,6 +55,7 @@ using Botan::PK_Signer; - using Botan::Pipe; - using Botan::get_pk_decryptor; - using Botan::get_cipher; -+using Botan::byte; - - - typedef pair key_info; -@@ -572,13 +573,21 @@ key_store_state::decrypt_private_key(key_id const & id, - try // with empty passphrase - { - Botan::DataSource_Memory ds(kp.priv()); --#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+ pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), Dummy_UI())); -+#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) - pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), "")); - #else - pkcs8_key.reset(Botan::PKCS8::load_key(ds, "")); - #endif - } -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+ catch (Passphrase_Required & e) -+#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) -+ catch (Botan::Invalid_Argument & e) -+#else - catch (Botan::Exception & e) -+#endif - { - L(FL("failed to load key with no passphrase: %s") % e.what()); - -@@ -605,13 +614,18 @@ key_store_state::decrypt_private_key(key_id const & id, - { - Botan::DataSource_Memory ds(kp.priv()); - #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) -- pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), phrase())); -+ pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), -+ phrase())); - #else - pkcs8_key.reset(Botan::PKCS8::load_key(ds, phrase())); - #endif - break; - } -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) -+ catch (Botan::Invalid_Argument) -+#else - catch (Botan::Exception & e) -+#endif - { - cycles++; - L(FL("decrypt_private_key: failure %d to load encrypted key: %s") -@@ -697,9 +711,18 @@ key_store::create_key_pair(database & db, - - // serialize and maybe encrypt the private key - keypair kp; -- SecureVector pubkey, privkey; -+ SecureVector pubkey, privkey; - - unfiltered_pipe->start_msg(); -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ if ((*maybe_passphrase)().length()) -+ unfiltered_pipe->write( -+ Botan::PKCS8::BER_encode(priv, lazy_rng::get(), -+ (*maybe_passphrase)(), -+ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)")); -+ else -+ unfiltered_pipe->write(Botan::PKCS8::PEM_encode(priv)); -+#else - if ((*maybe_passphrase)().length()) - Botan::PKCS8::encrypt_key(priv, *unfiltered_pipe, - #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) -@@ -710,13 +733,20 @@ key_store::create_key_pair(database & db, - Botan::RAW_BER); - else - Botan::PKCS8::encode(priv, *unfiltered_pipe); -+#endif - unfiltered_pipe->end_msg(); -- kp.priv = rsa_priv_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), -- origin::internal); -+ -+ kp.priv = rsa_priv_key( -+ unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), -+ origin::internal); - - // serialize the public key - unfiltered_pipe->start_msg(); -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ unfiltered_pipe->write(Botan::X509::BER_encode(priv)); -+#else - Botan::X509::encode(priv, *unfiltered_pipe, Botan::RAW_BER); -+#endif - unfiltered_pipe->end_msg(); - kp.pub = rsa_pub_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), - origin::internal); -@@ -783,6 +813,15 @@ key_store::change_key_passphrase(key_id const & id) - get_passphrase(new_phrase, name, id, true, false); - - unfiltered_pipe->start_msg(); -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ if (new_phrase().length()) -+ unfiltered_pipe->write( -+ Botan::PKCS8::BER_encode(*priv, lazy_rng::get(), -+ new_phrase(), -+ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)")); -+ else -+ unfiltered_pipe->write(Botan::PKCS8::PEM_encode(*priv)); -+#else - if (new_phrase().length()) - Botan::PKCS8::encrypt_key(*priv, *unfiltered_pipe, - #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) -@@ -793,6 +832,7 @@ key_store::change_key_passphrase(key_id const & id) - Botan::RAW_BER); - else - Botan::PKCS8::encode(*priv, *unfiltered_pipe); -+#endif - - unfiltered_pipe->end_msg(); - kp.priv = rsa_priv_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), -@@ -813,19 +853,32 @@ key_store::decrypt_rsa(key_id const & id, - load_key_pair(*this, id, kp); - shared_ptr priv_key = s->decrypt_private_key(id); - -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ Botan::PK_Decryptor_EME decryptor(*priv_key, "EME1(SHA-1)"); -+ -+ SecureVector plain = -+ decryptor.decrypt(reinterpret_cast(ciphertext().data()), -+ ciphertext().size()); -+ plaintext = string(plain.begin(), plain.end()); -+#else - shared_ptr -- decryptor(get_pk_decryptor(*priv_key, "EME1(SHA-1)")); -+ decryptor(Botan::get_pk_decryptor(*priv_key, "EME1(SHA-1)")); - -- SecureVector plain = -- decryptor->decrypt(reinterpret_cast(ciphertext().data()), -+ SecureVector plain = -+ decryptor->decrypt(reinterpret_cast(ciphertext().data()), - ciphertext().size()); - plaintext = string(reinterpret_cast(plain.begin()), - plain.size()); -+#endif - } -- catch (Botan::Exception & ex) -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) -+ catch (std::exception & e) -+#else -+ catch (Botan::Exception & e) -+#endif - { - E(false, ciphertext.made_from, -- F("Botan error decrypting data: '%s'") % ex.what()); -+ F("Botan error decrypting data: '%s'") % e.what()); - } - } - -@@ -856,9 +909,9 @@ key_store::make_signature(database & db, - { - if (agent.connected()) { - //grab the monotone public key as an RSA_PublicKey -- SecureVector pub_block; -- pub_block.set(reinterpret_cast(key.pub().data()), -- key.pub().size()); -+ SecureVector pub_block -+ (reinterpret_cast(key.pub().data()), -+ key.pub().size()); - L(FL("make_signature: building %d-byte pub key") % pub_block.size()); - shared_ptr x509_key = - shared_ptr(Botan::X509::load_key(pub_block)); -@@ -884,7 +937,7 @@ key_store::make_signature(database & db, - || s->ssh_sign_mode == "check" - || s->ssh_sign_mode == "no") - { -- SecureVector sig; -+ SecureVector sig; - - // we permit the user to relax security here, by caching a decrypted key - // (if they permit it) through the life of a program run. this helps when -@@ -908,7 +961,13 @@ key_store::make_signature(database & db, - L(FL("make_signature: adding private key (%s) to ssh-agent") % id); - agent.add_identity(*priv_key, name()); - } -- signer = shared_ptr(get_pk_signer(*priv_key, "EMSA3(SHA-1)")); -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ signer = shared_ptr( -+ new PK_Signer(*priv_key, "EMSA3(SHA-1)")); -+#else -+ signer = shared_ptr( -+ get_pk_signer(*priv_key, "EMSA3(SHA-1)")); -+#endif - - /* If persist_phrase is true, the RSA_PrivateKey object is - cached in s->active_keys and will survive as long as the -@@ -919,11 +978,11 @@ key_store::make_signature(database & db, - - #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) - sig = signer->sign_message( -- reinterpret_cast(tosign.data()), -+ reinterpret_cast(tosign.data()), - tosign.size(), lazy_rng::get()); - #else - sig = signer->sign_message( -- reinterpret_cast(tosign.data()), -+ reinterpret_cast(tosign.data()), - tosign.size()); - #endif - sig_string = string(reinterpret_cast(sig.begin()), sig.size()); -@@ -988,6 +1047,15 @@ key_store::export_key_for_agent(key_id const & id, - // This pipe cannot sensibly be recycled. - Pipe p(new Botan::DataSink_Stream(os)); - p.start_msg(); -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ if (new_phrase().length()) -+ p.write(Botan::PKCS8::PEM_encode(*priv, -+ lazy_rng::get(), -+ new_phrase(), -+ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)")); -+ else -+ p.write(Botan::PKCS8::PEM_encode(*priv)); -+#else - if (new_phrase().length()) - Botan::PKCS8::encrypt_key(*priv, - p, -@@ -998,6 +1066,7 @@ key_store::export_key_for_agent(key_id const & id, - "PBE-PKCS5v20(SHA-1,TripleDES/CBC)"); - else - Botan::PKCS8::encode(*priv, p); -+#endif - p.end_msg(); - } - -@@ -1013,7 +1082,7 @@ key_store_state::migrate_old_key_pair - rsa_pub_key const & pub) - { - keypair kp; -- SecureVector arc4_key; -+ SecureVector arc4_key; - utf8 phrase; - shared_ptr pkcs8_key; - shared_ptr priv_key; -@@ -1031,8 +1100,14 @@ key_store_state::migrate_old_key_pair - for (;;) - try - { -- arc4_key.set(reinterpret_cast(phrase().data()), -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+ arc4_key.resize(phrase().size()); -+ arc4_key.copy(reinterpret_cast(phrase().data()), -+ phrase().size()); -+#else -+ arc4_key.set(reinterpret_cast(phrase().data()), - phrase().size()); -+#endif - - Pipe arc4_decryptor(get_cipher("ARC4", arc4_key, Botan::DECRYPTION)); - -@@ -1041,7 +1116,7 @@ key_store_state::migrate_old_key_pair - // This is necessary because PKCS8::load_key() cannot currently - // recognize an unencrypted, raw-BER blob as such, but gets it - // right if it's PEM-coded. -- SecureVector arc4_decrypt(arc4_decryptor.read_all()); -+ SecureVector arc4_decrypt(arc4_decryptor.read_all()); - Botan::DataSource_Memory ds(Botan::PEM_Code::encode(arc4_decrypt, - "PRIVATE KEY")); - #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) -@@ -1051,7 +1126,11 @@ key_store_state::migrate_old_key_pair - #endif - break; - } -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) -+ catch (Botan::Invalid_Argument & e) -+#else - catch (Botan::Exception & e) -+#endif - { - L(FL("migrate_old_key_pair: failure %d to load old private key: %s") - % cycles % e.what()); -@@ -1070,6 +1149,11 @@ key_store_state::migrate_old_key_pair - - // now we can write out the new key - unfiltered_pipe->start_msg(); -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ unfiltered_pipe->write(Botan::PKCS8::BER_encode( -+ *priv_key, lazy_rng::get(), phrase(), -+ "PBE-PKCS5v20(SHA-1,TripleDES/CBC)")); -+#else - Botan::PKCS8::encrypt_key(*priv_key, *unfiltered_pipe, - #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) - lazy_rng::get(), -@@ -1077,6 +1161,7 @@ key_store_state::migrate_old_key_pair - phrase(), - "PBE-PKCS5v20(SHA-1,TripleDES/CBC)", - Botan::RAW_BER); -+#endif - unfiltered_pipe->end_msg(); - kp.priv = rsa_priv_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), - origin::internal); -@@ -1085,7 +1170,11 @@ key_store_state::migrate_old_key_pair - // Botan for the X.509 encoding of the private key implies that we want - // it to derive and produce the public key) - unfiltered_pipe->start_msg(); -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0) -+ unfiltered_pipe->write(Botan::X509::BER_encode(*priv_key)); -+#else - Botan::X509::encode(*priv_key, *unfiltered_pipe, Botan::RAW_BER); -+#endif - unfiltered_pipe->end_msg(); - kp.pub = rsa_pub_key(unfiltered_pipe->read_all_as_string(Pipe::LAST_MESSAGE), - origin::internal); -diff --git a/src/monotone.cc b/src/monotone.cc -index 281e940..f2c844a 100644 ---- a/src/monotone.cc -+++ b/src/monotone.cc -@@ -156,27 +156,53 @@ cpp_main(int argc, char ** argv) - E(linked_botan_version != BOTAN_VERSION_CODE_FOR(1,7,14), origin::system, - F("monotone does not support Botan 1.7.14")); - --#if BOTAN_VERSION_CODE <= BOTAN_VERSION_CODE_FOR(1,7,6) -+ // In Botan 1.9.9, the DataSink_Stream cannot be instantiated per -+ // se. As 1.10.1 is already out, let's simply disable support for -+ // that specific (testing) version of botan. -+ E(linked_botan_version != BOTAN_VERSION_CODE_FOR(1,9,9), origin::system, -+ F("monotone does not support Botan 1.9.9")); -+ -+#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,7,7) -+ // motonote binary compiled against botan younger than 1.7.7 - E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,6,3), origin::system, - F("this monotone binary requires Botan 1.6.3 or newer")); -- E(linked_botan_version <= BOTAN_VERSION_CODE_FOR(1,7,6), origin::system, -- F("this monotone binary does not work with Botan newer than 1.7.6")); --#elif BOTAN_VERSION_CODE <= BOTAN_VERSION_CODE_FOR(1,7,22) -- E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,6), origin::system, -+ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,7,7), origin::system, -+ F("this monotone binary does not work with Botan 1.7.7 or newer")); -+ -+#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,7,22) -+ // motonote binary compiled against botan 1.7.7 - 1.7.21 -+ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,7,7), origin::system, - F("this monotone binary requires Botan 1.7.7 or newer")); -- // While compiling against 1.7.22 or newer is recommended, because -- // it enables new features of Botan, the monotone binary compiled -- // against Botan 1.7.21 and before should still work with newer Botan -- // versions, including all of the stable branch 1.8.x. -- E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system, -- F("this monotone binary does not work with Botan 1.9.x")); --#else -- E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,22), origin::system, -+ // While compiling against 1.7.22 or newer is recommended, because it -+ // enables new features of Botan, the monotone binary compiled against -+ // Botan 1.7.21 and before should still work with newer Botan version, -+ // including all of the stable branch 1.8.x, up to and including -+ // 1.9.3. -+ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,4), origin::system, -+ F("this monotone binary does not work with Botan 1.9.4 or newer")); -+ -+#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,4) -+ // motonote binary compiled against botan 1.7.22 - 1.9.3 -+ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,7,22), origin::system, - F("this monotone binary requires Botan 1.7.22 or newer")); -- E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system, -- F("this monotone binary does not work with Botan 1.9.x")); -+ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,4), origin::system, -+ F("this monotone binary does not work with Botan 1.9.4 or newer")); -+ -+#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11) -+ // motonote binary compiled against botan 1.9.4 - 1.9.10 -+#pragma message ( "The resulting monotone binary won't be able to run with any stable release of botan." ) -+ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,9,4), origin::system, -+ F("this monotone binary requires Botan 1.9.4 or newer")); -+ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,11), origin::system, -+ F("this monotone binary does not work with Botan 1.9.11 or newer")); -+ -+#else -+ // motonote binary compiled against botan 1.9.11 and newer -+ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,9,11), origin::system, -+ F("this monotone binary requires Botan 1.9.11 or newer")); - #endif - -+ - app_state app; - try - { -diff --git a/src/packet.cc b/src/packet.cc -index 87ff24a..f592d50 100644 ---- a/src/packet.cc -+++ b/src/packet.cc -@@ -156,8 +156,8 @@ namespace - void validate_public_key_data(string const & name, string const & keydata) const - { - string decoded = decode_base64_as(keydata, origin::user); -- Botan::SecureVector key_block; -- key_block.set(reinterpret_cast(decoded.c_str()), decoded.size()); -+ Botan::SecureVector key_block -+ (reinterpret_cast(decoded.c_str()), decoded.size()); - try - { - Botan::X509::load_key(key_block); -@@ -175,7 +175,9 @@ namespace - Botan::DataSource_Memory ds(decoded); - try - { --#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+ Botan::PKCS8::load_key(ds, lazy_rng::get(), Dummy_UI()); -+#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7) - Botan::PKCS8::load_key(ds, lazy_rng::get(), string()); - #else - Botan::PKCS8::load_key(ds, string()); -@@ -189,7 +191,11 @@ namespace - } - // since we do not want to prompt for a password to decode it finally, - // we ignore all other exceptions -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+ catch (Passphrase_Required) {} -+#else - catch (Botan::Invalid_Argument) {} -+#endif - } - void validate_certname(string const & cn) const - { -@@ -460,7 +466,15 @@ read_packets(istream & in, packet_consumer & cons) - return count; - } - -- -+// Dummy User_Interface implementation for Botan -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+std::string -+Dummy_UI::get_passphrase(const std::string &, const std::string &, -+ Botan::User_Interface::UI_Result&) const -+{ -+ throw Passphrase_Required("Passphrase required"); -+} -+#endif - - // Local Variables: - // mode: C++ -diff --git a/src/packet.hh b/src/packet.hh -index 239f996..3d5c1b5 100644 ---- a/src/packet.hh -+++ b/src/packet.hh -@@ -10,6 +10,10 @@ - #ifndef __PACKET_HH__ - #define __PACKET_HH__ - -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+#include -+#endif -+ - #include "vocab.hh" - - struct cert; -@@ -84,6 +88,21 @@ struct packet_writer : public packet_consumer - - size_t read_packets(std::istream & in, packet_consumer & cons); - -+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) -+// A helper class implementing Botan::User_Interface - which doesn't really -+// interface with the user, but provides the necessary plumbing for Botan. -+// -+// See Botan commit 2d09d7d0cd4bd0e7155d001dd65a4f29103b158c -+typedef std::runtime_error Passphrase_Required; -+ -+class Dummy_UI : public Botan::User_Interface -+{ -+public: -+ virtual std::string get_passphrase(const std::string &, const std::string &, -+ Botan::User_Interface::UI_Result &) const; -+}; -+#endif -+ - #endif - - // Local Variables: -diff --git a/src/sha1.cc b/src/sha1.cc -index d4d7232..5f47f90 100644 ---- a/src/sha1.cc -+++ b/src/sha1.cc -@@ -50,9 +50,12 @@ CMD_HIDDEN(benchmark_sha1, "benchmark_sha1", "", CMD_REF(debug), "", - Botan::Default_Benchmark_Timer timer; - std::map results = - Botan::algorithm_benchmark("SHA-1", milliseconds, timer, rng, af); --#else -+#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11) - std::map results = - Botan::algorithm_benchmark("SHA-1", milliseconds, rng, af); -+#else -+ std::map results = -+ Botan::algorithm_benchmark("SHA-1", af, rng, milliseconds, 16); - #endif - - for(std::map::const_iterator i = results.begin(); -diff --git a/src/ssh_agent.cc b/src/ssh_agent.cc -index 157f59a..051e2f7 100644 ---- a/src/ssh_agent.cc -+++ b/src/ssh_agent.cc -@@ -385,9 +385,9 @@ bool - ssh_agent::has_key(const keypair & key) - { - //grab the monotone public key as an RSA_PublicKey -- SecureVector pub_block; -- pub_block.set(reinterpret_cast((key.pub)().data()), -- (key.pub)().size()); -+ SecureVector pub_block -+ (reinterpret_cast((key.pub)().data()), -+ (key.pub)().size()); - L(FL("has_key: building %d-byte pub key") % pub_block.size()); - shared_ptr x509_key = - shared_ptr(Botan::X509::load_key(pub_block)); -diff --git a/src/transforms.cc b/src/transforms.cc -index e4d9443..546d5ab 100644 ---- a/src/transforms.cc -+++ b/src/transforms.cc -@@ -53,15 +53,16 @@ using Botan::Hash_Filter; - // paradigm "must" be used. this program is intended for source code - // control and I make no bones about it. - --NORETURN(static inline void error_in_transform(Botan::Exception & e)); -+NORETURN(static inline void error_in_transform(std::exception & e)); - - static inline void --error_in_transform(Botan::Exception & e, origin::type caused_by) -+error_in_transform(std::exception & e, origin::type caused_by) - { - // these classes can all indicate data corruption - if (typeid(e) == typeid(Botan::Encoding_Error) - || typeid(e) == typeid(Botan::Decoding_Error) - || typeid(e) == typeid(Botan::Stream_IO_Error) -+ || typeid(e) == typeid(Botan::Invalid_Argument) - || typeid(e) == typeid(Botan::Integrity_Failure)) - { - // clean up the what() string a little: throw away the -@@ -107,7 +108,7 @@ error_in_transform(Botan::Exception & e, origin::type caused_by) - pipe->process_msg(in); \ - out = pipe->read_all_as_string(Pipe::LAST_MESSAGE); \ - } \ -- catch (Botan::Exception & e) \ -+ catch (std::exception & e) \ - { \ - pipe.reset(new Pipe(new T(carg))); \ - error_in_transform(e, made_from); \ -@@ -173,7 +174,7 @@ template<> string xform(string const & in, - { - throw Botan::Decoding_Error(string("invalid hex character '") + (char)c + "'"); - } -- catch(Botan::Exception & e) -+ catch(std::exception & e) - { - error_in_transform(e, made_from); - } -@@ -219,7 +220,7 @@ void pack(T const & in, base64< gzip > & out) - tmp = pipe->read_all_as_string(Pipe::LAST_MESSAGE); - out = base64< gzip >(tmp, in.made_from); - } -- catch (Botan::Exception & e) -+ catch (std::exception & e) - { - pipe.reset(new Pipe(new Gzip_Compression, - new Base64_Encoder)); -@@ -237,7 +238,7 @@ void unpack(base64< gzip > const & in, T & out) - pipe->process_msg(in()); - out = T(pipe->read_all_as_string(Pipe::LAST_MESSAGE), in.made_from); - } -- catch (Botan::Exception & e) -+ catch (std::exception & e) - { - pipe.reset(new Pipe(new Base64_Decoder, - new Gzip_Decompression)); -@@ -264,7 +265,7 @@ calculate_ident(data const & dat, - p->process_msg(dat()); - ident = id(p->read_all_as_string(Pipe::LAST_MESSAGE), dat.made_from); - } -- catch (Botan::Exception & e) -+ catch (std::exception & e) - { - p.reset(new Pipe(new Hash_Filter("SHA-160"))); - error_in_transform(e, dat.made_from); --- -tg: (1150daa..) t/botan-1.10 (depends on: master) diff --git a/monotone-1.0-disable-xdelta-test.patch b/monotone-1.0-disable-xdelta-test.patch deleted file mode 100644 index e4b3b64..0000000 --- a/monotone-1.0-disable-xdelta-test.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -up monotone-1.0/Makefile.am.orig monotone-1.0/Makefile.am ---- monotone-1.0/Makefile.am.orig 2011-09-26 17:57:52.000000000 +0200 -+++ monotone-1.0/Makefile.am 2011-09-26 17:58:13.000000000 +0200 -@@ -191,7 +191,7 @@ UNIT_TESTERS = \ - test/unit/tests/restrictions.cc test/unit/tests/revision.cc \ - test/unit/tests/simplestring_xform.cc test/unit/tests/transforms.cc \ - test/unit/tests/uri.cc test/unit/tests/vocab.cc \ -- test/unit/tests/xdelta.cc test/unit/tests/numeric_vocab.cc \ -+ test/unit/tests/numeric_vocab.cc \ - test/unit/tests/sha1.cc test/unit/tests/string_queue.cc \ - test/unit/unit_tester.cc - -diff -up monotone-1.0/Makefile.in.orig monotone-1.0/Makefile.in ---- monotone-1.0/Makefile.in.orig 2011-09-26 17:57:58.000000000 +0200 -+++ monotone-1.0/Makefile.in 2011-09-26 17:59:19.000000000 +0200 -@@ -422,7 +422,6 @@ am__objects_19 = test/unit/tests/basic_i - test/unit/tests/simplestring_xform.$(OBJEXT) \ - test/unit/tests/transforms.$(OBJEXT) \ - test/unit/tests/uri.$(OBJEXT) test/unit/tests/vocab.$(OBJEXT) \ -- test/unit/tests/xdelta.$(OBJEXT) \ - test/unit/tests/numeric_vocab.$(OBJEXT) \ - test/unit/tests/sha1.$(OBJEXT) \ - test/unit/tests/string_queue.$(OBJEXT) \ -@@ -887,7 +886,7 @@ UNIT_TESTERS = \ - test/unit/tests/restrictions.cc test/unit/tests/revision.cc \ - test/unit/tests/simplestring_xform.cc test/unit/tests/transforms.cc \ - test/unit/tests/uri.cc test/unit/tests/vocab.cc \ -- test/unit/tests/xdelta.cc test/unit/tests/numeric_vocab.cc \ -+ test/unit/tests/numeric_vocab.cc \ - test/unit/tests/sha1.cc test/unit/tests/string_queue.cc \ - test/unit/unit_tester.cc - -@@ -1774,8 +1773,6 @@ test/unit/tests/uri.$(OBJEXT): test/unit - test/unit/tests/$(DEPDIR)/$(am__dirstamp) - test/unit/tests/vocab.$(OBJEXT): test/unit/tests/$(am__dirstamp) \ - test/unit/tests/$(DEPDIR)/$(am__dirstamp) --test/unit/tests/xdelta.$(OBJEXT): test/unit/tests/$(am__dirstamp) \ -- test/unit/tests/$(DEPDIR)/$(am__dirstamp) - test/unit/tests/numeric_vocab.$(OBJEXT): \ - test/unit/tests/$(am__dirstamp) \ - test/unit/tests/$(DEPDIR)/$(am__dirstamp) diff --git a/monotone-1.0-file_handle.patch b/monotone-1.0-file_handle.patch deleted file mode 100644 index f295f25..0000000 --- a/monotone-1.0-file_handle.patch +++ /dev/null @@ -1,155 +0,0 @@ -# -# -# patch "src/rcs_file.cc" -# from [885b3fbe7b6cfed78816f0e57cd71d44616213c6] -# to [03cf68912a4a708545ebce3d415c0e970ddead0b] -# -============================================================ ---- src/rcs_file.cc 885b3fbe7b6cfed78816f0e57cd71d44616213c6 -+++ src/rcs_file.cc 03cf68912a4a708545ebce3d415c0e970ddead0b -@@ -42,12 +42,12 @@ struct - - #ifdef HAVE_MMAP - struct --file_handle -+rcs_file_handle - { - string const & filename; - off_t length; - int fd; -- file_handle(string const & fn) : -+ rcs_file_handle(string const & fn) : - filename(fn), - length(0), - fd(-1) -@@ -60,13 +60,13 @@ file_handle - if (fd == -1) - throw oops("open of " + filename + " failed"); - } -- ~file_handle() -+ ~rcs_file_handle() - { - if (close(fd) == -1) - throw oops("close of " + filename + " failed"); - } - }; --struct file_source -+struct rcs_file_source - { - string const & filename; - int fd; -@@ -91,7 +91,7 @@ struct file_source - ++pos; - return good(); - } -- file_source(string const & fn, -+ rcs_file_source(string const & fn, - int f, - off_t len) : - filename(fn), -@@ -104,7 +104,7 @@ struct file_source - if (mapping == MAP_FAILED) - throw oops("mmap of " + filename + " failed"); - } -- ~file_source() -+ ~rcs_file_source() - { - if (munmap(mapping, length) == -1) - throw oops("munmapping " + filename + " failed, after reading RCS file"); -@@ -112,12 +112,12 @@ struct - }; - #elif defined(WIN32) - struct --file_handle -+rcs_file_handle - { - string const & filename; - off_t length; - HANDLE fd; -- file_handle(string const & fn) : -+ rcs_file_handle(string const & fn) : - filename(fn), - length(0), - fd(NULL) -@@ -134,7 +134,7 @@ file_handle - if (fd == NULL) - throw oops("open of " + filename + " failed"); - } -- ~file_handle() -+ ~rcs_file_handle() - { - if (CloseHandle(fd)==0) - throw oops("close of " + filename + " failed"); -@@ -142,7 +142,7 @@ struct - }; - - struct --file_source -+rcs_file_source - { - string const & filename; - HANDLE fd,map; -@@ -167,7 +167,7 @@ file_source - ++pos; - return good(); - } -- file_source(string const & fn, -+ rcs_file_source(string const & fn, - HANDLE f, - off_t len) : - filename(fn), -@@ -183,7 +183,7 @@ file_source - if (mapping==NULL) - throw oops("MapViewOfFile of " + filename + " failed"); - } -- ~file_source() -+ ~rcs_file_source() - { - if (UnmapViewOfFile(mapping)==0) - throw oops("UnmapViewOfFile of " + filename + " failed"); -@@ -193,7 +193,7 @@ file_source - }; - #else - // no mmap at all --typedef istream file_source; -+typedef istream rcs_file_source; - #endif - - typedef enum -@@ -220,7 +220,7 @@ static token_type - } - - static token_type --get_token(file_source & ist, -+get_token(rcs_file_source & ist, - string & str, - size_t & line, - size_t & col) -@@ -303,14 +303,14 @@ struct parser - - struct parser - { -- file_source & ist; -+ rcs_file_source & ist; - rcs_file & r; - string token; - token_type ttype; - - size_t line, col; - -- parser(file_source & s, -+ parser(rcs_file_source & s, - rcs_file & r) - : ist(s), r(r), line(1), col(1) - {} -@@ -489,8 +489,8 @@ parse_rcs_file(string const & filename, - parse_rcs_file(string const & filename, rcs_file & r) - { - #if defined(HAVE_MMAP) || defined(WIN32) -- file_handle handle(filename); -- file_source ifs(filename, handle.fd, handle.length); -+ rcs_file_handle handle(filename); -+ rcs_file_source ifs(filename, handle.fd, handle.length); - #else - ifstream ifs(filename.c_str()); - ifs.unsetf(ios_base::skipws); diff --git a/monotone-1.0-fix-bash_completion-test.patch b/monotone-1.0-fix-bash_completion-test.patch deleted file mode 100644 index e6e74be..0000000 --- a/monotone-1.0-fix-bash_completion-test.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up monotone-1.0/test/extra/bash_completion/bashrc.orig monotone-1.0/test/extra/bash_completion/bashrc ---- monotone-1.0/test/extra/bash_completion/bashrc.orig 2011-03-26 07:41:02.000000000 +0100 -+++ monotone-1.0/test/extra/bash_completion/bashrc 2013-03-09 18:44:36.811369952 +0100 -@@ -18,6 +18,8 @@ if [ "$BASH_COMPLETION" = "" ]; then - . /etc/bash_completion - elif [ -f /usr/local/etc/bash_completion ]; then - . /usr/local/etc/bash_completion -+ elif [ -f /usr/share/bash-completion/bash_completion ] ; then -+ . /usr/share/bash-completion/bash_completion - else - echo No bash completion package present. - exit -diff -up monotone-1.0/test/extra/bash_completion/library.exp.orig monotone-1.0/test/extra/bash_completion/library.exp ---- monotone-1.0/test/extra/bash_completion/library.exp.orig 2011-03-26 07:41:02.000000000 +0100 -+++ monotone-1.0/test/extra/bash_completion/library.exp 2013-03-09 18:42:07.087240069 +0100 -@@ -16,7 +16,7 @@ set timeout 2 - set env(initial_dir) $initial_dir - set env(srcdir) $srcdir - # some user's ~/.bash_profile start xserver etc; don't do that --spawn "bash" "--init-file" "/dev/nul" "--rcfile" "$srcdir/extra/bash_completion/bashrc" -+spawn "bash" "--init-file" "/dev/null" "--rcfile" "$srcdir/extra/bash_completion/bashrc" - # If there is no completion package, it's no point trying this. - # Make sure we do get a prompt. - expect { diff --git a/monotone-1.0-fix-diff_patch_drop-test.patch b/monotone-1.0-fix-diff_patch_drop-test.patch deleted file mode 100644 index 8940cde..0000000 --- a/monotone-1.0-fix-diff_patch_drop-test.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up monotone-1.0/test/func/diff_patch_drop/__driver__.lua.orig monotone-1.0/test/func/diff_patch_drop/__driver__.lua ---- monotone-1.0/test/func/diff_patch_drop/__driver__.lua.orig 2011-03-26 07:41:04.000000000 +0100 -+++ monotone-1.0/test/func/diff_patch_drop/__driver__.lua 2013-03-10 16:17:05.508555733 +0100 -@@ -36,5 +36,6 @@ else - -- but it is a little aggressive and removes the dir too! - check({"patch", "-p0"}, 0, false, false, true) - check(not exists("dir/file")) -- check(not exists("dir")) -+ -- patch 2.7.1 does not remove the dir -+ -- check(not exists("dir")) - end diff --git a/monotone-1.0-fix-help.patch b/monotone-1.0-fix-help.patch deleted file mode 100644 index abbb024..0000000 --- a/monotone-1.0-fix-help.patch +++ /dev/null @@ -1,21 +0,0 @@ -# -# -# patch "src/options_list.hh" -# from [0462e302b89179f4acb28ecb91f4255140d4a4a7] -# to [27c44e89ebc9a828ac0a7b91505f997884646062] -# -============================================================ ---- src/options_list.hh 0462e302b89179f4acb28ecb91f4255140d4a4a7 -+++ src/options_list.hh 27c44e89ebc9a828ac0a7b91505f997884646062 -@@ -381,9 +381,9 @@ SIMPLE_OPTION(move_conflicting_paths, - SIMPLE_OPTION(move_conflicting_paths, - "move-conflicting-paths/no-move-conflicting-paths", - bool, -- (F("move conflicting, unversioned paths into '%s' " -+ strdup((F("move conflicting, unversioned paths into '%s' " - "before proceeding with any workspace change") % -- bookkeeping_resolutions_dir).str().c_str()) -+ bookkeeping_resolutions_dir).str().c_str())) - - OPTSET_REL(globals, ssh_sign) - SIMPLE_INITIALIZED_OPTION(ssh_sign, "ssh-sign", enum_string, "yes,no,only,check", diff --git a/monotone-1.0-fix-texinfo.patch b/monotone-1.0-fix-texinfo.patch deleted file mode 100644 index 6a4e1ec..0000000 --- a/monotone-1.0-fix-texinfo.patch +++ /dev/null @@ -1,623 +0,0 @@ -Description: fix texinfo errors with texinfo >= 5.0 -Origin: upstream, commit: 0d22697daf2fd169db15445cd88f8a7be7371f64 -Author: Markus Wanner ---- a/doc/monotone.texi -+++ b/doc/monotone.texi -@@ -4779,7 +4779,7 @@ - Cancel all previous @option{--rcfile} options (standard rcfiles are - still loaded). See @ref{rcfiles}. - --@itemx --root -+@item --root - Limit the search for a workspace to the specified root directory - - @item --ssh-sign -@@ -6150,7 +6150,7 @@ - Specifying only the pathname "." will restrict the search for unknown - files to the current subdirectory of the workspace. - --@itemx mtn list vars [@var{domain}] -+@item mtn list vars [@var{domain}] - @itemx mtn ls vars - @command{ls vars} is an alias for @command{list vars}. - ---- a/doc/pcrepattern.texi -+++ b/doc/pcrepattern.texi -@@ -74,32 +74,32 @@ - brackets, the metacharacters are as follows: - - @table @code --@itemx \ -+@item \ - general escape character with several uses --@itemx ^ -+@item ^ - assert start of string (or line, in multiline mode) --@itemx $ -+@item $ - assert end of string (or line, in multiline mode) --@itemx . -+@item . - match any character except newline (by default) --@itemx [ -+@item [ - start character class definition --@itemx | -+@item | - start of alternative branch --@itemx ( -+@item ( - start subpattern --@itemx ) -+@item ) - end subpattern --@itemx ? -+@item ? - extends the meaning of @samp{(} - also 0 or 1 quantifier - also quantifier minimizer --@itemx * -+@item * - 0 or more quantifier --@itemx + -+@item + - 1 or more quantifier - also ``possessive quantifier'' --@itemx @{ -+@item @{ - start min/max quantifier - @end table - -@@ -108,16 +108,16 @@ - class". In a character class the only metacharacters are: - - @table @code --@itemx \ -+@item \ - general escape character --@itemx ^ -+@item ^ - negate the class, but only if the first character --@itemx - -+@item - - indicates character range --@itemx [ -+@item [ - POSIX character class (only if followed by POSIX - syntax) --@itemx ] -+@item ] - terminates the character class - @end table - -@@ -159,25 +159,25 @@ - represents: - - @table @code --@itemx \a -+@item \a - alarm, that is, the BEL character (hex 07) --@itemx \c@var{x} -+@item \c@var{x} - "control-@var{x}", where @var{x} is any character --@itemx \e -+@item \e - escape (hex 1B) --@itemx \f -+@item \f - formfeed (hex 0C) --@itemx \n -+@item \n - linefeed (hex 0A) --@itemx \r -+@item \r - carriage return (hex 0D) --@itemx \t -+@item \t - tab (hex 09) --@itemx \@var{ddd} -+@item \@var{ddd} - character with octal code @var{ddd}, or backreference --@itemx \x@var{hh} -+@item \x@var{hh} - character with hex code @var{hh} --@itemx \x@{@var{hhh...}@} -+@item \x@{@var{hhh...}@} - character with hex code @var{hhh...} - @end table - -@@ -244,27 +244,27 @@ - @samp{\777} are permitted. For example: - - @table @code --@itemx \040 -+@item \040 - is another way of writing a space --@itemx \40 -+@item \40 - is the same, provided there are fewer than 40 - previous capturing subpatterns --@itemx \7 -+@item \7 - is always a back reference --@itemx \11 -+@item \11 - might be a back reference, or another way of - writing a tab --@itemx \011 -+@item \011 - is always a tab --@itemx \0113 -+@item \0113 - is a tab followed by the character @samp{3} --@itemx \113 -+@item \113 - might be a back reference, otherwise the - character with octal code 113 --@itemx \377 -+@item \377 - might be a back reference, otherwise - the byte consisting entirely of 1 bits --@itemx \81 -+@item \81 - is either a back reference, or a binary zero - followed by the two characters @samp{8} and @samp{1} - @end table -@@ -294,25 +294,25 @@ - following are always recognized: - - @table @code --@itemx \d -+@item \d - any decimal digit --@itemx \D -+@item \D - any character that is not a decimal digit --@itemx \h -+@item \h - any horizontal whitespace character --@itemx \H -+@item \H - any character that is not a horizontal whitespace character --@itemx \s -+@item \s - any whitespace character --@itemx \S -+@item \S - any character that is not a whitespace character --@itemx \v -+@item \v - any vertical whitespace character --@itemx \V -+@item \V - any character that is not a vertical whitespace character --@itemx \w -+@item \w - any ``word'' character --@itemx \W -+@item \W - any ``non-word'' character - @end table - -@@ -342,43 +342,43 @@ - characters are: - - @table @code --@itemx U+0009 -+@item U+0009 - Horizontal tab --@itemx U+0020 -+@item U+0020 - Space --@itemx U+00A0 -+@item U+00A0 - Non-break space --@itemx U+1680 -+@item U+1680 - Ogham space mark --@itemx U+180E -+@item U+180E - Mongolian vowel separator - @item U+2000 - En quad --@itemx U+2001 -+@item U+2001 - Em quad --@itemx U+2002 -+@item U+2002 - En space --@itemx U+2003 -+@item U+2003 - Em space --@itemx U+2004 -+@item U+2004 - Three-per-em space --@itemx U+2005 -+@item U+2005 - Four-per-em space --@itemx U+2006 -+@item U+2006 - Six-per-em space - @item U+2007 - Figure space --@itemx U+2008 -+@item U+2008 - Punctuation space --@itemx U+2009 -+@item U+2009 - Thin space --@itemx U+200A -+@item U+200A - Hair space --@itemx U+202F -+@item U+202F - Narrow no-break space --@itemx U+205F -+@item U+205F - Medium mathematical space --@itemx U+3000 -+@item U+3000 - Ideographic space - @end table - -@@ -386,19 +386,19 @@ - The vertical space characters are: - - @table @code --@itemx U+000A -+@item U+000A - Linefeed --@itemx U+000B -+@item U+000B - Vertical tab --@itemx U+000C -+@item U+000C - Formfeed --@itemx U+000D -+@item U+000D - Carriage return --@itemx U+0085 -+@item U+0085 - Next line --@itemx U+2028 -+@item U+2028 - Line separator --@itemx U+2029 -+@item U+2029 - Paragraph separator - @end table - -@@ -418,15 +418,15 @@ - the following five sequences: - - @table @code --@itemx (*CR) -+@item (*CR) - carriage return --@itemx (*LF) -+@item (*LF) - linefeed --@itemx (*CRLF) -+@item (*CRLF) - carriage return, followed by linefeed --@itemx (*ANYCRLF) -+@item (*ANYCRLF) - any of the three above --@itemx (*ANY) -+@item (*ANY) - all Unicode newline sequences - @end table - -@@ -474,9 +474,9 @@ - pattern string with one of the following sequences: - - @table @code --@itemx (*BSR_ANYCRLF) -+@item (*BSR_ANYCRLF) - @key{CR}, @key{LF}, or @key{CR}@key{LF} only --@itemx (*BSR_UNICODE) -+@item (*BSR_UNICODE) - any Unicode newline sequence (the default) - @end table - -@@ -501,11 +501,11 @@ - 256, but they do work in this mode. The extra escape sequences are: - - @table @code --@itemx \p@{@var{xx}@} -+@item \p@{@var{xx}@} - a character with the @var{xx} property --@itemx \P@{@var{xx}@} -+@item \P@{@var{xx}@} - a character without the @var{xx} property --@itemx \X -+@item \X - an extended Unicode sequence - @end table - -@@ -618,83 +618,83 @@ - @table @code - @item C - Other --@itemx Cc -+@item Cc - Control --@itemx Cf -+@item Cf - Format --@itemx Cn -+@item Cn - Unassigned --@itemx Co -+@item Co - Private use --@itemx Cs -+@item Cs - Surrogate - - @item L - Letter --@itemx Ll -+@item Ll - Lower case letter --@itemx Lm -+@item Lm - Modifier letter --@itemx Lo -+@item Lo - Other letter --@itemx Lt -+@item Lt - Title case letter --@itemx Lu -+@item Lu - Upper case letter - - @item M - Mark --@itemx Mc -+@item Mc - Spacing mark --@itemx Me -+@item Me - Enclosing mark --@itemx Mn -+@item Mn - Non-spacing mark - - @item N - Number --@itemx Nd -+@item Nd - Decimal number --@itemx Nl -+@item Nl - Letter number --@itemx No -+@item No - Other number - - @item P - Punctuation --@itemx Pc -+@item Pc - Connector punctuation --@itemx Pd -+@item Pd - Dash punctuation --@itemx Pe -+@item Pe - Close punctuation --@itemx Pf -+@item Pf - Final punctuation --@itemx Pi -+@item Pi - Initial punctuation --@itemx Po -+@item Po - Other punctuation --@itemx Ps -+@item Ps - Open punctuation - - @item S - Symbol --@itemx Sc -+@item Sc - Currency symbol --@itemx Sk -+@item Sk - Modifier symbol --@itemx Sm -+@item Sm - Mathematical symbol --@itemx So -+@item So - Other symbol - - @item Z - Separator --@itemx Zl -+@item Zl - Line separator --@itemx Zp -+@item Zp - Paragraph separator --@itemx Zs -+@item Zs - Space separator - @end table - -@@ -771,18 +771,18 @@ - described below. The backslashed assertions are: - - @table @code --@itemx \b -+@item \b - matches at a word boundary --@itemx \B -+@item \B - matches when not at a word boundary --@itemx \A -+@item \A - matches at the start of the subject --@itemx \Z -+@item \Z - matches at the end of the subject - also matches before a newline at the end of the subject --@itemx \z -+@item \z - matches only at the end of the subject --@itemx \G -+@item \G - matches at the first matching position in the subject - @end table - -@@ -993,33 +993,33 @@ - supported class names are - - @table @code --@itemx alnum -+@item alnum - letters and digits --@itemx alpha -+@item alpha - letters --@itemx ascii -+@item ascii - character codes 0 -- 127 --@itemx blank -+@item blank - space or tab only --@itemx cntrl -+@item cntrl - control characters --@itemx digit -+@item digit - decimal digits (same as @samp{\d}) --@itemx graph -+@item graph - printing characters, excluding space --@itemx lower -+@item lower - lower case letters --@itemx print -+@item print - printing characters, including space --@itemx punct -+@item punct - printing characters, excluding letters and digits --@itemx space -+@item space - white space (not quite the same as @samp{\s}) --@itemx upper -+@item upper - upper case letters --@itemx word -+@item word - ``word'' characters (same as @samp{\w}) --@itemx xdigit -+@item xdigit - hexadecimal digits - @end table - -@@ -1071,22 +1071,22 @@ - @samp{)}. The option letters are - - @table @code --@itemx i -+@item i - Caseless: characters in one case match the corresponding - characters in other cases as well. --@itemx m -+@item m - Multiline: @samp{^} and @samp{$} match at newlines - as well as at beginning and end of string. --@itemx s -+@item s - Dotall: dot matches any character, including newline characters. --@itemx x -+@item x - Extended syntax: unescaped white space is ignored and embedded - comments are possible. --@itemx J -+@item J - Dupnames: names for capturing subpattern need not be unique. --@itemx U -+@item U - Ungreedy: quantifiers match as few times as possible by default. --@itemx X -+@item X - Extra: for forward compatibility, give an error if any escape sequence - with no defined meaning appears. - @end table -@@ -1358,11 +1358,11 @@ - single-character abbreviations: - - @table @code --@itemx * -+@item * - is equivalent to @{0,@} --@itemx + -+@item + - is equivalent to @{1,@} --@itemx ? -+@item ? - is equivalent to @{0,1@} - @end table - -@@ -2302,7 +2302,7 @@ - The following verbs act as soon as they are encountered: - - @table @code --@itemx (*ACCEPT) -+@item (*ACCEPT) - - This verb causes the match to end successfully, skipping the remainder - of the pattern. When inside a recursion, only the innermost pattern is -@@ -2317,7 +2317,7 @@ - This matches @samp{AB}, @samp{AAD}, or @samp{ACD}, but when it matches - @samp{AB}, no data is captured. - --@itemx (*FAIL) @r{or} (*F) -+@item (*FAIL) @r{or} (*F) - - This verb causes the match to fail, forcing backtracking to occur. It - is equivalent to @samp{(?!)} but easier to read. It is not clear -@@ -2334,7 +2334,7 @@ - occurs. - - @table @code --@itemx (*COMMIT) -+@item (*COMMIT) - - This verb causes the whole match to fail outright if the rest of the - pattern does not match. Even if the pattern is unanchored, no further -@@ -2350,7 +2350,7 @@ - This matches @samp{xxaab} but not @samp{aacaab}. It can be thought of - as a kind of dynamic anchor, or ``I've started, so I must finish.'' - --@itemx (*PRUNE) -+@item (*PRUNE) - - This verb causes the match to fail at the current position if the rest - of the pattern does not match. If the pattern is unanchored, the -@@ -2363,7 +2363,7 @@ - are some uses of @code{(*PRUNE)} that cannot be expressed in any other - way. - --@itemx (*SKIP) -+@item (*SKIP) - - This verb is like @code{(*PRUNE)}, except that if the pattern is - unanchored, the "bumpalong" advance is not to the next character, but -@@ -2383,7 +2383,7 @@ - attempt would start at the second character instead of skipping on to - @samp{c}. - --@itemx (*THEN) -+@item (*THEN) - - This verb causes a skip to the next alternation if the rest of the - pattern does not match. That is, it cancels pending backtracking, but diff --git a/monotone-1.0-lua-5.2.patch b/monotone-1.0-lua-5.2.patch deleted file mode 100644 index 2493490..0000000 --- a/monotone-1.0-lua-5.2.patch +++ /dev/null @@ -1,752 +0,0 @@ -From: Thomas Moschny -Subject: [PATCH] lua-5.2 - -Support Lua 5.2. - -Apply patches from these upstream commits: -53e02eaa302bc05e96a18e3882b0e9843b53cf9a (partially) -fd98d953ca93454c66a55aadf2adbeb87de86f69 (with some tweaking) -fe1180f754da5d552c308b61e8129e59039bc559 - ---- - extra/mtn-hooks/monotone-cvs-ignore.lua | 2 +- - src/lua.cc | 40 +++++++++++--- - src/lua.hh | 14 ++--- - src/luaext_parse_basic_io.cc | 4 ++ - src/luaext_platform.cc | 62 ++++++++++++++++------ - src/std_hooks.lua | 9 +++- - test/func-testsuite.lua | 7 +++ - test/func/automate_get_attributes/__driver__.lua | 2 +- - .../func/automate_interface_version/__driver__.lua | 2 +- - .../automate_inventory_ignore_dirs/__driver__.lua | 2 +- - test/func/automate_put_revision/__driver__.lua | 2 +- - .../automate_set_drop_attribute/__driver__.lua | 4 +- - .../func/automate_stdio_band_output/__driver__.lua | 10 ++-- - test/func/clone_weird_branch_names/__driver__.lua | 2 +- - test/func/list_databases/__driver__.lua | 6 +-- - test/func/list_workspaces/__driver__.lua | 8 +-- - .../log_--no-files_and_--merges/__driver__.lua | 4 +- - test/func/manpage/__driver__.lua | 2 +- - test/func/netsync_negotiation/__driver__.lua | 8 +-- - test/func/serve-automate-single-run/__driver__.lua | 2 +- - test/func/serve-automate/__driver__.lua | 4 +- - test/func/ssh_agent/__driver__.lua | 8 +-- - .../__driver__.lua | 4 +- - test/func/user_commands/extra_rc | 3 +- - test/src/testlib.lua | 39 +++++++------- - 25 files changed, 161 insertions(+), 89 deletions(-) - -diff --git a/extra/mtn-hooks/monotone-cvs-ignore.lua b/extra/mtn-hooks/monotone-cvs-ignore.lua -index 6a59d12..0e9feb5 100644 ---- a/extra/mtn-hooks/monotone-cvs-ignore.lua -+++ b/extra/mtn-hooks/monotone-cvs-ignore.lua -@@ -23,7 +23,7 @@ do - - local handle, msg = io.open(dir .. ".cvsignore") - if (handle) then -- for line in handle:lines(dir .. ".cvsignore") do -+ for line in handle:lines() do - pat2 = _glob_to_pattern(line) .. "$" - if (string.find(name, pat1 .. pat2)) then - return true -diff --git a/src/lua.cc b/src/lua.cc -index 29f1033..9456c64 100644 ---- a/src/lua.cc -+++ b/src/lua.cc -@@ -44,7 +44,11 @@ dump_stack(lua_State * st) - switch (t) { - case LUA_TSTRING: /* strings */ - out += '`'; -+#ifdef lua_strlen - out += string(lua_tostring(st, i), lua_strlen(st, i)); -+#else -+ out += string(lua_tostring(st, i), lua_rawlen(st, i)); -+#endif - out += '\''; - break; - -@@ -95,7 +99,11 @@ void - Lua::report_error() - { - // I(lua_isstring(st, -1)); -+#ifdef lua_strlen - string err = string(lua_tostring(st, -1), lua_strlen(st, -1)); -+#else -+ string err = string(lua_tostring(st, -1), lua_rawlen(st, -1)); -+#endif - W(i18n_format("%s") % err); - L(FL("lua stack: %s") % dump_stack(st)); - lua_pop(st, 1); -@@ -107,7 +115,11 @@ Lua::check_stack(int count) - { - if (!lua_checkstack(st, count)) - { -+#ifdef LUAI_MAXCSTACK - fail((FL("lua stack limit '%d' reached") % LUAI_MAXCSTACK).str()); -+#else -+ fail((FL("lua stack limit '%d' reached") % LUAI_MAXSTACK).str()); -+#endif - return false; - } - return true; -@@ -119,17 +131,27 @@ Lua & - Lua::get(int idx) - { - if (failed) return *this; -- if (!lua_istable (st, idx)) -- { -- fail("istable() in get"); -- return *this; -- } - if (lua_gettop (st) < 1) - { - fail("stack top > 0 in get"); - return *this; - } -- lua_gettable(st, idx); -+ if (idx) -+ { -+ if (!lua_istable (st, idx)) -+ { -+ fail("istable() in get"); -+ return *this; -+ } -+ lua_gettable(st, idx); -+ } -+ else -+ { -+ string name; -+ extract_str(name); -+ pop(); -+ lua_getglobal(st, name.c_str()); -+ } - return *this; - } - -@@ -194,7 +216,11 @@ Lua::extract_str_nolog(string & str) - fail("isstring() in extract_str"); - return *this; - } -+#ifdef lua_strlen - str = string(lua_tostring(st, -1), lua_strlen(st, -1)); -+#else -+ str = string(lua_tostring(st, -1), lua_rawlen(st, -1)); -+#endif - return *this; - } - -@@ -460,7 +486,7 @@ void add_functions(lua_State * st) - { - lua_newtable(st); - lua_pushvalue(st, -1); -- lua_setfield(st, LUA_GLOBALSINDEX, table.c_str()); -+ lua_setglobal(st, table.c_str()); - } - for (luaext::fmap::const_iterator j = i->second.begin(); - j != i->second.end(); ++j) -diff --git a/src/lua.hh b/src/lua.hh -index ae87329..6f9783a 100644 ---- a/src/lua.hh -+++ b/src/lua.hh -@@ -37,13 +37,13 @@ Lua - void report_error(); - bool check_stack(int count); - -- // getters -- Lua & get(int idx = LUA_GLOBALSINDEX); -- Lua & get_fn(int idx = LUA_GLOBALSINDEX); -- Lua & get_tab(int idx = LUA_GLOBALSINDEX); -- Lua & get_str(int idx = LUA_GLOBALSINDEX); -- Lua & get_num(int idx = LUA_GLOBALSINDEX); -- Lua & get_bool(int idx = LUA_GLOBALSINDEX); -+ // getters (0 is an invalid index in lua, and is used here to represent the global table) -+ Lua & get(int idx = 0); -+ Lua & get_fn(int idx = 0); -+ Lua & get_tab(int idx = 0); -+ Lua & get_str(int idx = 0); -+ Lua & get_num(int idx = 0); -+ Lua & get_bool(int idx = 0); - - // extractors - Lua & extract_str_nolog(std::string & str); -diff --git a/src/luaext_parse_basic_io.cc b/src/luaext_parse_basic_io.cc -index 84cea98..4d2308a 100644 ---- a/src/luaext_parse_basic_io.cc -+++ b/src/luaext_parse_basic_io.cc -@@ -23,7 +23,11 @@ LUAEXT(parse_basic_io, ) - // followed by one or more string or hex values. It returns a table of - // lines. - vector > > res; -+#ifdef lua_strlen - const string str(luaL_checkstring(LS, -1), lua_strlen(LS, -1)); -+#else -+ const string str(luaL_checkstring(LS, -1), lua_rawlen(LS, -1)); -+#endif - basic_io::input_source in(str, "monotone_parse_basic_io_for_lua"); - in.made_from = origin::user; - basic_io::tokenizer tok(in); -diff --git a/src/luaext_platform.cc b/src/luaext_platform.cc -index 643250c..c89b45a 100644 ---- a/src/luaext_platform.cc -+++ b/src/luaext_platform.cc -@@ -96,31 +96,58 @@ LUAEXT(spawn_redirected, ) - return 1; - } - --// borrowed from lua/liolib.cc --// Note that making C functions that return FILE* in Lua is tricky -+// Making C functions that return FILE* in Lua is tricky. Especially if it -+// actually needs to work with multiple lua versions. -+// -+// The following routines are inspired by lua/liolib.c from both versions. -+// The mtn_lua_Stream struct is closer to the 5.2 variant, but the -+// additional field compared to 5.1 (which only uses FILE*) shouldn't hurt -+// in Lua 5.1. -+// - // There is a Lua FAQ entitled: - // "Why does my library-created file segfault on :close() but work otherwise?" -+// -+// However, it's advice seems out-dated and applies more to 5.1. -+ -+typedef struct mtn_lua_Stream { -+ FILE *f; -+ lua_CFunction closef; -+} mtn_lua_Stream; -+ -+#define topfile(LS) ((mtn_lua_Stream *)luaL_checkudata(LS, 1, LUA_FILEHANDLE)) - --#define topfile(LS) ((FILE **)luaL_checkudata(LS, 1, LUA_FILEHANDLE)) -+static int io_pclose (lua_State *LS) { -+ mtn_lua_Stream *s = topfile(LS); -+ -+ // Note that in Lua 5.2, aux_close() already resets s->closef to NULL and for -+ // Lua 5.1, it's not relevant, at all. But we've set it to &io_pclose(), so -+ // contents of s->closef different between Lua versions. -+ -+ int ok; -+ if (s->f != NULL) -+ ok = (pclose(s->f) == 0); -+ -+ s->f = NULL; -+ s->closef = NULL; // just to be extra sure this won't do any harm - --static int io_fclose (lua_State *LS) { -- FILE **p = topfile(LS); -- int ok = (fclose(*p) == 0); -- *p = NULL; - lua_pushboolean(LS, ok); - return 1; - } - --static FILE **newfile (lua_State *LS) { -- FILE **pf = (FILE **)lua_newuserdata(LS, sizeof(FILE *)); -- *pf = NULL; /* file handle is currently `closed' */ -+static mtn_lua_Stream *newstream (lua_State *LS) { -+ mtn_lua_Stream *s = (mtn_lua_Stream *)lua_newuserdata(LS, sizeof(mtn_lua_Stream)); -+ s->f = NULL; /* file handle is currently `closed' */ -+ s->closef = NULL; - luaL_getmetatable(LS, LUA_FILEHANDLE); - lua_setmetatable(LS, -2); - -- lua_pushcfunction(LS, io_fclose); -+#ifdef LUA_ENVIRONINDEX -+ // Lua 5.2 removes C function environments -+ lua_pushcfunction(LS, io_pclose); - lua_setfield(LS, LUA_ENVIRONINDEX, "__close"); -+#endif - -- return pf; -+ return s; - } - - LUAEXT(spawn_pipe, ) -@@ -136,12 +163,13 @@ LUAEXT(spawn_pipe, ) - for (i=0; iclosef = &io_pclose; -+ -+ mtn_lua_Stream *outs = newstream(LS); -+ outs->closef = &io_pclose; - -- pid = process_spawn_pipe(argv, inpf, outpf); -+ pid = process_spawn_pipe(argv, &ins->f, &outs->f); - free(argv); - - lua_pushnumber(LS, pid); -diff --git a/src/std_hooks.lua b/src/std_hooks.lua -index bfef561..7099f83 100644 ---- a/src/std_hooks.lua -+++ b/src/std_hooks.lua -@@ -10,6 +10,13 @@ - -- this is the standard set of lua hooks for monotone; - -- user-provided files can override it or add to it. - -+-- Since Lua 5.2, unpack and loadstrings are deprecated and are either moved -+-- to table.unpack() or replaced by load(). If lua was compiled without -+-- LUA_COMPAT_UNPACK and/or LUA_COMPAT_LOADSTRING, these two are not -+-- available and we add a similar compatibility layer, ourselves. -+unpack = unpack or table.unpack -+loadstring = loadstring or load -+ - function temp_file(namehint) - local tdir - tdir = os.getenv("TMPDIR") -@@ -1465,7 +1472,7 @@ do - return true, warning - end - function push_hook_functions(functions) -- local n = table.maxn(hook_functions) + 1 -+ local n = #hook_functions + 1 - return add_hook_functions(functions, n) - end - -diff --git a/test/func-testsuite.lua b/test/func-testsuite.lua -index 64a6f26..454cd9c 100755 ---- a/test/func-testsuite.lua -+++ b/test/func-testsuite.lua -@@ -10,6 +10,13 @@ - monotone_path = nil - no_network_tests = false - -+-- Since Lua 5.2, unpack and loadstrings are deprecated and are either moved -+-- to table.unpack() or replaced by load(). If lua was compiled without -+-- LUA_COMPAT_UNPACK and/or LUA_COMPAT_LOADSTRING, these two are not -+-- available and we add a similar compatibility layer, ourselves. -+unpack = unpack or table.unpack -+loadstring = loadstring or load -+ - function safe_mtn(...) - if monotone_path == nil then - monotone_path = os.getenv("mtn") -diff --git a/test/func/automate_get_attributes/__driver__.lua b/test/func/automate_get_attributes/__driver__.lua -index 2e92654..eb91015 100644 ---- a/test/func/automate_get_attributes/__driver__.lua -+++ b/test/func/automate_get_attributes/__driver__.lua -@@ -28,7 +28,7 @@ check(mtn("automate", "get_attributes", "testfile"), 0, true, true) - check(fsize("stderr") == 0) - parsed = parse_basic_io(readfile("stdout")) - -- make sure the output generated 8 stanzas --check(table.getn(parsed) == 8) -+check(#parsed == 8) - lastkey = "" - checked = {} - for _,l in pairs(parsed) do -diff --git a/test/func/automate_interface_version/__driver__.lua b/test/func/automate_interface_version/__driver__.lua -index d969d7d..7ff79e9 100644 ---- a/test/func/automate_interface_version/__driver__.lua -+++ b/test/func/automate_interface_version/__driver__.lua -@@ -7,4 +7,4 @@ rename("stdout", "a_v") - -- MinGW's wc produces " 1" as output. Arithmetic comparison works, string comparison doesn't - check(numlines("a_v") == 1) - -- This is really ^[0-9]+\.[0-9]+$, but m4 is obfuscatory. --check(qgrep("^[0-9]+\.[0-9]+$", "a_v")) -+check(qgrep("^[0-9]+\\.[0-9]+$", "a_v")) -diff --git a/test/func/automate_inventory_ignore_dirs/__driver__.lua b/test/func/automate_inventory_ignore_dirs/__driver__.lua -index bfb5c25..72a89bb 100644 ---- a/test/func/automate_inventory_ignore_dirs/__driver__.lua -+++ b/test/func/automate_inventory_ignore_dirs/__driver__.lua -@@ -14,7 +14,7 @@ function sortContentsByLine(input) - table.insert(lines, string.sub(input, theStart)) - table.sort(lines) - -- local len = table.getn(lines) -+ local len = #lines - local output = lines[1] - for i = 2, len do - output = output .. delimiter .. lines[i] -diff --git a/test/func/automate_put_revision/__driver__.lua b/test/func/automate_put_revision/__driver__.lua -index 2626ec3..32bdacb 100644 ---- a/test/func/automate_put_revision/__driver__.lua -+++ b/test/func/automate_put_revision/__driver__.lua -@@ -33,5 +33,5 @@ check(mtn("automate", "put_revision", rev), 3, false, false) - -- but this should work (tests that we can use put_revision to commit a - -- single-parent revision) - check(mtn("automate", "put_file", ""), 0, false, false) --rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision [4c2c1d846fa561601254200918fba1fd71e6795d]\n\patch \"foo\"\n from [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145] to [da39a3ee5e6b4b0d3255bfef95601890afd80709]\n" -+rev = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision [4c2c1d846fa561601254200918fba1fd71e6795d]\n\npatch \"foo\"\n from [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145] to [da39a3ee5e6b4b0d3255bfef95601890afd80709]\n" - check(mtn("automate", "put_revision", rev), 0, false, false) -diff --git a/test/func/automate_set_drop_attribute/__driver__.lua b/test/func/automate_set_drop_attribute/__driver__.lua -index 5369cd9..12ff4dc 100644 ---- a/test/func/automate_set_drop_attribute/__driver__.lua -+++ b/test/func/automate_set_drop_attribute/__driver__.lua -@@ -25,7 +25,7 @@ check(mtn("automate", "set_attribute", "testfile", "foo", "bar"), 0, false, fals - check(mtn("automate", "get_attributes", "testfile"), 0, true, false) - parsed = parse_basic_io(readfile("stdout")) - --check(table.getn(parsed) == 2) -+check(#parsed == 2) - for _,l in pairs(parsed) do - if l.name == "attr" then - key = l.values[1] -@@ -44,7 +44,7 @@ check(mtn("automate", "drop_attribute", "testfile", "foo"), 0, true, true) - -- check if it has been really dropped - check(mtn("automate", "get_attributes", "testfile"), 0, true, false) - parsed = parse_basic_io(readfile("stdout")) --check(table.getn(parsed) == 0) -+check(#parsed == 0) - - -- check if it escalates properly if there is no such attr to drop - check(mtn("automate", "drop_attribute", "testfile", "foo"), 1, false, true) -diff --git a/test/func/automate_stdio_band_output/__driver__.lua b/test/func/automate_stdio_band_output/__driver__.lua -index 4262d0e..88c8d63 100755 ---- a/test/func/automate_stdio_band_output/__driver__.lua -+++ b/test/func/automate_stdio_band_output/__driver__.lua -@@ -4,13 +4,13 @@ mtn_setup() - - -- check informational messages, warnings and errors - out = run_stdio("l8:bandtest4:infoe", 0, 0, "p") --check(type(out) == "table" and table.maxn(out) == 1) -+check(type(out) == "table" and #out == 1) - - out = run_stdio("l8:bandtest7:warninge", 0, 0, "w") --check(type(out) == "table" and table.maxn(out) == 1) -+check(type(out) == "table" and #out == 1) - - out = run_stdio("l8:bandtest5:errore", 2, 0, "e") --check(type(out) == "table" and table.maxn(out) == 1) -+check(type(out) == "table" and #out == 1) - - -- check tickers - tickers = run_stdio("l8:bandtest6:tickere", 0, 0, "t") -@@ -38,7 +38,7 @@ end - ticker_data = {} - for _,tick in ipairs(tickers) do - ticks = split(tick, ";") -- check(table.maxn(ticks) > 0) -+ check(#ticks > 0) - for _,mtick in ipairs(ticks) do - if string.len(mtick) > 0 then - local begin,End,short,ticktype,content = -@@ -78,6 +78,6 @@ for _,tick in ipairs(tickers) do - end - - -- finally check if all tickers are completed --check(table.maxn(ticker_data) == 0) -+check(#ticker_data == 0) - - -diff --git a/test/func/clone_weird_branch_names/__driver__.lua b/test/func/clone_weird_branch_names/__driver__.lua -index 4948a72..a97c6ea 100644 ---- a/test/func/clone_weird_branch_names/__driver__.lua -+++ b/test/func/clone_weird_branch_names/__driver__.lua -@@ -7,7 +7,7 @@ commit("my-branch[1,2]-1^3") - - copy("test.db", "test-clone.db") - -- some of the special chars need to get double-escaped to get "through" --testURI="file://" .. test.root .. "/test-clone.db?my-branch\\\[1,2\\\]-1^3" -+testURI="file://" .. test.root .. "/test-clone.db?my-branch\\[1,2\\]-1^3" - - check(nodb_mtn("clone", testURI), 0, false, false) - check(exists("my-branch[1,2]-1^3")) -diff --git a/test/func/list_databases/__driver__.lua b/test/func/list_databases/__driver__.lua -index e3da0e9..48cd75c 100644 ---- a/test/func/list_databases/__driver__.lua -+++ b/test/func/list_databases/__driver__.lua -@@ -25,15 +25,15 @@ check(mt("db", "init", "-d", ":bar"), 0, false, false) - check(exists("managed_databases/bar.mtn")) - - check(mt("ls", "dbs"), 0, true, false) --check(qgrep(":bar.mtn.+in.+list_databases\/managed_databases", "stdout")) -+check(qgrep(":bar.mtn.+in.+list_databases/managed_databases", "stdout")) - check(qgrep("\tno known valid workspaces", "stdout")) - - check(mt("setup", "-d", ":bar", "-b", "test.foo.branch", "test_foo"), 0, false, false) - - check(mt("ls", "dbs"), 0, true, false) - check(not qgrep("\tno known valid workspaces", "stdout")) --check(qgrep("\ttest.foo.branch.+in.+list_databases\/test_foo", "stdout")) -+check(qgrep("\ttest.foo.branch.+in.+list_databases/test_foo", "stdout")) - - check(rename("managed_databases/bar.mtn", "managed_databases/bar.db")) - check(mt("ls", "dbs"), 0, true, false) --check(qgrep(":bar.db.+in.+list_databases\/managed_databases", "stdout")) -+check(qgrep(":bar.db.+in.+list_databases/managed_databases", "stdout")) -diff --git a/test/func/list_workspaces/__driver__.lua b/test/func/list_workspaces/__driver__.lua -index 06dbfef..8895ed4 100644 ---- a/test/func/list_workspaces/__driver__.lua -+++ b/test/func/list_workspaces/__driver__.lua -@@ -10,17 +10,17 @@ check(samelines("stdout", {"no known valid workspaces"})) - check(raw_mtn("setup", "-d", "test.mtn", "-b", "test.branch1", "work1"), 0, false, false) - - check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false) --check(qgrep("test.branch1.+in.+list_workspaces\/work1", "stdout")) -+check(qgrep("test.branch1.+in.+list_workspaces/work1", "stdout")) - - check(raw_mtn("setup", "-d", "test.mtn", "-b", "test.branch2", "work2"), 0, false, false) - check(rename("work1", "work3")) - - check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false) --check(qgrep("test.branch2.+in.+list_workspaces\/work2", "stdout")) --check(not qgrep("test.branch1.+in.+list_workspaces\/work1", "stdout")) -+check(qgrep("test.branch2.+in.+list_workspaces/work2", "stdout")) -+check(not qgrep("test.branch1.+in.+list_workspaces/work1", "stdout")) - - check(indir("work3", raw_mtn("register_workspace", "-d", "../test.mtn")), 0, false, false) - - check(raw_mtn("ls", "workspaces", "-d", "test.mtn"), 0, true, false) --check(qgrep("test.branch1.+in.+list_workspaces\/work3", "stdout")) -+check(qgrep("test.branch1.+in.+list_workspaces/work3", "stdout")) - -diff --git a/test/func/log_--no-files_and_--merges/__driver__.lua b/test/func/log_--no-files_and_--merges/__driver__.lua -index b27551e..de4d26d 100644 ---- a/test/func/log_--no-files_and_--merges/__driver__.lua -+++ b/test/func/log_--no-files_and_--merges/__driver__.lua -@@ -29,8 +29,8 @@ R2=base_revision() - - -- check that merge is included by default - check(mtn("log"), 0, true, false) --check(qgrep("^[\\|\\\\\/ ]+Revision.*"..R2, "stdout")) -+check(qgrep("^[\\|\\\\/ ]+Revision.*"..R2, "stdout")) - - -- and that it is excluded by --no-merges - check(mtn("log", "--no-merges"), 0, true, false) --check(not qgrep("^[\\|\\\\\/ ]+Revision.*"..R2, "stdout")) -+check(not qgrep("^[\\|\\\\/ ]+Revision.*"..R2, "stdout")) -diff --git a/test/func/manpage/__driver__.lua b/test/func/manpage/__driver__.lua -index 775714e..38e5ee7 100644 ---- a/test/func/manpage/__driver__.lua -+++ b/test/func/manpage/__driver__.lua -@@ -5,7 +5,7 @@ rename("stdout", "manpage") - - -- check for a proper header line - check(mtn("version"), 0, true, false) --local s,e,version = string.find(readfile("stdout"), "(monotone %d+\.%d+%S*)") -+local s,e,version = string.find(readfile("stdout"), "(monotone %d+%.%d+%S*)") - check(qgrep(".TH \"monotone\" 1 \"[0-9]{4}-[0-9]{2}-[0-9]{2}\" \"" .. version .. "\"", "manpage")) - - -- check required sections -diff --git a/test/func/netsync_negotiation/__driver__.lua b/test/func/netsync_negotiation/__driver__.lua -index 2efe421..c776f93 100644 ---- a/test/func/netsync_negotiation/__driver__.lua -+++ b/test/func/netsync_negotiation/__driver__.lua -@@ -87,10 +87,10 @@ function check_same_revs(cmd1, cmd2) - check(cmd2, 0, true, false) - local data2 = {} - for l in io.lines("stdout") do table.insert(data2, l) end -- L("Command 1 has ", table.getn(data1), " lines.") -- L("Command 2 has ", table.getn(data2), " lines.") -- check(table.getn(data1) == table.getn(data2)) -- for i = 1, table.getn(data1) do -+ L("Command 1 has ", #data1, " lines.") -+ L("Command 2 has ", #data2, " lines.") -+ check(#data1 == #data2) -+ for i = 1, #data1 do - local hash_len = 40 - check(data1[i]:sub(1, hash_len) == data2[i]:sub(1, hash_len)) - end -diff --git a/test/func/serve-automate-single-run/__driver__.lua b/test/func/serve-automate-single-run/__driver__.lua -index 87b1ab7..b65b9c1 100644 ---- a/test/func/serve-automate-single-run/__driver__.lua -+++ b/test/func/serve-automate-single-run/__driver__.lua -@@ -28,7 +28,7 @@ server = netsync.start({"--rcfile=allow-automate.lua"}) - - check(mtn2("automate", "remote", "--remote-stdio-host", server.address, - "interface_version"), 0, true, false) --check(qgrep("^[0-9]{2,}\.[0-9]+$", "stdout")) -+check(qgrep("^[0-9]{2,}\\.[0-9]+$", "stdout")) - - check(mtn2("automate", "remote", "--remote-stdio-host", server.address, - "leaves"), 0, true, false) -diff --git a/test/func/serve-automate/__driver__.lua b/test/func/serve-automate/__driver__.lua -index 32b2eaf..9e993dc 100644 ---- a/test/func/serve-automate/__driver__.lua -+++ b/test/func/serve-automate/__driver__.lua -@@ -14,7 +14,7 @@ server = netsync.start({"--rcfile=deny-automate.lua"}) - - local errors = run_remote_stdio(server, "l17:interface_versione", 1, 0, "e") - check( -- table.maxn(errors) == 1 and -+ #errors == 1 and - errors[1] == "misuse: Sorry, you aren't allowed to do that." - ) - -@@ -45,7 +45,7 @@ check( - - local errors = run_remote_stdio(server, "l5:stdioe", 1, 0, "e") - check( -- table.maxn(errors) == 1 and -+ #errors == 1 and - errors[1] == "error: sorry, that can't be run remotely or over stdio" - ) - -diff --git a/test/func/ssh_agent/__driver__.lua b/test/func/ssh_agent/__driver__.lua -index d927360..a36ce90 100644 ---- a/test/func/ssh_agent/__driver__.lua -+++ b/test/func/ssh_agent/__driver__.lua -@@ -81,7 +81,7 @@ end - - check({"ssh-agent"}, 0, true, false) - for line in io.lines("stdout") do -- for k, v in string.gmatch(line, "([%w_]+)=([%w/\.-]+)") do -+ for k, v in string.gmatch(line, "([%w_]+)=([%w/%.-]+)") do - set_env(k, v) - end - end -@@ -91,7 +91,7 @@ check(mtn("ssh_agent_add"), 0, false, false) - check({"ssh-add", "-l"}, 0, true, false) - ok = false - for line in io.lines("stdout") do -- for k in string.gmatch(line, "tester@test\.net") do -+ for k in string.gmatch(line, "tester@test%.net") do - ok = true - end - end -@@ -288,7 +288,7 @@ check(mtn("ssh_agent_add", "--key", "test2@tester.net"), 0, false, false) - check({"ssh-add", "-l"}, 0, true, false) - ok = false - for line in io.lines("stdout") do -- for k in string.gmatch(line, "test2@tester\.net") do -+ for k in string.gmatch(line, "test2@tester%.net") do - ok = true - end - end -@@ -338,7 +338,7 @@ check(mtn("ssh_agent_add", "--key", "test_pass@tester.net"), 0, false, false, "p - check({"ssh-add", "-l"}, 0, true, false) - ok = false - for line in io.lines("stdout") do -- for k in string.gmatch(line, "test_pass@tester\.net") do -+ for k in string.gmatch(line, "test_pass@tester%.net") do - ok = true - end - end -diff --git a/test/func/two_parent_workspace_inodeprints/__driver__.lua b/test/func/two_parent_workspace_inodeprints/__driver__.lua -index bd6c558..66d5150 100644 ---- a/test/func/two_parent_workspace_inodeprints/__driver__.lua -+++ b/test/func/two_parent_workspace_inodeprints/__driver__.lua -@@ -19,13 +19,13 @@ check(mtn("merge_into_workspace", other), 0, false, false) - - -- check that we've got the expected initial status - check(mtn("status"), 0, true, false) --check(qgrep("patched[ ]\+foo", "stdout")) -+check(qgrep("patched[ ]+foo", "stdout")) - - -- enable inodeprints - writefile("_MTN/inodeprints") - - check(mtn("status"), 0, true, false) --check(qgrep("patched[ ]\+foo", "stdout")) -+check(qgrep("patched[ ]+foo", "stdout")) - - sleep(5) - -diff --git a/test/func/user_commands/extra_rc b/test/func/user_commands/extra_rc -index 2ec5f9f..aad3764 100644 ---- a/test/func/user_commands/extra_rc -+++ b/test/func/user_commands/extra_rc -@@ -5,7 +5,8 @@ function check_head(...) - io.stderr:write("automate call failed\n") - return - end -- arghead = unpack(arg) -+ local arg = {...} -+ arghead = arg[1] - heads = heads:gsub("^%s*(.-)%s*$", "%1") -- trim leading and trailing whitespace - if (heads == arghead) then - io.write("heads are equal\n") -diff --git a/test/src/testlib.lua b/test/src/testlib.lua -index 6d21a93..19eb278 100644 ---- a/test/src/testlib.lua -+++ b/test/src/testlib.lua -@@ -30,6 +30,13 @@ files = {stdout = nil, stdin = nil, stderr = nil} - -- for convenience, this is the first word of what get_ostype() returns. - ostype = string.sub(get_ostype(), 1, string.find(get_ostype(), " ")-1) - -+-- Since Lua 5.2, unpack and loadstrings are deprecated and are either moved -+-- to table.unpack() or replaced by load(). If lua was compiled without -+-- LUA_COMPAT_UNPACK and/or LUA_COMPAT_LOADSTRING, these two are not -+-- available and we add a similar compatibility layer, ourselves. -+unpack = unpack or table.unpack -+loadstring = loadstring or load -+ - -- table of per-test values - test = {} - -- misc per-test values -@@ -310,17 +317,11 @@ end - -- to want to include from the dir for the current test, - -- since in that case it could just go in the driver file. - function include(name) -- local func, e = loadfile(testdir.."/"..name) -- if func == nil then err(e, 2) end -- setfenv(func, getfenv(2)) -- func() -+ dofile(testdir.."/"..name) - end - - function includecommon(name) -- local func, e = loadfile(srcdir.."/common/"..name) -- if func == nil then err(e, 2) end -- setfenv(func, getfenv(2)) -- func() -+ dofile(srcdir.."/common/"..name) - end - - function trim(str) -@@ -479,12 +480,11 @@ end - function samelines(f, t) - local fl = {} - for l in io.lines(f) do table.insert(fl, l) end -- if not (table.getn(fl) == table.getn(t)) then -- L(locheader(), string.format("file has %s lines; table has %s\n", -- table.getn(fl), table.getn(t))) -+ if not (#fl == #t) then -+ L(locheader(), string.format("file has %s lines; table has %s\n", #fl, #t)) - return false - end -- for i=1,table.getn(t) do -+ for i=1,#t do - if fl[i] ~= t[i] then - if fl[i] then - L(locheader(), string.format("file[%d] = '%s'; table[%d] = '%s'\n", -@@ -502,12 +502,11 @@ end - function greplines(f, t) - local fl = {} - for l in io.lines(f) do table.insert(fl, l) end -- if not (table.getn(fl) == table.getn(t)) then -- L(locheader(), string.format("file has %s lines; table has %s\n", -- table.getn(fl), table.getn(t))) -+ if not (#fl == #t) then -+ L(locheader(), string.format("file has %s lines; table has %s\n", #fl, #t)) - return false - end -- for i=1,table.getn(t) do -+ for i=1,#t do - if not regex.search(t[i], fl[i]) then - L(locheader(), string.format("file[i] = '%s'; table[i] = '%s'\n", - fl[i], t[i])) -@@ -577,7 +576,7 @@ function tail(...) - local mylines = {} - for l in io.lines(file) do - table.insert(mylines, l) -- if table.getn(mylines) > num then -+ if #mylines > num then - table.remove(mylines, 1) - end - end -@@ -932,8 +931,8 @@ function run_tests(debugging, list_only, run_dir, logname, args, progress) - if _1 then - l = l + 0 - r = r + 0 -- if l < 1 then l = table.getn(tests) + l + 1 end -- if r < 1 then r = table.getn(tests) + r + 1 end -+ if l < 1 then l = #tests + l + 1 end -+ if r < 1 then r = #tests + r + 1 end - if l > r then l,r = r,l end - for j = l,r do - torun[j] = tests[j] -@@ -941,7 +940,7 @@ function run_tests(debugging, list_only, run_dir, logname, args, progress) - run_all = false - elseif string.find(a, "^-?%d+$") then - r = a + 0 -- if r < 1 then r = table.getn(tests) + r + 1 end -+ if r < 1 then r = #tests + r + 1 end - torun[r] = tests[r] - run_all = false - else --- -tg: (1150daa..) lua-5.2 (depends on: master) diff --git a/monotone-1.0-pcre.patch b/monotone-1.0-pcre.patch deleted file mode 100644 index 9abd4ac..0000000 --- a/monotone-1.0-pcre.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore.orig monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore ---- monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore.orig 2011-03-26 07:41:05.000000000 +0100 -+++ monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore 2012-02-15 19:40:06.282866594 +0100 -@@ -21,7 +21,6 @@ abc\3 - [[:fnord:]] - \\x{123456} - (?(0)) --(?<=\C) - \l - (?C256) - (?C1 diff --git a/monotone-1.0-stacktrace-on-crash.patch b/monotone-1.0-stacktrace-on-crash.patch new file mode 100644 index 0000000..a8d773c --- /dev/null +++ b/monotone-1.0-stacktrace-on-crash.patch @@ -0,0 +1,63 @@ +Add a hack to the fatal signal handlers to invoke gdb and get a full stack +trace on crash. This won't fix anything, but by activating this mode +in the testsuite, we can get more detail on the alpha and sparc FTBFSes. + +Index: monotone-1.0/src/unix/main.cc +=================================================================== +--- monotone-1.0.orig/src/unix/main.cc 2009-04-12 13:39:49.000000000 -0700 ++++ monotone-1.0/src/unix/main.cc 2009-04-12 13:42:56.000000000 -0700 +@@ -36,12 +36,21 @@ + + #include "../base.hh" + #include +-#include ++#include + #include + #include + #include ++#include ++ ++#if __GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) ++# define HAVE_BACKTRACE ++# include ++#endif + + static char const * argv0; ++#ifdef HAVE_BACKTRACE ++static bool backtrace_on_crash = false; ++#endif + + // a convenient wrapper + inline void +@@ -75,6 +84,18 @@ + write_str_to_stderr("do not send a core dump, but if you have one, " + "\nplease preserve it in case we ask you for " + "information from it.\n"); ++#ifdef HAVE_BACKTRACE ++ if (backtrace_on_crash) ++ { ++ void *tracebuf[20]; ++ int frames = backtrace(tracebuf, 20); ++ if (frames) ++ { ++ write_str_to_stderr("stack trace:\n"); ++ backtrace_symbols_fd(tracebuf, frames, 2); ++ } ++ } ++#endif + + raise(signo); + // The signal has been reset to the default handler by SA_RESETHAND +@@ -129,6 +150,12 @@ + + argv0 = argv[0]; + ++#ifdef HAVE_BACKTRACE ++ char *ev = getenv("MTN_STACKTRACE_ON_CRASH"); ++ if (ev && ev[0]) ++ backtrace_on_crash = true; ++#endif ++ + bug_signal_action.sa_flags = SA_RESETHAND; + bug_signal_action.sa_handler = &bug_signal; + sigemptyset(&bug_signal_action.sa_mask); diff --git a/monotone.spec b/monotone.spec index 6d1d354..00b582d 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 1.0 -Release: 17%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -10,27 +10,7 @@ Source1: monotone.init Source2: monotone.sysconfig Source3: README.monotone-server Source4: monotone-server-tmpfiles.conf -# rev da62cad1 from upstream -Patch0: monotone-1.0-file_handle.patch -# rev a570769b from upstream -Patch1: monotone-1.0-fix-help.patch -# FTBFS (symbol conflict with boost) -# https://code.monotone.ca/p/monotone/issues/191/ -Patch2: monotone-1.0-disable-xdelta-test.patch -# Fix a failing test with pcre >= 8.21 -Patch3: monotone-1.0-pcre.patch -# Fix failing bash completion test -Patch4: monotone-1.0-fix-bash_completion-test.patch -# See rhbz#919827 -Patch5: monotone-1.0-fix-diff_patch_drop-test.patch -# Fix FTBFS for Botan 1.10.X -# https://code.monotone.ca/p/monotone/issues/182/ -Patch6: monotone-1.0-botan-1.10.patch -# Fix FTBFS for Lua 5.2 -Patch7: monotone-1.0-lua-5.2.patch -# Fix texinfo errors with texinfo >= 5.0 -Patch8: monotone-1.0-fix-texinfo.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: monotone-1.0-stacktrace-on-crash.patch BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 BuildRequires: botan-devel >= 1.6.3 @@ -86,19 +66,7 @@ and then pass commands to it. %prep %setup -q -%patch0 -p0 -%patch1 -p0 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 - -# fix FTBFS rhbz#914191 -sed -e "s|shared_dynamic_cast|dynamic_pointer_cast|g" \ - -i src/key_store.cc src/ssh_agent.cc src/database.cc +%patch0 -p1 %build @@ -110,11 +78,11 @@ make %{?_smp_mflags} %check export LC_MESSAGES=en_US export DISABLE_NETWORK_TESTS=1 -make %{?_smp_mflags} check || { head -n-0 test/work/*.log; false; } +export MTN_STACKTRACE_ON_CRASH=1 +make check || { head -n-0 test/work/*.log; false; } %install -rm -rf %{buildroot} export LC_MESSAGES=en_US make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_infodir}/dir @@ -156,11 +124,6 @@ install -D -m 0644 -p contrib/Monotone.pm \ %{buildroot}%{perl_vendorlib}/Monotone.pm -%clean -rm -f README.monotone-server -rm -rf %{buildroot} - - %post if [ $1 -eq 1 ] then @@ -176,7 +139,6 @@ fi %files -f %{name}.lang -%defattr(-,root,root,-) %doc AUTHORS COPYING NEWS README UPGRADE %doc _doc/* %{_bindir}/mtn @@ -191,12 +153,10 @@ fi %files -n perl-Monotone -%defattr(-,root,root,-) %{perl_vendorlib}/Monotone.pm %files server -%defattr(-,root,root,-) %doc README.monotone-server %{_sbindir}/monotone-server %{_mandir}/man1/monotone-server.1* @@ -246,6 +206,11 @@ fi %changelog +* Fri Jul 18 2014 Thomas Moschny - 1.1-1 +- Update to 1.1. +- Remove patches and fixes not needed anymore. +- Modernize spec file. + * Sat Jun 07 2014 Fedora Release Engineering - 1.0-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index b9eb4ad..b46ef88 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6a0b5d8560f08d76a950172f9ed0feff monotone-1.0.tar.bz2 +df3f40ca22120aa142ac9becba9e1bf7 monotone-1.1.tar.bz2 From d55359f4618e60d4ccc08fd3e55d2095289c5303 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 10:16:12 +0000 Subject: [PATCH 085/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 00b582d..0c90955 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -206,6 +206,9 @@ fi %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Jul 18 2014 Thomas Moschny - 1.1-1 - Update to 1.1. - Remove patches and fixes not needed anymore. From 5b1bded7116b065abc8d92ba6807e3edab6112ae Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Wed, 27 Aug 2014 00:29:04 +0200 Subject: [PATCH 086/145] Perl 5.20 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 0c90955..04f42bb 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -206,6 +206,9 @@ fi %changelog +* Tue Aug 26 2014 Jitka Plesnikova - 1.1-3 +- Perl 5.20 rebuild + * Sun Aug 17 2014 Fedora Release Engineering - 1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 3ab7c6cc77424c378e5cf771cbc181a5991e89b3 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 27 Jan 2015 01:51:28 +0100 Subject: [PATCH 087/145] Rebuild for boost 1.57.0 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 04f42bb..008cb6e 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -206,6 +206,9 @@ fi %changelog +* Tue Jan 27 2015 Petr Machata - 1.1-4 +- Rebuild for boost 1.57.0 + * Tue Aug 26 2014 Jitka Plesnikova - 1.1-3 - Perl 5.20 rebuild From ad53c71ef066ce37be2a272f88b19dc6b64ac0c9 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 29 Jan 2015 02:27:13 +0100 Subject: [PATCH 088/145] Include in tests/merge_3way.cc --- monotone-1.1-iostream.patch | 14 ++++++++++++++ monotone.spec | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 monotone-1.1-iostream.patch diff --git a/monotone-1.1-iostream.patch b/monotone-1.1-iostream.patch new file mode 100644 index 0000000..b77a4a0 --- /dev/null +++ b/monotone-1.1-iostream.patch @@ -0,0 +1,14 @@ +diff -up monotone-1.1/test/unit/tests/merge_3way.cc\~ monotone-1.1/test/unit/tests/merge_3way.cc +--- monotone-1.1/test/unit/tests/merge_3way.cc~ 2014-05-04 11:15:25.000000000 +0200 ++++ monotone-1.1/test/unit/tests/merge_3way.cc 2015-01-29 02:23:06.774241679 +0100 +@@ -17,6 +17,8 @@ + #include "../randomfile.hh" + #include "../../../src/simplestring_xform.hh" + ++#include ++ + using std::cerr; + using std::cout; + using std::stringstream; + +Diff finished. Thu Jan 29 02:24:29 2015 diff --git a/monotone.spec b/monotone.spec index 008cb6e..65e8d33 100644 --- a/monotone.spec +++ b/monotone.spec @@ -11,6 +11,7 @@ Source2: monotone.sysconfig Source3: README.monotone-server Source4: monotone-server-tmpfiles.conf Patch0: monotone-1.0-stacktrace-on-crash.patch +Patch1: monotone-1.1-iostream.patch BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 BuildRequires: botan-devel >= 1.6.3 @@ -67,6 +68,7 @@ and then pass commands to it. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build @@ -206,8 +208,10 @@ fi %changelog -* Tue Jan 27 2015 Petr Machata - 1.1-4 +* Thu Jan 29 2015 Petr Machata - 1.1-4 - Rebuild for boost 1.57.0 +- Include in tests/merge_3way.cc + (monotone-1.1-iostream.patch) * Tue Aug 26 2014 Jitka Plesnikova - 1.1-3 - Perl 5.20 rebuild From 08857a0e99314858ab913e59fc28cd4c21f8bc41 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Sat, 6 Jun 2015 18:03:34 +0200 Subject: [PATCH 089/145] Perl 5.22 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 65e8d33..1921bfb 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -208,6 +208,9 @@ fi %changelog +* Sat Jun 06 2015 Jitka Plesnikova - 1.1-5 +- Perl 5.22 rebuild + * Thu Jan 29 2015 Petr Machata - 1.1-4 - Rebuild for boost 1.57.0 - Include in tests/merge_3way.cc From 7734a55b14398e6163df91fbfaabd28b545ee626 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 21:00:26 +0000 Subject: [PATCH 090/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 1921bfb..9a70707 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -208,6 +208,9 @@ fi %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat Jun 06 2015 Jitka Plesnikova - 1.1-5 - Perl 5.22 rebuild From 6b6518abd0c11b9d2ccc0296001d0ed1f8ec7923 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 22 Jun 2015 09:18:21 +0200 Subject: [PATCH 091/145] Add patch to fix FTBFS with Lua 5.3 (rhbz#1185790). --- monotone-1.1-lua-integer.patch | 52 ++++++++++++++++++++++++++++++++++ monotone.spec | 7 ++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 monotone-1.1-lua-integer.patch diff --git a/monotone-1.1-lua-integer.patch b/monotone-1.1-lua-integer.patch new file mode 100644 index 0000000..ba0dbb4 --- /dev/null +++ b/monotone-1.1-lua-integer.patch @@ -0,0 +1,52 @@ +diff -Naur monotone-1.1.orig/src/lua.cc monotone-1.1/src/lua.cc +--- monotone-1.1.orig/src/lua.cc 2014-05-04 11:15:17.000000000 +0200 ++++ monotone-1.1/src/lua.cc 2015-06-21 16:47:12.753916549 +0200 +@@ -334,7 +334,7 @@ + { + if (failed) return *this; + if (!check_stack(1)) return *this; +- lua_pushnumber(st, num); ++ lua_pushinteger(st, num); + return *this; + } + +diff -Naur monotone-1.1.orig/src/luaext_platform.cc monotone-1.1/src/luaext_platform.cc +--- monotone-1.1.orig/src/luaext_platform.cc 2014-05-04 11:15:17.000000000 +0200 ++++ monotone-1.1/src/luaext_platform.cc 2015-06-21 15:16:42.455792643 +0200 +@@ -185,8 +185,8 @@ + int res; + int ret; + ret = process_wait(pid, &res); +- lua_pushnumber(LS, res); +- lua_pushnumber(LS, ret); ++ lua_pushinteger(LS, res); ++ lua_pushinteger(LS, ret); + return 2; + } + +diff -Naur monotone-1.1.orig/test/src/tester.cc monotone-1.1/test/src/tester.cc +--- monotone-1.1.orig/test/src/tester.cc 2014-05-04 11:15:25.000000000 +0200 ++++ monotone-1.1/test/src/tester.cc 2015-06-21 15:16:42.491792237 +0200 +@@ -418,8 +418,8 @@ + int res; + int ret; + ret = process_wait(pid, &res, time); +- lua_pushnumber(LS, res); +- lua_pushnumber(LS, ret); ++ lua_pushinteger(LS, res); ++ lua_pushinteger(LS, ret); + return 2; + } + +diff -Naur monotone-1.1.orig/test/src/testlib.lua monotone-1.1/test/src/testlib.lua +--- monotone-1.1.orig/test/src/testlib.lua 2014-05-04 11:15:25.000000000 +0200 ++++ monotone-1.1/test/src/testlib.lua 2015-06-21 16:11:08.180222890 +0200 +@@ -1070,7 +1071,7 @@ + counts.total = counts.total + 1 + local format_seconds = function (seconds) + return string.format("%d:%02d", +- seconds / 60, ++ math.floor(seconds / 60), + seconds % 60) + end + local times = "" diff --git a/monotone.spec b/monotone.spec index 9a70707..c0be6ea 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -12,6 +12,7 @@ Source3: README.monotone-server Source4: monotone-server-tmpfiles.conf Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch +Patch2: monotone-1.1-lua-integer.patch BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 BuildRequires: botan-devel >= 1.6.3 @@ -69,6 +70,7 @@ and then pass commands to it. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build @@ -208,6 +210,9 @@ fi %changelog +* Mon Jun 22 2015 Thomas Moschny - 1.1-7 +- Add patch to fix FTBFS with Lua 5.3 (rhbz#1185790). + * Wed Jun 17 2015 Fedora Release Engineering - 1.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From d675113ba14d52e6d00c3e6a0b6fa6c43ba22e72 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 22 Jul 2015 19:09:42 +0200 Subject: [PATCH 092/145] rebuild for Boost 1.58 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index c0be6ea..dbc3bed 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -210,6 +210,9 @@ fi %changelog +* Wed Jul 22 2015 David Tardon - 1.1-8 +- rebuild for Boost 1.58 + * Mon Jun 22 2015 Thomas Moschny - 1.1-7 - Add patch to fix FTBFS with Lua 5.3 (rhbz#1185790). From a7bf17ce9a18aa11eb51c78f6376407a79c493ab Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 29 Jul 2015 12:54:15 -0500 Subject: [PATCH 093/145] - Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index dbc3bed..75c69df 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -210,6 +210,9 @@ fi %changelog +* Wed Jul 29 2015 Fedora Release Engineering - 1.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + * Wed Jul 22 2015 David Tardon - 1.1-8 - rebuild for Boost 1.58 From 62c5c40cd511da86b8157f2ccd19152a0ebc5bfa Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 27 Aug 2015 20:47:11 +0100 Subject: [PATCH 094/145] Rebuilt for Boost 1.59 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 75c69df..4d6f624 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -210,6 +210,9 @@ fi %changelog +* Thu Aug 27 2015 Jonathan Wakely - 1.1-10 +- Rebuilt for Boost 1.59 + * Wed Jul 29 2015 Fedora Release Engineering - 1.1-9 - Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 From 98aee026840e051bc86ce1c8bf4692ced17ab445 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 15 Jan 2016 14:05:28 +0000 Subject: [PATCH 095/145] Rebuilt for Boost 1.60 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 4d6f624..0dbd828 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -210,6 +210,9 @@ fi %changelog +* Fri Jan 15 2016 Jonathan Wakely - 1.1-11 +- Rebuilt for Boost 1.60 + * Thu Aug 27 2015 Jonathan Wakely - 1.1-10 - Rebuilt for Boost 1.59 From e1062ee92655f1c1eed38a74b9a727808f43089a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 08:42:12 +0000 Subject: [PATCH 096/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 0dbd828..fd676b8 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -210,6 +210,9 @@ fi %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 1.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Jan 15 2016 Jonathan Wakely - 1.1-11 - Rebuilt for Boost 1.60 From 2f157a2462325f2a849bedf536612a58a2c7b5f1 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 8 Feb 2016 19:15:08 +0100 Subject: [PATCH 097/145] Rebuild for Botan 1.10.12. --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index fd676b8..845a312 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -210,6 +210,9 @@ fi %changelog +* Mon Feb 8 2016 Thomas Moschny - 1.1-13 +- Rebuild for Botan 1.10.12. + * Thu Feb 04 2016 Fedora Release Engineering - 1.1-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 023522457b80d1587dfb9dba5bdd0f5ee1d27fd2 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 15 Feb 2016 21:07:46 +0100 Subject: [PATCH 098/145] Switch monotone-server to systemd (#789901). - Mark COPYING as %license. - Do not own /etc/bash_completion.d. - Update README.monotone-server. --- README.monotone-server | 50 ++++----- monotone-server-genkey | 62 ++++++++++ monotone-server-import | 23 ++++ monotone-server-initdb | 34 ++++++ monotone-server-migratedb | 41 +++++++ monotone.init | 231 -------------------------------------- monotone.service | 22 ++++ monotone.spec | 69 +++++++----- monotone.sysconfig | 22 ++-- 9 files changed, 259 insertions(+), 295 deletions(-) create mode 100755 monotone-server-genkey create mode 100755 monotone-server-import create mode 100755 monotone-server-initdb create mode 100755 monotone-server-migratedb delete mode 100644 monotone.init create mode 100644 monotone.service diff --git a/README.monotone-server b/README.monotone-server index a2640d3..2f3b00c 100644 --- a/README.monotone-server +++ b/README.monotone-server @@ -1,42 +1,38 @@ -The Fedora Extras build of monotone provides an extra RPM monotone-server. -This package is intended to make it easy to set up an unattended server +The Fedora build of monotone provides an extra RPM "monotone-server". This +package is intended to make it easy to set up an unattended server installation for Monotone's Netsync protocol (i.e. "monotone serve"). -The package a standard Fedora-style init.d script with chkconfig support -for running the server, installed as /usr/sbin/monotone-server. -(This is just a symlink to monotone that the init script runs instead. -This enables matching "monotone-server" processes with ps to distinguish -server instances from people using monotone.) +The package contains a systemd service unit for running the server, installed +as /usr/sbin/monotone-server. (This is just a symlink to monotone that the +systemd runs instead. This enables matching "monotone-server" processes with +ps to distinguish server instances from people using monotone.) The /etc/monotone directory serves as ~/.monotone for the server. This directory and its contents are not writable by the "monotone" user ID under -which the network server runs. The database lives in /var/lib/monotone, -which the "monotone" user ID must write to. +which the network server runs. The database lives in /var/lib/monotone, which +the "monotone" user ID must write to. -The init.d script will generate a private key for the server to use, if -none exists yet. The key identification will be the host's FQDN (from -/bin/hostname -f). You can use "service monotone genkey [IDENT]" to -generate the private key by hand and set up the unattended server to use -it, supplying a different key identification string if you like. +On startup, the systemd service will generate a private key for the +server to use, if none exists yet, using +/usr/libexec/monotone-server-genkey. The key identification will +contain the host's FQDN (from /bin/hostname -f). Before starting the server, the script will migrate an old database format if you had a previous version of the monotone-server installation. -(This includes converting private keys from the old format.) -You can always do this explicitly with "service monotone migrate". Access to the server is controlled by the /etc/monotone/read-permissions and -/etc/monotone/write-permissions files, unless you write your own Lua hooks -in /etc/monotone/monotonerc. These files are not created or editted by the -RPM scripts, you must create them. These files refer to key identification +/etc/monotone/write-permissions files, unless you write your own Lua hooks in +/etc/monotone/monotonerc. These files are not created or edited by the RPM +scripts, you must create them. These files refer to key identification strings for keys already the database. Anyone allowed write access by the -netwrok server can put new keys in the database with "monotone push" using -the --key-to-push option. To bootstrap this, /etc/monotone/write-permission -must allow some key and that key must be in the database already. You can -put a key in the server's database easily with "service monotone import", +network server can put new keys in the database with "monotone push" using the +--key-to-push option. To bootstrap this, /etc/monotone/write-permission must +allow some key and that key must be in the database already. You can put a +key in the server's database easily with /usr/libexec/monotone-server-import, e.g. to import the public key for a private key in ~/.monotone/keys: - mtn pubkey me@my.com | sudo service monotone import + mtn pubkey me@my.com | sudo /usr/libexec/monotone-server-import -For problems with this package or its scripts, please file bugs -at http://bugzilla.redhat.com/ for the "monotone" component -in th "Fedora Extras" product. +For problems with this package or its scripts, please file bugs at +http://bugzilla.redhat.com/ for the "monotone" component in the "Fedora" +product. diff --git a/monotone-server-genkey b/monotone-server-genkey new file mode 100755 index 0000000..091760c --- /dev/null +++ b/monotone-server-genkey @@ -0,0 +1,62 @@ +#!/bin/sh +# +# Generate a new private server key for the Monotone Server, if needed +# +# Author: Thomas Moschny +# +set -eu + +MONOTONE_CONFDIR="${MONOTONE_CONFDIR:-/etc/monotone}" +MONOTONE_KEYDIR="${MONOTONE_KEYDIR:-/etc/monotone/private-keys}" +MONOTONE_DBFILE="${MONOTONE_DBFILE:-/var/lib/monotone/server.mtn}" +MONOTONE_PPFILE="${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}" + +MONOTONE_KEYID="${MONOTONE_KEYID:-monotone@$(hostname -f)}" +MONOTONE_HOME="${MONOTONE_HOME:-/var/lib/monotone}" + +cd "${MONOTONE_HOME}" + +# check for existing keys +for key in "${MONOTONE_KEYDIR}/${MONOTONE_KEYID}"* ; do + if [ -e "${key}" ] ; then + echo $"Found private key $key" + exit + fi +done + +# check for existing rc file +if [ -s "${MONOTONE_PPFILE}" ] ; then + echo >&2 $"Not overwriting passphrase file ${MONOTONE_PPFILE}" + exit 1 +fi + +# no key found, let's generate one +echo $"Generating key for server ${MONOTONE_KEYID}" + +# generate random passphrase +passphrase="$(dd 2>/dev/null if=/dev/urandom bs=1 count=16 | hexdump -ve '/1 "%02x"')" + +# generate keypair, needs to be run as root +{ echo "${passphrase}"; echo "${passphrase}" ; } | +mtn --confdir="${MONOTONE_CONFDIR}" --db="${MONOTONE_DBFILE}" \ + --keydir="${MONOTONE_KEYDIR}" --force-duplicate-key \ + genkey "${MONOTONE_KEYID}" + +# fix permissions +for key in "${MONOTONE_KEYDIR}/${MONOTONE_KEYID}"* ; do + if [ -e "${key}" ] ; then + chgrp monotone "${key}" + chmod 0640 "${key}" + break + fi + echo >&2 $"No key found, key generation failed?" + exit 1 +done + +# generate rc file +install -o root -g monotone -m 0440 /dev/null "${MONOTONE_PPFILE}" +cat > "${MONOTONE_PPFILE}" < +# +set -eu + +MONOTONE_CONFDIR="${MONOTONE_CONFDIR:-/etc/monotone}" +MONOTONE_KEYDIR="${MONOTONE_KEYDIR:-/etc/monotone/private-keys}" +MONOTONE_DBFILE="${MONOTONE_DBFILE:-/var/lib/monotone/server.mtn}" +MONOTONE_PPFILE="${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}" + +MONOTONE_KEYID="${MONOTONE_KEYID:-monotone@$(hostname -f)}" +MONOTONE_HOME="${MONOTONE_HOME:-/var/lib/monotone}" + +cd "${MONOTONE_HOME}" + +echo $"Importing packets into ${MONOTONE_DBFILE}" + +runuser -u monotone -- mtn --confdir="${MONOTONE_CONFDIR}" \ + --db="${MONOTONE_DBFILE}" --keydir="${MONOTONE_KEYDIR}" \ + read diff --git a/monotone-server-initdb b/monotone-server-initdb new file mode 100755 index 0000000..90d061a --- /dev/null +++ b/monotone-server-initdb @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Initialize a new database for the Monotone Server, if needed +# +# Author: Thomas Moschny +# +set -eu + +MONOTONE_CONFDIR="${MONOTONE_CONFDIR:-/etc/monotone}" +MONOTONE_KEYDIR="${MONOTONE_KEYDIR:-/etc/monotone/private-keys}" +MONOTONE_DBFILE="${MONOTONE_DBFILE:-/var/lib/monotone/server.mtn}" +MONOTONE_PPFILE="${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}" + +MONOTONE_KEYID="${MONOTONE_KEYID:-monotone@$(hostname -f)}" +MONOTONE_HOME="${MONOTONE_HOME:-/var/lib/monotone}" + +cd "${MONOTONE_HOME}" + +# check for existing database +if [ -s "${MONOTONE_DBFILE}" ] ; then + echo $"Found database ${MONOTONE_DBFILE}" + exit +fi + +# no db found +echo $"Creating dababase ${MONOTONE_DBFILE}" + +# create database +runuser -u monotone -- mtn --confdir="${MONOTONE_CONFDIR}" \ + --db="${MONOTONE_DBFILE}" --keydir="${MONOTONE_KEYDIR}" \ + db init + +# fix permissions +chmod 0640 "${MONOTONE_DBFILE}" diff --git a/monotone-server-migratedb b/monotone-server-migratedb new file mode 100755 index 0000000..fffac2c --- /dev/null +++ b/monotone-server-migratedb @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Migrate the Monotone Server database, if needed +# +# Author: Thomas Moschny +# +set -eu + +MONOTONE_CONFDIR="${MONOTONE_CONFDIR:-/etc/monotone}" +MONOTONE_KEYDIR="${MONOTONE_KEYDIR:-/etc/monotone/private-keys}" +MONOTONE_DBFILE="${MONOTONE_DBFILE:-/var/lib/monotone/server.mtn}" +MONOTONE_PPFILE="${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}" + +MONOTONE_KEYID="${MONOTONE_KEYID:-monotone@$(hostname -f)}" +MONOTONE_HOME="${MONOTONE_HOME:-/var/lib/monotone}" + +cd "${MONOTONE_HOME}" + +# check database +version="$(LC_ALL=C runuser -u monotone -- mtn \ + --confdir="${MONOTONE_CONFDIR}" --db="${MONOTONE_DBFILE}" \ + --keydir="${MONOTONE_KEYDIR}" db version)" + +case ${version} in + *"("usable")"*) + echo $"Database is usable" + exit + ;; +esac + +# database needs migration +echo $"Migrating dababase ${MONOTONE_DBFILE}" + +# migrate database +runuser -u monotone -- mtn --confdir="${MONOTONE_CONFDIR}" \ + --db="${MONOTONE_DBFILE}" --keydir="${MONOTONE_KEYDIR}" \ + db migrate + +runuser -u monotone -- mtn --confdir="${MONOTONE_CONFDIR}" \ + --db="${MONOTONE_DBFILE}" --keydir="${MONOTONE_KEYDIR}" \ + db regenerate_caches diff --git a/monotone.init b/monotone.init deleted file mode 100644 index 967ab15..0000000 --- a/monotone.init +++ /dev/null @@ -1,231 +0,0 @@ -#!/bin/sh -# -# This script starts and stops the monotone server. -# -# chkconfig: - 90 10 -# description: Monotone netsync protocol server -# processname: monotone-server -# pidfile: /var/run/monotone/monotone-server.pid -# config: /etc/sysconfig/monotone -# config: /etc/monotone/monotonerc -# -### BEGIN INIT INFO -# Provides: monotone -# Required-Start: $local_fs $network $named $time -# Required-Stop: $local_fs $network -# Short-Description: start and stop Monotone netsync protocol server -# Description: Monotone is a free, distributed version control system. -# It provides fully disconnected operation, manages complete -# tree versions, keeps its state in a local transactional -# database, supports overlapping branches and extensible -# metadata, exchanges work over plain network protocols, -# performs history-sensitive merging, and delegates trust -# functions to client-side RSA certificates. -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 0 - -# Get configuration settings. -[ -f /etc/sysconfig/monotone ] && . /etc/sysconfig/monotone - -# By default it's all good -RETVAL=0 - -MT=/usr/bin/mtn -MTSERVER=/usr/sbin/monotone-server -MONOTONE_PIDFILE=/var/run/monotone/monotone-server.pid -MONOTONE_LOGFILE=${MONOTONE_LOGFILE:-/var/log/monotone.log} -MONOTONE_OLDDB=/var/db/monotone/server.db -MONOTONE_OLDDBFILE=/var/db/monotone/server.mtn -MONOTONE_OLDPPFILE=/var/db/monotone/passphrase.lua - -random_passphrase() -{ - # As of 0.22, 32 chars is the maximum pass phrase length. - dd if=/dev/urandom bs=32 count=1 2> /dev/null | md5sum | - { read sum rest; echo $sum; } -} - -umask 077 - -check_db_version() -{ - db_version=`runuser -s /bin/bash - ${MONOTONE_USER:-monotone} \ - -c "LC_ALL=C \ - $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \ - db version"` || exit 2 - set -- $db_version - [ "$5" == "(usable)" ] - return $? -} - -# See how we were called. -case "$1" in - start) - if [ -e $MONOTONE_OLDDBFILE -a ! -e $MONOTONE_DBFILE ]; then - echo -n $"Moving" "$MONOTONE_OLDDBFILE" $"to" "$MONOTONE_DBFILE" - if mv "$MONOTONE_OLDDBFILE" "$MONOTONE_DBFILE"; then - failure - echo - exit - else - success - echo - fi - rmdir 2> /dev/null /var/db/monotone - fi - if [ -e $MONOTONE_DBFILE ]; then - check_db_version || $0 migrate - elif [ -e $MONOTONE_OLDDB ]; then - echo -n $"Pre-0.26 monotone database must be migrated by hand: " - failure - echo - false - else - $0 init - fi - RETVAL=$? - if [ $RETVAL = 0 ] && [ "x`ls $MONOTONE_KEYDIR`" = x ]; then - $0 genkey - RETVAL=$? - fi - if [ $RETVAL = 0 ]; then - # Start daemon. - echo -n $"Starting monotone server: " - { - exec 3>> $MONOTONE_LOGFILE && - echo >&3 "Server restart at `date`" && - daemon --user=${MONOTONE_USER:-monotone} \ - --pidfile $MONOTONE_PIDFILE \ - $MTSERVER \ - $MONOTONE_RCOPTS $MONOTONE_DBOPTS $MONOTONE_PPOPTS \ - serve --pid-file=$MONOTONE_PIDFILE \ - "$MONOTONE_SERVE_OPTS" ">&3 2>&3 &" - } && success || failure - RETVAL=$? - echo - fi - [ $RETVAL = 0 ] && touch /var/lock/subsys/monotone - ;; - stop) - # Stop daemons. - echo -n $"Stopping monotone server: " - killproc -p $MONOTONE_PIDFILE $MTSERVER - RETVAL=$? - rm -f $MONOTONE_PIDFILE - [ $RETVAL = 0 ] && rm -f /var/lock/subsys/monotone - echo - ;; - restart|force-reload) - $0 stop - $0 start - ;; - condrestart|try-restart) - [ -e /var/lock/subsys/monotone ] && $0 restart - ;; - status) - status -p $MONOTONE_PIDFILE monotone-server - RETVAL=$? - ;; - init) - echo -n $"Initializing database" "${MONOTONE_DBFILE}: " - { [ -d /var/lib/monotone ] || - /usr/bin/install -o ${MONOTONE_USER:-monotone} \ - -g ${MONOTONE_GROUP:-monotone} \ - -m 0770 -d /var/lib/monotone; } && - runuser -s /bin/bash - ${MONOTONE_USER:-monotone} -c "umask 007; \ - $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS db init" && - success $"database initialization" || - failure $"database initialization" - RETVAL=$? - echo - ;; - genkey) - MONOTONE_KEYID=${2:-${MONOTONE_KEYID:-monotone@`/bin/hostname -f`}} - MONOTONE_PPFILE=${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua} - if [ -s "$MONOTONE_PPFILE" -a -s "$MONOTONE_KEYDIR/$MONOTONE_KEYID" ] - then - echo >&2 "$0:" $"Server key already installed" - echo >&2 "$0:" $"To lose old key remove file" "$MONOTONE_PPFILE" - exit 1 - fi - echo -n $"Generating RSA key for server $MONOTONE_KEYID" - tmp=/tmp/mtserver$$ - if - passphrase=`random_passphrase` && - { echo $passphrase; echo $passphrase; } | - (umask 027; $MT $MONOTONE_RCOPTS $MONOTONE_DBOPTS \ - genkey $MONOTONE_KEYID > /dev/null 2>&1) && - /bin/chgrp ${MONOTONE_GROUP:-monotone} \ - "$MONOTONE_KEYDIR/$MONOTONE_KEYID" && - /bin/chmod 0640 "$MONOTONE_KEYDIR/$MONOTONE_KEYID" && - cat > $tmp <= 7.4 BuildRequires: sqlite-devel >= 3.3.8 BuildRequires: lua-devel >= 5.1 BuildRequires: libidn-devel +BuildRequires: systemd + # Required by the test suite: BuildRequires: cvs BuildRequires: bash-completion BuildRequires: expect + Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -44,9 +51,9 @@ functions to client-side RSA certificates. Summary: Standalone server setup for monotone Requires: monotone = %{version}-%{release} Requires(pre): shadow-utils -Requires(post): chkconfig -Requires(preun): initscripts, chkconfig -Requires(postun): initscripts +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd Group: Development/Tools @@ -80,10 +87,10 @@ make %{?_smp_mflags} %check -export LC_MESSAGES=en_US -export DISABLE_NETWORK_TESTS=1 -export MTN_STACKTRACE_ON_CRASH=1 -make check || { head -n-0 test/work/*.log; false; } +#export LC_MESSAGES=en_US +#export DISABLE_NETWORK_TESTS=1 +#export MTN_STACKTRACE_ON_CRASH=1 +#make check || { head -n-0 test/work/*.log; false; } %install @@ -98,17 +105,20 @@ mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_localstatedir}/lib ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server ln -snf mtn.1 %{buildroot}%{_mandir}/man1/monotone-server.1 -install -D -m 0755 -p %{SOURCE1} \ - %{buildroot}%{_sysconfdir}/rc.d/init.d/monotone +install -D -m 0644 -p %{SOURCE1} %{buildroot}%{_unitdir}/monotone.service + install -D -m 0644 -p %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone install -d -m 0755 %{buildroot}%{_sysconfdir}/monotone install -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys install -d -m 0770 %{buildroot}%{_localstatedir}/lib/monotone install -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone -%if 0%{?fedora} >= 15 install -D -m 0644 %{SOURCE4} \ %{buildroot}%{_sysconfdir}/tmpfiles.d/monotone.conf -%endif + +install -D -m 0755 -p %{SOURCE5} %{buildroot}%{_libexecdir}/monotone-server-initdb +install -D -m 0755 -p %{SOURCE6} %{buildroot}%{_libexecdir}/monotone-server-migratedb +install -D -m 0755 -p %{SOURCE7} %{buildroot}%{_libexecdir}/monotone-server-genkey +install -D -m 0755 -p %{SOURCE8} %{buildroot}%{_libexecdir}/monotone-server-import # These do not actually wind up in the package, due to %%ghost. install -m 0440 /dev/null \ @@ -143,13 +153,14 @@ fi %files -f %{name}.lang -%doc AUTHORS COPYING NEWS README UPGRADE +%doc AUTHORS NEWS README UPGRADE %doc _doc/* +%license COPYING %{_bindir}/mtn %{_bindir}/mtnopt %{_bindir}/mtn-cleanup %{_infodir}/monotone.info* -%{_sysconfdir}/bash_completion.d +%{_sysconfdir}/bash_completion.d/monotone.bash_completion %{_mandir}/man1/mtn.1* %{_mandir}/man1/mtnopt.1* %{_mandir}/man1/mtn-cleanup.1* @@ -164,12 +175,13 @@ fi %doc README.monotone-server %{_sbindir}/monotone-server %{_mandir}/man1/monotone-server.1* -%{_sysconfdir}/rc.d/init.d/monotone +%{_unitdir}/monotone.service +%{_libexecdir}/monotone-server-initdb +%{_libexecdir}/monotone-server-migratedb +%{_libexecdir}/monotone-server-genkey +%{_libexecdir}/monotone-server-import %dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone -%if 0%{?fedora} >= 15 -# https://fedoraproject.org/wiki/Packaging:Tmpfiles.d %config(noreplace) %{_sysconfdir}/tmpfiles.d/monotone.conf -%endif %config(noreplace) %{_sysconfdir}/sysconfig/monotone %dir %attr(0755,root,monotone) %{_sysconfdir}/monotone %dir %attr(0750,root,monotone) %{_sysconfdir}/monotone/private-keys @@ -191,25 +203,24 @@ exit 0 %post server -# Register the monotone service -/sbin/chkconfig --add monotone +%systemd_post monotone.service %preun server -if [ $1 -eq 0 ]; then - /sbin/service monotone stop > /dev/null 2>&1 - /sbin/chkconfig --del monotone -fi +%systemd_preun monotone.service %postun server -if [ $1 -ge 1 ]; then - # Restart the running server: updates its db format when needed. - /sbin/service monotone condrestart > /dev/null 2>&1 || : -fi +%systemd_postun monotone.service %changelog +* Sun Feb 14 2016 Thomas Moschny - 1.1-14 +- Switch monotone-server to systemd (#789901). +- Mark COPYING as %%license. +- Do not own /etc/bash_completion.d. +- Update README.monotone-server. + * Mon Feb 8 2016 Thomas Moschny - 1.1-13 - Rebuild for Botan 1.10.12. diff --git a/monotone.sysconfig b/monotone.sysconfig index a61496a..8aa8ac9 100644 --- a/monotone.sysconfig +++ b/monotone.sysconfig @@ -1,10 +1,16 @@ -MONOTONE_CONFDIR=/etc/monotone -MONOTONE_KEYDIR=/etc/monotone/private-keys -MONOTONE_DBFILE=/var/lib/monotone/server.mtn -MONOTONE_PPFILE=/etc/monotone/passphrase.lua +# Options for the Monotone DVCS Server +# +# options can be changed here, or (better) within override files in +# /etc/systemd/system/monotone.service.d -MONOTONE_RCOPTS="--confdir=$MONOTONE_CONFDIR" -MONOTONE_DBOPTS="--db=$MONOTONE_DBFILE --keydir=$MONOTONE_KEYDIR" -MONOTONE_PPOPTS="--rcfile=$MONOTONE_PPFILE" +# --confdir: location of the configuration directory +#MONOTONE_CONFDIR=/etc/monotone -MONOTONE_SERVE_OPTS="" +# --keydir: location of the key store +#MONOTONE_KEYDIR=/etc/monotone/private-keys + +# --db: name of the database file +#MONOTONE_DBFILE=/var/lib/monotone/server.mtn + +# --rcfile: used to pass the passphrase of the server's private key +#MONOTONE_PPFILE=/etc/monotone/passphrase.lua From 4de6adc760849a36f595a0e44581fa95a061c5a0 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Sun, 15 May 2016 02:05:29 +0200 Subject: [PATCH 099/145] Perl 5.24 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 91889d1..926d994 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -215,6 +215,9 @@ exit 0 %changelog +* Sun May 15 2016 Jitka Plesnikova - 1.1-15 +- Perl 5.24 rebuild + * Sun Feb 14 2016 Thomas Moschny - 1.1-14 - Switch monotone-server to systemd (#789901). - Mark COPYING as %%license. From 92fc046ae42e6753a3167b171362c6bf260dacb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 24 Jun 2016 09:56:12 +0200 Subject: [PATCH 100/145] Mandatory Perl build-requires added --- monotone.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/monotone.spec b/monotone.spec index 926d994..54d9a73 100644 --- a/monotone.spec +++ b/monotone.spec @@ -17,6 +17,7 @@ Source8: monotone-server-import Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch +BuildRequires: perl-generators BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 BuildRequires: botan-devel >= 1.6.3 From c6feeb3a8388e157c8c06d98703ac76a8022f15f Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 10 Oct 2016 21:24:36 +0200 Subject: [PATCH 101/145] Import current rawhide package. --- .cvsignore | 0 .gitignore | 6 + Makefile | 21 - README.monotone-server | 38 ++ monotone-1.0-stacktrace-on-crash.patch | 63 +++ monotone-1.1-iostream.patch | 14 + monotone-1.1-lua-integer.patch | 52 +++ monotone-server-genkey | 62 +++ monotone-server-import | 23 ++ monotone-server-initdb | 34 ++ monotone-server-migratedb | 41 ++ monotone-server-tmpfiles.conf | 1 + monotone.service | 22 + monotone.spec | 535 +++++++++++++++++++++++++ monotone.sysconfig | 16 + sources | 1 + 16 files changed, 908 insertions(+), 21 deletions(-) delete mode 100644 .cvsignore create mode 100644 .gitignore delete mode 100644 Makefile create mode 100644 README.monotone-server create mode 100644 monotone-1.0-stacktrace-on-crash.patch create mode 100644 monotone-1.1-iostream.patch create mode 100644 monotone-1.1-lua-integer.patch create mode 100755 monotone-server-genkey create mode 100755 monotone-server-import create mode 100755 monotone-server-initdb create mode 100755 monotone-server-migratedb create mode 100644 monotone-server-tmpfiles.conf create mode 100644 monotone.service create mode 100644 monotone.spec create mode 100644 monotone.sysconfig diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8cc96f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +monotone-0.48.tar.gz +/monotone-0.48.1.tar.gz +/monotone-0.99.tar.gz +/monotone-0.99.1.tar.gz +/monotone-1.0.tar.bz2 +/monotone-1.1.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index 659e999..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: monotone -# $Id$ -NAME := monotone -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/README.monotone-server b/README.monotone-server new file mode 100644 index 0000000..2f3b00c --- /dev/null +++ b/README.monotone-server @@ -0,0 +1,38 @@ +The Fedora build of monotone provides an extra RPM "monotone-server". This +package is intended to make it easy to set up an unattended server +installation for Monotone's Netsync protocol (i.e. "monotone serve"). + +The package contains a systemd service unit for running the server, installed +as /usr/sbin/monotone-server. (This is just a symlink to monotone that the +systemd runs instead. This enables matching "monotone-server" processes with +ps to distinguish server instances from people using monotone.) + +The /etc/monotone directory serves as ~/.monotone for the server. This +directory and its contents are not writable by the "monotone" user ID under +which the network server runs. The database lives in /var/lib/monotone, which +the "monotone" user ID must write to. + +On startup, the systemd service will generate a private key for the +server to use, if none exists yet, using +/usr/libexec/monotone-server-genkey. The key identification will +contain the host's FQDN (from /bin/hostname -f). + +Before starting the server, the script will migrate an old database +format if you had a previous version of the monotone-server installation. + +Access to the server is controlled by the /etc/monotone/read-permissions and +/etc/monotone/write-permissions files, unless you write your own Lua hooks in +/etc/monotone/monotonerc. These files are not created or edited by the RPM +scripts, you must create them. These files refer to key identification +strings for keys already the database. Anyone allowed write access by the +network server can put new keys in the database with "monotone push" using the +--key-to-push option. To bootstrap this, /etc/monotone/write-permission must +allow some key and that key must be in the database already. You can put a +key in the server's database easily with /usr/libexec/monotone-server-import, +e.g. to import the public key for a private key in ~/.monotone/keys: + + mtn pubkey me@my.com | sudo /usr/libexec/monotone-server-import + +For problems with this package or its scripts, please file bugs at +http://bugzilla.redhat.com/ for the "monotone" component in the "Fedora" +product. diff --git a/monotone-1.0-stacktrace-on-crash.patch b/monotone-1.0-stacktrace-on-crash.patch new file mode 100644 index 0000000..a8d773c --- /dev/null +++ b/monotone-1.0-stacktrace-on-crash.patch @@ -0,0 +1,63 @@ +Add a hack to the fatal signal handlers to invoke gdb and get a full stack +trace on crash. This won't fix anything, but by activating this mode +in the testsuite, we can get more detail on the alpha and sparc FTBFSes. + +Index: monotone-1.0/src/unix/main.cc +=================================================================== +--- monotone-1.0.orig/src/unix/main.cc 2009-04-12 13:39:49.000000000 -0700 ++++ monotone-1.0/src/unix/main.cc 2009-04-12 13:42:56.000000000 -0700 +@@ -36,12 +36,21 @@ + + #include "../base.hh" + #include +-#include ++#include + #include + #include + #include ++#include ++ ++#if __GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) ++# define HAVE_BACKTRACE ++# include ++#endif + + static char const * argv0; ++#ifdef HAVE_BACKTRACE ++static bool backtrace_on_crash = false; ++#endif + + // a convenient wrapper + inline void +@@ -75,6 +84,18 @@ + write_str_to_stderr("do not send a core dump, but if you have one, " + "\nplease preserve it in case we ask you for " + "information from it.\n"); ++#ifdef HAVE_BACKTRACE ++ if (backtrace_on_crash) ++ { ++ void *tracebuf[20]; ++ int frames = backtrace(tracebuf, 20); ++ if (frames) ++ { ++ write_str_to_stderr("stack trace:\n"); ++ backtrace_symbols_fd(tracebuf, frames, 2); ++ } ++ } ++#endif + + raise(signo); + // The signal has been reset to the default handler by SA_RESETHAND +@@ -129,6 +150,12 @@ + + argv0 = argv[0]; + ++#ifdef HAVE_BACKTRACE ++ char *ev = getenv("MTN_STACKTRACE_ON_CRASH"); ++ if (ev && ev[0]) ++ backtrace_on_crash = true; ++#endif ++ + bug_signal_action.sa_flags = SA_RESETHAND; + bug_signal_action.sa_handler = &bug_signal; + sigemptyset(&bug_signal_action.sa_mask); diff --git a/monotone-1.1-iostream.patch b/monotone-1.1-iostream.patch new file mode 100644 index 0000000..b77a4a0 --- /dev/null +++ b/monotone-1.1-iostream.patch @@ -0,0 +1,14 @@ +diff -up monotone-1.1/test/unit/tests/merge_3way.cc\~ monotone-1.1/test/unit/tests/merge_3way.cc +--- monotone-1.1/test/unit/tests/merge_3way.cc~ 2014-05-04 11:15:25.000000000 +0200 ++++ monotone-1.1/test/unit/tests/merge_3way.cc 2015-01-29 02:23:06.774241679 +0100 +@@ -17,6 +17,8 @@ + #include "../randomfile.hh" + #include "../../../src/simplestring_xform.hh" + ++#include ++ + using std::cerr; + using std::cout; + using std::stringstream; + +Diff finished. Thu Jan 29 02:24:29 2015 diff --git a/monotone-1.1-lua-integer.patch b/monotone-1.1-lua-integer.patch new file mode 100644 index 0000000..ba0dbb4 --- /dev/null +++ b/monotone-1.1-lua-integer.patch @@ -0,0 +1,52 @@ +diff -Naur monotone-1.1.orig/src/lua.cc monotone-1.1/src/lua.cc +--- monotone-1.1.orig/src/lua.cc 2014-05-04 11:15:17.000000000 +0200 ++++ monotone-1.1/src/lua.cc 2015-06-21 16:47:12.753916549 +0200 +@@ -334,7 +334,7 @@ + { + if (failed) return *this; + if (!check_stack(1)) return *this; +- lua_pushnumber(st, num); ++ lua_pushinteger(st, num); + return *this; + } + +diff -Naur monotone-1.1.orig/src/luaext_platform.cc monotone-1.1/src/luaext_platform.cc +--- monotone-1.1.orig/src/luaext_platform.cc 2014-05-04 11:15:17.000000000 +0200 ++++ monotone-1.1/src/luaext_platform.cc 2015-06-21 15:16:42.455792643 +0200 +@@ -185,8 +185,8 @@ + int res; + int ret; + ret = process_wait(pid, &res); +- lua_pushnumber(LS, res); +- lua_pushnumber(LS, ret); ++ lua_pushinteger(LS, res); ++ lua_pushinteger(LS, ret); + return 2; + } + +diff -Naur monotone-1.1.orig/test/src/tester.cc monotone-1.1/test/src/tester.cc +--- monotone-1.1.orig/test/src/tester.cc 2014-05-04 11:15:25.000000000 +0200 ++++ monotone-1.1/test/src/tester.cc 2015-06-21 15:16:42.491792237 +0200 +@@ -418,8 +418,8 @@ + int res; + int ret; + ret = process_wait(pid, &res, time); +- lua_pushnumber(LS, res); +- lua_pushnumber(LS, ret); ++ lua_pushinteger(LS, res); ++ lua_pushinteger(LS, ret); + return 2; + } + +diff -Naur monotone-1.1.orig/test/src/testlib.lua monotone-1.1/test/src/testlib.lua +--- monotone-1.1.orig/test/src/testlib.lua 2014-05-04 11:15:25.000000000 +0200 ++++ monotone-1.1/test/src/testlib.lua 2015-06-21 16:11:08.180222890 +0200 +@@ -1070,7 +1071,7 @@ + counts.total = counts.total + 1 + local format_seconds = function (seconds) + return string.format("%d:%02d", +- seconds / 60, ++ math.floor(seconds / 60), + seconds % 60) + end + local times = "" diff --git a/monotone-server-genkey b/monotone-server-genkey new file mode 100755 index 0000000..091760c --- /dev/null +++ b/monotone-server-genkey @@ -0,0 +1,62 @@ +#!/bin/sh +# +# Generate a new private server key for the Monotone Server, if needed +# +# Author: Thomas Moschny +# +set -eu + +MONOTONE_CONFDIR="${MONOTONE_CONFDIR:-/etc/monotone}" +MONOTONE_KEYDIR="${MONOTONE_KEYDIR:-/etc/monotone/private-keys}" +MONOTONE_DBFILE="${MONOTONE_DBFILE:-/var/lib/monotone/server.mtn}" +MONOTONE_PPFILE="${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}" + +MONOTONE_KEYID="${MONOTONE_KEYID:-monotone@$(hostname -f)}" +MONOTONE_HOME="${MONOTONE_HOME:-/var/lib/monotone}" + +cd "${MONOTONE_HOME}" + +# check for existing keys +for key in "${MONOTONE_KEYDIR}/${MONOTONE_KEYID}"* ; do + if [ -e "${key}" ] ; then + echo $"Found private key $key" + exit + fi +done + +# check for existing rc file +if [ -s "${MONOTONE_PPFILE}" ] ; then + echo >&2 $"Not overwriting passphrase file ${MONOTONE_PPFILE}" + exit 1 +fi + +# no key found, let's generate one +echo $"Generating key for server ${MONOTONE_KEYID}" + +# generate random passphrase +passphrase="$(dd 2>/dev/null if=/dev/urandom bs=1 count=16 | hexdump -ve '/1 "%02x"')" + +# generate keypair, needs to be run as root +{ echo "${passphrase}"; echo "${passphrase}" ; } | +mtn --confdir="${MONOTONE_CONFDIR}" --db="${MONOTONE_DBFILE}" \ + --keydir="${MONOTONE_KEYDIR}" --force-duplicate-key \ + genkey "${MONOTONE_KEYID}" + +# fix permissions +for key in "${MONOTONE_KEYDIR}/${MONOTONE_KEYID}"* ; do + if [ -e "${key}" ] ; then + chgrp monotone "${key}" + chmod 0640 "${key}" + break + fi + echo >&2 $"No key found, key generation failed?" + exit 1 +done + +# generate rc file +install -o root -g monotone -m 0440 /dev/null "${MONOTONE_PPFILE}" +cat > "${MONOTONE_PPFILE}" < +# +set -eu + +MONOTONE_CONFDIR="${MONOTONE_CONFDIR:-/etc/monotone}" +MONOTONE_KEYDIR="${MONOTONE_KEYDIR:-/etc/monotone/private-keys}" +MONOTONE_DBFILE="${MONOTONE_DBFILE:-/var/lib/monotone/server.mtn}" +MONOTONE_PPFILE="${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}" + +MONOTONE_KEYID="${MONOTONE_KEYID:-monotone@$(hostname -f)}" +MONOTONE_HOME="${MONOTONE_HOME:-/var/lib/monotone}" + +cd "${MONOTONE_HOME}" + +echo $"Importing packets into ${MONOTONE_DBFILE}" + +runuser -u monotone -- mtn --confdir="${MONOTONE_CONFDIR}" \ + --db="${MONOTONE_DBFILE}" --keydir="${MONOTONE_KEYDIR}" \ + read diff --git a/monotone-server-initdb b/monotone-server-initdb new file mode 100755 index 0000000..90d061a --- /dev/null +++ b/monotone-server-initdb @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Initialize a new database for the Monotone Server, if needed +# +# Author: Thomas Moschny +# +set -eu + +MONOTONE_CONFDIR="${MONOTONE_CONFDIR:-/etc/monotone}" +MONOTONE_KEYDIR="${MONOTONE_KEYDIR:-/etc/monotone/private-keys}" +MONOTONE_DBFILE="${MONOTONE_DBFILE:-/var/lib/monotone/server.mtn}" +MONOTONE_PPFILE="${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}" + +MONOTONE_KEYID="${MONOTONE_KEYID:-monotone@$(hostname -f)}" +MONOTONE_HOME="${MONOTONE_HOME:-/var/lib/monotone}" + +cd "${MONOTONE_HOME}" + +# check for existing database +if [ -s "${MONOTONE_DBFILE}" ] ; then + echo $"Found database ${MONOTONE_DBFILE}" + exit +fi + +# no db found +echo $"Creating dababase ${MONOTONE_DBFILE}" + +# create database +runuser -u monotone -- mtn --confdir="${MONOTONE_CONFDIR}" \ + --db="${MONOTONE_DBFILE}" --keydir="${MONOTONE_KEYDIR}" \ + db init + +# fix permissions +chmod 0640 "${MONOTONE_DBFILE}" diff --git a/monotone-server-migratedb b/monotone-server-migratedb new file mode 100755 index 0000000..fffac2c --- /dev/null +++ b/monotone-server-migratedb @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Migrate the Monotone Server database, if needed +# +# Author: Thomas Moschny +# +set -eu + +MONOTONE_CONFDIR="${MONOTONE_CONFDIR:-/etc/monotone}" +MONOTONE_KEYDIR="${MONOTONE_KEYDIR:-/etc/monotone/private-keys}" +MONOTONE_DBFILE="${MONOTONE_DBFILE:-/var/lib/monotone/server.mtn}" +MONOTONE_PPFILE="${MONOTONE_PPFILE:-/etc/monotone/passphrase.lua}" + +MONOTONE_KEYID="${MONOTONE_KEYID:-monotone@$(hostname -f)}" +MONOTONE_HOME="${MONOTONE_HOME:-/var/lib/monotone}" + +cd "${MONOTONE_HOME}" + +# check database +version="$(LC_ALL=C runuser -u monotone -- mtn \ + --confdir="${MONOTONE_CONFDIR}" --db="${MONOTONE_DBFILE}" \ + --keydir="${MONOTONE_KEYDIR}" db version)" + +case ${version} in + *"("usable")"*) + echo $"Database is usable" + exit + ;; +esac + +# database needs migration +echo $"Migrating dababase ${MONOTONE_DBFILE}" + +# migrate database +runuser -u monotone -- mtn --confdir="${MONOTONE_CONFDIR}" \ + --db="${MONOTONE_DBFILE}" --keydir="${MONOTONE_KEYDIR}" \ + db migrate + +runuser -u monotone -- mtn --confdir="${MONOTONE_CONFDIR}" \ + --db="${MONOTONE_DBFILE}" --keydir="${MONOTONE_KEYDIR}" \ + db regenerate_caches diff --git a/monotone-server-tmpfiles.conf b/monotone-server-tmpfiles.conf new file mode 100644 index 0000000..ab4cc78 --- /dev/null +++ b/monotone-server-tmpfiles.conf @@ -0,0 +1 @@ +D /var/run/monotone 0755 monotone monotone - diff --git a/monotone.service b/monotone.service new file mode 100644 index 0000000..b5e8df3 --- /dev/null +++ b/monotone.service @@ -0,0 +1,22 @@ +[Unit] +Description=Monotone DVCS Server +After=local-fs.target +After=network-online.target + +[Service] +User=monotone +Group=monotone +PermissionsStartOnly=yes +Environment=MONOTONE_PPFILE=/etc/monotone/passphrase.lua +Environment=MONOTONE_KEYDIR=/etc/monotone/private-keys +Environment=MONOTONE_CONFDIR=/etc/monotone +Environment=MONOTONE_DBFILE=/var/lib/monotone/server.mtn +EnvironmentFile=-/etc/sysconfig/monotone +ExecStartPre=/usr/libexec/monotone-server-initdb +ExecStartPre=/usr/libexec/monotone-server-migratedb +ExecStartPre=/usr/libexec/monotone-server-genkey +PIDFile=/run/monotone/monotone-server.pid +ExecStart=/usr/sbin/monotone-server --confdir=${MONOTONE_CONFDIR} --db=${MONOTONE_DBFILE} --keydir=${MONOTONE_KEYDIR} --rcfile=${MONOTONE_PPFILE} --pid-file=/run/monotone/monotone-server.pid serve + +[Install] +WantedBy=multi-user.target diff --git a/monotone.spec b/monotone.spec new file mode 100644 index 0000000..54d9a73 --- /dev/null +++ b/monotone.spec @@ -0,0 +1,535 @@ +Name: monotone +Version: 1.1 +Release: 15%{?dist} +Summary: A free, distributed version control system +Group: Development/Tools +License: GPLv2+ +URL: http://monotone.ca/ +Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.bz2 +Source1: monotone.service +Source2: monotone.sysconfig +Source3: README.monotone-server +Source4: monotone-server-tmpfiles.conf +Source5: monotone-server-initdb +Source6: monotone-server-migratedb +Source7: monotone-server-genkey +Source8: monotone-server-import +Patch0: monotone-1.0-stacktrace-on-crash.patch +Patch1: monotone-1.1-iostream.patch +Patch2: monotone-1.1-lua-integer.patch +BuildRequires: perl-generators +BuildRequires: zlib-devel +BuildRequires: boost-devel >= 1.33.1 +BuildRequires: botan-devel >= 1.6.3 +BuildRequires: pcre-devel >= 7.4 +BuildRequires: sqlite-devel >= 3.3.8 +BuildRequires: lua-devel >= 5.1 +BuildRequires: libidn-devel +BuildRequires: systemd + +# Required by the test suite: +BuildRequires: cvs +BuildRequires: bash-completion +BuildRequires: expect + +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info + +# Filter unwanted dependencies +%{?perl_default_filter} + +%description +monotone is a free, distributed version control system. +It provides fully disconnected operation, manages complete +tree versions, keeps its state in a local transactional +database, supports overlapping branches and extensible +metadata, exchanges work over plain network protocols, +performs history-sensitive merging, and delegates trust +functions to client-side RSA certificates. + + +%package server +Summary: Standalone server setup for monotone +Requires: monotone = %{version}-%{release} +Requires(pre): shadow-utils +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Group: Development/Tools + + +%description server +This package provides an easy-to-use standalone server setup for monotone. + + +%package -n perl-Monotone +Summary: Perl Module for monotone +Requires: monotone = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Group: Development/Tools + + +%description -n perl-Monotone +This is a simple Perl module to start a monotone automate sub-process +and then pass commands to it. + + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + + +%build +export LC_MESSAGES=en_US +%configure +make %{?_smp_mflags} + + +%check +#export LC_MESSAGES=en_US +#export DISABLE_NETWORK_TESTS=1 +#export MTN_STACKTRACE_ON_CRASH=1 +#make check || { head -n-0 test/work/*.log; false; } + + +%install +export LC_MESSAGES=en_US +make install DESTDIR=%{buildroot} +rm -f %{buildroot}%{_infodir}/dir +mv %{buildroot}%{_datadir}/doc/%{name} _doc + +%find_lang %{name} + +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_localstatedir}/lib +ln -snf ../bin/mtn %{buildroot}%{_sbindir}/monotone-server +ln -snf mtn.1 %{buildroot}%{_mandir}/man1/monotone-server.1 +install -D -m 0644 -p %{SOURCE1} %{buildroot}%{_unitdir}/monotone.service + +install -D -m 0644 -p %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/monotone +install -d -m 0755 %{buildroot}%{_sysconfdir}/monotone +install -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys +install -d -m 0770 %{buildroot}%{_localstatedir}/lib/monotone +install -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone +install -D -m 0644 %{SOURCE4} \ + %{buildroot}%{_sysconfdir}/tmpfiles.d/monotone.conf + +install -D -m 0755 -p %{SOURCE5} %{buildroot}%{_libexecdir}/monotone-server-initdb +install -D -m 0755 -p %{SOURCE6} %{buildroot}%{_libexecdir}/monotone-server-migratedb +install -D -m 0755 -p %{SOURCE7} %{buildroot}%{_libexecdir}/monotone-server-genkey +install -D -m 0755 -p %{SOURCE8} %{buildroot}%{_libexecdir}/monotone-server-import + +# These do not actually wind up in the package, due to %%ghost. +install -m 0440 /dev/null \ + %{buildroot}%{_sysconfdir}/monotone/passphrase.lua +install -m 0640 /dev/null \ + %{buildroot}%{_sysconfdir}/monotone/read-permissions +install -m 0640 /dev/null \ + %{buildroot}%{_sysconfdir}/monotone/write-permissions +install -m 0644 /dev/null \ + %{buildroot}%{_sysconfdir}/monotone/monotonerc +install -m 0640 /dev/null \ + %{buildroot}%{_localstatedir}/lib/monotone/server.mtn + +install -m 0644 -p %{SOURCE3} . + +install -D -m 0644 -p contrib/Monotone.pm \ + %{buildroot}%{perl_vendorlib}/Monotone.pm + + +%post +if [ $1 -eq 1 ] +then + /sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : +fi + + +%preun +if [ $1 -eq 0 ] +then + /sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : +fi + + +%files -f %{name}.lang +%doc AUTHORS NEWS README UPGRADE +%doc _doc/* +%license COPYING +%{_bindir}/mtn +%{_bindir}/mtnopt +%{_bindir}/mtn-cleanup +%{_infodir}/monotone.info* +%{_sysconfdir}/bash_completion.d/monotone.bash_completion +%{_mandir}/man1/mtn.1* +%{_mandir}/man1/mtnopt.1* +%{_mandir}/man1/mtn-cleanup.1* +%{_datadir}/monotone + + +%files -n perl-Monotone +%{perl_vendorlib}/Monotone.pm + + +%files server +%doc README.monotone-server +%{_sbindir}/monotone-server +%{_mandir}/man1/monotone-server.1* +%{_unitdir}/monotone.service +%{_libexecdir}/monotone-server-initdb +%{_libexecdir}/monotone-server-migratedb +%{_libexecdir}/monotone-server-genkey +%{_libexecdir}/monotone-server-import +%dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone +%config(noreplace) %{_sysconfdir}/tmpfiles.d/monotone.conf +%config(noreplace) %{_sysconfdir}/sysconfig/monotone +%dir %attr(0755,root,monotone) %{_sysconfdir}/monotone +%dir %attr(0750,root,monotone) %{_sysconfdir}/monotone/private-keys +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/monotonerc +%attr(0440,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/passphrase.lua +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/read-permissions +%attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/write-permissions +%dir %attr(0770,monotone,monotone) %{_localstatedir}/lib/monotone +%attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/lib/monotone/server.mtn + + +%pre server +# Add "monotone" user per http://fedoraproject.org/wiki/Packaging/UsersAndGroups +getent group monotone > /dev/null || groupadd -r monotone +getent passwd monotone > /dev/null || +useradd -r -g monotone -r -d %{_localstatedir}/lib/monotone -s /sbin/nologin \ + -c "Monotone Netsync Server" monotone +exit 0 + + +%post server +%systemd_post monotone.service + + +%preun server +%systemd_preun monotone.service + + +%postun server +%systemd_postun monotone.service + + +%changelog +* Sun May 15 2016 Jitka Plesnikova - 1.1-15 +- Perl 5.24 rebuild + +* Sun Feb 14 2016 Thomas Moschny - 1.1-14 +- Switch monotone-server to systemd (#789901). +- Mark COPYING as %%license. +- Do not own /etc/bash_completion.d. +- Update README.monotone-server. + +* Mon Feb 8 2016 Thomas Moschny - 1.1-13 +- Rebuild for Botan 1.10.12. + +* Thu Feb 04 2016 Fedora Release Engineering - 1.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 15 2016 Jonathan Wakely - 1.1-11 +- Rebuilt for Boost 1.60 + +* Thu Aug 27 2015 Jonathan Wakely - 1.1-10 +- Rebuilt for Boost 1.59 + +* Wed Jul 29 2015 Fedora Release Engineering - 1.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + +* Wed Jul 22 2015 David Tardon - 1.1-8 +- rebuild for Boost 1.58 + +* Mon Jun 22 2015 Thomas Moschny - 1.1-7 +- Add patch to fix FTBFS with Lua 5.3 (rhbz#1185790). + +* Wed Jun 17 2015 Fedora Release Engineering - 1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 06 2015 Jitka Plesnikova - 1.1-5 +- Perl 5.22 rebuild + +* Thu Jan 29 2015 Petr Machata - 1.1-4 +- Rebuild for boost 1.57.0 +- Include in tests/merge_3way.cc + (monotone-1.1-iostream.patch) + +* Tue Aug 26 2014 Jitka Plesnikova - 1.1-3 +- Perl 5.20 rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jul 18 2014 Thomas Moschny - 1.1-1 +- Update to 1.1. +- Remove patches and fixes not needed anymore. +- Modernize spec file. + +* Sat Jun 07 2014 Fedora Release Engineering - 1.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 Petr Machata - 1.0-16 +- Rebuild for boost 1.55.0 + +* Tue Oct 8 2013 Thomas Moschny - 1.0-15 +- Add patches for building with Botan 1.10, Lua 5.2, + and Texinfo >= 5.0. + +* Sat Aug 03 2013 Fedora Release Engineering - 1.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 30 2013 Petr Machata - 1.0-13 +- Rebuild for boost 1.54.0 + +* Wed Jul 17 2013 Petr Pisar - 1.0-12 +- Perl 5.18 rebuild + +* Sat Mar 9 2013 Thomas Moschny - 1.0-11 +- Fix building against Boost 1.53 (FTBFS bug rhbz#914191). +- Fix failing bash completion test. +- Add patch to temporarily disable a failing check in one test (rhbz#919827). + +* Thu Feb 14 2013 Fedora Release Engineering - 1.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 1.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jun 08 2012 Petr Pisar - 1.0-8 +- Perl 5.16 rebuild + +* Thu Feb 16 2012 Thomas Moschny - 1.0-7 +- Add patch to fix building with newer pcre. + +* Fri Feb 10 2012 Petr Pisar - 1.0-6 +- Rebuild against PCRE 8.30 + +* Fri Jan 13 2012 Fedora Release Engineering - 1.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Sep 26 2011 Dan Horák - 1.0-4 +- fix FTBFS due a symbol conflict with boost + +* Mon Jun 20 2011 Marcela Mašláňová - 1.0-3 +- Perl mass rebuild + +* Thu Jun 09 2011 Marcela Mašláňová - 1.0-2 +- Perl 5.14 mass rebuild + +* Sat May 14 2011 Thomas Moschny - 1.0-1 +- Update to 1.0. + - Upstream ships bzip2 archives now. + - monotone.el is no longer shipped. + - Bash completion is installed by 'make install'. + - Add BR on bash-completion, needed for the testsuite. +- Fix postun snippet for -server package. +- On Fedora 15 and later, use the tmpfiles.d service to create the + /var/run/monotone directory. +- Add a patch to prevent a name clash with struct file_handle defined + by fcntl.h in glibc 2.14. +- Add a patch fixing broken helptexts and manpage. +- Explicitly disable network access by the testsuite. +- Fix some rpmlint warnings. + +* Tue Feb 08 2011 Fedora Release Engineering - 0.99.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Oct 31 2010 Thomas Moschny - 0.99.1-1 +- Update to 0.99.1. +- Remove patch already applied upstream. + +* Fri Oct 29 2010 Thomas Moschny - 0.99-1 +- Update to 0.99. +- Remove patch already applied upstream. +- Add patch for monotone bug #100. +- Include the monotone manpage in the package. +- Specfile cleanups. + +* Wed Oct 27 2010 Thomas Moschny - 0.48.1-1 +- Update to 0.48.1. +- Add patch from upstream to support newer sqlite. + +* Mon Jun 14 2010 Thomas Moschny - 0.48-1 +- Update to 0.48. + +* Sat May 8 2010 Thomas Moschny - 0.47-3 +- Add patch from upstream for a bug that prevents successful execution + of push / pull / sync over pipes. + +* Thu Apr 29 2010 Marcela Maslanova - 0.47-2 +- Mass rebuild with perl-5.12.0 + +* Sun Apr 11 2010 Thomas Moschny - 0.47-1 +- Update to 0.47. +- Remove patch applied upstream. + +* Sat Jan 23 2010 Thomas Moschny - 0.46-1 +- Update to 0.46. +- Remove patch applied upstream. +- Add patch from trunk for failing test. +- Fix installation of documentation: include figures in the package. +- Let tests in the testsuite run in parallel. + +* Mon Dec 7 2009 Stepan Kasal - 0.45-2 +- rebuild against perl 5.10.1 + +* Sat Sep 12 2009 Thomas Moschny - 0.45-1 +- Update to 0.45. + +* Sat Jul 25 2009 Fedora Release Engineering - 0.44-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed May 13 2009 Thomas Moschny - 0.44-1 +- Update to 0.44. + +* Sat Apr 25 2009 Thomas Moschny - 0.43-2 +- Rebuilt for new botan version. + +* Fri Mar 27 2009 Thomas Moschny - 0.43-1 +- Update to 0.43. +- Add BRs for libraries monotone doesn't bundle anylonger. +- Drop patches applied upstream. + +* Fri Feb 27 2009 Thomas Moschny - 0.42-5 +- Add one more netsync related patch from trunk. + +* Wed Feb 25 2009 Fedora Release Engineering - 0.42-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 9 2009 Thomas Moschny - 0.42-3 +- Disable %%{_smp_mflags} in the testsuite, causes strange errors. +- Fix two issues with gcc44. +- Add patch from upstream fixing netsync printing an error message of + the form "peer [...] IO failed in confirmed state (success)". + +* Fri Jan 2 2009 Thomas Moschny - 0.42-2 +- Pack Monotone.pm (in a subpackage). (#450267) + +* Fri Jan 2 2009 Thomas Moschny - 0.42-1 +- Updated for 0.42 release. + +* Fri Sep 12 2008 Thomas Moschny - 0.41-1 +- Updated for 0.41 release. +- Added mtnopt helper. + +* Mon Aug 11 2008 Tom "spot" Callaway - 0.40-2 +- fix license tag + +* Mon Apr 14 2008 Roland McGrath - 0.40-1 +- Updated for 0.40 release. +- Tweaked trivia for packaging guidelines nits. + +* Mon Feb 25 2008 Roland McGrath - 0.39-1 +- Updated for 0.39 release. + +* Sat Dec 22 2007 Roland McGrath - 0.38-2 +- Fix monotone-server user creation. (#426607) +- Moved monotone-server database to /var/lib. (#426608) +- Use monotone@ in server key name. (#426609) + +* Fri Dec 21 2007 Roland McGrath - 0.38-1 +- Updated for 0.38 release. + +* Sat Oct 27 2007 Roland McGrath - 0.37-3 +- Updated for 0.37 release. +- Prevent destroying old passphrase file with 'service monotone genkey'. +- Put LSB standard comments in monotone.init for monotone-server subpackage. + +* Tue Aug 28 2007 Roland McGrath - 0.36-2 +- Clean up %%pre script per packaging guidelines. +- Disable ppc and ppc64 builds temporarily since make check fails. (#259161) + +* Fri Aug 3 2007 Roland McGrath - 0.36-1 +- Updated for 0.36 release. + +* Fri Jul 06 2007 Florian La Roche - 0.35-4 +- add more requires + +* Wed May 16 2007 Roland McGrath - 0.35-3 +- Fix locale dependency in monotone-server init script. (#213893) + +* Wed May 9 2007 Roland McGrath - 0.35-2 +- Updated for 0.35 release. +- Avoid unnecessary "db migrate" in monotone-server init script. (#213893) + +* Wed Apr 4 2007 Roland McGrath - 0.34-1 +- Updated for 0.34 release. + +* Thu Mar 1 2007 Roland McGrath - 0.33-1 +- Updated for 0.33 release. +- Install monotone.bash_completion file. + +* Wed Feb 28 2007 Roland McGrath - 0.32-1 +- Updated for 0.32 release. + +* Thu Dec 21 2006 Kevin Fenzi - 0.31-2 +- Bump and rebuild to fix upgrade path + +* Sat Nov 11 2006 Roland McGrath - 0.31-1 +- Updated for 0.31 release. + +* Tue Oct 10 2006 Roland McGrath - 0.30-1 +- Updated for 0.30 release. +- Fix service script to work around buggy init.d/functions. (#198761) + +* Thu Aug 3 2006 Roland McGrath - 0.28-2 +- Updated for 0.28 release. (#198652) +- Move server PID file into /var/run/monotone subdirectory. (#198761) + +* Tue Jul 11 2006 Roland McGrath - 0.27-1 +- Updated for 0.27 release. + +* Mon May 8 2006 Roland McGrath - 0.26-2 +- Fix service script genkey subcommand. + +* Mon Apr 10 2006 Roland McGrath - 0.26-1 +- Updated for 0.26 release. + - Major changes; see UPGRADE doc file for details. + +* Fri Jan 6 2006 Roland McGrath - 0.25-2 +- Restore testsuite fix for nonroot owner of / in build chroot. + +* Thu Jan 5 2006 Roland McGrath - 0.25-1 +- Updated for 0.25 release. + +* Sun Dec 11 2005 Roland McGrath - 0.24-1 +- Updated for 0.24 release. + +* Mon Oct 3 2005 Roland McGrath - 0.23-1 +- Updated for 0.23 release. + +* Mon Aug 22 2005 Roland McGrath - 0.22-4 +- Updated for 0.22 release. +- Added monotone-server package. + +* Sun Aug 7 2005 Roland McGrath - 0.21-3 +- Work around non-root build user owning / in mock chroot builds. + +* Wed Jul 27 2005 Roland McGrath - 0.21-2 +- Include monotone-nav.el too. +- Add BuildRequires on cvs so the test suite can run. + +* Mon Jul 18 2005 Roland McGrath - 0.21-1 +- Updated for 0.21 release. +- Install Emacs support. + +* Thu Jul 7 2005 Roland McGrath - 0.20-0.1 +- Updated for 0.20 release. +- Added %%check section. +- Cannot use FC4 native sqlite3, need newer bundled one. + +* Mon Apr 18 2005 Jeffrey C. Ollie - 0.18-0.4 +- Modified summary so that it doesn't contain the name + +* Thu Apr 14 2005 Jeffrey C. Ollie - 0.18-0.3 +- Modified install-info commands to prevent errors in case of --excludedocs + +* Wed Apr 13 2005 Jeffrey C. Ollie - 0.18-0.2 +- Added post and postun scripts to take care of .info file +- Added parallel make flags + +* Wed Apr 13 2005 Jeffrey C. Ollie - 0.18-0.1 +- First version. diff --git a/monotone.sysconfig b/monotone.sysconfig new file mode 100644 index 0000000..8aa8ac9 --- /dev/null +++ b/monotone.sysconfig @@ -0,0 +1,16 @@ +# Options for the Monotone DVCS Server +# +# options can be changed here, or (better) within override files in +# /etc/systemd/system/monotone.service.d + +# --confdir: location of the configuration directory +#MONOTONE_CONFDIR=/etc/monotone + +# --keydir: location of the key store +#MONOTONE_KEYDIR=/etc/monotone/private-keys + +# --db: name of the database file +#MONOTONE_DBFILE=/var/lib/monotone/server.mtn + +# --rcfile: used to pass the passphrase of the server's private key +#MONOTONE_PPFILE=/etc/monotone/passphrase.lua diff --git a/sources b/sources index e69de29..b46ef88 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +df3f40ca22120aa142ac9becba9e1bf7 monotone-1.1.tar.bz2 From b56c6e03264de6958f9be07960c82d510f619330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 14 Jan 2017 09:27:56 +0200 Subject: [PATCH 102/145] Move tmpfiles.d config to %{_tmpfilesdir} --- monotone.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/monotone.spec b/monotone.spec index 54d9a73..49312e6 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 15%{?dist} +Release: 16%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -114,7 +114,7 @@ install -d -m 0750 %{buildroot}%{_sysconfdir}/monotone/private-keys install -d -m 0770 %{buildroot}%{_localstatedir}/lib/monotone install -d -m 0755 %{buildroot}%{_localstatedir}/run/monotone install -D -m 0644 %{SOURCE4} \ - %{buildroot}%{_sysconfdir}/tmpfiles.d/monotone.conf + %{buildroot}%{_tmpfilesdir}/monotone.conf install -D -m 0755 -p %{SOURCE5} %{buildroot}%{_libexecdir}/monotone-server-initdb install -D -m 0755 -p %{SOURCE6} %{buildroot}%{_libexecdir}/monotone-server-migratedb @@ -182,7 +182,7 @@ fi %{_libexecdir}/monotone-server-genkey %{_libexecdir}/monotone-server-import %dir %attr(0755,monotone,monotone) %{_localstatedir}/run/monotone -%config(noreplace) %{_sysconfdir}/tmpfiles.d/monotone.conf +%{_tmpfilesdir}/monotone.conf %config(noreplace) %{_sysconfdir}/sysconfig/monotone %dir %attr(0755,root,monotone) %{_sysconfdir}/monotone %dir %attr(0750,root,monotone) %{_sysconfdir}/monotone/private-keys @@ -216,6 +216,9 @@ exit 0 %changelog +* Sat Jan 14 2017 Ville Skyttä - 1.1-16 +- Move tmpfiles.d config to %%{_tmpfilesdir} + * Sun May 15 2016 Jitka Plesnikova - 1.1-15 - Perl 5.24 rebuild From 3e275c8601f00eb2de4bfa509ca3eaa0e776a99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 14 Jan 2017 12:20:25 +0200 Subject: [PATCH 103/145] Bump for koji rebuild over the previous one that ended up in a weird state --- monotone.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monotone.spec b/monotone.spec index 49312e6..4ef096f 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,7 +216,7 @@ exit 0 %changelog -* Sat Jan 14 2017 Ville Skyttä - 1.1-16 +* Sat Jan 14 2017 Ville Skyttä - 1.1-17 - Move tmpfiles.d config to %%{_tmpfilesdir} * Sun May 15 2016 Jitka Plesnikova - 1.1-15 From 0803b3b464a1f02bf599d364f949a587ddf83fdf Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 27 Jan 2017 09:24:06 +0000 Subject: [PATCH 104/145] Rebuilt for Boost 1.63 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 4ef096f..75b2d10 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 17%{?dist} +Release: 18%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ exit 0 %changelog +* Fri Jan 27 2017 Jonathan Wakely - 1.1-18 +- Rebuilt for Boost 1.63 + * Sat Jan 14 2017 Ville Skyttä - 1.1-17 - Move tmpfiles.d config to %%{_tmpfilesdir} From dc0af99793da1033419fffb0e28e08d3ed54374f Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 27 Jan 2017 16:47:02 +0000 Subject: [PATCH 105/145] Rebuilt for Boost 1.63 --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 75b2d10..d21536f 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 18%{?dist} +Release: 19%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ exit 0 %changelog +* Fri Jan 27 2017 Jonathan Wakely - 1.1-19 +- Rebuilt for Boost 1.63 + * Fri Jan 27 2017 Jonathan Wakely - 1.1-18 - Rebuilt for Boost 1.63 From 6e7c959bacc8e7a94694ee27965488e38ac42be9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 21:40:26 +0000 Subject: [PATCH 106/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index d21536f..be8ec32 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 19%{?dist} +Release: 20%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ exit 0 %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Jan 27 2017 Jonathan Wakely - 1.1-19 - Rebuilt for Boost 1.63 From 9fb90c2522121674df33989c45e750c92a75138e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 15 May 2017 20:02:27 +0000 Subject: [PATCH 107/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index be8ec32..c487478 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 20%{?dist} +Release: 21%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ exit 0 %changelog +* Mon May 15 2017 Fedora Release Engineering - 1.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 1.1-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 51ddc5568ebd683c36fe2b4359d13731770fac82 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Sun, 4 Jun 2017 13:56:10 +0200 Subject: [PATCH 108/145] Perl 5.26 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index c487478..3ca7441 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 21%{?dist} +Release: 22%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ exit 0 %changelog +* Sun Jun 04 2017 Jitka Plesnikova - 1.1-22 +- Perl 5.26 rebuild + * Mon May 15 2017 Fedora Release Engineering - 1.1-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild From 33a2030d7d39e0c9f9b7711b85a625ab32f1d897 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 22:13:33 +0000 Subject: [PATCH 109/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 3ca7441..70c4fa1 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 22%{?dist} +Release: 23%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ exit 0 %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sun Jun 04 2017 Jitka Plesnikova - 1.1-22 - Perl 5.26 rebuild From 8363ada4f420f5846b46c554af37f01b43e34017 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 03:33:18 +0000 Subject: [PATCH 110/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 70c4fa1..219c365 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 23%{?dist} +Release: 24%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ exit 0 %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1.1-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 73e3ebf5299594df0ac20fc629018b404d40f6b7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 8 Feb 2018 03:11:49 +0000 Subject: [PATCH 111/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 219c365..e33f5e2 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 24%{?dist} +Release: 25%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -216,6 +216,9 @@ exit 0 %changelog +* Thu Feb 08 2018 Fedora Release Engineering - 1.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Aug 03 2017 Fedora Release Engineering - 1.1-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From a0a83818eed56b0ac13fe3a4031ac611302d38a0 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Tue, 22 May 2018 21:28:13 +0200 Subject: [PATCH 112/145] Add patch for PCRE >= 8.42 (rhbz#1555231, thanks P. Pisar). --- monotone-1.1-pcre.patch | 66 +++++++++++++++++++++++++++++++++++++++++ monotone.spec | 7 ++++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 monotone-1.1-pcre.patch diff --git a/monotone-1.1-pcre.patch b/monotone-1.1-pcre.patch new file mode 100644 index 0000000..1ecda43 --- /dev/null +++ b/monotone-1.1-pcre.patch @@ -0,0 +1,66 @@ +From 70f209ad582121750d54e3692b1e62c7f36af6f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 7 May 2018 14:09:06 +0200 +Subject: [PATCH] Adapt to changes in pcre-8.42 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +pcre-8.42 replaced internal real_pcre with real_pcre8_or_16. This +broke monotone that decided not to use the public "pcre" type. + +This patch adapts monotone to the pcre >= 8.42. + +Signed-off-by: Petr Písař +--- + src/pcrewrap.cc | 4 ++-- + src/pcrewrap.hh | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/pcrewrap.cc b/src/pcrewrap.cc +index 8c0c9d1..30bafff 100644 +--- a/src/pcrewrap.cc ++++ b/src/pcrewrap.cc +@@ -74,7 +74,7 @@ get_capturecount(void const * bd) + namespace pcre + { + typedef map > ++ pair > + regex_cache; + + class regex_cache_manager +@@ -86,7 +86,7 @@ public: + } + + void store(char const * pattern, +- pair ++ pair + data) + { + cache[pattern] = data; +diff --git a/src/pcrewrap.hh b/src/pcrewrap.hh +index 3359cdd..5008e88 100644 +--- a/src/pcrewrap.hh ++++ b/src/pcrewrap.hh +@@ -18,7 +18,7 @@ + // definitions and so we don't actually expose it here. Unfortunately, this + // means we have to hope this pair of forward declarations will not change... + +-struct real_pcre; ++struct real_pcre8_or_16; + struct pcre_extra; + + namespace pcre +@@ -61,7 +61,7 @@ namespace pcre + regex & operator=(regex const &); + + // data +- struct real_pcre const * basedat; ++ struct real_pcre8_or_16 const * basedat; + struct pcre_extra const * extradat; + + // used by constructors +-- +2.14.3 + diff --git a/monotone.spec b/monotone.spec index e33f5e2..03a4b8d 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 25%{?dist} +Release: 26%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -17,6 +17,7 @@ Source8: monotone-server-import Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch +Patch3: monotone-1.1-pcre.patch BuildRequires: perl-generators BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 @@ -79,6 +80,7 @@ and then pass commands to it. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -216,6 +218,9 @@ exit 0 %changelog +* Tue May 22 2018 Thomas Moschny - 1.1-26 +- Add patch for PCRE >= 8.42 (rhbz#1555231, thanks P. Pisar). + * Thu Feb 08 2018 Fedora Release Engineering - 1.1-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From a4660e25721bead9fe23613558a95f5ee5f7f1ca Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Wed, 27 Jun 2018 20:25:09 +0200 Subject: [PATCH 113/145] Perl 5.28 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 03a4b8d..2603372 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 26%{?dist} +Release: 27%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -218,6 +218,9 @@ exit 0 %changelog +* Wed Jun 27 2018 Jitka Plesnikova - 1.1-27 +- Perl 5.28 rebuild + * Tue May 22 2018 Thomas Moschny - 1.1-26 - Add patch for PCRE >= 8.42 (rhbz#1555231, thanks P. Pisar). From 51b370a3da2fe03508ae14411b449e403240f5b5 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 10 Jul 2018 16:15:28 +0200 Subject: [PATCH 114/145] add BuildRequires: gcc-c++ Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- monotone.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/monotone.spec b/monotone.spec index 2603372..be135b9 100644 --- a/monotone.spec +++ b/monotone.spec @@ -18,6 +18,7 @@ Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch Patch3: monotone-1.1-pcre.patch +BuildRequires: gcc-c++ BuildRequires: perl-generators BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 From d68e01734a3b86d2aca1819d5f8bdf4fa0326159 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Tue, 10 Jul 2018 19:53:44 +0200 Subject: [PATCH 115/145] Add BR on make. --- monotone.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index be135b9..c62fe77 100644 --- a/monotone.spec +++ b/monotone.spec @@ -18,7 +18,8 @@ Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch Patch3: monotone-1.1-pcre.patch -BuildRequires: gcc-c++ +BuildRequires: gcc-c++ +BuildRequires: make BuildRequires: perl-generators BuildRequires: zlib-devel BuildRequires: boost-devel >= 1.33.1 From ce01523b6057715a40aa8ef9af323c71f6ef0cd4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 10:59:59 +0000 Subject: [PATCH 116/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index c62fe77..eb4d438 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 27%{?dist} +Release: 28%{?dist} Summary: A free, distributed version control system Group: Development/Tools License: GPLv2+ @@ -220,6 +220,9 @@ exit 0 %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.1-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Jun 27 2018 Jitka Plesnikova - 1.1-27 - Perl 5.28 rebuild From ed2f1a5f76872b760c880f2cdf1c093d62754bfd Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 27 Jan 2019 19:39:21 +0100 Subject: [PATCH 117/145] Remove obsolete scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- monotone.spec | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/monotone.spec b/monotone.spec index eb4d438..9ba2ded 100644 --- a/monotone.spec +++ b/monotone.spec @@ -35,8 +35,6 @@ BuildRequires: cvs BuildRequires: bash-completion BuildRequires: expect -Requires(post): /sbin/install-info -Requires(preun): /sbin/install-info # Filter unwanted dependencies %{?perl_default_filter} @@ -142,21 +140,6 @@ install -m 0644 -p %{SOURCE3} . install -D -m 0644 -p contrib/Monotone.pm \ %{buildroot}%{perl_vendorlib}/Monotone.pm - -%post -if [ $1 -eq 1 ] -then - /sbin/install-info %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : -fi - - -%preun -if [ $1 -eq 0 ] -then - /sbin/install-info --delete %{_infodir}/monotone.info %{_infodir}/dir > /dev/null 2>&1 || : -fi - - %files -f %{name}.lang %doc AUTHORS NEWS README UPGRADE %doc _doc/* From c645355ff93b7d689b35d603106dbf3ab6803faa Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:55 +0100 Subject: [PATCH 118/145] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- monotone.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/monotone.spec b/monotone.spec index 9ba2ded..f27676c 100644 --- a/monotone.spec +++ b/monotone.spec @@ -2,7 +2,6 @@ Name: monotone Version: 1.1 Release: 28%{?dist} Summary: A free, distributed version control system -Group: Development/Tools License: GPLv2+ URL: http://monotone.ca/ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.bz2 @@ -56,7 +55,6 @@ Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -Group: Development/Tools %description server @@ -67,7 +65,6 @@ This package provides an easy-to-use standalone server setup for monotone. Summary: Perl Module for monotone Requires: monotone = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Group: Development/Tools %description -n perl-Monotone From b14cb97c356f29a48b4321a95e6ce956eabd603f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 11:26:14 +0000 Subject: [PATCH 119/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index f27676c..b4683c7 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 28%{?dist} +Release: 29%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -200,6 +200,9 @@ exit 0 %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 1.1-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 1.1-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From cfaf00aa099d2df72c127c74710380361fccdac9 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 9 Feb 2019 08:39:35 +0100 Subject: [PATCH 120/145] Fix F30 FTBFS. --- monotone-1.1-py2.patch | 9 +++++++++ monotone.spec | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 monotone-1.1-py2.patch diff --git a/monotone-1.1-py2.patch b/monotone-1.1-py2.patch new file mode 100644 index 0000000..15bf216 --- /dev/null +++ b/monotone-1.1-py2.patch @@ -0,0 +1,9 @@ +diff -up monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig monotone-1.1/extra/mtn-hooks/monotone-ciabot.py +--- monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig 2019-02-07 10:12:48.142739265 +0100 ++++ monotone-1.1/extra/mtn-hooks/monotone-ciabot.py 2019-02-07 10:14:58.508206736 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + # + # Copyright (C) Nathaniel Smith + # Timothy Brownawell diff --git a/monotone.spec b/monotone.spec index b4683c7..f2d206d 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 29%{?dist} +Release: 30%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -17,6 +17,7 @@ Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch Patch3: monotone-1.1-pcre.patch +Patch4: monotone-1.1-py2.patch BuildRequires: gcc-c++ BuildRequires: make BuildRequires: perl-generators @@ -73,11 +74,7 @@ and then pass commands to it. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%autosetup -p1 %build @@ -200,6 +197,9 @@ exit 0 %changelog +* Sat Feb 9 2019 Thomas Moschny - 1.1-30 +- Fix F30 FTBFS. + * Fri Feb 01 2019 Fedora Release Engineering - 1.1-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 2cc4b62aed45866f90a068f8e3e27734f394c835 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Thu, 30 May 2019 13:34:28 +0200 Subject: [PATCH 121/145] Perl 5.30 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index f2d206d..c7f8b8a 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 30%{?dist} +Release: 31%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -197,6 +197,9 @@ exit 0 %changelog +* Thu May 30 2019 Jitka Plesnikova - 1.1-31 +- Perl 5.30 rebuild + * Sat Feb 9 2019 Thomas Moschny - 1.1-30 - Fix F30 FTBFS. From 7d0e717329f1791f87dc0ecfd7c6929c79e491fa Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 17:39:59 +0000 Subject: [PATCH 122/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index c7f8b8a..1db3dac 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 31%{?dist} +Release: 32%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -197,6 +197,9 @@ exit 0 %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 1.1-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu May 30 2019 Jitka Plesnikova - 1.1-31 - Perl 5.30 rebuild From 52b25d5c59c204bd13a03a6e3e57d4ab4b0b9a32 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 10 Aug 2019 09:15:06 +0200 Subject: [PATCH 123/145] Patch extra/mtn-hooks/monotone-ciabot.py to use Python3 (bz#1738073). --- monotone-1.1-py2.patch | 9 --------- monotone-1.1-py3.patch | 23 +++++++++++++++++++++++ monotone.spec | 7 +++++-- 3 files changed, 28 insertions(+), 11 deletions(-) delete mode 100644 monotone-1.1-py2.patch create mode 100644 monotone-1.1-py3.patch diff --git a/monotone-1.1-py2.patch b/monotone-1.1-py2.patch deleted file mode 100644 index 15bf216..0000000 --- a/monotone-1.1-py2.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig monotone-1.1/extra/mtn-hooks/monotone-ciabot.py ---- monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig 2019-02-07 10:12:48.142739265 +0100 -+++ monotone-1.1/extra/mtn-hooks/monotone-ciabot.py 2019-02-07 10:14:58.508206736 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # - # Copyright (C) Nathaniel Smith - # Timothy Brownawell diff --git a/monotone-1.1-py3.patch b/monotone-1.1-py3.patch new file mode 100644 index 0000000..b8eb22e --- /dev/null +++ b/monotone-1.1-py3.patch @@ -0,0 +1,23 @@ +diff -up monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig monotone-1.1/extra/mtn-hooks/monotone-ciabot.py +--- monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig 2019-08-10 09:00:03.203454091 +0200 ++++ monotone-1.1/extra/mtn-hooks/monotone-ciabot.py 2019-08-10 09:07:13.873700583 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Copyright (C) Nathaniel Smith + # Timothy Brownawell +@@ -192,10 +192,10 @@ def escape_for_xml(text, is_attrib=0): + + def send_message(message, c): + if c.delivery == "debug": +- print message ++ print(message) + elif c.delivery == "xmlrpc": +- import xmlrpclib +- xmlrpclib.ServerProxy(c.xmlrpc_server).hub.deliver(message) ++ import xmlrpc.client ++ xmlrpc.client.ServerProxy(c.xmlrpc_server).hub.deliver(message) + elif c.delivery == "email": + import smtplib + smtp = smtplib.SMTP(c.smtp_server) diff --git a/monotone.spec b/monotone.spec index 1db3dac..aafa78e 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 32%{?dist} +Release: 33%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -17,7 +17,7 @@ Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch Patch3: monotone-1.1-pcre.patch -Patch4: monotone-1.1-py2.patch +Patch4: monotone-1.1-py3.patch BuildRequires: gcc-c++ BuildRequires: make BuildRequires: perl-generators @@ -197,6 +197,9 @@ exit 0 %changelog +* Sat Aug 10 2019 Thomas Moschny - 1.1-33 +- Patch extra/mtn-hooks/monotone-ciabot.py to use Python3 (bz#1738073). + * Thu Jul 25 2019 Fedora Release Engineering - 1.1-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 5634cdb3febc3b85664253cec86dca95f8fa7675 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 14:00:16 +0000 Subject: [PATCH 124/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index aafa78e..a8bdaf1 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 33%{?dist} +Release: 34%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -197,6 +197,9 @@ exit 0 %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 1.1-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Aug 10 2019 Thomas Moschny - 1.1-33 - Patch extra/mtn-hooks/monotone-ciabot.py to use Python3 (bz#1738073). From c3b3eab61d454b00d480e8c795db23d34a5e9aac Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 22 Jun 2020 19:31:51 +0200 Subject: [PATCH 125/145] Perl 5.32 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index a8bdaf1..6e78e32 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 34%{?dist} +Release: 35%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -197,6 +197,9 @@ exit 0 %changelog +* Mon Jun 22 2020 Jitka Plesnikova - 1.1-35 +- Perl 5.32 rebuild + * Wed Jan 29 2020 Fedora Release Engineering - 1.1-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 35721b6e63413a68d0d6e1a109cfd3d495aa35e4 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 30 Jun 2020 13:57:47 -0600 Subject: [PATCH 126/145] Fix FTBFS in Rawhide. - Add lua-ql patch due to removal of LUA_QL from lua - Add boost patch to fix single-letter macro name clash (bz 1851313) - Add string-overflow patch to fix a potential buffer overflow - Add catch patch to silence a large number of compiler warnings --- monotone-1.1-boost.patch | 555 +++++++++++++++++++++++++++++ monotone-1.1-catch.patch | 111 ++++++ monotone-1.1-lua-ql.patch | 15 + monotone-1.1-string-overflow.patch | 28 ++ monotone.spec | 14 +- 5 files changed, 721 insertions(+), 2 deletions(-) create mode 100644 monotone-1.1-boost.patch create mode 100644 monotone-1.1-catch.patch create mode 100644 monotone-1.1-lua-ql.patch create mode 100644 monotone-1.1-string-overflow.patch diff --git a/monotone-1.1-boost.patch b/monotone-1.1-boost.patch new file mode 100644 index 0000000..84e80f1 --- /dev/null +++ b/monotone-1.1-boost.patch @@ -0,0 +1,555 @@ +A function macro named E clashes with internal boost definitions. Rearrange +the order of header inclusion so that affected boost headers are included +before monotone defines the macro. + +Also, stop bundling boost/circular_buffer, which is available in current +versions of boost. + +diff -up monotone-1.1/Makefile.in.orig monotone-1.1/Makefile.in +--- monotone-1.1/Makefile.in.orig 2014-05-04 03:18:01.000000000 -0600 ++++ monotone-1.1/Makefile.in 2020-06-30 10:02:57.849746309 -0600 +@@ -156,10 +156,7 @@ am__v_AR_1 = + src_lib3rdparty_a_AR = $(AR) $(ARFLAGS) + src_lib3rdparty_a_LIBADD = + am__src_lib3rdparty_a_SOURCES_DIST = \ +- src/boost/circular_buffer_adaptor.hpp \ +- src/boost/circular_buffer_base.hpp \ +- src/boost/circular_buffer_fwd.hpp \ +- src/boost/circular_buffer.hpp src/netxx/accept.cxx \ ++ src/netxx/accept.cxx \ + src/netxx/accept.h src/netxx/address.cxx src/netxx/common.h \ + src/netxx/compat.h src/netxx/datagram.cxx \ + src/netxx/datagramserver.cxx src/netxx/osutil.cxx \ +@@ -933,12 +930,6 @@ NETXX_SOURCES = \ + src/netxx/stream.h src/netxx/streambase.h \ + src/netxx/streamserver.h src/netxx/timeout.h src/netxx/types.h + +-BOOST_SANDBOX_SOURCES = \ +- src/boost/circular_buffer_adaptor.hpp \ +- src/boost/circular_buffer_base.hpp \ +- src/boost/circular_buffer_fwd.hpp \ +- src/boost/circular_buffer.hpp +- + UNIX_PLATFORM_SOURCES = \ + src/unix/read_password.cc src/unix/get_system_flavour.cc \ + src/unix/process.cc src/unix/terminal.cc src/unix/inodeprint.cc \ +@@ -1026,7 +1017,7 @@ nodist_test_bin_tester_SOURCES = test/sr + noinst_LIBRARIES = src/libplatform.a src/lib3rdparty.a + src_libplatform_a_SOURCES = src/platform.hh $(am__append_1) \ + $(am__append_6) +-src_lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) $(NETXX_SOURCES) \ ++src_lib3rdparty_a_SOURCES = $(NETXX_SOURCES) \ + $(am__append_9) $(am__append_11) $(am__append_13) \ + $(am__append_14) + bashcompdir = $(sysconfdir)/bash_completion.d +diff -up monotone-1.1/src/ancestry.cc.orig monotone-1.1/src/ancestry.cc +--- monotone-1.1/src/ancestry.cc.orig 2014-05-04 03:15:15.000000000 -0600 ++++ monotone-1.1/src/ancestry.cc 2020-06-30 11:34:52.796544704 -0600 +@@ -8,8 +8,8 @@ + // PURPOSE. + + #include "base.hh" +-#include "sanity.hh" + #include "revision.hh" ++#include "sanity.hh" + #include "rev_height.hh" + #include "roster.hh" + +diff -up monotone-1.1/src/asciik.hh.orig monotone-1.1/src/asciik.hh +--- monotone-1.1/src/asciik.hh.orig 2014-05-04 03:15:15.000000000 -0600 ++++ monotone-1.1/src/asciik.hh 2020-06-30 10:15:12.007654082 -0600 +@@ -11,8 +11,8 @@ + #define __ASCIIK_HH__ + + #include +-#include "vector.hh" + #include "vocab.hh" ++#include "vector.hh" + + class asciik + { +diff -up monotone-1.1/src/automate.cc.orig monotone-1.1/src/automate.cc +--- monotone-1.1/src/automate.cc.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/automate.cc 2020-06-30 11:38:43.421264711 -0600 +@@ -13,12 +13,12 @@ + #include + #include + #include +-#include "vector.hh" + + #include + #include + #include "lexical_cast.hh" + #include ++#include "vector.hh" + + #include "app_state.hh" + #include "automate_stdio_helpers.hh" +diff -up monotone-1.1/src/basic_io.hh.orig monotone-1.1/src/basic_io.hh +--- monotone-1.1/src/basic_io.hh.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/basic_io.hh 2020-06-30 09:47:13.560973524 -0600 +@@ -11,11 +11,11 @@ + #ifndef __BASIC_IO_HH__ + #define __BASIC_IO_HH__ + +-#include "vector.hh" + #include + + #include "paths.hh" + #include "sanity.hh" ++#include "vector.hh" + #include "vocab.hh" + #include "numeric_vocab.hh" + #include "char_classifiers.hh" +diff -up monotone-1.1/src/charset.cc.orig monotone-1.1/src/charset.cc +--- monotone-1.1/src/charset.cc.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/charset.cc 2020-06-30 09:37:09.073857197 -0600 +@@ -7,13 +7,13 @@ + // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + // PURPOSE. + +-#include "base.hh" +-#include "vector.hh" +- + #include + #include + #include + ++#include "base.hh" ++#include "vector.hh" ++ + #include "charset.hh" + #include "numeric_vocab.hh" + #include "sanity.hh" +diff -up monotone-1.1/src/cmd_list.cc.orig monotone-1.1/src/cmd_list.cc +--- monotone-1.1/src/cmd_list.cc.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/cmd_list.cc 2020-06-30 10:12:30.695874287 -0600 +@@ -10,7 +10,6 @@ + + #include "base.hh" + #include +-#include "safe_map.hh" + #include + #include + #include +@@ -18,6 +17,7 @@ + #include + + #include "basic_io.hh" ++#include "safe_map.hh" + #include "cert.hh" + #include "charset.hh" + #include "cmd.hh" +diff -up monotone-1.1/src/commands.hh.orig monotone-1.1/src/commands.hh +--- monotone-1.1/src/commands.hh.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/commands.hh 2020-06-30 10:09:04.000156549 -0600 +@@ -10,8 +10,8 @@ + #ifndef __COMMANDS_HH__ + #define __COMMANDS_HH__ + +-#include "vector.hh" + #include "options.hh" ++#include "vector.hh" + class app_state; + class utf8; + +diff -up monotone-1.1/src/database.cc.orig monotone-1.1/src/database.cc +--- monotone-1.1/src/database.cc.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/database.cc 2020-06-30 11:07:31.767911489 -0600 +@@ -17,13 +17,13 @@ + #include + #include + #include +-#include "vector.hh" + + #include + #include + #include + #include + #include ++#include "vector.hh" + + #include + #include +diff -up monotone-1.1/src/database.hh.orig monotone-1.1/src/database.hh +--- monotone-1.1/src/database.hh.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/database.hh 2020-06-30 11:39:49.533184469 -0600 +@@ -11,10 +11,10 @@ + #ifndef __DATABASE_HH__ + #define __DATABASE_HH__ + +-#include "vector.hh" + #include + #include + #include ++#include "vector.hh" + + #include "rev_types.hh" + #include "cert.hh" +diff -up monotone-1.1/src/enumerator.cc.orig monotone-1.1/src/enumerator.cc +--- monotone-1.1/src/enumerator.cc.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/enumerator.cc 2020-06-30 11:17:48.813031155 -0600 +@@ -11,9 +11,9 @@ + #include + #include + #include +-#include "vector.hh" + + #include "cset.hh" ++#include "vector.hh" + #include "enumerator.hh" + #include "revision.hh" + #include "vocab.hh" +diff -up monotone-1.1/src/file_io.cc.orig monotone-1.1/src/file_io.cc +--- monotone-1.1/src/file_io.cc.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/file_io.cc 2020-06-30 09:50:13.560669858 -0600 +@@ -12,9 +12,9 @@ + #include + + #include +-#include "botan_pipe_cache.hh" + + #include "file_io.hh" ++#include "botan_pipe_cache.hh" + #include "sanity.hh" + #include "simplestring_xform.hh" + #include "charset.hh" +diff -up monotone-1.1/src/globish.cc.orig monotone-1.1/src/globish.cc +--- monotone-1.1/src/globish.cc.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/globish.cc 2020-06-30 09:56:22.529324520 -0600 +@@ -9,9 +9,9 @@ + // PURPOSE. + + #include "base.hh" ++#include "option.hh" // for arg_type + #include "sanity.hh" + #include "globish.hh" +-#include "option.hh" // for arg_type + #include "numeric_vocab.hh" + + #include +diff -up monotone-1.1/src/hmac.cc.orig monotone-1.1/src/hmac.cc +--- monotone-1.1/src/hmac.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/hmac.cc 2020-06-30 11:43:21.171953985 -0600 +@@ -10,9 +10,9 @@ + #include "base.hh" + #include + +-#include "sanity.hh" + #include "hmac.hh" + #include "vocab.hh" ++#include "sanity.hh" + #include "constants.hh" + + using std::string; +diff -up monotone-1.1/src/key_store.hh.orig monotone-1.1/src/key_store.hh +--- monotone-1.1/src/key_store.hh.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/key_store.hh 2020-06-30 11:06:22.925984151 -0600 +@@ -19,8 +19,8 @@ + #include + #endif + +-#include "vector.hh" + #include "vocab.hh" ++#include "vector.hh" + #include "paths.hh" + + class app_state; +diff -up monotone-1.1/src/migrate_work.cc.orig monotone-1.1/src/migrate_work.cc +--- monotone-1.1/src/migrate_work.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/migrate_work.cc 2020-06-30 10:57:13.325615053 -0600 +@@ -8,8 +8,8 @@ + // PURPOSE. + + #include "base.hh" +-#include "sanity.hh" + #include "cset.hh" ++#include "sanity.hh" + #include "simplestring_xform.hh" + #include "revision.hh" + #include "file_io.hh" +diff -up monotone-1.1/src/netcmd.cc.orig monotone-1.1/src/netcmd.cc +--- monotone-1.1/src/netcmd.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/netcmd.cc 2020-06-30 11:29:04.877013138 -0600 +@@ -8,11 +8,11 @@ + // PURPOSE. + + #include "base.hh" +-#include "vector.hh" + #include + + #include "constants.hh" + #include "netcmd.hh" ++#include "vector.hh" + #include "netio.hh" + #include "numeric_vocab.hh" + #include "sanity.hh" +diff -up monotone-1.1/src/netcmd.hh.orig monotone-1.1/src/netcmd.hh +--- monotone-1.1/src/netcmd.hh.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/netcmd.hh 2020-06-30 11:25:11.916333993 -0600 +@@ -10,13 +10,13 @@ + #ifndef __NETCMD_HH__ + #define __NETCMD_HH__ + +-#include "vector.hh" + #include + #include + #include + +-#include "globish.hh" + #include "merkle_tree.hh" ++#include "vector.hh" ++#include "globish.hh" + #include "numeric_vocab.hh" + #include "uri.hh" + #include "vocab.hh" +diff -up monotone-1.1/src/network/listener_base.hh.orig monotone-1.1/src/network/listener_base.hh +--- monotone-1.1/src/network/listener_base.hh.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/network/listener_base.hh 2020-06-30 11:19:34.500864837 -0600 +@@ -11,10 +11,10 @@ + #ifndef __LISTENER_BASE_HH__ + #define __LISTENER_BASE_HH__ + +-#include "reactable.hh" +- + #include + ++#include "reactable.hh" ++ + // This is not currently needed because there's only one kind of listener. + // But it's already here and not hurting anything, and might be useful if + // we want to add another kind of listener later (something that accepts +diff -up monotone-1.1/src/option.hh.orig monotone-1.1/src/option.hh +--- monotone-1.1/src/option.hh.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/option.hh 2020-06-30 09:23:18.706152659 -0600 +@@ -22,9 +22,9 @@ + #include + #include + #include +-#include "vector.hh" +- + #include ++ ++#include "vector.hh" + #include "lexical_cast.hh" + + #include "sanity.hh" +diff -up monotone-1.1/src/project.cc.orig monotone-1.1/src/project.cc +--- monotone-1.1/src/project.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/project.cc 2020-06-30 10:58:34.582498413 -0600 +@@ -8,9 +8,9 @@ + // PURPOSE. + + #include "base.hh" +-#include "vector.hh" + + #include "cert.hh" ++#include "vector.hh" + #include "database.hh" + #include "date_format.hh" + #include "project.hh" +diff -up monotone-1.1/src/rcs_file.cc.orig monotone-1.1/src/rcs_file.cc +--- monotone-1.1/src/rcs_file.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/rcs_file.cc 2020-06-30 11:10:45.213647993 -0600 +@@ -10,7 +10,6 @@ + + #include "base.hh" + #include +-#include "vector.hh" + + #ifdef WIN32 + #include +@@ -32,6 +31,7 @@ + #endif + + #include "rcs_file.hh" ++#include "vector.hh" + #include "sanity.hh" + #include "char_classifiers.hh" + +diff -up monotone-1.1/src/rcs_file.hh.orig monotone-1.1/src/rcs_file.hh +--- monotone-1.1/src/rcs_file.hh.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/rcs_file.hh 2020-06-30 11:14:24.238333814 -0600 +@@ -10,9 +10,9 @@ + #ifndef __RCS_FILE_HH__ + #define __RCS_FILE_HH__ + +-#include "vector.hh" + #include + #include ++#include "vector.hh" + + struct rcs_admin + { +diff -up monotone-1.1/src/rcs_import.cc.orig monotone-1.1/src/rcs_import.cc +--- monotone-1.1/src/rcs_import.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/rcs_import.cc 2020-06-30 11:29:44.579958676 -0600 +@@ -16,13 +16,13 @@ + #include + #include + #include +-#include "vector.hh" + #include // memset + + #include + #include + #include "lexical_cast.hh" + #include ++#include "vector.hh" + + #include "cert.hh" + #include "constants.hh" +diff -up monotone-1.1/src/restrictions.cc.orig monotone-1.1/src/restrictions.cc +--- monotone-1.1/src/restrictions.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/restrictions.cc 2020-06-30 11:43:53.380932870 -0600 +@@ -8,9 +8,9 @@ + // PURPOSE. + + #include "base.hh" ++#include "restrictions.hh" + #include "safe_map.hh" + #include "vector.hh" +-#include "restrictions.hh" + #include "file_io.hh" + #include "roster.hh" + #include "database.hh" // for parent_roster +diff -up monotone-1.1/src/revision.hh.orig monotone-1.1/src/revision.hh +--- monotone-1.1/src/revision.hh.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/revision.hh 2020-06-30 11:18:10.388997198 -0600 +@@ -11,8 +11,8 @@ + #define __REVISION_HH__ + + #include +-#include "vector.hh" + #include "rev_types.hh" ++#include "vector.hh" + + class key_store; + class node_restriction; +diff -up monotone-1.1/src/roster.cc.orig monotone-1.1/src/roster.cc +--- monotone-1.1/src/roster.cc.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/roster.cc 2020-06-30 11:35:20.489511075 -0600 +@@ -11,10 +11,10 @@ + #include "base.hh" + #include + #include +-#include "vector.hh" + #include + + #include "basic_io.hh" ++#include "vector.hh" + #include "cset.hh" + #include "database.hh" + #include "platform-wrapped.hh" +diff -up monotone-1.1/src/sanity.cc.orig monotone-1.1/src/sanity.cc +--- monotone-1.1/src/sanity.cc.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/sanity.cc 2020-06-30 09:32:43.994207307 -0600 +@@ -12,12 +12,11 @@ + #include + #include + #include +-#include "vector.hh" +- + #include + +-// circular_buffer is not in Boost 1.34; it's in monotone/boost. +-#include "boost/circular_buffer.hpp" ++#include "vector.hh" ++ ++#include + + #include "lexical_cast.hh" + #include "constants.hh" +diff -up monotone-1.1/src/sanity.hh.orig monotone-1.1/src/sanity.hh +--- monotone-1.1/src/sanity.hh.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/sanity.hh 2020-06-30 09:31:59.698281778 -0600 +@@ -14,7 +14,7 @@ + #include + #include + +-#include "boost/current_function.hpp" ++#include + + #include "numeric_vocab.hh" + #include "origin_type.hh" +diff -up monotone-1.1/src/sha1.cc.orig monotone-1.1/src/sha1.cc +--- monotone-1.1/src/sha1.cc.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/sha1.cc 2020-06-30 11:51:10.427645711 -0600 +@@ -22,10 +22,10 @@ + #include + #endif + +-#include "sanity.hh" +-#include "ui.hh" + #include "platform.hh" + #include "cmd.hh" ++#include "sanity.hh" ++#include "ui.hh" + #include "transforms.hh" + + using std::string; +diff -up monotone-1.1/src/transforms.cc.orig monotone-1.1/src/transforms.cc +--- monotone-1.1/src/transforms.cc.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/transforms.cc 2020-06-30 10:19:25.976307371 -0600 +@@ -12,12 +12,12 @@ + #include + #include + +-#include "botan_pipe_cache.hh" +-#include "gzip.hh" +- + #include "transforms.hh" + #include "char_classifiers.hh" + ++#include "botan_pipe_cache.hh" ++#include "gzip.hh" ++ + using std::string; + using Botan::Pipe; + using Botan::Base64_Encoder; +diff -up monotone-1.1/src/update.cc.orig monotone-1.1/src/update.cc +--- monotone-1.1/src/update.cc.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/update.cc 2020-06-30 11:03:03.726194356 -0600 +@@ -9,9 +9,9 @@ + + #include "base.hh" + #include ++#include "lexical_cast.hh" + #include "safe_map.hh" + #include "vector.hh" +-#include "lexical_cast.hh" + + #include "database.hh" + #include "sanity.hh" +diff -up monotone-1.1/src/vocab.cc.orig monotone-1.1/src/vocab.cc +--- monotone-1.1/src/vocab.cc.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/vocab.cc 2020-06-30 09:36:18.769919254 -0600 +@@ -11,8 +11,8 @@ + #include "base.hh" + #include "constants.hh" + #include "hash_map.hh" +-#include "sanity.hh" + #include "vocab.hh" ++#include "sanity.hh" + #include "char_classifiers.hh" + #include "transforms.hh" + +diff -up monotone-1.1/src/xdelta.cc.orig monotone-1.1/src/xdelta.cc +--- monotone-1.1/src/xdelta.cc.orig 2014-05-04 03:15:19.000000000 -0600 ++++ monotone-1.1/src/xdelta.cc 2020-06-30 11:13:38.014400075 -0600 +@@ -26,7 +26,6 @@ + + #include "base.hh" + #include +-#include "vector.hh" + #include + #include + #include // memcmp +@@ -34,6 +33,7 @@ + #include + #include + ++#include "vector.hh" + #include "adler32.hh" + #include "hash_map.hh" + #include "numeric_vocab.hh" diff --git a/monotone-1.1-catch.patch b/monotone-1.1-catch.patch new file mode 100644 index 0000000..cccee22 --- /dev/null +++ b/monotone-1.1-catch.patch @@ -0,0 +1,111 @@ +Do not catch exceptions of polymorphic type by value, as that requires the +compiler to slice the exceptions. Catching them by reference allows the +compiler to emit more efficient code. + +--- monotone-1.1/src/dates.cc.orig 2014-05-04 03:15:16.000000000 -0600 ++++ monotone-1.1/src/dates.cc 2020-06-30 12:15:35.765139561 -0600 +@@ -652,7 +652,7 @@ date_t::date_t(string const & s) + + d = our_timegm(t); + } +- catch (std::out_of_range) ++ catch (std::out_of_range &) + { + E(false, origin::user, + F("unrecognized date (monotone only understands ISO 8601 format)")); +--- monotone-1.1/src/key_packet.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/key_packet.cc 2020-06-30 12:14:15.581206185 -0600 +@@ -139,7 +139,7 @@ namespace + } + // since we do not want to prompt for a password to decode it finally, + // we ignore all other exceptions +- catch (Botan::Invalid_Argument) {} ++ catch (Botan::Invalid_Argument &) {} + } + void validate_no_more_args(istringstream & iss) const + { +--- monotone-1.1/src/key_store.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/key_store.cc 2020-06-30 12:14:36.965188418 -0600 +@@ -622,7 +622,7 @@ key_store_state::decrypt_private_key(key + break; + } + #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4) +- catch (Botan::Invalid_Argument) ++ catch (Botan::Invalid_Argument &) + #else + catch (Botan::Exception & e) + #endif +--- monotone-1.1/src/network/session.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/network/session.cc 2020-06-30 12:15:10.949160179 -0600 +@@ -362,7 +362,7 @@ bool session::do_work(transaction_guard + % errmsg.substr(4)); + } + } +- catch (boost::bad_lexical_cast) ++ catch (boost::bad_lexical_cast &) + { // ok, so it wasn't a number + } + } +--- monotone-1.1/src/option.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/option.cc 2020-06-30 12:12:46.420100297 -0600 +@@ -522,7 +522,7 @@ void concrete_option_set::from_command_l + o.resetter(); + } + } +- catch (boost::bad_lexical_cast) ++ catch (boost::bad_lexical_cast &) + { + throw bad_arg(o.longname, arg); + } +@@ -567,7 +567,7 @@ void concrete_option_set::from_key_value + o.resetter(); + } + } +- catch (boost::bad_lexical_cast) ++ catch (boost::bad_lexical_cast &) + { + throw bad_arg(o.longname, value); + } +--- monotone-1.1/src/packet.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/packet.cc 2020-06-30 12:13:54.197195613 -0600 +@@ -192,9 +192,9 @@ namespace + // since we do not want to prompt for a password to decode it finally, + // we ignore all other exceptions + #if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11) +- catch (Passphrase_Required) {} ++ catch (Passphrase_Required &) {} + #else +- catch (Botan::Invalid_Argument) {} ++ catch (Botan::Invalid_Argument &) {} + #endif + } + void validate_certname(string const & cn) const +--- monotone-1.1/src/paths.hh.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/paths.hh 2020-06-30 12:12:29.845076986 -0600 +@@ -424,7 +424,7 @@ bool safe_compose(T const & p, char cons + result = p / path_component(s); + return true; + } +- catch (std::logic_error) ++ catch (std::logic_error &) + { + report_failed_path_composition(p, s, isdir); + return false; +--- monotone-1.1/src/sanity.cc.orig 2020-06-30 09:32:43.994207307 -0600 ++++ monotone-1.1/src/sanity.cc 2020-06-30 12:13:32.165164632 -0600 +@@ -433,13 +433,13 @@ sanity::gasp() + (*i)->gasp(tmp); + out << tmp; + } +- catch (logic_error) ++ catch (logic_error &) + { + out << tmp; + out << "\n"; + L(FL("ignoring error trigged by saving work set to debug log")); + } +- catch (recoverable_failure) ++ catch (recoverable_failure &) + { + out << tmp; + out << "\n"; diff --git a/monotone-1.1-lua-ql.patch b/monotone-1.1-lua-ql.patch new file mode 100644 index 0000000..743f0c8 --- /dev/null +++ b/monotone-1.1-lua-ql.patch @@ -0,0 +1,15 @@ +The LUA_QL macro was removed in lua 5.4.0. Make the same transformation +as was made in the lua code itself. + +diff -up monotone-1.1/src/lua_hooks.cc.orig monotone-1.1/src/lua_hooks.cc +--- monotone-1.1/src/lua_hooks.cc.orig 2014-05-04 03:15:17.000000000 -0600 ++++ monotone-1.1/src/lua_hooks.cc 2020-06-30 10:22:58.480017092 -0600 +@@ -90,7 +90,7 @@ extern "C" + s = lua_tostring(LS, -1); + if (s == NULL) + return luaL_error( +- LS, LUA_QL("tostring") " must return a string to ", LUA_QL("print") ++ LS, "'tostring' must return a string to 'print'" + ); + + if (i > 1) diff --git a/monotone-1.1-string-overflow.patch b/monotone-1.1-string-overflow.patch new file mode 100644 index 0000000..892236f --- /dev/null +++ b/monotone-1.1-string-overflow.patch @@ -0,0 +1,28 @@ +Ensure that the string in SSH_AUTH_SOCK is not too large to fit in a Unix +sockaddr, and only copy the bytes of the supplied string. The original code +goes on to copy bytes beyond the end of the string. + +--- monotone-1.1/src/unix/ssh_agent_platform.cc.orig 2014-05-04 03:15:18.000000000 -0600 ++++ monotone-1.1/src/unix/ssh_agent_platform.cc 2020-06-30 12:25:54.068518536 -0600 +@@ -35,8 +35,9 @@ static int + connect_to_agent() + { + const char *authsocket = getenv("SSH_AUTH_SOCK"); ++ struct sockaddr_un addr; + +- if (!authsocket || !*authsocket) ++ if (!authsocket || !*authsocket || strlen(authsocket) >= sizeof(addr.sun_path)) + { + L(FL("ssh_agent: no agent")); + return -1; +@@ -57,9 +58,8 @@ connect_to_agent() + return -1; + } + +- struct sockaddr_un addr; + addr.sun_family = AF_UNIX; +- strncpy(addr.sun_path, authsocket, sizeof(addr.sun_path)); ++ strcpy(addr.sun_path, authsocket); + + if (::connect(sock, (struct sockaddr *)&addr, sizeof addr)) + { diff --git a/monotone.spec b/monotone.spec index 6e78e32..39e7df0 100644 --- a/monotone.spec +++ b/monotone.spec @@ -18,6 +18,10 @@ Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch Patch3: monotone-1.1-pcre.patch Patch4: monotone-1.1-py3.patch +Patch5: monotone-1.1-lua-ql.patch +Patch6: monotone-1.1-boost.patch +Patch7: monotone-1.1-string-overflow.patch +Patch8: monotone-1.1-catch.patch BuildRequires: gcc-c++ BuildRequires: make BuildRequires: perl-generators @@ -80,7 +84,7 @@ and then pass commands to it. %build export LC_MESSAGES=en_US %configure -make %{?_smp_mflags} +%make_build %check @@ -92,7 +96,7 @@ make %{?_smp_mflags} %install export LC_MESSAGES=en_US -make install DESTDIR=%{buildroot} +%make_install rm -f %{buildroot}%{_infodir}/dir mv %{buildroot}%{_datadir}/doc/%{name} _doc @@ -197,6 +201,12 @@ exit 0 %changelog +* Tue Jun 30 2020 Jerry James - 1.1-35 +- Add lua-ql patch due to removal of LUA_QL from lua +- Add boost patch to fix single-letter macro name clash (bz 1851313) +- Add string-overflow patch to fix a potential buffer overflow +- Add catch patch to silence a large number of compiler warnings + * Mon Jun 22 2020 Jitka Plesnikova - 1.1-35 - Perl 5.32 rebuild From b77d129bc2cb08a975cb28eba3b4a1f09c51f85d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 08:24:28 +0000 Subject: [PATCH 127/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 39e7df0..249a198 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 35%{?dist} +Release: 36%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -201,6 +201,9 @@ exit 0 %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.1-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jun 30 2020 Jerry James - 1.1-35 - Add lua-ql patch due to removal of LUA_QL from lua - Add boost patch to fix single-letter macro name clash (bz 1851313) From 8c5082acbf4388704c5874c798e8c36660b7a79d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 04:33:42 +0000 Subject: [PATCH 128/145] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 249a198..8a9f3b2 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 36%{?dist} +Release: 37%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -201,6 +201,10 @@ exit 0 %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 1.1-37 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 1.1-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From f19bfbabd2b0284e85b5996f1edab0d8edc6a872 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 20:47:14 +0000 Subject: [PATCH 129/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 8a9f3b2..e3dad05 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 37%{?dist} +Release: 38%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -201,6 +201,9 @@ exit 0 %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1.1-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sat Aug 01 2020 Fedora Release Engineering - 1.1-37 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 29a6d5c12de129bf0d20af8aa8bb491f7e5af29f Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 8 Feb 2021 20:37:02 +0100 Subject: [PATCH 130/145] Move bash completions to /usr/share/bash-completion/completions (bz#1855768). --- monotone.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/monotone.spec b/monotone.spec index e3dad05..cdb9d23 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 38%{?dist} +Release: 39%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -138,6 +138,11 @@ install -m 0644 -p %{SOURCE3} . install -D -m 0644 -p contrib/Monotone.pm \ %{buildroot}%{perl_vendorlib}/Monotone.pm +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions +mv %{buildroot}%{_sysconfdir}/bash_completion.d/monotone.bash_completion \ + %{buildroot}%{_datadir}/bash-completion/completions/%{name}.bash_completion + + %files -f %{name}.lang %doc AUTHORS NEWS README UPGRADE %doc _doc/* @@ -146,7 +151,9 @@ install -D -m 0644 -p contrib/Monotone.pm \ %{_bindir}/mtnopt %{_bindir}/mtn-cleanup %{_infodir}/monotone.info* -%{_sysconfdir}/bash_completion.d/monotone.bash_completion +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/%{name}.bash_completion %{_mandir}/man1/mtn.1* %{_mandir}/man1/mtnopt.1* %{_mandir}/man1/mtn-cleanup.1* @@ -201,6 +208,9 @@ exit 0 %changelog +* Mon Feb 8 2021 Thomas Moschny - 1.1-39 +- Move bash completions to /usr/share/bash-completion/completions (bz#1855768). + * Tue Jan 26 2021 Fedora Release Engineering - 1.1-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From f0fcfb97580cfee11634d0a7385188219878724e Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 21 May 2021 12:05:46 +0200 Subject: [PATCH 131/145] Perl 5.34 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index cdb9d23..a91bc1a 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 39%{?dist} +Release: 40%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -208,6 +208,9 @@ exit 0 %changelog +* Fri May 21 2021 Jitka Plesnikova - 1.1-40 +- Perl 5.34 rebuild + * Mon Feb 8 2021 Thomas Moschny - 1.1-39 - Move bash completions to /usr/share/bash-completion/completions (bz#1855768). From 678adf0cf2f7074cbfd7d394c9d4b9a3d3bc8fd0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 15:20:57 +0000 Subject: [PATCH 132/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index a91bc1a..de819da 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 40%{?dist} +Release: 41%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -208,6 +208,9 @@ exit 0 %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1.1-41 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri May 21 2021 Jitka Plesnikova - 1.1-40 - Perl 5.34 rebuild From d7f20cf9cc6ded34cd94b3e3aedd6eaf7b5014ab Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 20:23:26 +0000 Subject: [PATCH 133/145] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index de819da..1867760 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 41%{?dist} +Release: 42%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -208,6 +208,9 @@ exit 0 %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1.1-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 1.1-41 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 0a9e571e25e0158d340e5ba9a27a9e56e9a959d4 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 30 May 2022 19:35:25 +0200 Subject: [PATCH 134/145] Perl 5.36 rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 1867760..eab4571 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 42%{?dist} +Release: 43%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -208,6 +208,9 @@ exit 0 %changelog +* Mon May 30 2022 Jitka Plesnikova - 1.1-43 +- Perl 5.36 rebuild + * Thu Jan 20 2022 Fedora Release Engineering - 1.1-42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 4b5250c284b185437c914b721d1c364608a5ea15 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 23:42:30 +0000 Subject: [PATCH 135/145] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index eab4571..6e53dba 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 43%{?dist} +Release: 44%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -208,6 +208,9 @@ exit 0 %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1.1-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon May 30 2022 Jitka Plesnikova - 1.1-43 - Perl 5.36 rebuild From 10f4603d1a9a6f1401939870ae13b1c5e3472e1e Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 13 Jan 2023 09:49:03 +0100 Subject: [PATCH 136/145] Remove perl(MODULE_COMPAT), it will be replaced by generators --- monotone.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 6e53dba..633234e 100644 --- a/monotone.spec +++ b/monotone.spec @@ -69,7 +69,6 @@ This package provides an easy-to-use standalone server setup for monotone. %package -n perl-Monotone Summary: Perl Module for monotone Requires: monotone = %{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description -n perl-Monotone From d9caf4d74e32455b55f9f48dc22096b9ab88a7c2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 20:41:30 +0000 Subject: [PATCH 137/145] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 633234e..180d18d 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 44%{?dist} +Release: 45%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -207,6 +207,9 @@ exit 0 %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.1-45 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 1.1-44 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 2113bfe62aa76b95c7bf65cf6885ccaafe0d59a5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 15:45:50 +0000 Subject: [PATCH 138/145] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 180d18d..081fb1b 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 45%{?dist} +Release: 46%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -207,6 +207,9 @@ exit 0 %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 1.1-46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jan 19 2023 Fedora Release Engineering - 1.1-45 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From cff8a0c8dff542ddc1d3c37a90a6d120fdee9645 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 08:36:50 +0000 Subject: [PATCH 139/145] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 081fb1b..22d54b4 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 46%{?dist} +Release: 47%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -207,6 +207,9 @@ exit 0 %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 1.1-47 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jul 20 2023 Fedora Release Engineering - 1.1-46 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 3a511adf44a7ce16873304387849e8f746c6718d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 08:00:16 +0000 Subject: [PATCH 140/145] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 22d54b4..6fb05ad 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 47%{?dist} +Release: 48%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -207,6 +207,9 @@ exit 0 %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 1.1-48 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 1.1-47 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From cf5795268b757854e11a344494542ae1ab0cdabd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 18:37:12 +0000 Subject: [PATCH 141/145] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 6fb05ad..d7942e0 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 48%{?dist} +Release: 49%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -207,6 +207,9 @@ exit 0 %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 1.1-49 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jan 25 2024 Fedora Release Engineering - 1.1-48 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From b62767eb947710c380231676c260bf6d84af06f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Fri, 26 Jul 2024 01:27:12 +0200 Subject: [PATCH 142/145] convert GPLv2+ license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- monotone.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/monotone.spec b/monotone.spec index d7942e0..d381b3e 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,8 +1,9 @@ Name: monotone Version: 1.1 -Release: 49%{?dist} +Release: 50%{?dist} Summary: A free, distributed version control system -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later URL: http://monotone.ca/ Source0: http://monotone.ca/downloads/%{version}/%{name}-%{version}.tar.bz2 Source1: monotone.service @@ -207,6 +208,9 @@ exit 0 %changelog +* Fri Jul 26 2024 Miroslav Suchý - 1.1-50 +- convert license to SPDX + * Thu Jul 18 2024 Fedora Release Engineering - 1.1-49 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 0b22da65067b2dc45c81a9fe7a6c1e22ee5cd64b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 19:03:53 +0000 Subject: [PATCH 143/145] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index d381b3e..114c523 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 50%{?dist} +Release: 51%{?dist} Summary: A free, distributed version control system # Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later @@ -208,6 +208,9 @@ exit 0 %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 1.1-51 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jul 26 2024 Miroslav Suchý - 1.1-50 - convert license to SPDX From 9e3dc22dd87e372208c99dd3cda69395947e99eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 22:19:41 +0000 Subject: [PATCH 144/145] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- monotone.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monotone.spec b/monotone.spec index 114c523..ecd8c34 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 51%{?dist} +Release: 52%{?dist} Summary: A free, distributed version control system # Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later @@ -208,6 +208,9 @@ exit 0 %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 1.1-52 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jan 17 2025 Fedora Release Engineering - 1.1-51 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 2cc4cd8a8c0009617f71f884b2332177d8ead0ad Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Thu, 28 Aug 2025 08:17:38 +0200 Subject: [PATCH 145/145] Update for current users and groups guidelines. --- monotone-server-sysusers.conf | 2 ++ monotone.spec | 18 +++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 monotone-server-sysusers.conf diff --git a/monotone-server-sysusers.conf b/monotone-server-sysusers.conf new file mode 100644 index 0000000..deb48d3 --- /dev/null +++ b/monotone-server-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u monotone - "Monotone Netsync Server" /var/lib/monotone diff --git a/monotone.spec b/monotone.spec index ecd8c34..72e35eb 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 52%{?dist} +Release: 53%{?dist} Summary: A free, distributed version control system # Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later @@ -14,6 +14,7 @@ Source5: monotone-server-initdb Source6: monotone-server-migratedb Source7: monotone-server-genkey Source8: monotone-server-import +Source9: monotone-server-sysusers.conf Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch @@ -34,6 +35,8 @@ BuildRequires: sqlite-devel >= 3.3.8 BuildRequires: lua-devel >= 5.1 BuildRequires: libidn-devel BuildRequires: systemd +BuildRequires: systemd-rpm-macros +%{?sysusers_requires_compat} # Required by the test suite: BuildRequires: cvs @@ -142,6 +145,8 @@ mkdir -p %{buildroot}%{_datadir}/bash-completion/completions mv %{buildroot}%{_sysconfdir}/bash_completion.d/monotone.bash_completion \ %{buildroot}%{_datadir}/bash-completion/completions/%{name}.bash_completion +install -p -D -m 0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/monotone-server.conf + %files -f %{name}.lang %doc AUTHORS NEWS README UPGRADE @@ -184,15 +189,11 @@ mv %{buildroot}%{_sysconfdir}/bash_completion.d/monotone.bash_completion \ %attr(0640,root,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/monotone/write-permissions %dir %attr(0770,monotone,monotone) %{_localstatedir}/lib/monotone %attr(0660,monotone,monotone) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/lib/monotone/server.mtn +%{_sysusersdir}/monotone-server.conf %pre server -# Add "monotone" user per http://fedoraproject.org/wiki/Packaging/UsersAndGroups -getent group monotone > /dev/null || groupadd -r monotone -getent passwd monotone > /dev/null || -useradd -r -g monotone -r -d %{_localstatedir}/lib/monotone -s /sbin/nologin \ - -c "Monotone Netsync Server" monotone -exit 0 +%sysusers_create_compat %{SOURCE9} %post server @@ -208,6 +209,9 @@ exit 0 %changelog +* Thu Aug 28 2025 Thomas Moschny - 1.1-53 +- Update for current users and groups guidelines. + * Thu Jul 24 2025 Fedora Release Engineering - 1.1-52 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild