[opensuse-packaging] RFC: Banning system library paths from .pc files
https://bugzilla.novell.com/show_bug.cgi?id=529921 shows why encoding system library paths like /usr/lib and /usr/lib64 in pkgconfig files is a very bad idea indeed. I'd propose to add a brp script that checks for -L%{libdir} in .pc files and fails the package if found. That way maintainers of a package that comes with .pc files would be forced to fix their packages. I'd even volunteer to write said brp script. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 8/11/2009 at 13:47, Philipp Thomas
wrote: https://bugzilla.novell.com/show_bug.cgi?id=529921 shows why encoding system library paths like /usr/lib and /usr/lib64 in pkgconfig files is a very bad idea indeed. I'd propose to add a brp script that checks for -L%{libdir} in .pc files and fails the package if found. That way maintainers of a package that comes with .pc files would be forced to fix their packages. I'd even volunteer to write said brp script.
Philipp, I like the idea of a brp check failing on this. It's the only way to get it consistent and to be sure maintainers actually see it / think about it. Do we have an estimate on how many packages are going to fail if we implement this? (the bug report actually reads the *-config scripts as well besides checking the *.pc files, this would probably be needed too in the same check). Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, On Tue, 11 Aug 2009, Philipp Thomas wrote:
https://bugzilla.novell.com/show_bug.cgi?id=529921 shows why encoding system library paths like /usr/lib and /usr/lib64 in pkgconfig files is a very bad idea indeed.
Indeed, it always was.
I'd propose to add a brp script that checks for -L%{libdir} in .pc files and fails the package if found. That way maintainers of a package that comes with .pc files would be forced to fix their packages. I'd even volunteer to write said brp script.
Didn't we once have something similar for .la files? In any case, a more forgiving alternative would be a postprocessing of all installed .pc files that simply would remove those -L arguments (with a warning), instead of failing the package build. I have no preference either way, but _something_ should indeed be done. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le mardi 11 août 2009, à 13:47 +0200, Philipp Thomas a écrit :
https://bugzilla.novell.com/show_bug.cgi?id=529921 shows why encoding system library paths like /usr/lib and /usr/lib64 in pkgconfig files is a very bad idea indeed.
(didn't look at the bug, I'll just trust you here)
I'd propose to add a brp script that checks for -L%{libdir} in .pc files and fails the package if found. That way maintainers of a package that comes with .pc files would be forced to fix their packages. I'd even volunteer to write said brp script.
This means that nearly all pkg-config files must be changed (basically, if I look at what I have on my system)? So, hrm, I'd like to avoid this, please :-) Would be better to file bugs upstream for all libraries shipping a pkg-config file first. And then do this in the next development cycle. Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Vincent Untz (vuntz@opensuse.org) [20090811 13:56]:
Would be better to file bugs upstream for all libraries shipping a pkg-config file first.
That way some packages will never get changed. But what about a compromise? We get automatic filtering and a warning and for 12.0 or 12.1 that warning turns into an error. That way there would be ample time to get it fixed upstream beforte forcing the packager to fix the package (or add a line to a rpmlintrc :). Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Dienstag 11 August 2009 schrieb Philipp Thomas:
https://bugzilla.novell.com/show_bug.cgi?id=529921 shows why encoding system library paths like /usr/lib and /usr/lib64 in pkgconfig files is a very bad idea indeed.
I'd propose to add a brp script that checks for -L%{libdir} in .pc files and fails the package if found. That way maintainers of a package that comes with .pc files would be forced to fix their packages. I'd even volunteer to write said brp script.
Why has the package to be changed? Wouldn't it be enough if said brp script simply patches the paths out? Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Stephan Kulow (coolo@suse.de) [20090811 14:01]:
Why has the package to be changed?
IMNSHO because it's stupid to do so in the first place and should be eliminated disregarding the distribution.
Wouldn't it be enough if said brp script simply patches the paths out?
Like I wroto in my answer to Vincent, I'd propose filtering and warning and then error in 12.0/12.1 . Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tue, 11 Aug 2009, Philipp Thomas wrote:
https://bugzilla.novell.com/show_bug.cgi?id=529921 shows why encoding system library paths like /usr/lib and /usr/lib64 in pkgconfig files is a very bad idea indeed.
Indeed.
I'd propose to add a brp script that checks for -L%{libdir} in .pc files and fails the package if found. That way maintainers of a package that comes with .pc files would be forced to fix their packages. I'd even volunteer to write said brp script.
These days we would do this as part of rpmlint I guess. But thanks for volunteering. Richard. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tuesday 11 August 2009, Philipp Thomas wrote:
I'd propose to add a brp script that checks for -L%{libdir} in .pc files and fails the package if found. That way maintainers of a package that comes with .pc files would be forced to fix their packages. I'd even volunteer to write said brp script.
Please write a rpmlint check for this. Greetings, Dirk -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Dirk Müller (dmueller@suse.de) [20090811 15:42]:
Please write a rpmlint check for this.
For the warning/error I'll do that, but I suppose filtering would have to be done in a brp script, wouldn't it? Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (7)
-
Dirk Müller
-
Dominique Leuenberger
-
Michael Matz
-
Philipp Thomas
-
Richard Guenther
-
Stephan Kulow
-
Vincent Untz