# Requirements



# Data Structure

## NEW implementation 
* **name** : Software name 
* **version** : version of the software name 
* **contact** : contact name of the software 
* **technicalContact**: technical contact name of the developper 
* **description** : Software shor descripion 
* **releaseDate** : Date of the release deployed in UMD/CMD etc.
* **majorVersion** : Major version of the release
* **minorVersion** : Minor version of the release
* **revisionVersion** : Revision version of the release
* **releaseNotes** : Descriptiopn or link to the relase notess
* **changeLog** : Change log description or link to change log
* **documentationLinks** : Documentation link for the software 
* **distributionType** ": [retrieved from distribution list]
* **distributionVersion**: [retrieved from distribution distributed version list]
* ~~**MajordistributionVersion**: [retrieved from distribution distributed version list]~~
* **capabilities** : [retrieved from capabilities definition list]
* **target**: <br/>	["platform": "centos7"]; <br/>
				["arch": "x86_64"]; <br/>
               	[repositoryURL": "sw/production/umd/4/centos7/x86_64/updates] <br/>
* **softwareConfigurationLink** : link for the UMD/CMD software configuration 
* ~~**softwareConfigurationManagement** : link for the UMD/CMD software configuration~~ 


### target
#### platform
* centos 7
* centos 8
* centos 9
* ubuntu 18
* ubuntu 20
* Docker
#### arch
* X86_64
### Capabilities 
###### (list of possible capabilities)
* **Accounting**
* **Authorization**
* **Attribute Authority**
* **Client Tools**
* **Credential Management**
* **Data Access**
* **File Access, File Transfer**
* **Interactive Job Management**
* **Information Model**
* **Information Discovery**
* **Job Execution**
* **Metadata Catalogue**
* **Parallel Job**
* **Storage Management**
### distributionType
* **UMD**
* **CMD-OS**
* **CMD-ONE**
* **Community**
### MajordistributionVersion
* 1
* 2
* 3
* 4
* 5

## OLD
* **currentState**  : State of the "Production",
* **additionalDetails**  : Wiki link for Knon issues 
* **repositoryURL** : "sw/production/umd/4/centos7/x86_64/updates",
* **keywords** :

# Json Schemas

## Product
```
{
"name" : "htcondor",
"version" : "9.0.1",
"currentState" : "Production",
"technologyProvider" : "CHTC (UW-Madison)",
"contact" : "jfrey.at.cs.wisc.edu",
"technicalContact" : "jfrey.at.cs.wisc.edu",
"description" : "  HTCondor is a specialized workload management system for compute-intensive jobs. Like other full-featured batch systems, HTCondor provides a job queueing mechanism, scheduling policy, priority scheme, resource monitoring, and resource management. Users submit their serial or parallel jobs to HTCondor, HTCondor places them into a queue, chooses when and where to run the jobs based upon a policy, carefully monitors their progress, and ultimately informs the user upon completion.
",
"releaseDate" : "2021-06-01",
"majorVersion" : "9",
"minorVersion" : "0",
"revisionVersion" : "1",
"releaseNotes" : "https://htcondor.readthedocs.io/en/v9_0/",
"changeLog" : "N/A",
"documentationLinks" : ["http://research.cs.wisc.edu/htcondor/manual/","link2"],
"repositoryURL" : "sw/production/umd/4/centos7/x86_64/updates",
"distributionType": "UMD",
"distributionVersion": "4.15.0",
"capabilities": ["File Access", "Workload Management System"], 
"targets": [
    {
        "platform": "centos7", 
        "arch": "x86_64",
        "repositoryURL": "sw/production/umd/4/centos7/x86_64/updates",
        "gpgkey": "http://repository.egi.eu/sw/production/umd/UMD-RPM-PGP-KEY",
    	"rpms": [
     		"https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/blahp-2.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-all-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-annex-ec2-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-boinc-7.16.16-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-bosco-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-classads-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-classads-devel-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-credmon-oauth-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-devel-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-externals-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-kbdd-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-procd-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-tarball-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-test-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/condor-vm-gahp-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/python2-condor-9.0.1-1.el7.x86_64.rpm",
            "https://research.cs.wisc.edu/htcondor/repo/9.0/el7/release/python3-condor-9.0.1-1.el7.x86_64.rpm",
            "https://repo.opensciencegrid.org/osg/3.5/el7/release/x86_64/python2-scitokens-1.3.1-1.osg35.el7.noarch.rpm"
        ]
    }
],
"softwareConfigurationLink": ""
} 
```

