Bug 673116: Fix file ownership in deb package on MeeGo. r=romaxa
authorjeremias bosch <jeremias.bosch@gmail.com>
Tue, 09 Aug 2011 12:30:56 -0700
changeset 74147 838b538e5b4a5ee97912957d2f1100dc785620b2
parent 74146 10aece9bb796496183fdfe3e695a177f9bb9b6cf
child 74148 ee51239376b5c41f7714415f74c398f76654b3d9
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersromaxa
bugs673116
milestone8.0a1
Bug 673116: Fix file ownership in deb package on MeeGo. r=romaxa
mobile/installer/Makefile.in
mobile/installer/debian/fennec.aegis.in
--- a/mobile/installer/Makefile.in
+++ b/mobile/installer/Makefile.in
@@ -174,16 +174,20 @@ PP_DEB_FILES =	debian/control \
 		debian/compat \
 		debian/files \
 		debian/menu \
 		debian/fennec.preinst \
 		debian/fennec.prerm \
 		debian/fennec.postinst \
 		$(NULL)
 
+ifdef MOZ_ENABLE_CONTENTMANAGER
+PP_DEB_FILES += debian/fennec.aegis \
+               $(NULL)
+endif
 
 $(PP_DEB_FILES):
 	@$(EXIT_ON_ERROR) \
 	for f in $(PP_DEB_FILES); do \
            src=$(srcdir)/debian/`basename $$f`.in; \
 	   echo $$src ">" $$f ;\
            $(RM) -f $$f; \
            mkdir -p debian;  \
@@ -209,17 +213,28 @@ else
 	cp debian/$(MOZ_APP_NAME).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_APP_NAME).service
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/scalable/hildon/
 	cp $(DIST)/branding/$(MOZ_APP_NAME)_scalable.png $(DEBDESTDIR)/usr/share/icons/hicolor/scalable/hildon/$(MOZ_APP_NAME).png
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/26x26/hildon/
 	cp $(DIST)/branding/$(MOZ_APP_NAME)_26x26.png $(DEBDESTDIR)/usr/share/icons/hicolor/26x26/hildon/$(MOZ_APP_NAME).png
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/icons/hicolor/40x40/hildon/
 	cp $(DIST)/branding/$(MOZ_APP_NAME)_40x40.png $(DEBDESTDIR)/usr/share/icons/hicolor/40x40/hildon/$(MOZ_APP_NAME).png
 endif
-	dh_link; fakeroot dh_fixperms; fakeroot dh_installdeb; dh_shlibdeps; fakeroot dh_gencontrol; fakeroot dh_md5sums; dh_builddeb
+	fakeroot dh_link; fakeroot dh_fixperms; fakeroot dh_installdeb; fakeroot dh_shlibdeps; fakeroot dh_gencontrol; fakeroot dh_md5sums; fakeroot dh_builddeb;
+
+# a defined CONTENTMANAGER implicitly means MOZ_PLATFORM_MAEMO is equals 6
+# in case you use CONTENTMANGER you need to sign your package to gain tracker access.
+ifdef MOZ_ENABLE_CONTENTMANAGER
+	if test -e "/usr/bin/aegis-deb-add"; then \
+	   fakeroot aegis-deb-add -control $(DEBDESTDIR)/DEBIAN/control .. debian/fennec.aegis=_aegis; \
+	else \
+	   echo aegis-builder not found, security signing failed!; \
+	fi
+endif
+
 	echo $(DEB_PKG_NAME) > $(DIST)/deb_name.txt
 
 installer: deb
 	@echo Installer DEB created!
 
 # relative to $(DIST)
 UPLOAD_EXTRA_FILES += ../mobile/$(DEB_PKG_NAME) deb_name.txt
 endif
new file mode 100644
--- /dev/null
+++ b/mobile/installer/debian/fennec.aegis.in
@@ -0,0 +1,7 @@
+<aegis>
+  <request>
+    <credential name="TrackerReadAccess" />
+    <credential name="TrackerWriteAccess" />
+  </request>
+</aegis>
+