Skip to contentSkip to conversation

Fixed flask policy's install path to avoid installing it as '/boot' file

PATCH Superseded Vadim A. Misbakh-Soloviov 4 participants 7 messages Jul 29, 2013 – Jul 30, 2013

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Fixed flask policy's install path to avoid installing it as '/boot' file

From: "Vadim A. Misbakh-Soloviov" <[email protected]>

---
 tools/flask/policy/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/flask/policy/Makefile +1 -0
index e666f3e..d917231 100644
@@ -103,6 +103,7 @@ POLICY_SECTIONS += $(USERS) $(CONSTRAINTS) $(ISID_DEFS)
 all: $(POLICY_FILENAME)
 
 install: $(POLICY_FILENAME)
+	$(INSTALL_DIR) $(DESTDIR)$(POLICY_LOADPATH)
 	$(INSTALL_DATA) $^ $(POLICY_LOADPATH)
 
 $(POLICY_FILENAME): policy.conf
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 2/2 Fixed xen-tools makefile to build flask-tools and flask policy only if flask build especially enabled

From: "Vadim A. Misbakh-Soloviov" <[email protected]>

---
 tools/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/Makefile +2 -0
index e44a3e9..c2bcbda 100644
@@ -8,7 +8,9 @@ endif
 SUBDIRS-y :=
 SUBDIRS-y += include
 SUBDIRS-y += libxc
+ifeq($(FLASK_ENABLE),y)
 SUBDIRS-y += flask
+endif
 SUBDIRS-y += xenstore
 SUBDIRS-y += misc
 SUBDIRS-y += examples
Signature · 1 line
1.8.3.2
#2 lore raw

Re: [PATCH 2/2] Fixed xen-tools makefile to build flask-tools and flask policy only if flask build especially enabled

Quoted 12 lines · Vadim A. Misbakh-Soloviov

From: "Vadim A. Misbakh-Soloviov" <[email protected]>

---
 tools/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/Makefile +0 -0
index e44a3e9..c2bcbda 100644

tools/Makefile endif · line 13

Quoted 6 lines
tools/Makefile +2 -0
@@ -8,7 +8,9 @@ endif
 SUBDIRS-y :=
 SUBDIRS-y += include
 SUBDIRS-y += libxc
+ifeq($(FLASK_ENABLE),y)
 SUBDIRS-y += flask
+endif

SUBDIRS-$(FLASK_ENABLE) += flask

Is the preferred way of doing this.

~Andrew

Quoted 3 lines
tools/Makefile +0 -0
 SUBDIRS-y += xenstore
 SUBDIRS-y += misc
 SUBDIRS-y += examples
Acked-by on v1 1/2
#3 lore raw
In reply to Vadim A. Misbakh-Soloviov
Quoted 13 lines · Vadim A. Misbakh-Soloviov

From: "Vadim A. Misbakh-Soloviov" <[email protected]>

---
  tools/flask/policy/Makefile | 1 +
  1 file changed, 1 insertion(+)
tools/flask/policy/Makefile +0 -0
index e666f3e..d917231 100644

tools/flask/policy/Makefile POLICY_SECTIONS += $(USERS) $(CONSTRAINTS) $(ISID_DEFS) · line 109

Quoted 7 lines
tools/flask/policy/Makefile +1 -0
@@ -103,6 +103,7 @@ POLICY_SECTIONS += $(USERS) $(CONSTRAINTS) $(ISID_DEFS)
  all: $(POLICY_FILENAME)
 
  install: $(POLICY_FILENAME)
+	$(INSTALL_DIR) $(DESTDIR)$(POLICY_LOADPATH)
  	$(INSTALL_DATA) $^ $(POLICY_LOADPATH)
 
  $(POLICY_FILENAME): policy.conf

POLICY_LOADPATH is defined as $(DESTDIR)/boot, so this expands to:

	$(INSTALL_DIR) $(DESTDIR)$(DESTDIR)/boot

I believe the correct fix is to instead add:

	$(INSTALL_DIR) $(POLICY_LOADPATH)

With that change, this patch is

Patch 2/2 looks correct as-is or with Andrew's cleanup.

Signature · 2 lines
Daniel De Graaf
National Security Agency
#4 lore raw

Okay, thanks.

So, Can I just ammend commits and resend both patches again? :)

29.07.2013 21:18, Daniel De Graaf пишет:

Quoted 26 lines · Vadim A. Misbakh-Soloviov
Quoted 19 lines

From: "Vadim A. Misbakh-Soloviov" <[email protected]>

---
  tools/flask/policy/Makefile | 1 +
  1 file changed, 1 insertion(+)
tools/flask/policy/Makefile +1 -0
index e666f3e..d917231 100644
@@ -103,6 +103,7 @@ POLICY_SECTIONS += $(USERS) $(CONSTRAINTS)
 $(ISID_DEFS)
  all: $(POLICY_FILENAME)
 
  install: $(POLICY_FILENAME)
+    $(INSTALL_DIR) $(DESTDIR)$(POLICY_LOADPATH)
      $(INSTALL_DATA) $^ $(POLICY_LOADPATH)
 
Quoted 2 lines
  $(POLICY_FILENAME): policy.conf

POLICY_LOADPATH is defined as $(DESTDIR)/boot, so this expands to:

    $(INSTALL_DIR) $(DESTDIR)$(DESTDIR)/boot
Quoted 9 lines

I believe the correct fix is to instead add:

    $(INSTALL_DIR) $(POLICY_LOADPATH)

With that change, this patch is

Patch 2/2 looks correct as-is or with Andrew's cleanup.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
In reply to Daniel De Graaf
Quoted 23 lines · Daniel De Graaf
Quoted 13 lines · Vadim A. Misbakh-Soloviov

From: "Vadim A. Misbakh-Soloviov" <[email protected]>

---
  tools/flask/policy/Makefile | 1 +
  1 file changed, 1 insertion(+)
tools/flask/policy/Makefile +0 -0
index e666f3e..d917231 100644

tools/flask/policy/Makefile POLICY_SECTIONS += $(USERS) $(CONSTRAINTS) $(ISID_DEFS) · line 109

Quoted 7 lines
tools/flask/policy/Makefile +1 -0
@@ -103,6 +103,7 @@ POLICY_SECTIONS += $(USERS) $(CONSTRAINTS) $(ISID_DEFS)
  all: $(POLICY_FILENAME)
 
  install: $(POLICY_FILENAME)
+	$(INSTALL_DIR) $(DESTDIR)$(POLICY_LOADPATH)
  	$(INSTALL_DATA) $^ $(POLICY_LOADPATH)
 
  $(POLICY_FILENAME): policy.conf

POLICY_LOADPATH is defined as $(DESTDIR)/boot, so this expands to:

Quoted 8 lines
	$(INSTALL_DIR) $(DESTDIR)$(DESTDIR)/boot

I believe the correct fix is to instead add:

	$(INSTALL_DIR) $(POLICY_LOADPATH)

With that change, this patch is

I think it would be a bit less surprising for drive by patchers etc to remove the DESTDIR from POLICY_LOADPATH and add it to the install target, which is the usual way to do things. Up to you/Vadim though.

Quoted 3 lines

Patch 2/2 looks correct as-is or with Andrew's cleanup.

#6 lore raw
Quoted 3 lines · Ian Campbell

I think it would be a bit less surprising for drive by patchers etc to remove the DESTDIR from POLICY_LOADPATH and add it to the install target, which is the usual way to do things. Up to you/Vadim though.

So, V3? ;)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel