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

x11 migration tracking issue #64166

Closed
45 tasks done
jonchang opened this issue Nov 5, 2020 · 18 comments
Closed
45 tasks done

x11 migration tracking issue #64166

jonchang opened this issue Nov 5, 2020 · 18 comments
Labels
help wanted Task(s) needing PRs from the community or maintainers outdated PR was locked due to age

Comments

@jonchang
Copy link
Contributor

jonchang commented Nov 5, 2020

Now that X in all its legion forms can be installed as a formula, we should start migrating our current formulae that depends_on :x11 to instead depend on the brewed versions of the various X libraries.

This is part of our long-term goal to remove all cask Requirements from Homebrew/core, which will help speed up our CI deployment time. Once this is complete the only cask Requirements remaining would be java and osxfuse.

General instructions:

  1. brew install FORMULA on this list (should be poured from a bottle, not built from source)
  2. Run brew linkage FORMULA and observe which X11 libraries it links against
  3. Modify the formula to remove depends_on :x11 and replace it with e.g. depends_on "libx11" and any additional X libraries
  4. Update /opt/X11 or MacOS::XQuartz references to instead point them to the brewed formula paths
  5. revision bump
  6. brew install -s FORMULA and brew linkage FORMULA to check that it's now linking against brewed X and not XQuartz

See an example here: #64165

Some caveats to these instructions:

  • formulae that need to create or interact with an x11 GUI element might not work as not all components that exist in XQuartz.app have been ported over to our brewed versions. The missing X library (e.g. apple-wm) will need to be added as a new formula.
  • formulae that have build time dependencies on X libraries won't show up in brew linkage. In this case you'll have to figure out what it's depending on based on the configure or cmake script.
  • if you really can't figure out how to build something and its usage is low (brew info analytics) consider disabling or removing the formula
@MikeMcQuaid MikeMcQuaid added the help wanted Task(s) needing PRs from the community or maintainers label Nov 5, 2020
issyl0 added a commit to issyl0/homebrew-core that referenced this issue Nov 5, 2020
- Issue reference: Homebrew#64166.

----

Before:

➜ brew linkage xshogi
System libraries:
  /opt/X11/lib/libX11.6.dylib
  /opt/X11/lib/libXaw.7.dylib
  /opt/X11/lib/libXext.6.dylib
  /opt/X11/lib/libXmu.6.dylib
  /opt/X11/lib/libXt.6.dylib
  /usr/lib/libSystem.B.dylib

After:

➜ brew linkage xshogi
System libraries:
  /usr/lib/libSystem.B.dylib
Homebrew libraries:
  /usr/local/opt/libx11/lib/libX11.6.dylib (libx11)
  /usr/local/opt/libxaw/lib/libXaw.7.dylib (libxaw)
  /usr/local/opt/libxext/lib/libXext.6.dylib (libxext)
  /usr/local/opt/libxmu/lib/libXmu.6.dylib (libxmu)
  /usr/local/opt/libxt/lib/libXt.6.dylib (libxt)
issyl0 added a commit to issyl0/homebrew-core that referenced this issue Nov 5, 2020
- Related issue: Homebrew#64166.

----

Before:

➜ brew linkage xlispstat
System libraries:
  /opt/X11/lib/libX11.6.dylib
  /usr/lib/libSystem.B.dylib

After:

➜ brew linkage xlispstat
System libraries:
  /usr/lib/libSystem.B.dylib
Homebrew libraries:
  /usr/local/opt/libx11/lib/libX11.6.dylib (libx11)
@issyl0
Copy link
Member

issyl0 commented Nov 5, 2020

xpa doesn't seem to link against any X11 libraries:

➜ brew linkage xpa
System libraries:
  /usr/lib/libSystem.B.dylib

BrewTestBot pushed a commit that referenced this issue Nov 5, 2020
- Issue reference: #64166.

----

Before:

➜ brew linkage xshogi
System libraries:
  /opt/X11/lib/libX11.6.dylib
  /opt/X11/lib/libXaw.7.dylib
  /opt/X11/lib/libXext.6.dylib
  /opt/X11/lib/libXmu.6.dylib
  /opt/X11/lib/libXt.6.dylib
  /usr/lib/libSystem.B.dylib

After:

➜ brew linkage xshogi
System libraries:
  /usr/lib/libSystem.B.dylib
Homebrew libraries:
  /usr/local/opt/libx11/lib/libX11.6.dylib (libx11)
  /usr/local/opt/libxaw/lib/libXaw.7.dylib (libxaw)
  /usr/local/opt/libxext/lib/libXext.6.dylib (libxext)
  /usr/local/opt/libxmu/lib/libXmu.6.dylib (libxmu)
  /usr/local/opt/libxt/lib/libXt.6.dylib (libxt)

Closes #64200.

