diff options
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | .gitignore | 18 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | fix-git-test.patch | 14 | ||||
-rw-r--r-- | remove-bzr.patch | 41 | ||||
-rw-r--r-- | remove-cvs.patch | 46 | ||||
-rw-r--r-- | remove-monotone.patch | 49 |
7 files changed, 218 insertions, 22 deletions
@@ -1,23 +1,30 @@ pkgbase = commit-patch pkgdesc = Commit partial patches to version control - pkgver = 2.6 + pkgver = 2.6.2 pkgrel = 1 - url = http://www.porkrind.org/commit-patch/ + url = http://www.porkrind.org/commit-patch arch = any - license = GPL2 + license = GPL-2.0-or-later + checkdepends = mercurial + checkdepends = subversion + checkdepends = darcs + makedepends = git depends = perl depends = patch depends = patchutils - depends = perl-ipc-run optdepends = git optdepends = mercurial optdepends = subversion - optdepends = cvs optdepends = darcs - optdepends = bzr - optdepends = monotone - source = http://www.porkrind.org/commit-patch/commit-patch-2.6.tar.gz - md5sums = c5d8f9dc93676716445f3217a7ed25ee + source = commit-patch::git+https://github.com/caldwell/commit-patch.git#tag=2.6.2 + source = fix-git-test.patch + source = remove-bzr.patch + source = remove-cvs.patch + source = remove-monotone.patch + b2sums = SKIP + b2sums = ecb9ebce304c9691aac3009ef64ca7528d14f7262e39b81ce337856a100ae46d1bc8572f36fe49214d1db83b1275ce97a7f05ae4304f9b362dce7a26b5136905 + b2sums = 9d5870390cc38af40e6e7b0043ec3430e2ec2a632ccb5c789fb771828ef47ce5299f15945c0816f4e36afae84610ddfacf71ded59df0f74b9d75486d6424d115 + b2sums = 624e5e0c81af864b3ec0189e7f1c93301ce2c186b1d647b0112635223a51032d7ffdb073eef721b020b04cca4db33e5f04f0a11507bbb3bfc2c96e1e720343e3 + b2sums = 1973a026c1baa67bc19511dcf93b4aaab8ab683e89830cde4544c0bc170cdb233c063e6f92ec7050117037b5f813c68a8547ed425950951beaec4d7f6a83bc9c pkgname = commit-patch - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..058ba2318df1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# based on https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore +*.tar +*.tar.* +*.rpm +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* + +*/ +*.orig +*.bak +*.backup +*.kate-swp +.directory @@ -1,21 +1,42 @@ -# Maintainer: Jonathan Kotta <jpkotta AT gmail DOT com> +# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu > +# Contributor: Jonathan Kotta <jpkotta AT gmail DOT com> pkgname=commit-patch -pkgver=2.6 +pkgver=2.6.2 pkgrel=1 pkgdesc="Commit partial patches to version control" arch=('any') -url="http://www.porkrind.org/commit-patch/" -license=('GPL2') -depends=('perl' 'patch' 'patchutils' 'perl-ipc-run') -optdepends=('git' 'mercurial' 'subversion' 'cvs' 'darcs' 'bzr' 'monotone') -conflicts=() -provides=() -source=(http://www.porkrind.org/commit-patch/commit-patch-${pkgver}.tar.gz) -md5sums=('c5d8f9dc93676716445f3217a7ed25ee') +url="http://www.porkrind.org/${pkgname}" +_repourl="https://github.com/caldwell/${pkgname}" +license=('GPL-2.0-or-later') +depends=('perl' 'patch' 'patchutils') +makedepends=('git') +checkdepends=('mercurial' 'subversion' 'darcs') +optdepends=('git' 'mercurial' 'subversion' 'darcs') +source=("${pkgname}::git+${_repourl}.git#tag=${pkgver}" + *.patch) +b2sums=('SKIP' + 'ecb9ebce304c9691aac3009ef64ca7528d14f7262e39b81ce337856a100ae46d1bc8572f36fe49214d1db83b1275ce97a7f05ae4304f9b362dce7a26b5136905' + '9d5870390cc38af40e6e7b0043ec3430e2ec2a632ccb5c789fb771828ef47ce5299f15945c0816f4e36afae84610ddfacf71ded59df0f74b9d75486d6424d115' + '624e5e0c81af864b3ec0189e7f1c93301ce2c186b1d647b0112635223a51032d7ffdb073eef721b020b04cca4db33e5f04f0a11507bbb3bfc2c96e1e720343e3' + '1973a026c1baa67bc19511dcf93b4aaab8ab683e89830cde4544c0bc170cdb233c063e6f92ec7050117037b5f813c68a8547ed425950951beaec4d7f6a83bc9c') -package() { - cd "$srcdir"/commit-patch-${pkgver} +prepare() { + cd "${srcdir}/${pkgname}" + + echo "Reverting Makefile commit that broke the installation (a33567f)..." + git revert --no-edit --no-commit a33567f5df04eeefc707f4ba8ea6aff32fd1a1e7 + echo "Done." + + git apply -p1 --verbose ../*.patch +} +check() { + cd "${srcdir}/${pkgname}" + make test +} + +package() { + cd "${srcdir}/${pkgname}" make PREFIX="$pkgdir"/usr install } diff --git a/fix-git-test.patch b/fix-git-test.patch new file mode 100644 index 000000000000..c37060797e16 --- /dev/null +++ b/fix-git-test.patch @@ -0,0 +1,14 @@ +diff --git i/test/vcs/git.sh w/test/vcs/git.sh +index 0ed09f1..5d43c71 100644 +--- i/test/vcs/git.sh ++++ w/test/vcs/git.sh +@@ -1,8 +1,7 @@ + git_init () { + WD=$1 + mkdir -p "$WD" +- (cd "$WD" && git init) +- ++ (cd "$WD" && git init && git config --local user.email "test@commit-patch-example.com" && git config --local user.name "Test User by commit-patch") + export VC_DIFF="git diff" + export VC_RM="true" + export DIFF_PREFIX="b/" diff --git a/remove-bzr.patch b/remove-bzr.patch new file mode 100644 index 000000000000..d27c4012ee5e --- /dev/null +++ b/remove-bzr.patch @@ -0,0 +1,41 @@ +diff --git i/commit-patch w/commit-patch +index 592d571..7bbddf6 100755 +--- i/commit-patch ++++ w/commit-patch +@@ -93,17 +93,6 @@ while (!$vc{name}) { + remove => 'true', + patcharg => '-p1', + lsdiffarg => [qw(--strip 1)]); +- } elsif (-d "$repo/.bzr") { +- %vc = (name => 'bzr', +- diff => 'bzr diff', +- commit => 'bzr commit', +- message => sub { ('-m', $_[0]) }, +- message_file => sub { ('--file', $_[0]) }, +- add => 'bzr add', +- remove => 'true', +- patcharg => '-p0', +- lsdiffarg => []); +- chdir $repo; # otherwise commit-partial from within a project subdir fails. + } elsif (-d "$repo/.git") { + %vc = (name => 'git', + diff => 'git diff --relative', # Use --relative here because "git diff | git apply --cached" fails to apply hunks from files not in your current dir tree +diff --git i/test/vcs/bzr.sh w/test/vcs/bzr.sh +deleted file mode 100644 +index 565e01c..0000000 +--- i/test/vcs/bzr.sh ++++ /dev/null +@@ -1,13 +0,0 @@ +-bzr_init () { +- WD=$1 +- mkdir -p "$WD" +- (cd "$WD" && bzr init && bzr whoami --branch "Chester McTester <chester@example.com>") +- +- export VC_DIFF="bzr diff" +- export VC_RM="true" +- export DIFF_PREFIX="" +-} +- +-bzr_cleanup () { +- true +-} diff --git a/remove-cvs.patch b/remove-cvs.patch new file mode 100644 index 000000000000..3e75339a6fdc --- /dev/null +++ b/remove-cvs.patch @@ -0,0 +1,46 @@ +diff --git i/commit-patch w/commit-patch +index 7bbddf6..b16e1e2 100755 +--- i/commit-patch ++++ w/commit-patch +@@ -41,17 +41,7 @@ my $repo="."; + my $amend; + my %vc; + while (!$vc{name}) { +- if (-d "$repo/CVS" && $repo eq '.') { +- %vc = (name => 'cvs', +- diff => 'cvs diff -Nu', +- commit => 'cvs commit', +- message => sub { ('-m', $_[0]) }, +- message_file => sub { ('-F', $_[0]) }, +- add => 'cvs add', +- remove => 'cvs rm', +- patcharg => '-p0', +- lsdiffarg => []); +- } elsif (-d "$repo/.svn") { ++ if (-d "$repo/.svn") { + %vc = (name => 'svn', + diff => 'svn diff -x -u', + commit => 'svn commit', +diff --git i/test/vcs/cvs.sh w/test/vcs/cvs.sh +deleted file mode 100644 +index 1faa009..0000000 +--- i/test/vcs/cvs.sh ++++ /dev/null +@@ -1,17 +0,0 @@ +-cvs_init () { +- WD=$1 +- REPO=$2 +- +- export CVSROOT="$REPO" +- cvs init +- mkdir "$REPO/test" +- cvs checkout -d "$WD" test +- +- export VC_DIFF="cvs diff -N" +- export VC_RM="cvs rm" +- export DIFF_PREFIX="" +-} +- +-cvs_cleanup () { +- true +-} diff --git a/remove-monotone.patch b/remove-monotone.patch new file mode 100644 index 000000000000..ec2a71b70d3a --- /dev/null +++ b/remove-monotone.patch @@ -0,0 +1,49 @@ +diff --git i/commit-patch w/commit-patch +index b16e1e2..3aa6d68 100755 +--- i/commit-patch ++++ w/commit-patch +@@ -91,17 +91,6 @@ while (!$vc{name}) { + message => sub { ('-m', $_[0]) }, + message_file => sub { ('-F', $_[0]) }, + previous_message => sub { my $prev; run([qw(git log -1 --pretty=format:%s%n%b)], '>', \$prev); $prev }); +- # Git is special cased below. +- } elsif (-d "$repo/_MTN") { +- %vc = (name => 'mtn', +- diff => 'mtn automate content_diff', +- commit => 'mtn commit', +- message => sub { ('-m', $_[0]) }, +- message_file => sub { ('--message-file', $_[0]) }, +- add => 'mtn add', +- remove => 'mtn drop', +- patcharg => '-p0', +- lsdiffarg => []); + } else { + $repo.="/.."; + printf("Trying back a dir: $repo, abs:%s\n", abs_path($repo)); +diff --git i/test/vcs/mtn.sh w/test/vcs/mtn.sh +deleted file mode 100644 +index f5be166..0000000 +--- i/test/vcs/mtn.sh ++++ /dev/null +@@ -1,21 +0,0 @@ +-mtn_init () { +- WD=$1 +- REPO=$2 +- +- export MTN_KEYDIR=$(mktemp -d "$TESTDIR_ABS/tmp/keydir.XXXXXXX") +- +- # Monotone doesns't like the db dir to exist when you init it. +- [ -d "$REPO" ] && rmdir "$REPO" +- +- mtn --keydir "$MTN_KEYDIR" db init --db="$REPO" +- mtn --keydir "$MTN_KEYDIR" --db="$REPO" --branch=test setup "$WD" +- (cd "$WD" && mtn automate generate_key commit-patch-automated-tester@example.com '') +- +- export VC_DIFF="mtn diff --without-header" +- export VC_RM="mtn drop" +- export DIFF_PREFIX="" +-} +- +-mtn_cleanup () { +- rm -rf "$MTN_KEYDIR" +-} |