在 pbuilder 中使用本地依赖项

发布于 2024-10-06 18:34:23 字数 5019 浏览 8 评论 0原文

我正在尝试使用 pbuilder 构建一系列包。这些包相互依赖,因此为了方便起见,我有一个本地存储库,我使用 reprepro 对其进行管理。该本地存储库包含所有依赖项(来自以前的版本)。

root@openpanel-builder ~ # export REPREPRO_BASE_DIR=/root/repository
root@openpanel-builder ~ # reprepro list lenny libgrace
lenny|main|amd64: libgrace 0.9.38.1230
lenny|main|i386: libgrace 0.9.38.1230
lenny|main|source: libgrace 0.9.38.1230

但是,当我尝试构建依赖包时,它找不到这些依赖项。

root@openpanel-builder ~ # pbuilder build --basetgz /var/cache/pbuilder/lenny-i386.tgz  --bindmounts /root/repository /tmp/bldqaJocd/openpanel-core_0.9.12.368.dsc 
I: using fakeroot in build.
Current time: Wed Dec  8 10:46:17 UTC 2010
pbuilder-time-stamp: 1291805177
Building the build Environment
 -> extracting base tarball [/var/cache/pbuilder/lenny-i386.tgz]
 -> creating local configuration
 -> copying local configuration
 -> mounting /proc filesystem
 -> mounting /dev/pts filesystem
-> Mounting /root/repository
 -> policy-rc.d already exists
Obtaining the cached apt archive contents
Installing the build-deps
 -> Attempting to satisfy build-dependencies
 -> Creating pbuilder-satisfydepends-dummy package
Package: pbuilder-satisfydepends-dummy
Version: 0.invalid.0
Architecture: i386
Maintainer: Debian Pbuilder Team <[email protected]>
Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder
 This package was created automatically by pbuilder and should
Depends: debhelper (>= 5), libgrace-dev, libgrace-pcre-dev, zlib1g-dev, sqlite3, libpcre3-dev, libsqlite3-dev
dpkg-deb: building package `pbuilder-satisfydepends-dummy' in `/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
aptitude is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Selecting previously deselected package pbuilder-satisfydepends-dummy.
(Reading database ... 9671 files and directories currently installed.)
Unpacking pbuilder-satisfydepends-dummy (from .../pbuilder-satisfydepends-dummy.deb) ...
dpkg: dependency problems prevent configuration of pbuilder-satisfydepends-dummy:
 pbuilder-satisfydepends-dummy depends on debhelper (>= 5); however:
  Package debhelper is not installed.
 pbuilder-satisfydepends-dummy depends on libgrace-dev; however:
  Package libgrace-dev is not installed.
 pbuilder-satisfydepends-dummy depends on libgrace-pcre-dev; however:
  Package libgrace-pcre-dev is not installed.
 pbuilder-satisfydepends-dummy depends on zlib1g-dev; however:
  Package zlib1g-dev is not installed.
 pbuilder-satisfydepends-dummy depends on sqlite3; however:
  Package sqlite3 is not installed.
 pbuilder-satisfydepends-dummy depends on libpcre3-dev; however:
  Package libpcre3-dev is not installed.
 pbuilder-satisfydepends-dummy depends on libsqlite3-dev; however:
  Package libsqlite3-dev is not installed.
