I would like to use a headless OpenOffice instance (to interface it with PHP) on my webhost's server. Of course I can't install stuff there with the usual package mechanism, since I am just an ordinary user. However, I would be allowed to run (more or less) whatever I want, and I have ssh access.
Is there a way to install LibreOffice/OpenOffice in some directory under my home directory, and also get all dependencies there? It would be advantageous if I didn't have to run the actual build on the webhost, since it would clog the server... But maybe I could manage to build it on some other FreeBSD host... I would want the build to be as static as possible, i.e. with as few outside dependencies as possible.
Can this be done?
For the record, the webhost is running FreeBSD 8.2-RELEASE-p3 on amd64.
Hmm, you may try to install ports-mgmt/pbi-manager port (it's basically a bunch of shellscripts) and use pbi_add command to install libreoffice PBI.
PBI packages contain all necessary dependencies and, AFAIK, can be installed without root permissions.
Related
I come from a Python and JavaScript background.
When developing a JavaScript project, dependencies are installed in a node_modules directory in the project root.
When developing Python project, typically virtualenvwrapper is used. In this case dependencies are installed in a virtual environment, which is located in ~/.virtualenvs/<project_name> by default.
Now I need to use a ruby tool for a project. The tool that appears to be the most promising for a similar setup as described above, is bundler.
However, the default installation location for bundler is system-wide. I consider this to be harmful.
For one of my systems, it will prompt for a password, at which point I can still abort.
However, for my other system I can write into the global ruby installation. I'm using a homebrew installed ruby here. Bundle will just install dependencies globally.
I know I can specify the installation location by adding --path, but this is easy to forget.
One way to enforce an installation path is by committing .bundle/config. It would just have to contain this:
---
BUNDLE_PATH: "."
However, some googling around shows that it's not adviced to commit this file.
What is the recommended way to prevent accidental global installations using bundler?
Who's to say it will be accidental? It really depends on what context you're talking about here. I have my Ruby set up so that bundle install works without requiring sudo, it's all done through rbenv automatically. The same is true with rvm if done as a user-level install.
When it comes to deploying apps and you want to make sure it's deployed correctly, that's where tools like Capistrano come into play: Create a deployment script that will apply the correct procedure every time.
Checking in a .bundle/config is really rude from a dev perspective, just like checking in any other user-specific preferences you might have. It causes no end of conflict with other team members.
I'm editing and testing a package that I'd like to build via macports. Is there a way that I can force macports to fetch and build the package from my repository? I've edited my Portfile to point to a single repository but it seems to be ignoring it.
MacPorts uses curl internally to download files, which gives you a couple of options to switch where stuff is downloaded from:
You can use file:// URLs in the master_sites property of the Portfile to point to a local directory. Note that the fetch runs as the macports user, so make sure that user is allowed to read files from that directory.
For file downloads, you can replace the cached file. MacPorts will use your replacement the next time it extracts the source code of a port. Run port distfiles $portname to find the local path where a file may be cached.
You can switch to git for fetching by setting fetch.type git, git.url to whatever git clone will accept to clone your repository (which can be local) and optionally git.branch to a commitish you want to check out. See https://guide.macports.org/#reference.phases.fetch.git for details. Again, make sure that the macports user can read the local files if you use a local git repository.
Any other version control system supported by MacPorts; see the guide for details.
Note that MacPorts caches file downloads by default (no caching is applied for version control systems at the moment), so if you did not modify the filename, you will have to run sudo port clean --dist $portname to delete the cache.
When building modified versions of ports, you'll also have to look out for a number of other points:
MacPorts will download a precompiled binary if one is available. Since that precompiled binary will not match your modified Portfile or source code, pass the -s flag to port to force building from source.
MacPorts will not compile a port if you run 'port install' and it is already installed (either activated or deactivated).
Probably the easiest solution to work around these two potential pitfalls is running sudo port destroot $portname instead of sudo port install. This will run all steps up to (and including) make install, but will not actually put the files into /opt/local. If you can debug what you need to debug from the build directory at port work $portname, this will simplify things.
Should configure check for programs used to install files (such as unzip for example), or is that the job of the Makefile? The same applies for directory existence - should configure check that a user-defined directory actually exists (for example, to enable a certain feature of the program which needs to install files into a different location)? Both of these are install-time checks, but automake doesn't seem to have any capabilities to do this, only autoconf.
It's configures job to do system discovery tasks. If you need unzip for a customized install step, configure should discover it or be directed to it (e.g. via AC_ARG_VAR).
Enabling features is IMO better handled by AC_ARG_WITH or AC_ARG_ENABLE, because you can always create the directory as part of make install. But if you'd rather check for the existence of the directory, configure is the place to do it.
I have installed the package ccl with Mac ports. Now I want to use the Cocoa bridge.
Welcome to Clozure Common Lisp Version 1.8 (DarwinX8664)!
? (require "COCOA")
> Error: Permission denied : #P"/opt/local/share/ccl/1.8/temp bundle64.app/Contents/252752233492590994.tem"
> While executing: %CREATE-FILE, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
If I start ccl64 with sudo it works all right. But I would like to be able to do this as a normal user. How should I do it?
svn co http://svn.clozure.com/publicsvn/openmcl/release/1.8/darwinx86/ccl
while in ~ is probably the most straightfoward way to achieve what you want.
If you'd like to work with MacPorts to manage ccl (instead of the svn method above), then run
sudo chown -R $USER /opt/local/share/ccl
Note that the latter case does make me a bit uncomfortable, because if you try to sudo port uninstall ccl, MacPorts does not completely remove the share/ccl directory, presumably because the (require :cocoa) call adds compiled binaries to that directory that Macports is not tracking.
To get the MacAppStore version to work, you'd probably need to find the ccl binary buried inside the ccl.app directory, and launch that for slime. Might not be a bad way to go either.
Note that any way you do this, once you (require :cocoa), you'll have a separate cocoa listener pop up while slime is running. I just move it off to the side once it opens. If you find a way to suppress this listener window after (require :cocoa), I'd be interested to know that.
But I'd recommend the first (svn) method. That's the one I use with slimv, and it's the one that Clozure recommends on their downloads page.
If you are on a Mac, the easiest way to run Clozure CL is to load it from Apple's Mac App Store.
https://itunes.apple.com/de/app/clozure-cl/id489900618?mt=12
That way it gets installed in the Applications folder and running the Cocoa-App is no problem, since it is provided. But then you would run the Cocoa-based IDE version of CCL.
If you install CCL from MacPorts, I guess that the App is not existing. You would need to have the rights for the directory to create the necessary files.
Otherwise I would just install a fresh CCL from Clozure's repository:
http://ccl.clozure.com/download.html
Maybe it's because I'm new to shared environments where I have no root access or the dpkg/apt family of tools, but I wanted to install from source (for instance, gcc/gdb), possibly by using wget to grab the tarball, unpack it, and point configure --prefix=$HOME, before calling make; make install, but I'm having some issues. Namely, the whitelist (obvious), and secondly the configure step is giving me trouble.
Can someone walk me through this process? Pythonanywhere comes with make, so it's not as if they don't want you doing this.
EDIT
Perhaps gcc/gdb may not be the best example -- together they are close to half the 500MB allotment for free accounts.
Any pure python modules will install with ease. Unfortunately you can't install modules that require a compiler. The Python Anywhere staff is generally very accommodating to get packages requested installed to the battery's included for all to enjoy.
Feel free to make a request to the PA forum
or
Email the staff: support#pythonanywhere.com
For clarity. To install a pure python module you just use
pip-3.2 install --user <package_name>
Change 3.2 as needed for the Python version you want and of course change <package_name> to your desired package.