How to get specific OpenWrt subversion installed? - openwrt

I want to download OpenWRT Attitude Adjustment (12.09, r36088).
How can this be done using git ?
I tried using
svn co -r 36088 svn://svn.openwrt.org/openwrt/trunk
It downloads the packages etc and says Checked out revision 36088 and then I run a
scripts/feed update -a
but when I type make menuconfig, on the top it says:
OpenWrt Barrier Breaker (r36085) Configuration
and also when I do:
scripts/feed search batman
I get no results for batmand and kmod-batman-adv. Instead I get only this result:
webif-batman XWrt BATMAN mesh plugin
So what am I doing wrong here?
Thanks.

If you want to use git and Attitude Adjustment try to get the source like this:
git clone git://git.openwrt.org/12.09/openwrt.git
You will get the highest version of Attitude Adjustment:
OpenWrt Attitude Adjustment (r42647) Configuration
Exit from menuconfig and use git log to search for the revision r36088. You will find a commit with the id of b812c102d1382e7073d164255ffe070b668033d4
git checkout b812c102d1382e7073d164255ffe070b668033d4
Now check in your menuconfig again, there should be OpenWrt Attitude Adjustment (r36088) Configuration.

You download Development branch, not Attitude Adjustment. Try:
svn co -r 36088 svn://svn.openwrt.org/openwrt/branches/attitude_adjustment

Related

Is there a way to install homebrew without git?

For reasons pertaining to storage and git, installing homebrew comes with the issue of:
Error:
homebrew-core is a shallow clone.
homebrew-cask is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
These commands may take a few minutes to run due to the large size of the repositories.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
It explicitly states what to do next, but I've found that running those git commands is a pretty terrible experience with slow internet (or just in general). The absolute best solution to such an issue would be if there were torrents which contained the entire project folder including git. Barring that, a simple download would be nice. Really, anything but git is in scope of this question.
To reiterate the issues with using git:
requires git
opaque UX by default (tends to hang without any updates for long periods of time)
not great for slow connections
wrong tool for a situation that only involves downloading files
Is there an alternative path to Homebrew that doesn't incorporate git?
As said in the comments, you can use the skip tap cloning feature of Homebrew. Note that this is, for now, a beta feature:
Skip Tap Cloning (beta)
You can instruct Homebrew to skip cloning the
Homebrew/homebrew-core tap during installation by setting the beta
HOMEBREW_INSTALL_FROM_API environment variable with the following:
export HOMEBREW_INSTALL_FROM_API=1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
This will make Homebrew install formulae and casks from the
homebrew/core and homebrew/cask taps using Homebrew’s API instead of
local checkouts of these repositories.
I agree with OP 100%.
Homebrew should simply provide a downloadable file. Especially since GitHub has implemented a very unfriendly interface and the default shell in MacOS Ventura is now zsh which Homebrew specifically states will not work with their provided Terminal install command.
If you make it so difficult to install your software, then don't be surprised that fewer people use it.
Edit: I suppose they just don't really care, but I spent a few hours trying to get Homebrew up to date tonight because of GitHub.

Get gerrit commit with only short hash [duplicate]

