Linux cron script produces an invalid path |
||||||||||||||||||||
Issue descriptionChrome Version : 55.x OS Version: Ubuntu 16.10 I noticed that previous Chrome installations (about a year ago) created an apt source file in /etc/apt/sources.list.d. I just reinstalled my Ubuntu with a fresh Chrome beta and noticed that this file doesn't exist, thus preventing Chrome from autoupdating. I did some digging, and I believe that this is the script that should create this file: /opt/google/chrome-beta/cron/google-chrome-beta In there, there's a function: find_apt_sources I ran this manually, and this produces the following 4 variables: / etc/apt /etc/aptsources.list /etc/aptsources.list.d So it looks like a slash is missing, and it's not finding api's source list directory. If this is true, it also means that new installations since the introduction of the bug have lost their ability to auto-update, I'd be curious if you have a way of confirming that.
,
Nov 8 2016
,
Nov 8 2016
SEE: https://bugs.chromium.org/p/chromium/issues/detail?id=660145 AND: https://github.com/keybase/client/commit/7894c1f57f3ca5ecb3b5fc87e4496769103b7fd4 for possible *** WORK-AROUNDS *** till fixed by upstream.
,
Nov 8 2016
Will this actually be fixed by upstream? If not, or not soon enough, many users will get stuck at their current version and will miss out on security updates.
,
Nov 8 2016
YUP! How do I start a red-alert strobe light in the chromium dev lounge from this blasted LCARS station?
,
Nov 8 2016
,
Nov 8 2016
Issue 660145 has been merged into this issue.
,
Nov 8 2016
,
Nov 8 2016
Requesting merge to stable and beta. The change that just landed in https://codereview.chromium.org/2482343002/ should be very small and safe + bustamante@ Are we still set to push a new 54 tomorrow on Linux? Any chance this could be added last-minute? (If Ubuntu 16.10 / Debian 9 users don't get the aformentioned patch, they will be eternally stuck at whatever version of Chrome they have installed for all channels.)
,
Nov 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/389af6af989c5ba5384988b55fc28a3f231a1479 commit 389af6af989c5ba5384988b55fc28a3f231a1479 Author: thomasanderson <thomasanderson@google.com> Date: Tue Nov 08 23:52:48 2016 Linux installer: Fix APT_SOURCES and APT_SOURCESDIR paths In prior versions of Ubuntu/Debian the Dir::Etc apt-config variable contained a trailing slash by default. The cronjob at /etc/cron.daily/google-chrome was concatenating that variable into a path, assuming the trailing slash. But in Ubuntu 16.10, the trailing slash is gone. That breaks the path to the list file, and the cronjob fails to fix it. BUG= 663069 Review-Url: https://codereview.chromium.org/2482343002 Cr-Commit-Position: refs/heads/master@{#430771} [modify] https://crrev.com/389af6af989c5ba5384988b55fc28a3f231a1479/chrome/installer/linux/common/apt.include
,
Nov 9 2016
Unfortunately, I think the build for tomorrow's push is already in testing, unless we want to do a new spin just for Linux and push that out separately, after Mac/Win. Normally we wouldn't do that, but this issue is bad enough that it might warrant it.
,
Nov 9 2016
Thanks for reporting this, it looks like this issue was introduced back in 2013: https://chromium.googlesource.com/chromium/src/+/b5cb4e77ea48612174323b2d813931c0f8a3cc42 It's very likely any users that are going to affect have already been affected, so I don't think this justifies an emergency stable respin (as users reportedly won't be able to see the update anyways). Let's investigate and get more data and decide on a course of action from there.
,
Nov 9 2016
No, the code has worked this whole time. The issue is that there was a change in recent Ubuntu that caused it to fail, so is only now affecting users. We still have a chance to prevent it from affecting more.
,
Nov 9 2016
Anantha/Richard, please make a call ASAP, guess we need to take this merge since Ubuntu 16.10 users may not get the latest chrome update. thomasanderson@ If we have a build ready, will you be able to verify the fix?
,
Nov 9 2016
ligimole@ Yes, I would be able to verify the fix should we decide to merge. I guess we would need to push back the 54 release until at least Thursday?
,
Nov 9 2016
FYI:We also have M55 Beta release plan tomorrow. Do we need to push back Beta release too or this fix can wait til next week beta?
,
Nov 9 2016
If releasing beta tomorrow would mean that we won't ship beta again for another week, then I think we should push back the beta release too.
,
Nov 9 2016
,
Nov 9 2016
Please consider the orthogonal, errr ... canonical use of apt-config in order to harden this process against future breakage: "... <snip> That's a side effect of making that user configurable. I could probably change the default back to add a slash, but relying on the value of a Dir:: option is broken anyway (except for some Dir::Bin::...) - you must always access them correctly as either directory (Dir::Etc/d in apt-config) or file (Dir::Etc/f in apt-config). ... <snip> if it is using apt-config, it forgot to append /d to get a directory path. You may not use the value of Dir::Etc, Dir::State and so on without /d. Especially for sources.list.d, there should be non concatenation at all it should be Dir::Etc::SourceParts/d That gives you the right path, including root directory settings and other [bleep]. -- Debian Developer - deb.li/jak | jak-linux.org - free software dev" SOURCE: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836427#10
,
Nov 9 2016
What the script does now: apt-config dump | sed <magic> Yuck! I tested your solution and seems to work: $ apt-config shell x Dir::Etc::SourceParts/d x='/etc/apt/sources.list.d/'
,
Nov 9 2016
Approving merge to M55 branch 2883 based on comment #9. Please merge ASAP. Thank you.
,
Nov 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/19de766ee7ffae45d1e7944dd44959b7da5fd257 commit 19de766ee7ffae45d1e7944dd44959b7da5fd257 Author: thomasanderson <thomasanderson@google.com> Date: Wed Nov 09 17:36:13 2016 Linux installer: Fix APT_SOURCES and APT_SOURCESDIR paths > In prior versions of Ubuntu/Debian the Dir::Etc apt-config variable > contained a trailing slash by default. The cronjob at > /etc/cron.daily/google-chrome was concatenating that variable into a > path, assuming the trailing slash. But in Ubuntu 16.10, the trailing > slash is gone. That breaks the path to the list file, and the cronjob > fails to fix it. > > BUG= 663069 > > Review-Url: https://codereview.chromium.org/2482343002 > Cr-Commit-Position: refs/heads/master@{#430771} > BUG= 663069 TBR=thestig@chromium.org NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2492503002 Cr-Commit-Position: refs/branch-heads/2883@{#506} Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768} [modify] https://crrev.com/19de766ee7ffae45d1e7944dd44959b7da5fd257/chrome/installer/linux/common/apt.include
,
Nov 9 2016
re: #17, I think holding up beta is a little less critical than stable, just because we already know there will be another beta release relatively soon, but there probably won't be for stable, and there are just way fewer beta users. If we need to respin this week's beta, then yes, we should definitely make sure this get in there, but I don't think it will make that much of a difference if it waits until next week.
,
Nov 9 2016
Approving for merge into M54, I still want to review this more before deciding on a respin. But we should have it in the branch definitely.
,
Nov 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f80709c4c375c0c3fc326dd64f9d1bd7dc40770c commit f80709c4c375c0c3fc326dd64f9d1bd7dc40770c Author: thomasanderson <thomasanderson@google.com> Date: Wed Nov 09 18:18:50 2016 Linux installer: Fix APT_SOURCES and APT_SOURCESDIR paths > In prior versions of Ubuntu/Debian the Dir::Etc apt-config variable > contained a trailing slash by default. The cronjob at > /etc/cron.daily/google-chrome was concatenating that variable into a > path, assuming the trailing slash. But in Ubuntu 16.10, the trailing > slash is gone. That breaks the path to the list file, and the cronjob > fails to fix it. > > BUG= 663069 > > Review-Url: https://codereview.chromium.org/2482343002 > Cr-Commit-Position: refs/heads/master@{#430771} > BUG= 663069 TBR=thestig@chromium.org NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2494493002 Cr-Commit-Position: refs/branch-heads/2840@{#832} Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607} [modify] https://crrev.com/f80709c4c375c0c3fc326dd64f9d1bd7dc40770c/chrome/installer/linux/common/apt.include
,
Nov 9 2016
The `apt-config shell` approach gets discussed a bit in https://bugs.chromium.org/p/chromium/issues/detail?id=660145. It's certainly much cleaner than what we're doing now. The current fix leaves us in a dirty place overall, but it has the upside that it shouldn't break anything that currently works (because extra slashes in a path should always be ok). With a bigger change to use `apt-config shell` instead, we'd need to test by hand to make sure it actually works on every supported version of Debian/Ubuntu/whatever.
,
Nov 9 2016
A quick glance at the history of apt-config shows the shell syntax has been available for a long time (ugh, not sure why we didn't use that to begin with), so I doubt there would be any compatibility problems. We should definitely switch to that at some point, although I agree the current fix is fine for purposes of this bug.
,
Nov 10 2016
As part of Installer testing: 1) Installed chrome version 54.0.2840.100 on Ubuntu 16.10, no issues observed. 2) Installed chrome version 54.0.2840.90 and over installed chrome version 54.0.2840.100 on Ubuntu 16.10 and did not observe any issues. Also Navigated to the path by: $ls /etc/apt/sources.list.d/ Observed a google repository named "google-chrome.list" in /etc/apt/sources.list.d Can we have any other specific steps or piece of code, which we can execute and check the path incase if required. Thanks.!
,
Nov 10 2016
,
Nov 10 2016
I would suggest to roll out the hotfix as planned, but keep this bug open for a proper solution. Proper solution would be the apt-config shell method described above, and you might add /etc/apt/sources.list.d as a hardcoded fallback (because I assume it's not changed in 99.99% of installations anyway).
,
Nov 10 2016
ranjitkan@, Maybe also test the cron script directly. You could edit the chrome file in /etc/apt/sources.list.d/, maybe by changing "dl.google.com" to something else, then run 'sudo /etc/cron.daily/google-chrome' and verify that it converts the sources.list.d file back to the way it was. If the cron script is having any trouble finding that file, it won't be able to revert your edits.
,
Nov 10 2016
joco@, yeah, that's the plan.
,
Nov 10 2016
,
Nov 10 2016
mmoss@, I think the cronjob looks for very specific changes to the .list file, which have to include a comment of the form "# disabled on upgrade to .*". If you just edit the "dl.google.com" part and run it, it might not do anything?
,
Nov 10 2016
oconnor663@, That's just one type of change it looks for. It also attempts to validate the repository URL, so editing that should also trigger a revert.
,
Nov 10 2016
I've verified 54.0.2840.100 with the following method in a 16.10 chroot:
root@thomasanderson:/# dpkg -i desktop-5c0tCh%2F54.0.2840.50%2Fprecise64%2Fgoogle-chrome-stable_54.0.2840.50-1_amd64.deb
Selecting previously unselected package google-chrome-stable.
(Reading database ... 62749 files and directories currently installed.)
Preparing to unpack desktop-5c0tCh%2F54.0.2840.50%2Fprecise64%2Fgoogle-chrome-stable_54.0.2840.50-1_amd64.deb ...
Unpacking google-chrome-stable (54.0.2840.50-1) ...
Setting up google-chrome-stable (54.0.2840.50-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for desktop-file-utils (0.23-1ubuntu1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
root@thomasanderson:/# cat /etc/apt/sources.list.d/google-chrome.list
cat: /etc/apt/sources.list.d/google-chrome.list: No such file or directory
root@thomasanderson:/# apt remove --purge google-chrome-stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
fonts-liberation gconf-service gconf-service-backend gconf2-common libappindicator1 libauthen-sasl-perl libdbusmenu-gtk4 libencode-locale-perl libfile-basedir-perl libfile-desktopentry-perl
libfile-listing-perl libfile-mimeinfo-perl libfont-afm-perl libgconf-2-4 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libindicator7 libio-html-perl libio-socket-ssl-perl libipc-system-simple-perl liblwp-mediatypes-perl
liblwp-protocol-https-perl libmailtools-perl libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libpango1.0-0 libpangox-1.0-0 libtie-ixhash-perl libtimedate-perl liburi-perl
libwww-perl libwww-robotrules-perl libx11-protocol-perl libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl xdg-utils
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
google-chrome-stable*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 177 MB disk space will be freed.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:",
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 62850 files and directories currently installed.)
Removing google-chrome-stable (54.0.2840.50-1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
(Reading database ... 62749 files and directories currently installed.)
Removing google-chrome-stable (54.0.2840.50-1) ...
Purging configuration files for google-chrome-stable (54.0.2840.50-1) ...
root@thomasanderson:/# dpkg -i desktop-5c0tCh%2F54.0.2840.100%2Fprecise64%2Fgoogle-chrome-stable_54.0.2840.100-1_amd64.deb
Selecting previously unselected package google-chrome-stable.
(Reading database ... 62749 files and directories currently installed.)
Preparing to unpack desktop-5c0tCh%2F54.0.2840.100%2Fprecise64%2Fgoogle-chrome-stable_54.0.2840.100-1_amd64.deb ...
Unpacking google-chrome-stable (54.0.2840.100-1) ...
Setting up google-chrome-stable (54.0.2840.100-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for desktop-file-utils (0.23-1ubuntu1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
root@thomasanderson:/# cat /etc/apt/sources.list.d/google-chrome.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
,
Nov 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e7cdc64930f4073c068b56eeae5625cc038756e commit 6e7cdc64930f4073c068b56eeae5625cc038756e Author: mmoss <mmoss@chromium.org> Date: Fri Nov 11 00:29:32 2016 Fix chromoting apt-config usage that breaks on Ubuntu 16.10. BUG= 663069 R=lambroslambrou@chromium.org Review-Url: https://codereview.chromium.org/2488393002 Cr-Commit-Position: refs/heads/master@{#431409} [modify] https://crrev.com/6e7cdc64930f4073c068b56eeae5625cc038756e/remoting/host/installer/linux/debian/postrm
,
Nov 11 2016
,
Nov 11 2016
,
Nov 11 2016
Approving merge to M55 branch 2883 for cl listed #37 as it is a safe merge per chat with mmoss@.
,
Nov 11 2016
,
Nov 11 2016
I see M55 merge landed - https://chromium.googlesource.com/chromium/src.git/+/dc3803a50889e44a1d063103a5b19379832ff764 Is there anything pending for M55? If not, please remove "Merge-Approved-55" label and apply "merge-merged-2883" label. Thabnk you.
,
Nov 11 2016
Hmm, not sure why bugdroid didn't update this.
,
Nov 11 2016
,
Nov 11 2016
Confirming fix for OP report on clean 16.10 install: ~$ sudo mv /etc/apt/sources.list.d/google-chrome.list . ~$ sudo vi /etc/default/google-chrome :s/false/true ~$ sudo apt-get ... Get:1 http://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 54.0.2840.100-1 [45.6 MB] Fetched 45.6 MB in 5s (7,726 kB/s) (Reading database ... 159742 files and directories currently installed.) Preparing to unpack .../google-chrome-stable_54.0.2840.100-1_amd64.deb ... Unpacking google-chrome-stable (54.0.2840.100-1) over (54.0.2840.90-1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu1) ... Processing triggers for man-db (2.7.5-1) ... Setting up google-chrome-stable (54.0.2840.100-1) ... ~$ sudo /etc/cron.daily/google-chrome ~$ diff /opt/google/chrome/cron/google-chrome .INSTALL-CONFIGS/UBUNTU/google-chrome 168,171d167 < # NB: These variables only *sometimes* include a trailing slash. (In < # particular, in Ubuntu 16.10 / Debian 9, the default value *stopped* < # including the trailing slash.) We have to join them with slashes, even < # though that sometimes gives a double slash. ~$ cat /etc/apt/sources.list.d/google-chrome.list ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out this entry, but any other modifications may be lost. deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main Thanx for the fix!
,
Nov 14 2016
**** Bulk edit - please ignore if not applicable **** A friendly reminder that M55 Stable is launch is coming soon! Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and get it merged into the release branch ASAP so it gets enough baking time in Beta (before Stable promotion). Thank you! Also due to Thanksgiving holidays in US, please make sure fix is ready and merged to M55 latest by 5:00 PM PT Friday, 11/18/16 (sooner the better).
,
Nov 15 2016
,
Nov 16 2016
Rechecked this as verified in comment#28 and Comment#36 using chrome beta version 55.0.2883.52 on Ubuntu 16.10. Merge is working as intended. Obtained the following output at the end: chromeqa@Ubuntu:~$cat /etc/apt/sources.list.d/google-chrome.list ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out this entry, but any other modifications may be lost. deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main Adding TE-verified labels. Thanks.!
,
Dec 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/902df7e81d1c9f04e1500dd0bce59647b08d6b85 commit 902df7e81d1c9f04e1500dd0bce59647b08d6b85 Author: thomasanderson <thomasanderson@google.com> Date: Thu Dec 01 23:41:06 2016 Remove apt_config_val from apt.include find_apt_sources() used to dump all variables in apt-config and grep for the needed variables. However, apt-config provides a 'shell' arg for this purpose, so we use that instead. Also remove the unused APT_SOURCES variable. BUG= 663069 R=mmoss@chromium.org Review-Url: https://codereview.chromium.org/2542263003 Cr-Commit-Position: refs/heads/master@{#435763} [modify] https://crrev.com/902df7e81d1c9f04e1500dd0bce59647b08d6b85/chrome/installer/linux/common/apt.include
,
Dec 1 2016
|
||||||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||||||
Comment 1 by rsesek@chromium.org
, Nov 7 2016Labels: -OS-Mac OS-Linux