Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage `sources.list` and make bootstrap script purge lists before updating #520

Merged
merged 1 commit into from Sep 22, 2017

Conversation

@choudhary001
Copy link
Contributor

choudhary001 commented Oct 24, 2016

@aneeshusa
Hi,
As discussed I have created this pull request. Let know me what you think could be the issue.

One way to test this is manual verification inside a Vagrant VM,
I tried this as well after rebuilding the VMs, I checked in servo-master1 vm but could find the XXX string in the vm's sources.list file.

Perhaps I am missing to modify some other config files.

Fixes #417.


This change is Reviewable

@highfive
Copy link

highfive commented Oct 24, 2016

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @aneeshusa (or someone else) soon.

Copy link
Member

aneeshusa left a comment

It seems like Travis at least picks up on the updated sources.list file, so this is working to some degree. A few review nits so far, I will also check this PR inside Vagrant as well.

## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu trusty multiverse

This comment has been minimized.

@aneeshusa

aneeshusa Oct 30, 2016

Member

Since we're pre-enabling multiverse here, we'll need to remove the multiverse related states in servo-build-dependencies/init.sls.

This comment has been minimized.

@choudhary001

choudhary001 Oct 30, 2016

Author Contributor

servo-build-dependencies/init.sls has some if-else condition around multiverse related states. I am not sure what is the correct way to remove them. Should I remove multiverse links from source.list file?

This comment has been minimized.

@aneeshusa

aneeshusa Oct 30, 2016

Member

Just remove the 2 multiverse related states in that file (but keep the ttf-mscorefonts-installer state), and fixup the requisites. You can ignore the if/else conditions for now.

- group: root
- mode: 755
- source: salt://{{ tpldir }}/apt/sources.list

This comment has been minimized.

@aneeshusa

aneeshusa Oct 30, 2016

Member

nit: remove trailing empty line

This comment has been minimized.

@choudhary001

choudhary001 Oct 30, 2016

Author Contributor

will take care of it.

- user: root
- group: root
- mode: 755
- source: salt://{{ tpldir }}/apt/sources.list

This comment has been minimized.

@aneeshusa

aneeshusa Oct 30, 2016

Member

nit: use salt://{{ tpldir }}/files/sources.list for consistency instead with other formulas

This comment has been minimized.

@choudhary001

choudhary001 Oct 30, 2016

Author Contributor

will take care of it.

Copy link
Member

aneeshusa left a comment

Looks like your commit history is a bit messed up - please rebase your changes on top of the latest master. Ask here or on IRC if you need help.

@@ -57,20 +58,6 @@ servo-darwin-install-autoconf213-and-fix-links:
- runas: {{ homebrew.user }}
- require:
- pkg: servo-dependencies
{% else %}

This comment has been minimized.

@aneeshusa

aneeshusa Oct 31, 2016

Member

You need to keep this {% else %} line to avoid breaking the Jinja syntax.

@@ -0,0 +1,54 @@
## Note that this sources.list file is picked from saltfs repository

This comment has been minimized.

@aneeshusa

aneeshusa Oct 31, 2016

Member

