glfs/general/sysutils/fcron.xml
Pierre Labastie e1e58be454 Remove all ftp urls
neither firefox nor epiphany can download them, and they are not
well maintained, because rarely tested.
This is WIP because the "(HTTP)" part of "Download (HTTP)" will
need to be removed too.
But let's see what users think first...
2023-10-15 21:43:08 +02:00

486 lines
16 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY fcron-download-http "http://fcron.free.fr/archives/fcron-&fcron-version;.src.tar.gz">
<!ENTITY fcron-download-ftp " ">
<!ENTITY fcron-md5sum "bd4996e941a40327d11efc5e3fd1f839">
<!ENTITY fcron-size "587 KB">
<!ENTITY fcron-buildsize "5.1 MB">
<!ENTITY fcron-time "0.1 SBU">
]>
<sect1 id="fcron" xreflabel="Fcron-&fcron-version;">
<?dbhtml filename="fcron.html"?>
<title>Fcron-&fcron-version;</title>
<indexterm zone="fcron">
<primary sortas="a-Fcron">Fcron</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Fcron</title>
<para>
The <application>Fcron</application> package contains a periodical
command scheduler which aims at replacing <application>Vixie
Cron</application>.
</para>
&lfs120_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&fcron-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&fcron-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &fcron-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &fcron-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &fcron-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &fcron-time;
</para>
</listitem>
</itemizedlist>
<!--
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Required patch:
<ulink url="&patch-root;/fcron-&fcron-version;-sendmail_upstream-1.patch"/>
</para>
</listitem>
</itemizedlist>
-->
<bridgehead renderas="sect3">Fcron Dependencies</bridgehead>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
An <xref linkend="server-mail"/>,
<ulink url="../postlfs/editors.html">text editor</ulink> (default is
<command>vi</command> from the <xref linkend="vim"/> package),
<xref linkend="linux-pam"/>, and
<xref linkend="docbook-utils"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of Fcron</title>
<para id="fcron-syslog" revision="sysv">
<application>Fcron</application>
uses the cron facility of <command>syslog</command> to log all messages.
Since LFS does not set up this facility in
<filename>/etc/syslog.conf</filename>, it needs to be done prior to
installing <application>Fcron</application>. This command will append the
necessary line to the current <filename>/etc/syslog.conf</filename>
(perform as the <systemitem class='username'>root</systemitem> user):
</para>
<indexterm zone="fcron fcron-syslog" revision="sysv">
<primary sortas="e-etc-syslog.conf">/etc/syslog.conf</primary>
</indexterm>
<screen role="root" revision="sysv"><userinput>cat &gt;&gt; /etc/syslog.conf &lt;&lt; "EOF"
<literal># Begin fcron addition to /etc/syslog.conf
cron.* -/var/log/cron.log
# End fcron addition</literal>
EOF</userinput></screen>
<para revision="sysv">
The configuration file has been modified, so reloading the
<command>sysklogd</command> daemon will activate the changes (again as
the <systemitem class='username'>root</systemitem> user).
</para>
<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/sysklogd reload</userinput></screen>
<para>
For security reasons, an unprivileged user and group for
<application>Fcron</application> should be created (perform as the
<systemitem class='username'>root</systemitem> user):
</para>
<screen role="root"><userinput>groupadd -g 22 fcron &amp;&amp;
useradd -d /dev/null -c "Fcron User" -g fcron -s /bin/false -u 22 fcron</userinput></screen>
<para>
Now fix some locations hard coded in the documentation:
</para>
<screen><userinput>find doc -type f -exec sed -i 's:/usr/local::g' {} \;</userinput></screen>
<para>
Install <application>Fcron</application> by running the following
commands:
</para>
<screen revision="sysv"><userinput>./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--without-sendmail \
--with-boot-install=no \
--with-systemdsystemunitdir=no &amp;&amp;
make</userinput></screen>
<screen revision="systemd"><userinput>./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--without-sendmail \
--with-piddir=/run \
--with-boot-install=no &amp;&amp;
make</userinput></screen>
<para>
This package does not come with a test suite.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install</userinput></screen>
<para>
DESTDIR install must be done as <systemitem
class="username">root</systemitem> user. Furthermore, if PAM
configuration files should be installed in <filename class="directory">
/etc/pam.d</filename>, you have to create this directory in the
DESTDIR before doing the install.
</para>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<!--
<para>
<command>autoconf</command>: This command is required to rebuild
<filename>configure</filename> using the fixed input file.
</para>-->
<para>
<parameter>--without-sendmail</parameter>: By default,
<application>Fcron</application> will attempt to use the
<command>sendmail</command> command from an <xref linkend="server-mail"/>
package to email you the results of the <command>fcron</command> script.
This switch is used to disable default email notification. Omit the
switch to enable the default. Alternatively, you can use the
<option>--with-sendmail=<replaceable>&lt;/path/to/MTA
command&gt;</replaceable></option> to use a different mailer command.
</para>
<para>
<parameter>--with-boot-install=no</parameter>: This prevents
installation of the bootscript included with the package.
</para>
<para revision="systemd">
<parameter>--with-piddir=/run</parameter>:
This fixes the systemd unit to use the proper directory for PID files so
that systemctl does not hang and the unit starts correctly.
</para>
<para revision="sysv">
<parameter>--with-systemdsystemunitdir=no</parameter>:
This prevents building the <application>systemd</application> units,
which are not needed for a <application>SYS V</application> system.
</para>
<para>
<option>--with-editor=<replaceable>&lt;/path/to/editor&gt;</replaceable></option>:
This switch allows you to set the default text editor.
</para>
<para>
<option>--with-dsssl-dir=<replaceable>&lt;/path/to/dsssl-stylesheets&gt;</replaceable></option>:
May be used if you have <xref linkend="docbook-utils"/> installed.
Currently, the dsssl stylesheets are located at
<filename class="directory">/usr/share/sgml/docbook/dsssl-stylesheets-1.79</filename>.
</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Fcron</title>
<sect3 id="fcron-config">
<title>Config Files</title>
<para>
<filename>/etc/fcron.conf</filename>,
<filename>/etc/fcron.allow</filename>, and
<filename>/etc/fcron.deny</filename>
</para>
<indexterm zone="fcron fcron-config">
<primary sortas="e-etc-fcron.conf">/etc/fcron.conf</primary>
</indexterm>
<indexterm zone="fcron fcron-config">
<primary sortas="e-etc-fcron.allow">/etc/fcron.allow</primary>
</indexterm>
<indexterm zone="fcron fcron-config">
<primary sortas="e-etc-fcron.deny">/etc/fcron.deny</primary>
</indexterm>
</sect3>
<sect3 id="run-parts" xreflabel="Fcron Configuration Information">
<title>Configuration Information</title>
<para>
There are no required changes in any of the config files.
Configuration information can be found in the man page for
<filename>fcron.conf</filename>.
</para>
<para>
<command>fcron</command> scripts are written using
<command>fcrontab</command>. Refer to the <command>fcrontab</command>
man page for proper parameters to address your situation.
</para>
<para id="fcron-pam">
If <application>Linux-PAM</application> is installed, two PAM
configuration files are installed in <filename class='directory'>
etc/pam.d</filename>. Alternatively if <filename class='directory'>
etc/pam.d</filename> is not used, the installation will append two
configuration sections to the existing <filename>/etc/pam.conf
</filename> file. You should ensure the files match your preferences.
Modify them as required to suit your needs.
</para>
<indexterm zone="fcron fcron-pam">
<primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
</indexterm>
<indexterm zone="fcron fcron-pam">
<primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
</indexterm>
<bridgehead renderas="sect4">Periodic Jobs</bridgehead>
<para>
If you would like to set up a periodic hierarchy for the root user,
first issue the following commands (as the
<systemitem class="username">root</systemitem> user) to create the
<filename>/usr/bin/run-parts</filename> script:
</para>
<screen role="root"><userinput>cat &gt; /usr/bin/run-parts &lt;&lt; "EOF" &amp;&amp;
<literal>#!/bin/sh
# run-parts: Runs all the scripts found in a directory.
# from Slackware, by Patrick J. Volkerding with ideas borrowed
# from the Red Hat and Debian versions of this utility.
# keep going when something fails
set +e
if [ $# -lt 1 ]; then
echo "Usage: run-parts &lt;directory&gt;"
exit 1
fi
if [ ! -d $1 ]; then
echo "Not a directory: $1"
echo "Usage: run-parts &lt;directory&gt;"
exit 1
fi
# There are several types of files that we would like to
# ignore automatically, as they are likely to be backups
# of other scripts:
IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
# Main loop:
for SCRIPT in $1/* ; do
# If this is not a regular file, skip it:
if [ ! -f $SCRIPT ]; then
continue
fi
# Determine if this file should be skipped by suffix:
SKIP=false
for SUFFIX in $IGNORE_SUFFIXES ; do
if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
SKIP=true
break
fi
done
if [ "$SKIP" = "true" ]; then
continue
fi
# If we've made it this far, then run the script if it's executable:
if [ -x $SCRIPT ]; then
$SCRIPT || echo "$SCRIPT failed."
fi
done
exit 0</literal>
EOF
chmod -v 755 /usr/bin/run-parts</userinput></screen>
<para>
Next, create the directory layout for the periodic jobs (again as the
<systemitem class="username">root</systemitem> user):
</para>
<screen role="root"><userinput>install -vdm754 /etc/cron.{hourly,daily,weekly,monthly}</userinput></screen>
<para>
Finally, add the <command>run-parts</command> to the system fcrontab
(while still the <systemitem class="username">root</systemitem> user):
</para>
<screen role="root"><userinput>cat &gt; /var/spool/fcron/systab.orig &lt;&lt; "EOF"
<literal>&amp;bootrun 01 * * * * root run-parts /etc/cron.hourly
&amp;bootrun 02 4 * * * root run-parts /etc/cron.daily
&amp;bootrun 22 4 * * 0 root run-parts /etc/cron.weekly
&amp;bootrun 42 4 1 * * root run-parts /etc/cron.monthly</literal>
EOF</userinput></screen>
</sect3>
<sect3 id="fcron-init">
<title><phrase revision="sysv">Boot Script</phrase>
<phrase revision="systemd">Systemd Unit</phrase></title>
<para revision="sysv">
Install the
<filename>/etc/rc.d/init.d/fcron</filename> init script from the
<xref linkend="bootscripts"/> package.
</para>
<para revision="systemd">
Enable <application>fcron</application> to start
at boot using the previously installed systemd unit.
</para>
<indexterm zone="fcron fcron-init">
<primary sortas="f-fcron">fcron</primary>
</indexterm>
<screen role="root" revision="sysv"><userinput>make install-fcron</userinput></screen>
<screen role="root" revision="systemd"><userinput>systemctl enable fcron</userinput></screen>
<para>
Finally, again as the <systemitem class="username">root</systemitem>
user, start fcron and generate the
<filename>/var/spool/fcron/systab</filename> file:
</para>
<screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/fcron start &amp;&amp;
fcrontab -z -u systab</userinput></screen>
<screen role="root" revision="systemd"><userinput>systemctl start fcron &amp;&amp;
fcrontab -z -u systab</userinput></screen>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>fcron, fcrondyn, fcronsighup, and fcrontab</seg>
<seg>None</seg>
<seg>/usr/share/doc/fcron-&fcron-version; and /var/spool/fcron</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="fcron-prog">
<term><command>fcron</command></term>
<listitem>
<para>
is the scheduling daemon
</para>
<indexterm zone="fcron fcron-prog">
<primary sortas="b-fcron">fcron</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="fcrondyn">
<term><command>fcrondyn</command></term>
<listitem>
<para>
is a user tool intended to interact with a running
<command>fcron</command> daemon
</para>
<indexterm zone="fcron fcrondyn">
<primary sortas="b-fcrondyn">fcrondyn</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="fcronsighup">
<term><command>fcronsighup</command></term>
<listitem>
<para>
instructs <command>fcron</command> to reread the
<application>Fcron</application> tables
</para>
<indexterm zone="fcron fcronsighup">
<primary sortas="b-fcronsighup">fcronsighup</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="fcrontab">
<term><command>fcrontab</command></term>
<listitem>
<para>
is a program used to install, edit, list and remove the
tables used by <command>fcron</command>
</para>
<indexterm zone="fcron fcrontab">
<primary sortas="b-fcrontab">fcrontab</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>