debian 上的 Cruisecontrol 打包

发布于 2024-08-20 17:07:01 字数 8102 浏览 5 评论 0原文

今天我们很快

就能找到一个在 2.3.1 上发布的 Cruisecontrol debian 软件包(从 2005 年开始)

对于基于 phpUnderControl 的个人开源项目,我需要将此软件包更新到最新版本(从 2010 年 1 月开始的 2.8.3 )

我有以下所有官方 ubuntu 文档中有关使用 pbuilder 打包软件的步骤

最后使用的命令:

sudo pbuilder build *.dsc

因此,我在新版本中对包 (junit) 进行单元测试时出现错误chrooted 环境

如果我在源文件夹中调用 ant ,这是可以的,但是当我尝试使用 pbuilder 创建包时,我收到此错误:

这里是跟踪:

root@sqli-vm:~/PIC/CC/test# sudo pbuilder build *.dsc
W: /home/sqli/.pbuilderrc does not exist
I: using fakeroot in build.
Current time: Wed Feb  3 11:13:39 CET 2010
pbuilder-time-stamp: 1265192019
Building the build Environment
 -> extracting base tarball [/var/cache/pbuilder/base.tgz]
 -> creating local configuration
 -> copying local configuration
 -> mounting /proc filesystem
 -> mounting /dev/pts filesystem
 -> 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: ant, debhelper (>= 5)
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 ... 18446 files and directories currently installed.)
Unpacking pbuilder-satisfydepends-dummy (from .../pbuilder-satisfydepends-dummy.deb) ...
Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
 -> Finished parsing the build-deps
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  fakeroot
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/114kB of archives.
After this operation, 451kB of additional disk space will be used.
Selecting previously deselected package fakeroot.
(Reading database ... 18446 files and directories currently installed.)
Unpacking fakeroot (from .../fakeroot_1.9ubuntu1_i386.deb) ...
Setting up fakeroot (1.9ubuntu1) ...

Copying back the cached apt archive contents
Copying source file
    -> copying [cruisecontrol_2.8.3-1.dsc]
    -> copying [./cruisecontrol_2.8.3.orig.tar.gz]
    -> copying [./cruisecontrol_2.8.3-1.diff.gz]
Extracting source
dpkg-source: warning: extracting unsigned source package (./cruisecontrol_2.8.3-1.dsc)
dpkg-source: extracting cruisecontrol in cruisecontrol-2.8.3
dpkg-source: unpacking cruisecontrol_2.8.3.orig.tar.gz
dpkg-source: applying ./cruisecontrol_2.8.3-1.diff.gz
 -> Building the package
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: source package cruisecontrol
dpkg-buildpackage: source version 2.8.3-1
dpkg-buildpackage: source changed by SQLI <[email protected]>
dpkg-buildpackage: host architecture i386
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
(cd main; ant clean)
Buildfile: build.xml

clean:

clean:

BUILD SUCCESSFUL
Total time: 2 seconds
dh_clean
 dpkg-source -b cruisecontrol-2.8.3
dpkg-source: building cruisecontrol using existing cruisecontrol_2.8.3.orig.tar.gz
dpkg-source: building cruisecontrol in cruisecontrol_2.8.3-1.diff.gz
dpkg-source: warning: file main/loggers/build.xml has no final newline (either original or modified version)
dpkg-source: building cruisecontrol in cruisecontrol_2.8.3-1.dsc
 debian/rules build
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
dh_testdir
#/usr/bin/make -s -f debian/Makefile prefix=`pwd`/debian/tmp lib
(cd main; ant)
Buildfile: build.xml

clean:

clean:

checklabel:
     [echo] Java: 1.5.0 (GNU libgcj)
     [echo]    in /usr/lib/jvm/java-1.5.0-gcj-4.2-1.5.0.0/jre
     [echo] Ant: Apache Ant version 1.7.0 compiled on August 29 2007
     [echo]    in /usr/share/ant
     [echo] CruiseControl: 2.8.3

