threads / patch / 443

patchRe: [PATCH] add git.spec and adapt Makefile for RPM build

Subject: Re: [PATCH] add git.spec and adapt Makefile for RPM build

## tl;dr

8 messages between May 2, 2005 and Sep 18, 2005. Diffs are folded; open one to read it.

replies: 7people: 3as markdown or json

Horst von Brand· May 2, 2005, 18:58 UTC · lore
Chris Wright <chrisw@osdl.org> said:
> * Horst von Brand (vonbrand@inf.utfsm.cl) wrote:
> > Kay Sievers <kay.sievers@vrfy.org> said:
> > > On Mon, May 02, 2005 at 12:23:03PM +0200, Kay Sievers wrote:
> > > This version creates the git.spec from a git.spec.in with the version
> > > number from the Makefile.
> > Please don't. The spec file /controls/ the building of the package, it
> > can't be generated as part of the build process.
> It certainly can.
Yep. Maybe "can't" was a bit too strong. "Should never be" is right.
>                   It simply means a structured release process.  IOW,
> the git.spec would be generated for a release tarball.

Come on, you have to fix the spec file for the changelog and version by hand anyway, autoconfiscating it doesn't help one iota there.

And yes, I've seen quite a few packages autogenerating the spec file. As a result, you /can't/ build the package from pristine sources, you have to unpack and configure to get enough for building. For me that just isn't acceptable, as it completely misses the point of RPM.

(You can go "rpmbuild -ta whatever-2.3.1.tar.bz2" if the tarball is set up correctly, your idea prevents that).

-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
Paul Jakma· May 2, 2005, 19:06 UTC · re: Horst von Brand · lore
On Mon, 2 May 2005, Horst von Brand wrote:
Show 5 quoted lines
> And yes, I've seen quite a few packages autogenerating the spec 
> file. As a result, you /can't/ build the package from pristine 
> sources, you have to unpack and configure to get enough for 
> building. For me that just isn't acceptable, as it completely 
> misses the point of RPM.

I think maybe you're missing the point of what is sometimes known as a 'make dist' target. (eg in autoconf type build systems).

> (You can go "rpmbuild -ta whatever-2.3.1.tar.bz2" if the tarball is set up
> correctly, your idea prevents that).

Then the tarball wasn't of distributable (ie end-user buildable) source.

regards,
-- 
Paul Jakma	paul@clubi.ie	paul@jakma.org	Key ID: 64A2FF6A
Fortune:
"Now this is a totally brain damaged algorithm.  Gag me with a smurfette."
 		-- P. Buhr, Computer Science 354
Paul Jakma· May 2, 2005, 19:13 UTC · re: Paul Jakma · lore
On Mon, 2 May 2005, Paul Jakma wrote:
> I think maybe you're missing the point of what is sometimes known as a 'make 
> dist' target. (eg in autoconf type build systems).
Apologies: /Or/ the project which provided such a tarball missed the 
point.
regards,
-- 
Paul Jakma	paul@clubi.ie	paul@jakma.org	Key ID: 64A2FF6A
Fortune:
"MacDonald has the gift on compressing the largest amount of words into
the smallest amount of thoughts."
 		-- Winston Churchill
Chris Wright· May 2, 2005, 19:08 UTC · re: Horst von Brand · lore
* Horst von Brand (vonbrand@inf.utfsm.cl) wrote:
Show 6 quoted lines
> Chris Wright <chrisw@osdl.org> said:
> >                   It simply means a structured release process.  IOW,
> > the git.spec would be generated for a release tarball.
> 
> Come on, you have to fix the spec file for the changelog and version by
> hand anyway, autoconfiscating it doesn't help one iota there.
That's the point, you don't _have_ to do that.
Show 7 quoted lines
> And yes, I've seen quite a few packages autogenerating the spec file. As a
> result, you /can't/ build the package from pristine sources, you have to
> unpack and configure to get enough for building. For me that just isn't
> acceptable, as it completely misses the point of RPM.
> 
> (You can go "rpmbuild -ta whatever-2.3.1.tar.bz2" if the tarball is set up
> correctly, your idea prevents that).

You just place the generated spec file in a release tarball. IOW, your 'release' Makefile target depends on foo.spec, and creates a clean release tarball with all you need to do an -ta build.

thanks, -chris

Horst von Brand· May 4, 2005, 01:00 UTC · lore

Re: [PATCH 0/3] cogito spec file updates

Chris Wright <chrisw@osdl.org> said:
Show 10 quoted lines
> * Chris Wright (chrisw@osdl.org) wrote:
> > Here's the outstanding updates for the spec file, up to 0.8-2 which is
> > the latest on kernel.org.
> > 
> > 	http://www.kernel.org/pub/software/scm/cogito/RPMS/
> 
> What's your method for creating a release tarball?  If it were formalized
> (i.e. Makefile rule), then it'd be simple to use VERSION to drive the
> spec file, and it'd only need updating for real content changes (similar
> to what Kay did).

