pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cvs2fossil: finished package



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By:	wiz
Date:		Sat Jun 24 15:04:08 2023 +0200
Changeset:	e108e3f1ff7bc9e0c1df65be9aa9ef72c3244f46

Modified Files:
	Makefile
Added Files:
	cvs2fossil/DESCR
	cvs2fossil/Makefile
	cvs2fossil/PLIST
	cvs2fossil/distinfo
	cvs2fossil/patches/patch-04-commit_main.c
	cvs2fossil/patches/patch-common_common.h
	cvs2fossil/patches/patch-convert.sh

Log Message:
cvs2fossil: finished package

This tool converts a CVS repository into a fossil repository.  It
can be exported to git and other formats.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e108e3f1ff7bc9e0c1df65be9aa9ef72c3244f46

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                  |  1 +
 cvs2fossil/DESCR                          |  2 ++
 cvs2fossil/Makefile                       | 32 ++++++++++++++++++++++++
 cvs2fossil/PLIST                          |  6 +++++
 cvs2fossil/distinfo                       |  8 ++++++
 cvs2fossil/patches/patch-04-commit_main.c | 14 +++++++++++
 cvs2fossil/patches/patch-common_common.h  | 16 ++++++++++++
 cvs2fossil/patches/patch-convert.sh       | 41 +++++++++++++++++++++++++++++++
 8 files changed, 120 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 083efeacdc..0f7356894f 100644
--- a/Makefile
+++ b/Makefile
@@ -582,6 +582,7 @@ SUBDIR+=	cut-and-run
 SUBDIR+=	cvc3
 SUBDIR+=	cvs-syncmail
 SUBDIR+=	cvs2darcs
+SUBDIR+=	cvs2fossil
 SUBDIR+=	cvsanaly
 SUBDIR+=	cvsnt
 SUBDIR+=	cvstrac
