[nano] install everything in /usr

Harald Hoyer harald at fedoraproject.org
Wed Jan 25 19:49:16 UTC 2012


commit 04f20f6f61bb80ad51a5c328e60d422c175385f7
Author: Harald Hoyer <harald at redhat.com>
Date:   Wed Jan 25 19:04:55 2012 +0100

    install everything in /usr
    
    This patch is needed for the /usr-move feature
    https://fedoraproject.org/wiki/Features/UsrMove
    
    This package requires now 'filesystem' >= 3, which is only installable
    on a system which has /bin, /sbin, /lib, /lib64 as symlinks to /usr and
    not regular directories. The 'filesystem' package acts as a guard, to
    prevent *this* package to be installed on old unconverted systems.
    
    New installations will have the 'filesystem' >=3 layout right away, old
    installations need to be converted with anaconda or dracut first; only
    after that, the 'filesystem' package, and also *this* package can be
    installed.
    
    Packages *should* not install files in /bin, /sbin, /lib, /lib64, but
    only in the corresponding directories in /usr. Packages *must* not
    install conflicting files with the same names in the corresponding
    directories in / and /usr. Especially compatibility symlinks must not be
    installed.
    
    Feel free to modify any of the changes to the spec file, but keep the
    above in mind.

 nano.spec |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/nano.spec b/nano.spec
index cce056c..a7e0959 100644
--- a/nano.spec
+++ b/nano.spec
@@ -1,7 +1,7 @@
 Summary:         A small text editor
 Name:            nano
 Version:         2.3.1
-Release:         2%{?dist}
+Release:         3%{?dist}
 License:         GPLv3+
 Group:           Applications/Editors
 URL:             http://www.nano-editor.org
@@ -21,6 +21,7 @@ BuildRequires:   gettext-devel
 BuildRequires:   groff
 BuildRequires:   ncurses-devel
 BuildRequires:   sed
+Conflicts:       filesystem < 3
 Requires(post):  /sbin/install-info
 Requires(preun): /sbin/install-info
 
@@ -43,17 +44,14 @@ done
 touch -c aclocal.m4 config.h.in configure Makefile.in
 
 %build
-%configure --bindir=/bin
+%configure
 make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-make DESTDIR="%{buildroot}" install bindir=/bin
+make DESTDIR="%{buildroot}" install
 #ln -s nano %{buildroot}%{_bindir}/pico
 rm -f %{buildroot}%{_infodir}/dir
-mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
-ln -s ../../bin/nano ${RPM_BUILD_ROOT}%{_bindir}/nano
-ln -s ../../bin/rnano ${RPM_BUILD_ROOT}%{_bindir}/rnano
 cp %{SOURCE2} ./nanorc
 
 # disable line wrapping by default and set hunspell as the default spell-checker
@@ -87,7 +85,6 @@ rm -rf %{buildroot}
 %doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO
 %doc doc/nanorc.sample
 %doc doc/faq.html
-/bin/*
 %{_bindir}/*
 %config(noreplace) %{_sysconfdir}/nanorc
 %{_mandir}/man*/*
@@ -96,6 +93,10 @@ rm -rf %{buildroot}
 %{_datadir}/nano
 
 %changelog
+* Wed Jan 25 2012 Harald Hoyer <harald at redhat.com> 2.3.1-3
+- install everything in /usr
+  https://fedoraproject.org/wiki/Features/UsrMove
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.3.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list