When working with Gerrit (Code Review), I often need to get a copy of a given patch set for testing or validation purpose. The obvious and easiest way is to download the archive or the patch file through the Gerrit Web interface and manually apply it to my local source.
While the above steps are pretty straightforward and fulfill my needs, in the best world I would like to have the patch set appearing as a commit in my local Git.
I was looking around and didn't find the solution. I found some sparse info that once compiled together gives the following solution.
Say that you want to pull the patch set 2 of the Gerrit change 1222:
Find the remote refs we are interested in:
$ git ls-remote | grep 1220
From http://something.com:8081/MyProject
e2e0212a59240ac5cd7c11220c35542523f44b59 refs/changes/13/713/1
b8c4dceea5eaf1bad711b0ea6938c80ec932726a refs/changes/20/1220/1
6f20c182ec7f54a2aa9e8f6188a0eef1b0790df4 refs/changes/20/1220/2
ed94a98386d224ce3d86004ce99f61220905a077 refs/changes/22/1222/1
Pull the refs:
git pull origin refs/changes/20/1220/2
This will create a Git commit point that you could eventually rebase:
git rebase
This feature is standard in the Gerrit UI.
On the top right of the UI for a patch, click Download, and you will see something like:
When you are navigating the patches you go to the download section and copy the command line command for checking out the patch set, for example like this:
git fetch https://gerrit.googlesource.com/gerrit refs/changes/03/64403/2 && git checkout FETCH_HEAD
Then I normally create a branch with the review number and patchset as name
git checkout -b b64403-2
For here you can work normally and commit your changes or cherry-pick/rebase your changes on this change.
Once the review of r64403 is done your code can be merged or when there is another patchset submitted you will need to do the same thing again.
If you do not see the options to download the option to Checkout or Cherry Pick you need to edit the gerrit.config, something like this:
[download]
scheme = ssh
command = checkout
command = cherry_pick
More details can be found in the Gerrit Documentation
Update:
As barryku correctly points out, in the later version you need to download the downloads-commands plugin. This can be done during the initial setup or by using the following command:
java -jar gerrit-2.11.4.war init -d review_site --batch --install-plugin download-commands
Or you can use the -d option to git-review. For example, assuming you were working the with nova-docker repository and were interested in this change in gerrit:
https://review.openstack.org/#/c/148486/
You could download the latest patchset like this:
git review -d 148486
Or you can use the change id:
git review -d I35729a86e211391f67cc959d19416c9125c6f9eb
You can also request a specific revision of the patch by appending a comma and the patch number. E.g, to get the second revision of that patch:
git review -d 148486,2
I am not 100% sure what your question is. Sounds like you want to easy the workflow or typing. larsks mentioned already git review which is mostly used.
For your case, maybe it helps to download all ref's automatically so you can reference them directly. You can always all specified ref's like with
git fetch origin "+refs/changes/*:refs/remotes/origin/changes/*"
Then you can work locally with the commit id.
A simple git alias or scripting it for all refs can be easily done. An example of such a while loop can be found in the script on https://github.com/saper/gerrit-fetch-all With such a small shell snippet you can easily accomplish to skip one part of the ref id to easier reference them:
Server side: Client side:
refs/changes/13/713/1 refs/head/713/1
refs/changes/20/1220/1 refs/head/1220/1
refs/changes/20/1220/2 refs/head/1220/2
refs/changes/22/1222/1 refs/head/1222/1
As mentioned in the comments, you can just get the right git command from the gerrit GUI. If you really dislike GUIs, or you want to automate it (and for some reason can't use git-review), you can use the gerrit API:
curl -s 'https://<your gerrit server>/r/changes/<change id>?o=CURRENT_REVISION&o=DOWNLOAD_COMMANDS' | tail -n+2 | jq -r '.revisions[.current_revision].fetch["anonymous http"].commands.Pull' | bash -
or
git pull origin `curl -s 'https://<your gerrit server>/r/changes/<change id>?o=CURRENT_REVISION' | tail -n+2 | jq -r '.revisions[.current_revision].ref'`

Adding a variant to an existing homebrew formula?

I'd like to modify the dtc formula to build a specialized version of dtc used with the Beaglebone Black (and other device-tree ARM boards). The problem is multi-fold. The dtc formula provides bottled versions, and installed 1.4.0. I want to install a version that comes from newer sources, but not the absolute latest, and applies a patch available elsewhere. I can build this manually on OS X, but I don't know the best way to make it available in homebrew.
I'd like to make it a variant. Either an entirely separate formula, or something within the current formula that can be selected with a command-line parameter. But I'm not well-versed enough in brew to know how best to do this.
I tried creating new formula called "dtc-dyn" but it doesn't like dashes in the name.
I'd also like to make it a bottle, for others' convenience, but that seems more complicated.
I tried just modifying the current dtc and removing all the bottle stuff, then modifying the URL, version, and adding system steps. But some of the operations fail (that seem to work when run from the original build script):
def install
git_sha = "f6dbc6ca9618391e4f30c415a0a09b7af35f7647"
system "git checkout master -f"
system "git pull"
system "git checkout #{git_sha} -b #{git_sha}-build"
system "git pull --no-edit https://github.com/pantoniou/dtc dt-overlays5"
system "make clean"
system "make all"
end
Sadly, this doesn't work:
$ brew install dtc
==> Cloning git://git.kernel.org/pub/scm/utils/dtc/dtc.git
Updating /Library/Caches/Homebrew/dtc--git
==> Checking out branch master
==> git checkout master -f
==> git pull
==> git checkout f6dbc6ca9618391e4f30c415a0a09b7af35f7647 -b f6dbc6ca9618391e4f30c415a0a09b7af35f7647-build
2015-09-21 00:22:37 -0700
git checkout f6dbc6ca9618391e4f30c415a0a09b7af35f7647 -b f6dbc6ca9618391e4f30c415a0a09b7af35f7647-build
fatal: reference is not a tree: f6dbc6ca9618391e4f30c415a0a09b7af35f7647
READ THIS: https://git.io/brew-troubleshooting
The original script can be found here.
Anyway, what's the best way to approach this? I think some kind of with-option, based on some of the example scripts, but I'm not sure how to avoid the bottle business. Thanks!
Second Approach
Okay, after more doc reading and experimenting, I'm trying this:
class Dtc < Formula
desc "Device tree compiler"
homepage "http://www.devicetree.org/"
url "https://mirrors.kernel.org/debian/pool/main/d/device-tree-compiler/device-tree-compiler_1.4.0+dfsg.orig.tar.gz"
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/d/device-tree-compiler/device-tree-compiler_1.4.0+dfsg.orig.tar.gz"
sha256 "f5f9a1aea478ee6dbcece8907fd4551058fe72fc2c2a7be972e3d0b7eec4fa43"
version "1.4.0"
option "with-symbols", "Add symbols/fixup support (-# option)."
bottle…
if build.with? "symbols"
url "http://git.kernel.org/pub/scm/utils/dtc/dtc.git", :revision => "f6dbc6ca9618391e4f30c415a0a09b7af35f7647"
system "git", "pull", "--no-edit", "https://github.com/pantoniou/dtc", "dt-overlays5"
end
def install
system "make"
system "make", "DESTDIR=#{prefix}", "PREFIX=", "install"
mv lib/"libfdt.dylib.1", lib/"libfdt.1.dylib"
end
end
Unfortunately, the git pull fails because it does that before cloning the git repo, and it's not in the right directory. I first considered patch do…, but it wasn't clear how to apply the patch via git pull. I tried this:
if build.with? "symbols"
url "http://git.kernel.org/pub/scm/utils/dtc/dtc.git", :revision => "f6dbc6ca9618391e4f30c415a0a09b7af35f7647"
patch do
system "git", "pull", "--no-edit", "https://github.com/pantoniou/dtc", "dt-overlays5"
end
end
But it still tries to do the git pull before cloning the repo and cding to it.

Installing Erlang/OTP 17.5 on OSX

The official install instructions say:
If you want to build the wx application, you will need to get
wxWidgets-3.0 (wxWidgets-3.0.0.tar.bz2 from
http://sourceforge.net/projects/wxwindows/files/3.0.0/) or get it from
github with bug fixes:
$ git clone --branch WX_3_0_branch git#github.com:wxWidgets/wxWidgets.git
Who wouldn't want bug fixes:
$ git clone --branch WX_3_0_branch git#github.com:wxWidgets/wxWidgets.git
Cloning into 'wxWidgets'...
fatal: Remote branch WX_3_0_branch not found in upstream origin
Does anyone know where the bug fix version is located?
Response to comment:
With all caps, I get:
$ git clone --branch WX_3_0_BRANCH git#github.com:wxWidgets/wxWidgets.git
Cloning into 'wxWidgets'...
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
For future searchers: in order to use github commands like above, you need to setup ssh keys for your computer. I had already done that, but for some reason it didn't work a few hours later. Firewall problems at my new location? I don't know. I moved to a different location/server from where I was getting the Connection reset by peer error, and then I created a new ssh key, and I was able to download and install wxWidgets. The git clone command just downloads the source, so you probably want to be at the ~/Downloads prompt when you issue that command. The Erlang install directions tell you how to install wxWidgets.
The branch in question is named WX_3_0_BRANCH — all uppercase.

git doesn't work. I get "'git' is not recognized as ..."

I am trying to run this line out of http://docs.heroku.com/quickstart
git init
But I get
How do I get around this problem?
You need to install git on windows first, and then use the GIT bash shell. Here is the site for GIT on windows http://code.google.com/p/msysgit/
Just install that, open GIT Bash, navigate back to that directory and run that command again.
Make sure you did all the prerequisites on that page.
Did you install git? http://code.google.com/p/msysgit/
If so, make sure the location of the executable is in your PATH variable.
This site may help too:
http://kylecordes.com/2008/git-windows-go
i will suggest you to use tortoisegit , a git for window. But yet , develop rails in window is suffering , why don't you just dual boot your computer to linux and window ?

Resources