]> git.puffer.fish Git - matthieu/frr.git/commitdiff
snapcraft: Add support for extra version information
authorMartin Winter <mwinter@opensourcerouting.org>
Fri, 28 Apr 2017 06:41:04 +0000 (23:41 -0700)
committerMartin Winter <mwinter@opensourcerouting.org>
Fri, 28 Apr 2017 08:48:51 +0000 (01:48 -0700)
- frr.version snap command will now show the contents of
  extra_version_info.txt in addition to the zebra --version output

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
snapcraft/Makefile.am
snapcraft/README.snap_build.md
snapcraft/extra_version_info.txt [new file with mode: 0644]
snapcraft/scripts/Makefile
snapcraft/scripts/show_version [new file with mode: 0644]
snapcraft/snapcraft.yaml.in

index 2ec39ce5b73978b140b77c60198a0abec473f7d5..a8220670d19c391080e311a5f59839468bff732f 100644 (file)
@@ -1,6 +1,7 @@
 EXTRA_DIST = snapcraft.yaml \
        README.snap_build.md \
        README.usage.md \
+       extra_version_info.txt \
        scripts \
        defaults \
        helpers \
index e1f2ce82da350e65c3222db06e52cbfecde89349..eeee6a17ad727aa1ae2d3093189532ac908c6309 100644 (file)
@@ -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 (file)
index 0000000..e69de29
index 2a60d4d6522642a1493ead01dd0c203baaacdf83..966623d11dd630ee07fbc6b8064950e02c1850a6 100644 (file)
@@ -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 (file)
index 0000000..ca1c2aa
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+$SNAP/sbin/zebra --version
+$SNAP/bin/cat $SNAP/doc/extra_version_info.txt
+
+exit 0
index b5fb24a36163d92cb9b9b801bb6e39703e44ca32..2112e061d622748fee8fd88a7fa59a9f47c16ae0 100644 (file)
@@ -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