Commit graph jw-pkg/scripts/create-mkspec.sh
Author SHA1 Message Date
d3e581f03d
create-mkspec.sh: Tolerate comma-separated subpackages
subpackages = "run, devel" is not tolerated by create-mkspec.sh. It
expects "run devel", which goes against the grain of the other
metadata, so make it at least tolerate the more common
comma-separated variant.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-22 11:06:58 +02:00
77c746571a
scripts: Fix shellcheck errors
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m23s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m30s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m2s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m6s
CI / Packaging test (push) Successful in 0s
Fix shellcheck SC2068 (unquoted array expansions), SC2145 (mixed
string/array arguments), SC2328 (redirection in command
substitution), SC2173 (untrapable signals), and SC2148 (missing
shebang) errors across 14 script files.

Also configure scripts/Makefile with --severity=error so that only
errors (not warnings or notes) cause check failures. To be tightened
by follow-up commits.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-29 17:52:24 +02:00
514d66dac1
cmds.distro.CmdInfo: Rename to cmds.platform.CmdInfo
Rename command "distro" to "pkg" together with "info", its last
remaining subcommand. "distro" is often used in the sense of "Linux
distribution", which would be too narrow for the targets jw-pkg could
theoretically support.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-04-24 16:53:55 +02:00
1da00283d1 jw.pkg.cmds.projects.CmdOsCascade: Remove
CmdOsCascade is superseeded by CmdInfo. Use the latter and retire the
former.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
132dce8b3f jw-projects.py: Rename it to jw-pkg.py
jw-projects.py is now a multi-call executable, with "projects" being
just one of its subcommands. Rename it to jw-pkg.py to reflect that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-28 15:24:16 +01:00
dd5adbfcfc create-mkspec.sh: Use jw-projects.py os-cascade
In the os_cascade() function, don't roll own logic, call the richer
jw-projects.py projects os-cascade instead.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-26 17:58:23 +01:00
0b83c863a2 jw.build.cmds: Move build.cmds -> cmds.projects
Reorganize the Python module structure. Placing the command classes
under jw.cmds.projects instead of jw.build.cmds will allow to add a
nested command structure, with the current commands, being mostly
related to building software, found below a "projects" toplevel
command.

Other conceivable commands could be "package" for packaging, or
"distro" for commands wrapping the distribution's package manager.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-26 17:58:23 +01:00
fbc9e3a001 make, scripts: Rename projects.py -> jw-projects.py
projects.py is too unspecific, rename it to jw-projects.py.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-15 12:06:38 +01:00
82eb80979d bin, make, scripts: Re-add files necessary for packaging jw-build
Re-add all files necessary to package jw-build itself, i.e.
sucessfully run make pkg-rebuild-reinstall. This adds 1892 lines of
code.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 11:22:50 +01:00
bc883deed4 Everywhere: Remove everything non-essential for "make clean all"
This commit removes everything not strictly necessary for running
"make clean all" inside jw-build.

packaging jw-devtest. This cuts the repo down from 24077 to 4725
lines of code.

The idea is to

1) Further remove bloat from the remaining bits

2) Re-add what's necessary to build and package other essential repos.

   The decision should be based on whether or not jw-build can also be
   useful in a non-janware context.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 15:02:56 +01:00
144cb341b7 create-mkspec.sh: Remove -n $NAME from %prep
%prep is passed -n <name> option. This is considered an error by rpm
Release 4.20.1-1.1. It is superfluous anyway, because the name is communicated to rpm
via %setup -n <name> later in the %prep section. Remove the -n option.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-03-26 16:58:07 +00:00
bdd66dbc26 Everywhere: Rename MOD_SCRIPT_DIR -> JWB_SCRIPT_DIR
Follow name change of MODDIR -> JWBDIR.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 21:45:24 +00:00
c84f7b3f84 create-mksspec.sh: Add support for OS-cascade
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-19 09:33:12 +00:00
eecc030d74 create-mkspec.sh: Add support for global.vendor config entry
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:40 +00:00
f28afc777c make, scripts: Add support for [pkg.provides.xxx]
Add Support for manually specifying arbitrary package capabilities in
project.conf.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-07 14:34:58 +00:00
2c038f7e2d Add CentOS fix: %define debug_package %{nil}
The last commit disabled automatic addition of commands
to the %install scriptlet. That in turn broke the build
on a debugfiles.list missing from the %files section.

Added %define debug_package %{nil} to the SPEC file to
work around that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-14 11:35:52 +00:00
62643ed446 create-mkspec.sh: Exit 0 at the end of install section
Cut short CentOS magic appended to %install scriptlet, which
would generates .pyo files and other cruft.

