Commit e2c0fbf7 authored by TBK's avatar TBK Committed by Leo

testing/cvs-fast-export: new aport

parent e15a895f
Description: Modify compile flags handling in Makefile for Debian packaging
This is to allow CFLAGS set by dpkg-buildflags from the environment
so that hardening flags and DEB_BUILD_OPTIONS=noopt would work.
.
Also disable -march=native which causes FTBFS on many platforms
and is inappropriate for a Debian package. See a similar bug
https://bugs.debian.org/761912 for an explanation.
(Note: Upstream commented out "CFLAGS += -march=native" in commit
0ead90d5d9ab861acd40a05490ed8e7936ac1fa5 on 2019-11-12.)
Author: Anthony Fok <foka@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/801108
Forwarded: not-needed
Last-Update: 2016-12-30, 2020-02-12, 2020-11-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@
FLEX ?= flex
A2X ?= a2x
+ENV_CFLAGS := $(CFLAGS)
GCC_WARNINGS1=-Wall -Wpointer-arith -Wstrict-prototypes
GCC_WARNINGS2=-Wmissing-prototypes -Wmissing-declarations
GCC_WARNINGS3=-Wno-unused-function -Wno-unused-label -Wno-format-zero-length
@@ -86,7 +87,7 @@
CFLAGS += -g
# Test coverage flags
# CFLAGS += -ftest-coverage -fprofile-arcs
-CFLAGS += $(EXTRA_CFLAGS)
+CFLAGS += $(EXTRA_CFLAGS) $(ENV_CFLAGS)
#YFLAGS= --report=all
LFLAGS=
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=cvs-fast-export
pkgver=1.55
pkgrel=0
pkgdesc="Export RCS or CVS history as a fast-import stream"
url="http://www.catb.org/esr/cvs-fast-export/"
arch="all"
license="GPL-2.0-or-later"
depends="cvs rcs"
makedepends="asciidoc bison flex libxslt"
checkdepends="python3"
subpackages="$pkgname-doc $pkgname-tools::noarch"
source="https://gitlab.com/esr/cvs-fast-export/-/archive/$pkgver/cvs-fast-export-$pkgver.tar.gz
python3.patch
01-compile-flags.patch
disable-test-sporadic.patch
"
build() {
# "make all" will run the commands below + html.
# html can not run in parallel because the ".adoc.html"
# rules reuse the "docbook-xsl.css" file name.
make cvs-fast-export man
}
check() {
tests/setpython python3
# v1.55 - More then one job and the tests
# are executed in the wrong order!
make -j 1 check
}
package() {
make DESTDIR="$pkgdir" prefix=/usr install
}
tools() {
pkgdesc="$pkgdesc (Tools)"
depends="$pkgname git python3 rsync"
cd "$pkgdir"/usr/bin
mkdir -p "$subpkgdir"/usr/bin
mv cvsconvert cvssync "$subpkgdir"/usr/bin/
}
sha512sums="1765bf4e086232d96b2c4a89d55fdd0028a5cc27630ebe6b34a9bc2f9319ec06802735c039dc516ec78e78af3b634bed4c94233e37d21b0da678de3a63c9ebef cvs-fast-export-1.55.tar.gz
00ef05acf411154600f31d37795330f39e2951483cc1cba35918b359635f423648038a1f976a4ce78f5209e1b60b4b3b4812ce7348ab426b97df07c45ca638bc python3.patch
35f738ad85132c54f6f4f521a0a0e21af2124ec71a10c94bf2b2861ca115b693e77df16b0bebb6220e555c3b582d06b2f29d9890e192dbb2d591a9042d2f1f60 01-compile-flags.patch
687fd54316a0b14935a0421d237ff003985211ef476360395c60cfbf6d8619099c8aa6d3af5ee511b016524f576374e868cc67dcaa5b96367fb7446d669496f4 disable-test-sporadic.patch"
Fails with the following error message:
== Sporadic tests ==
date: invalid date ‘+%s’
expr: syntax error: unexpected argument ‘1’
cvs-fast-export: option requires an argument: i
cvs-fast-export: try `cvs-fast-export --help' for more information.
incremental.sh: FAILED
make[1]: *** [/home/builder/aports/testing/cvs-fast-export/src/cvs-fast-export-1.55/tests/Makefile:159: sporadic] Error 1
make: *** [Makefile:147: check] Error 2
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -29,7 +29,7 @@
,v.dot:
$(CVS_FAST_EXPORT) -g $< >$*.dot
-test: s_regress m_regress r_regress i_regress t_regress c_regress sporadic # z2_regress z3_regress
+test: s_regress m_regress r_regress i_regress t_regress c_regress # sporadic z2_regress z3_regress
@echo "No diff output is good news."
rebuild: s_rebuild m_rebuild r_rebuild i_rebuild t_rebuild # z_rebuild
--- a/cvsconvert
+++ b/cvsconvert
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
"""
cvsconvert - convert a CVS repo and check against the original
--- a/cvsreduce
+++ b/cvsreduce
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# Runs under both Python 2 and Python 3: preserve this property!
# SPDX-License-Identifier: GPL-2.0+
"""
--- a/tests/at.tst
+++ b/tests/at.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: latin-1 -*-
## Verify parsing of escaped at on final line
--- a/tests/basic.tst
+++ b/tests/basic.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## basic test for CVS master parsing
import sys, testlifter
--- a/tests/branchy.tst
+++ b/tests/branchy.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## A branchy repo with deletions and only valid tags
import sys, testlifter
--- a/tests/daughterbranch.tst
+++ b/tests/daughterbranch.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Test for the daughter-branch bug
# This was the description:
--- a/tests/exec.tst
+++ b/tests/exec.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Test handling of executable bit
import sys, testlifter
--- a/tests/expand.tst
+++ b/tests/expand.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Test keyword expansion
import sys, testlifter
--- a/tests/hack1.tst
+++ b/tests/hack1.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## First example from the Hacking Guide
import sys, testlifter
--- a/tests/hack2.tst
+++ b/tests/hack2.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Second example from the Hacking Guide
import sys, testlifter
--- a/tests/hack3.tst
+++ b/tests/hack3.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Third example from the Hacking Guide
import sys, testlifter
--- a/tests/linear.tst
+++ b/tests/linear.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## simplest possible linear repository with multiple commits
import sys, testlifter
--- a/tests/longrev.tst
+++ b/tests/longrev.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## A widely branched repo with long file revision strings.
import sys, testlifter
--- a/tests/postbranch.tst
+++ b/tests/postbranch.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Ilya Basin's test, failed by cvsps-3.x
"""
Date: Sat, 20 Apr 2013 14:38:55 +0400
--- a/tests/t9601.py
+++ b/tests/t9601.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Test handling of vendor branches
#
# This test was swiped from the git 1.8.1 tree, then modified to exercise
--- a/tests/t9602.py
+++ b/tests/t9602.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Test handling of pathological tags
#
# This test was swiped from the git 1.8.1 tree, then modified to exercise
--- a/tests/t9603.py
+++ b/tests/t9603.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Testing for correct patchset estimation
# Structure of the test cvs repository
--- a/tests/t9604.py
+++ b/tests/t9604.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Testing for correct timestamp handling in author maps.
import sys, testlifter, tempfile, os
--- a/tests/t9605.py
+++ b/tests/t9605.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Testing for correct patchset estimation
# Structure of the test cvs repository
--- a/tests/tagbug.tst
+++ b/tests/tagbug.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Tricky tag corner case
import sys, testlifter
--- a/tests/twobranch.tst
+++ b/tests/twobranch.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## Two-branch repo to test incremental dumping
import sys, testlifter
--- a/tests/twotag.tst
+++ b/tests/twotag.tst
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
## A repo with identical tags attached to different changesets
import sys, testlifter, time
--- a/cvssync
+++ b/cvssync
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Runs under both Python 2 and Python 3: preserve this property!
# SPDX-License-Identifier: GPL-2.0+
"""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment