Commit e17a5dbd authored by Ralph Ronnquist's avatar Ralph Ronnquist

Changed into building a single .deb at top level (without fs)

parent ade0d7c1
......@@ -3,28 +3,28 @@ include buildconf.mk
.PHONY: all
all:
$(MAKE) -C vdevd
$(MAKE) -C fs
#$(MAKE) -C fs
$(MAKE) -C vdev-initramfs
$(MAKE) -C hwdb
.PHONY: install
install:
$(MAKE) -C vdevd install
$(MAKE) -C fs install
#$(MAKE) -C fs install
$(MAKE) -C vdev-initramfs install
$(MAKE) -C hwdb install
.PHONY: clean
clean:
$(MAKE) -C vdevd clean
$(MAKE) -C fs clean
# $(MAKE) -C fs clean
$(MAKE) -C vdev-initramfs clean
$(MAKE) -C hwdb clean
.PHONY: uninstall
uninstall:
$(MAKE) -C vdevd uninstall
$(MAKE) -C fs uninstall
# $(MAKE) -C fs uninstall
$(MAKE) -C vdev-initramfs uninstall
$(MAKE) -C hwdb uninstall
......
......@@ -4,9 +4,9 @@ Devuan packaging of vdev - a device-file manager and filesystem
NOTE: this project is a fork of [Jude Nelson's vdev
project](https://git.devuan.org/unsystemd/vdev), which at this point
is an orphaned project. This project is aimed at the preparation of
Devuan packaging of the components.
Devuan packaging.
The resulting packages are:
The components are:
> `libudev1-compat`, which is the library ABI-compatible with
libudev 219.
......@@ -19,24 +19,25 @@ The resulting packages are:
making a manual choice between using vdev or udev as /dev manager.
..... Pick the latest version of each, then install with
Installing vdev will disable any prior `udev`, without unsinstalling
it. However, `vdev` competes with `udev` on three fronts:
+ the library link `libudev-so.1`
+ the scripts for the initrd, and
+ the sysvinit `/etc/rcS.d` scripts.
# dpkg -i *.deb
The current solution deals with these aspects underneath and invisibly
for the Devuan (Debian) package management, rather than straight out
replacing `udev` and `libudev1`. You can, whenever, alternate between
`udev` and `vdev` via (in a terminal):
That will also make a `vdev` choice. You can then, whenever, alternate
between `udev` and `vdev` via (in a terminal):
# /usr/share/vdev/vdev-install.sh udev
or
# /usr/share/vdev/vdev-install.sh dialog
# /usr/share/vdev/vdev-install.sh vdev
Note: `Vdev` competes with `udev` on three fronts: 1) the library link
`libudev-so.1`, 2) the scripts for the initrd, and 3) the sysvinit
`/etc/rcS.d` scripts. The current solution deals with these aspects
underneath and invisibly for the Devuan (Debian) package management,
rather than straight out replacing `udev` and `libudev1`.
Therefore it's probably **safest to always shift to `udev` before
installing** other things. I don't think it's vital, but there are
many possible failure cases, and that is why I give that advice.
It's probably **safest to always shift to `udev` before installing**
other things. I don't think it's vital, but there are many possible
failure cases.
Other Notes
-----------
......@@ -44,5 +45,3 @@ Other Notes
Please refer to [Jude Nelson's vdev
project](https://git.devuan.org/unsystemd/vdev) for an extensive
description of the software.
Packaging of the userspace filesystem, vdevfs, is forthcoming.
LIC=lgpl
EMAIL=ralph.ronnquist@gmail.com
VERSION=1.0beta
VERSION=1.0
ARCH=$(shell uname -r)
HOMEPAGE =
DEBS += vdevd_$(VERSION)_$(ARCH).deb
DEBS += libudev1-compat_$(VERSION)_$(ARCH).deb
DEBS += vdev-initramfs_$(VERSION)_$(ARCH).deb
DEB = vdev_$(VERSION)_$(ARCH).deb
# DEBS += vdevfs_$(VERSION)_$(ARCH).deb
all: $(DEB)
all: $(DEBS)
vdevd_$(VERSION)_$(ARCH).deb:
$(MAKE) -C vdevd -f ../debian.mk deb PACKAGE=vdevd
libudev1-compat_$(VERSION)_$(ARCH).deb:
$(MAKE) -C libudev-compat -f ../debian.mk deb PACKAGE=libudev1-compat
vdev-initramfs_$(VERSION)_$(ARCH).deb:
$(MAKE) -C vdev-initramfs -f ../debian.mk deb PACKAGE=vdev-initramfs
vdevfs_$(VERSION)_$(ARCH).deb:
$(MAKE) -C fs -f ../debian.mk deb PACKAGE=vdevfs
.PHONY: deb
deb:
#dh_make -a -s -n -y -e "$(EMAIL)" -p $(PACKAGE)_$(VERSION) -c $(LIC)
$(DEB):
#dh_make -a -s -n -y -e "$(EMAIL)" -p vdev_$(VERSION) -c $(LIC)
PREFIX= INCLUDE_PREFIX=/usr dpkg-buildpackage -us -uc
The Debian Package vdev
----------------------------
Comments regarding the Package
-- Ralph Ronnquist <ralph.ronnquist@gmail.com> Tue, 17 Jan 2017 20:35:01 +1100
vdev for Debian
---------------
<possible notes regarding this package - if none, delete this file>
-- Ralph Ronnquist <ralph.ronnquist@gmail.com> Tue, 17 Jan 2017 20:35:01 +1100
vdev for Debian
---------------
<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>
-- Ralph Ronnquist <ralph.ronnquist@gmail.com> Tue, 17 Jan 2017 20:35:01 +1100
vdev (1.0) unstable; urgency=low
* Initial release
-- Ralph Ronnquist <ralph.ronnquist@gmail.com> Tue, 17 Jan 2017 20:35:01 +1100
Source: vdev
Section: unknown
Priority: optional
Maintainer: Ralph Ronnquist <ralph.ronnquist@gmail.com>
Build-Depends: debhelper (>= 9)
# vdevfs needs libfuse, libpstat, fskit
Standards-Version: 3.9.5
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://anonscm.debian.org/collab-maint/vdev.git
#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/vdev.git;a=summary
Package: vdev
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A device-file manager and filesystem
Vdev is a portable userspace device-file manager for UNIX-like
operating systems. It differs from existing device-file managers in
that it provides an optional filesystem interface that implements a
per-process view of /dev, thereby giving the host administrator the
means to control device node access based on arbitrary criteria (such
as process session ID, process seat assignment, etc.).
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: vdev
Source: https://git.devuan.org/devuan-packages/vdev
Files: *
Copyright: 2016 Jude Nelson <>
License: LGPL-3.0+
Files: debian/*
Copyright: 2017 Ralph Ronnquist <ralph.ronnquist@gmail.com>
License: LGPL-3.0+
License: LGPL-3.0+
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
.
This package 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
Lesser General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-3".
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
README.md
vdev_1.0_amd64.deb unknown optional
#!/bin/sh
### BEGIN INIT INFO
# Provides: vdev
# Required-Start: $local_fs $network $remote_fs $syslog
# Required-Stop: $local_fs $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <Enter a short description of the software>
# Description: <Enter a long description of the software>
# <...>
# <...>
### END INIT INFO
# Author: Ralph Ronnquist <ralph.ronnquist@gmail.com>
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="vdev"
NAME=vdev
DAEMON=/usr/sbin/vdev
DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# The above code will not work for interpreted scripts, use the next
# six lines below instead (Ref: #643337, start-stop-daemon(8) )
#start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON \
# --name $NAME --test > /dev/null \
# || return 1
#start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON \
# --name $NAME -- $DAEMON_ARGS \
# || return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:
.\" Hey, EMACS: -*- nroff -*-
.\" (C) Copyright 2017 Ralph Ronnquist <ralph.ronnquist@gmail.com>,
.\"
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH VDEV SECTION "January 17, 2017"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
vdev \- program to do something
.SH SYNOPSIS
.B vdev
.RI [ options ] " files" ...
.br
.B bar
.RI [ options ] " files" ...
.SH DESCRIPTION
This manual page documents briefly the
.B vdev
and
.B bar
commands.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
\fBvdev\fP is a program that...
.SH OPTIONS
These programs follow the usual GNU command line syntax, with long
options starting with two dashes (`-').
A summary of options is included below.
For a complete description, see the Info files.
.TP
.B \-h, \-\-help
Show summary of options.
.TP
.B \-v, \-\-version
Show version of program.
.SH SEE ALSO
.BR bar (1),
.BR baz (1).
.br
The programs are documented fully by
.IR "The Rise and Fall of a Fooish Bar" ,
available via the Info system.
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!-- Process this file with docbook-to-man to generate an nroff manual
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
less'. A typical entry in a Makefile or Makefile.am is:
manpage.1: manpage.sgml
docbook-to-man $< > $@
The docbook-to-man binary is found in the docbook-to-man package.
Please remember that if you create the nroff version in one of the
debian/rules file targets (such as build), you will need to include
docbook-to-man in your Build-Depends control field.
-->
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
<!ENTITY dhsurname "<surname>SURNAME</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>January 17, 2017</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>SECTION</manvolnum>">
<!ENTITY dhemail "<email>ralph.ronnquist@gmail.com</email>">
<!ENTITY dhusername "Ralph Ronnquist">
<!ENTITY dhucpackage "<refentrytitle>VDEV</refentrytitle>">
<!ENTITY dhpackage "vdev">
<!ENTITY debian "<productname>Debian</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
]>
<refentry>
<refentryinfo>
<address>
&dhemail;
</address>
<author>
&dhfirstname;
&dhsurname;
</author>
<copyright>
<year>2003</year>
<holder>&dhusername;</holder>
</copyright>
&dhdate;
</refentryinfo>
<refmeta>
&dhucpackage;
&dhsection;
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>program to do something</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&dhpackage;</command>
<arg><option>-e <replaceable>this</replaceable></option></arg>
<arg><option>--example <replaceable>that</replaceable></option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>This manual page documents briefly the
<command>&dhpackage;</command> and <command>bar</command>
commands.</para>
<para>This manual page was written for the &debian; distribution
because the original program does not have a manual page.
Instead, it has documentation in the &gnu;
<application>Info</application> format; see below.</para>
<para><command>&dhpackage;</command> is a program that...</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<para>These programs follow the usual &gnu; command line syntax,
with long options starting with two dashes (`-'). A summary of
options is included below. For a complete description, see the
<application>Info</application> files.</para>
<variablelist>
<varlistentry>
<term><option>-h</option>
<option>--help</option>
</term>
<listitem>
<para>Show summary of options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option>
<option>--version</option>
</term>
<listitem>
<para>Show version of program.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>bar (1), baz (1).</para>
<para>The programs are documented fully by <citetitle>The Rise and
Fall of a Fooish Bar</citetitle> available via the
<application>Info</application> system.</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>This manual page was written by &dhusername; &dhemail; for
the &debian; system (and may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the &gnu; General Public License, Version 2 any
later version published by the Free Software Foundation.
</para>
<para>
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
This diff is collapsed.
?package(vdev):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
title="vdev" command="/usr/bin/vdev"
#!/bin/sh
# postinst script for vdevd
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
/lib/vdev/gen-ifnames.sh >> /etc/vdev/ifnames.conf
# Capture important udev files for later restoration
tar czf $UDEVTGZ -C $IT init $(find $IT -name udev -printf '%P ')
# Chose vdev
/usr/share/vdev/vdev-install.sh vdev
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# postinst script for vdev
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in