diff --git a/mantle/cmd/kola/devshell.go b/mantle/cmd/kola/devshell.go index 229db5c7790258e6585ac02a430d8c50959c1e44..0fb1ab8d214ec91996b63363e0aa5911cf91c8b0 100644 --- a/mantle/cmd/kola/devshell.go +++ b/mantle/cmd/kola/devshell.go @@ -39,7 +39,7 @@ import ( "golang.org/x/term" ) -const devshellHostname = "cosa-devsh" +const devshellHostname = "nosa-devsh" func stripControlCharacters(s string) string { s = strings.ToValidUTF8(s, "") diff --git a/mantle/cmd/plume/cosa2stream.go b/mantle/cmd/plume/cosa2stream.go index b43f2afd2bec15f96faf8c94221d8184f1633bd7..1103cb3a1122fe78c67026a66ebcd32d0c583dbe 100644 --- a/mantle/cmd/plume/cosa2stream.go +++ b/mantle/cmd/plume/cosa2stream.go @@ -136,7 +136,7 @@ func runCosaBuildToStream(cmd *cobra.Command, args []string) error { cosaArgs = append(cosaArgs, "--url="+arg) cosaArgs = append(cosaArgs, "--stream-name="+archStreamName) cosaArgs = append(cosaArgs, "--output="+releaseTmpf.Name()) - c := exec.Command("cosa", cosaArgs...) + c := exec.Command("nosa", cosaArgs...) c.Stderr = os.Stderr if err := c.Run(); err != nil { return err diff --git a/mantle/util/distros.go b/mantle/util/distros.go index 85eda44084ac4629df5ff34cafd80bc06f7900e4..8ddf800fa7d68a3b7af90150bfa2b540b7b26963 100644 --- a/mantle/util/distros.go +++ b/mantle/util/distros.go @@ -29,6 +29,9 @@ func TargetDistroFromName(artifact string) string { if strings.HasPrefix(basename, "rhcos-") { return "rhcos" } + if strings.HasPrefix(basename, "nestos-") { + return "nestos" + } // For now, just assume fcos return "fcos" } @@ -42,6 +45,8 @@ func TargetDistro(build *builds.Build) (string, error) { return "rhcos", nil case "fedora-coreos": return "fcos", nil + case "nestos": + return "nestos", nil default: return "", fmt.Errorf("Unknown distribution: %s", build.Name) } diff --git a/src/cmd-build b/src/cmd-build index 43e74cacf75f988051b6c6df695df782c81c2ce1..322906837e705d65df556a5fa1d18baec1419f28 100755 --- a/src/cmd-build +++ b/src/cmd-build @@ -7,8 +7,8 @@ dn=$(dirname "$0") print_help() { cat 1>&2 <<'EOF' -Usage: coreos-assembler build --help - coreos-assembler build [OPTIONS]... [TARGET]... +Usage: nestos-assembler build --help + nestos-assembler build [OPTIONS]... [TARGET]... Build OSTree and image base artifacts from previously fetched packages. Accepted TARGET arguments: diff --git a/src/cmd-build-fast b/src/cmd-build-fast index 8addc35f695d9d488177b93a023f202ab6baa4fd..f9f9b70d8fbd6473a00100864d3e007893218432 100755 --- a/src/cmd-build-fast +++ b/src/cmd-build-fast @@ -19,7 +19,7 @@ dn=$(dirname "$0") print_help() { cat 1>&2 <<'EOF' -Usage: coreos-assembler build-fast [--undeploy] +Usage: nestos-assembler build-fast [--undeploy] EOF } @@ -64,7 +64,7 @@ if test -e .git; then # shellcheck disable=SC2016 fatal 'This command requires inheriting from a previous full OS build. Use e.g. `export COSA_DIR=/path/to/fcos` that has a previous -run of `cosa build`.' +run of `nosa build`.' fi projectdir=$(pwd) cd "${COSA_DIR}" diff --git a/src/cmd-buildextend-metal b/src/cmd-buildextend-metal index 6827ddc57ba1e1f90e280e846131260f56bf01b7..22911e8041bdb8c7d59c96f5b8f5724d43d2eebe 100755 --- a/src/cmd-buildextend-metal +++ b/src/cmd-buildextend-metal @@ -17,8 +17,8 @@ esac print_help() { cat 1>&2 <&2 <<'EOF' -Usage: coreos-assembler clean --help - coreos-assembler clean [--all] +Usage: nestos-assembler clean --help + nestos-assembler clean [--all] Delete all build artifacts. Use --all to also clean the cache/ directory. EOF diff --git a/src/cmd-fetch b/src/cmd-fetch index 03ffa962c7519ecf49eada8b3b69e348d04fb90c..35ce0b7de98344547994abe7064ea1b59c2e37f0 100755 --- a/src/cmd-fetch +++ b/src/cmd-fetch @@ -19,8 +19,8 @@ fi print_help() { cat 1>&2 <<'EOF' -Usage: coreos-assembler fetch --help - coreos-assembler fetch [--update-lockfile] [--write-lockfile-to=file] [--with-cosa-overrides] [--strict] +Usage: nestos-assembler fetch --help + nestos-assembler fetch [--update-lockfile] [--write-lockfile-to=file] [--with-cosa-overrides] [--strict] Fetch and import the latest packages. EOF diff --git a/src/cmd-init b/src/cmd-init index 117977b923b9ae6bb09c106b135c342151a35031..f53bdfd949f5b5abb8a5b9591da197169f25c7bc 100755 --- a/src/cmd-init +++ b/src/cmd-init @@ -12,8 +12,8 @@ COMMIT="" print_help() { cat 1>&2 <<'EOF' -Usage: coreos-assembler init --help - coreos-assembler init [--force] [--branch BRANCH] +Usage: nestos-assembler init --help + nestos-assembler init [--force] [--branch BRANCH] [--commit COMMIT] GITCONFIG [SUBDIR] For example, you can use https://github.com/coreos/fedora-coreos-config diff --git a/src/cmd-offline-update b/src/cmd-offline-update index fc06faff4902f23de914f0961e0e8de5ebea20ab..53963b2ec52c9d1e082dfe6f39b32ce394bd309e 100755 --- a/src/cmd-offline-update +++ b/src/cmd-offline-update @@ -21,8 +21,8 @@ dn=$(dirname "$0") print_help() { cat 1>&2 < ... +# Usage: nestos-assembler ... # Currently this just wraps the two binaries we have today # under a global entrypoint with subcommands. @@ -53,7 +53,7 @@ nestos_unsupport_buildextend_commands="aliyun aws azure azurestack dasd digitalo nestos_unsupport_utility_commands="aws-replicate aliyun-replicate koji-upload generate-hashlist remote-prune sign" if [ -z "${cmd}" ]; then - echo Usage: "coreos-assembler CMD ..." + echo Usage: "nestos-assembler CMD ..." echo "Build commands:" for bin in ${build_commands}; do echo " ${bin}" @@ -75,14 +75,18 @@ if [ -z "${cmd}" ]; then for bin in ${other_commands}; do echo " ${bin}" done | sort + + echo -e "\nNotice:\n" + echo -e " For bug reports, please submit an issue at [nestos-assembler](https://gitee.com/openeuler/nestos-assembler)." + echo -e " This software is a fork of [coreos-assembler](https://github.com/coreos/coreos-assembler), licensed under the [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).\n" exit 1 fi shift # Determine if the function is currently not supported by Nestos if [[ "${nestos_unsupport_advanced_build_commands}" =~ (^| )"${cmd}"($| ) ]] || \ -[[ "${nestos_unsupport_utility_commands}" =~ (^| )"${cmd}"($| ) ]] || \ -[[ "${cmd}" =~ ^buildextend-.* && "${nestos_unsupport_buildextend_commands}" =~ (^| )"${cmd#buildextend-}"($| ) ]]; then + [[ "${nestos_unsupport_utility_commands}" =~ (^| )"${cmd}"($| ) ]] || \ + [[ "${cmd}" =~ ^buildextend-.* && "${nestos_unsupport_buildextend_commands}" =~ (^| )"${cmd#buildextend-}"($| ) ]]; then echo "Command ${cmd} is not applicable to NestOS" exit 1 fi