[arch-general] Referencing $srcdir in PKGBUILD?
Lately my PKGBUILDs result in a warning when building: ==> WARNING: Package contains reference to $srcdir It's a bit confusing, since PKGBUILD(5) has the following to say about $srcdir: srcdir This points to the directory where makepkg extracts or copies all source files. What should I do to get rid of the warning? /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
On Tue, 2010-08-17 at 10:05 +0100, Magnus Therning wrote:
Lately my PKGBUILDs result in a warning when building:
==> WARNING: Package contains reference to $srcdir
It's a bit confusing, since PKGBUILD(5) has the following to say about $srcdir:
srcdir This points to the directory where makepkg extracts or copies all source files.
What should I do to get rid of the warning?
Depends on your package. Somehow your $srcdir of $pkgdir ended up in one of the installed files in your package. Use grep to find references to it (the full path, not the variable name) and find a way to get rid of those. What package are we talking about btw?
On Tue, Aug 17, 2010 at 10:10, Jan de Groot <jan@jgc.homeip.net> wrote:
On Tue, 2010-08-17 at 10:05 +0100, Magnus Therning wrote:
Lately my PKGBUILDs result in a warning when building:
==> WARNING: Package contains reference to $srcdir
It's a bit confusing, since PKGBUILD(5) has the following to say about $srcdir:
srcdir This points to the directory where makepkg extracts or copies all source files.
What should I do to get rid of the warning?
Depends on your package. Somehow your $srcdir of $pkgdir ended up in one of the installed files in your package. Use grep to find references to it (the full path, not the variable name) and find a way to get rid of those.
Ah, so the warning is that something in $pkgdir refers to the value of $srcdir? How does makepkg determine this? "play" is a part of my $srcdir, but magnus@bryma 2520 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn % grep play * magnus@bryma 2521 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn % strings *|grep play magnus@bryma 2521 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn
What package are we talking about btw?
Several, but the one here is ocaml-odn on AUR. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
On 17/08/10 19:28, Magnus Therning wrote:
On Tue, Aug 17, 2010 at 10:10, Jan de Groot<jan@jgc.homeip.net> wrote:
On Tue, 2010-08-17 at 10:05 +0100, Magnus Therning wrote:
Lately my PKGBUILDs result in a warning when building:
==> WARNING: Package contains reference to $srcdir
It's a bit confusing, since PKGBUILD(5) has the following to say about $srcdir:
srcdir This points to the directory where makepkg extracts or copies all source files.
What should I do to get rid of the warning?
Depends on your package. Somehow your $srcdir of $pkgdir ended up in one of the installed files in your package. Use grep to find references to it (the full path, not the variable name) and find a way to get rid of those.
Ah, so the warning is that something in $pkgdir refers to the value of $srcdir?
How does makepkg determine this?
"play" is a part of my $srcdir, but
magnus@bryma 2520 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn % grep play * magnus@bryma 2521 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn % strings *|grep play magnus@bryma 2521 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn
What package are we talking about btw?
Several, but the one here is ocaml-odn on AUR.
makepkg just does something equivalent to: grep -R "$srcdir" $pkgdir
On Tue, Aug 17, 2010 at 10:45, Allan McRae <allan@archlinux.org> wrote:
On 17/08/10 19:28, Magnus Therning wrote:
On Tue, Aug 17, 2010 at 10:10, Jan de Groot<jan@jgc.homeip.net> wrote:
On Tue, 2010-08-17 at 10:05 +0100, Magnus Therning wrote:
Lately my PKGBUILDs result in a warning when building:
==> WARNING: Package contains reference to $srcdir
It's a bit confusing, since PKGBUILD(5) has the following to say about $srcdir:
srcdir This points to the directory where makepkg extracts or copies all source files.
What should I do to get rid of the warning?
Depends on your package. Somehow your $srcdir of $pkgdir ended up in one of the installed files in your package. Use grep to find references to it (the full path, not the variable name) and find a way to get rid of those.
Ah, so the warning is that something in $pkgdir refers to the value of $srcdir?
How does makepkg determine this?
"play" is a part of my $srcdir, but
magnus@bryma 2520 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn % grep play * magnus@bryma 2521 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn % strings *|grep play magnus@bryma 2521 ~/play/arch/ocaml-odn/pkg/usr/lib/ocaml/site-lib/odn
What package are we talking about btw?
Several, but the one here is ocaml-odn on AUR.
makepkg just does something equivalent to: grep -R "$srcdir" $pkgdir
Ah, oki. Then I've found the reason for it as well. Thanks! /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
On 17/08/10 19:05, Magnus Therning wrote:
Lately my PKGBUILDs result in a warning when building:
==> WARNING: Package contains reference to $srcdir
It's a bit confusing, since PKGBUILD(5) has the following to say about $srcdir:
srcdir This points to the directory where makepkg extracts or copies all source files.
What should I do to get rid of the warning?
/M
grep your files in your package for $srcdir (the actual value...). If it is not in a config file or RPATH or the like, you can probably ignore it. Allan
On 17/08/10 10:15, Allan McRae wrote:
On 17/08/10 19:05, Magnus Therning wrote:
Lately my PKGBUILDs result in a warning when building:
==> WARNING: Package contains reference to $srcdir
It's a bit confusing, since PKGBUILD(5) has the following to say about $srcdir:
srcdir This points to the directory where makepkg extracts or copies all source files.
What should I do to get rid of the warning?
/M
grep your files in your package for $srcdir (the actual value...). If it is not in a config file or RPATH or the like, you can probably ignore it.
Allan
Please make sure you are 100% sure it can be ignored though. I've come across cases where symlinks in (e.g in /usr/lib) pointed to the $srcdir which cause confusing problems later on.
Am Tue, 17 Aug 2010 19:15:34 +1000 schrieb Allan McRae <allan@archlinux.org>:
grep your files in your package for $srcdir (the actual value...). If it is not in a config file or RPATH or the like, you can probably ignore it.
I'm not quite sure if this is not a bug in makepkg, because I have this problem with almost all of my packages in AUR since the latest update to pacman 3.4.0. I never got this message before and I haven't changed such elementary parts of the packages. And if I'm right this problem appears with almost every package which I install from AUR. But I need to watch it more narrowly. Heiko
On Tue 17 Aug 2010 12:09 +0200, Heiko Baums wrote:
Am Tue, 17 Aug 2010 19:15:34 +1000 schrieb Allan McRae <allan@archlinux.org>:
grep your files in your package for $srcdir (the actual value...). If it is not in a config file or RPATH or the like, you can probably ignore it.
I'm not quite sure if this is not a bug in makepkg, because I have this problem with almost all of my packages in AUR since the latest update to pacman 3.4.0. I never got this message before and I haven't changed such elementary parts of the packages. And if I'm right this problem appears with almost every package which I install from AUR.
But I need to watch it more narrowly.
You'll get that with any package that contains debugging symbols.
Excerpts from Loui Chang's message of 2010-08-17 12:35:41 +0200:
On Tue 17 Aug 2010 12:09 +0200, Heiko Baums wrote:
Am Tue, 17 Aug 2010 19:15:34 +1000 schrieb Allan McRae <allan@archlinux.org>:
grep your files in your package for $srcdir (the actual value...). If it is not in a config file or RPATH or the like, you can probably ignore it.
I'm not quite sure if this is not a bug in makepkg, because I have this problem with almost all of my packages in AUR since the latest update to pacman 3.4.0. I never got this message before and I haven't changed such elementary parts of the packages. And if I'm right this problem appears with almost every package which I install from AUR.
But I need to watch it more narrowly.
You'll get that with any package that contains debugging symbols.
So it isn't about the usual 'cd $srcdir/${pkgname}-${pkgver}' ? -- Philipp -- "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan
On Tue 17 Aug 2010 13:01 +0200, Philipp Überbacher wrote:
Excerpts from Loui Chang's message of 2010-08-17 12:35:41 +0200:
On Tue 17 Aug 2010 12:09 +0200, Heiko Baums wrote:
Am Tue, 17 Aug 2010 19:15:34 +1000 schrieb Allan McRae <allan@archlinux.org>:
grep your files in your package for $srcdir (the actual value...). If it is not in a config file or RPATH or the like, you can probably ignore it.
I'm not quite sure if this is not a bug in makepkg, because I have this problem with almost all of my packages in AUR since the latest update to pacman 3.4.0. I never got this message before and I haven't changed such elementary parts of the packages. And if I'm right this problem appears with almost every package which I install from AUR.
But I need to watch it more narrowly.
You'll get that with any package that contains debugging symbols.
So it isn't about the usual 'cd $srcdir/${pkgname}-${pkgver}' ?
No, it's about build directories being referenced in the finished package, not the PKGBUILD.
Excerpts from Loui Chang's message of 2010-08-17 13:14:44 +0200:
On Tue 17 Aug 2010 13:01 +0200, Philipp Überbacher wrote:
Excerpts from Loui Chang's message of 2010-08-17 12:35:41 +0200:
On Tue 17 Aug 2010 12:09 +0200, Heiko Baums wrote:
Am Tue, 17 Aug 2010 19:15:34 +1000 schrieb Allan McRae <allan@archlinux.org>:
grep your files in your package for $srcdir (the actual value...). If it is not in a config file or RPATH or the like, you can probably ignore it.
I'm not quite sure if this is not a bug in makepkg, because I have this problem with almost all of my packages in AUR since the latest update to pacman 3.4.0. I never got this message before and I haven't changed such elementary parts of the packages. And if I'm right this problem appears with almost every package which I install from AUR.
But I need to watch it more narrowly.
You'll get that with any package that contains debugging symbols.
So it isn't about the usual 'cd $srcdir/${pkgname}-${pkgver}' ?
No, it's about build directories being referenced in the finished package, not the PKGBUILD.
Oh.. I assumed it was some random annoyance and ignored it. I've seen it a number of times already. So 'grep -R $somedistinctpartofthepathtoPKGBUILDS $pkg' should find the offending file? And then some nasty patching to fix it? -- Philipp -- "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan
On 17 August 2010 19:32, Philipp Überbacher <hollunder@lavabit.com> wrote:
Excerpts from Loui Chang's message of 2010-08-17 13:14:44 +0200:
On Tue 17 Aug 2010 13:01 +0200, Philipp Überbacher wrote:
Excerpts from Loui Chang's message of 2010-08-17 12:35:41 +0200:
On Tue 17 Aug 2010 12:09 +0200, Heiko Baums wrote:
Am Tue, 17 Aug 2010 19:15:34 +1000 schrieb Allan McRae <allan@archlinux.org>:
grep your files in your package for $srcdir (the actual value...). If it is not in a config file or RPATH or the like, you can probably ignore it.
I'm not quite sure if this is not a bug in makepkg, because I have this problem with almost all of my packages in AUR since the latest update to pacman 3.4.0. I never got this message before and I haven't changed such elementary parts of the packages. And if I'm right this problem appears with almost every package which I install from AUR.
But I need to watch it more narrowly.
You'll get that with any package that contains debugging symbols.
So it isn't about the usual 'cd $srcdir/${pkgname}-${pkgver}' ?
No, it's about build directories being referenced in the finished package, not the PKGBUILD.
Oh.. I assumed it was some random annoyance and ignored it. I've seen it a number of times already. So 'grep -R $somedistinctpartofthepathtoPKGBUILDS $pkg' should find the offending file? And then some nasty patching to fix it?
It's not much of a big deal, and there's rarely need for any "nasty patching". It serves as a reminder to check for accidental inclusion of build paths in important runtime/system files, which often is an upstream build issue or user-specific mistake. Cases where this can be ignored and is usually the most prevalent is, for example, documentation-related files. Just run this from the makepkg build dir: grep -R "$(pwd)/src" pkg/ -- GPG/PGP ID: B42DDCAD
Excerpts from Ray Rashif's message of 2010-08-17 13:52:11 +0200:
On 17 August 2010 19:32, Philipp Überbacher <hollunder@lavabit.com> wrote:
Excerpts from Loui Chang's message of 2010-08-17 13:14:44 +0200:
On Tue 17 Aug 2010 13:01 +0200, Philipp Überbacher wrote:
Excerpts from Loui Chang's message of 2010-08-17 12:35:41 +0200:
On Tue 17 Aug 2010 12:09 +0200, Heiko Baums wrote:
Am Tue, 17 Aug 2010 19:15:34 +1000 schrieb Allan McRae <allan@archlinux.org>:
> grep your files in your package for $srcdir (the actual value...). > If it is not in a config file or RPATH or the like, you can probably > ignore it.
I'm not quite sure if this is not a bug in makepkg, because I have this problem with almost all of my packages in AUR since the latest update to pacman 3.4.0. I never got this message before and I haven't changed such elementary parts of the packages. And if I'm right this problem appears with almost every package which I install from AUR.
But I need to watch it more narrowly.
You'll get that with any package that contains debugging symbols.
So it isn't about the usual 'cd $srcdir/${pkgname}-${pkgver}' ?
No, it's about build directories being referenced in the finished package, not the PKGBUILD.
Oh.. I assumed it was some random annoyance and ignored it. I've seen it a number of times already. So 'grep -R $somedistinctpartofthepathtoPKGBUILDS $pkg' should find the offending file? And then some nasty patching to fix it?
It's not much of a big deal, and there's rarely need for any "nasty patching". It serves as a reminder to check for accidental inclusion of build paths in important runtime/system files, which often is an upstream build issue or user-specific mistake. Cases where this can be ignored and is usually the most prevalent is, for example, documentation-related files.
Just run this from the makepkg build dir:
grep -R "$(pwd)/src" pkg/
Thanks Ray, I noted that so I can check what's going on next time. The upstream issue is what I guessed would be the case and would require nasty patching, unless upstream fixes it in a timely fashion. At least I know what it's about now, thanks. -- Philipp -- "Wir stehen selbst enttäuscht und sehn betroffen / Den Vorhang zu und alle Fragen offen." Bertolt Brecht, Der gute Mensch von Sezuan
Am 17.08.2010 13:52, schrieb Ray Rashif:
On 17 August 2010 19:32, Philipp Überbacher <hollunder@lavabit.com> wrote:
Excerpts from Loui Chang's message of 2010-08-17 13:14:44 +0200:
On Tue 17 Aug 2010 13:01 +0200, Philipp Überbacher wrote:
Excerpts from Loui Chang's message of 2010-08-17 12:35:41 +0200:
On Tue 17 Aug 2010 12:09 +0200, Heiko Baums wrote:
Am Tue, 17 Aug 2010 19:15:34 +1000 schrieb Allan McRae <allan@archlinux.org>:
> grep your files in your package for $srcdir (the actual value...). > If it is not in a config file or RPATH or the like, you can probably > ignore it.
I'm not quite sure if this is not a bug in makepkg, because I have this problem with almost all of my packages in AUR since the latest update to pacman 3.4.0. I never got this message before and I haven't changed such elementary parts of the packages. And if I'm right this problem appears with almost every package which I install from AUR.
But I need to watch it more narrowly.
You'll get that with any package that contains debugging symbols.
So it isn't about the usual 'cd $srcdir/${pkgname}-${pkgver}' ?
No, it's about build directories being referenced in the finished package, not the PKGBUILD.
Oh.. I assumed it was some random annoyance and ignored it. I've seen it a number of times already. So 'grep -R $somedistinctpartofthepathtoPKGBUILDS $pkg' should find the offending file? And then some nasty patching to fix it?
It's not much of a big deal, and there's rarely need for any "nasty patching". It serves as a reminder to check for accidental inclusion of build paths in important runtime/system files, which often is an upstream build issue or user-specific mistake. Cases where this can be ignored and is usually the most prevalent is, for example, documentation-related files.
Just run this from the makepkg build dir:
grep -R "$(pwd)/src" pkg/
-- GPG/PGP ID: B42DDCAD
Hello, thank you for this enlightning thread. Now I understand why (nearly) all of my emacs packages show this error message. If you byte-compile an .el-file, emacs writes something like ;;; Compiled by haawda@frege on Thu Aug 19 00:35:21 2010 ;;; from file /home/haawda/paketierung/maintained_by_me/auctex-cvs/src/auctex-build/preview/prv-emacs.el ;;; in Emacs version 24.0.50.1 ;;; with all optimizations. to the beginning of the .elc-file. Well, all this is harmless, because it is just a comment, but it is annoying . Does someone know how this can be avoided? Regards Stefan
Am Tue, 17 Aug 2010 19:52:11 +0800 schrieb Ray Rashif <schivmeister@gmail.com>:
Just run this from the makepkg build dir:
grep -R "$(pwd)/src" pkg/
I've done this with my package kernel26-fbcondecor, which is kernel26 with just one additional patch and with slightly modified config files, and it gave me a lot of matches in modules and several scripts, which are not related to the fbcondecor patch and the modifications. So is there a bug in kernel26? Or can this be ignored? Heiko
On 19 August 2010 22:53, Heiko Baums <lists@baums-on-web.de> wrote:
Am Tue, 17 Aug 2010 19:52:11 +0800 schrieb Ray Rashif <schivmeister@gmail.com>:
Just run this from the makepkg build dir:
grep -R "$(pwd)/src" pkg/
I've done this with my package kernel26-fbcondecor, which is kernel26 with just one additional patch and with slightly modified config files, and it gave me a lot of matches in modules and several scripts, which are not related to the fbcondecor patch and the modifications.
So is there a bug in kernel26? Or can this be ignored?
Can be safely ignored. Some (or most) builds record the build-time directories for informational/referential purposes. A user brought up this one in an AUR comment: $ strings /lib/modules/2.6.35-ARCH/kernel/arch/x86/kernel/cpu/cpufreq/mperf.ko /home/tobias/Arch/svn/svn-packages/kernel26/trunk/src/linux-2.6.35/arch/x86/include/asm/processor.h If it's not a binary, you can edit it to remove that information (if you happen to see it during runtime; otherwise leave it alone). Other cases where this is actually significantly annoying is when a warning about the directory not being found is output to stderr unnecessarily. That is when we should really file an upstream report. -- GPG/PGP ID: B42DDCAD
participants (9)
-
Allan McRae
-
Heiko Baums
-
Jan de Groot
-
Loui Chang
-
Magnus Therning
-
Nathan Wayde
-
Philipp Überbacher
-
Ray Rashif
-
Stefan Husmann