Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Issue 7599018: Code to package Cloud Print Linux and Mac virtual drivers. (Closed)

Created:
9 years, 4 months ago by abeera
Modified:
7 years, 6 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Code to package Cloud Print Linux and Mac virtual drivers. Copies the relevant to PRODUCTDIR/cloud_print_installer using the GYP file mechanism. On Linux, then rolls the Debian package using dpkg-deb, called by build.sh. Similarly, on Mac, creates a package installer. BUG=NONE TEST=gcp-driver.deb or GCP-virtual-driver.pkg is produced in PRODUCTDIR/cloud_print_installer

Patch Set 1 #

Patch Set 2 : Rebased off trunk #

Patch Set 3 : Code for packaging on Mac. #

Patch Set 4 : Mac Packaging code. #

Patch Set 5 : Rebased off trunk #

Patch Set 6 : Fixed to be executable #

Patch Set 7 : Moved build scripts to seperate CL to facilitate try server usage #

Total comments: 20

Patch Set 8 : Fixes as per code review. #

Patch Set 9 : minor tewak #

Patch Set 10 : Changed Copyright file per discusssion #

Total comments: 4

Patch Set 11 : Style fix. #

Total comments: 29
Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -0 lines) Patch
M build/all.gyp View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
A cloud_print/virtual_driver/posix/linux_packaging/changelog View 1 chunk +5 lines, -0 lines 0 comments Download
A cloud_print/virtual_driver/posix/linux_packaging/control View 1 chunk +9 lines, -0 lines 0 comments Download
A cloud_print/virtual_driver/posix/linux_packaging/copyright View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A cloud_print/virtual_driver/posix/linux_packaging/postinst View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
A cloud_print/virtual_driver/posix/linux_packaging/postrm View 1 chunk +4 lines, -0 lines 0 comments Download
A cloud_print/virtual_driver/posix/linux_packaging/prerm View 1 chunk +4 lines, -0 lines 0 comments Download
A cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/01package.xml View 1 2 3 4 5 6 7 1 chunk +40 lines, -0 lines 0 comments Download
A cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/01package-contents.xml View 1 2 3 4 5 6 7 1 chunk +28 lines, -0 lines 7 comments Download
A cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/index.xml View 1 2 3 4 5 6 7 1 chunk +28 lines, -0 lines 2 comments Download
A cloud_print/virtual_driver/posix/mac_packaging/install.sh View 1 2 3 4 5 6 7 1 chunk +24 lines, -0 lines 11 comments Download
A cloud_print/virtual_driver/posix/mac_packaging/uninstall.sh View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 2 comments Download
A cloud_print/virtual_driver/posix/virtual_driver_posix_packaging.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +105 lines, -0 lines 7 comments Download

Messages