init:
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/classes
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/test-classes
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/tmp
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/dist
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/test-results
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/emma-results

logger.jar:

clean:

compile:
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/classes
    [javac] Compiling 4 source files to /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/classes
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-classes
    [javac] Compiling 1 source file to /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-classes

[b]test:
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-results
    [junit] Running net.sourceforge.cruisecontrol.builders.AntOutputLoggerTest
    [junit] Testsuite: net.sourceforge.cruisecontrol.builders.AntOutputLoggerTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.459 sec
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.459 sec
    [junit]
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-report
[junitreport] Processing /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-report/TESTS-TestSuites.xml to /tmp/null650765339
[junitreport] Loading stylesheet jar:file:/usr/share/ant/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Failed to process /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-report/TESTS-TestSuites.xml[/b]

BUILD FAILED
/tmp/buildd/cruisecontrol-2.8.3/main/build.xml:326: The following error occurred while executing this line:
/tmp/buildd/cruisecontrol-2.8.3/main/loggers/build.xml:45: Errors while applying transformations: javax.xml.transform.TransformerConfigurationException: SAX parser error: reference to entity in undeclared doctype

Total time: 9 seconds
make: *** [build-stamp] Error 1
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
pbuilder: Failed autobuilding of package
 -> Aborting with an error
 -> unmounting dev/pts filesystem
 -> unmounting proc filesystem
 -> cleaning the build env
    -> removing directory /var/cache/pbuilder/build//9119 and its subdirectories

有什么想法吗?

干杯

To be quickly

today we can find a cruisecontrol debian package released on 2.3.1 ( from 2005 )

For a personal opensource project based on phpUnderControl i need to update this package to the latest release ( 2.8.3 from january 2010 )

I have following all steps from the official ubuntu documentation about packaging a software with pbuilder

the last used command :

sudo pbuilder build *.dsc

therefore i've got an error with the unit testing of the package ( junit ) in the fresh chrooted environment

if i call ant in the source folder this is ok but when i try with pbuilder to create the package i've got this error :

here the trace :

root@sqli-vm:~/PIC/CC/test# sudo pbuilder build *.dsc
W: /home/sqli/.pbuilderrc does not exist
I: using fakeroot in build.
Current time: Wed Feb  3 11:13:39 CET 2010
pbuilder-time-stamp: 1265192019
Building the build Environment
 -> extracting base tarball [/var/cache/pbuilder/base.tgz]
 -> creating local configuration
 -> copying local configuration
 -> mounting /proc filesystem
 -> mounting /dev/pts filesystem
 -> 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: ant, debhelper (>= 5)
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 ... 18446 files and directories currently installed.)
Unpacking pbuilder-satisfydepends-dummy (from .../pbuilder-satisfydepends-dummy.deb) ...
Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
 -> Finished parsing the build-deps
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  fakeroot
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/114kB of archives.
After this operation, 451kB of additional disk space will be used.
Selecting previously deselected package fakeroot.
(Reading database ... 18446 files and directories currently installed.)
Unpacking fakeroot (from .../fakeroot_1.9ubuntu1_i386.deb) ...
Setting up fakeroot (1.9ubuntu1) ...

Copying back the cached apt archive contents
Copying source file
    -> copying [cruisecontrol_2.8.3-1.dsc]
    -> copying [./cruisecontrol_2.8.3.orig.tar.gz]
    -> copying [./cruisecontrol_2.8.3-1.diff.gz]
Extracting source
dpkg-source: warning: extracting unsigned source package (./cruisecontrol_2.8.3-1.dsc)
dpkg-source: extracting cruisecontrol in cruisecontrol-2.8.3
dpkg-source: unpacking cruisecontrol_2.8.3.orig.tar.gz
dpkg-source: applying ./cruisecontrol_2.8.3-1.diff.gz
 -> Building the package
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: source package cruisecontrol
dpkg-buildpackage: source version 2.8.3-1
dpkg-buildpackage: source changed by SQLI <[email protected]>
dpkg-buildpackage: host architecture i386
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
(cd main; ant clean)
Buildfile: build.xml