Signed-off-by: Issy Long <[email protected]>
BrewTestBot pushed a commit that referenced this issue Nov 5, 2020
- Related issue: #64166.

----

Before:

➜ brew linkage xlispstat
System libraries:
  /opt/X11/lib/libX11.6.dylib
  /usr/lib/libSystem.B.dylib

After:

➜ brew linkage xlispstat
System libraries:
  /usr/lib/libSystem.B.dylib
Homebrew libraries:
  /usr/local/opt/libx11/lib/libX11.6.dylib (libx11)

Closes #64203.

Signed-off-by: Issy Long <[email protected]>
@jonchang
Copy link
Contributor Author

jonchang commented Nov 6, 2020

xpa doesn't seem to link against any X11 libraries:

My guess is that it has a build-time dependency. Looking at the README maybe depends_on "libxt" => :build would work?

@SeekingMeaning
Copy link
Contributor

Copy-and-pasteable checklist:

- [ ] `brew install FORMULA` on this list (should be poured from a bottle, not built from source)
- [ ] Run `brew linkage FORMULA` and observe which X11 libraries it links against
- [ ] Modify the formula to remove `depends_on :x11` and replace it with e.g. `depends_on "libx11"` and any additional X libraries
- [ ] Update `/opt/X11` or `MacOS::XQuartz` references to instead point them to the brewed formula paths
- [ ] `revision` bump
- [ ] `brew install -s FORMULA` and `brew linkage FORMULA` to check that it's now linking against brewed X and not XQuartz

@gromgit gromgit mentioned this issue Nov 7, 2020
11 tasks
gromgit pushed a commit to gromgit/homebrew-core that referenced this issue Nov 7, 2020
Continuation of Homebrew#57995, to support `openmotif` migration under Homebrew#64166.

Also added license and test.
@gromgit
Copy link
Member

gromgit commented Nov 7, 2020

Just a couple of working notes:

  • If brew linkage outputs /opt/X11/lib/libXp.6.dylib, that's officially obsolete/deprecated, and there's no formula for it even in linuxbrew/xorg. openmotif used to link to it, but seems to build just fine without it post-migration, and I suspect it can generally be ignored for the purpose of this exercise., but libxp now exists for migration purposes.
  • If your migration fails on #include <X11/bitmaps/...>, I've created xbitmaps 1.2.2 (new formula) #64282 to add the xbitmaps formula that you can depends_on. (Would be great if someone could review that ASAP.)

BrewTestBot pushed a commit that referenced this issue Nov 7, 2020
Continuation of #57995, to support `openmotif` migration under #64166.

Also added license and test.

Closes #64282.

Signed-off-by: Michka Popoff <[email protected]>
gromgit pushed a commit to gromgit/homebrew-core that referenced this issue Nov 7, 2020
Also fixed license. Supports Homebrew#64166.
BrewTestBot pushed a commit that referenced this issue Nov 13, 2020
I still need to add a test do block.

Tracking issue: #64166

