Hi List,
(Packaging list, i'm double posting because i want you guys to see this, but please put further comments on the haskell list :) )
Because the macros, last i checked were for ghc 6.10.1, some of the packages i'm still working on will only compile from darcs. I've put together a tool to help with development of packages from darcs, and i'm looking for a standardized way to note which revision from darcs is being used. Darcs has two relatively canonical ways to refer to a package, with a hash and a timestamp. Internally this tool uses both. Judging from the different ways people note svn/git/other usage in fedora packages, i've put together a few recommendations that we can use for a standard.
Keep in mind, my goal is to support darcs, so please be nitpicky about these details. Just keep in mind, this is easily bikesheddable, and all i want to do is support darcs based packages systematically.
Normal Haskell Tarball name: %{hackage_name}-%{version}.tar.gz Output from darcs: %{hackage_name}-%{version}.%{timestamp_from_darcs}darcs.tar.gz
Accesible from: darcs dist -d %{hackage_name}-%{version}.%{timestamp_from_darcs}darcs Timestamp accessible from darcs changes --xml-output --last=1
To note this in the rpm Normal Dist: 1%{?dist} Darcs Dist 1.%{timestamp_from_darcs}darcs%{?dist}
I've attached a patch to the templates that puts in a placeholder to make it clearer how to do things. Note that in the timestamp i've added . and darcs systematically. Since the macro %dist includes the . prefix, as a matter of precedent, i've noted that we should just use the prefix and suffix in the %darcs macro as well.
Also, the names of everything here is not so important. What's important is that i want to take a spec file that's been generated by cabal2spec, run it through a quick sed-like script that will append the correct darcs timestamp. Darcs doesn't make the timestamps that easily available, and i'm trying to automate a few things here.
Cheers, Yaakov
Yaakov Nemoy wrote:
Hi List,
(Packaging list, i'm double posting because i want you guys to see this, but please put further comments on the haskell list :) )
Not subscribed to the haskell list and this isn't really a haskell specific question....
Because the macros, last i checked were for ghc 6.10.1, some of the packages i'm still working on will only compile from darcs. I've put together a tool to help with development of packages from darcs, and i'm looking for a standardized way to note which revision from darcs is being used. Darcs has two relatively canonical ways to refer to a package, with a hash and a timestamp. Internally this tool uses both. Judging from the different ways people note svn/git/other usage in fedora packages, i've put together a few recommendations that we can use for a standard.
Keep in mind, my goal is to support darcs, so please be nitpicky about these details. Just keep in mind, this is easily bikesheddable, and all i want to do is support darcs based packages systematically.
Normal Haskell Tarball name: %{hackage_name}-%{version}.tar.gz Output from darcs: %{hackage_name}-%{version}.%{timestamp_from_darcs}darcs.tar.gz
Accesible from: darcs dist -d %{hackage_name}-%{version}.%{timestamp_from_darcs}darcs Timestamp accessible from darcs changes --xml-output --last=1
To note this in the rpm Normal Dist: 1%{?dist} Darcs Dist 1.%{timestamp_from_darcs}darcs%{?dist}
I've attached a patch to the templates that puts in a placeholder to make it clearer how to do things. Note that in the timestamp i've added . and darcs systematically. Since the macro %dist includes the . prefix, as a matter of precedent, i've noted that we should just use the prefix and suffix in the %darcs macro as well.
Also, the names of everything here is not so important. What's important is that i want to take a spec file that's been generated by cabal2spec, run it through a quick sed-like script that will append the correct darcs timestamp. Darcs doesn't make the timestamps that easily available, and i'm trying to automate a few things here.
Four comments:
1) Why do we need to add this to the templates? All packages could potentially be built from snapshots or built from releases. So I don't see why the Haskell templates should be special.
2) %darcs doesn't seem to be a good choice for macro name if it's intended for use in the Haskell Guidelines. Perhaps this shouldn't be part of the the Haskell Guidelines?
3) The patch has two wrong Release lines, %{?darcs} should come before %{?dist} but two of the patch hunks place it after.
4) Why not use a datetime string like the guidelines currently have in place? You could use something like: DATESTAMP=date -u +'%Y%m%d' -d @`darcs-get-timestamp` sed "s/%define darcs ""/%define darcs "$DATESTAMP"/" -i foo.spec
-Toshio
2009/1/7 Toshio Kuratomi a.badger@gmail.com:
Yaakov Nemoy wrote:
Hi List,
(Packaging list, i'm double posting because i want you guys to see this, but please put further comments on the haskell list :) )
Not subscribed to the haskell list and this isn't really a haskell specific question....
Point taken, continuing discussion here. CC'ing haskell list though.
Four comments:
- Why do we need to add this to the templates? All packages could
potentially be built from snapshots or built from releases. So I don't see why the Haskell templates should be special.
It's a special exception in this case. Many current releases of packages won't build under the ghc in rawhide. The tool i'm composing will make it very easy to track darcs and then switch to a final release once it's made.
- %darcs doesn't seem to be a good choice for macro name if it's
intended for use in the Haskell Guidelines. Perhaps this shouldn't be part of the the Haskell Guidelines?
Like i said before, please rename it. %darcs is a temporary name only, and i was looking for comments and suggestions. Would %darcs_timestamp be acceptable?
- The patch has two wrong Release lines, %{?darcs} should come before
%{?dist} but two of the patch hunks place it after.
I'll send an updated patch, though you have made some good points to abandon this strategy.
- Why not use a datetime string like the guidelines currently have in
place? You could use something like: DATESTAMP=date -u +'%Y%m%d' -d @`darcs-get-timestamp` sed "s/%define darcs ""/%define darcs "$DATESTAMP"/" -i foo.spec
This would be nice for inserting the proper defines. Actually, since this is python, i could probably script in a '-D' parameter to rpmbuild and mock as well. The tricky part is that there are three lines that also need to be edited, not just the %define line in the spec file. I have a couple of choices here:
1) Have fedora-devshell do something a bit weird and non-standard, that will leave a macro that may or may not make sense in the final submission to Fedora 2) Standardize a macro for those three lines, so that when i use #1, package reviewers and co-maintainers won't scratch their heads wondering what fedora-devshell is doing.
Given #2, that's what i'm asking for.
On Wed January 7 2009, Yaakov Nemoy wrote:
2009/1/7 Toshio Kuratomi a.badger@gmail.com:
- %darcs doesn't seem to be a good choice for macro name if it's
intended for use in the Haskell Guidelines. Perhaps this shouldn't be part of the the Haskell Guidelines?
Like i said before, please rename it. %darcs is a temporary name only, and i was looking for comments and suggestions. Would %darcs_timestamp be acceptable?
The current Naming Guidelines[0] use %{alphatag} for this value.
Regards, Till
[0] https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Snapshot_packages
2009/1/9 Till Maas opensource@till.name:
On Wed January 7 2009, Yaakov Nemoy wrote:
2009/1/7 Toshio Kuratomi a.badger@gmail.com:
- %darcs doesn't seem to be a good choice for macro name if it's
intended for use in the Haskell Guidelines. Perhaps this shouldn't be part of the the Haskell Guidelines?
Like i said before, please rename it. %darcs is a temporary name only, and i was looking for comments and suggestions. Would %darcs_timestamp be acceptable?
The current Naming Guidelines[0] use %{alphatag} for this value.
Regards, Till
[0] https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Snapshot_packages
Works for me :), thanks.
packaging@lists.fedoraproject.org