Skip to content

Commit

Permalink
Merge branch 'develop-cabal-repoinfo' into develop. Close #148.
Browse files Browse the repository at this point in the history
**Description**

The cabal packages do not contain pointers to the repo using the
specific entry for this in Cabal, neither for the source, nor to file
bug reports. Although such information is not strictly speaking
necessary, it helps direct users without having to "jump around" to find
out where they need to go.

**Type**

- Bug: Cabal files are missing useful information.

**Additional context**

None.

**Requester**

- Ivan Perez

**Method to check presence of bug**

The following script checks whether cabal files contain bug-reports or
repo information:
```
$ grep -Lre '\(bug-reports\|source-repository\)' --include='*.cabal' ogma**/
ogma-cli/ogma-cli.cabal
ogma-core/ogma-core.cabal
ogma-extra/ogma-extra.cabal
ogma-language-c/ogma-language-c.cabal
ogma-language-cocospec/ogma-language-cocospec.cabal
ogma-language-copilot/ogma-language-copilot.cabal
ogma-language-jsonspec/ogma-language-jsonspec.cabal
ogma-language-smv/ogma-language-smv.cabal
ogma-spec/ogma-spec.cabal
```

The output should be empty, meaning that all files contain such strings.

**Expected result**

Running the above grep command prints nothing, indicating that no cabal
page is missing bug report or repo source information.

Running the following dockerfile checks that there are no files that do
not contain a bug-reports field, or source-repository section, after
which it prints the message "Success":
```Dockerfile
FROM ubuntu:focal

RUN apt-get update

RUN apt-get install --yes git

SHELL ["/bin/bash", "-c"]
CMD git clone $REPO \
    && cd $NAME \
    && git checkout $COMMIT \
    && ! grep -Lre 'bug-reports' --include='*.cabal' ogma**/ \
    && ! grep -Lre 'source-repository' --include='*.cabal' ogma**/ \
    && echo "Success"
```

Command (substitute variables based on new path after merge):

```sh
$ docker run -e "REPO=https://github.com/NASA/ogma" -e "NAME=ogma" -e "PAT=ogma"  -e "COMMIT=<HASH>" -it ogma-verify-148
```

**Solution implemented**

Add bug-reports and source-repository entries to all cabal files.

**Further notes**

None.
  • Loading branch information
ivanperez-keera committed Dec 24, 2024
2 parents 5c41152 + 0edf304 commit ad70d59
Show file tree
Hide file tree
Showing 18 changed files with 84 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ogma-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Revision history for ogma-cli

## [1.X.Y] - 2024-12-23
## [1.X.Y] - 2024-12-24

