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

Shift to 1.2 #315

Merged
merged 48 commits into from
Apr 8, 2019
Merged

Shift to 1.2 #315

merged 48 commits into from
Apr 8, 2019

Conversation

sirredbeard
Copy link

No description provided.

@ghost
Copy link

ghost commented Jan 29, 2019

Just ran a test build (can check the altered create-targz script at https://github.com/grufwub/WLinux/tree/1.2-repotest). Building seemed to work fine, though considering that running the packagecloud setup scripts installs the repositories to apt sources, then wlinux-base replaces /etc/apt/sources.list, need to change this situation.

Still todo:

  • ✔️ Remove the replacing of source.list from wlinux-base package (see above) Instead we're going to keep the new sources.list within wlinux-base, but just have it over-write the sources injected from either a legacy /etc/setup or create-targz script. Leaves more flexibility for the future [wlinux-base] done!
  • ✔️ bug: installing shells -- "E: Unable to locate package zsh" 🤔 [wlinux-setup] done!
  • ✔️ bug: installing editors -- "/usr/local/wlinux-setup.d/editors.sh: line 76: syntax error: unexpected end of file" [wlinux-setup] done!
  • ✔️ bug: installing python -- "/usr/local/wlinux-setup.d/python.sh: No such file or directory" [wlinux-setup] done!
  • ✔️ shell optimisation scripts -- needs further testing + gui text needs fine-tuning [wlinux-setup] done!
  • ✔️ bug: 'Welcome to WLinux. ......' always shows, even when not just first-time running [wlinux-base] done!
  • ✔️ change all scripts to source common.sh in the same manner as @crramirez suggested in his previous commits to ruby + nodejs installers (not technically urgent, but prevents odd bugs popping up from script inconsistencies) [wlinux-setup] done!
  • ❗ bug: Ping doesn't work as /bin/ping is not SUID #226 [WLinux]
  • ✔️ bug: selecting multiple items on the install menu occasioncally causes some to attempt to install a second time? (seen happen with both java and nodejs so far) -- turns out in the case of Java it's because powershell.sh contains the script for installing java?? [wlinux-setup] done!
  • ✔️ bug: installing nodejs -- "E: Unable to locate package n" [wlinux-setup] done!
  • ✔️ bug: rust environment variables not being set correctly [wlinux-setup] done!
  • ❗ bug: installing rbenv dependencies pulls in systemd as a dependency (and I'm sure likely pulled in as a dependency for some other packages too)

working on wlinux-setup related fixes here: https://github.com/grufwub/wlinux-setup/tree/1.2-fixes

@ghost
Copy link

ghost commented Feb 2, 2019

Just an update on the situation:

Still yet to address:

  • ❗ systemd being pulled in as a dependency. I'm sure some kind of apt hold / pin would fix this, but I need to test 1- how, and 2- whether it causes issues installing updates in the future
  • ❗ bug Ping doesn't work as /bin/ping is not SUID #226
  • ✔️ shell optimisation script install GUI fine-tuning handled by @crramirez
  • ❗ information dialogue for user during Ruby RAILS install, warning them it's about to start a nodejs install (if not already installed)

@sirredbeard
Copy link
Author

Weird rbenv is pulling in systemd. I wonder if we can isolate it.

@sirredbeard
Copy link
Author

Great work knocking these down so far!

@ghost
Copy link

ghost commented Feb 3, 2019

Okay, so far I have wlinux-base successfully downloading our keys and adding them to a new whitewaterfoundry keyring, then moving this to /etc/apt/trusted.gpg.d but it doesn't seem to work when performing an apt update. Uninstalling the package (which also restores the original sources.list) still leaves the system unable to update too which is odd.

I've also added scripts to backup all the original system files that we replace with our own, and restore the backups on uninstall, should someone choose to use these packages on another debian based system. This also has the benefit of removing the user-prompt asking whether it's okay to replace system files! But there's inconsistencies that need ironing out still.

@ghost
Copy link

ghost commented Feb 8, 2019

Fixed the issues I was running into in the previous comment. Have also updated the backup scripts so now it backs up all the files we modify to /etc/pre-wlinux. And removal seems to work leaving a usable system too! Though would very much appreciate it if everyone could run some tests of their own before we eventually push this to master 👍.

Have made a PR with these changes into wlinux-base/development: WhitewaterFoundry/pengwin-base#8

Before I make my wlinux-setup PR, I want to handle the above mentioned Ruby Rails user prompt regarding nodejs, and look into possible solutions for the systemd dependency issue.

wlinux-base p.s. don't judge our wifi network name. the house nextdoor used 'thestinkynet' so we felt we had to outdo them 😛

@ghost
Copy link

ghost commented Feb 10, 2019

Have now merged @crramirez's inputrc installer fixes into wlinux-setup/development, and put in a PR for my 1.2-fixes I've been working on, including correcting merge conflicts: WhitewaterFoundry/pengwin-setup#28

@sirredbeard
Copy link
Author

If it pulls in systemd, it pulls in systemd. I wish it wouldn't and if there is an easy workaround we should try it but if not we should open an issue with the upstream project and ask them to address it. We aren't the only systemd-less implementation of Linux.

@ghost
Copy link

ghost commented Feb 12, 2019

Current todos :

  • ❗ [wlinux-base or wlinux-setup?] systemd being pulled in with certain package installs (likely a wlinux-base issue, though as @sirredbeard says it could be more of an upstream issue)
  • ❗ [wlinux-setup] information dialogue for user during Ruby RAILS install, warning them it's about to start a nodejs install (if not already installed)
  • ❗ [wlinux-base?] bug Ping doesn't work as /bin/ping is not SUID #226 -- /bin/ping not having SUID bit set
  • ✔️ wlinux-base] wlinux-base wasn't removing our custom whitewaterfoundry.list file installed under /etc/apt/sources.list.d, though I made some changes in https://github.com/grufwub/wlinux-base/tree/1.2-furtherfixes which may have fixed this issue -- so I'd either build a package from my current working branch and test, or let me confirm this first nope, this problem still exists. I've put temporaray code in debian/postrm to manually remove the file, but shouldn't this file be removed automatically since it was added via debian/install?
  • ✔️ [wlinux-setup] when running certain install scripts (explorer integration for example) on other distributions, they fail as the wlinux.exe executable name is hardcoded in. Shouldn't be an issue at first, but should people wish to install these packages on other distributions like Debian (as I've been testing), then a more flexible method that uses the currently running executable name would be better
  • ✔️ [wlinux-base] in cases where /etc/profile.d didn't exist and had to be created by the preinst script, check that this directory has the correct permissions associated with it all is good here. also, trusted.gpg.d has correct permissions
  • ✔️ [wlinux-base] look into using dpkg divert as a method for overwriting other packages files, instead of our current method where we apt hold the necessary packages, backup then overwrite their files implemented!
  • ✔️ [wlinux-base] show whiptail prompt on uninstall for each file restored from backup? In case the user has made any changes and would not like the pre-wlinux file version to be restored handled mainly with above dpkg divert
  • ❗ [wlinux-setup] replace all calls to 'apt' with 'apt-get' since apt-get is currently a more stable solution for scripting
  • general testing of current wlinux-setup (development branch in https://github.com/WhitewaterFoundry/wlinux-setup) and wlinux-base (either development branch in https://github.com/WhitewaterFoundry/wlinux-base, or the further fixes I've included in 1.2-furtherfixes branch at https://github.com/grufwub/wlinux-base)

This should be helpful at giving you an idea of where we're at / what to work on @crramirez. Please do post here and let me know what you plan on working on though, as I'll be continuing to go through each of these myself and it's probably best if we're not doing conflicting work 😛. I'll likely be spending my time today looking into using dpkg divert, as would solve our current wlinux-base issue with having to hold base-files, and would mitigate future problems too.

@ghost
Copy link

ghost commented Feb 12, 2019

I've added some changes to wlinux-base in https://github.com/grufwub/wlinux-base/tree/1.2-furtherfixes:

  • ✔️ changed our install of os-release to /usr/lib/os-release so we overwrite the base file instead of overwriting the symlink
  • ✔️ changed our install of default to now be /etc/dpkg/origins/wlinux then change the symlink on default to point to wlinux instead of debian
  • ✔️ as @crramirez suggested I moved our profile changes out of /etc/profile and into /etc/profile.d/00-wlinux.sh (00 to ensure ours is ran first)
  • ✔️ A lot of script tidyng -- uses a space separated string of file locations to iterate through during backups/restore instead of many if clauses, will make future modifications easier.
  • ✔️ Started using dpkg-divert in our scripts for the system / other packages' files we overwrite -- basically this renames the files to $filename$some_suffix and lets us install a file in it's place, and keeps a note of it so that even that package gets updated, our replace file is still kept instead of being overwritten

@ghost
Copy link

ghost commented Feb 15, 2019

I've pulled the above wlinux-base changes into wlinux-base/development: WhitewaterFoundry/pengwin-base#10

While working on this I've been thinking about the situations where perhaps we update wlinux-base or wlinux-setup, then the user runs their copy of wlinux-setup (which is outdated), and during the install process of other components during wlinux-setup it might update the wlinux-setup package which could cause inconsistencies. I also ran into the situation where if you install wlinux-base on a distribution like Debian (or any other that uses apt sources =stretch vs our buster), then apt-get dist-upgrade needs to be ran.

My solution to the above issues would be to add a file flag that we add to the user's system via wlinux-base each time we require the user to perform a dist-upgrade (e.g. each time we update sources, or debian testing moves from buster --> next release, or any other situation), then add code in wlinux-setup to look for this flag and perform apt-get upgrade if necessary. Also to possibly add code putting an apt-mark hold on wlinux-setup/wlinux-base during the install process of other packages within the wlinux-setup install menu, to stop the inconsistencies I mentioned above appearing. What do you think @sirredbeard?

Though some bugs / issues I'm currently tracking:

  • ✔️ after installing wlinux-base and performing a dist-upgrade, we start running into warnings on apt-get update in that supposedly the keys in our whitewaterfoundry keyring (located under trusted.gpg.d) are of an unsupported format/type. I need to look into whether this is an opengpg update requiring different key types, or the update process messing with them somehow, or some other reason. This then also shows up when we install the Yarn keyring
  • ❗ I'm still having to leave code under postrm to remove some of the files we install, even ones listed under debian/install which should be automatically removed as far as I'm aware? I need to look into this. I may be wrong.

@ghost
Copy link

ghost commented Feb 16, 2019

Made another PR into wlinux-base/development to handle legacy WLinux installs: WhitewaterFoundry/pengwin-base#11 [though as the comment I've made says, I've had a brain-wave regarding WLinux install detection so don't merge just yet 😛 ]

@ghost
Copy link

ghost commented Feb 22, 2019

Quite a few updates since last time:

  • ✔️ [wlinux-base] new method for checking and handling legacy installs
  • ✔️ [wlinux-base] fix the odd apt gpg related issues we were having by moving back to apt-key add. God working with apt's gpg signing system is finnicky
  • ✔️ [wlinux-base] add clear -x alias back to our custom profile.d script. somehow this got lost in the transition
  • ✔️ [wlinux-setup] @crramirez: Create the /mnt/c link code only if the user selected yes to move the root to /
  • ✔️ [wlinux-setup] @crramirez: Upgrade docker client to 18.09.2
  • ✔️ [wlinux-setup] @crramirez: Fix Fish environment variables
  • ✔️ [wlinux-setup] @crramirez: Ensure that /etc/bash_completion.d exists
  • ✔️ [wlinux-setup] added code to wlinux-setup.d/common.sh to get the WSL distro executable name, so the explorer integration installer can be independent of installed distribution
  • ✔️ [wlinux-setup] add git dependency to wlinux-setup (ensures git is installed before running wlinux-setup on all distros)
  • ✔️ [wlinux-setup] update installed package in dotnet.sh, only latest preview package is able to install without dependency issues

@crramirez is currently working on adding further cloud management tools under wlinux-setup in a branch here: https://github.com/WhitewaterFoundry/wlinux-setup/tree/crramirez/ftr/Cloud_Management_Tools

Remaining bugs / features / todos I'm currently tracking:

  • ❗ [wlinux-base] (maybe wlinux-setup too?) not deleting our files listed under debian/install on removal. I've handled this with some temporary code in postrm but it's something I need to look into going forwards
  • ❗ [wlinux-setup] replace all apt calls with apt-get -- not urgent but apt doesn't provide quite the stable wrapper for dpkg in the same way that apt-get does.
  • ❗ [urgent] [wlinux-base + wlinux-setup] list these packages as 'system' or 'important' if possible?
  • ❗ [urgent] [wlinux-base + wlinux-setup] add code in wlinux-setup to check for file flag marker and perform apt-get dist-upgrade when found, we can set this file flag marker with upgrade/postinst scripts in wlinux-base and enable it when we modify sources or a big system upgrade is required. However, it would be worth making the dist-upgrade within the wlinux-setup executable preceded by a dialogue asking if the user would like to go ahead with this, warning them of the issues that come with bigger upgrades like this.
  • ❗ [urgent] [wlinux-base] address the errors that appear on wlinux-base package build:
    W: wlinux-base: possibly-insecure-handling-of-tmp-files-in-maintainer-script postinst:23 W: wlinux-base: possibly-insecure-handling-of-tmp-files-in-maintainer-script preinst:19
  • ❗ [urgent] [wlinux-base] even with apt-transport-https as a dependency, was still running into an issue where it wasn't installed? Maybe wlinux-setup was autoremoving it? Not too sure. Need to look into
  • ❗ [urgent] [wlinux-setup] check explorer integration is working (both originally and with new distro-agnostic implementation)
  • ❗ [wlinux-setup] getexecname in common.sh - handle case of multiple .exe's in WindowsApps/$DISTNAME folder. At the moment only looks for the one .exe
  • ❗ [wlinux-setup] getexecname in common.sh - handle case of distro executable having more than one period in the name. At the moment uses '.' as a cut delimiter and takes the 1st of the two resulting strings
  • ❗ [urgent] [wlinux-setup or wlinux-base] above mentioned systemd issue (though maybe upstream)
  • ❗ [urgent] [wlinux-setup + wlinux-base] put apt-mark hold on wlinux-setup (and maybe wlinux-base?) when performing installs using wlinux-setup. Ensure that we don't run into odd issues where wlinux-setup installer changes during one of the updateupgrade calls in an install step.

The points marked as urgent I will be heavily focusing on to get cleared up before 1.2. The others aren't urgent but I will hopefully be able to get around to 👍. Have also been through and updated the thread with either green checkmarks or exclamation points -- so addressed / not-addressed issues can easily be seen.

Hayden and others added 28 commits March 12, 2019 11:24
Typo:  "X client" should be "X server"
#359 [Pengwin-359] 1.2: handle old 'open with wlinux'
Enable the use of development repositories for testing
This removes patrickwu.space before installing the new repositories, which involves a lot of sudo apt updates and are about to throw a lot of 404 errors.
Remove duplicate and premature call to explorer.sh
@sirredbeard sirredbeard merged commit 914172c into master Apr 8, 2019
@sirredbeard sirredbeard deleted the 1.2 branch April 8, 2019 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants