* [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default"
@ 2019-02-21 3:23 Fang Jia
2019-02-21 3:23 ` [PATCH 2/2] openjdk: add openjdk-config Fang Jia
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Fang Jia @ 2019-02-21 3:23 UTC (permalink / raw)
To: git, openembedded-devel
This reverts commit ada652564f09756a81f54495cbc2091125239625.
When enable multilib on a 64-bit system, probably both base-file and
lib32-base-files are installed.
Then both packages want to modify the file "profile", there will be
an error like:
"
Error: Transaction check error:
file /etc/profile conflicts between attempted installs of
lib32-base-files-3.0.14-r148.gpb_virt and
base-files-3.0.14-r148.gpb_virt
"
The task can be added by adding a file to ${sysconfdir}/profile.d/.
Signed-off-by: Fang Jia <fang.jia@windriver.com>
---
recipes-core/base-files/base-files_3.0.14.bbappend | 13 -------------
1 file changed, 13 deletions(-)
delete mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend
diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend
deleted file mode 100644
index 4651185..0000000
--- a/recipes-core/base-files/base-files_3.0.14.bbappend
+++ /dev/null
@@ -1,13 +0,0 @@
-do_install_append() {
- cat >> ${D}${sysconfdir}/profile << EOT
-JAVA_HOME=""
-for dir in ${libdir}/jvm/*; do
- if [ -x "\${dir}/bin/java" ]; then
- [ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
- fi
-done
-if [ -n "\${JAVA_HOME}" ]; then
- export JAVA_HOME=\${JAVA_HOME}
-fi
-EOT
-}
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] openjdk: add openjdk-config
2019-02-21 3:23 [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Fang Jia
@ 2019-02-21 3:23 ` Fang Jia
2019-07-22 2:53 ` Jia, Fang
2019-02-22 8:52 ` [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Richard Leitner
2019-07-19 8:04 ` Richard Leitner
2 siblings, 1 reply; 7+ messages in thread
From: Fang Jia @ 2019-02-21 3:23 UTC (permalink / raw)
To: git, openembedded-devel
* Create a new package openjdk-config which used to set variable value
for openjdk.
* The LICENSE file of openjdk-config is COPYING.MIT.
* Allow JAVA_HOME to be configured via a variable of the same name.
* Define JAVA_HOME by default in openjdk-config.sh file.
Signed-off-by: Fang Jia <fang.jia@windriver.com>
---
recipes-core/openjdk/openjdk-config.bb | 24 ++++++++++++++++++++++
recipes-core/openjdk/openjdk-config/COPYING.MIT | 17 +++++++++++++++
.../openjdk/openjdk-config/openjdk-config.sh | 11 ++++++++++
3 files changed, 52 insertions(+)
create mode 100644 recipes-core/openjdk/openjdk-config.bb
create mode 100644 recipes-core/openjdk/openjdk-config/COPYING.MIT
create mode 100644 recipes-core/openjdk/openjdk-config/openjdk-config.sh
diff --git a/recipes-core/openjdk/openjdk-config.bb b/recipes-core/openjdk/openjdk-config.bb
new file mode 100644
index 0000000..34f9356
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-config.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Configuration script to set variables"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PR = "r1"
+
+SRC_URI = "file://COPYING.MIT \
+ file://openjdk-config.sh \
+"
+
+S = "${WORKDIR}"
+
+# Set the default value
+JAVA_HOME ?= ""
+
+do_configure() {
+ sed -i "s%@JAVA_HOME@%${JAVA_HOME}%" openjdk-config.sh
+ sed -i "s%@libdir@%${libdir}%" openjdk-config.sh
+}
+
+do_install() {
+ install -d ${D}${sysconfdir}/profile.d
+ install -m 0755 openjdk-config.sh ${D}${sysconfdir}/profile.d/
+}
diff --git a/recipes-core/openjdk/openjdk-config/COPYING.MIT b/recipes-core/openjdk/openjdk-config/COPYING.MIT
new file mode 100644
index 0000000..fb950dc
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-config/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/recipes-core/openjdk/openjdk-config/openjdk-config.sh b/recipes-core/openjdk/openjdk-config/openjdk-config.sh
new file mode 100644
index 0000000..34b49d6
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-config/openjdk-config.sh
@@ -0,0 +1,11 @@
+JAVA_HOME="@JAVA_HOME@"
+libdir="@libdir@"
+
+for dir in ${libdir}/jvm/*; do
+ if [ -x "${dir}/bin/java" ]; then
+ [ -z "${JAVA_HOME}" ] && JAVA_HOME="${dir}"
+ fi
+done
+if [ -n "${JAVA_HOME}" ]; then
+ export JAVA_HOME=${JAVA_HOME}
+fi
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default"
2019-02-21 3:23 [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Fang Jia
2019-02-21 3:23 ` [PATCH 2/2] openjdk: add openjdk-config Fang Jia
@ 2019-02-22 8:52 ` Richard Leitner
2019-02-25 2:05 ` Jia, Fang
2019-05-30 8:33 ` Jia, Fang
2019-07-19 8:04 ` Richard Leitner
2 siblings, 2 replies; 7+ messages in thread
From: Richard Leitner @ 2019-02-22 8:52 UTC (permalink / raw)
To: openembedded-devel
Hi,
thanks for the patch. Looks good to me now.
I'll add it to my tests and will give feedback.
Nonetheless things to improve for your next contribution:
a) Please add [meta-java] to the subject
b) Please version the patchset when it updates an existing one
on the mailinglist
Therefore the correct subject prefix for this patchset would have been:
[oe][meta-java][PATCH V2 1/2]
No problem for this one as I found it, but please keep an eye on that
for the next time. Thanks.
regards;Richard.L
On 21/02/2019 04:23, Fang Jia wrote:
> This reverts commit ada652564f09756a81f54495cbc2091125239625.
>
> When enable multilib on a 64-bit system, probably both base-file and
> lib32-base-files are installed.
> Then both packages want to modify the file "profile", there will be
> an error like:
> "
> Error: Transaction check error:
> file /etc/profile conflicts between attempted installs of
> lib32-base-files-3.0.14-r148.gpb_virt and
> base-files-3.0.14-r148.gpb_virt
> "
>
> The task can be added by adding a file to ${sysconfdir}/profile.d/.
>
> Signed-off-by: Fang Jia <fang.jia@windriver.com>
> ---
> recipes-core/base-files/base-files_3.0.14.bbappend | 13 -------------
> 1 file changed, 13 deletions(-)
> delete mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend
>
> diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend
> deleted file mode 100644
> index 4651185..0000000
> --- a/recipes-core/base-files/base-files_3.0.14.bbappend
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -do_install_append() {
> - cat >> ${D}${sysconfdir}/profile << EOT
> -JAVA_HOME=""
> -for dir in ${libdir}/jvm/*; do
> - if [ -x "\${dir}/bin/java" ]; then
> - [ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
> - fi
> -done
> -if [ -n "\${JAVA_HOME}" ]; then
> - export JAVA_HOME=\${JAVA_HOME}
> -fi
> -EOT
> -}
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default"
2019-02-22 8:52 ` [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Richard Leitner
@ 2019-02-25 2:05 ` Jia, Fang
2019-05-30 8:33 ` Jia, Fang
1 sibling, 0 replies; 7+ messages in thread
From: Jia, Fang @ 2019-02-25 2:05 UTC (permalink / raw)
To: Richard Leitner, openembedded-devel
Hi,
Thank you so much.
Next time will do as your instruction definitely. Thanks again.
Regards,
Fang
On 22/02/2019 16:52, Richard Leitner wrote:
> Hi,
> thanks for the patch. Looks good to me now.
> I'll add it to my tests and will give feedback.
>
> Nonetheless things to improve for your next contribution:
> a) Please add [meta-java] to the subject
> b) Please version the patchset when it updates an existing one
> on the mailinglist
>
> Therefore the correct subject prefix for this patchset would have been:
> [oe][meta-java][PATCH V2 1/2]
>
> No problem for this one as I found it, but please keep an eye on that for the
> next time. Thanks.
>
> regards;Richard.L
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default"
2019-02-22 8:52 ` [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Richard Leitner
2019-02-25 2:05 ` Jia, Fang
@ 2019-05-30 8:33 ` Jia, Fang
1 sibling, 0 replies; 7+ messages in thread
From: Jia, Fang @ 2019-05-30 8:33 UTC (permalink / raw)
To: Richard Leitner, openembedded-devel
Hi Richard
How about the test for the two patches ? Is it fine to push to master branch ?
Thanks,
Fang
On 22/02/2019 16:52, Richard Leitner wrote:
> Hi,
> thanks for the patch. Looks good to me now.
> I'll add it to my tests and will give feedback.
>
> Nonetheless things to improve for your next contribution:
> a) Please add [meta-java] to the subject
> b) Please version the patchset when it updates an existing one
> on the mailinglist
>
> Therefore the correct subject prefix for this patchset would have been:
> [oe][meta-java][PATCH V2 1/2]
>
> No problem for this one as I found it, but please keep an eye on that for the
> next time. Thanks.
>
> regards;Richard.L
>
> On 21/02/2019 04:23, Fang Jia wrote:
>> This reverts commit ada652564f09756a81f54495cbc2091125239625.
>>
>> When enable multilib on a 64-bit system, probably both base-file and
>> lib32-base-files are installed.
>> Then both packages want to modify the file "profile", there will be
>> an error like:
>> "
>> Error: Transaction check error:
>> file /etc/profile conflicts between attempted installs of
>> lib32-base-files-3.0.14-r148.gpb_virt and
>> base-files-3.0.14-r148.gpb_virt
>> "
>>
>> The task can be added by adding a file to ${sysconfdir}/profile.d/.
>>
>> Signed-off-by: Fang Jia <fang.jia@windriver.com>
>> ---
>> recipes-core/base-files/base-files_3.0.14.bbappend | 13 -------------
>> 1 file changed, 13 deletions(-)
>> delete mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend
>>
>> diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend
>> b/recipes-core/base-files/base-files_3.0.14.bbappend
>> deleted file mode 100644
>> index 4651185..0000000
>> --- a/recipes-core/base-files/base-files_3.0.14.bbappend
>> +++ /dev/null
>> @@ -1,13 +0,0 @@
>> -do_install_append() {
>> - cat >> ${D}${sysconfdir}/profile << EOT
>> -JAVA_HOME=""
>> -for dir in ${libdir}/jvm/*; do
>> - if [ -x "\${dir}/bin/java" ]; then
>> - [ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
>> - fi
>> -done
>> -if [ -n "\${JAVA_HOME}" ]; then
>> - export JAVA_HOME=\${JAVA_HOME}
>> -fi
>> -EOT
>> -}
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default"
2019-02-21 3:23 [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Fang Jia
2019-02-21 3:23 ` [PATCH 2/2] openjdk: add openjdk-config Fang Jia
2019-02-22 8:52 ` [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Richard Leitner
@ 2019-07-19 8:04 ` Richard Leitner
2 siblings, 0 replies; 7+ messages in thread
From: Richard Leitner @ 2019-07-19 8:04 UTC (permalink / raw)
To: Fang Jia, git, openembedded-devel
Hi,
this is a note to let you know that I've just added this patch to the
master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java
As soon as it has gone through some more testing it will likely be
merged to the master branch.
If you have any questions, please let me know.
regards;Richard.L
On 21/02/2019 04:23, Fang Jia wrote:
> This reverts commit ada652564f09756a81f54495cbc2091125239625.
>
> When enable multilib on a 64-bit system, probably both base-file and
> lib32-base-files are installed.
> Then both packages want to modify the file "profile", there will be
> an error like:
> "
> Error: Transaction check error:
> file /etc/profile conflicts between attempted installs of
> lib32-base-files-3.0.14-r148.gpb_virt and
> base-files-3.0.14-r148.gpb_virt
> "
>
> The task can be added by adding a file to ${sysconfdir}/profile.d/.
>
> Signed-off-by: Fang Jia <fang.jia@windriver.com>
> ---
> recipes-core/base-files/base-files_3.0.14.bbappend | 13 -------------
> 1 file changed, 13 deletions(-)
> delete mode 100644 recipes-core/base-files/base-files_3.0.14.bbappend
>
> diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend
> deleted file mode 100644
> index 4651185..0000000
> --- a/recipes-core/base-files/base-files_3.0.14.bbappend
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -do_install_append() {
> - cat >> ${D}${sysconfdir}/profile << EOT
> -JAVA_HOME=""
> -for dir in ${libdir}/jvm/*; do
> - if [ -x "\${dir}/bin/java" ]; then
> - [ -z "\${JAVA_HOME}" ] && JAVA_HOME="\${dir}"
> - fi
> -done
> -if [ -n "\${JAVA_HOME}" ]; then
> - export JAVA_HOME=\${JAVA_HOME}
> -fi
> -EOT
> -}
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] openjdk: add openjdk-config
2019-02-21 3:23 ` [PATCH 2/2] openjdk: add openjdk-config Fang Jia
@ 2019-07-22 2:53 ` Jia, Fang
0 siblings, 0 replies; 7+ messages in thread
From: Jia, Fang @ 2019-07-22 2:53 UTC (permalink / raw)
To: git, openembedded-devel, Richard Leitner
Hi, Richard Leitner
How about this patch ? Could you help to give some suggestions ?
Thanks,
Fang
On 21/02/2019 11:23, Fang Jia wrote:
> * Create a new package openjdk-config which used to set variable value
> for openjdk.
> * The LICENSE file of openjdk-config is COPYING.MIT.
> * Allow JAVA_HOME to be configured via a variable of the same name.
> * Define JAVA_HOME by default in openjdk-config.sh file.
>
> Signed-off-by: Fang Jia <fang.jia@windriver.com>
> ---
> recipes-core/openjdk/openjdk-config.bb | 24 ++++++++++++++++++++++
> recipes-core/openjdk/openjdk-config/COPYING.MIT | 17 +++++++++++++++
> .../openjdk/openjdk-config/openjdk-config.sh | 11 ++++++++++
> 3 files changed, 52 insertions(+)
> create mode 100644 recipes-core/openjdk/openjdk-config.bb
> create mode 100644 recipes-core/openjdk/openjdk-config/COPYING.MIT
> create mode 100644 recipes-core/openjdk/openjdk-config/openjdk-config.sh
>
> diff --git a/recipes-core/openjdk/openjdk-config.bb b/recipes-core/openjdk/openjdk-config.bb
> new file mode 100644
> index 0000000..34f9356
> --- /dev/null
> +++ b/recipes-core/openjdk/openjdk-config.bb
> @@ -0,0 +1,24 @@
> +SUMMARY = "Configuration script to set variables"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> +
> +PR = "r1"
> +
> +SRC_URI = "file://COPYING.MIT \
> + file://openjdk-config.sh \
> +"
> +
> +S = "${WORKDIR}"
> +
> +# Set the default value
> +JAVA_HOME ?= ""
> +
> +do_configure() {
> + sed -i "s%@JAVA_HOME@%${JAVA_HOME}%" openjdk-config.sh
> + sed -i "s%@libdir@%${libdir}%" openjdk-config.sh
> +}
> +
> +do_install() {
> + install -d ${D}${sysconfdir}/profile.d
> + install -m 0755 openjdk-config.sh ${D}${sysconfdir}/profile.d/
> +}
> diff --git a/recipes-core/openjdk/openjdk-config/COPYING.MIT b/recipes-core/openjdk/openjdk-config/COPYING.MIT
> new file mode 100644
> index 0000000..fb950dc
> --- /dev/null
> +++ b/recipes-core/openjdk/openjdk-config/COPYING.MIT
> @@ -0,0 +1,17 @@
> +Permission is hereby granted, free of charge, to any person obtaining a copy
> +of this software and associated documentation files (the "Software"), to deal
> +in the Software without restriction, including without limitation the rights
> +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> +copies of the Software, and to permit persons to whom the Software is
> +furnished to do so, subject to the following conditions:
> +
> +The above copyright notice and this permission notice shall be included in
> +all copies or substantial portions of the Software.
> +
> +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> +THE SOFTWARE.
> diff --git a/recipes-core/openjdk/openjdk-config/openjdk-config.sh b/recipes-core/openjdk/openjdk-config/openjdk-config.sh
> new file mode 100644
> index 0000000..34b49d6
> --- /dev/null
> +++ b/recipes-core/openjdk/openjdk-config/openjdk-config.sh
> @@ -0,0 +1,11 @@
> +JAVA_HOME="@JAVA_HOME@"
> +libdir="@libdir@"
> +
> +for dir in ${libdir}/jvm/*; do
> + if [ -x "${dir}/bin/java" ]; then
> + [ -z "${JAVA_HOME}" ] && JAVA_HOME="${dir}"
> + fi
> +done
> +if [ -n "${JAVA_HOME}" ]; then
> + export JAVA_HOME=${JAVA_HOME}
> +fi
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-07-22 2:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-21 3:23 [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Fang Jia
2019-02-21 3:23 ` [PATCH 2/2] openjdk: add openjdk-config Fang Jia
2019-07-22 2:53 ` Jia, Fang
2019-02-22 8:52 ` [PATCH 1/2] Revert "base-files: Define JAVA_HOME by default" Richard Leitner
2019-02-25 2:05 ` Jia, Fang
2019-05-30 8:33 ` Jia, Fang
2019-07-19 8:04 ` Richard Leitner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox