Archive

Archive for the ‘Slackware Linux Essentials’ Category

Slackware Linux Essentials - Appendix A. The GNU General Public License

January 5th, 2009

Warning: file_get_contents(http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=1TJ8QTQ6ZFCVAJ3X1T02&AssociateTag=ii0c3-20&Operation=ItemSearch&SearchIndex=Books&ResponseGroup=Small,Images&Keywords=protection) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/manusia2/public_html/wp-content/plugins/amazonfeed/php/amazonfeed.class.php on line 271

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


A.1. Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software–to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation’s software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author’s protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors’ reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone’s free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.


A.2. TERMS AND CONDITIONS

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  1. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The “Program”, below, refers to any such program or work, and a “work based on the Program” means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term “modification”.) Each licensee is addressed as “you”.

    Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

  2. You may copy and distribute verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

    You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

  3. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

    1. You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

    2. You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

    3. If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

    These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

    Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

    In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

  4. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

    1. Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

    2. Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

    3. Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

    The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

    If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

  5. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

  6. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

  7. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients’ exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

  8. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

    If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

    It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

    This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

  9. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

  10. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

    Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and “any later version”, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

  11. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

  12. NO WARRANTY

    BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS


A.3. How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
   Copyright (C) <year>  <name of author>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA   02111-1307 USA

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year  name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w’ and `show c’ should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w’ and `show c’; they could even be mouse-clicks or menu items–whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a “copyright disclaimer” for the program, if necessary. Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.

Tags: protection, slackware, Slackware Linux Essentials, software, ssl

Related posts

Slackware Linux Essentials , , ,

Slackware Linux Essentials - Glossary

January 5th, 2009
Account

All of the information about a user, including username, password, finger information, UID and GID, and home directory. To create an account is to add and define a user.

Background

Any process that is running without accepting or controlling the input of a terminal is said to be running in the background.

Boot disk

A floppy disk containing an operating system (in our case, the Linux kernel) from which a computer can be started.

Compile

To convert source code to machine-readable “binary” code.

Daemon

A program designed to run in the background and, without user intervention, perform a specific task (usually providing a service).

Darkstar

The default hostname in Slackware; your computer will be called darkstar if you do not specify some other name.

One of Patrick Volkerding’s development machines, named after “Dark Star”, a song by the Grateful Dead.

Desktop Environment

A graphical user interface (GUI) that runs atop the X Window System and provides such features as integrated applications, cohesive look-and-feel between programs and components, file and window management capabilities, etc. A step beyond the simple window manager.

Device driver

A chunk of code in the kernel that directly controls a piece of hardware.

Device node

A special type of file in the /dev filesystem that represents a hardware component to the operating system.

DNS

Domain Name Service. A system in which networked computers are given names which translate to numerical addresses.

Domain name

A computer’s DNS name, excluding its host name.

Dot file

In Linux, files which are to be hidden have filenames beginning with a dot (’.').

Dotted quad

The format of IP addresses, so called because it consists of four numbers (range 0-255 decimal) separated by periods.

Dynamic loader

When programs are compiled under Linux, they usually use pieces of code (functions) from external libraries. When such programs are run, those libraries must be found and the required functions loaded into memory. This is the job of the dynamic loader.

Environment variable

A variable set in the user’s shell which can be referenced by that user or programs run by that user within that shell. Environment variables are generally used to store preferences and default parameters.

Epoch

A period of history; in Unix, “The Epoch” begins at 00:00:00 UTC January 1, 1970. This is considered the “dawn of time” by Unix and Unix-like operating systems, and all other time is calculated relative to this date.

Filesystem

A representation of stored data in which “files” of data are kept organized in “directories”. The filesystem is the nearly universal form of representation for data stored to disks (both fixed and removable).

Foreground

A program that is accepting or controlling a terminal’s input is said to be running in the foreground.

Framebuffer

A type of graphics device; in Linux, this most often refers to the software framebuffer, which provides a standard framebuffer interface to programs while keeping specific hardware drivers hidden from them. This layer of abstraction frees programs of the need to speak to various hardware drivers.

FTP

The File Transfer Protocol. FTP is a very popular method of transferring data between computers.

Gateway

A computer through which data on a network is transferred to another network.

GID

Group Identifier. The GID is a unique number attributed to a group of users.

Group

Users in Unix belong to “groups”, which can contain many other users and are used for more general access control than the existence of users alone can easily allow.

GUI

Graphical User Interface. A software interface that uses rendered graphical elements such as buttons, scrollbars, windows, etc. rather than solely text-based input and output

Home directory

A user’s “home directory” is the directory the user is placed in immediately upon logging in. Users have full permissions and more or less free reign within their home directories.

HOWTO

A document describing “how to” do something, such as configure a firewall or manage users and groups. There is a large collection of these documents available from the Linux Documentation Project.

HTTP

The Hypertext Transfer Protocol. HTTP is the primary protocol on which the World Wide Web operates.

ICMP

Internet Control Message Protocol. A very basic networking protocol, used mostly for pings.

Kernel

The heart of an operating system. The kernel is the part that provides basic process control and interfaces with the computer’s hardware.

Kernel module

A piece of kernel code, usually a driver of some sort, that can be loaded and unloaded from memory separately from the main body of the kernel. Modules are handy when upgrading drivers or testing kernel settings, because they can be loaded and unloaded without rebooting.

Library

A collection of functions which can be shared between programs.

LILO

The LInux LOader. LILO is the most widely-used Linux boot manager.

LOADLIN

LOADLIN is a program that runs under MS DOS or Windows and boots a Linux system. It is most commonly used on computers with multiple operating systems (including Linux and DOS/Windows, of course).

Man section

Pages in the standard Unix online manual ("man") are grouped into sections for easy reference. All C programming pages are in section 3, system administration pages in section 5, etc.

MBR

The Master Boot Record. A reserved space on a hard drive where information on what to do when booting is stored. LILO or other boot managers can be written here.

Motif

A popular programming toolkit used in many older X programs.

MOTD

Message of the Day. The motd (stored in Linux in /etc/motd is a text file that is displayed to all users upon logging in. Traditionally, it is used by the system administrator as a sort of “bulletin board” for communicating with users.

Mount point

An empty directory in a filesystem where another filesystem is to be “mounted”, or grafted on.

Nameserver

A DNS information server. Nameservers translate DNS names to numerical IP addresses.

Network interface

A virtual representation of a network device provided by the kernel. Network interfaces allow users and programs to talk to network devices.

NFS

The Network Filesystem. NFS allows the mounting of remote filesystems as if they were local to your computer and thus provides a transparent method of file sharing.

Octal

Base-8 number system, with digits 0-7.

Pager

An X program that allows the user to see and switch between multiple “desktops”.

Partition

A division of a hard drive. Filesystems exist on top of partitions.

PPP

Point-to-Point Protocol. PPP is used mainly for connecting via modem to an Internet Service Provider.

Process

A running program.

Root directory

Represented as “/”, the root directory exists at the top of the filesystem, with all other directories branching out beneath it in a “file tree”.

Root disk

The disk (usually fixed) on which the root directory is stored.

Routing table

The set of information the kernel uses in “routing” network data around. It contains such tidbits as where your default gateway is, which network interface is connected to which network, etc.

Runlevel

The overall system state as defined by init. Runlevel 6 is rebooting, runlevel 1 is “single user mode”, runlevel 4 is an X login, etc. There are 6 available runlevels on a Slackware system.

Secure shell

An encrypted (thus secure) method of logging in remotely to a computer. Many secure shell programs are available; both a client and server are needed.

Service

The sharing of information and/or data between programs and computers from a single “server” to multiple “clients”. HTTP, FTP, NFS, etc. are services.

Shadow password suite

The shadow password suite allows encrypted passwords to be hidden from users, while the rest of the information in the /etc/passwd file remains visible to all. This helps prevent brute-force attempts at cracking passwords.

Shell

Shells provide a commandline interface to the user. When you’re looking at a text prompt, you’re in a shell.

Shell builtin

A command built into the shell, as opposed to being provided by an external program. For instance, bash has a cd builtin.

Signal

Unix programs can communicate between each other using simple “signals”, which are enumerated and usually have specific meanings. kill -l will list the available signals.

SLIP

Serial Line Interface Protocol. SLIP is a similar protocol to PPP, in that it’s used for connecting two machines via a serial interface.

Software package

A program and its associated files, archived and compressed into a single file along with any necessary scripts or information to aid in managing the installation, upgrade, and removal of those files.

Software series

A collection of related software packages in Slackware. All KDE packages are in the “kde” series, networking packages in the “n” series, etc.

Source code

The (more or less) human-readable code in which most programs are written. Source code is compiled into “binary” code.

Standard Error (stderr)

The Unix-standard output stream for errors. Programs write any error messages on stderr, so that they can be separated from normal output.

Standard Input (stdin)

The Unix-standard input stream. Data can be redirected or piped into a program’s stdin from any source.

Standard Output (stdout)

The Unix-standard output stream. Normal text output from a program is written to stdout, which is separate from the error messages reported on stderr and can be piped or redirected into other programs’ stdin or to a file.

Subnet

An IP address range that is part of a larger range. For instance, 192.168.1.0 is a subnet of 192.168.0.0 (where 0 is a mask meaning “undefined”); it is, in fact, the “.1” subnet.

Superblock

In Linux, partitions are discussed in terms of blocks. A block is 512 bytes. The superblock is the first 512 bytes of a partition.

Supplemental disk

In Slackware, a floppy disk used during installation that contains neither the kernel (which is on the boot disk) nor the root filesystem (which is on the root disk), but additional needed files such as network modules or PCMCIA support.

Suspended process

A process which has been frozen until killed or resumed.

Swap space

Disk space used by the kernel as “virtual” RAM. It is slower than RAM, but because disk space is cheaper, swap is usually more plentiful. Swap space is useful to the kernel for holding lesser-used data and as a fallback when physical RAM is exhausted.

Symbolic link

A special file that simply points to the location of another file. Symbolic links are used to avoid data duplication when a file is needed in multiple locations.

Tagfile

A file used by the Slackware setup program during installation, which describes a set of packages to be installed.

Terminal

A human-computer interface consisting of at least a screen (or virtual screen) and some method of input (almost always at least a keyboard).

Toolkit, GUI

A GUI toolkit is a collection of libraries that provide a programmer with code to draw “widgets” such as scrollbars, checkboxes, etc. and construct a graphical interface. The GUI toolkit used by a program often defines its “look and feel”.

UID

User Identifier. A unique number that identifies a user to the system. UIDs are used by most programs instead of usernames because a number is easier to deal with; usernames are generally only used when the user has to see things happen.

VESA

Video Electronics Standards Association. The term “VESA” is often used to denote a standard specified by said Association. Nearly all modern video adapters are VESA-compliant.

Virtual terminal

The use of software to simulate multiple terminals while using only a single set of input/output devices (keyboard, monitor, mouse). Special keystrokes switch between virtual terminals at a single physical terminal.

Window manager

An X program whose purpose is to provide a graphical interface beyond the simple rectangle-drawing of the X Window System. Window managers generally provide titlebars, menus for running programs, etc.

Working directory

The directory in which a program considers itself to be while running.

Wrapper program

A program whose sole purpose is to run other programs, but change their behavior in some way by altering their environments or filtering their input.

X server

The program in the X Window System which interfaces with graphics hardware and handles the actual running of X programs.

X Window System

Network-oriented graphical interface system used on most Unix-like operating systems, including Linux.

Tags: account, archive, domain, domain name, ftp, manage, password, pop, raw, slackware, Slackware Linux Essentials, software

Related posts

Slackware Linux Essentials , , , , , , , , , ,

Slackware Linux Essentials - Chapter 19 ZipSlack

January 5th, 2009

19.1 What is ZipSlack?

ZipSlack is a special version of Slackware Linux. It’s an already installed copy of Slackware that’s ready to run from your DOS or Windows partition. It’s a basic installation, you do not get everything that comes with Slackware.

ZipSlack gets its name from the form it’s distributed in, a big .ZIP file. Users of DOS and Windows will probably be familiar with these files. They are compressed archives. The ZipSlack archive contains everything you need to get up and running with Slackware.

It is important to note that ZipSlack is significantly different from a regular installation. Even though they function the same and contain the same programs, their intended audiences and functions differ. Several advantages and disadvantages of ZipSlack are discussed below.

One last thing, you should always review the documentation included in the actual ZipSlack directory. It contains the latest information regarding installation, booting, and general use of the product.


19.1.1 Advantages
  • Does not require repartitioning of your hard disk.

  • Great way to learn Slackware Linux without stumbling through the installation process.


19.1.2 Disadvantages
  • Uses the DOS filesystem, which is slower than a native Linux filesystem.

  • Will not work with Windows NT.


19.2 Getting ZipSlack

Obtaining ZipSlack is easy. If you have purchased the official Slackware Linux CD set, then you already have ZipSlack. Just find the CD that contains the zipslack directory and place it in your CD-ROM drive. It’s usually the third or fourth disc, but always trust the labels over this documentation as the disk it resides on is prone to change.

If you want to download ZipSlack, you should first visit our “Get Slack” web page for the latest download information:

http://www.slackware.com/getslack/

ZipSlack is part of each Slackware release. Locate the release you want, and go to that directory on the FTP site. The latest release directory can be found at this location:

ftp://ftp.slackware.com/pub/slackware/slackware/

You’ll find ZipSlack in the /zipslack subdirectory. ZipSlack is offered as one big .ZIP file or floppy-sized chunks. The chunks are in the /zipslack/split directory.

Don’t stop at just the .ZIP files. You should also download the documentation files and any boot images that appear in the directory.


19.2.1 Installation

Once you’ve downloaded the necessary components, you’ll need to extract the .ZIP file. Be sure to use a 32-bit unzipper. The size and filenames in the archive are too much for a 16-bit unzipper. Examples of 32-bit unzippers include WinZip and PKZIP for Windows.

ZipSlack is designed to be extracted directly to the root directory of a drive (such as C: or D:). A \LINUX directory will be created that contains the actual Slackware installation. You’ll also find the files necessary to booting the system in that directory as well.

After you’ve extracted the files, you should have a \LINUX directory on the drive of your choosing (we’ll use C: from here on).


19.3 Booting ZipSlack

There are several ways to boot ZipSlack. The most common is to use the included LINUX.BAT to boot the system from DOS (or from DOS mode under Windows 9x). This file must be edited to match your system before it will work.

Start by opening the C:\LINUX\LINUX.BAT file in your favorite text editor. At the top of the file you will notice a large comment. It explains what you need to edit in this file (and also what to do if you are booting from an external Zip drive). Don’t worry if you don’t understand the root= setting. There are several examples, so feel free to pick one and try it. If it doesn’t work, you can edit the file again, comment out the line you uncommented, and pick another one.

After you uncomment the line you want by removing the “rem” at the beginning of the line, save the file and exit the editor. Bring your machine into DOS mode.

A DOS prompt window in Windows 9x will NOT work.

Type C:\LINUX\LINUX.BAT to boot the system. If all goes well, you should be presented with a login prompt.

Log in as root, with no password. You’ll probably want to set a password for root, as well as adding an account for yourself. At this point you can refer to the other sections in this book for general system usage.

If using the LINUX.BAT file to boot the system didn’t work for you, you should refer to the included C:\LINUX\README.1ST file for other ways to boot.

Tags: account, archive, ftp, password, slackware, Slackware Linux Essentials

Related posts

Slackware Linux Essentials , , , ,

Slackware Linux Essentials - Chapter 18 Slackware Package Management

January 5th, 2009

A software package is a bundle of related programs that are ready for you to install. When you download a source code archive, you have to configure, compile, and install it by hand. With a software package, this has already been done for you. All that you have to do is install the package. Another handy feature of using software packages is that it is very easy to remove and upgrade them, if you so desire. Slackware comes with programs for all your package management needs. You can install, remove, upgrade, make, and examine packages very easily.

There’s a myth that’s been going around ever since RedHat debuted RedHat Package Manager, that Slackware has no package management tool. This simply couldn’t be further from the truth. Slackware has always included a package manager, even before RedHat existed. While not as full-featured or as ubiquitous as rpm (or for that matter deb), pkgtool and its associated programs are every bit as good at installing packages as rpm. The truth about pkgtool is not that it doesn’t exist, but that it doesn’t do any dependency checking.

Apparently many people in the Linux community think that a packager manager must by definition include dependency checking. Well, that simply isn’t the case, as Slackware most certainly does not. This is not to say that Slackware packages don’t have dependencies, but rather that its package manager doesn’t check for them. Dependency management is left up to the sysadmin, and that’s the way we like it.


18.1 Overview of Package Format

Before learning the utilities, you should become familiar with the format of a Slackware package. In Slackware, a package is simply a tar archive file that has been compressed with gzip. Packages are built to be extracted in the root directory.

Here is a fictitious program and its example package:

./
usr/
usr/bin/
usr/bin/makehejaz
usr/doc/
usr/doc/makehejaz-1.0/
usr/doc/makehejaz-1.0/COPYING
usr/doc/makehejaz-1.0/README
usr/man/
usr/man/man1
usr/man/man1/makehejaz.1.gz
install/
install/doinst.sh

The package system will extract this file in the root directory to install it. An entry in the package database will be created that contains the contents of this package so that it can be upgraded or removed later.

Notice the install/ subdirectory. This is a special directory that can contain a postinstallation script called doinst.sh. If the package system finds this file, it will execute it after installing the package.

Other scripts can be embedded in the package, but those are discussed more in detail in Section 18.3.2 below.


18.2 Package Utilities

There are four main utilities for package management. They perform installation, removal, and upgrades of packages.


18.2.1 pkgtool

pkgtool(8) is a menu-driven program that allows installation and removal of packages. The main menu is shown in Figure 18-1.

Figure 18-1. Pkgtool’s main menu.

Installation is offered from the current directory, another directory, or from floppy disks. Simply select the installation method you want and pkgtool will search that location for valid packages to install.

You may also view a list of installed packages, as shown in Figure 18-2.

Figure 18-2. Pkgtool view mode

If you want to remove packages, select the remove option and you will be presented with a checklist of all the installed packages. Flag the ones you want to remove and select OK. pkgtool will remove them.

Some users prefer this utility to the command line utilities. However, it should be noted that the command line utilities offer many more options. Also, the ability to upgrade packages is only offered through the command line utilities.


18.2.2 installpkg

installpkg(8) handles installation of new packages on the system. The syntax is as follows:

# installpkg option package_name

Three options are provided for installpkg. Only one option can be used at a time.

Table 18-1. installpkg Options

Option

Effects

-m

Performs a makepkg operation on the current directory.

-warn

Shows what would happen if you installed the specified package. This is useful for production systems so you can see exactly what would happen before installing something.

-r

Recursively install all packages in the current directory and down. The package name can use wildcards, which would be used as the search mask when recursively installing.

If you pass the ROOT environment variable before installpkg, that path will be used for the root directory. This is useful for setting up new drives for your root directory. They will typically be mounted to /mnt or something other than /.

The installed package database entry is stored in /var/log/packages. The entry is really just a plain text file, one for each package. If the package has a postinstallation script, it is written to /var/log/scripts/.

You may specify several packages or use wildcards for the package name. Be advised that installpkg will not tell you if you are overwriting an installed package. It will simply install right on top of the old one. If you want to ensure that old files from the previous package are safely removed, use upgradepkg.


18.2.3 removepkg

removepkg(8) handles removing installed packages from the system. The syntax is as follows:

# removepkg option package_name

Four options are provided for removepkg. Only one option may be used at a time.

Table 18-2. removepkg Options

Option

Effects

-copy

The package is copied to the preserved packages directory. This creates a tree of the original package without removing it.

-keep

Saves temporary files created during the removal. Really only useful for debugging purposes.

-preserve

The package is removed, but copied to the preserved packages directory at the same time.

-warn

Shows what would happen if you removed the package.

If you pass the ROOT environment variable before removepkg, that path will be used for the root directory. This is useful for setting up new drives for your root directory. They will typically be mounted to /mnt or something other than /.

removepkg looks at the other installed packages and only removes files unique to the package you specify. It will also scan the postinstallation script for the specified package and remove any symbolic links that were created by it.

During the removal process, a status report is displayed. After the removal, the package database entry is moved to /var/log/removed_packages and the postinstallation script is moved to /var/log/removed_scripts.

Just as with installpkg, you can specify several packages or use wildcards for the package name.


18.2.4 upgradepkg

upgradepkg(8) will upgrade an installed Slackware package. The syntax is as follows:

# upgradepkg package_name

or

# upgradepkg old_package_name%new_package_name

upgradepkg works by first installing the new package and then removing the old package so that old files are no longer around on the system. If the upgraded package name has changed, use the percent sign syntax to specify the old package (the one that is installed) and the new package (the one you are upgrading it to).

If you pass the ROOT environment variable before upgradepkg, that path will be used for the root directory. This is useful for setting up new drives for your root directory. They will typically be mounted to /mnt or something other than /.

upgradepkg is not flawless. You should always back up your configuration files. If they get removed or overwritten, you’ll want a copy of the originals for any needed repair work.

Just as with installpkg and removepkg, you can specify several packages or use wildcards for the package name.


18.2.5 rpm2tgz/rpm2targz

The Red Hat Package Manager is a popular packaging system available today. Many software distributors are offering their products in RPM format. Since this is not our native format, we do not recommend people rely on them. However, some things are only available as an RPM (even the source).

We provide a program that will convert RPM packages to our native .tgz format. This will allow you to extract the package (perhaps with explodepkg) to a temporary directory and examine its contents.

The rpm2tgz program will create a Slackware package with a .tgz extension, while rpm2targz creates an archive with a .tar.gz extension.


18.3 Making Packages

Making Slackware packages can be either easy or difficult. There is no specific method for building a package. The only requirement is that the package be a tar gzipped file and if there is a postinstallation script, it must be /install/doinst.sh.

If you are interested in making packages for your system or for a network that you manage, you should have a look at the various build scripts in the Slackware source tree. There are several methods we use for making packages.


18.3.1 explodepkg

explodepkg(8) will do the same thing that installpkg does to extract the package, but it doesn’t actually install it and it doesn’t record it in the packages database. It simply extracts it to the current directory.

If you look at the Slackware source tree, you will see how we use this command for “framework” packages. These packages contain a skeleton of what the final package will look like. They hold all the necessary filenames (zero-length), permissions, and ownerships. The build script will cat the package contents from the source directory to the package build directory.


18.3.2 makepkg

makepkg(8) will package up the current directory into a valid Slackware package. It will search the tree for any symbolic links and add a creation block to the postinstallation script for creating them during the package install. It also warns of any zero-length files in the package tree.

This command is typically run after you have created your package tree.


18.3.3 SlackBuild Scripts

Slackware packages are built in many different ways by necessity. Not all software packages are written by their programmers to compile the same way. Many have compile time options that are not all included in the packages Slackware uses. Perhaps you need some of this functionality; you’ll need to compile your own package then. Fortunately for many Slackware packages, you can find SlackBuild scripts in the package’s source code.

So what is a SlackBuild script? SlackBuild scripts are executable shell scripts that you run as root to configure, compile, and create Slackware packages. You can freely modify these scripts in the source directory and run them to create your own versions of the default Slackware packages.


18.4 Making Tags and Tagfiles (for setup)

The Slackware setup program handles installation of the software packages on your system. There are files that tell the setup program which packages must be installed, which ones are optional, and which ones are selected by default by the setup program.

A tagfile is in the first software series directory and is called tagfile. It lists the packages in that particular disk set and their status. The status can be:

Table 18-3. Tagfile Status Options

Option

Meaning

ADD

The package is required for proper system operation

SKP

The package will be automatically skipped

REC

The package is not required, but recommended

OPT

The package is optional

The format is simply:

package_name: status

One package per line. The original tagfiles for each software series are stored as tagfile.org. So if you mess up yours, you can restore the original one.

Many administrators prefer writing their own tagfiles and starting the installer and selecting “full”. The setup program will read the tagfiles and perform the installation according to their contents. If you use REC or OPT, a dialog box will be presented to the user asking whether or not they want a particular package. Therefore, it is recommended that you stick with ADD and SKP when writing tagfiles for automated installs.

Just make sure your tagfiles are written to the same location as the originals. Or you can specify a custom tagfile path if you have custom tagfiles.

Tags: archive, database, manage, pop, redhat, slackware, Slackware Linux Essentials, software

Related posts

Slackware Linux Essentials , , , , , ,

Slackware Linux Essentials - Chapter 17 Emacs

January 5th, 2009

While vi (with its clones) is without a doubt the most ubiquitous editor on Unix-like systems, Emacs comes in a good second. Instead of using different “modes”, like vi does, it uses Control and Alt key combinations to enter commands, in much the same way that you can use Control and Alt key combinations in a word processor and indeed in many other applications to execute certain functions. (Though it should be noted that the commands rarely correspond; so while many modern applications use Ctrl-C/ X/ V for copying, cutting and pasting, Emacs uses different keys and actually a somewhat different mechanism for this.)

Also unlike vi, which is an (excellent) editor and nothing more, Emacs is a program with near endless capabilities. Emacs is (for the most part) written in Lisp, which is a very powerful programming language that has the peculiar property that every program written in it is automatically a Lisp compiler of its own. This means that the user can extend Emacs, and in fact write completely new programs “in Emacs”.

As a result, Emacs is not just an editor anymore. There are many add-on packages for Emacs available (many come with the program’s source) that provide all sorts of functionality. Many of these are related to text editing, which is after all Emacs’ basic task, but it doesn’t stop there. There are for example several spreadsheet programs for Emacs, there are databases, games, mail and news clients (the top one being Gnus), etc.

There are two main versions of Emacs: GNU Emacs (which is the version that comes with Slackware) and XEmacs. The latter is not a version for Emacs running under X. In fact, both Emacs and XEmacs run on the console as well as under X. XEmacs was once started as a project to tidy up the Emacs code. Currently, both versions are being actively developed, and there is in fact much interaction between the two development teams. For the present chapter, it is immaterial whether you use Emacs or XEmacs, the differences between them are not relevant to the normal user.


17.1 Starting emacs

Emacs can be started from the shell by simply typing emacs. When you are running X, Emacs will (normally) come up with its own X window, usually with a menu bar at the top, where you can find the most important functions. On startup, Emacs will first show a welcome message, and then after a few seconds will drop you in the *scratch* buffer. (See Section 17.2.)

You can also start Emacs on an existing file by typing

% emacs /etc/resolv.conf

This will cause Emacs to load the specified file when it starts up, skipping the welcome message.


17.1.1 Command Keys

As mentioned above, Emacs uses Control and Alt combinations for commands. The usual convention is to write these with C-letter and M-letter, respectively. So C-x means Control+x, and M-x means Alt+x. (The letter M is used instead of A because originally the key was not the Alt key but the Meta key. The Meta key has all but disappeared from computer keyboards, and in Emacs the Alt key has taken over its function.)

Many Emacs commands consist of sequences of keys and key combinations. For example, C-x C-c (that is Control-x followed by Control-c ) quits Emacs, C-x C-s saves the current file. Keep in mind that C-x C-b is not the same as C-x b. The former means Control-x followed by Control-b, while the latter means Control-x followed by just ‘b‘.


17.2 Buffers

In Emacs, the concept of “buffers” is essential. Every file that you open is loaded into its own buffer. Furthermore, Emacs has several special buffers, which do not contain a file but are used for other things. Such special buffers usually have a name that starts and ends with an asterisk. For example, the buffer that Emacs shows when it is first started, is the so-called *scratch* buffer. In the *scratch* buffer, you can type text in the normal way, but text that is typed there is not saved when Emacs is closed.

There is one other special buffer you need to know about, and that is the minibuffer. This buffer consists of only one line, and is always on the screen: it is the very last line of the Emacs window, below the status bar for the current buffer. The minibuffer is where Emacs shows messages for the user, and it is also the place where commands that require some user input are executed. For example, when you open a file, Emacs will ask for its name in the minibuffer.

Switching from one buffer to another can be done with the command C-x b. This will prompt you for the name of a buffer (a buffer’s name is usually the name of the file you are editing in it), and it gives a default choice, which is normally the buffer that you were in before you switched to or created the current buffer. Just hitting Enter will switch to that default buffer.

If you want to switch to another buffer than the default offered by Emacs, just type its name. Note that you can use so-called Tab-completion here: type the first few letters of the buffer’s name and hit Tab; Emacs will then complete the name of the buffer. Tab completion works everywhere in Emacs where it makes sense.

You can get a list of open buffers by hitting C-x C-b. This command will usually split the screen in two, displaying the buffer you were working in in the top half, and a new buffer called *Buffer List* in the bottom half. This buffer contains a list of all the buffers, their sizes and modes, and the files, if any, that those buffers are visiting (as it is called in Emacs). You can get rid of this split screen by typing C-x 1.

Note

Under X, the list of buffers is also available in the Buffer menu in the menu bar.


17.3 Modes

Every buffer in Emacs has an associated mode. This mode is very different from the idea of modes in vi: a mode tells you what kind of buffer you are in. For example, there is text-mode for normal text files, but there are also modes such as c-mode for editing C programs, sh-mode for editing shell scripts, latex-mode for editing LaTeX files, mail-mode for editing email and news messages, etc. A mode provides special customizations and functionality that is useful for the kind of file you are editing. It is even possible for a mode to redefine keys and key commands. For example, in Text mode, the Tab key simply jumps to the next tab stop, but in many programming language modes, the Tab key indents the current line according to the depth of the block that line is in.

The modes mentioned above are called major modes. Each buffer has exactly one major mode. Additionally, a buffer can have one or more minor modes. A minor mode provides additional features that may be useful for certain editing tasks. For example, if you hit the INSERT key, you invoke overwrite-mode, which does what you’d expect. There is also an auto-fill-mode, which is handy in combination with text-mode or latex-mode: it causes each line that you type to be automatically wrapped once the line reaches a certain number of characters. Without auto-fill-mode, you have to type M-q to fill out a paragraph. (Which you can also use to reformat a paragraph after you’ve edited some text in it and it is no longer nicely filled out.)


17.3.1 Opening files

To open a file in Emacs, type

C-x C-f

Emacs will ask you for the name of the file, filling in some default path for you (which is usually ~/ ). After you type the filename (you can use Tab completion) and hit ENTER , Emacs will open the file in a new buffer and display that buffer on the screen.

Note

Emacs will automatically create a new buffer, it will not load the file into the current buffer.

In order to create a new file in emacs, you cannot just go typing right away. You first have to create a buffer for it, and come up with a filename. You do this by typing C-x C-f and typing a filename, just as if you were opening an existing file. Emacs will notice that the file you typed doesn’t exist, and will create a new buffer and report “(New file)” in the minibuffer.

When you type C-x C-f and then enter a directory name instead of a filename, Emacs will create a new buffer in which you will find a list of all the files in that directory. You can move the cursor to the file that you are looking for and type , and Emacs will open it. (There are in fact a lot more actions you can perform here, such as deleting, renaming and moving files, etc. Emacs is now in dired-mode, which is basically a simple file manager.)

When you have typed C-x C-f and suddenly change your mind, you can type C-g to cancel the action. C-g works almost everywhere where you want to cancel an action or command that you’ve started but don’t want to finish.


17.4 Basic Editing

When you have opened a file, you can of course move around in it with the cursor. The cursor keys and PgUp, PgDn do what you’d expect. Home and End jump to the beginning and end of the line. (In older versions, they would actually jump to the beginning and end of the buffer.) However, there are also Control and Meta (Alt) key combos that move the cursor around. Because you do not need to move your hands to another part of the keyboard for these, they are much quicker once you get used to them. The most important such commands are listed in Table 17-1.

Table 17-1. Basic Emacs Editing Commands

Command

Result

C-b

go one character back

C-f

go one character forward

C-n

go one line down

C-p

go one line up

C-a

go to the beginning of the line

C-e

go to the end of the line

M-b

go one word back

M-f

go one word forward

M-}

go one paragraph forward

M-{

go one paragraph backward

M-a

go one sentence backward

M-e

go one sentence forward

C-d

delete the character under the cursor

M-d

delete until the end of the current word

C-v

go down one screen (i.e., PgDn)

M-v

go up one screen (i.e., PgUp)

M-<

go to the beginning of the buffer

M->

go to the end of the buffer

C-_

undo the last change (can be repeated); note that you actually have to type Shift+Control+hyphen for this.

C-k

delete to end of line

C-s

forward search

C-r

backward search

Note that many Meta commands are parallel to the Control commands except that they operate on larger units: while C-f goes forward one character, M-f goes forward an entire word, etc.

Also note that M-< and M-> require you to type Shift+Alt+comma and Shift+Alt+dot respectively, since < and > are on Shift+comma and Shift+dot. (Unless of course you have a different keyboard layout from the standard US layout.)

Note that C-k deletes (kills, as it is commonly called) all the text after the cursor to the end of the line, but doesn’t delete the line itself (i.e., it doesn’t delete the final newline). It only deletes the line if there was no text after the cursor. In other words, in order to delete a complete line, you have to put the cursor at the beginning of the line, and then hit C-k twice: once to delete the text on the line, once to delete the line itself.


17.5 Saving Files

In order to save a file, you type

C-x C-s

Emacs will not ask you for a filename, the buffer will just be saved to the file it was loaded from. If you want to save your text to another file, type

C-x C-w

When you save the file for the first time in this session, Emacs will normally save the old version of your file to a backup file, which has the same name appended with a tilde: so if you’re editing a file “cars.txt”, Emacs will create a backupcars.txt~”.

This backup file is a copy of the file that you opened. While you are working, Emacs will also regularly create an auto-save copy of the work you are doing, to a file named with hash signs: #cars.txt#. This backup is deleted when you save the file with C-x C-s.

When you are done editing a file, you can kill the buffer that holds it by typing

C-x k

Emacs will then ask you which buffer you want to kill, with the current buffer as default, which you can select by hitting ENTER. If you haven’t saved your file yet, Emacs will ask you if you really want to kill the buffer.


17.5.1 Quitting Emacs

When you are done with Emacs altogether, you can type

C-x C-c

This quits Emacs. If you have any unsaved files, Emacs will tell you so, and ask if you want to save them each in turn. If you answer no to any of these, Emacs will ask for one final confirmation and then quit.

Tags: backup, database, email, file manager, manage, slackware, Slackware Linux Essentials

Related posts

Slackware Linux Essentials , , , , ,