Bug 219405

Summary: NanoBSD NANO_PACKAGE_LIST does not support "*" anymore?
Product: Base System Reporter: Wout Decré <wout>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: imp, karl, wout
Priority: --- Keywords: patch
Version: 11.0-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
_.cust.cust_pkgng
none
proposed patch to fix NANO_PACKAGE_LIST none

Description Wout Decré 2017-05-19 16:38:02 UTC
Created attachment 182741 [details]
_.cust.cust_pkgng

In tools/tools/nanobsd/defaults.sh, NANO_PACKAGE_LIST has a value of "*" by default. This used to install all the packages in NANO_PACKAGE_DIR inside the NanoBSD build.

However, in r297621, cust_pkgng was updated. It seems it does not support a "*" value anymore (see also example _.cust.cust_pkgng in attachment):

1) It does not cd to NANO_PACKAGE_DIR, so it tries and fails to install the first file/directory in the tools/tools/nanobsd directory.

2) If above would be fixed, it would try to install the bootstrap "pkg-*" package twice.

Is the "*" value not supported anymore? Should I replace NANO_PACKAGE_LIST with a full list of files inside NANO_PACKAGE_DIR? But then shouldn't the default value be updated?
Comment 1 Wout Decré 2017-05-19 21:16:56 UTC
Created attachment 182748 [details]
proposed patch to fix NANO_PACKAGE_LIST

Use find to get list of packages, make sure it is unique since NANO_PACKAGE_LIST might contain (multiple) "*" to match filenames. Ignore pkg-* since it should have been installed already.

My build does now succeed, but I have yet to test the image.
Comment 2 karl 2017-06-15 12:34:53 UTC
This just bit me pretty hard (attempting to build a bootable "packaged up" SD image for the PCEngines board I just got) and the patch above appears to fix it..... (the build completes ok at this point, at least -- now to test it all)
Comment 3 Wout Decré 2017-06-16 08:11:34 UTC
(In reply to karl from comment #2)

I am also using a PC Engines board. It is running smooth for almost a month with the above patch.

Would be nice if this could be fixed in next release.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-07-28 02:00:44 UTC
A commit references this bug:

Author: imp
Date: Fri Jul 28 01:59:53 UTC 2017
New revision: 321636
URL: https://svnweb.freebsd.org/changeset/base/321636

Log:
  Properly expand shell glob characters in NANO_PACKAGE_LIST.

  The defualt NANO_PACKAGE_LIST is *, which fails to work
  properly. Expand glob characters and make sure that we install the
  special pkg package first.

  Sponsored by: Netflix
  Submitted by: wout at canodus dot be
  PR: 219405
  MFC After: 3 days

Changes:
  head/tools/tools/nanobsd/defaults.sh