Summary: | [nanobsd] [patch] Enhance tools/nanobsd/fill_pkg.sh | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Lev A. Serebryakov <lev> | ||||
Component: | misc | Assignee: | Warner Losh <imp> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | 8.1-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Lev A. Serebryakov
2010-10-24 19:30:11 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-embedded Over to maintainer(s) Responsible Changed From-To: freebsd-embedded->imp I think this looks good. I'll evaluate in more depth and commit or iterate with author. Created attachment 145813 [details]
Newer version, for pkgng
It is version updated to pkgng.
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=36cfb5d50f8e8856695780a6792fb7e81816e9ee commit 36cfb5d50f8e8856695780a6792fb7e81816e9ee Author: Lev A. Serebryakov <lev@FreeBSD.org> AuthorDate: 2021-07-11 15:04:39 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-11 15:05:16 +0000 nanobsd: enhance fill_pkg.sh NanoBSD has helper script "fill_pkg.sh" which links all packages and ther dependencies from "package dump" (like /usr/ports/packages/All) to specified director. fill_pkg.sh has some limitations: 1) It needs ports tree, which should have exactly same versions as "package dump". 2) It requires full paths to needed ports, including "/usr/ports" part. 3) It has assumptions about Nano Package Dir (it assumes, that it specified rtelative to current directory). 4) It does not have any diagnostics (almost). This PR enhances "fill_pkg.sh" script in several ways: 1) Nano package dir could be absolute path. 2) Script understands four ways to specify "root" ports/packages: (a) Absolute directory with port (old one) (b) Relative directory with port, relative to ${PORTSDIR} or /usr/ports (c) Absolute path to file with package (with .tbz suffix) (d) Name of package in dump dir, with or without .tbz suffix These ways can be mixed in one call. Dependencies for packages are obtained with 'pkg_info -r' call, and are searched for in same directory as "parent" package. Dependencies for ports are obtained in old way from port's Makefile. 3) Three levels of diagnostic (and -v option, could be repeated) are added. 4) All path variables are enclosed in quotes, to make script work with paths, containing spaces. Note: imp merged in the changes to fill_pkg.sh since this has been a PR. PR: 151695 Reviewed by: imp@ MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D31101 tools/tools/nanobsd/fill_pkg.sh | 154 +++++++++++++++++++++++++++++----------- 1 file changed, 113 insertions(+), 41 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=1405d761ba36f6adc59986999befddaf1bedee3f commit 1405d761ba36f6adc59986999befddaf1bedee3f Author: Lev A. Serebryakov <lev@FreeBSD.org> AuthorDate: 2021-07-11 15:04:39 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-16 18:28:44 +0000 nanobsd: enhance fill_pkg.sh NanoBSD has helper script "fill_pkg.sh" which links all packages and ther dependencies from "package dump" (like /usr/ports/packages/All) to specified director. fill_pkg.sh has some limitations: 1) It needs ports tree, which should have exactly same versions as "package dump". 2) It requires full paths to needed ports, including "/usr/ports" part. 3) It has assumptions about Nano Package Dir (it assumes, that it specified rtelative to current directory). 4) It does not have any diagnostics (almost). This PR enhances "fill_pkg.sh" script in several ways: 1) Nano package dir could be absolute path. 2) Script understands four ways to specify "root" ports/packages: (a) Absolute directory with port (old one) (b) Relative directory with port, relative to ${PORTSDIR} or /usr/ports (c) Absolute path to file with package (with .tbz suffix) (d) Name of package in dump dir, with or without .tbz suffix These ways can be mixed in one call. Dependencies for packages are obtained with 'pkg_info -r' call, and are searched for in same directory as "parent" package. Dependencies for ports are obtained in old way from port's Makefile. 3) Three levels of diagnostic (and -v option, could be repeated) are added. 4) All path variables are enclosed in quotes, to make script work with paths, containing spaces. Note: imp merged in the changes to fill_pkg.sh since this has been a PR. PR: 151695 Reviewed by: imp@ MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D31101 (cherry picked from commit 36cfb5d50f8e8856695780a6792fb7e81816e9ee) tools/tools/nanobsd/fill_pkg.sh | 154 +++++++++++++++++++++++++++++----------- 1 file changed, 113 insertions(+), 41 deletions(-) |