Total messages: 11 (0 generated)
abeera
Right now, I just have a placeholder Copyright file . I'll update it once I ...
9 years, 4 months ago (2011-08-09 20:28:29 UTC) #1
Scott Byer
CC'ing in Nico for virtual_driver_posix_packaging.gyp, who can feel free to forward it on to someone ...
9 years, 4 months ago (2011-08-17 20:51:36 UTC) #2
abeera
http://codereview.chromium.org/7599018/diff/11001/cloud_print/virtual_driver/posix/linux_packaging/postinst File cloud_print/virtual_driver/posix/linux_packaging/postinst (right): http://codereview.chromium.org/7599018/diff/11001/cloud_print/virtual_driver/posix/linux_packaging/postinst#newcode10 cloud_print/virtual_driver/posix/linux_packaging/postinst:10: lpadmin -p Google-Cloud-Print -E -P /usr/share/ppd/GCP/GCP-driver.ppd -D "Google Cloud ...
9 years, 4 months ago (2011-08-18 16:36:25 UTC) #3
abeera
http://codereview.chromium.org/7599018/diff/11001/cloud_print/virtual_driver/posix/linux_packaging/copyright File cloud_print/virtual_driver/posix/linux_packaging/copyright (right): http://codereview.chromium.org/7599018/diff/11001/cloud_print/virtual_driver/posix/linux_packaging/copyright#newcode3 cloud_print/virtual_driver/posix/linux_packaging/copyright:3: # found in the LICENSE file. On 2011/08/17 20:51:36, ...
9 years, 4 months ago (2011-08-18 19:16:42 UTC) #4
abeera
Today's actually my last day, so it'd be great if you could take a look. ...
9 years, 4 months ago (2011-08-19 15:33:43 UTC) #5
Nico
I was mostly waiting on Scott to LG the non-gyp files. Now that I looked ...
9 years, 4 months ago (2011-08-19 15:41:25 UTC) #6
Mark Mentovai
i’m not positive I’ll be able to do a big review like this on such ...
9 years, 4 months ago (2011-08-19 15:54:18 UTC) #7
abeera
http://codereview.chromium.org/7599018/diff/19002/cloud_print/virtual_driver/posix/virtual_driver_posix_packaging.gyp File cloud_print/virtual_driver/posix/virtual_driver_posix_packaging.gyp (right): http://codereview.chromium.org/7599018/diff/19002/cloud_print/virtual_driver/posix/virtual_driver_posix_packaging.gyp#newcode7 cloud_print/virtual_driver/posix/virtual_driver_posix_packaging.gyp:7: 'INSTALLER_DIR' : '<(PRODUCT_DIR)/cloud_print_installer', In the other GYP files I ...
9 years, 4 months ago (2011-08-19 21:12:19 UTC) #8
Mark Mentovai
I hope my review came in time for you. This still needs work and needs ...
9 years, 4 months ago (2011-08-19 23:52:20 UTC) #9
Mark Mentovai
Note for review: consider cloud_print/virtual_driver/posix/mac_packaging/build_mac.sh and cloud_print/virtual_driver/posix/linux_packaging/build.sh as well. They were originally part of this ...
9 years, 4 months ago (2011-08-19 23:56:23 UTC) #10
abeera_chromium.org
9 years, 4 months ago (2011-08-20 02:37:12 UTC) #11
Thank you for your quick response. Unfortunately, I'd left the office and I
don't have access to dev machines anymore. However, I've tried to respond where
I can.

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
File
cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/01package-contents.xml
(right):

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/01package-contents.xml:3:
<f n="package_root" o="root" g="wheel" p="16877"
pt="/Users/abeera/chrome/src/cloud_print/virtual_driver/posix/mac_packaging/package_root"
m="true" t="file">
That's an error, I should have caught that earlier. I've emailed my mentors with
possible fixes. 
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> Why is your home directory here? What happens if someone not named abeera
tries
> to use this?

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/01package-contents.xml:8:
<f n="GCP-driver" o="root" g="wheel" p="33216">
We want to run the CUPS backend GCP-driver as root. Setting the permissions in
this way allows that.
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> 33216 = 0100700. Why are the group and other bits clear?

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/01package-contents.xml:28:
</pkg-contents>
I created them using Mac package maker: the pmdoc file can be opened in the
packagemaker GUI on Mac.
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> Can you tell us how you created these files?

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
File
cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/index.xml
(right):

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/mac_packaging/GCP-Virtual-Driver.pmdoc/index.xml:5:
<build>/Users/abeera/Desktop/aa.pkg</build>
This field is ignored when we build on the command line with the -t flag, as in
build_mac.sh. However, It can be fixed in the same way as the other location.
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> Again with the home directory. And what’s aa.pkg?

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
File cloud_print/virtual_driver/posix/mac_packaging/install.sh (right):

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/mac_packaging/install.sh:9: chmod 0700
/usr/libexec/cups/backend/GCP-driver
We need the permissions to be set this way, so that CUPS runs the program as
root,
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> Why 0700?

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/mac_packaging/install.sh:20: lpadmin -p
Google-Cloud-Print-$USER -E -P GCP-driver.ppd -D \

We only want to install per user, since GCP-install only installs for the
current user. Other users will have to run the installation process again. 
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> This only creates it for one user. How will other users on the system get
their
> own virtual driver instances?

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/mac_packaging/install.sh:24: ./GCP-install
Its a file that I wrote, part of the Chromium project, checked in earlier in
http://codereview.chromium.org/7485011/

On 2011/08/19 23:52:20, Mark Mentovai wrote:
> I would prefer to see
> 
> "$(pwd)/GCP-install"
> 
> so that ps output is more useful.
> 
> This also runs as root, right? Where’s the source? Can’t be too careful…

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
File cloud_print/virtual_driver/posix/mac_packaging/uninstall.sh (right):

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/mac_packaging/uninstall.sh:1: #!/bin/bash
I did not have sufficient time to build a complete uninstaller. This is just a
temporary script.
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> Similar comments to the other script apply.
> 
> I assume the other one is launched from the installer. Who launches this one?
> Where’s it live?

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
File cloud_print/virtual_driver/posix/virtual_driver_posix_packaging.gyp
(right):

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/virtual_driver_posix_packaging.gyp:7:
'INSTALLER_DIR' : '<(PRODUCT_DIR)/cloud_print_installer',
Ah, thank you for clearing that up. All the path variables in the file I
referenced were uppercase, so I just assumed that to be the convention.
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> installer_dir, lowercase. UPPERCASE_NAMES are reserved by GYP.

http://codereview.chromium.org/7599018/diff/24001/cloud_print/virtual_driver/...
cloud_print/virtual_driver/posix/virtual_driver_posix_packaging.gyp:40:
'moved_packaging_files_mac': [
Packaging files are the files at their original location, moved packaging files
are the files that have been copied over to the staging directory.
On 2011/08/19 23:52:20, Mark Mentovai wrote:
> What are “packaging files” compared to “moved packaging files?”

Powered by Google App Engine
This is Rietveld 408576698