Browse code

Move make-ostree script to support. modified photon-base.json

Touseef Liaqat authored on 2015/08/07 06:41:58
Showing 4 changed files
1 1
deleted file mode 100755
... ...
@@ -1,25 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -x
4
-
5
-if [ "$#" -lt 0 ]; then
6
-	echo "Script to create new Photon OSTree repo inside a docker container."
7
-	echo "Usage: $0 "
8
-	exit -1
9
-fi
10
-
11
-PROGRAM=$0
12
-
13
-cp installer/photon-ostree.repo installer/photon-ostree.repo.bak
14
-echo "baseurl=file:///photon/stage/RPMS" >> installer/photon-ostree.repo
15
-
16
-rm -rf stage/ostree-repo
17
-mkdir -p stage/ostree-repo
18
-
19
-sudo docker run -it --privileged -v $(pwd):/photon -v $(pwd)/stage/ostree-repo:/srv/rpm-ostree -w="/photon/installer"  toliaqat/photon:rpm-ostree ./mk-ostree-server.sh /
20
-
21
-tar -zcf stage/ostree-repo.tar.gz stage/ostree-repo/repo/
22
-
23
-# Restore file
24
-mv -f installer/photon-ostree.repo.bak installer/photon-ostree.repo
25
-
... ...
@@ -22,5 +22,5 @@ LOGFILE=/var/log/"${PRGNAME}-${LOGFILE}"    #   set log file name
22 22
 ROOT=$1
23 23
 
24 24
 mkdir -p ${ROOT}/srv/rpm-ostree
25
-ostree --repo=${ROOT}/srv/rpm-ostree/repo init --mode=archive-z2 >> "${LOGFILE}" 2>&1
26
-rpm-ostree compose tree --repo=${ROOT}/srv/rpm-ostree/repo photon-base.json >> "${LOGFILE}" 2>&1
25
+ostree --repo=${ROOT}/srv/rpm-ostree/repo init --mode=archive-z2  2>&1 | tee "${LOGFILE}"
26
+rpm-ostree compose tree --repo=${ROOT}/srv/rpm-ostree/repo photon-base.json  2>&1 |  tee "${LOGFILE}"
... ...
@@ -19,15 +19,11 @@
19 19
                 "findutils", "xz", "grub2", "iproute2", "util-linux", "linux",
20 20
                 "attr", "libcap", "kmod", "expat", "dbus", "file",
21 21
                 "sed", "grep", "cpio", "gzip",
22
-                "wget", "openssl", "ca-certificates", "curl", "iptables", "Linux-PAM",
23
-                "systemd", "e2fsprogs", "elfutils-libelf", "lua", "popt", "sqlite-autoconf", "nspr", "nss", "rpm",
24
-                "openssh", "libffi", "gdbm", "python2", "python2-libs", "pcre", "glib", "libxml2",
22
+                "openssl", "ca-certificates", "curl",
23
+                "systemd",
24
+                "openssh",
25 25
                 "photon-release",
26
-                "vim", "db", "libsolv", "libgpg-error", "hawkey", "libassuan", "gpgme", "librepo", "tdnf",
27
-                "libdnet", "xerces-c", "xml-security-c", "libmspack",
26
+                "vim", "tdnf",
28 27
                 "docker","bridge-utils",
29
-                "libyaml", "PyYAML", "python-requests", "python-prettytable",
30
-                "python-jsonpointer", "python-jsonpatch", "python-six", "python-configobj",
31
-                "krb5", "e2fsprogs-devel",
32 28
                 "dracut", "dracut-tools", "ostree", "rpm-ostree", "nss-altfiles", "which"]
33 29
 }
34 30
new file mode 100755
... ...
@@ -0,0 +1,27 @@
0
+#!/bin/bash
1
+
2
+set -x
3
+
4
+if [ "$#" -lt 0 ]; then
5
+	echo "Script to create new Photon OSTree repo inside a docker container."
6
+	echo "Usage: $0 "
7
+	exit -1
8
+fi
9
+
10
+PROGRAM=$0
11
+
12
+createrepo stage/RPMS
13
+
14
+cp installer/photon-ostree.repo installer/photon-ostree.repo.bak
15
+echo "baseurl=file:///photon/stage/RPMS" >> installer/photon-ostree.repo
16
+
17
+rm -rf stage/ostree-repo
18
+mkdir -p stage/ostree-repo
19
+
20
+sudo docker run -it --privileged -v $(pwd):/photon -v $(pwd)/stage/ostree-repo:/srv/rpm-ostree -w="/photon/installer"  toliaqat/photon:rpm-ostree ./mk-ostree-server.sh /
21
+
22
+tar -zcf stage/ostree-repo.tar.gz stage/ostree-repo/repo/
23
+
24
+# Restore file
25
+mv -f installer/photon-ostree.repo.bak installer/photon-ostree.repo
26
+rm -rf stage/ostree-repo