Change-Id: If2aaff1dba90226a3770d1921384ba419d32ccfd
Reviewed-on: http://photon-jenkins.eng.vmware.com/312
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: suezzelur <anishs@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,77 @@ |
| 0 |
+diff --git a/src/core/mount.c b/src/core/mount.c |
|
| 1 |
+index 9b44357..2ad4ad4 100644 |
|
| 2 |
+--- a/src/core/mount.c |
|
| 3 |
+@@ -335,7 +335,7 @@ static int mount_add_device_links(Mount *m) {
|
|
| 4 |
+ if (mount_is_auto(p) && UNIT(m)->manager->running_as == MANAGER_SYSTEM) |
|
| 5 |
+ device_wants_mount = true; |
|
| 6 |
+ |
|
| 7 |
+- r = unit_add_node_link(UNIT(m), p->what, device_wants_mount); |
|
| 8 |
++ r = unit_add_node_link(UNIT(m), p->what, device_wants_mount, m->from_fragment ? UNIT_BINDS_TO : UNIT_REQUIRES); |
|
| 9 |
+ if (r < 0) |
|
| 10 |
+ return r; |
|
| 11 |
+ |
|
| 12 |
+diff --git a/src/core/socket.c b/src/core/socket.c |
|
| 13 |
+index 687675b..860a1e3 100644 |
|
| 14 |
+--- a/src/core/socket.c |
|
| 15 |
+@@ -289,7 +289,7 @@ static int socket_add_device_link(Socket *s) {
|
|
| 16 |
+ return 0; |
|
| 17 |
+ |
|
| 18 |
+ t = strjoina("/sys/subsystem/net/devices/", s->bind_to_device);
|
|
| 19 |
+- return unit_add_node_link(UNIT(s), t, false); |
|
| 20 |
++ return unit_add_node_link(UNIT(s), t, false, UNIT_BINDS_TO); |
|
| 21 |
+ } |
|
| 22 |
+ |
|
| 23 |
+ static int socket_add_default_dependencies(Socket *s) {
|
|
| 24 |
+diff --git a/src/core/swap.c b/src/core/swap.c |
|
| 25 |
+index b6e4372..5568898 100644 |
|
| 26 |
+--- a/src/core/swap.c |
|
| 27 |
+@@ -202,7 +202,7 @@ static int swap_add_device_links(Swap *s) {
|
|
| 28 |
+ return 0; |
|
| 29 |
+ |
|
| 30 |
+ if (is_device_path(s->what)) |
|
| 31 |
+- return unit_add_node_link(UNIT(s), s->what, UNIT(s)->manager->running_as == MANAGER_SYSTEM); |
|
| 32 |
++ return unit_add_node_link(UNIT(s), s->what, UNIT(s)->manager->running_as == MANAGER_SYSTEM, UNIT_BINDS_TO); |
|
| 33 |
+ else |
|
| 34 |
+ /* File based swap devices need to be ordered after |
|
| 35 |
+ * systemd-remount-fs.service, since they might need a |
|
| 36 |
+diff --git a/src/core/unit.c b/src/core/unit.c |
|
| 37 |
+index 0a02e38..e6e67d2 100644 |
|
| 38 |
+--- a/src/core/unit.c |
|
| 39 |
+@@ -2840,7 +2840,7 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
|
|
| 40 |
+ } |
|
| 41 |
+ } |
|
| 42 |
+ |
|
| 43 |
+-int unit_add_node_link(Unit *u, const char *what, bool wants) {
|
|
| 44 |
++int unit_add_node_link(Unit *u, const char *what, bool wants, UnitDependency dep) {
|
|
| 45 |
+ Unit *device; |
|
| 46 |
+ _cleanup_free_ char *e = NULL; |
|
| 47 |
+ int r; |
|
| 48 |
+@@ -2867,7 +2867,9 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
|
|
| 49 |
+ if (r < 0) |
|
| 50 |
+ return r; |
|
| 51 |
+ |
|
| 52 |
+- r = unit_add_two_dependencies(u, UNIT_AFTER, u->manager->running_as == MANAGER_SYSTEM ? UNIT_BINDS_TO : UNIT_WANTS, device, true); |
|
| 53 |
++ r = unit_add_two_dependencies(u, UNIT_AFTER, |
|
| 54 |
++ u->manager->running_as == MANAGER_SYSTEM ? dep : UNIT_WANTS, |
|
| 55 |
++ device, true); |
|
| 56 |
+ if (r < 0) |
|
| 57 |
+ return r; |
|
| 58 |
+ |
|
| 59 |
+diff --git a/src/core/unit.h b/src/core/unit.h |
|
| 60 |
+index 1681bbf..3eb3484 100644 |
|
| 61 |
+--- a/src/core/unit.h |
|
| 62 |
+@@ -528,7 +528,7 @@ int unit_serialize_item_escaped(Unit *u, FILE *f, const char *key, const char *v |
|
| 63 |
+ int unit_serialize_item_fd(Unit *u, FILE *f, FDSet *fds, const char *key, int fd); |
|
| 64 |
+ void unit_serialize_item_format(Unit *u, FILE *f, const char *key, const char *value, ...) _printf_(4,5); |
|
| 65 |
+ |
|
| 66 |
+-int unit_add_node_link(Unit *u, const char *what, bool wants); |
|
| 67 |
++int unit_add_node_link(Unit *u, const char *what, bool wants, UnitDependency d); |
|
| 68 |
+ |
|
| 69 |
+ int unit_coldplug(Unit *u); |
|
| 70 |
+ |
|
| 71 |
+ |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
Summary: Systemd-228 |
| 2 | 2 |
Name: systemd |
| 3 | 3 |
Version: 228 |
| 4 |
-Release: 2%{?dist}
|
|
| 4 |
+Release: 3%{?dist}
|
|
| 5 | 5 |
License: LGPLv2+ and GPLv2+ and MIT |
| 6 | 6 |
URL: http://www.freedesktop.org/wiki/Software/systemd/ |
| 7 | 7 |
Group: System Environment/Security |
| ... | ... |
@@ -9,10 +9,10 @@ Vendor: VMware, Inc. |
| 9 | 9 |
Distribution: Photon |
| 10 | 10 |
Source0: %{name}-%{version}.tar.gz
|
| 11 | 11 |
%define sha1 systemd=15475d874dc38f8d759f334bbcf7d8aff4b412da |
| 12 |
+#patch for ostree |
|
| 13 |
+Patch0: systemd-228-mount.patch |
|
| 12 | 14 |
Patch1: 01-enoX-uses-instance-number-for-vmware-hv.patch |
| 13 | 15 |
Patch2: systemd-228-loopback-address.patch |
| 14 |
-#patch for ostree |
|
| 15 |
-#Patch0: systemd-mount.patch |
|
| 16 | 16 |
Requires: Linux-PAM |
| 17 | 17 |
Requires: libcap |
| 18 | 18 |
Requires: xz |
| ... | ... |
@@ -41,7 +41,7 @@ BLKID_CFLAGS="-I/usr/include/blkid" |
| 41 | 41 |
cc_cv_CFLAGS__flto=no |
| 42 | 42 |
EOF |
| 43 | 43 |
sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h") |
| 44 |
-#%patch0 -p1 |
|
| 44 |
+%patch0 -p1 |
|
| 45 | 45 |
%patch1 -p1 |
| 46 | 46 |
%patch2 -p1 |
| 47 | 47 |
%build |
| ... | ... |
@@ -104,6 +104,8 @@ rm -rf %{buildroot}/*
|
| 104 | 104 |
|
| 105 | 105 |
|
| 106 | 106 |
%changelog |
| 107 |
+* Wed Dec 16 2015 Anish Swaminathan <anishs@vmware.com> 228-3 |
|
| 108 |
+- Patch for ostree. |
|
| 107 | 109 |
* Wed Dec 16 2015 Anish Swaminathan <anishs@vmware.com> 228-2 |
| 108 | 110 |
- Patch for loopback address. |
| 109 | 111 |
* Fri Dec 11 2015 Anish Swaminathan <anishs@vmware.com> 228-1 |
| ... | ... |
@@ -107,7 +107,8 @@ class OstreeInstaller(Installer): |
| 107 | 107 |
self.execute_modules(modules.commons.PRE_INSTALL) |
| 108 | 108 |
|
| 109 | 109 |
disk = self.install_config['disk']['disk'] |
| 110 |
- self.run("sgdisk -d 2 -n 2::+300M -n 3: -p {}".format(disk), "Updating partition table for OSTree")
|
|
| 110 |
+ self.run("sgdisk -d 1 -d 2 -n 1::+2M -n 2::+300M -n 3: -p {}".format(disk), "Updating partition table for OSTree")
|
|
| 111 |
+ self.run("sgdisk -t1:ef02 {}".format(disk))
|
|
| 111 | 112 |
self.run("mkfs -t ext4 {}2".format(disk))
|
| 112 | 113 |
self.run("mkfs -t ext4 {}3".format(disk))
|
| 113 | 114 |
self.run("mount {}3 {}".format(disk, self.photon_root))
|
| ... | ... |
@@ -19,7 +19,7 @@ |
| 19 | 19 |
|
| 20 | 20 |
"packages": ["glibc", "zlib", "binutils", "gmp", "mpfr", "libgcc", "libstdc++","libgomp", |
| 21 | 21 |
"pkg-config", "ncurses", "bash", "bzip2", "cracklib", "cracklib-dicts", "shadow", |
| 22 |
- "procps-ng", "iana-etc", "readline", "coreutils", "bc", "libtool", "inetutils", |
|
| 22 |
+ "procps-ng", "iana-etc", "readline", "coreutils", "bc", "libtool", "net-tools", |
|
| 23 | 23 |
"findutils", "xz", "grub2", "iproute2", "util-linux", "linux", |
| 24 | 24 |
"attr", "libcap", "kmod", "expat", "dbus", "file", |
| 25 | 25 |
"sed", "grep", "cpio", "gzip", |