* Update contribution guidelines (#161).
* Provide ability to customize template in fprime command (#185).
* Provide ability to customize template in standalone command (#189).
* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

Expand Down
6 changes: 6 additions & 0 deletions ogma-cli/ogma-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Simple
name: ogma-cli
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand Down Expand Up @@ -116,6 +117,11 @@ description: Ogma is a tool to facilitate the integration of safe runtim
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-cli

executable ogma

main-is:
Expand Down
3 changes: 2 additions & 1 deletion ogma-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Revision history for ogma-core

## [1.X.Y] - 2024-12-23
## [1.X.Y] - 2024-12-24

* Replace queueSize with QUEUE_SIZE in FPP file (#186).
* Use template expansion system to generate F' monitoring component (#185).
* Use template expansion system to generate standalone Copilot monitor (#189).
* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

Expand Down
6 changes: 6 additions & 0 deletions ogma-core/ogma-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Simple
name: ogma-core
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand Down Expand Up @@ -84,6 +85,11 @@ data-files: templates/copilot-cfs/CMakeLists.txt
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-core

library

exposed-modules:
Expand Down
3 changes: 2 additions & 1 deletion ogma-extra/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Revision history for ogma-extra

## [1.X.Y] - 2024-12-05
## [1.X.Y] - 2024-12-24

* Deprecate unnecessary functions (#185).
* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

Expand Down
6 changes: 6 additions & 0 deletions ogma-extra/ogma-extra.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Simple
name: ogma-extra
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand All @@ -59,6 +60,11 @@ description: Ogma is a tool to facilitate the integration of safe runtim
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-extra

library

exposed-modules:
Expand Down
4 changes: 4 additions & 0 deletions ogma-language-c/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for ogma-language-c

## [1.X.Y] - 2024-12-24

* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

* Version bump 1.5.0 (#178).
Expand Down
6 changes: 6 additions & 0 deletions ogma-language-c/ogma-language-c.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Custom
name: ogma-language-c
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand Down Expand Up @@ -61,6 +62,11 @@ description: Ogma is a tool to facilitate the integration of safe runtim
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-language-c

custom-setup
setup-depends:
base >= 4.11.0.0 && < 5
Expand Down
4 changes: 4 additions & 0 deletions ogma-language-cocospec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for ogma-language-cocospec

## [1.X.Y] - 2024-12-24

* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

* Version bump 1.5.0 (#178).
Expand Down
6 changes: 6 additions & 0 deletions ogma-language-cocospec/ogma-language-cocospec.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Custom
name: ogma-language-cocospec
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand Down Expand Up @@ -62,6 +63,11 @@ description: Ogma is a tool to facilitate the integration of safe runtim
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-language-cocospec

custom-setup
setup-depends:
base >= 4.11.0.0 && < 5
Expand Down
4 changes: 4 additions & 0 deletions ogma-language-copilot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for ogma-language-copilot

## [1.X.Y] - 2024-12-24

* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

* Version bump 1.5.0 (#178).
Expand Down
6 changes: 6 additions & 0 deletions ogma-language-copilot/ogma-language-copilot.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Simple
name: ogma-language-copilot
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand All @@ -58,6 +59,11 @@ description: Ogma is a tool to facilitate the integration of safe runtim
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-language-copilot

library

exposed-modules:
Expand Down
4 changes: 4 additions & 0 deletions ogma-language-jsonspec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for ogma-language-jsonspec

## [1.X.Y] - 2024-12-24

* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

* Version bump 1.5.0 (#178).
Expand Down
6 changes: 6 additions & 0 deletions ogma-language-jsonspec/ogma-language-jsonspec.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Simple
name: ogma-language-jsonspec
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand All @@ -57,6 +58,11 @@ description: Ogma is a tool to facilitate the integration of safe runtim
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-language-jsonspec

library

exposed-modules:
Expand Down
4 changes: 4 additions & 0 deletions ogma-language-smv/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for ogma-language-smv

## [1.X.Y] - 2024-12-24

* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

* Version bump 1.5.0 (#178).
Expand Down
6 changes: 6 additions & 0 deletions ogma-language-smv/ogma-language-smv.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Custom
name: ogma-language-smv
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand Down Expand Up @@ -62,6 +63,11 @@ description: Ogma is a tool to facilitate the integration of safe runtim
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-language-smv

custom-setup
setup-depends:
base >= 4.11.0.0 && < 5
Expand Down
4 changes: 4 additions & 0 deletions ogma-spec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for ogma-spec

## [1.X.Y] - 2024-12-24

* Add repository information to cabal package (#148).

## [1.5.0] - 2024-11-21

* Version bump 1.5.0 (#178).
Expand Down
6 changes: 6 additions & 0 deletions ogma-spec/ogma-spec.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-type: Simple
name: ogma-spec
version: 1.5.0
homepage: https://github.com/nasa/ogma
bug-reports: https://github.com/nasa/ogma/issues
license: OtherLicense
license-file: LICENSE.pdf
author: Ivan Perez, Alwyn Goodloe
Expand All @@ -57,6 +58,11 @@ description: Ogma is a tool to facilitate the integration of safe runtim
-- exactly what we publish, unmodified by anyone external to our project.
x-curation: uncurated

source-repository head
type: git
location: [email protected]:nasa/ogma.git
subdir: ogma-spec

library

exposed-modules:
Expand Down

0 comments on commit ad70d59

Please sign in to comment.