Ticket #371 (closed patch: done)

Opened 6 years ago

Last modified 6 years ago

patch to auto-generate parrot.spec

Reported by: gerd Owned by:
Priority: major Milestone:
Component: configure Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: rejected Platform: unix

Description

This patch is for auto-generate the file "parrot.spec" during configuration with "perl Configure.pl".

This has two advantages:

- It is possible to run 'make rpms' under a svn checked out repository - It is not necessary to change the version number for parrot.spec during creating a new release

By a svn repository the rpms and tar-file get version numbers like: 0.9.1_devel_r36966 For example: parrot-0.9.1_devel_r36966-1.fc7.src.rpm

By a release the created rpms and tar-file get a version number like: 0.9.1

I tested the patch on my system and it is working fine. Ticket #270 is obsolete with this patch.

Gerd Pokorra

Attachments

gen_spec.patch Download (4.1 KB) - added by gerd 6 years ago.
missing_files.tar.gz Download (3.1 KB) - added by gerd 6 years ago.
Sorry, first the missing files. I thought the diff-command would add the new files.

Change History

Changed 6 years ago by gerd

Changed 6 years ago by gerd

P.S. The patch is generated with the command:

diff -ur --exclude='.svn' parrot parrot.new > gen_spec.patch

Changed 6 years ago by wayland

Can you still download the .tgz file and run rpmbuild -ta parrot.version.tgz and have it work?

Changed 6 years ago by wayland

After looking at the patch, I'd have to say the answer to my question above is no. I recommend that this patch not be applied until we have something equivalent to "make dist", and then run it in that.

For those not familiar with "make dist", the process goes something like this:

1. Extract files from svn 2. Run "make dist" 3. Generate release tarball after running "make dist" 4. User downloads, and runs various commands to build the thing

My understanding is that step 2 currently does not exist. I approve of the idea of an auto-generated spec file, but believe it belongs in the "make dist" step.

Changed 6 years ago by wayland

Another crucial problem with this patch; the updates to the MANIFEST indicate that config/gen/parrot_spec.pm and config/gen/parrot_spec/parrot_spec.in have been added, but these files do not appear in the patch. I suspect an error in the patch generation process.

Changed 6 years ago by gerd

Sorry, first the missing files. I thought the diff-command would add the new files.

Changed 6 years ago by gerd

Hello,

with an auto-generated spec file this commands can be executed:

perl Configure.pl

make release

rpmbuild -ta parrot-<version>.tar.gz

or

perl Configure.pl

make rpms

or

perl Configure.pl

rpmbuild -ba parrot.spec

To download .tar.gz und to run direkt "rpmbuild -ta parrot-<version>.tar.gz" without a configure of course is not possible. It can be possible with a tricky spec file that have a pseudo version number that run:

perl Configure.pl; make rpms

and will be overwritten by the configure.

Gerd Pokorra

Changed 6 years ago by wayland

You say "To download .tar.gz und to run direkt "rpmbuild -ta parrot-<version>.tar.gz" without a configure of course is not possible.". I should point out that that's what I want for Parrot.

I should also point out that the Parrot release documentation actually specifies this, now that I look, but they call it "make release". Specifically, they say:

make release VERSION=a.b.c

If you can make this auto-generate process work with "make release", instead of Configure.pl, then I'm happy with it.

Changed 6 years ago by gerd

This is like the story from the chicken and the egg. You can not having a make target bevor running "perl Configure.pl", because the MAKEFILE is also auto-generated. I you are contrary to configure first, then you must use a build manner which does it implicit.

Changed 6 years ago by coke

I think there is some confusion here as to whether the OP is trying to build parrot (Config && make) or build a distribution that can be used to build parrot (make release) -- but even our distribution process requires us to Config parrot first in order to generate the top level makefile.

Since this target requires shell and perl (and not parrot), it would be possible (desirable) to make this available without having to do a config to get it. (And make it all perl at that point, to improve portability.)

OP, is this on track with what you're suggesting?

Changed 6 years ago by allison

The whole point of 'make release' is to build an actual, shipped release tarball. It does some things (like stripping the DEVELOPING file), that don't make any sense at all for a special "non-release" rpm.

Generating the parrot.spec file is fine (we generate the debian control file), but it shouldn't be done as part of Parrot's configure process. It looks like all you're extracting from Parrot's config is the VERSION, which can just as well be extracted from the VERSION file and substituted with sed (which is what debian's control file is doing). But, keep in mind that there are some things (like Source0) that have to be manually edited for various releases anyway, so you may not be gaining anything.

The parrot.spec file needs to change for 1.0, because the 'make languages' target doesn't exist any more.

And, I also suggest removing the 'make rpms' target from Parrot's main makefile entirely, because the person building the RPMs will almost never be the release manager, and the rpms should be built from the official tarball, not from a "reconstructed" tarball. Instead, add a ports/rpm directory, and put parrot.spec (or parrot.spec.in), a simple Makefile for building rpms, and any other RPM-related files in there.

Changed 6 years ago by wayland

Hi all. I've been told that we like separate issues for separate sets of changes, so I created issue #503 to make the parrot.spec file more cross-platform.

My plan after that is to submit a patch of the changes necessary to make it work with Rakudo.

After those two are done, I'm planning to come back to this issue and work on it as Allison has recommended.

Changed 6 years ago by allison

  • status changed from new to closed
  • resolution set to done
  • patch set to rejected

Most of this was resolved in TT #503, including removing the 'make rpms' target. I just removed the usage information for 'make rpms' in r38806. Closing ticket.

Note: See TracTickets for help on using tickets.