See also https://stackoverflow.com/questions/30317213

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-14 11:18:08 +00:00
a1183a216e create-mkspec.sh: Add support for entry url in [global] of project.conf
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-11-13 11:17:43 +00:00
193db3ecdb create-mkspec.sh: Some output beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-09-07 11:02:48 +00:00
2ffe744709 create-mkspec.sh: Heavy beautification and simplification
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-09-07 10:50:25 +00:00
0d14436afb create-mkspec.sh: Create-mkspec.sh remove %exclude opt/$NAME/make/*.mk from spec
Not exactly sure why this was needed in the first place. It apparently
was introduced on 2013-03-18, and already then denoted as a kludge.

Also some more code beautification

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-09-07 10:06:58 +00:00
2a88f1ceca create-mk(spec|debian).sh: Code beautication
Beautify code and fix backtick and backslash escaping of package scripts

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-09-07 09:32:14 +00:00
1a27f6ecf5 create-mkspec.sh: Fix SUBPACKAGES selection
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-09-05 08:23:38 +00:00
0371cec047 create-mkspec.sh, pkg.sh: Fix RPM specs missing files from devel packages
This commit makes pkg.sh and create-mkspec.sh check, if a -devel package is
specified, and if not, adds the contents of the -devel file list from the
install log to the -run file list.

This also involves adding a [-s subpackage] option to the
pkg.sh milk-install-log command.

Not implemented for debian packages.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-08-31 11:19:44 +00:00
62a476ff52 Add Distribution: Tag to create-mkspec.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-12-27 09:47:14 +00:00
c42e386c76 doc, make, scripts: Add support for [pkg.conflicts.xxx]
Since the packaging machinery is pretty complicated, the information about
conflicting packages had to be passed through many APIs. The last commit
contained a patch which is left in the tree to have it in one file, it actually
is identical to this commit's diff, though. Git would save me that quirk.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-06-26 10:34:22 +00:00
94e7bff14e create-mkspec.sh: Add missing stage pre to create-mkspec.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-06-25 17:16:24 +00:00
da28b13617 create-mkdebian.sh, create-mkspec.sh: Fix debian package build
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-01-13 19:26:28 +00:00
ccde4a078c create-mkspec.sh: Fix evaluation of sections [pkg.xxx.post] and friends
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-12-19 13:22:40 +00:00
6af6704576 create-mkspec.sh: Add support for global.license option in project.conf
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-11-23 12:08:14 +00:00
0b3332cc56 ini-tools.sh: Now not passing inifile as global variable any longer
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-11-02 09:49:34 +00:00
ba46ab405d create-mkspec.sh: Section "pckg" in projects.conf is now "pkg"
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-02-11 07:25:04 +00:00
aedb473999 create-mkspec.sh: Add support for preun and postun for all packages
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-02-02 17:36:25 +00:00
07dac74d87 fix: Ytools build wasn't self-contained, i.e. pkg.sh was not found from source
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-02-02 15:56:06 +00:00
fcdc083e1f create-mkdebian.sh, create-mkspec.sh, pkg.sh: Fix pkg.sh not found
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-02-02 00:58:19 +00:00
e8ddb63c15 create-mkspec.sh: Create-mkspec.sh doesn\'t work from rpm-installed ytools
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-01-27 12:57:17 +00:00
7aa477dcde make, scripts: Add .pc to rpm packages
Next attempt on creating rpm with .pc file inside.

Signed-off-by: Jan Lindemann <jan@janware.com>
2016-01-23 12:20:05 +00:00
872348e810 create-mk*.sh: Make Debian packaging start a build
Further Debian packaging support, it now starts a build at least.

Signed-off-by: Jan Lindemann <jan@janware.com>
2015-05-26 12:28:07 +00:00
024b629859 create-mskpec.sh: INI parsing -> ini-tools.sh
Push ini-parsing from create-mkspec.sh into ini-tools.sh.

Signed-off-by: Jan Lindemann <jan@janware.com>
2015-05-26 09:57:38 +00:00
35c3e7d9d3 create-mkspec.sh: Update /install/ path regex
create-mkspec.sh: Put all paths matching /install/ into the devel
package.

Signed-off-by: Jan Lindemann <jan@janware.com>
2014-11-16 22:09:03 +00:00
f53bb0ecff create-mkspec.sh: Fix packaging regex
create-mkspec.sh puts all paths matching "make" into devel packages,
fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2014-07-21 11:44:35 +00:00
5715b7be5b create-mkspec.sh: Add experimental support for post-install scripts to create-mkspek.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2014-06-27 16:25:36 +00:00
Jan Lindemann
12cab09330 create-mkspec.sh: Only install *.mk for -devel packages
Exclude /opt/<proj>/make/*.mk if no -devel flavour is built

FIXME: This is a kludge: We can't safely assume that all *.mk-files
reside there, that's up to the project's makefile variable
definitions.

Signed-off-by: Jan Lindemann <jan@jannet.de>
2013-03-18 13:52:41 +00:00
Jan Lindemann
f1033eebda create-mkspec.sh: Honour global.subpackages 2012-04-28 14:35:10 +00:00
Jan Lindemann
2939f8e3a8 Everywhere: Merge V_1_1_29_40_POST_ACCEPTANCE 2011-02-20 14:15:22 +00:00