Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c19629

Browse files
author
Neil Conway
committed
Remove a long comment from cvs.sgml -- AFAICS this is no longer useful,
or at any rate doesn't belong as a comment in a random SGML file.
1 parentfc8f4ba commit2c19629

File tree

1 file changed

+1
-185
lines changed

1 file changed

+1
-185
lines changed

‎doc/src/sgml/cvs.sgml

Lines changed: 1 addition & 185 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/cvs.sgml,v 1.34 2005/08/11 13:52:33 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/cvs.sgml,v 1.35 2005/10/15 20:15:48 neilc Exp $
33
-->
44

55
<appendix id="cvs">
@@ -702,190 +702,6 @@ $ which cvsup
702702
</sect1>
703703
</appendix>
704704

705-
<!--
706-
> It became clear that I had a problem with my m3 installation; some
707-
> X11 libraries were not being found correctly.
708-
709-
By the way, you can build the client without the GUI by doing this
710-
in the "client" subdirectory:
711-
712-
m3build -DNOGUI
713-
714-
If you build it that way, then it doesn't need the X11 libraries and
715-
it's quite a bit smaller. The GUI is fun to watch, but it's not
716-
very useful. I originally implemented it because it made debugging
717-
the multi-threaded client program much easier.
718-
719-
To build a statically-linked client, edit <filename>client/src/m3makefile</filename>
720-
to add <literal>build_standalone()</literal>
721-
just before the <literal>program()</literal> entry near
722-
the end of the file:
723-
724-
<programlisting>
725-
build_standalone()
726-
program(cvsup)
727-
</programlisting>
728-
729-
Then, if cvsup has already been built, remove the machine-specific build directory
730-
(e.g. <filename>LINUXELF/</filename>) and rebuild:
731-
732-
<programlisting>
733-
rm -rf LINUXELF
734-
m3build -DNOGUI -v
735-
cp -p LINUXELF/cvsup /usr/local/bin
736-
</programlisting>
737-
738-
> Anyway, with the reinstall and the two-line patch above (and that
739-
> one include-file _POSIX_SOURCE workaround from the previous try),
740-
> things built cleanly.
741-
742-
Good!
743-
744-
> Now I just need a server somewhere to test.
745-
746-
If you want to try it out, there are public servers for the FreeBSD
747-
source repository at cvsup.freebsd.org and cvsup2.freebsd.org.
748-
Here's a suggested supfile:
749-
750-
*default host=cvsup.freebsd.org compress
751-
*default release=cvs
752-
*default base=/home/jdp/cvsup-test# FIX THIS
753-
*default delete use-rel-suffix
754-
# *default tag=.
755-
src-bin
756-
757-
This will fetch you the source repository for the programs that get
758-
installed into "/bin". I chose it because it's one of the smaller
759-
pieces of the system. Make an empty directory someplace for
760-
testing, and change the "FIX THIS" line to specify that directory
761-
after the "base=".
762-
763-
If you are on a T1 or better, you should probably delete the
764-
"compress" keyword in the first line.
765-
766-
As shown, it will get the repository (RCS) files. If you uncomment
767-
the line containing "tag=." then it will instead check out the
768-
latest version of each file. There's a bunch more information about
769-
what you can do in the
770-
<ulink url="http://www.freebsd.org/handbook/cvsup.html">
771-
CVSup Handbook</ulink>.
772-
773-
There is one other thing I want to send you, but not tonight. I
774-
discovered the hard way that you need a malloc package that is
775-
thread-safe with respect to the Modula-3 threads package. The
776-
Modula-3 runtime takes care to do the proper mutual exclusion around
777-
all calls it makes to malloc. But if you call certain functions in
778-
the native C library which in turn call malloc, then the mutual
779-
exclusion gets bypassed. This can lead to rare but baffling core
780-
dumps.
781-
782-
For FreeBSD, I solved this by adding a thread-safe malloc package
783-
into the Modula-3 runtime. The package is quite portable, and I'm
784-
sure it will work well for Linux with very few changes (probably
785-
none at all). I want to send it to you along with instructions
786-
for making it a part of the "libm3core" library. It's very simple,
787-
but I've run out of steam for tonight. :-) Once you have this
788-
malloc in place, the CVSup system should be rock solid. We have
789-
servers that have been up for weeks and have served many thousands
790-
of clients without any observed problems.
791-
792-
> We hope to have the PostgreSQL tree using CVSup within a month or
793-
> so, and hope to retire sup in September...
794-
795-
Great! I'll do my best to help make sure you don't regret it.
796-
797-
John
798-
799-
Tom,
800-
801-
I'm appending the sources for the thread safe version of malloc that
802-
I told you about. I believe that it will simply compile and work
803-
under Linux, but I've never had an opportunity to test it there.
804-
I urge you to put it into your Modula-3 system; otherwise, you
805-
are guaranteed to get occasional mysterious core dumps from cvsupd.
806-
807-
As a first step, I'd suggest simply trying to compile it under
808-
Linux, like this:
809-
810-
cc -O -c malloc.c
811-
812-
You shouldn't get any errors or warnings. If you do, contact me
813-
before you waste any more time on it.
814-
815-
Assuming it compiles OK, copy malloc.c into this directory of your
816-
Modula-3 source tree:
817-
818-
m3/m3core/src/runtime/LINUXELF
819-
820-
In that same directory, edit "m3makefile" and add this line to the
821-
end of the file:
822-
823-
c_source ("malloc")
824-
825-
Then chdir up into "m3/m3core" of the Modula-3 tree and type
826-
"m3build". (I'm assuming you already have a working Modula-3
827-
installation.) After that finishes, become root and type "m3ship"
828-
to install it.
829-
830-
That's all there is to it. If you built cvsup and cvsupd to use
831-
shared libraries, you don't even need to re-link them. They'll pick
832-
up the change automatically from the updated shared library.
833-
834-
Let me know if you run into any problems with it.
835-
836-
By the way, this is a very good malloc in its own right. It's worth
837-
using even aside from the thread safety of it.
838-
839-
Regards,
840-
John
841-
842-
I've deposited a statically built cvsup client executable (and man pages
843-
and test configuration) in
844-
845-
/pub/incoming/cvsup-15.1-client-linux.tar.gz
846-
847-
This was built and linked on Linux/v2.0.30, RH/v4.2, gnulib/v5.3.12 and
848-
includes the thread-safe malloc provided by John Polstra. I'll forward
849-
to you the malloc code and an additional installation e-mail from John.
850-
851-
The Modula-3 installation takes a good bit of room (~50MB?) and the
852-
build environment is unique to Modula-3, but suprisingly enough it
853-
pretty much works.
854-
855-
The cvsup Makefiles do not work on my machine (they are not portable
856-
yet) but each major package (there are 4) can be built without needing
857-
the makefiles with two commands each. Not difficult at all. John gives
858-
some hints in his e-mail on how to build a static executable, and on how
859-
to shrink the size of the executable by leaving out the GUI support.
860-
Again, easy to do.
861-
862-
My client test case, picking up a sub-tree of the FreeBSD distribution,
863-
worked flawlessly. I haven't tried running a server.
864-
865-
Thanks to John for getting me going.
866-
867-
- Tom
868-
869-
870-
For the thread-safe malloc, do the following:
871-
1) install Modula-3
872-
2) add the enclosed file "malloc.c" to m3/m3core/src/runtime/LINUXELF
873-
3) edit the last line of m3makefile in the same directory to add
874-
c_source ("malloc")
875-
4) do an "m3build" and an m3ship from the appropriate directory.
876-
877-
From what John said, the malloc problem can be noticable for the
878-
server-side running cvsupd. Clients may not need it.
879-
880-
Unfortunately I seem to have lost John's original good instructions for
881-
this, so am doing this from memory. May need to ask John to give
882-
instructions again...
883-
884-
- Tom
885-
886-
-->
887-
888-
889705
<!-- Keep this comment at the end of the file
890706
Local variables:
891707
mode:sgml

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp