Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-02-22 Thread Andreas Scherer
I can't find any good reason. Case closed.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-187211753___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-02-18 Thread Florian Festi
I am inclined to reject this patch. The danger of missing patches unrecognised 
outweighs the benefit of using a svn for applying the patches in my opinion. 
Are there any use cases where using svn really gives a substantial improvement 
over other tools? 

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-185607062___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-02-11 Thread Lubos Kardos
It can be applied also without support for compressed patches but it would be 
nice at least to show some error and fail build when somebody will try to use 
compressed patches with svn. Now no error is showed an build continues without 
applying patches.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-182856435___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-29 Thread Andreas Scherer
Replacing `%__scm_apply_quilt(qp:m:)` according to 
http://mywiki.wooledge.org/Bashism from
```
%{__quilt} import %{-p:-p%{-p*}} %{1} && %{__quilt} push %{-q}
```
to
```
mkfifo debbuild.fifo; cat >debbuild.fifo &\
%{__quilt} import %{-p:-p%{-p*}} -P %{-m*} debbuild.fifo && %{__quilt} push 
%{-q}\
rm -f debbuild.fifo
```
works just fine (despite the horrible housekeeping). However, doing the same 
with `%__scm_apply_svn(qp:m:)` results in the error message "svn: E29: 
`/homr/andreas/.../debbuild.fifo` is not a file".

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-176648616___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-29 Thread Andreas Scherer
Another try with `<(cat)` instead of `%{1}`: Set **bash** as executing shell in 
the specfile
```
%prep
%define _buildshell /bin/shell
%autosetup -S svn
```
This produces the correct commands
```
+ /bin/cat 
/home/andreas/Programming/RPM/SOURCES/0001-Fix-intermediate-bugs.patch
+ /usr/bin/svn patch -q /dev/fd/63
```
but results in the error message
```
svn: E29: Can't set position pointer in file '/dev/fd/63': Illegal seek
```


---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-176659948___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-29 Thread Andreas Scherer
I suggest to stick with `%{1}` (for both `%__scm_apply_svn` and 
`%__scm_apply_quilt`) and go without compressed patches (well, `quilt` _does_ 
this internally).

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-176660977___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread Andreas Scherer
@lkardos Thanks for the hint; that syntax was new to me. In a first attempt, it 
indeed works from the console with `quilt` and `.zip`ped patches. However, 
`<(cat)` seems to be **bash** syntax. Both **debbuild** and **rpmbuild** use 
`#!/bin/sh` as the executing shell interpreter, which – at least on my two 
systems – resolves to **dash** and results in a 'syntax error' at the opening 
parenthesis, when used in the `%__scm_apply_{quilt|svn}` macros. Manually 
running the scripts with **bash** works OK.

Although I _could_ modify the script generation in **debbuild** to use 
`#!/bin/bash`, I don't know how easily **rpmbuild** could be modified 
accordingly. And, of course, using **bash** as executing shell would totally 
defeat the purpose of **dash** in the first place.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-176278885___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread Andreas Scherer
Keyword "process substitution": http://mywiki.wooledge.org/Bashism

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-176393161___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread Andreas Scherer
> @@ -1120,6 +1122,23 @@ done \
>  %{__patch} %{-p:-p%{-p*}} %{-q:-s}\
>  %{__bzr} commit %{-q} -m %{-m*}
>  
> +# Subversion
> +%__scm_setup_svn(q)\
> +%{__svnadmin} create .svnrepos\
> +%{__svn} mkdir %{-q} -m "Create directory structure." 
> file://`pwd`/.svnrepos/trunk\
> +%{__svn} checkout %{-q} file://`pwd`/.svnrepos/trunk ./\
> +%{__svn} add %{-q} --force ./\
> +%{__svn} commit %{-q} -m "Initial import." && %{__svn} update %{-q}
> +
> +# Subversion 1.6 doesn't have its own command to apply patches
> +#%__scm_apply_svn(qp:m:)\

