[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: New package: icmpdn



On Tue, 28 Jun 2005 20:55:45 +0200, Fredrik Tolf wrote:

> > At Fedora Extras, both Vendor and Packager tag are left empty in the
> > spec file. Vendor information could be filled in by the build system.
> 
> That makes perfect sense. However, it would be kind of good to have them
> filled in when I build the packages that I put on the homepage as well.
> I did notice in the Wiki link that Ville Skyttä sent that I could do
> something a filed called ~/.rpmmacros for that. I googled around a bit
> for it, but could find nothing about that particular bit. Does anyone
> have a link with info on this?
> 
> Am I, by any chance, just supposed to put "%packager MyName" in there
> and be done with it?

Yes. %packager, and %vendor not to be confused with the private %_vendor
 
> > You can override %configure's defaults like this:
> > 
> >   %configure --libdir=%{_lib}
> >[...]
> > Typo. Make it:
> > 
> >     %configure --libdir=/%{_lib}
> > 
> > Note that on 64-bit multilib systems, the NSS modules are located
> > in /lib64, not /lib.
> 
> Does that mean that %{_lib} expands to only lib or lib64, and
> not /usr/lib or anything of the kind?

%_libdir expands to either /usr/lib or /usr/lib64
%_lib expands to either lib or lib64
 
> Well, now that I know what the %changelog section is, I'll do that. Is
> there any particular formatting that you prefer the %changelog section
> to comply to? Right now, I wrote in the kind of formatting that Emacs'
> VC mode generates with C-x v a.

Hmm, with Emacs' rpm-spec-mode and rpm-add-change-log-entry, I've never
used a format used by %99 of the other packagers. Like:

* Tue Jun 28 2005 Michael Schwendt <mschwendt users sf net>
- blubb
- blibb
- blobb
 
> I didn't even know that it was possible to build RPMs not being root.
> That was very good to know. If you don't mind me asking, though: Why is
> that rm -rf command there at all? Isn't that the kind of thing that
> rpmbuild ought to take care of itself?

For normal builds, yes, it _could_ do that. rpmbuild is feature-rich,
though, in some parts, and e.g. can be told which spec file sections to
process (aka --short-circuit builds). Also, there used to be times, when a
buildroot was optional. And as the implementation is nowadays, cleaning up
the buildroot needs to be done explicitly.

> but I still don't know what this "PreReq" thingie is.
> Is it a tag in the same sense as Source0?

It's similar to "Requires:" and historically meant to imply that
a dependency must be present before (="pre") your package would be
installed. Only true RPM wizards, who hang out on rpm-list, could
tell you, whether nowadays "PreReq:" is any different from "Requires:"
or "Requires(pre):".

Note, that when you do

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

You get an automatic dependency on /sbin/ldconfig and need not add any
such Requires or Prereq yourself.

Flag "-p /bin/something" means to make /bin/something the scriptlet
interpreter instead of /bin/sh, and hence a dependency on /bin/something
will be automatic.

> > Explicit %attr is redundant if the file was installed into build
> > root with proper permissions, which don't interfere with the %defattr
> > default attributes.
> 
> So does that mean that I should remove the %attr:s again? Well, at least
> for now, I did. For reference, the guy who originally wrote the specfile
> set %defattr to this:
> 
> %defattr(-,root,root)

List your binary rpms:  rpm -qlvp filename.rpm | less

There are alternative ways to list package contents, but this is
the most obvious.

> Again, thanks for all your comments. I'll attach the version of the
> specfile.in as it looks right now, so that you can see whether I made
> all the changes correctly.
> 
> Fredrik Tolf
> 
> 

Well, I haven't had this on my todo list and hence have not examined the
package, but I think it might take a few more small steps to get it
prepared. Some things have been mentioned already (e.g. using %configure,
/%_lib ...).

Or: Since %{_sysconfdir}/init.d is a soft-link with Fedora Core, not a
directory, please use %{_sysconfdir}/rc.d/init.d/ or %{_initrddir}/init.d/
instead. Minor issue in Extras, would be a bigger one in Core.


-- 
Michael Schwendt <mschwendt users sf net>
Fedora Core release 4 (Stentz) - Linux 2.6.11-1.1369_FC4
loadavg: 1.24 1.33 1.91


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]