In each case you should add a Changelog entry to the spec file. Said entry will probably mention the version anyway. Updating the version by hand while at it is no big deal, now is it? Probably even less hassle than doing it automatically.

-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
Horst von Brand· Sep 16, 2005, 19:44 UTC · lore

Re: [PATCH] Update cogito.spec.in

Chris Wright <chrisw@osdl.org> wrote:
> * Petr Baudis (pasky@suse.cz) wrote:
> > Dear diary, on Fri, Sep 16, 2005 at 08:47:24AM CEST, I got a letter
> > where Chris Wright <chrisw@osdl.org> told me that...
[...]
Show 6 quoted lines
> > > -BuildRoot:	%{_tmppath}/%{name}-%{version}-root
> > > -Prereq: 	sh-utils, diffutils, rsync, rcs, mktemp >= 1.5, git-core >= 0.99.3
> > > -BuildArchitectures:	noarch
> > > +BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
> > > +Requires: 	git-core >= 0.99.3
> > > +BuildArch:	noarch
> > Why did you remove all the stuff from Requires? They actually are ending
> > up adding even trivial stuff like less to it in GIT.
> Primary reason is it now requires git, which has those prereqs.
It might be useful to say so in a comment.
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
Chris Wright· Sep 16, 2005, 20:19 UTC · re: Horst von Brand · lore

[PATCH] Update cogito.spec.in

* Horst von Brand (vonbrand@inf.utfsm.cl) wrote:
> It might be useful to say so in a comment.
Fair point.

thanks, -chris --

Update cogito.spec.in from feedback given during Fedora Extras review.
- update Buildroot to be more specific
- reduce Requires to git-core only (which must already satisfy the other reqs)
- drop Vendor
- use %{_libdir} macro
Signed-off-by: Chris Wright <chrisw@osdl.org>
---
 cogito.spec.in |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
e0ca49e6c375a68b3e4b3edfff752fef2cf585f6
Show changes to cogito.spec.in +12 −6
diff --git a/cogito.spec.in b/cogito.spec.in
--- a/cogito.spec.in
+++ b/cogito.spec.in
@@ -1,15 +1,14 @@
 Name: 		cogito
 Version: 	@@VERSION@@
 Release: 	1
-Vendor: 	Petr Baudis <pasky@suse.cz>
 Summary:  	The Cogito Version Control System
 License: 	GPL
 Group: 		Development/Tools
 URL: 		http://kernel.org/pub/software/scm/cogito/
 Source: 	http://kernel.org/pub/software/scm/cogito/%{name}-%{version}.tar.gz
-BuildRoot:	%{_tmppath}/%{name}-%{version}-root
-Prereq: 	sh-utils, diffutils, rsync, rcs, mktemp >= 1.5, git-core >= 0.99.3
-BuildArchitectures:	noarch
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: 	git-core >= 0.99.3
+BuildArch:	noarch
 
 %description
 Cogito is a version control system layered on top of the git tree history
@@ -34,11 +33,18 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root)
 %{_bindir}/*
-%dir /usr/lib/cogito
-/usr/lib/cogito/*
+%dir %{_libdir}/cogito
+%{_libdir}/cogito/*
 %doc README COPYING Documentation/*
 
 %changelog
+* Thu Sep 15 2005 Chris Wright <chrisw@osdl.org> 0.14.1-1
+- Update to 0.14.1
+
+* Mon Aug 15 2005 Chris Wright <chrisw@osdl.org> 0.13-3
+- Update Buildroot, Requires and drop Vendor
+- use %{_libdir}
+
 * Wed Aug 10 2005 Pavel Roskin <proski@gnu.org> 0.13-1
 - Update summary and description
 - Make architecture-independent
Chris Wright· Sep 18, 2005, 17:32 UTC · lore

[PATCH] cogito: Fix rpm build for 64bit platforms

When building last update on 64bit machine, I realized the _libdir change breaks the rpm build there. This fixes up the issue by ensuring the libdir %install target is same as %files target.

Signed-off-by: Chris Wright <chrisw@osdl.org>
---
 cogito.spec.in |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)
Show changes to cogito.spec.in +4 −1
diff --git a/cogito.spec.in b/cogito.spec.in
--- a/cogito.spec.in
+++ b/cogito.spec.in
@@ -25,7 +25,7 @@ make
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install
+make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} libdir=%{_libdir}/cogito install
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -38,6 +38,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc README COPYING Documentation/*
 
 %changelog
+* Fri Sep 16 2005 Chris Wright <chrisw@osdl.org> 0.14.1-2
+- fix _libdir breakage on 64-bit, the irony...
+
 * Thu Sep 15 2005 Chris Wright <chrisw@osdl.org> 0.14.1-1
 - Update to 0.14.1
 

← back to recent threads