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

2.9.2 tarball has missing a+x permissions on Bash scripts #5670

Closed
scabug opened this issue Apr 14, 2012 · 8 comments
Closed

2.9.2 tarball has missing a+x permissions on Bash scripts #5670

scabug opened this issue Apr 14, 2012 · 8 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Apr 14, 2012

The Bash shell scripts in the 2.9.2 tarball do not have a+x permissions:

$ ls -l /opt/local/share/scala-2.9/bin/scala
-rwxr--r-- 1 root admin 4228 Apr 12 20:25 /opt/local/share/scala-2.9/bin/scala

This is annoying when one user installs Scala and another one wants to run Scala, such as in MacPorts' Scala package which I manage [1] where they are owned by root and normal users cannot run them. Can the script that cuts new Scala releases be updated to fix the permissions on these files?

I tried to assign this to 2.9.2 but it's not listed yet.

Thanks,
Blair

[1] https://trac.macports.org/ticket/34036

@scabug
Copy link
Author

scabug commented Apr 14, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5670?orig=1
Reporter: @blair
Affected Versions: 2.9.2

@scabug
Copy link
Author

scabug commented Apr 14, 2012

@paulp said:
Bummer, let's fix this.

@scabug
Copy link
Author

scabug commented Apr 14, 2012

@jsuereth said:
Yes, I can have a fix for the next release. I ran awfowl of the overloaded: http://docs.oracle.com/javase/6/docs/api/java/io/File.html#setExecutable(boolean, boolean)

In any case, I recommend, when repackaging scala, to modify permissions anyway. You can see what we do for other platforms in https://github.com/scala/scala-dist/blob/master/installer/project/build.scala#L171

You see, just taking a dump of the zip isn't good enough if you're installing in common locations like /usr/bin/, so you have to repackage anyway. I've often wanted the sbt-native-packager plugin to generate MacPorts packages, let me know if that's something we could make happen.

In the meantime, I'll release a new sbt-native-packager which will fix your issue.

@scabug
Copy link
Author

scabug commented Apr 14, 2012

@jsuereth said:
Now fixed in dist project. Let me know if you see it again.

@scabug scabug closed this as completed Apr 14, 2012
@scabug
Copy link
Author

scabug commented Apr 14, 2012

@blair said:
Addressing all your points:

  • We're using the tgz for MacPorts, so I wouldn't expect to need to modify permissions, just untarring should be sufficient.

  • Regarding repackaging, MacPorts untars everything into a single directory in /opt/local/share/scala-2.9 and then creates symlinks from /opt/local/bin to the scripts. This is laziness on my part so I don't have to modify any scripts. Nice thing is, I don't need to worry about doing any work if there are changes to Scala's scripts.

  • Thanks for the offer to build a MacPorts package, I don't know enough about that to say how it would be done. I don't think it's necessary though as building a package is easy, see the existing Portfile [1], it just moves things into the proper location and creates some symlinks. Also, MacPorts supports locations different than /opt/local, so I don't know how you handle that.

[1] https://svn.macports.org/repository/macports/trunk/dports/lang/scala29/Portfile

@scabug
Copy link
Author

scabug commented Apr 14, 2012

@blair said:
And thanks for the quick fix!

@scabug
Copy link
Author

scabug commented Apr 14, 2012

@jsuereth said:
Ah I see.

Well, we have to make those changes for some other distributions, so bundling mac in the package isn't an issue. I could also generate you a specific mac tgz to download in homebrew too. Time is the only limit here.

I'm going to be re-bundling the tool-support for Scala into the typesafe repositories shortly. This means I'll be able to yum install scala-bash-completion and apt-get install scala-gedit-support, etc. I'd love to have a quick & easy path to support macports for that.

Should we start a scala-dist mailing list to discuss these issues?

@scabug
Copy link
Author

scabug commented Apr 14, 2012

@blair said:
What do you mean "bundling mac in the package"?

I'm not a Homebrew user, so somebody else would need to manage that.

I know you guys are really busy, I would rather see work done on the language than work on packaging that can be handled by the packaging people, as it distributes work amongst the community.

It sounds like you want to host a MacPorts repository yourself? MacPorts is only started having binary downloads and there isn't a fixed and public repository API yet that I would want to code to. I don't know if MacPorts supports multiple repository URLs like yum and apt-get.

If you make a scala-dist list, I'll join it. You'll need to decide if there's enough traffic and discussions to warrant it. But since you're making your own yum and apt-get repositories, it sounds like there could be.

Blair

@scabug scabug added the critical label Apr 7, 2017
@scabug scabug added this to the 2.9.2 milestone Apr 7, 2017
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

No branches or pull requests

2 participants