Personally, I'ld vote for including the 'old' version of `%__scm_apply_svn` for 
_all_ versions of subversion (using standard `patch` instead of `svn patch`). 
`svn patch` does _not_ support pipe input, so compressed patches – rare as they 
might be – are completely unsupported by the 'new' version of 
`%__scm_apply_svn`. (I have no idea if the AS project is willing to extend `svn 
patch` for piped input; the [relevant source 
code](https://github.com/apache/subversion/blob/trunk/subversion/libsvn_client/patch.c#L3725)
 looks quite inflexible in this respect.)

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55/files#r51117087___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread Andreas Scherer
> @@ -1120,6 +1122,23 @@ done \
>  %{__patch} %{-p:-p%{-p*}} %{-q:-s}\
>  %{__bzr} commit %{-q} -m %{-m*}
>  
> +# Subversion
> +%__scm_setup_svn(q)\
> +%{__svnadmin} create .svnrepos\
> +%{__svn} mkdir %{-q} -m "Create directory structure." 
> file://`pwd`/.svnrepos/trunk\
> +%{__svn} checkout %{-q} file://`pwd`/.svnrepos/trunk ./\
> +%{__svn} add %{-q} --force ./\
> +%{__svn} commit %{-q} -m "Initial import." && %{__svn} update %{-q}
> +
> +# Subversion 1.6 doesn't have its own command to apply patches
> +#%__scm_apply_svn(qp:m:)\

The 'old' version is used on my standard computer with Kubuntu 12.04 and 
subversion 1.6.17, which has no `svn patch`. I have no idea how to check the 
version of subversion at this point.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55/files#r51113657___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread ニール・ゴンパ
> @@ -1120,6 +1122,23 @@ done \
>  %{__patch} %{-p:-p%{-p*}} %{-q:-s}\
>  %{__bzr} commit %{-q} -m %{-m*}
>  
> +# Subversion
> +%__scm_setup_svn(q)\
> +%{__svnadmin} create .svnrepos\
> +%{__svn} mkdir %{-q} -m "Create directory structure." 
> file://`pwd`/.svnrepos/trunk\
> +%{__svn} checkout %{-q} file://`pwd`/.svnrepos/trunk ./\
> +%{__svn} add %{-q} --force ./\
> +%{__svn} commit %{-q} -m "Initial import." && %{__svn} update %{-q}
> +
> +# Subversion 1.6 doesn't have its own command to apply patches
> +#%__scm_apply_svn(qp:m:)\

It might just be better to take out the stuff for SVN < 1.7, then. The vast 
majority of RPM based systems that have this macro improvement are unlikely to 
have older SVN binaries installed systemwide. A check in the autoconf script 
for SVN 1.7 or newer could probably be sufficient for this.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55/files#r51116182___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread ニール・ゴンパ
> @@ -1120,6 +1122,23 @@ done \
>  %{__patch} %{-p:-p%{-p*}} %{-q:-s}\
>  %{__bzr} commit %{-q} -m %{-m*}
>  
> +# Subversion
> +%__scm_setup_svn(q)\
> +%{__svnadmin} create .svnrepos\
> +%{__svn} mkdir %{-q} -m "Create directory structure." 
> file://`pwd`/.svnrepos/trunk\
> +%{__svn} checkout %{-q} file://`pwd`/.svnrepos/trunk ./\
> +%{__svn} add %{-q} --force ./\
> +%{__svn} commit %{-q} -m "Initial import." && %{__svn} update %{-q}
> +
> +# Subversion 1.6 doesn't have its own command to apply patches
> +#%__scm_apply_svn(qp:m:)\

@ascherer Do patches generated by SVN support extended operations not supported 
by patch (such as changing permissions, ownership, etc.) like git-am patches 
do? If it does, then we probably want to use `svn patch`. If not, then I'd be 
okay with using standard `patch` instead.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55/files#r51117414___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread Andreas Scherer
> @@ -1120,6 +1122,23 @@ done \
>  %{__patch} %{-p:-p%{-p*}} %{-q:-s}\
>  %{__bzr} commit %{-q} -m %{-m*}
>  
> +# Subversion
> +%__scm_setup_svn(q)\
> +%{__svnadmin} create .svnrepos\
> +%{__svn} mkdir %{-q} -m "Create directory structure." 
> file://`pwd`/.svnrepos/trunk\
> +%{__svn} checkout %{-q} file://`pwd`/.svnrepos/trunk ./\
> +%{__svn} add %{-q} --force ./\
> +%{__svn} commit %{-q} -m "Initial import." && %{__svn} update %{-q}
> +
> +# Subversion 1.6 doesn't have its own command to apply patches
> +#%__scm_apply_svn(qp:m:)\

Lacking a decent life example, I have to [look at the 
code](https://github.com/apache/subversion/blob/trunk/subversion/libsvn_client/patch.c#L254).
 So, it seems that `svn patch` indeed does 'special things' to files and their 
'properties'.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55/files#r51120450___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread Andreas Scherer
> @@ -1120,6 +1122,23 @@ done \
>  %{__patch} %{-p:-p%{-p*}} %{-q:-s}\
>  %{__bzr} commit %{-q} -m %{-m*}
>  
> +# Subversion
> +%__scm_setup_svn(q)\
> +%{__svnadmin} create .svnrepos\
> +%{__svn} mkdir %{-q} -m "Create directory structure." 
> file://`pwd`/.svnrepos/trunk\
> +%{__svn} checkout %{-q} file://`pwd`/.svnrepos/trunk ./\
> +%{__svn} add %{-q} --force ./\
> +%{__svn} commit %{-q} -m "Initial import." && %{__svn} update %{-q}
> +
> +# Subversion 1.6 doesn't have its own command to apply patches
> +#%__scm_apply_svn(qp:m:)\

Just added another commit that removes the 'old' version of 
`%__scm_apply_patch`.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55/files#r51121662___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm] Support Apache Subversion as SCM in the BUILD arena. (#55)

2016-01-28 Thread Lubos Kardos
Maybe instead of %{1} you can try <(cat) and maybe this will work also for 
compressed patches but I didn't tried that, just an idea.

---
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/55#issuecomment-176209706___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint