buildroot将错误的PREFIX附加到自定义程序包构建中

本国的

我正在尝试将WSO2 WSF / C自定义包包括到buildroot交叉编译ARM项目中。到目前为止,这是wsfc.mk文件:

################################################################################
#
# WSO2 WSF/C 
#
################################################################################

    WSFC_VERSION = 2.0.0
    WSFC_SOURCE_BASENAME = wso2-wsf-c-src-$(WSFC_VERSION)
    WSFC_SOURCE = $(WSFC_SOURCE_BASENAME).zip
    WSFC_SITE = $(BR2_EXTERNAL)/package/wsfc/
    WSFC_SITE_METHOD = file
    WSFC_PREFIX = /usr/local/wso/wsf_c/
    WSFC_CONF_OPTS = --prefix=$(WSFC_PREFIX) --exec-prefix=$(WSFC_PREFIX) \
                     --enable-rampart=no --enable-sandesha=no --enable-savan=no

    define WSFC_EXTRACT_CMDS
        unzip $(DL_DIR)/$(WSFC_SOURCE) -d $(@D)
        mv $(@D)/$(WSFC_SOURCE_BASENAME)/* $(@D)
        rmdir $(@D)/$(WSFC_SOURCE_BASENAME)
    endef

    $(eval $(autotools-package))

问题,

当时WSFC_PREFIX = /usr/local/wso/wsf_c/,它将尝试在主机中安装示例,因此权限被拒绝

[... lot of buildroot log output then:]
/usr/bin/make  install-data-hook
make[5]: Entering directory `/home/masteruser/Downloads/buildroot-2015.05/output/build/wsfc-2.0.0/axis2c'
mkdir -p /usr/local/wso/wsf_c/samples/src/axis2c
mkdir: cannot create directory ‘/usr/local/wso’: Permission denied
make[5]: *** [install-data-hook] Error 1
make[5]: Leaving directory `/home/masteruser/Downloads/buildroot-2015.05/output/build/wsfc-2.0.0/axis2c'
make[4]: *** [install-data-am] Error 2
make[4]: Leaving directory `/home/masteruser/Downloads/buildroot-2015.05/output/build/wsfc-2.0.0/axis2c'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/masteruser/Downloads/buildroot-2015.05/output/build/wsfc-2.0.0/axis2c'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/masteruser/Downloads/buildroot-2015.05/output/build/wsfc-2.0.0/axis2c'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/masteruser/Downloads/buildroot-2015.05/output/build/wsfc-2.0.0'
make: *** [/home/masteruser/Downloads/buildroot-2015.05/output/build/wsfc-2.0.0/.stamp_target_installed] Error 2

如果为WSFC_PREFIX = $(TARGET_DIR)/usr/local/wso/wsf_c/,则没有错误,但是它重复了前缀,并在错误的位置(..home ../ target / home / ...)安装了多个文件。

[... lot of buildroot log output then:]
test -z "/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c" || /bin/mkdir -p "/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c"
test -z "/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/docs" || /bin/mkdir -p "/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/docs"
 /usr/bin/install -c -m 644 'config/axis2.xml' '/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/axis2.xml'
 /usr/bin/install -c -m 644 'README' '/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/README'
 /usr/bin/install -c -m 644 'INSTALL' '/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/INSTALL'
 /usr/bin/install -c -m 644 'COPYING' '/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/COPYING'
 /usr/bin/install -c -m 644 'NEWS' '/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/NEWS'
 /usr/bin/install -c -m 644 'CREDITS' '/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/CREDITS'
 /usr/bin/install -c -m 644 'NOTICE' '/home/masteruser/Downloads/buildroot-2015.05/output/target/home/masteruser/Downloads/buildroot-2015.05/output/target/usr/local/wso/wsf_c/NOTICE'
[... lot of buildroot log output ]

我认为这需要修复补丁,但是我对自动工具不熟悉,我不知道应该在哪里补丁以及在生成过程中buildroot如何追加前缀以避免这种行为。

本国的

WSF / C源未正确使用自动工具。有一些手动编写的安装挂钩,但是在目标位置中不包含$(DESTDIR)/前缀。因此,这些东西安装在主机系统中,而不是安装在output / target目录中。

最简单的解决方案是不安装示例。

这是修复源并将其集成到buildroot的文件和补丁。

wsfc.mk

################################################################################
#
# WSO2 WSF/C 
#
################################################################################

WSFC_VERSION = 2.0.0
WSFC_SOURCE_BASENAME = wso2-wsf-c-src-$(WSFC_VERSION)
WSFC_SOURCE = $(WSFC_SOURCE_BASENAME).zip
WSFC_SITE = $(BR2_EXTERNAL)/package/wsfc/
WSFC_SITE_METHOD = file
WSFC_PREFIX = /usr/local/wso/wsf_c/
WSFC_CONF_OPTS = --prefix=$(WSFC_PREFIX) --exec-prefix=$(WSFC_PREFIX) --enable-rampart=no --enable-sandesha=no --enable-savan=no

define WSFC_EXTRACT_CMDS
    unzip $(DL_DIR)/$(WSFC_SOURCE) -d $(@D)
    mv $(@D)/$(WSFC_SOURCE_BASENAME)/* $(@D)
    rmdir $(@D)/$(WSFC_SOURCE_BASENAME)
endef

$(eval $(autotools-package))

0001-samples-destdir-fix.patch

diff -ENwbur wso2-wsf-c-src-2.0.0.orig/axis2c/Makefile.am wso2-wsf-c-src-2.0.0/axis2c/Makefile.am
--- wso2-wsf-c-src-2.0.0.orig/axis2c/Makefile.am    2015-08-21 16:33:24.807351795 -0300
+++ wso2-wsf-c-src-2.0.0/axis2c/Makefile.am 2015-08-21 16:37:58.994193027 -0300
@@ -30,6 +30,8 @@
    rm -rf axis2c-bin-${PACKAGE_VERSION}-linux

 install-data-hook:
-   mkdir -p $(samplesdir)/src/axis2c
-   cp -rf samples/* $(samplesdir)/src/axis2c
+   @:
+
+   #mkdir -p $(samplesdir)/src/axis2c
+   #cp -rf samples/* $(samplesdir)/src/axis2c

diff -ENwbur wso2-wsf-c-src-2.0.0.orig/axis2c/Makefile.in wso2-wsf-c-src-2.0.0/axis2c/Makefile.in
--- wso2-wsf-c-src-2.0.0.orig/axis2c/Makefile.in    2015-08-21 16:33:25.191159781 -0300
+++ wso2-wsf-c-src-2.0.0/axis2c/Makefile.in 2015-08-21 16:38:25.178193336 -0300
@@ -823,8 +823,10 @@
    rm -rf axis2c-bin-${PACKAGE_VERSION}-linux

 install-data-hook:
-   mkdir -p $(samplesdir)/src/axis2c
-   cp -rf samples/* $(samplesdir)/src/axis2c
+   @:
+
+   #mkdir -p $(samplesdir)/src/axis2c
+   #cp -rf samples/* $(samplesdir)/src/axis2c
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff -ENwbur wso2-wsf-c-src-2.0.0.orig/Makefile.am wso2-wsf-c-src-2.0.0/Makefile.am
--- wso2-wsf-c-src-2.0.0.orig/Makefile.am   2015-08-21 16:33:24.775367794 -0300
+++ wso2-wsf-c-src-2.0.0/Makefile.am    2015-08-21 16:40:42.506194955 -0300
@@ -10,24 +10,28 @@
    sh dist_hook.sh

 samples:
-   sh build_samples.sh $(prefix)
-   mkdir -p  $(samplesdir)/src/wsf_c
-   cp -rf examples/* $(samplesdir)/src/wsf_c
-   cd $(samplesdir)
-   rm -rf `find $(samplesdir)/ -type d -name *.svn`
-   rm -rf `find $(samplesdir)/ -type d -name *.libs`
-   rm -rf `find $(samplesdir)/ -type d -name *.deps`
-   rm -rf `find $(samplesdir)/ -type f -name Makefile`
-   rm -rf `find $(samplesdir)/ -type d -name autom4te.cache`
-   cp config/axis2.xml $(prefix)
+   @:
+   
+   #sh build_samples.sh $(prefix)
+   #mkdir -p  $(samplesdir)/src/wsf_c
+   #cp -rf examples/* $(samplesdir)/src/wsf_c
+   #cd $(samplesdir)
+   #rm -rf `find $(samplesdir)/ -type d -name *.svn`
+   #rm -rf `find $(samplesdir)/ -type d -name *.libs`
+   #rm -rf `find $(samplesdir)/ -type d -name *.deps`
+   #rm -rf `find $(samplesdir)/ -type f -name Makefile`
+   #rm -rf `find $(samplesdir)/ -type d -name autom4te.cache`
+   #cp config/axis2.xml $(prefix)

 install-data-hook:
-   cp -rf docs/* $(docsdir)
-   rm -rf `find $(samplesdir)/ -type d -name *.svn`
-   rm -rf `find $(samplesdir)/ -type d -name *.libs`
-   rm -rf `find $(samplesdir)/ -type d -name *.deps`
-   rm -rf `find $(samplesdir)/ -type f -name Makefile`
-   rm -rf `find $(samplesdir)/ -type d -name autom4te.cache`
+   @:
+   
+   #cp -rf docs/* $(docsdir)
+   #rm -rf `find $(samplesdir)/ -type d -name *.svn`
+   #rm -rf `find $(samplesdir)/ -type d -name *.libs`
+   #rm -rf `find $(samplesdir)/ -type d -name *.deps`
+   #rm -rf `find $(samplesdir)/ -type f -name Makefile`
+   #rm -rf `find $(samplesdir)/ -type d -name autom4te.cache`

 EXTRA_DIST=build_samples.sh config build.bat clean.bat docs CREDITS NOTICE examples LICENSE configure.in link_samples.sh link.sh build/build_optional.bat build/optional.mk build/init.bat build/versions.in test build/codegen

diff -ENwbur wso2-wsf-c-src-2.0.0.orig/Makefile.in wso2-wsf-c-src-2.0.0/Makefile.in
--- wso2-wsf-c-src-2.0.0.orig/Makefile.in   2015-08-21 16:33:26.042733811 -0300
+++ wso2-wsf-c-src-2.0.0/Makefile.in    2015-08-21 16:41:35.322195578 -0300
@@ -714,24 +714,28 @@
    sh dist_hook.sh

 samples:
-   sh build_samples.sh $(prefix)
-   mkdir -p  $(samplesdir)/src/wsf_c
-   cp -rf examples/* $(samplesdir)/src/wsf_c
-   cd $(samplesdir)
-   rm -rf `find $(samplesdir)/ -type d -name *.svn`
-   rm -rf `find $(samplesdir)/ -type d -name *.libs`
-   rm -rf `find $(samplesdir)/ -type d -name *.deps`
-   rm -rf `find $(samplesdir)/ -type f -name Makefile`
-   rm -rf `find $(samplesdir)/ -type d -name autom4te.cache`
-   cp config/axis2.xml $(prefix)
+   @:
+   
+   #sh build_samples.sh $(prefix)
+   #mkdir -p  $(samplesdir)/src/wsf_c
+   #cp -rf examples/* $(samplesdir)/src/wsf_c
+   #cd $(samplesdir)
+   #rm -rf `find $(samplesdir)/ -type d -name *.svn`
+   #rm -rf `find $(samplesdir)/ -type d -name *.libs`
+   #rm -rf `find $(samplesdir)/ -type d -name *.deps`
+   #rm -rf `find $(samplesdir)/ -type f -name Makefile`
+   #rm -rf `find $(samplesdir)/ -type d -name autom4te.cache`
+   #cp config/axis2.xml $(prefix)

 install-data-hook:
-   cp -rf docs/* $(docsdir)
-   rm -rf `find $(samplesdir)/ -type d -name *.svn`
-   rm -rf `find $(samplesdir)/ -type d -name *.libs`
-   rm -rf `find $(samplesdir)/ -type d -name *.deps`
-   rm -rf `find $(samplesdir)/ -type f -name Makefile`
-   rm -rf `find $(samplesdir)/ -type d -name autom4te.cache`
+   @:  
+
+   #cp -rf docs/* $(docsdir)
+   #rm -rf `find $(samplesdir)/ -type d -name *.svn`
+   #rm -rf `find $(samplesdir)/ -type d -name *.libs`
+   #rm -rf `find $(samplesdir)/ -type d -name *.deps`
+   #rm -rf `find $(samplesdir)/ -type f -name Makefile`
+   #rm -rf `find $(samplesdir)/ -type d -name autom4te.cache`
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Log4j2自定义附加程序:错误尝试附加到未启动的附加程序

自定义程序包名称cxf-codegen-plugin

jax-ws导入和自定义程序包到名称空间的映射

如何为自定义程序包设置别名?

在自定义GO程序包之上提交

导入自定义程序包显示“错误:程序包com不存在”

在程序包构建中创建小插图失败,并显示错误“无法找到'weave'输出文件”

如何压缩R程序包构建中的保存

设置自定义Chocolatey程序包时出现空键错误

Common Lisp将程序包名称附加到宏中带引号的键

具有依赖项初始化错误的自定义程序包:ModuleNotFoundError或ImportError

如何将buildroot与软件包中的自定义更改一起使用

NameError:在自定义程序包中调用函数时未定义名称“ pd”

Airflow无法导入自定义python程序包

Buildroot自定义软件包不会自动生成

如何在自定义程序包中使用tidyselect“ where”?

Laradock-添加自定义npm程序包

自定义节点程序包不提供名为

CakePHP:无法从自定义程序包加载类

构建自定义RPM,但程序包为空?

java:将Java类文件复制到自定义程序包中[版权问题?]

自定义通知布局:从程序包中发布的错误通知无法展开RemoteViews

typo3将自定义css添加到引导程序包

Xamarin-将C#源代码附加到NuGet程序包

如何将更多变体或自定义程序包添加到debootstrap?

在extjs6应用程序构建中添加自定义文件

将闭包附加到 UIButton(设计自定义弹出窗口)

无法将 Threejs EventDispatcher 附加到自定义对象

将 Swift 包添加到自定义框架