From 8f4d5f3f07cb3e3ea91a7a0cbadad324fbea2054 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 21 Apr 2008 04:34:41 +0000 Subject: [PATCH 1/6] Initialize branch F-9 for monotone --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..1c26f78 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-9 From 41db456a2d8e9c6a41f1780ea7cb361b713537bb Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 12 Sep 2008 21:06:21 +0000 Subject: [PATCH 2/6] - Updated for 0.41 release. - Added mtnopt helper. --- .cvsignore | 2 +- monotone.spec | 14 +++++++++++--- sources | 2 +- 3 files changed, 13 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 a2fd4db..00a9f0f 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,10 +1,10 @@ Name: monotone -Version: 0.40 +Version: 0.41 Release: 1%{?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 @@ -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,13 @@ 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 + * Mon Apr 14 2008 Roland McGrath - 0.40-1 - Updated for 0.40 release. - Tweaked trivia for packaging guidelines nits. 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 8d90ef7acf94a52814073a5b5a4b87f4625f3ab4 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 3 Jan 2009 01:31:28 +0000 Subject: [PATCH 3/6] Updated for 0.42. --- .cvsignore | 2 +- import.log | 1 + monotone.spec | 54 ++++++++++++++++++++++++++++++++++++--------------- sources | 2 +- 4 files changed, 41 insertions(+), 18 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..e0b9841 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +monotone-0_42-2_fc10:F-9:monotone-0.42-2.fc10.src.rpm:1230946242 diff --git a/monotone.spec b/monotone.spec index 00a9f0f..28fa362 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone -Version: 0.41 -Release: 1%{?dist} +Version: 0.42 +Release: 2%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -59,13 +59,22 @@ 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 %build %configure --with-bundled-lua=%{bundled_lua} \ - --with-bundled-sqlite=%{bundled_sqlite} + --with-bundled-sqlite=%{bundled_sqlite} make %{?_smp_mflags} %check @@ -92,7 +101,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,17 +110,20 @@ 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} . +%{__install} -D -m 0644 -p contrib/Monotone.pm \ + %{buildroot}%{perl_vendorlib}/Monotone.pm + %clean rm -f README.monotone-server rm -rf %{buildroot} @@ -119,13 +131,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 @@ -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 @@ -160,7 +176,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 +185,24 @@ 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-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. 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 b85dfa7040454a1b8057f65352e973d102b8894b Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 6 Mar 2009 22:34:40 +0000 Subject: [PATCH 4/6] Updating from devel. --- import.log | 1 + monotone-0.42-gcc44.patch | 90 +++++++++++++++++++++++++++++++ monotone-0.42-netsync.patch | 101 +++++++++++++++++++++++++++++++++++ monotone-0.42-netsync2.patch | 12 +++++ monotone.spec | 27 +++++++++- 5 files changed, 229 insertions(+), 2 deletions(-) create mode 100644 monotone-0.42-gcc44.patch create mode 100644 monotone-0.42-netsync.patch create mode 100644 monotone-0.42-netsync2.patch diff --git a/import.log b/import.log index e0b9841..e8268b0 100644 --- a/import.log +++ b/import.log @@ -1 +1,2 @@ monotone-0_42-2_fc10:F-9:monotone-0.42-2.fc10.src.rpm:1230946242 +monotone-0_42-5_fc11:F-9:monotone-0.42-5.fc11.src.rpm:1236378840 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-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 28fa362..588e693 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 0.42 -Release: 2%{?dist} +Release: 5%{?dist} Summary: A free, distributed version control system Group: Development/Tools @@ -12,6 +12,13 @@ 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 @@ -71,6 +78,9 @@ 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} \ @@ -78,7 +88,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 +208,18 @@ 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 + +* 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 fdc88480f6a4b43deaa186a1448b7802ac7b6a20 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:39:52 +0000 Subject: [PATCH 5/6] 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 c1c9e195b168bfba419b121397e5e72ba6a51689 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 03:40:13 +0000 Subject: [PATCH 6/6] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - import.log | 2 -- 4 files changed, 24 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch 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/branch b/branch deleted file mode 100644 index 1c26f78..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-9 diff --git a/import.log b/import.log deleted file mode 100644 index e8268b0..0000000 --- a/import.log +++ /dev/null @@ -1,2 +0,0 @@ -monotone-0_42-2_fc10:F-9:monotone-0.42-2.fc10.src.rpm:1230946242 -monotone-0_42-5_fc11:F-9:monotone-0.42-5.fc11.src.rpm:1236378840