diff --git a/4.0.4.tar.gz b/4.0.4.tar.gz new file mode 100644 index 0000000..0d6e667 Binary files /dev/null and b/4.0.4.tar.gz differ diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 2a96c69..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# byteman - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 674726a..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# byteman - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/byteman.spec b/byteman.spec new file mode 100644 index 0000000..9ff0a06 --- /dev/null +++ b/byteman.spec @@ -0,0 +1,154 @@ +Name: byteman +Version: 4.0.4 +Release: 3 +Summary: Injection of track and test into Java programs +License: LGPLv2+ +URL: https://byteman.jboss.org/ +Source0: https://github.com/bytemanproject/byteman/archive/%{version}.tar.gz +BuildArch: noarch + +BuildRequires: java-10-openjdk-devel maven-local maven-shade-plugin +BuildRequires: maven-source-plugin maven-plugin-plugin maven-plugin-bundle +BuildRequires: maven-assembly-plugin maven-failsafe-plugin maven-jar-plugin +BuildRequires: maven-surefire-plugin maven-surefire-provider-testng +BuildRequires: maven-surefire-provider-junit maven-verifier-plugin +BuildRequires: maven-dependency-plugin java_cup jarjar objectweb-asm junit testng +BuildRequires: mvn(org.jboss.modules:jboss-modules) +Provides: bundled(objectweb-asm) = 6.2 bundled(java_cup) = 1:0.11b-8 +Requires: java-headless >= 1:1.8 +Patch1: remove_submit_integration_test_verification.patch + +%description +Byteman is a tool which makes it easy to trace, monitor and test the behaviour \ +of Java application and JDK runtime code. It injects Java code into your application \ +methods or into Java runtime methods without the need for you to recompile, repackage \ +or even redeploy your application. Injection can be performed at JVM startup or after \ +startup while the application is still running. Injected code can access any of your data \ +and call any application methods, including where they are private. You can inject code \ +almost anywhere you want and there is no need to prepare the original source code in advance. + +%package help +Summary: API help documentation for byteman +Provides: byteman-javadoc = %{version}-%{release} +Obsoletes: byteman-javadoc < %{version}-%{release} +%description help +This package contains the API help documentation for byteman. + +%package rulecheck-maven-plugin +Summary: Plugin for checking rules +%description rulecheck-maven-plugin +This package contains the rule check maven plugin. + +%package bmunit +Summary: Integration of TestNG and JUnit integration +%description bmunit +The Byteman BMUnit package integrates Byteman with JUnit and TestNG making it easy for you \ +to use Byteman to extend the range of your unit and integration tests. + +%package dtest +Summary: Remote instrumented testing. + +%description dtest +This package provides The Byteman dtest jar, which supports instrumentation of test code executed on \ +remote server hosts and validation of assertions describing the expected operation of the instrumented methods. + +%prep +%setup -q -n byteman-%{version} + +for p in agent/pom.xml tests/pom.xml; +do + +for s in "s|net.sf.squirrel-sql.thirdparty-non-maven|java_cup|" "s|java-cup|java_cup|"; do +sed -i ${s} ${p} +done + +done + +for id in submit.TestSubmit submit.TestSubmit.compiled; do +%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='${id}']" agent +done +%patch1 -p2 + +for id in submit.TestSubmit submit.TestSubmit.compiled; do +%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='${id}']" tests +done + +for p in scope systemPath; do +%pom_xpath_remove "pom:profiles/pom:profile/pom:dependencies/pom:dependency[pom:artifactId='tools']/pom:${p}" install +done + +for p in "pom:profiles/pom:profile/pom:dependencies/pom:dependency[pom:artifactId='tools']/pom:scope" \ + "pom:profiles/pom:profile/pom:dependencies/pom:dependency[pom:artifactId='tools']/pom:systemPath" \ + "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:executions"; +do +%pom_xpath_remove "${p}" contrib/bmunit +done + +%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:configuration" 'true' contrib/bmunit + +for d in download docs; do +%pom_disable_module ${d} +done + +%pom_remove_plugin -r :maven-javadoc-plugin +%pom_xpath_remove 'pom:execution[pom:id="make-javadoc-assembly"]' byteman + +%mvn_package ":byteman-rulecheck-maven-plugin" rulecheck-maven-plugin +%mvn_package ":byteman-bmunit" bmunit +%mvn_package ":byteman-dtest" dtest + +%build +export JAVA_HOME=/usr/lib/jvm/java-10-openjdk +%mvn_build + +%install +%mvn_install +mkdir -p -m 755 $RPM_BUILD_ROOT%{_bindir} +mkdir -p -m 755 $RPM_BUILD_ROOT%{_datadir}/byteman +mkdir -p -m 755 $RPM_BUILD_ROOT%{_datadir}/byteman/{lib,bin} + +for f in bmsubmit bmjava bminstall bmcheck; do +install -m 755 bin/${f}.sh $RPM_BUILD_ROOT%{_datadir}/byteman/bin/${f} +cat > $RPM_BUILD_ROOT%{_bindir}/${f} << EOF +#!/bin/sh + +export BYTEMAN_HOME=/usr/share/byteman +export JAVA_HOME=/usr/lib/jvm/java + +\$BYTEMAN_HOME/bin/${f} \$* +EOF +done + +chmod 755 $RPM_BUILD_ROOT%{_bindir}/* +for m in bmunit dtest install sample submit; do + ln -s %{_javadir}/byteman/byteman-${m}.jar $RPM_BUILD_ROOT%{_datadir}/byteman/lib/byteman-${m}.jar +done + +mkdir -p -m 755 $RPM_BUILD_ROOT%{_datadir}/byteman/contrib +mkdir -p -m 755 $RPM_BUILD_ROOT%{_datadir}/byteman/contrib/jboss-modules-system +ln -s %{_javadir}/byteman/byteman-jboss-modules-plugin.jar $RPM_BUILD_ROOT%{_datadir}/byteman/contrib/jboss-modules-system/byteman-jboss-modules-plugin.jar +ln -s %{_javadir}/byteman/byteman.jar $RPM_BUILD_ROOT%{_datadir}/byteman/lib/byteman.jar + +%files -f .mfiles +%{_datadir}/byteman/lib/* +%exclude %{_datadir}/byteman/lib/byteman-bmunit.jar +%exclude %{_datadir}/byteman/lib/byteman-dtest.jar +%{_datadir}/byteman/contrib/* +%{_datadir}/byteman/bin/* +%{_bindir}/* +%license docs/copyright.txt + +%files help -f .mfiles-javadoc +%doc README + +%files rulecheck-maven-plugin -f .mfiles-rulecheck-maven-plugin + +%files bmunit -f .mfiles-bmunit +%{_datadir}/byteman/lib/byteman-bmunit.jar + +%files dtest -f .mfiles-dtest +%{_datadir}/byteman/lib/byteman-dtest.jar + +%changelog +* Tue Feb 25 2020 Songshuaishuai - 4.0.4-3 +- Package init diff --git a/remove_submit_integration_test_verification.patch b/remove_submit_integration_test_verification.patch new file mode 100644 index 0000000..dae9507 --- /dev/null +++ b/remove_submit_integration_test_verification.patch @@ -0,0 +1,14 @@ +diff --git a/byteman-4.0.2/agent/verification.xml b/byteman-4.0.2/agent/verification.xml +index f530cfe..52ece06 100644 +--- a/byteman-4.0.2/agent/verification.xml ++++ b/byteman-4.0.2/agent/verification.xml +@@ -171,9 +171,5 @@ + target/failsafe-reports/org.jboss.byteman.tests.misc.TestThrowBinding.txt + + +- +- target/failsafe-reports/org.jboss.byteman.tests.submit.TestSubmit.txt +- +- + +