When to use a leading underscore?
by Björn Persson
As maintainer of fedora-gnat-project-common I sometimes work on RPM macros for
use in Ada packages. Every time I define a new macro I have trouble deciding
whether its name should begin with an underscore or not. I know that there is
some technical difference but I've never quite understood what practical
difference it makes.
I've been trying to imitate macros with a similar function, so I defined
_GNAT_project_dir with a leading underscore in analogy with _libdir and
others. Macros containing command line flags for build tools I've defined
without a leading underscore in analogy with optflags, but then there are
_smp_mflags and the hardening macros which have the underscore, and
__global_cflags and __global_ldflags even have two leading underscores.
Could someone explain what difference a leading underscore makes and give some
guidance on when I should use it?
Is a double leading underscore functionally different from a single one, or is
that just some kind of naming convention?
Björn Persson
10 years, 9 months
Location of LICENSE and README file
by Miroslav Suchý
Hi,
I packaged dozen of packages and I'm used to put LICENSE and README
files just as:
%doc README LICENSE
which place these files in:
/usr/share/doc/%{name}-%{version}
Recently I started packaging some rubygems and reviewers pointed [1,2]
me that I should not explicitly move these files to this location and
leave them in %{gem_instdir}.
I do not feel it is correct behaviour.
I ran few statistics on my workstation:
I have 776 file with name LICENSE owned by some rpm package [3].
631 packages have this file in /usr/share/doc/%{name}-%{version} [4]
145 packages have this file in different location [5]
From this number 57 is rubygems packages [6] - out of 94 installed [7]
So it is indeed very common for rubygems to have LICENSE in %{gem_instdir}.
The other packages which have LICENSE in various paths are e.g. firefox:
/usr/lib64/firefox/LICENSE
or libreoffice:
/usr/lib64/libreoffice/LICENSE
or sos:
/usr/share/sos/LICENSE
or kde:
/usr/share/kde4/apps/LICENSES/GPL_V2
I would like to ask: what should be correct location of LICENSE and
README files. Should we standardize it (at least as SHOULD item)? Or
give everyone liberty to put it anywhere he want and just flag it using
%doc?
[1] https://bugzilla.redhat.com/show_bug.cgi?id=847504#c13
[2] https://bugzilla.redhat.com/show_bug.cgi?id=845805#c3
[3] rpm -qal | grep LICENSE | wc -l
[4] rpm -qal |grep LICENSE |grep /usr/share/doc|wc -l
[5] rpm -qal |grep LICENSE |grep -v /usr/share/doc|wc -l
[6] rpm -qal |grep LICENSE |grep -v /usr/share/doc |grep /gems/|wc -l
[7] rpm -qa |grep rubygem- |wc -l
--
Miroslav Suchy
Red Hat Systems Management Engineering
10 years, 9 months
Provides for unversioned so files
by Stanislav Ochotnicky
$ repoquery --provides bind-dyndb-ldap.x86_64 2>/dev/null
bind-dyndb-ldap = 1.1.0-0.14.rc1.fc17
bind-dyndb-ldap(x86-64) = 1.1.0-0.14.rc1.fc17
ldap.so()(64bit) <-------???
$ repoquery --list bind-dyndb-ldap.x86_64 2>/dev/null
/usr/lib64/bind/ldap.so
...
I came upon this when runnning fedora-review on this package. Now I am
wondering: Is this a packaging problem in bind-dyndb-ldap (i.e. it has
provides for private shared unversioned library) or is it OK? The so
file is outside ldpath so that's not an issue.
--
Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Software Engineer - Base Operating Systems Brno
PGP: 7B087241
Red Hat Inc. http://cz.redhat.com
10 years, 9 months
Other people modifying specfiles...
by Darryl L. Pierce
I've a question/issue.
This morning I came into work to find that one of my packages had been
updated by someone other than myself or anybody on my team. Several
changes were made on two branches (F18 and master) without the person so
much as notifying me in advance or even asking me if it was okay.
What is the proper way of handling this? I would much prefer that even
proven packagers just taking it upon themselves to update packages
without at least having the courtesy of notifying the package maintainer
first.
Not a territorial thing, but I would like to at least have some notice
before someone is going to arbitrarily change a package for which I'm
responsible.
--
Darryl L. Pierce <mcpierce(a)gmail.com>
http://mcpierce.multiply.com/
"What do you care what people think, Mr. Feynman?"
10 years, 9 months
Build dependencies
by indent man
Hi,
I'm new to rpm packaging, and a bit confused...
I want to build two rpm packages:
- myapp
- php-pear-foo
Given myapp needs php-pear-foo at build-time, should I build php-pear-foo
first, install it, and then build myapp ?
Is mock supposed to scan spec files and build php-pear-foo before myapp, or
should I deal with build order myself ?
Should I create a local repo, reference it in my mock configuration, and
use it to install php-pear-foo before building myapp ?
Or is there an easier way ?
Any help is welcome :)
Cheers
10 years, 9 months
packaging an axis2-based service
by Andy Grimm
Hi, all. As part of my work packaging Eucalyptus, I need to decide
where to put the "repositories" for a couple of axis2-based services.
Each service runs an apache instance on a special port with a custom
configuration that points to an axis2 repo path. The repo directory
contains an xml config and a few directories:
* lib -- this is just a symlink to the directory where the axis2
shared libraries live (i.e., /usr/lib64)
* modules -- this contains symlinks to axis2 modules which are needed
for this service
* services -- this contains individual web services, each of which
generally consists of a wsdl, an xml config file, and an ELF shared
object
lib and modules aren't a problem, because they just contain symlinks
to files already owned by wso2-axis2 an related packages. My question
is about the "services" directory. Where should it live? The only
precedent in Fedora is condor-aviary, which places the repository
structure in /var/lib/condor/aviary/. This means that there are .so
files living in /var/lib. Is that acceptable? Or should they live
somewhere under %{_libdir} and be symlinked ?
Thanks.
Andy
10 years, 9 months