Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#14751 - [makepkg] warn about $startdir references
Attached to Project:
Pacman
Opened by Sergej Pupykin (sergej) - Monday, 18 May 2009, 16:10 GMT
Last edited by Allan McRae (Allan) - Monday, 14 December 2009, 05:54 GMT
Opened by Sergej Pupykin (sergej) - Monday, 18 May 2009, 16:10 GMT
Last edited by Allan McRae (Allan) - Monday, 14 December 2009, 05:54 GMT
|
DetailsThere are many bugs in packages such as wrong path in script or insecure RPATH in .so.
I suggest patch for makepkg command which grep all package files for $startdir and warn user about every matched file. I see may be this task is for namcap, but namcap does not know $startdir value. Here is output example (see 'WARNING:' line): ==> Making package: foo 1-1 any (Пнд Май 18 20:09:30 MSD 2009) ==> Checking Runtime Dependencies... ==> Checking Buildtime Dependencies... ==> Retrieving Sources... ==> Validating source files with md5sums... ==> Extracting Sources... ==> Removing existing pkg/ directory... ==> Entering fakeroot environment... ==> Starting build()... ==> Tidying install... -> Compressing man pages... -> Stripping debugging symbols from binaries and libraries... ==> Checking for $startdir references... ==> WARNING: File /home/sergej/aur/makepkg/pkg/test.txt contain $startdir reference! ==> Creating package... -> Generating .PKGINFO file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: foo 1-1 any (Пнд Май 18 20:09:32 MSD 2009) |
This task depends upon
Closed by Allan McRae (Allan)
Monday, 14 December 2009, 05:54 GMT
Reason for closing: Fixed
Additional comments about closing: git commit b805fe58
Monday, 14 December 2009, 05:54 GMT
Reason for closing: Fixed
Additional comments about closing: git commit b805fe58
makepkg-check-for-startdir-re...
Note that insecure RPATH is scheduled to be detected in namcap at some stage. I would really prefer makepkg to only be a package maker and namcap to be the the checker, but I can not see this check being able to be implemented in namcap.
It avoids unneeded packing/unpacking saving time, $srcdir can be passed to namcap from makepkg, makepkg just builds packages.
http://arch.pp.ru/~sergej/files/namcap/0001-parse-directory.patch.gz
With this patch, you can
namcap /home/sergej/distr.rcs/namcap.git/pkg/
path MUST be absolute and MUST end with /
I found only one issue - it prints messages about wrong owner uid/gid
(Path implements dirfile module, which is compatible with tarfile module)
I hope it helps to integrate namcap into makepkg as plugin
it have not all tarfile classes and methods, but enough for modules working
0002 patch changes:
- cleanups
- file uid/gid fix
- relative path can be used
- dir may not ends with /
I attach these patches
It is quite dirty now, but I think it is already usable
$ fakeroot ./namcap.py pkg
archlinux-xdg-menu W: Dependency included and not needed ('perlxml')
archlinux-xdg-menu W: File (var/cache) exists in a non-standard directory.
archlinux-xdg-menu W: File (var/cache/xdg-menu) exists in a non-standard directory.
$ fakeroot ./namcap.py archlinux-xdg-menu-0.7.4-1.pkg.tar.gz
archlinux-xdg-menu W: Dependency included and not needed ('perlxml')
archlinux-xdg-menu W: File (var/cache) exists in a non-standard directory.
archlinux-xdg-menu W: File (var/cache/xdg-menu) exists in a non-standard directory.