Note the original source instead (I'm assuming an Ubuntu VM).
It's also probably a good idea to add a note/warning that this file is managed by Salt.

@bors-servo
Copy link
Contributor

bors-servo commented Nov 1, 2016

The latest upstream changes (presumably #531) made this pull request unmergeable. Please resolve the merge conflicts.

@choudhary001 choudhary001 force-pushed the choudhary001:master branch from eaa6d1f to 74e0af8 Nov 3, 2016
@choudhary001 choudhary001 force-pushed the choudhary001:master branch from 74e0af8 to 480a9fc Nov 3, 2016
@choudhary001
Copy link
Contributor Author

choudhary001 commented Nov 4, 2016

@aneeshusa Hey, I squashed all my commits in one. Let me know if everything is fine, it still shows the label 'needs-rebase'.

@KiChjang KiChjang removed the S-needs-rebase label Nov 4, 2016
Copy link
Member

aneeshusa left a comment

Sorry about the delay, this is almost ready to merge!

@@ -0,0 +1,55 @@
# Note that this sources.list file is copied from a Ubuntu vm

This comment has been minimized.

@aneeshusa

aneeshusa Dec 8, 2016

Member

grammar nit: vm -> VM

deb-src http://security.ubuntu.com/ubuntu trusty-security main
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
# deb http://security.ubuntu.com/ubuntu trusty-security multiverse

This comment has been minimized.

@aneeshusa

aneeshusa Dec 8, 2016

Member

We probably ought to uncomment these next two lines to enable security fixes for multiverse.

file.managed:
- user: root
- group: root
- mode: 755

This comment has been minimized.

@aneeshusa

aneeshusa Dec 8, 2016

Member

This file should not be executable, use 644 permissions.

@aneeshusa
Copy link
Member

aneeshusa commented Jan 1, 2017

Interesting - everything seems to work fine in Vagrant, but the tests are failing on Travis, only on the builds from scratch. I'm not really sure what the problem is, so we'll have to do some research/try some different things out. Off the top of my head I'm guessing the issue may be related to ordering of the Salt states, which we can fix by adding requisites, or something apt related, e.g. maybe we need to run apt-get update after changing the sources.list file.

@choudhary001 choudhary001 force-pushed the choudhary001:master branch from a77f081 to f11060a Jun 5, 2017
@choudhary001 choudhary001 force-pushed the choudhary001:master branch from f11060a to af5f984 Jun 5, 2017
@choudhary001
Copy link
Contributor Author

choudhary001 commented Jun 6, 2017

@aneeshusa
The travis build failed with below error, I am not sure why:

[ERROR ] Data passed to highstate outputter is not a valid highstate return: {'local': ["No function declared in state 'onchanges' in SLS 'ubuntu'"]}

Copy link
Member

aneeshusa left a comment

This should fix the Travis build hopefully; I also recommend testing in Vagrant if you can.
I will try to test this manually in the next few days.

refresh_pkg_db:
module.run:
- name: pkg.refresh_db
onchanges:

This comment has been minimized.

@aneeshusa

aneeshusa Jun 6, 2017

Member

Oh, this needs to be an argument to module.run:

refresh_pkg_db:
  module.run:
    - name: ...
    - onchanges:
      - file: /etc/apt/sources.list
- sources.list file is now managed by Salt.
- sources.list file is copied from a Ubuntu vm
- auto refresh ubuntu package databases
- use jinja templating create appropriate sources.list file
  depending on Ubuntu version
@choudhary001 choudhary001 force-pushed the choudhary001:master branch from af5f984 to 15c1068 Jun 6, 2017
@aneeshusa
Copy link
Member

aneeshusa commented Sep 20, 2017

Sorry about the many delays, this LGTM and is r=me. I'll merge this after #719, which fixes our build.

@aneeshusa
Copy link
Member

aneeshusa commented Sep 22, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Sep 22, 2017

📋 Looks like this PR is still in progress, ignoring approval

@aneeshusa aneeshusa changed the title WIP: issue#417 Manage `sources.list` and make bootstrap script purge lists before updating Manage `sources.list` and make bootstrap script purge lists before updating Sep 22, 2017
@aneeshusa
Copy link
Member

aneeshusa commented Sep 22, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Sep 22, 2017

📌 Commit 15c1068 has been approved by aneeshusa

@bors-servo
Copy link
Contributor

bors-servo commented Sep 22, 2017

Testing commit 15c1068 with merge 229ea9e...

bors-servo added a commit that referenced this pull request Sep 22, 2017
Manage `sources.list` and make bootstrap script purge lists before updating

@aneeshusa
Hi,
As discussed I have created this pull request. Let know me what you think could be the issue.

> > One way to test this is manual verification inside a Vagrant VM,
> > I tried this as well after rebuilding the VMs, I checked in servo-master1 vm but could find the XXX string in the vm's sources.list file.

Perhaps I am missing to modify some other config files.

Fixes #417.

<!-- Reviewable:start -->

---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/520)

<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 22, 2017

☀️ Test successful - status-travis
Approved by: aneeshusa
Pushing 229ea9e to master...

@bors-servo bors-servo merged commit 15c1068 into servo:master Sep 22, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.