[2/2] perl-JSON: Installation of new package required by samba

Message ID 20220421075146.3076-2-adolf.belka@ipfire.org
State Accepted
Commit 7b5f057a485be990445fe0d5448abdd3946bca84
Headers
Series [1/2] samba: Update to version 4.16.0 |

Commit Message

Adolf Belka April 21, 2022, 7:51 a.m. UTC
  - Installation of lfs and rootfile for perl-JSON - required by samba-4.16.0

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/packages/perl-JSON | 14 +++++
 lfs/perl-JSON                       | 88 +++++++++++++++++++++++++++++
 make.sh                             |  1 +
 3 files changed, 103 insertions(+)
 create mode 100644 config/rootfiles/packages/perl-JSON
 create mode 100644 lfs/perl-JSON
  

Comments

Leo-Andres Hofmann Sept. 12, 2022, 5:49 p.m. UTC | #1
Hi Adolf,

I'm thinking about using Perl JSON in a CGI. Did I unterstand correctly 
that JSON is now available system wide by default? That would be great 
news :)

Best regards
Leo

Am 21.04.2022 um 09:51 schrieb Adolf Belka:
> - Installation of lfs and rootfile for perl-JSON - required by samba-4.16.0
>
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
>   config/rootfiles/packages/perl-JSON | 14 +++++
>   lfs/perl-JSON                       | 88 +++++++++++++++++++++++++++++
>   make.sh                             |  1 +
>   3 files changed, 103 insertions(+)
>   create mode 100644 config/rootfiles/packages/perl-JSON
>   create mode 100644 lfs/perl-JSON
>
> diff --git a/config/rootfiles/packages/perl-JSON b/config/rootfiles/packages/perl-JSON
> new file mode 100644
> index 000000000..e6c4dbb94
> --- /dev/null
> +++ b/config/rootfiles/packages/perl-JSON
> @@ -0,0 +1,14 @@
> +#usr/lib/perl5/site_perl/5.32.1/JSON
> +usr/lib/perl5/site_perl/5.32.1/JSON.pm
> +#usr/lib/perl5/site_perl/5.32.1/JSON/backportPP
> +usr/lib/perl5/site_perl/5.32.1/JSON/backportPP.pm
> +usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Boolean.pm
> +usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Compat5005.pm
> +usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Compat5006.pm
> +#usr/lib/perl5/site_perl/5.32.1/xxxMACHINExxx-linux-thread-multi/auto/JSON
> +#usr/lib/perl5/site_perl/5.32.1/xxxMACHINExxx-linux-thread-multi/auto/JSON/.packlist
> +#usr/share/man/man3/JSON.3
> +#usr/share/man/man3/JSON::backportPP.3
> +#usr/share/man/man3/JSON::backportPP::Boolean.3
> +#usr/share/man/man3/JSON::backportPP::Compat5005.3
> +#usr/share/man/man3/JSON::backportPP::Compat5006.3
> diff --git a/lfs/perl-JSON b/lfs/perl-JSON
> new file mode 100644
> index 000000000..796c1f034
> --- /dev/null
> +++ b/lfs/perl-JSON
> @@ -0,0 +1,88 @@
> +###############################################################################
> +#                                                                             #
> +# IPFire.org - A linux based firewall                                         #
> +# Copyright (C) 2007-2019  IPFire Team  <info@ipfire.org>                     #
> +#                                                                             #
> +# This program is free software: you can redistribute it and/or modify        #
> +# it under the terms of the GNU General Public License as published by        #
> +# the Free Software Foundation, either version 3 of the License, or           #
> +# (at your option) any later version.                                         #
> +#                                                                             #
> +# This program is distributed in the hope that it will be useful,             #
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
> +# GNU General Public License for more details.                                #
> +#                                                                             #
> +# You should have received a copy of the GNU General Public License           #
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
> +#                                                                             #
> +###############################################################################
> +
> +
> +###############################################################################
> +# Definitions
> +###############################################################################
> +include Config
> +
> +SUMMARY    = JSON (JavaScript Object Notation) encoder/decoder
> +
> +VER        = 4.05
> +
> +THISAPP    = JSON-$(VER)
> +DL_FILE    = ${THISAPP}.tar.gz
> +DL_FROM    = $(URL_IPFIRE)
> +DIR_APP    = $(DIR_SRC)/$(THISAPP)
> +TARGET     = $(DIR_INFO)/$(THISAPP)
> +
> +PROG       = perl-JSON
> +DEPS       =
> +PAK_VER    = 1
> +
> +SERVICES   =
> +
> +###############################################################################
> +# Top-level Rules
> +###############################################################################
> +
> +objects = $(DL_FILE)
> +
> +$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
> +
> +$(DL_FILE)_BLAKE2 = 0ecf27b15a780833fe6cb12bece6eaa5a75de92a02f901014105d1435857867d86ccad94e2666195fc66ed41f45f8f91061a06b1e5e05f3a332803b46bb4b53e
> +
> +install : $(TARGET)
> +
> +check : $(patsubst %,$(DIR_CHK)/%,$(objects))
> +
> +download :$(patsubst %,$(DIR_DL)/%,$(objects))
> +
> +b2 : $(subst %,%_BLAKE2,$(objects))
> +
> +dist:
> +	@$(PAK)
> +
> +###############################################################################
> +# Downloading, checking, b2sum
> +###############################################################################
> +
> +$(patsubst %,$(DIR_CHK)/%,$(objects)) :
> +	@$(CHECK)
> +
> +$(patsubst %,$(DIR_DL)/%,$(objects)) :
> +	@$(LOAD)
> +
> +$(subst %,%_BLAKE2,$(objects)) :
> +	@$(B2SUM)
> +
> +###############################################################################
> +# Installation Details
> +###############################################################################
> +
> +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> +	@$(PREBUILD)
> +	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
> +	cd $(DIR_APP) && perl Makefile.PL
> +	cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
> +	cd $(DIR_APP) && make install
> +	@rm -rf $(DIR_APP)
> +	@$(POSTBUILD)
> diff --git a/make.sh b/make.sh
> index 95e6e89db..5d79c803f 100755
> --- a/make.sh
> +++ b/make.sh
> @@ -1421,6 +1421,7 @@ buildipfire() {
>     lfsmake2 perl-XML-Parser
>     lfsmake2 perl-Crypt-PasswdMD5
>     lfsmake2 perl-Net-Telnet
> +  lfsmake2 perl-JSON
>     lfsmake2 python3-setuptools
>     lfsmake2 python3-inotify
>     lfsmake2 python3-docutils
  
Adolf Belka Sept. 12, 2022, 8:08 p.m. UTC | #2
Hi Leo,

On 12/09/2022 19:49, Leo-Andres Hofmann wrote:
> Hi Adolf,
> 
> I'm thinking about using Perl JSON in a CGI. Did I unterstand correctly 
> that JSON is now available system wide by default? That would be great 
> news :)
I am afraid not. It is a dependency for the samba addon and so is only 
installed when samba is installed.

