Dear all,
I have been working on R2spec fixing a couple of bugs here and there and switching to a template engine (jinja2) for the creation of the spec (based on the idea from Allen S. Rout).
I have also spent some time today to get a first R2rpm script working. Of course it uses the class from R2spec, so I have put them together in one rpm. I would like to have some feedback before pushing these through the repo, so if you could quickly test them and give me feed back it would be really nice :)
sources: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0pre.tar.gz src.rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-1.fc12.src.rpm rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-1.fc12.noarch.rpm
Have a nice sunday,
Pierre
On Sun, 2010-03-07 at 16:59 +0100, Pierre-Yves wrote:
Dear all,
I have been working on R2spec fixing a couple of bugs here and there and switching to a template engine (jinja2) for the creation of the spec (based on the idea from Allen S. Rout).
I have also spent some time today to get a first R2rpm script working. Of course it uses the class from R2spec, so I have put them together in one rpm. I would like to have some feedback before pushing these through the repo, so if you could quickly test them and give me feed back it would be really nice :)
Just because the question might shows-up, the option -d (build the missing dependencies of the package) is not implemented yet ;-)
Pierre
On Sunday 07 March 2010 16:26:34 Pierre-Yves wrote:
Just because the question might shows-up, the option -d (build the missing dependencies of the package) is not implemented yet ;-)
Pierre
If I am not asking too much it would be nice if r2rpm could fetch the sources directly from CRAN if we pass only the package name (or with a special option for that matter).
On Tue, 2010-03-16 at 15:14 +0000, José Matos wrote:
On Sunday 07 March 2010 16:26:34 Pierre-Yves wrote:
Just because the question might shows-up, the option -d (build the missing dependencies of the package) is not implemented yet ;-)
Pierre
If I am not asking too much it would be nice if r2rpm could fetch the sources directly from CRAN if we pass only the package name (or with a special option for that matter).
I have this idea in my mind for some time, I will look into this :-)
Pierre
On Mon, 2010-03-22 at 10:25 +0100, Pierre-Yves wrote:
On Tue, 2010-03-16 at 15:14 +0000, José Matos wrote:
On Sunday 07 March 2010 16:26:34 Pierre-Yves wrote:
Just because the question might shows-up, the option -d (build the missing dependencies of the package) is not implemented yet ;-)
Pierre
If I am not asking too much it would be nice if r2rpm could fetch the sources directly from CRAN if we pass only the package name (or with a special option for that matter).
I have this idea in my mind for some time, I will look into this :-)
Actually I need this for building the dependencies of a given package. At the moment I am thinking to parse the html page of the different repository to extract the url of the sources.
Would anyone know a better way to do it ?
Thanks,
Pierre
On Mon, 2010-03-22 at 10:25 +0100, Pierre-Yves wrote:
On Tue, 2010-03-16 at 15:14 +0000, José Matos wrote:
On Sunday 07 March 2010 16:26:34 Pierre-Yves wrote:
Just because the question might shows-up, the option -d (build the missing dependencies of the package) is not implemented yet ;-)
Pierre
If I am not asking too much it would be nice if r2rpm could fetch the sources directly from CRAN if we pass only the package name (or with a special option for that matter).
I have this idea in my mind for some time, I will look into this :-)
Ok this is implemented in the new release (0.2) sources: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0pre2.tar.gz src.rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-0.2.fc12.src.rpm rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-0.2.fc12.noarch.rp...
As you see I changed the release number so I believe rpm will complain.
The -p option works for cran, bioconductor and the r-forge.r-project.org.
I'll look into %{_specdir} and %{_sourcedir} for the release 0.3 ;-)
For the rest, does it work properly for you ?
Thanks for the feed back,
Pierre
On Tuesday 23 March 2010 14:12:36 Pierre-Yves wrote:
If I am not asking too much it would be nice if r2rpm could fetch the sources directly from CRAN if we pass only the package name (or with a special option for that matter).
I have this idea in my mind for some time, I will look into this :-)
Ok this is implemented in the new release (0.2) sources: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0pre2.tar.gz src.rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-0.2.fc12.src.rpm rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-0.2.fc12.noarch.r pm
As you see I changed the release number so I believe rpm will complain.
The -p option works for cran, bioconductor and the r-forge.r-project.org.
I'll look into %{_specdir} and %{_sourcedir} for the release 0.3 ;-)
For the rest, does it work properly for you ?
OK, I am catching on all the mail after a busy week. I have not yet tried to apply the latest version 0.3 here are my comments from previous versions.
I had to use the following patch.
Some notes on the elements of the diff:
* emacs refuses to address the UTF-8 encoding it only recognizes utf-8. That is why I have changed it for every file I had to edit.
* in R2spec I have the following snippet: - self.version = self.file['version'] + self.version = self.file['version'].replace("-",".")
The purpose as we have discussed before is to harmonize the versions used where in R the - (dash?) and point are equal as far as the package version is concerned.
As you can imagine I got an error with a package that has this version. (mAr_1.1-2.tar.gz)
It would be easier to coerce the author to change the name but this only works for my wife, not necessarily for all the other R packages authors. :-)
* in RPackage.py I have delegated to rpm the interpretation of rpm macros using a pipe. The only exception to this rule is the %{name} macro that is not set at that time.
Thanks for the feed back,
Pierre
Other than those issues pointed the package works really well, it is nice to set back and watch it do all the work. :-)
On Fri, 2010-03-26 at 19:50 +0000, José Matos wrote:
For the rest, does it work properly for you ?
OK, I am catching on all the mail after a busy week. I have not yet tried to apply the latest version 0.3 here are my comments from previous versions.
I had to use the following patch.
Some notes on the elements of the diff:
- emacs refuses to address the UTF-8 encoding it only recognizes utf-8. That
is why I have changed it for every file I had to edit.
Ok I will fix this.
- in R2spec I have the following snippet:
self.version = self.file['version']
self.version = self.file['version'].replace("-",".")
This should be fixed already in Description.py
- in RPackage.py I have delegated to rpm the interpretation of rpm macros
using a pipe. The only exception to this rule is the %{name} macro that is not set at that time.
This looks much nicer than the dirty solution I was using :-)
Other than those issues pointed the package works really well, it is nice to set back and watch it do all the work. :-)
Cool :-)
FYI, I am playing with R2rpm on cran and I have: $ ll rpmbuild/SRPMS/R-* |wc -l 857
I think I'll be looking for space for a repo and a i686 builder :-)
Thanks again,
Pierre
On Fri, 2010-03-26 at 21:02 +0100, Pierre-Yves wrote:
On Fri, 2010-03-26 at 19:50 +0000, José Matos wrote:
For the rest, does it work properly for you ?
OK, I am catching on all the mail after a busy week. I have not yet tried to apply the latest version 0.3 here are my comments from previous versions.
I had to use the following patch.
Some notes on the elements of the diff:
- emacs refuses to address the UTF-8 encoding it only recognizes utf-8. That
is why I have changed it for every file I had to edit.
Ok I will fix this.
- in R2spec I have the following snippet:
self.version = self.file['version']
self.version = self.file['version'].replace("-",".")
This should be fixed already in Description.py
- in RPackage.py I have delegated to rpm the interpretation of rpm macros
using a pipe. The only exception to this rule is the %{name} macro that is not set at that time.
This looks much nicer than the dirty solution I was using :-)
Version 0.5 available at the usual location :-)
If you manage to find other bugs or if you have other wishes, let me know ! (No it will not do ice-cube)
Pierre
On Friday 26 March 2010 20:02:37 Pierre-Yves wrote:
- in R2spec I have the following snippet:
self.version = self.file['version']
self.version = self.file['version'].replace("-",".")
This should be fixed already in Description.py
For some reason it did not for me (I suspect that you meant in a later revision). FWIW I was calling it like this:
python /path/to/R2rpm --cran -u url_to_package
Calling this with the later version does not work anymore, I get:
$ python ~/fedora/r2spec/devel/R2rpm --cran -u http://cran.r- project.org/src/contrib/mAr_1.1-2.tar.gz Traceback (most recent call last): File "/home/jamatos/fedora/r2spec/devel/R2rpm", line 51, in <module> R2rpm().main(source, url, package, bioc, cran, rforge, rproject, copyFile, dependencies, name, email, force) File "/home/jamatos/fedora/r2spec/devel/r2spec/R2rpm.py", line 65, in main r.getRpmMacroDirectory() AttributeError: RPackage instance has no attribute 'getRpmMacroDirectory'
On Fri, 2010-03-26 at 21:12 +0000, José Matos wrote:
On Friday 26 March 2010 20:02:37 Pierre-Yves wrote:
- in R2spec I have the following snippet:
self.version = self.file['version']
self.version = self.file['version'].replace("-",".")
This should be fixed already in Description.py
For some reason it did not for me (I suspect that you meant in a later revision).
Yes, I know I changed this but I can't remember in which revision it was.
FWIW I was calling it like this:
python /path/to/R2rpm --cran -u url_to_package
Calling this with the later version does not work anymore, I get:
$ python ~/fedora/r2spec/devel/R2rpm --cran -u http://cran.r- project.org/src/contrib/mAr_1.1-2.tar.gz Traceback (most recent call last): File "/home/jamatos/fedora/r2spec/devel/R2rpm", line 51, in <module> R2rpm().main(source, url, package, bioc, cran, rforge, rproject, copyFile, dependencies, name, email, force) File "/home/jamatos/fedora/r2spec/devel/r2spec/R2rpm.py", line 65, in main r.getRpmMacroDirectory() AttributeError: RPackage instance has no attribute 'getRpmMacroDirectory'
I just fixed it on the git, I'll upload in a few minutes a revision 0.6.
Thanks,
Pierre
On Sunday 07 March 2010 15:59:02 Pierre-Yves wrote:
Dear all,
I have been working on R2spec fixing a couple of bugs here and there and switching to a template engine (jinja2) for the creation of the spec (based on the idea from Allen S. Rout).
I have also spent some time today to get a first R2rpm script working. Of course it uses the class from R2spec, so I have put them together in one rpm. I would like to have some feedback before pushing these through the repo, so if you could quickly test them and give me feed back it would be really nice :)
I am sorry for a late reply but I have been busy. (Actually I should add this to my signature, it works all the time).
sources: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0pre.tar.gz src.rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-1.fc12.src.rpm rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-1.fc12.noarch.rpm
One small nitpick, I was expecting to have this spec with release 0.1 and not 1. :-)
As in R2spec-3.0.0-0.1.fc12.src.rpm since this is a pre-release. :-)
I have setup a machine to test this and I will give feedback as I have it.
Have a nice sunday,
Pierre
On Sunday 07 March 2010 15:59:02 Pierre-Yves wrote:
Dear all,
I have been working on R2spec fixing a couple of bugs here and there and switching to a template engine (jinja2) for the creation of the spec (based on the idea from Allen S. Rout).
I have also spent some time today to get a first R2rpm script working. Of course it uses the class from R2spec, so I have put them together in one rpm. I would like to have some feedback before pushing these through the repo, so if you could quickly test them and give me feed back it would be really nice :)
One request, would it be possible for R2rpm to read the personal rpmmacros instead of forcing a given directory layout?
Case in point, I have a given structure in the ~/.rpmmacros yet R2rpm insists on writing the spec files on specdir + "/SPECS/"...
I suspect that you accept patches. ;-)
Have a nice sunday,
Pierre
On Tue, 2010-03-16 at 20:18 +0000, José Matos wrote:
One request, would it be possible for R2rpm to read the personal rpmmacros instead of forcing a given directory layout?
Case in point, I have a given structure in the ~/.rpmmacros yet R2rpm insists on writing the spec files on specdir + "/SPECS/"...
Sounds reasonable to me. The current behavior uses the default .rpmmacros which only contains:
%_topdir %(echo $HOME)/rpmbuild %_smp_mflags -j3 % __arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
I suspect that you accept patches. ;-)
Surely do ;-)
Thanks,
Pierre
On Tuesday 23 March 2010 16:06:46 Pierre-Yves wrote:
On Tue, 2010-03-16 at 20:18 +0000, José Matos wrote:
One request, would it be possible for R2rpm to read the personal rpmmacros instead of forcing a given directory layout?
I have just commit this change to the git, could you test it ?
I will test it tomorrow. Thanks.
Thanks,
Pierre
On Tue, 2010-03-23 at 16:23 +0000, José Matos wrote:
On Tuesday 23 March 2010 16:06:46 Pierre-Yves wrote:
On Tue, 2010-03-16 at 20:18 +0000, José Matos wrote:
One request, would it be possible for R2rpm to read the personal rpmmacros instead of forcing a given directory layout?
I have just commit this change to the git, could you test it ?
I will test it tomorrow. Thanks.
Testing it this morning I found some bugs, corrected in a release 0.3 which also fixes the building process.
sources: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0pre3.tar.gz src.rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-0.3.fc12.src.rpm rpm: https://fedorahosted.org/releases/r/2/r2spec/R2spec-3.0.0-0.3.fc12.noarch.rp...
I have tested it with various package from CRAN which do not depends on any other package and I worked.
I believe we should be able to generate RPM for something like 669 packages on the CRAN, 22 on Bioconductor and 145 on the r-forge of the r-project using this implementation of R2rpm. Of course the rpm are not directly fully compliant with rpmlint due to formatting issues (on the %description, the %summary, the %license) and some encoding or wrong end-line issue.
Thanks for testing it,
Pierre
On Sun, 2010-03-07 at 16:59 +0100, Pierre-Yves wrote:
Dear all,
I have been working on R2spec fixing a couple of bugs here and there and switching to a template engine (jinja2) for the creation of the spec (based on the idea from Allen S. Rout).
I have just put together a version 0.7 which give the option to use mock to build the rpm. See R2rpm for the usage.
Feel free to poke me if it doesn't work for you.
Thanks for testing,
Pierre
On Saturday 27 March 2010 14:30:12 Pierre-Yves wrote:
I have just put together a version 0.7 which give the option to use mock to build the rpm. See R2rpm for the usage.
Feel free to poke me if it doesn't work for you.
Nice work, I am testing it now and it has really improved a lot. :-)
I use the attached patch to get the %{name} translation right.
I notice that when searching the package (passed with -p) the repository is ignored if passed.
R2rpm --cran -p mAr
will ignore the --cran argument and test first bioconductor. As I said this is a really small detail.
The important thing to notice though is that the above example works. :-) :-D
Thanks for testing,
Pierre
On Tue, 2010-04-06 at 16:18 +0100, José Matos wrote:
On Saturday 27 March 2010 14:30:12 Pierre-Yves wrote:
I have just put together a version 0.7 which give the option to use mock to build the rpm. See R2rpm for the usage.
Feel free to poke me if it doesn't work for you.
Nice work, I am testing it now and it has really improved a lot. :-)
I use the attached patch to get the %{name} translation right.
Thanks, I will look into this :)
I notice that when searching the package (passed with -p) the repository is ignored if passed.
R2rpm --cran -p mAr
will ignore the --cran argument and test first bioconductor.
It tests all the repo set (so bioconductor (*3), cran and r-forge) and stops at the first positive hit.
As I said this is a really small detail.
It is, but potentially annoying, especially if one package is present in more than one repository (and with different version), which is the case. It will then stop at the first positive match and won't look further. So potentially, it might be annoying, I'll try to fix this.
Good to hear that you like it !
Thanks for all,
Pierre
On Tuesday 06 April 2010 21:48:36 Pierre-Yves wrote:
Nice work, I am testing it now and it has really improved a lot. :-)
I use the attached patch to get the %{name} translation right.
Thanks, I will look into this :)
FWIW it would be nice to have the packname (or the spec name for that matter) earlier, as soon as possible. If we had that all those extra lines would go away. I tried to play a bit with it but failed.
Then the code could be reduced to:
dirname = Popen(["rpm", "-E", '%' + tag], stdout=PIPE).stdout.read()[:-1] return dirname.replace("%{name}", self.packname).replace("%name", self.packname)
(Yes, I am abusing code brevity, but you get an idea). :-)
r-devel@lists.fedoraproject.org