FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 01-07-2009, 03:54 PM
"Yaakov Nemoy"
 
Default Update guidelines for using darcs based sources in packages

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
--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 01-07-2009, 06:09 PM
Toshio Kuratomi
 
Default Update guidelines for using darcs based sources in packages

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

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 01-09-2009, 09:56 AM
Till Maas
 
Default Update guidelines for using darcs based sources in packages

On Wed January 7 2009, Yaakov Nemoy wrote:
> 2009/1/7 Toshio Kuratomi <a.badger@gmail.com>:

> > 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?
>
> 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
--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 

Thread Tools




All times are GMT. The time now is 08:08 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org