Commit Graph

37 Commits

Author SHA1 Message Date
Gustavo Zacarias
f785130d68 sysvinit/inittab: adjust shutdown
The previous shutdown sequence was basically a no-op, it did't call rcK
to stop anything and dumped users back into shell.
So do the proper thing by calling rcK for levels 0 (halt) and 6
(reboot), then swapoff, then remount ro.
After that call halt for 0 and reboot for 6.

Also make 3 the default runlevel as in normal distributions, for all
intents and purposes it changes nothing except aesthetics/convention.

And make the labels a context sequence rather than just a short form
of the actions which IMHO looks horrible.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-11-20 23:09:44 +01:00
Gustavo Zacarias
11ed528660 package/sysvinit: drop tty1/2
We don't do it for busybox init so do the same for consistency here.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-11-14 14:35:49 +01:00
Karoly Kasza
9e20ec86b2 package/*: move download URLs to snapshot.debian.org
Signed-off-by: Karoly Kasza <kaszak@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-25 11:25:23 +02:00
Fabio Porcedda
1586ce3a3d apply-patches.sh: Use the "APPLY_PATCHES" variable to call the script
To easy up adding optional parameters when calling the
"apply-patches.sh" add and use the "APPLY_PATCHES" variable to execute
the script.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-25 01:31:32 +02:00
Gustavo Zacarias
bcb835b042 system/inittab: update to fix bug #7442
Update inittabs (skeleton/busybox & sysvinit) to remove the trailing
REMOUNT_ROOTFS_RW comment used as magic string in system/system.mk to
enable/disable remounting the root filesystem rw or not since it affects
sysvinit in doing so properly as reported in bug #7442.

Instead update the sed expressions to match clean non-commented strings
by searching for "-o remount,rw /" and checking that's the end of the
line as well to avoid affecting possibly other remounts that a user can
have in a custom inittab.

Long-term the startup block of inittab should just move to a S00sysinit
script or similar so that rcS can pick it up directly.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-25 01:24:11 +02:00
Gustavo Zacarias
d61c8d73d4 package/sysvinit: don't start logging
Don't try to start logging from /etc/inittab because busybox installs a
S01logging script that handles that and can lead to duplicate logging
processes.
Let's handle the logging in each package that provides it since we can
get multiple variants in the future like syslog-ng that have different
initialization routines.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-12 13:00:48 +02:00
Thomas De Schampheleire
f268f7131b .mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 15:00:28 +02:00
Maxime Hadjinlian
c962338070 packages: replace command install by $(INSTALL)
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-08 17:56:54 +02:00
Simon Dawson
0be303cacc replace references to Busybox with BusyBox
The correct capitalised form appears to be "BusyBox" rather than "Busybox";
fix all references to the latter form. (Most such references occur in the
manual and in commentary in package makefiles.)

Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-06-01 23:58:43 +02:00
eric.le.bihan.dev@free.fr
3124d6a472 sysvinit: depend on SysV selected as init system.
In order to prevent sysvinit and systemd to be selected at the same
time, sysvinit can now only be selected if SysV is chosen as init
system.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-13 23:27:24 +01:00
Thomas De Schampheleire
3d86d29bf0 packages: remove package clean commands
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-08 19:42:34 +01:00
Ryan Barnett
21ef3200ef sysvinit: install new cmds and fix inittab
Adding support for sysvinit to install reboot, poweroff, and pidof
commands available in /sbin.

Fixes bug #6620

Removed uninstall commands since they aren't used.

There is an error with sysvinit that will prevent the system from booting
if "dshm::sysinit:/bin/mkdir -p /dev/shm" is not present in the inittab.

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-11-01 15:42:37 +01:00
Phil Eichinger
991cf48a18 sysvinit: add license information
Signed-off-by: Phil Eichinger <phil@zankapfel.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-22 15:54:55 +02:00
Alexandre Belloni
8dfd59d114 Normalize separator size to 80
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-06 22:30:24 +02:00
Alexandre Belloni
702704014d Fix package headers to comply with coding style
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-06 17:26:35 +02:00
Arnout Vandecappelle (Essensium/Mind)
f5e3178197 sysvinit: fix linking of sulogin with -lcrypt
The LCRYPT variable is no longer used; use SULOGINLIBS instead.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-14 23:21:57 +02:00
Arnout Vandecappelle (Essensium/Mind)
e1502ebc0c all packages: rename XXXTARGETS to xxx-package
Also remove the redundant $(call ...).

This is a purely mechanical change, performed with
find package linux toolchain boot -name \*.mk | \
  xargs sed -i -e 's/$(eval $(call GENTARGETS))/$(eval $(generic-package))/' \
               -e 's/$(eval $(call AUTOTARGETS))/$(eval $(autotools-package))/' \
               -e 's/$(eval $(call CMAKETARGETS))/$(eval $(cmake-package))/'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 20:23:05 +02:00
Thomas Petazzoni
0849e8193e package: remove useless arguments from GENTARGETS
Thanks to the pkgparentdir and pkgname functions, we can rewrite the
GENTARGETS macro in a way that avoids the need for each package to
repeat its name and the directory in which it is present.

[Peter: pkgdir->pkgparentdir]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-29 23:09:58 +02:00
Thomas Petazzoni
59a326b934 support: move patch-kernel.sh and rename it
The name "patch-kernel.sh" is a bit stupid, since this script is used
to patch everything in Buildroot, not only kernel trees.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-17 08:15:32 +02:00
Milton Soares Filho
ffe62f915d sysvinit: package name typo
This fails when Make decides to process sysvinit targets before busybox.

Signed-off-by: Milton Soares Filho <milton.soares.filho@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-12 09:11:39 +02:00
Luca Ceresoli
36b4b852ee fs/skeleton: allow rootfs not to be remounted read-write
[Peter: prefix option with TARGET_GENERIC_]
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-10 22:44:24 +02:00
Peter Korsgaard
31a1995ac3 sysvinint: bump Debian patch
-13 patch no longer available on the Debian mirrors.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-26 11:16:46 +01:00
Martin Banky
7e2bf63080 sysvint: convert to gentargets and bump to 2.88
Also, changed the site to Debian, to get the latest patches

[ Thomas: add inittab compatible with sysvinit. Minor fixes. ]

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-14 00:22:25 +01:00
Thomas Petazzoni
311e0a6fc4 sysvinit: remove unneeded dependency on ncurses
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-08-24 15:05:20 +02:00
Thomas Petazzoni
d3de556d28 sysvinit: make sure to link against libcrypt
sysvinit Makefile checks if /usr/lib/libcrypt.a exists to determine
whether it should link against libcrypt or not. This test fails on
distributions such as Fedora, in which /usr/lib/libcrypt.a does not
exist (it is in /usr/lib64), but where libcrypt is available on the
target. As libcrypt is available in both uClibc and gclibc, we just
force sysvinit to link against libcrypt.

Fixes bug #2401.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-08-24 15:05:20 +02:00
Thomas Petazzoni
a1c8fa41f6 Update all packages to quote $(TARGET_CC)
Now that TARGET_CC contains several space-separated words, it must be
used quoted everywhere.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:20:21 +02:00
Will Newton
422ce6536b package: Remove unnecessary dependencies on uclibc.
A C library will have been built by the toolchain makefiles, so there is no
need for packages to explicitly depend on uclibc.

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-09-03 20:22:38 +02:00
Peter Korsgaard
4a7bfd2775 package/: convert to DOWNLOAD helper 2009-01-16 11:42:52 +00:00
Peter Korsgaard
ac1d92c425 package/: get rid of unneeded $(strip ..) 2008-12-08 08:15:27 +00:00
Peter Korsgaard
4683420c4c Kconfig: remove 'default n'
'default n' is the default, so there's no need to say it explicitly.
2008-07-17 20:01:44 +00:00
Bernhard Reutner-Fischer
956d3eb78b - semicolon touchup. No other changes 2007-08-22 09:56:41 +00:00
Ulf Samuelsson
3a18b7b9f7 Avoid repeated rebuilds of 'sysvinit' 2007-07-17 17:07:33 +00:00
Ulf Samuelsson
e1621a4a2a Use <package>_VERSION in all <package>.mk instead of <package>_VER 2007-07-11 14:06:06 +00:00
Bernhard Reutner-Fischer
701d2aea93 - escape wildcards in kernel-patch patterns 2007-06-20 13:25:44 +00:00
Bernhard Reutner-Fischer
ec5b83ce2f - add missing package-source targets
- add missing dependencies to build prerequisites in the config system
2007-01-03 13:44:01 +00:00
Bernhard Reutner-Fischer
6342c83201 - use $(ZCAT) as configured by the user instead of hardcoded 'zcat' that may not exist; Closes #971
Silly, unchecked sed -i -e "/[^b]zcat/s/zcat/\$\(ZCAT\)/g" $(svngrep "[^b]zcat" * -rl | grep -v Config.in)
2006-10-01 15:17:52 +00:00
Mike Frysinger
9c5bb0ec4a import sysvinit package 2005-12-13 05:01:49 +00:00