Chris Tyler - Fedora Linux

Здесь есть возможность читать онлайн «Chris Tyler - Fedora Linux» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Год выпуска: 2006, ISBN: 2006, Издательство: O'Reilly, Жанр: ОС и Сети, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Fedora Linux: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Fedora Linux»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

"Neither a "Starting Linux" book nor a dry reference manual, this book has a lot to offer to those coming to Fedora from other operating systems or distros." -- Behdad Esfahbod, Fedora developer This book will get you up to speed quickly on Fedora Linux, a securely-designed Linux distribution that includes a massive selection of free software packages. Fedora is hardened out-of-the-box, it's easy to install, and extensively customizable - and this book shows you how to make Fedora work for you.
Fedora Linux: A Complete Guide to Red Hat's Community Distribution In this book, you'll learn how to:
 Install Fedora and perform basic administrative tasks
 Configure the KDE and GNOME desktops
 Get power management working on your notebook computer and hop on a wired or wireless network
 Find, install, and update any of the thousands of packages available for Fedora
 Perform backups, increase reliability with RAID, and manage your disks with logical volumes
 Set up a server with file sharing, DNS, DHCP, email, a Web server, and more
 Work with Fedora's security features including SELinux, PAM, and Access Control Lists (ACLs)
Whether you are running the stable version of Fedora Core or bleeding-edge Rawhide releases, this book has something for every level of user. The modular, lab-based approach not only shows you how things work - but also explains why--and provides you with the answers you need to get up and running with Fedora Linux.

Fedora Linux — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Fedora Linux», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Standard definitions distributed with the RPM software.

/etc/rpm/macros

Site-specific macros. Definitions that are local to your system and that should apply to all users should be placed here.

~/.rpmmacros

Per-user configuration information.

rpmbuild uses the spec file to create a script. This script contains an expansion of all of the macros (such as %configure and %makeinstall ) used in the spec file and is executed to prepare the RPM for packaging. (If rpmbuild is aborted or encounters a serious error, you will find the script in ~/rpm/tmp/ ). This script, in turn, references scripts found in /usr/lib/rpm to perform some of the processing involved in building a package.

When packages are built by the root user, the default RPM directories are used:

/usr/src/redhat/ BUILD

Temporary build files

/usr/src/redhat/ RPMS

Binary and debug RPMs that have been built

/usr/src/redhat/ SOURCES

Source tarballs (as well as patches, RPM icons, and related files)

/usr/src/redhat/ SPECS

Spec files

/usr/src/redhat/ SRPMS

Source RPMs that have been built

Since these directories are writable only by root , and it is not recommended that RPMs be built by the root user, it's best to use a set of directories within your home directory.

5.7.3. What About...

5.7.3.1. ...creating a desktop menu entry for a packaged program?

To create an entry in the menu, you will need to create a .desktop file in /usr/share/applications and (ideally) an icon in /usr/share/icons .

In the case of Critical Mass, there is an icon available in the top level of the tarball, so it can be fairly easily copied over to /usr/share/icons in the %install section of the spec file:

mkdir -p %{buildroot}%{_datadir}/icons

install -m 744 critter.png %{buildroot}%{_datadir}/icons/critter.png

Creating the .desktop file is almost as easy. Here are the contents of a .desktop file for Critical Mass:

mkdir -p %{buildroot}%{_datadir}/applications

echo "[Desktop Entry]

Name=Critical Mass

Comment=Shoot-em-up Game

Categories=Application;Game

Encoding=UTF-8

Exec=critter

Icon=critter.png

StartupNotify=true

Terminal=False

Type=Application" > %{buildroot}%{_datadir}/applications/CriticalMass.desktop

The .desktop file identifies all of the information necessary to create an additional entry in the desktop menu (whether KDE or GNOME):

Name

The name of the menu entry

Comment

The comment displayed as a tool tip message if you hover over the menu entry with the mouse pointer

Categories

The menu categories under which this entry will appear

Encoding

The character encoding used for this entry

Exec

The name of the command to be executed when this menu entry is selected

Icon

The name of the icon file

StartupNotify

Whether this icon supports the xdg startup notification protocol , which is used to manage a visual indication that the application is in the process of starting up

Terminal

Whether the application should be run in an terminal window (for nongraphical programs)

Type

Indicates that the program is a standalone application

The extended %install section looks like this:

%install

rm -rf %{buildroot}

%makeinstall

mkdir -p %{buildroot}%{_datadir}/icons

install -m 744 critter.png %{buildroot}%{_datadir}/icons/ critter.png

mkdir -p %{buildroot}%{_datadir}/applications

echo "[Desktop Entry]

Name= Critical Mass

Comment= Shoot-em-up Game

Categories=Application; Game

Encoding=UTF-8

Exec =critter

Icon =critter.png

StartupNotify= true

Terminal= False

Type=Application" > %{buildroot}%{_datadir}/applications/ CriticalMass.desktop

It is also necessary to modify the %files section to include the icon and .desktop file:

%files

%defattr(-, root, root)

%doc COPYING TODO

%{_bindir}/*

%{_datadir}/Critical_Mass

%{_mandir}/man?/*

%{_datadir}/applications/*

%{_datadir}/icons/*

5.7.3.2. ...running a script when a package is installed or removed?

This can be done by specifying a %pre , %post , %preun , or %postun section. The difference between these sections is in when they designate the script to run: before installation ( %pre ), after installation ( %post ), before removal ( %preun ), or after removal ( %postun ).

As a simple example, if your script contains shared object libraries ( .so files), you should run ldconfig after installation and after removal:

%post

/sbin/ldconfig

%postun

/bin/ldconfig

In this case, you should add a Requires tag to the preamble:

Requires: /sbin/ldconfig

5.7.3.3. ...including an icon to identify the package?

A package icon can be included; graphical installation tools can pick up this icon and display it instead of a generic package icon. Place the icon in the same directory as the tarball, and create an Icon tag in the preamble:

Icon: CriticalMass.xpm

The icon should be in XPM format. You can use convert to make an XPM file from a file in another format:

$ convert critter.png critter.xpm

5.7.3.4. ...viewing the source code and the spec file for an existing package?

This is an excellent way to learn about writing advanced spec files. You don't even need root privileges to open and view the files!

After downloading the source RPM for a package ( .src.rpm file), install it in the normal way:

$ rpm -ivh ImageMagick-6.2.2.0-2.src.rpm

1:ImageMagick ########################################### [100%]

The files will be installed into ~/rpm/ name in this case, ~/rpm/ImageMagick :

$ ls ~/rpm/ ImageMagick

ImageMagick-5.5.6-mask.patch

ImageMagick-6.2.0-compress.patch

ImageMagick-6.2.1-fixed.patch

ImageMagick-6.2.1-hp2xx.patch

ImageMagick-6.2.1-local_doc.patch

ImageMagick-6.2.1-pkgconfig.patch

ImageMagick-6.2.2-0.tar.bz2

ImageMagick.spec

magick_small.png

5.7.4. Where Can I Learn More?

 The Fedora RPM guide: http://fedora.redhat.com/docs/drafts/rpm-guide-en/ (that's a draft version; the final version is expected to be posted at http://fedora.redhat.com/docs/rpm-guide-en/ )

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Fedora Linux»

Представляем Вашему вниманию похожие книги на «Fedora Linux» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Fedora Linux»

Обсуждение, отзывы о книге «Fedora Linux» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x