diff options
-rw-r--r-- | snapcraft/Makefile.am | 1 | ||||
-rw-r--r-- | snapcraft/README.snap_build.md | 9 | ||||
-rw-r--r-- | snapcraft/extra_version_info.txt | 0 | ||||
-rw-r--r-- | snapcraft/scripts/Makefile | 2 | ||||
-rw-r--r-- | snapcraft/scripts/show_version | 6 | ||||
-rw-r--r-- | snapcraft/snapcraft.yaml.in | 3 |
6 files changed, 18 insertions, 3 deletions
diff --git a/snapcraft/Makefile.am b/snapcraft/Makefile.am index 2ec39ce5b..a8220670d 100644 --- a/snapcraft/Makefile.am +++ b/snapcraft/Makefile.am @@ -1,6 +1,7 @@ EXTRA_DIST = snapcraft.yaml \ README.snap_build.md \ README.usage.md \ + extra_version_info.txt \ scripts \ defaults \ helpers \ diff --git a/snapcraft/README.snap_build.md b/snapcraft/README.snap_build.md index e1f2ce82d..eeee6a17a 100644 --- a/snapcraft/README.snap_build.md +++ b/snapcraft/README.snap_build.md @@ -12,7 +12,12 @@ which uses earlier versions of snaps) git clone https://github.com/frrouting/frr.git cd frr -3. Run Bootstrap and make distribution tar.gz +3. (Optional) Add extra version information to + `snapcraft/extra_version_info.txt`. Information in this file will + be displayed with the frr.version command (simple `cat` after + the display of the `zebra --version` output) + +4. Run Bootstrap and make distribution tar.gz ./bootstrap.sh ./configure --with-pkg-extra-version=-MySnapVersion @@ -25,7 +30,7 @@ which uses earlier versions of snaps) This will build `frr-something.tar.gz` - the distribution tar and the snapcraft/snapcraft.yaml with the matching version number -4. Create snap +5. Create snap cd snapcraft snapcraft diff --git a/snapcraft/extra_version_info.txt b/snapcraft/extra_version_info.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/snapcraft/extra_version_info.txt diff --git a/snapcraft/scripts/Makefile b/snapcraft/scripts/Makefile index 2a60d4d65..966623d11 100644 --- a/snapcraft/scripts/Makefile +++ b/snapcraft/scripts/Makefile @@ -13,3 +13,5 @@ install: install -D -m 0755 ldpd-service $(DESTDIR)/bin/ install -D -m 0755 nhrpd-service $(DESTDIR)/bin/ install -D -m 0755 set-options $(DESTDIR)/bin/ + install -D -m 0755 show_version $(DESTDIR)/bin/ + diff --git a/snapcraft/scripts/show_version b/snapcraft/scripts/show_version new file mode 100644 index 000000000..ca1c2aa28 --- /dev/null +++ b/snapcraft/scripts/show_version @@ -0,0 +1,6 @@ +#!/bin/sh + +$SNAP/sbin/zebra --version +$SNAP/bin/cat $SNAP/doc/extra_version_info.txt + +exit 0 diff --git a/snapcraft/snapcraft.yaml.in b/snapcraft/snapcraft.yaml.in index b5fb24a36..2112e061d 100644 --- a/snapcraft/snapcraft.yaml.in +++ b/snapcraft/snapcraft.yaml.in @@ -17,7 +17,7 @@ apps: - network-bind - network-control version: - command: sbin/zebra --version + command: bin/show_version readme: command: bin/cat $SNAP/doc/README.usage.md zebra: @@ -254,4 +254,5 @@ parts: organize: README.usage.md: doc/README.usage.md README.snap_build.md: doc/README.snap_build.md + extra_version_info.txt: doc/extra_version_info.txt |