Skip to content

Commit 46aaefc

Browse files
authored
Rename asum to sum (#6)
* Rename asum.go to sum.go * Update ASUM to sum. * Update format
1 parent 88a8bd5 commit 46aaefc

File tree

17 files changed

+64
-64
lines changed

17 files changed

+64
-64
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ GOTOOLSBIN=$(TOP)/tools/go/
2020

2121
# SUM SDK related variables
2222
SDK_NAME = sum-sdk
23-
# Keep the SDK_VERSION same as ASUM_RPM_FORMAT_VERSION.
23+
# Keep the SDK_VERSION same as RPM_FORMAT_VERSION.
2424
SDK_VERSION = 2.0
2525
SDK_REVERSION = 1
2626
SDK_SOURCE_PATH = $(TOP)/sdk

cmd/asum/asum.go renamed to cmd/sum/sum.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var (
2121
// progname is name of my binary/program/executable.
2222
progname = filepath.Base(os.Args[0])
2323
// version of my program.
24-
version = "5.8"
24+
version = "5.9"
2525
)
2626

2727
func mainRegisterCmdOptions() {
@@ -35,7 +35,7 @@ var mainCmdOptions struct {
3535
}
3636

3737
func init() {
38-
config.SetLogDir("/var/log/asum/")
38+
config.SetLogDir("/var/log/sum/")
3939
}
4040

4141
func main() {
@@ -118,7 +118,7 @@ func usage(progname, subcmd string) {
118118
switch subcmd {
119119
case "":
120120
const usageStr = `
121-
SUM (PROGNAME) is a tool for Software Updates Management (ASUM).
121+
SUM (PROGNAME) is a tool for Software Updates Management (SUM).
122122
123123
Usage:
124124
@@ -132,7 +132,7 @@ The commands are:
132132
reboot reboots/restarts the node running reboots specific action for installing software update.
133133
repo perform Software Repository management operations.
134134
rollback rolls back the installed software update.
135-
version print Software Updates Management (ASUM) version.
135+
version print Software Updates Management (SUM) version.
136136
137137
Use "PROGNAME help [command]" for more information about a command.
138138

repo/list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121
"gopkg.in/yaml.v2"
2222
)
2323

24-
// FormatVersionName is the ASUM RPM format version string that's embedded
24+
// FormatVersionName is the RPM format version string that's embedded
2525
// into RPM used for identifying the JSON format version.
26-
const FormatVersionName = "ASUM RPM Format Version"
26+
const FormatVersionName = "RPM Format Version"
2727

2828
// RPMInfo is the list of RPM package info
2929
type RPMInfo interface {

repo/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func registerCommandVersion(progname string) {
8484
// Input:
8585
// 1. map[string]interface{}
8686
// where, the options could be following:
87-
// "progname": Name of the program along with any cmds (ex: asum pm)
87+
// "progname": Name of the program along with any cmds (ex: sum pm)
8888
// "cmd-index": Index to the cmd (ex: run)
8989
func ScanCommandOptions(options map[string]interface{}) error {
9090
log.Printf("Entering ScanCommandOptions(%+v)...", options)

sample/update/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ all: update
2020

2121
.PHONY: update
2222
update:
23-
@echo "======== Generating update RPM using ASUM SDK..."; \
23+
@echo "======== Generating update RPM using SUM SDK..."; \
2424
$(MAKE) -C $(SUM_SDK_PATH) generate \
2525
PLUGINS_LIBRARY=$(TOP)/library/ \
2626
RPM_NAME=$(UPDATE_RPM_NAME) \
2727
RPM_VERSION=$(UPDATE_VERSION) \
2828
RPM_RELEASE=$(UPDATE_RELEASE) \
2929
RPM_URL=$(UPDATE_URL) \
30-
RPM_SUMMARY="Sample Update RPM created using ASUM SDK" \
30+
RPM_SUMMARY="Sample Update RPM created using SUM SDK" \
3131
RPM_INFO_FILE=$(UPDATE_RPM_INFO_FILE) || exit $$?
3232

3333

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (c) 2020 Veritas Technologies LLC. All rights reserved. IP63-2828-7171-04-15-9
1+
# Copyright (c) 2021 Veritas Technologies LLC. All rights reserved. IP63-2828-7171-04-15-9
22
Description=Preparing for reboot
3-
# NOTE: Call `asum reboot` as the last step in `install` step to automatically
3+
# NOTE: Call `sum reboot` as the last step in `install` step to automatically
44
# invoke (pre)reboot actions.
5-
ExecStart=${PM_LIBRARY}/../asum reboot
5+
ExecStart=${PM_LIBRARY}/../sum reboot

sdk/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
asum
2-
pm
1+
sum

sdk/Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Copyright (c) 2021 Veritas Technologies LLC. All rights reserved IP63-2828-7171-04-15-9.
22

3-
# ASUM_RPM_FORMAT_VERSION is like a protocol version.
4-
# This will be used by the ASUM binary to list the contents appropriately.
3+
# RPM_FORMAT_VERSION is like a protocol version.
4+
# This will be used by the SUM binary to list the contents appropriately.
55
# This version needs to be updated, only if there is format/layout changes
6-
# that breaks backward compatibility w.r.t. parsing RPM info by the `asum`
6+
# that breaks backward compatibility w.r.t. parsing RPM info by the `sum`
77
# binary.
8-
ASUM_RPM_FORMAT_VERSION=2
8+
RPM_FORMAT_VERSION=2
99

1010
# Jenking build options
11-
PRODUCT?=asum
11+
PRODUCT?=sum
1212
VERSION?=1.0
1313
BRANCH?=main
1414

@@ -32,8 +32,8 @@ PLUGINS_LIBRARY?=$(PACKAGE_DIR)/library
3232
PLUGIN_TYPES?="preinstall install prereboot postreboot rollback-precheck prerollback rollback commit-precheck commit"
3333

3434
RPM_PRE_SCRIPT?=$(RPM_SCRIPTS_DIR)/rpm_pre.sh
35-
RPM_SPEC_FILE=asumrpm.spec
36-
RPM_INST_FILE=asumrpm.inst
35+
RPM_SPEC_FILE=sumrpm.spec
36+
RPM_INST_FILE=sumrpm.inst
3737

3838
TARGET_DIR=system/upgrade/repository/update/$(RPM_NAME)-$(RPM_VERSION)-$(RPM_RELEASE)
3939

@@ -50,7 +50,7 @@ all: generate
5050
# required for updating the system.
5151
.PHONY: generate
5252
generate:
53-
@echo ===== Generating ASUM RPM =====
53+
@echo ===== Generating SUM RPM =====
5454
@echo Creating spec and inst files.
5555
if [ ! -f $(RPM_INFO_FILE) ] ; then \
5656
echo "RPM Info JSON file does not exist at $(RPM_INFO_FILE)." ; \
@@ -76,7 +76,7 @@ generate:
7676
-e "s%__VERSION__%$(RPM_VERSION)%g" \
7777
-e "s|__RELEASE__|$(RPM_RELEASE)|g" \
7878
-e "s%__URL__%$(RPM_URL)%g" \
79-
-e "s%__ASUM_RPM_FORMAT_VERSION__%$(ASUM_RPM_FORMAT_VERSION)%g" \
79+
-e "s%__RPM_FORMAT_VERSION__%$(RPM_FORMAT_VERSION)%g" \
8080
-e "s%__RPM_INFO__%$${rpm_desc}%g" \
8181
$(PACKAGE_DIR)/SPECS/$(RPM_SPEC_FILE);
8282

@@ -95,7 +95,7 @@ generate:
9595
7z x $(ISO_PATH) -o$(PLUGINS_LIBRARY)/$${iso_target_dir}/ -y; \
9696
fi ; \
9797

98-
@echo ======== Adding ASUM scripts and plugins for version $(RPM_VERSION) for RPM packaging.
98+
@echo ======== Adding SUM scripts and plugins for version $(RPM_VERSION) for RPM packaging.
9999
cp -v ${RPM_SCRIPTS_DIR}/* $(PACKAGE_DIR)/$(TARGET_DIR)
100100
cp -Rv $(PLUGINS_LIBRARY) $(PACKAGE_DIR)/$(TARGET_DIR)
101101

@@ -105,7 +105,7 @@ generate:
105105
pluginTypes=$(PLUGIN_TYPES); \
106106
for pt in $${pluginTypes}; do \
107107
echo "Generating image for $${pt}..."; \
108-
$(TOP)/scripts/asum pm list -library $(PLUGINS_LIBRARY) -type $${pt} -log-dir $(PLUGINS_LIBRARY)/../imgs/ -log-file $${pt}; \
108+
$(TOP)/scripts/sum pm list -library $(PLUGINS_LIBRARY) -type $${pt} -log-dir $(PLUGINS_LIBRARY)/../imgs/ -log-file $${pt}; \
109109
done;
110110

111111
@echo ======== Keeping only plugin graph images and cleaning logs in image dir.
@@ -135,7 +135,7 @@ generate:
135135
done; \
136136
git add $${readme} $(PLUGINS_LIBRARY)/../imgs/*.svg;
137137

138-
@echo ======== Calling mkrpm.sh utility to generate the ASUM RPM.
138+
@echo ======== Calling mkrpm.sh utility to generate the SUM RPM.
139139
cd $(PACKAGE_DIR); \
140140
if [ -n "$(SHIP_DIR)" ]; then \
141141
export PLATFORM_RPM_LOCATION=$(SHIP_DIR); \
@@ -145,7 +145,7 @@ generate:
145145

146146
.PHONY: clean
147147
clean:
148-
@echo ======== Removing ASUM RPM artifacts.
148+
@echo ======== Removing SUM RPM artifacts.
149149
-rm -rf $(PACKAGE_DIR)
150150

151151

sdk/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
# ASUM SDK
1+
# SUM SDK
22

33
## Update RPM Generation
44

5-
An update RPM should be ASUM format compliant in order for one to successfully install the update. In order to generate such an RPM, one should use the [ASUM SDK](../sdk/Makefile) along with providing appropriate [rpm information](./rpm-info.json).
5+
An update RPM should be SUM format compliant in order for one to successfully install the update. In order to generate such an RPM, one should use the [SUM SDK](../sdk/Makefile) along with providing appropriate [rpm information](./rpm-info.json).
66

77
### Prerequisites
88

99
To use this framework, you need the following:
10-
1. ASUM SDK
10+
11+
1. SUM SDK
1112
2. JSON file containing RPM information. Ex: [rpm-info.json](./rpm-info.json).
1213
3. Library of plugin folders containing plugins.
1314
4. Optionally ISO can be specified through `ISO_PATH` to include ISO contents into the RPM.
1415
NOTE: The ISO contents would be extracted into `$(PLUGINS_LIBRARY)/iso/contents` folder, and appropriate `.install` plugin should be included to install the contents of this ISO to do online or offline upgrade. One can place the required `.install` plugins inside `$(PLUGINS_LIBRARY)/iso` or any other plugin folder, and access the contents of ISO using `$(PLUGINS_LIBRARY)/iso/contents` path.
1516

1617
### Usage
1718

18-
Download and extract the ASUM SDK, and call the `make` target as below by specifying appropriate parameters as shown below:
19+
Download and extract the SUM SDK, and call the `make` target as below by specifying appropriate parameters as shown below:
1920

2021
```bash
21-
$(MAKE) -C $(ASUM_SDK_PATH) generate \
22+
$(MAKE) -C $(SUM_SDK_PATH) generate \
2223
ISO_PATH=$${Path_to_ISO} \
2324
PLUGINS_LIBRARY=$${PluginsLibraryPath} \
2425
RPM_NAME=$${RPM_Name} \

sdk/asumrpm.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ BuildArch: x86_64
1313
Packager: Appliance Solutions
1414

1515
%description
16-
ASUM RPM Format Version : __ASUM_RPM_FORMAT_VERSION__
16+
RPM Format Version : __RPM_FORMAT_VERSION__
1717
RPM Info : __RPM_INFO__
1818

1919
%define debug_package %{nil}

0 commit comments

Comments
 (0)