diff --git a/cvs2fossil/DESCR b/cvs2fossil/DESCR
new file mode 100644
index 0000000000..d1c4a7dc4e
--- /dev/null
+++ b/cvs2fossil/DESCR
@@ -0,0 +1,2 @@
+This tool converts a CVS repository into a fossil repository.  It
+can be exported to git and other formats.
diff --git a/cvs2fossil/Makefile b/cvs2fossil/Makefile
new file mode 100644
index 0000000000..a59f261d3f
--- /dev/null
+++ b/cvs2fossil/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD$
+
+DISTNAME=	cvs2fossil-20140502
+CATEGORIES=	devel scm
+MASTER_SITES=	https://www.sonnenberger.org/archive/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://wiki.NetBSD.org/github/
+COMMENT=	Tool to convert from CVS to fossil
+#LICENSE=	2-clause-bsd AND mit
+
+WRKSRC=		${WRKDIR}/cvs2fossil
+
+INSTALLATION_DIRS+=	libexec/cvs2fossil
+INSTALLATION_DIRS+=	share/examples/cvs2fossil
+
+SUBST_CLASSES+=		prefix
+SUBST_FILES.prefix=	convert.sh
+SUBST_VARS.prefix=	PREFIX
+SUBST_STAGE.prefix=	post-build
+SUBST_MESSAGE.prefix=	Fixing PATH in example file.
+
+do-build:
+	cd ${WRKSRC} && ./build.sh
+
+do-install:
+.for file in 01-import 02-vendorbranches 03-branchtime 04-commit
+	${INSTALL_PROGRAM} ${WRKSRC}/${file}/${file} ${DESTDIR}${PREFIX}/libexec/cvs2fossil
+.endfor
+	${INSTALL_SCRIPT} ${WRKSRC}/convert.sh ${DESTDIR}${PREFIX}/share/examples/cvs2fossil
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/cvs2fossil/PLIST b/cvs2fossil/PLIST
new file mode 100644
index 0000000000..470749ba22
--- /dev/null
+++ b/cvs2fossil/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD$
+libexec/cvs2fossil/01-import
+libexec/cvs2fossil/02-vendorbranches
+libexec/cvs2fossil/03-branchtime
+libexec/cvs2fossil/04-commit
+share/examples/cvs2fossil/convert.sh
diff --git a/cvs2fossil/distinfo b/cvs2fossil/distinfo
new file mode 100644
index 0000000000..f51f435331
--- /dev/null
+++ b/cvs2fossil/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+BLAKE2s (cvs2fossil-20140502.tar.gz) = 275555dc446eedb1c50bbb446391e72dac23fea5b55b078fba54a53d5fad11e2
+SHA512 (cvs2fossil-20140502.tar.gz) = dc5f64c5af0fe6a35143244c2858dcccd4ad2131fb5e375132ffc9071dfcff8984fdbb9664f774238ddd2c14c5155686e2c99962753131a3f5cd2f58f0d19a3d
+Size (cvs2fossil-20140502.tar.gz) = 1258545 bytes
+SHA1 (patch-04-commit_main.c) = a7afef765fca714dfe672ab7207789d91cd839c8
+SHA1 (patch-common_common.h) = 625959ee61513df52696987c9fba2abb83c91262
+SHA1 (patch-convert.sh) = 40ad2b114773699b68ae3ede1c9c64af526d090e
diff --git a/cvs2fossil/patches/patch-04-commit_main.c b/cvs2fossil/patches/patch-04-commit_main.c
new file mode 100644
index 0000000000..fe56e2d888
--- /dev/null
+++ b/cvs2fossil/patches/patch-04-commit_main.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Add missing header.
+
+--- 04-commit/main.c.orig	2014-05-02 21:04:50.000000000 +0000
++++ 04-commit/main.c
+@@ -8,6 +8,7 @@
+ #include <string.h>
+ #include <sqlite3.h>
+ #include <time.h>
++#include <unistd.h>
+ #include <zlib.h>
+ 
+ #include <openssl/md5.h>
diff --git a/cvs2fossil/patches/patch-common_common.h b/cvs2fossil/patches/patch-common_common.h
new file mode 100644
index 0000000000..6388efaf81
--- /dev/null
+++ b/cvs2fossil/patches/patch-common_common.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Avoid conflict with SSP definition.
+
+--- common/common.h.orig	2010-12-19 15:42:09.000000000 +0000
++++ common/common.h
+@@ -2,7 +2,9 @@
+ 
+ void *memrchr(const void *, int, size_t);
+ 
++#ifndef stpcpy
+ char *stpcpy(char *, const char *);
++#endif
+ 
+ size_t strlcat(char *, const char *, size_t);
+ size_t strlcpy(char *, const char *, size_t);
diff --git a/cvs2fossil/patches/patch-convert.sh b/cvs2fossil/patches/patch-convert.sh
new file mode 100644
index 0000000000..5b526170e1
--- /dev/null
+++ b/cvs2fossil/patches/patch-convert.sh
@@ -0,0 +1,41 @@
+$NetBSD$
+
+Adapt example for pkgsrc paths.
+
+--- convert.sh.orig	2011-02-15 18:57:40.000000000 +0000
++++ convert.sh
+@@ -4,6 +4,7 @@
+ 
+ set -e
+ 
++PATH=@PREFIX@/libexec/cvs2fossil:$PATH
+ db=/home/joerg/repo/src-new
+ repo=/home/joerg/repo/netbsd/src
+ fossil=$db.fossil
+@@ -12,7 +13,7 @@ fossil=$db.fossil
+ # If you want the module name itself to be skipped, add -m.
+ # Instead of e.g. src/bin/... as path, this will create only bin/...
+ #
+-time 01-import/01-import $db $repo
++time 01-import $db $repo
+ oldest=$(echo 'SELECT datetime(r.date,"-1 second") FROM revision r ORDER BY r.date LIMIT 1;' | sqlite3 $db)
+ 
+ #
+@@ -35,14 +36,14 @@ oldest=$(echo 'SELECT datetime(r.date,"-
+ #  revision IN (SELECT revision.id FROM revision WHERE date > "1998-05-01");
+ #EOF
+ 
+-time 02-vendorbranches/02-vendorbranches $db
+-time 03-branchtime/03-branchtime $db
++time 02-vendorbranches $db
++time 03-branchtime $db
+ rm -f $fossil
+ fossil new -A root --date-override "$oldest" $fossil
+ project=eeb7e06236b08dc4b57b6ab3b957fe5756c64f5b
+ sqlite3 $fossil 'UPDATE config SET value="'$project'" WHERE name="project-code"'
+ initial=$(sqlite3 $fossil 'SELECT uuid FROM blob WHERE rid=1')
+-TMPDIR=. time 04-commit/04-commit -b $initial $db $fossil
++TMPDIR=. time 04-commit -b $initial $db $fossil
+ du -h $fossil
+ time fossil rebuild --noverify $fossil
+ #TMPDIR=. time sqlite3 $fossil 'pragma synchronous=off; pragma journal_mode=off; vacuum'


Home | Main Index | Thread Index | Old Index