Compiling VIM with breakindent patch - vim

In Ubuntu 12.04 Precise the only way to get breakindent patch working in VIM seems to be compiling VIM itself after patching it. Here's what I've done:
Install pbuilder and create local environment
sudo apt-get install pbuilder debootstrap
sudo pbuilder create --debootstrapopts --variant=buildd
Get the sources
sudo apt-get source vim
Patch them with breakindent patch retrieved from the official repo
cd vim-7.3.429
patch -p1 < vim-breakindent.patch
sudo pbuilder build vim_7.3.429-2ubuntu2.1.dsc
Pbuilder correctly generates deb packages but, after installing them, no breakindent option is available:
:set bri
E518: Unknown option: bri
Where's the mistake?
Thank you

pbuilder is still using the unmodified .dsc, .orig.tar.gz, and .debian.tar.gz to build the package. Applying the patch to your local copy doesn't help.
You should probably add the patch to debian/patches/ and debian/patches/series, bump the local version number in debian/changelog (debchange can help), and re-make the source archive (something like dpkg-buildpackage -S).

Update: it worked following some more steps.
After apt-get source:
cd vim-7.3.429
sudo chmod u=rw,g=r,o=r ../vim-breakindent.patch
sudo cp ../vim-breakindent.patch debian/patches/debian/.
added one new entry in debian/changelog, bumping version from vim_7.3.429-2ubuntu2.1 to vim_7.3.429-2ubuntu2.2
added debian/vim-breakindent.patch at the end of debian/patches/series
generate new source package:
sudo pdebuild
compile the new .dsc:
sudo pbuilder build vim_7.3.429-2ubuntu2.2.dsc
install new debs:
sudo dpkg -i /var/cache/pbuilder/result/*.deb

Related

DNF fails to synchronize cache when using --installroot option

I am trying to install a bunch of software in a dummy root, so I can copy it into new systems quickly. However whenever I use dnf install or dnf builddep with the --installroot option it fails to synchronize cache for repositories.
I thought it's missing some configuration, so I copied yum and dnf configuration files into the installroot dir:
cp /etc/dnf/dnf.conf /path/to/root_fs/etc/dnf
cp /etc/yum.conf /path/to/root_fs/etc/
cp -R /etc/yum.repos.d/ /path/to/root_fs/etc/
But still what I get is
sudo dnf -c $ROOT_FS_DIR/etc/dnf/dnf.conf install gcc --installroot=$ROOT_FS_DIR -releasever=23
Error: Failed to synchronize cache for repo 'updates'
Dnf works fine updating my host system.
So how do I configure dnf to install packages into a different root dir.
DNF is not so clever and needs a releasever if you installs in chroots (bug). You miss single - in front of that option:
sudo dnf -c $ROOT_FS_DIR/etc/dnf/dnf.conf install gcc \
--installroot=$ROOT_FS_DIR --releasever=23
but the release 23 is already EOL so the mirrors do not have to exist anymore. You should use supported release version.

Why couldn't the latest version of rsync be installed on CentOS 7.2?

I am using CentOS 7.2.
I would like to install the latest version of rsync - rsync-3.1.2,
rsync-3.0.9 is on system, installed when installing mariadb with yum,
# rpm -qa |grep rsync
rsync-3.0.9-17.el7.x86_64
removing rsync-3.0.9 first,
# yum remove rsync
rsync and mariadb were removed together,
then,
installing rsync-3.1.2 from source code,
# wget https://download.samba.org/pub/rsync/src/rsync-3.1.2.tar.gz
# tar -zxvf rsync-3.1.2.tar.gz
# cd rsync-3.1.2
# ./configure
# make
# make install
then,
installing mariadb with yum again,
but rsync-3.0.9 will still be installed.
How can I solve the problem?
You can install rsync 3.1.2 from the Fedora 24 .rpm package:
wget http://dl.fedoraproject.org/pub/fedora/linux/releases/24/Everything/x86_64/os/Packages/r/rsync-3.1.2-2.fc24.x86_64.rpm
rpm -Uvh rsync-3.1.2-2.fc24.x86_64.rpm
(but that question doesn't really belong to stackoverflow)
You can install rsync 3.1.2 from the gf-plus repo. Just follow the steps below:
Install the gf-release package.
sudo rpm -Uvh http://mirror.ghettoforge.org/distributions/gf/el/7/gf/x86_64/gf-release-7-10.gf.el7.noarch.rpm
Upgrade rsync package from the gf-plus repo.
sudo yum install -y --enablerepo=gf-plus rsync
Check rsync version.
hash -r; rsync --version | awk 'NR==1 {print $3}'
If it prints 3.1.2, rsync is upgraded.
By default, only the gf repo is enabled, which claims that it "won't overwrite core distro packages". You can disable it:
sudo yum-config-manager --disable gf
(For command not found error, run sudo yum install -y yum-utils and try again.)
Or simply remove all the gf* repos by removing the gf-release package:
sudo yum remove -y gf-release
You either need to install all of your software using packages, or install all of your software from source. Trying to mix and match is going to lead to exactly the sort of problem you are experiencing here: the mariadb package has a dependency on rsync, but the package manager doesn't know anything about the files you have installed from source.
The correct way to solve this problem is to build your own rsync package that can then be installed with yum. You can start with the source package for your distribution and then modify it for 3.1.2. You may be able to utilize a more recent package (e.g., from Fedora) and rebuild it for your system.
You can find the source RPM for rsync-3.0.9 here, and there is some documentation that will hopefully help you get started here.

Install git or update git without apt-get or yum

I have some linux boxes that do not allow me to use yum to install packages. Instead I need to download the zip or tar and then use a package manager to install the items on my linux boxes.
When you go to the git-scm page, the only way they provide to install git is to use yum, apt-get, etc from the command line.
Why is there not just a zip file?
Where can I find the package to install?
Has anyone else had this same issue?
I had the same issue before. I tried to install git from source and it works.
Intalling these packages first:
curl
autoconf
zlib-devel
openssl-devel
perl
cpio
expat-devel
gettext-devel
Getting the GIT scm source code:
git-latest.tar.gz
Compiling the GIT scm from source
tar xzvf git-latest.tar.gz
cd git-{date} // edit it
autoconf
./configure --with-curl=/usr/local
make
make install

Need a 64 bit binary for JZMQ, or bulding instructions for a non MSVC environment (cygwin/mingw)?

I'm looking for a binary source for jzmq. Although I've been able to use mingw to build the zmq basic libraries and dlls, I can't use the same technique to compile jzmq myself.
I found this page:
http://www.mail-archive.com/zeromq-dev#lists.zeromq.org/msg06477.html
But it starts with the words: Run ./autogen.sh on linux (to avoid autotools on mingw32)
All I really need is a 64 bit binary for now, but can follow instructions that don't requirem me to track down a completely different computer/operating system to get started...
This worked for me on 64-bit ubuntu 11.04.
1) Configure the environment
sudo apt-get install git
sudo apt-get install libtool
sudo apt-get install autoconf
sudo apt-get install automake
2) Set JAVA_HOME to location of JDK
Add "JAVA_HOME=/usr/lib/jvm/java-6-openjdk" and "export JAVA_HOME" to /etc/bash.bashrc
Add ":/usr/lib/jvm/java-6-openjdk/bin/jre/bin" at the end of the PATH setting in /etc/environment
3) Build the jar
cd $HOME
git clone https://github.com/zeromq/jzmq.git
cd jzmq
sudo ./autogen.sh
make
sudo make install
4) You should now have zmq.jar in $HOME/jzmq/src
Note: that this build process and the use of zmq.jar relies on having the zmq core already installed, so its probably worthwhile checking that have a whole bunch of libzmq files in /usr/local/lib.

Boost Installation

I have a question regarding the installation of the boost libraries. Is there a package that I can use the sudo apt-get install to install this package. I searched all of the questions in this forum and using the commands sudo apt-get install libboost1.40-dev I cannot install theh package with this. Also, I can download it from boost.org but I do not know the correct path to install it too. I would prefer to install it using the sudo apt-get install commands if possible. I am using Ubuntu 9.04.
Thanks.
If you want to run with the latest version, you can do the bjam install as mentioned by Ralf, but I suggest you build a 'pseudo' package so you can
uninstall it safely
prevent/notice conflicts with official/existing boost packages.
Here is how to do that:
mkdir -pv /tmp/boostinst
cd /tmp/boostinst/
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2/download'
tar xf download
cd boost_1_66_0/
./bootstrap.sh --help
./bootstrap.sh --show-libraries
./bootstrap.sh
checkinstall ./b2 install
On new boost version there is other way:
sudo apt-get update
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download'
tar xf download
cd boost_1_50_0
./bootstrap.sh
./b2 install
You can use command aptitude search libboost to see list of the availiable boost libraries. The last version of boost is 1.42 - maybe that's why you can't find version 1.40.
If aptitude search command don't give you sufficient results, try sudo aptitude update and then run aptitude search again.
On my version of Ubuntu (10.04) it's libboost1.40-all-dev
On your version you've probably got an older version of boost, you should just be able to tab-complete to see which version you can install.
In any case what I usually do under Ubuntu is
sudo apt-get install bjam
Extract the downloaded boost archive to your hard-drive and then cd into the root and
sudo bjam install
This way you can get the newest version of boost, and not the slightly outdated one that is available for your Ubuntu version.
This is a link which explain step by step on how to install it (give it some time read!)
http://www.boost.org/doc/libs/1_41_0/more/getting_started/unix-variants.html
but your inline shell command might be the simple and easy way for doing it

Resources