clean:

clean:

BUILD SUCCESSFUL
Total time: 2 seconds
dh_clean
 dpkg-source -b cruisecontrol-2.8.3
dpkg-source: building cruisecontrol using existing cruisecontrol_2.8.3.orig.tar.gz
dpkg-source: building cruisecontrol in cruisecontrol_2.8.3-1.diff.gz
dpkg-source: warning: file main/loggers/build.xml has no final newline (either original or modified version)
dpkg-source: building cruisecontrol in cruisecontrol_2.8.3-1.dsc
 debian/rules build
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
dh_testdir
#/usr/bin/make -s -f debian/Makefile prefix=`pwd`/debian/tmp lib
(cd main; ant)
Buildfile: build.xml

clean:

clean:

checklabel:
     [echo] Java: 1.5.0 (GNU libgcj)
     [echo]    in /usr/lib/jvm/java-1.5.0-gcj-4.2-1.5.0.0/jre
     [echo] Ant: Apache Ant version 1.7.0 compiled on August 29 2007
     [echo]    in /usr/share/ant
     [echo] CruiseControl: 2.8.3

init:
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/classes
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/test-classes
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/tmp
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/dist
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/test-results
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/target/emma-results

logger.jar:

clean:

compile:
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/classes
    [javac] Compiling 4 source files to /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/classes
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-classes
    [javac] Compiling 1 source file to /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-classes

[b]test:
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-results
    [junit] Running net.sourceforge.cruisecontrol.builders.AntOutputLoggerTest
    [junit] Testsuite: net.sourceforge.cruisecontrol.builders.AntOutputLoggerTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.459 sec
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.459 sec
    [junit]
    [mkdir] Created dir: /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-report
[junitreport] Processing /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-report/TESTS-TestSuites.xml to /tmp/null650765339
[junitreport] Loading stylesheet jar:file:/usr/share/ant/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Failed to process /tmp/buildd/cruisecontrol-2.8.3/main/loggers/target/test-report/TESTS-TestSuites.xml[/b]

BUILD FAILED
/tmp/buildd/cruisecontrol-2.8.3/main/build.xml:326: The following error occurred while executing this line:
/tmp/buildd/cruisecontrol-2.8.3/main/loggers/build.xml:45: Errors while applying transformations: javax.xml.transform.TransformerConfigurationException: SAX parser error: reference to entity in undeclared doctype

Total time: 9 seconds
make: *** [build-stamp] Error 1
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
pbuilder: Failed autobuilding of package
 -> Aborting with an error
 -> unmounting dev/pts filesystem
 -> unmounting proc filesystem
 -> cleaning the build env
    -> removing directory /var/cache/pbuilder/build//9119 and its subdirectories

Any idea ?

Cheers

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

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

发布评论

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

评论(1

虐人心 2024-08-27 17:07:01

好吧,终于我解决了我的问题...

问题来自于 pbuild chroot 环境中发布的 jvm 以及一些缺少的 java 库。

我必须更改 pbuilderrc 文件上的一些参数,并使用 ant-可选包 + sun-java-6 jdk deb 包编译 base.tgz。

最后我必须重建 makefile ( debian/rules ) 并且 Cruisecontrol java 源代码将完成编译。

所以,我发布了2.8.3版本的cruisecontrol和deb包。
目前仅在 x86arch 上工作。

Ok, finaly i solved my problem...

The problem come from the released jvm on the pbuild chrooted environement plus some missing java libs.

i had to change some parameters on the pbuilderrc file and compile the base.tgz with ant-optional package + sun-java-6 jdk deb package.

Finaly i had to rebuild the makefile ( debian/rules ) and the cruisecontrol java source cause will be done compiled.

So, i released the 2.8.3 version of cruisecontrol with deb package.
working only on x86arch for the moment.

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