Skip to contentSkip to conversation

package/opkg-utils: add opkg-utils as target pkg

PATCH New Matt Weber 2 participants 2 messages Jan 26, 2021 – Jan 27, 2021

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH 1/1 package/opkg-utils: add opkg-utils as target pkg

From: Ryan Barnett <[email protected]>

Supports a use case of building container rootfs images where a matching target version of the tools is required for online repackaging of a installer archive.

---
 DEVELOPERS                       | 1 +
 package/Config.in                | 1 +
 package/opkg-utils/Config.in     | 6 ++++++
 package/opkg-utils/opkg-utils.mk | 9 +++++++++
 4 files changed, 17 insertions(+)
 create mode 100644 package/opkg-utils/Config.in
DEVELOPERS +1 -0
index 7af3081760..3638efe6d5 100644
@@ -1750,6 +1750,7 @@ F:	package/mtools/
 F:	package/nginx-upload/
 F:	package/omniorb/
 F:	package/openresolv/
+F:	package/opkg-utils/
 F:	package/paxtest/
 F:	package/picocom/
 F:	package/policycoreutils/
package/Config.in +1 -0
index 12bd0608e3..18873c46c9 100644
@@ -2334,6 +2334,7 @@ comment "See the manual:                                        "
 comment "http://buildroot.org/manual.html#faq-no-binary-packages"
 comment "-------------------------------------------------------"
 	source "package/opkg/Config.in"
+	source "package/opkg-utils/Config.in"
 	source "package/rpm/Config.in"
 endmenu
 
package/opkg-utils/Config.in new file +6 -0
new file mode 100644
index 0000000000..03172ea4da
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_OPKG_UTILS
+	bool "opkg-utils"
+	help
+	  Helper scripts for use with the opkg package manager.
+
+	  https://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/
package/opkg-utils/opkg-utils.mk +9 -0
index a94a4cd5cd..ed4e73e7f0 100644
@@ -12,6 +12,14 @@ OPKG_UTILS_LICENSE_FILES = COPYING
 
 HOST_OPKG_UTILS_DEPENDENCIES += $(BR2_PYTHON3_HOST_DEPENDENCY)
 
+define OPKG_UTILS_BUILD_CMDS
+	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+endef
+
+define OPKG_UTILS_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) PREFIX=$(TARGET_DIR) install
+endef
+
 define HOST_OPKG_UTILS_BUILD_CMDS
 	$(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS)
 endef
@@ -20,4 +28,5 @@ define HOST_OPKG_UTILS_INSTALL_CMDS
 	$(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install
 endef
 
+$(eval $(generic-package))
 $(eval $(host-generic-package))
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 package/opkg-utils: add opkg-utils as target pkg

On 2021-01-26 13:26 -0600, Matt Weber spake thusly:

Quoted 46 lines

From: Ryan Barnett <[email protected]>

Supports a use case of building container rootfs images where a matching target version of the tools is required for online repackaging of a installer archive.

---
 DEVELOPERS                       | 1 +
 package/Config.in                | 1 +
 package/opkg-utils/Config.in     | 6 ++++++
 package/opkg-utils/opkg-utils.mk | 9 +++++++++
 4 files changed, 17 insertions(+)
 create mode 100644 package/opkg-utils/Config.in
DEVELOPERS +1 -0
index 7af3081760..3638efe6d5 100644
@@ -1750,6 +1750,7 @@ F:	package/mtools/
 F:	package/nginx-upload/
 F:	package/omniorb/
 F:	package/openresolv/
+F:	package/opkg-utils/
 F:	package/paxtest/
 F:	package/picocom/
 F:	package/policycoreutils/
package/Config.in +1 -0
index 12bd0608e3..18873c46c9 100644
@@ -2334,6 +2334,7 @@ comment "See the manual:                                        "
 comment "http://buildroot.org/manual.html#faq-no-binary-packages"
 comment "-------------------------------------------------------"
 	source "package/opkg/Config.in"
+	source "package/opkg-utils/Config.in"
 	source "package/rpm/Config.in"
 endmenu
 
package/opkg-utils/Config.in new file +0 -0
new file mode 100644
index 0000000000..03172ea4da

package/opkg-utils/Config.in line 2

Quoted 2 lines
package/opkg-utils/Config.in new file +2 -0
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_OPKG_UTILS
+	bool "opkg-utils"

It installs many python3 scripts, so it must depend on python3.

It also installs many bash scripts, so it must depend on bash.

package/opkg-utils/opkg-utils.mk OPKG_UTILS_LICENSE_FILES = COPYING · line 13

Quoted 11 lines
package/opkg-utils/Config.in new file +4 -0
+	help
+	  Helper scripts for use with the opkg package manager.
+
+	  https://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/
package/opkg-utils/opkg-utils.mk +0 -0
index a94a4cd5cd..ed4e73e7f0 100644
@@ -12,6 +12,14 @@ OPKG_UTILS_LICENSE_FILES = COPYING
 
 HOST_OPKG_UTILS_DEPENDENCIES += $(BR2_PYTHON3_HOST_DEPENDENCY)

... see this dependency on host-python3 for the host variant.

package/opkg-utils/opkg-utils.mk OPKG_UTILS_LICENSE_FILES = COPYING · line 21

Quoted 7 lines
package/opkg-utils/opkg-utils.mk +7 -0
+define OPKG_UTILS_BUILD_CMDS
+	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+endef
+
+define OPKG_UTILS_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) PREFIX=$(TARGET_DIR) install
+endef

I'm not quite sure why we need to call make at all, since all it instlls are scripts (sh, bash, or python3). All that make does is build the documentation, which requires pod2man, which is provided by... perl.

Ah but the install step is unconditional. Meh...

Can we patch it out?

Regards,
Yann E. MORIN.

Quoted 16 lines
package/opkg-utils/opkg-utils.mk +1 -0
 define HOST_OPKG_UTILS_BUILD_CMDS
 	$(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS)
 endef
@@ -20,4 +28,5 @@ define HOST_OPKG_UTILS_INSTALL_CMDS
 	$(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install
 endef
 
+$(eval $(generic-package))
 $(eval $(host-generic-package))
Signature · 6 lines
2.17.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'