- [x] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/HEAD/CONTRIBUTING.md)?
- [x] Have you checked that there aren't other open [pull requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change?
- [x] Have you built your formula locally with `brew install --build-from-source <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Is your test running fine `brew test <formula>`, where `<formula>` is the name of the formula you're submitting?
- [ ] Does your build pass `brew audit --strict <formula>` (after doing `brew install <formula>`)?

-----

- [x] `brew install FORMULA` on this list (should be poured from a bottle, not built from source)
- [x] Run `brew linkage FORMULA` and observe which X11 libraries it links against
- [x] Modify the formula to remove `depends_on :x11` and replace it with e.g. `depends_on "libx11"` and any additional X libraries
- [x] Update `/opt/X11` or `MacOS::XQuartz` references to instead point them to the brewed formula paths
- [x] `revision` bump
- [x] `brew install -s FORMULA` and `brew linkage FORMULA` to check that it's now linking against brewed X and not XQuartz

-----

[License](https://gitlab.freedesktop.org/mesa/glw/-/blob/master/configure.ac)
doesn't give a standard identifier, but looks like many standard licenses:

> Copyright © 2011 Intel Corporation
>
> Permission is hereby granted, free of charge, to any person obtaining a
> copy of this software and associated documentation files (the "Software"),
> to deal in the Software without restriction, including without limitation
> the rights to use, copy, modify, merge, publish, distribute, sublicense,
> and/or sell copies of the Software, and to permit persons to whom the
> Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice (including the next
> paragraph) shall be included in all copies or substantial portions of the
> Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> IN THE SOFTWARE.

-----

Before:

    ❯ brew linkage mesalib-glw
    System libraries:
      /opt/X11/lib/libGL.1.dylib
      /opt/X11/lib/libX11.6.dylib
      /opt/X11/lib/libXt.6.dylib
      /usr/lib/libSystem.B.dylib

After:

    ❯ brew linkage mesalib-glw
    System libraries:
      /usr/lib/libSystem.B.dylib
    Homebrew libraries:
      /usr/local/opt/libx11/lib/libX11.6.dylib (libx11)
      /usr/local/opt/libxt/lib/libXt.6.dylib (libxt)
      /usr/local/opt/mesa/lib/libGL.1.dylib (mesa)

Closes #64346.

Signed-off-by: Sean Molenaar <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
@carlocab
Copy link
Member

carlocab commented Nov 13, 2020

robot-framework:

On macOS:

❯ brew linkage robot-framework
System libraries:
  /usr/lib/libSystem.B.dylib
  /usr/lib/libffi.dylib
Homebrew libraries:
  /usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib ([email protected])
  /usr/local/opt/[email protected]/lib/libssl.1.1.dylib ([email protected])

I'm guessing linkage needs to be checked on Linux, as in #64584

I grepped the repo, though, and I couldn't find a reference to X11, so I don't know if it's a build-dependency either.

@carlocab
Copy link
Member

carlocab commented Nov 13, 2020

The fmsx license (found here) doesn't appear to be Homebrew-compatible:

fMSX source code is open for everyone to see but it is not in public domain. You can look and learn from it, but you cannot change it or copy it without giving a credit to the original author and a few other conditions. If you would like to port fMSX to another platform or make changes to the code, please, contact me by email or some other means.

You cannot use fMSX source code for commercial purposes unless you contact me to arrange the conditions of such usage. If your company intends to use MSX software in its products and you are considering using fMSX source code, please, email me about licensing.

At the very least, this seems similar to the case of pgplot: #64332

BrewTestBot pushed a commit that referenced this issue Nov 14, 2020
Tracking issue: #64166

- [x] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/HEAD/CONTRIBUTING.md)?
- [x] Have you checked that there aren't other open [pull requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change?
- [x] Have you built your formula locally with `brew install --build-from-source <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Is your test running fine `brew test <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Does your build pass `brew audit --strict <formula>` (after doing `brew install <formula>`)?

-----

- [x] `brew install FORMULA` on this list (should be poured from a bottle, not built from source)
- [x] Run `brew linkage FORMULA` and observe which X11 libraries it links against
- [x] Modify the formula to remove `depends_on :x11` and replace it with e.g. `depends_on "libx11"` and any additional X libraries
- [x] Update `/opt/X11` or `MacOS::XQuartz` references to instead point them to the brewed formula paths
- [x] `revision` bump
- [x] `brew install -s FORMULA` and `brew linkage FORMULA` to check that it's now linking against brewed X and not XQuartz

-----

`libx11` appears to be an optional build dependency, so not 100% certain
I did this right. Would appreciate a second opinion.

Closes #64738.

Signed-off-by: Jonathan Chang <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot pushed a commit that referenced this issue Nov 14, 2020
Tracking issue: #64166

- [x] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/HEAD/CONTRIBUTING.md)?
- [x] Have you checked that there aren't other open [pull requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change?
- [x] Have you built your formula locally with `brew install --build-from-source <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Is your test running fine `brew test <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Does your build pass `brew audit --strict <formula>` (after doing `brew install <formula>`)?

-----

- [x] `brew install FORMULA` on this list (should be poured from a bottle, not built from source)
- [x] Run `brew linkage FORMULA` and observe which X11 libraries it links against
- [x] Modify the formula to remove `depends_on :x11` and replace it with e.g. `depends_on "libx11"` and any additional X libraries
- [x] Update `/opt/X11` or `MacOS::XQuartz` references to instead point them to the brewed formula paths
- [x] `revision` bump
- [x] `brew install -s FORMULA` and `brew linkage FORMULA` to check that it's now linking against brewed X and not XQuartz

-----

Before:

    ❯ brew linkage fox #before
    System libraries:
      /opt/X11/lib/libGL.1.dylib
      /opt/X11/lib/libGLU.1.dylib
      /opt/X11/lib/libX11.6.dylib
      /opt/X11/lib/libXcursor.1.dylib
      /opt/X11/lib/libXext.6.dylib
      /opt/X11/lib/libXfixes.3.dylib
      /opt/X11/lib/libXft.2.dylib
      /opt/X11/lib/libXi.6.dylib
      /opt/X11/lib/libXrandr.2.dylib
      /opt/X11/lib/libXrender.1.dylib
      /usr/lib/libSystem.B.dylib
      /usr/lib/libbz2.1.0.dylib
      /usr/lib/libc++.1.dylib
      /usr/lib/libz.1.dylib
    Homebrew libraries:
      /usr/local/opt/fontconfig/lib/libfontconfig.1.dylib (fontconfig)
      /usr/local/Cellar/fox/1.6.56_1/lib/libFOX-1.6.0.dylib (fox)
      /usr/local/opt/freetype/lib/libfreetype.6.dylib (freetype)
      /usr/local/opt/jpeg/lib/libjpeg.9.dylib (jpeg)
      /usr/local/opt/libpng/lib/libpng16.16.dylib (libpng)
      /usr/local/opt/libtiff/lib/libtiff.5.dylib (libtiff)

After:

    ❯ brew linkage fox
    System libraries:
      /usr/lib/libSystem.B.dylib
      /usr/lib/libbz2.1.0.dylib
      /usr/lib/libc++.1.dylib
      /usr/lib/libz.1.dylib
    Homebrew libraries:
      /usr/local/opt/fontconfig/lib/libfontconfig.1.dylib (fontconfig)
      /usr/local/Cellar/fox/1.6.56_2/lib/libFOX-1.6.0.dylib (fox)
      /usr/local/opt/freetype/lib/libfreetype.6.dylib (freetype)
      /usr/local/opt/jpeg/lib/libjpeg.9.dylib (jpeg)
      /usr/local/opt/libpng/lib/libpng16.16.dylib (libpng)
      /usr/local/opt/libtiff/lib/libtiff.5.dylib (libtiff)
      /usr/local/opt/libx11/lib/libX11.6.dylib (libx11)
      /usr/local/opt/libxcursor/lib/libXcursor.1.dylib (libxcursor)
      /usr/local/opt/libxext/lib/libXext.6.dylib (libxext)
      /usr/local/opt/libxfixes/lib/libXfixes.3.dylib (libxfixes)
      /usr/local/opt/libxft/lib/libXft.2.dylib (libxft)
      /usr/local/opt/libxi/lib/libXi.6.dylib (libxi)
      /usr/local/opt/libxrandr/lib/libXrandr.2.dylib (libxrandr)
      /usr/local/opt/libxrender/lib/libXrender.1.dylib (libxrender)
      /usr/local/opt/mesa/lib/libGL.1.dylib (mesa)
      /usr/local/opt/mesa-glu/lib/libGLU.1.dylib (mesa-glu)

Closes #64713.

Signed-off-by: Jonathan Chang <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
BrewTestBot pushed a commit that referenced this issue Nov 14, 2020
Tracking issue: #64166

- [x] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/HEAD/CONTRIBUTING.md)?
- [x] Have you checked that there aren't other open [pull requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change?
- [x] Have you built your formula locally with `brew install --build-from-source <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Is your test running fine `brew test <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Does your build pass `brew audit --strict <formula>` (after doing `brew install <formula>`)?

-----

- [x] `brew install FORMULA` on this list (should be poured from a bottle, not built from source)
- [x] Run `brew linkage FORMULA` and observe which X11 libraries it links against
- [x] Modify the formula to remove `depends_on :x11` and replace it with e.g. `depends_on "libx11"` and any additional X libraries
- [x] Update `/opt/X11` or `MacOS::XQuartz` references to instead point them to the brewed formula paths
- [x] `revision` bump
- [x] `brew install -s FORMULA` and `brew linkage FORMULA` to check that it's now linking against brewed X and not XQuartz

-----

I can't find any evidence in the documentation or verbose output of
building from source that X11 is needed. It seems safe to remove.

Closes #64749.

Signed-off-by: Jonathan Chang <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
jonchang added a commit that referenced this issue Nov 14, 2020
Also has low usage via analytics.

#64166 (comment)

http://fms.komkon.org/fMSX/fMSX.html#LABC

"You cannot use fMSX source code for commercial purposes unless you
contact me to arrange the conditions of such usage."
@jonchang jonchang mentioned this issue Nov 14, 2020
5 tasks
BrewTestBot pushed a commit that referenced this issue Nov 14, 2020
#64166

Closes #64775.

Signed-off-by: Jonathan Chang <[email protected]>
BrewTestBot pushed a commit that referenced this issue Nov 14, 2020
#64166

Closes #64777.

Signed-off-by: Jonathan Chang <[email protected]>
BrewTestBot pushed a commit that referenced this issue Nov 14, 2020
BrewTestBot pushed a commit that referenced this issue Nov 14, 2020
#64166

Closes #64776.

Signed-off-by: Jonathan Chang <[email protected]>
@jonchang
Copy link
Contributor Author

This is now complete! Thanks to @gromgit, @issyl0, @SeekingMeaning, @yurikoles, and new contributor @carlocab for helping with migrations, @fxcoudert and @SMillerDev for reviewing pull requests, and @iMichka and @maxim-belkin for maintaining and migrating the X formula to homebrew/core from linuxbrew/xorg!

🎉 🥳

@iMichka
Copy link
Member

iMichka commented Nov 14, 2020

Amazing. Who would have thought we would achieve this one day :)

@SMillerDev
Copy link
Member

I wouldn't have expected it last month.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Task(s) needing PRs from the community or maintainers outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

9 participants