* **name** : Software name 
* **version** : version of the software name 
* **contact** : contact name of the software 
* **technicalContact**: technical contact name of the developper 
* **description** : Software shor descripion 
* **releaseDate** : Date of the release deployed in UMD/CMD etc.
* **majorVersion** : Major version of the release
* **minorVersion** : Minor version of the release
* **revisionVersion** : Revision version of the release
* **releaseNotes** : Descriptiopn or link to the relase notess
* **changeLog** : Change log description or link to change log
* **documentationLinks** : Documentation link for the software 
* **distributionType** : [retrieved from distribution list]
* **distributionVersion**: [retrieved from distribution distributed version list] 
* **capabilities** : [retrieved from capabilities definition list]
* **target**: <br/>	["platform": "centos7" <br/>
				"arch": "x86_64" <br/>
               	"repositoryURL": "sw/production/umd/4/centos7/x86_64/updates <br/>
"gpgkey": ""<br/>
"rpms": [<br/>
   &nbsp;&nbsp;&nbsp; "https://...1",<br/>
   &nbsp;&nbsp;&nbsp; "https://...n"<br/>
&nbsp;&nbsp;]<br/>
]
* **softwareConfigurationManagement** : link for the UMD/CMD software configuration 

## Distributions
```
{
    "title": "Channel: EGI Repository - Production level releases",
    "description": "This is the EGI Repository Releases RSS channel.",
    "item": [
         {
            "distributionIdentifier": "UMD-5",            
            "description": "UMD 5 is a new release of UMD...",
			"currentState": "Production"    
        },
		{
            "distributionIdentifier": "UMD-4.15.0",            
            "description": "UMD 4.15.0 is an update release of UMD 4. It includes StoRM 1.11.21, lcmaps-plugins 1.8.1, CERN Frontier 4.15.2, dmlite 1.15.0, APEL SSM 3.2.1, DDNS Nagios probe 1.0.1, dCache 6.2.24, Infrastructure Manager Nagios probe 1.0.1",
			"currentState": "Production"    
        },
        {            
            "distributionIdentifier": "UMD-4.14.0",
            "description": "UMD 4.14.10 is an update release of UMD 4. It includes ARC 6.12.0, xrootd 5.2.0, xrootd 5.2.0, davix 0.7.6, gridftp 13.24.1, gfal2 2.18.2",
			"currentState": "Production"             
        }
     ]
}
```
<br>
If we need to add dates to help user control the info:<br>

```
"pubdate": "2020-11-26 11:44:25 EEST",
"updated": "2020-11-26 11:45:02 EEST",
```

<br>

## Software Catalog
```
{
    "title": "Channel: EGI Repository - Production level releases",
    "description": "Here you can find the complete list of EGI Software products.",
    "item": [
        {
            "name" : "nagios-probe-im",
            "version" : "1.0.2",
            "distroIdentifier": "UMD-5",
			"capabilities": ["client tools", "monitoring"],            
            "description" : "probe for Infrastructure Manager service to ARGO-SAM release",
            "pubdate": "2021-12-02"
        },
		{
            "name" : "nagios-probe-im",
            "version" : "1.0.1",
            "distroIdentifier": "UMD-4.15.0",
        	"capabilities": ["client tools", "monitoring"],            
            "description" : "probe for Infrastructure Manager service to ARGO-SAM release",
            "pubdate": "2021-07-21"
        }
		,{
			...
		}        
	]
}
```


<br>

## Other info

### target
#### platform
* centos 7
* centos 8
* centos 9
* ubuntu 18
* ubuntu 20
* Docker
#### arch
* X86_64
### Capabilities
* **Accounting**
* **Authorization**
* **Attribute Authority**
* **Client Tools**
* **Credential Management**
* **Data Access**
* **File Access,File Transfer**
* **Interactive Job Management**
* **Information Model**
* **Information Discovery**
* **Job Execution**
* **Metadata Catalogue**
* **Parallel Job**
* **Storage Management**
### distributionType
* **UMD**
* **CMD-OS**
* **CMD-ONE**
* **Community**
### MajordistributionVersion
* 1
* 2
* 3
* 4
* 5

# GPG Sign RPMs

## GPG key generation

A gpg key was generated with the following parameters:

```bash
gpg --full-generate-key

Please select what kind of key you want:
   (1) RSA and RSA (default)
Your selection? 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (3072) 4096
Please specify how long the key should be valid.
         0 = key does not expire
Key is valid for? (0) 0

Real name: RPM sign UMD/CMD
Email address: grid.admin@lip.pt
Comment: 
You selected this USER-ID:
    "RPM sign UMD/CMD <grid.admin@lip.pt>"
public and secret key created and signed.
pub   rsa4096 2022-02-21 [SC]
      FDA5272E8C8A03597BFA253511339AA2D60A5E99
uid                      RPM sign UMD/CMD <grid.admin@lip.pt>
sub   rsa4096 2022-02-21 [E]
```

The passphrase is in monica (under NCG site).

The public and private keys where exported:

```bash
gpg --export -a 'RPM sign UMD/CMD'  > RPM-GPG-KEY-umd-cmd
gpg --export-secret-key 'RPM sign UMD/CMD' > RPM-GPG-KEY-umd-cmd.key
```

Copy the keys to monica, and import them:

```bash
gpg --import RPM-GPG-KEY-umd-cmd
gpg --import --allow-secret-key-import RPM-GPG-KEY-umd-cmd.key
```

On the host that will sign the RPMs:

```bash
rpm --import RPM-GPG-KEY-umd-cmd
```

To list all rpm gpg keys:

```bash
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'
```