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

8 messages from 2005-05-02 to 2005-09-18. Participants: Horst von Brand, Paul Jakma, Chris Wright.
Thread: https://gitlist.dev/t/443

## Horst von Brand, 2005-05-02 18:58

Subject: Re: [PATCH] add git.spec and adapt Makefile for RPM build
Message-ID: <200505021858.j42Iw4M1029427@laptop11.inf.utfsm.cl>
URL: https://gitlist.dev/e/200505021858.j42Iw4M1029427%40laptop11.inf.utfsm.cl
In-Reply-To: <chrisw@osdl.org>

```
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, 2005-05-02 19:06

Subject: Re: [PATCH] add git.spec and adapt Makefile for RPM build
Message-ID: <Pine.LNX.4.62.0505022005200.14200@sheen.jakma.org>
URL: https://gitlist.dev/e/Pine.LNX.4.62.0505022005200.14200%40sheen.jakma.org
In-Reply-To: <200505021858.j42Iw4M1029427@laptop11.inf.utfsm.cl>

```
On Mon, 2 May 2005, Horst von Brand wrote:

> 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

```

## Chris Wright, 2005-05-02 19:08

Subject: Re: [PATCH] add git.spec and adapt Makefile for RPM build
Message-ID: <20050502190852.GH18917@shell0.pdx.osdl.net>
URL: https://gitlist.dev/e/20050502190852.GH18917%40shell0.pdx.osdl.net
In-Reply-To: <200505021858.j42Iw4M1029427@laptop11.inf.utfsm.cl>

```
* Horst von Brand (vonbrand@inf.utfsm.cl) wrote:
> 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.

> 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

```

## Paul Jakma, 2005-05-02 19:13

Subject: Re: [PATCH] add git.spec and adapt Makefile for RPM build
Message-ID: <Pine.LNX.4.62.0505022012240.14200@sheen.jakma.org>
URL: https://gitlist.dev/e/Pine.LNX.4.62.0505022012240.14200%40sheen.jakma.org
In-Reply-To: <Pine.LNX.4.62.0505022005200.14200@sheen.jakma.org>

```
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

```

## Horst von Brand, 2005-05-04 01:00

Subject: Re: [PATCH 0/3] cogito spec file updates
Message-ID: <200505040100.j4410DYJ004595@laptop11.inf.utfsm.cl>
URL: https://gitlist.dev/e/200505040100.j4410DYJ004595%40laptop11.inf.utfsm.cl
In-Reply-To: <chrisw@osdl.org>

```
Chris Wright <chrisw@osdl.org> said:
> * 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, 2005-09-16 19:44

Subject: Re: [PATCH] Update cogito.spec.in
Message-ID: <200509161944.j8GJijY3019186@inti.inf.utfsm.cl>
URL: https://gitlist.dev/e/200509161944.j8GJijY3019186%40inti.inf.utfsm.cl
In-Reply-To: <chrisw@osdl.org>

```
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...

[...]

> > > -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, 2005-09-16 20:19

Subject: [PATCH] Update cogito.spec.in
Message-ID: <20050916201901.GF7762@shell0.pdx.osdl.net>
URL: https://gitlist.dev/e/20050916201901.GF7762%40shell0.pdx.osdl.net
In-Reply-To: <200509161944.j8GJijY3019186@inti.inf.utfsm.cl>

```
* 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
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, 2005-09-18 17:32

Subject: [PATCH] cogito: Fix rpm build for 64bit platforms
Message-ID: <20050918173229.GR7762@shell0.pdx.osdl.net>
URL: https://gitlist.dev/e/20050918173229.GR7762%40shell0.pdx.osdl.net
In-Reply-To: <20050917214807.GA3590@pasky.or.cz>

```
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(-)

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
 

```