dpkg: error processing pbuilder-satisfydepends-dummy (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 pbuilder-satisfydepends-dummy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Initializing package states... Done
Writing extended state information... Done
The following packages are BROKEN:
  pbuilder-satisfydepends-dummy 
The following NEW packages will be installed:
  bsdmainutils{a} debhelper{a} file{a} gettext{a} gettext-base{a} groff-base{a} html2text{a} intltool-debian{a} libmagic1{a} libpcre3{a} libpcre3-dev{a} libpcrecpp0{a} libsqlite3-0{a} libsqlite3-dev{a} 
  man-db{a} po-debconf{a} sqlite3{a} zlib1g-dev{a} 
The following packages are RECOMMENDED but will NOT be installed:
  curl libcompress-zlib-perl libmail-box-perl libmail-sendmail-perl lynx wget 
0 packages upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 181kB/7488kB of archives. After unpacking 21.2MB will be used.
The following packages have unmet dependencies:
  pbuilder-satisfydepends-dummy: Depends: libgrace-dev which is a virtual package.
                                 Depends: libgrace-pcre-dev which is a virtual package.
The following actions will resolve these dependencies:

[---snip---]

Current status: 0 broken [-1].
Aptitude couldn't satisfy the build dependencies
E: pbuilder-satisfydepends failed.
Copying back the cached apt archive contents
 -> unmounting /root/repository filesystem
 -> unmounting dev/pts filesystem
 -> unmounting proc filesystem
 -> cleaning the build env 
    -> removing directory /var/cache/pbuilder/build//14563 and its subdirectories

当我使用 pbuilder --login 登录时,该软件包仅在 apt-get update 后才可用。使用 pbuilder --build 时,有没有办法自动更新 pbuilder chroot 内的 apt 数据?

I'm trying to build a series of packages using pbuilder. These packages depend on each other, so to facilitate that, I have a local repository, which I manage using reprepro. This local repository contains al dependencies (from previous builds).

root@openpanel-builder ~ # export REPREPRO_BASE_DIR=/root/repository
root@openpanel-builder ~ # reprepro list lenny libgrace
lenny|main|amd64: libgrace 0.9.38.1230
lenny|main|i386: libgrace 0.9.38.1230
lenny|main|source: libgrace 0.9.38.1230

However, when I try to build a dependant package, it doesn't find these dependencies.

root@openpanel-builder ~ # pbuilder build --basetgz /var/cache/pbuilder/lenny-i386.tgz  --bindmounts /root/repository /tmp/bldqaJocd/openpanel-core_0.9.12.368.dsc 
I: using fakeroot in build.
Current time: Wed Dec  8 10:46:17 UTC 2010
pbuilder-time-stamp: 1291805177
Building the build Environment
 -> extracting base tarball [/var/cache/pbuilder/lenny-i386.tgz]
 -> creating local configuration
 -> copying local configuration
 -> mounting /proc filesystem
 -> mounting /dev/pts filesystem
-> Mounting /root/repository
 -> policy-rc.d already exists
Obtaining the cached apt archive contents
Installing the build-deps
 -> Attempting to satisfy build-dependencies
 -> Creating pbuilder-satisfydepends-dummy package
Package: pbuilder-satisfydepends-dummy
Version: 0.invalid.0
Architecture: i386
Maintainer: Debian Pbuilder Team <[email protected]>
Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder
 This package was created automatically by pbuilder and should
Depends: debhelper (>= 5), libgrace-dev, libgrace-pcre-dev, zlib1g-dev, sqlite3, libpcre3-dev, libsqlite3-dev
dpkg-deb: building package `pbuilder-satisfydepends-dummy' in `/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
aptitude is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Selecting previously deselected package pbuilder-satisfydepends-dummy.
(Reading database ... 9671 files and directories currently installed.)
Unpacking pbuilder-satisfydepends-dummy (from .../pbuilder-satisfydepends-dummy.deb) ...
dpkg: dependency problems prevent configuration of pbuilder-satisfydepends-dummy:
 pbuilder-satisfydepends-dummy depends on debhelper (>= 5); however:
  Package debhelper is not installed.
 pbuilder-satisfydepends-dummy depends on libgrace-dev; however:
  Package libgrace-dev is not installed.
 pbuilder-satisfydepends-dummy depends on libgrace-pcre-dev; however:
  Package libgrace-pcre-dev is not installed.
 pbuilder-satisfydepends-dummy depends on zlib1g-dev; however:
  Package zlib1g-dev is not installed.
 pbuilder-satisfydepends-dummy depends on sqlite3; however:
  Package sqlite3 is not installed.
 pbuilder-satisfydepends-dummy depends on libpcre3-dev; however:
  Package libpcre3-dev is not installed.
 pbuilder-satisfydepends-dummy depends on libsqlite3-dev; however:
  Package libsqlite3-dev is not installed.
dpkg: error processing pbuilder-satisfydepends-dummy (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 pbuilder-satisfydepends-dummy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Initializing package states... Done
Writing extended state information... Done
The following packages are BROKEN:
  pbuilder-satisfydepends-dummy 
The following NEW packages will be installed:
  bsdmainutils{a} debhelper{a} file{a} gettext{a} gettext-base{a} groff-base{a} html2text{a} intltool-debian{a} libmagic1{a} libpcre3{a} libpcre3-dev{a} libpcrecpp0{a} libsqlite3-0{a} libsqlite3-dev{a} 
  man-db{a} po-debconf{a} sqlite3{a} zlib1g-dev{a} 
The following packages are RECOMMENDED but will NOT be installed:
  curl libcompress-zlib-perl libmail-box-perl libmail-sendmail-perl lynx wget 
0 packages upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
Need to get 181kB/7488kB of archives. After unpacking 21.2MB will be used.
The following packages have unmet dependencies:
  pbuilder-satisfydepends-dummy: Depends: libgrace-dev which is a virtual package.
                                 Depends: libgrace-pcre-dev which is a virtual package.
The following actions will resolve these dependencies:

[---snip---]

Current status: 0 broken [-1].
Aptitude couldn't satisfy the build dependencies
E: pbuilder-satisfydepends failed.
Copying back the cached apt archive contents
 -> unmounting /root/repository filesystem
 -> unmounting dev/pts filesystem
 -> unmounting proc filesystem
 -> cleaning the build env 
    -> removing directory /var/cache/pbuilder/build//14563 and its subdirectories

When I log in using pbuilder --login, the package only becomes available after an apt-get update. Is there a way of automatically updating apt data inside pbuilder's chroot when using pbuilder --build?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

穿越时光隧道 2024-10-13 18:34:23

我正在使用此处的配方 对于与您类似的情况。

总之:

  1. 设置您的 pbuilder 映像,以便它检查您的本地存储库是否有更新。
  2. 设置一个挂钩以在每次构建时更新您的存储库。

I'm using the recipe here for a situation similar to yours.

In summary:

  1. Set up your pbuilder image so it checks your local repo for updates.
  2. Set up a hook to update your repo every time you build.
萧瑟寒风 2024-10-13 18:34:23

Ubuntu 文档中有一些关于如何处理这种情况的非常全面的信息 a> (如果您不使用 Ubuntu,则同样相关)

There's some pretty comprehensive information on how to handle this kind of situation in the Ubuntu docs (just as relevant if you're not using Ubuntu)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文