It would be available as a build only dependency but it sounds like you 
need it in execution phase of the CGI.

You can just change the perl-JSON from a package rootfile to a common 
rootfile and update the lfs file to remove all the addon stuff and 
remove perl-JSON as a dependency. That would make perl-JSON a core 
program and it would then be available both for your CGI and also for 
samba, when it is installed.

Regards,
Adolf.
> 
> Best regards
> Leo
> 
> Am 21.04.2022 um 09:51 schrieb Adolf Belka:
>> - Installation of lfs and rootfile for perl-JSON - required by 
>> samba-4.16.0
>>
>> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
>> ---
>>   config/rootfiles/packages/perl-JSON | 14 +++++
>>   lfs/perl-JSON                       | 88 +++++++++++++++++++++++++++++
>>   make.sh                             |  1 +
>>   3 files changed, 103 insertions(+)
>>   create mode 100644 config/rootfiles/packages/perl-JSON
>>   create mode 100644 lfs/perl-JSON
>>
>> diff --git a/config/rootfiles/packages/perl-JSON 
>> b/config/rootfiles/packages/perl-JSON
>> new file mode 100644
>> index 000000000..e6c4dbb94
>> --- /dev/null
>> +++ b/config/rootfiles/packages/perl-JSON
>> @@ -0,0 +1,14 @@
>> +#usr/lib/perl5/site_perl/5.32.1/JSON
>> +usr/lib/perl5/site_perl/5.32.1/JSON.pm
>> +#usr/lib/perl5/site_perl/5.32.1/JSON/backportPP
>> +usr/lib/perl5/site_perl/5.32.1/JSON/backportPP.pm
>> +usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Boolean.pm
>> +usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Compat5005.pm
>> +usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Compat5006.pm
>> +#usr/lib/perl5/site_perl/5.32.1/xxxMACHINExxx-linux-thread-multi/auto/JSON
>> +#usr/lib/perl5/site_perl/5.32.1/xxxMACHINExxx-linux-thread-multi/auto/JSON/.packlist
>> +#usr/share/man/man3/JSON.3
>> +#usr/share/man/man3/JSON::backportPP.3
>> +#usr/share/man/man3/JSON::backportPP::Boolean.3
>> +#usr/share/man/man3/JSON::backportPP::Compat5005.3
>> +#usr/share/man/man3/JSON::backportPP::Compat5006.3
>> diff --git a/lfs/perl-JSON b/lfs/perl-JSON
>> new file mode 100644
>> index 000000000..796c1f034
>> --- /dev/null
>> +++ b/lfs/perl-JSON
>> @@ -0,0 +1,88 @@
>> +###############################################################################
>> +#                                                                             #
>> +# IPFire.org - A linux based 
>> firewall                                         #
>> +# Copyright (C) 2007-2019  IPFire Team  
>> <info@ipfire.org>                     #
>> +#                                                                             #
>> +# This program is free software: you can redistribute it and/or 
>> modify        #
>> +# it under the terms of the GNU General Public License as published 
>> by        #
>> +# the Free Software Foundation, either version 3 of the License, 
>> or           #
>> +# (at your option) any later 
>> version.                                         #
>> +#                                                                             #
>> +# This program is distributed in the hope that it will be 
>> useful,             #
>> +# but WITHOUT ANY WARRANTY; without even the implied warranty 
>> of              #
>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See 
>> the               #
>> +# GNU General Public License for more 
>> details.                                #
>> +#                                                                             #
>> +# You should have received a copy of the GNU General Public 
>> License           #
>> +# along with this program.  If not, see 
>> <http://www.gnu.org/licenses/>.       #
>> +#                                                                             #
>> +###############################################################################
>> +
>> +
>> +###############################################################################
>> +# Definitions
>> +###############################################################################
>> +include Config
>> +
>> +SUMMARY    = JSON (JavaScript Object Notation) encoder/decoder
>> +
>> +VER        = 4.05
>> +
>> +THISAPP    = JSON-$(VER)
>> +DL_FILE    = ${THISAPP}.tar.gz
>> +DL_FROM    = $(URL_IPFIRE)
>> +DIR_APP    = $(DIR_SRC)/$(THISAPP)
>> +TARGET     = $(DIR_INFO)/$(THISAPP)
>> +
>> +PROG       = perl-JSON
>> +DEPS       =
>> +PAK_VER    = 1
>> +
>> +SERVICES   =
>> +
>> +###############################################################################
>> +# Top-level Rules
>> +###############################################################################
>> +
>> +objects = $(DL_FILE)
>> +
>> +$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
>> +
>> +$(DL_FILE)_BLAKE2 = 
>> 0ecf27b15a780833fe6cb12bece6eaa5a75de92a02f901014105d1435857867d86ccad94e2666195fc66ed41f45f8f91061a06b1e5e05f3a332803b46bb4b53e
>> +
>> +install : $(TARGET)
>> +
>> +check : $(patsubst %,$(DIR_CHK)/%,$(objects))
>> +
>> +download :$(patsubst %,$(DIR_DL)/%,$(objects))
>> +
>> +b2 : $(subst %,%_BLAKE2,$(objects))
>> +
>> +dist:
>> +    @$(PAK)
>> +
>> +###############################################################################
>> +# Downloading, checking, b2sum
>> +###############################################################################
>> +
>> +$(patsubst %,$(DIR_CHK)/%,$(objects)) :
>> +    @$(CHECK)
>> +
>> +$(patsubst %,$(DIR_DL)/%,$(objects)) :
>> +    @$(LOAD)
>> +
>> +$(subst %,%_BLAKE2,$(objects)) :
>> +    @$(B2SUM)
>> +
>> +###############################################################################
>> +# Installation Details
>> +###############################################################################
>> +
>> +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
>> +    @$(PREBUILD)
>> +    @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
>> +    cd $(DIR_APP) && perl Makefile.PL
>> +    cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
>> +    cd $(DIR_APP) && make install
>> +    @rm -rf $(DIR_APP)
>> +    @$(POSTBUILD)
>> diff --git a/make.sh b/make.sh
>> index 95e6e89db..5d79c803f 100755
>> --- a/make.sh
>> +++ b/make.sh
>> @@ -1421,6 +1421,7 @@ buildipfire() {
>>     lfsmake2 perl-XML-Parser
>>     lfsmake2 perl-Crypt-PasswdMD5
>>     lfsmake2 perl-Net-Telnet
>> +  lfsmake2 perl-JSON
>>     lfsmake2 python3-setuptools
>>     lfsmake2 python3-inotify
>>     lfsmake2 python3-docutils
  

Patch

diff --git a/config/rootfiles/packages/perl-JSON b/config/rootfiles/packages/perl-JSON
new file mode 100644
index 000000000..e6c4dbb94
--- /dev/null
+++ b/config/rootfiles/packages/perl-JSON
@@ -0,0 +1,14 @@ 
+#usr/lib/perl5/site_perl/5.32.1/JSON
+usr/lib/perl5/site_perl/5.32.1/JSON.pm
+#usr/lib/perl5/site_perl/5.32.1/JSON/backportPP
+usr/lib/perl5/site_perl/5.32.1/JSON/backportPP.pm
+usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Boolean.pm
+usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Compat5005.pm
+usr/lib/perl5/site_perl/5.32.1/JSON/backportPP/Compat5006.pm
+#usr/lib/perl5/site_perl/5.32.1/xxxMACHINExxx-linux-thread-multi/auto/JSON
+#usr/lib/perl5/site_perl/5.32.1/xxxMACHINExxx-linux-thread-multi/auto/JSON/.packlist
+#usr/share/man/man3/JSON.3
+#usr/share/man/man3/JSON::backportPP.3
+#usr/share/man/man3/JSON::backportPP::Boolean.3
+#usr/share/man/man3/JSON::backportPP::Compat5005.3
+#usr/share/man/man3/JSON::backportPP::Compat5006.3
diff --git a/lfs/perl-JSON b/lfs/perl-JSON
new file mode 100644
index 000000000..796c1f034
--- /dev/null
+++ b/lfs/perl-JSON
@@ -0,0 +1,88 @@ 
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2019  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+
+###############################################################################
+# Definitions
+###############################################################################
+include Config
+
+SUMMARY    = JSON (JavaScript Object Notation) encoder/decoder
+
+VER        = 4.05
+
+THISAPP    = JSON-$(VER)
+DL_FILE    = ${THISAPP}.tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+
+PROG       = perl-JSON
+DEPS       =
+PAK_VER    = 1
+
+SERVICES   =
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = 0ecf27b15a780833fe6cb12bece6eaa5a75de92a02f901014105d1435857867d86ccad94e2666195fc66ed41f45f8f91061a06b1e5e05f3a332803b46bb4b53e
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+b2 : $(subst %,%_BLAKE2,$(objects))
+
+dist:
+	@$(PAK)
+
+###############################################################################
+# Downloading, checking, b2sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_BLAKE2,$(objects)) :
+	@$(B2SUM)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && perl Makefile.PL
+	cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
+	cd $(DIR_APP) && make install
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 95e6e89db..5d79c803f 100755
--- a/make.sh
+++ b/make.sh
@@ -1421,6 +1421,7 @@  buildipfire() {
   lfsmake2 perl-XML-Parser
   lfsmake2 perl-Crypt-PasswdMD5
   lfsmake2 perl-Net-Telnet
+  lfsmake2 perl-JSON
   lfsmake2 python3-setuptools
   lfsmake2 python3-inotify
   lfsmake2 python3-docutils