Synchronize package with tizen 3.0 02/16902/1
authorJacek Bukarewicz <j.bukarewicz@samsung.com>
Wed, 26 Feb 2014 09:10:24 +0000 (10:10 +0100)
committerJacek Bukarewicz <j.bukarewicz@samsung.com>
Wed, 26 Feb 2014 09:30:37 +0000 (10:30 +0100)
Some features provided by system-plugin-mount are redundant. In particular:
- /lib/modules is provided by filesystem package
- /etc/fstab file is generated on image creation (setup-mobile package)
- /etc/inittab and /etc/rc.d/* files are not used anymore
- resizing filesystems on boot is going to be reworked

Change-Id: Ia60f6151d3fbb2bf2e3b2e4f75be0e4ce22e420a
Signed-off-by: Jacek Bukarewicz <j.bukarewicz@samsung.com>
etc/fstab [deleted file]
etc/inittab [deleted file]
etc/rc.d/rc.firstboot [deleted file]
etc/rc.d/rc.shutdown [deleted file]
etc/rc.d/rc.sysinit [deleted file]
mount-generator.pl [deleted file]
packaging/system-plugin-slp.spec
usr/lib/systemd/system/resize2fs-root.service [deleted file]
usr/lib/systemd/system/resize2fs@.service [deleted file]

diff --git a/etc/fstab b/etc/fstab
deleted file mode 100755 (executable)
index 99cf69f..0000000
--- a/etc/fstab
+++ /dev/null
@@ -1,15 +0,0 @@
-#<file system> <mount point>   <type>  <options>       <dump>  <pass>
-none           /proc           proc    defaults        0 0
-#none          /dev/pts        devpts  mode=0622       0 0
-tmpfs           /tmp            tmpfs   defaults        0 0
-/opt/var       /var            bind    bind            0 0
-none           /sys            sysfs   defaults        0 0
-
-# For new partition - 2012/08
-/dev/mmcblk0p1 /csa    ext4    defaults        0 2
-/dev/mmcblk0p2 /boot   ext4    defaults        0 2
-/dev/mmcblk0p4 /mnt/csc ext4   defaults,noauto 0 2
-/dev/mmcblk0p5 /       ext4    defaults        0 1
-/dev/mmcblk0p6 /opt    ext4    defaults        0 2
-/dev/mmcblk0p7 /opt/usr ext4   defaults        0 2
-/boot/modules.img      /lib/modules    ext4    loop    0 0
diff --git a/etc/inittab b/etc/inittab
deleted file mode 100755 (executable)
index 300c9e5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#System startup
-si::sysinit:/etc/rc.d/rc.sysinit
-net::once:/etc/rc.d/rc.network
-
-id:1:initdefault:
-
-# Console
-#ttyS0::respawn:/bin/sh
-#command was changed from getty in busybox to agetty in coreutils
-con:12345:respawn:/sbin/agetty -L 115200 ttySAC2 vt100
-#::askfirst:/bin/sh 
-
-#Logging , move to rc.sysinit
-#::sysinit:/bin/cp -rf /var/log/messages /var/log/messages.prev
-#::sysinit:/bin/cp -rf /var/log/messages.0 /var/log/messages.0.prev
-#::sysinit:/bin/touch /var/log/messages
-#::once:/sbin/syslogd
-#::once:/sbin/klogd
-
-#System shutdown
-#ca:12345:ctrlaltdel:/sbin/reboot 
-bye:06:wait:/etc/rc.d/rc.shutdown 
-rebt:6:wait:/sbin/reboot -d -f -i
-
-# Frambuffer Console
-#ttyS1::respawn:/bin/sh
-#tty1::respawn:/bin/sh
-#tty2::respawn:/bin/sh
diff --git a/etc/rc.d/rc.firstboot b/etc/rc.d/rc.firstboot
deleted file mode 100755 (executable)
index 6c7edc2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#/sbin/ldconfig -f /opt/etc/ld.so.conf -C /opt/etc/ld.so.cache
-/sbin/ldconfig
-
-# for /etc/.info/system.info
-/bin/sysinfo
-
-#Check machine is SLP7_C210
-MACHINE=`grep Hardware /proc/cpuinfo|cut -d ":" -f 2|tr -d " "`
-if [ $MACHINE == "SLP7_C210" ];then
-       ln -s /opt/etc/X11/xorg.conf.d.slp7 /opt/etc/X11/xorg.conf.d
-else
-       #Check machine is SLP10_C210
-       if [ $MACHINE == "SLP10_C210" ];then
-               ln -s /opt/etc/X11/xorg.conf.d.slp10 /opt/etc/X11/xorg.conf.d
-       else
-               ln -s /opt/etc/X11/xorg.conf.d.default /opt/etc/X11/xorg.conf.d
-       fi
-fi
-
-
-if [ -e /opt/system/csc/.factoryreset ]; then
-       rm -f /opt/system/csc/.factoryreset
-fi
-sync
diff --git a/etc/rc.d/rc.shutdown b/etc/rc.d/rc.shutdown
deleted file mode 100755 (executable)
index 274baa1..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-export DISPLAY=:0
-killall power_manager
-killall -9 udevd
-#killall -9 system_server
-killall -9 xinit
-
-rm -rf /tmp/vip/*                                                               
-rm -rf /tmp/permanent/* 
-
-echo "Run Shutdown animation..."
-nice -n -15 /usr/bin/boot-animation --offmsg " " --clear &
-sleep 1
-
-echo "Stopping indicator..."
-killall -9 indicator
-
-# factory resetting...
-# flag set by factory-reset.sh
-if [ -f /opt/.factoryreset ]; then
-       /usr/bin/run-factory-reset.sh
-fi
-
-
diff --git a/etc/rc.d/rc.sysinit b/etc/rc.d/rc.sysinit
deleted file mode 100755 (executable)
index ee2c286..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-#!/bin/sh
-
-# Color set for ANSI TERM
-_R='\033[0;31;1m'      #Red
-_G='\033[0;32;1m'      #Green
-_Y='\033[0;33;1m'      #Yellow
-C_='\033[0m'           #Color off
-
-
-echo -e "[${_G}rc.sysinit : script starts${C_}]"
-echo -e "[${_G}mount...${C_}]"
-mount -t proc none /proc
-mount -t tmpfs tmpfs /tmp
-mount -t sysfs none /sys
-mount -t tmpfs runfs /run
-mkdir -p /dev/pts
-mkdir -p /dev/shm
-mount -t tmpfs none /dev/shm
-mount -t devpts devpts /dev/pts
-mount -t debugfs none /sys/kernel/debug
-
-mknod /dev/null c 1 3
-mknod /dev/mmcblk0 b 179 0
-mknod /dev/mmcblk0p6 b 179 6
-
-# mount opt partition
-mount -t ext4 /dev/mmcblk0p6 /opt
-
-echo -e "[${_G}udev start${C_}]"
-/sbin/udevd --daemon
-/sbin/udevadm trigger
-
-if [ ! -e /opt/etc/.firstboot ]; then
-       umount /opt
-# find rootfs partition for resizing and remounting
-       for param in `cat /proc/cmdline`; do
-               if [ "${param:0:5}" = "root=" ]; then
-                       rootfs_part=${param#root=}
-                       break
-               fi
-       done
-       ext4_parts=`grep ext4 /etc/fstab | grep mmcblk0 | awk '{print $1};'`
-       for part in $ext4_parts; do
-# check all RW partitions in order to resize it withtout mounting excepting rootfs.
-               if [ "$part" != "$rootfs_part" ]; then
-                       e2fsck -y -f $part
-               fi
-               echo "resize $part"
-               resize2fs $part
-       done
-
-       mount -t ext4 /dev/mmcblk0p6 /opt
-       echo -e "[${_Y}rc.firstboot${C_}]"
-       /etc/rc.d/rc.firstboot
-       touch /opt/etc/.firstboot
-       sync
-fi
-
-mount /var
-
-# check special booting mode.
-/bin/check-booting-mode.sh
-if [ $? -eq 0 ]; then
-       echo -e "${_R}[ Special Booting mode ]${C_}"
-       for i in /etc/rc.d/rc2.d/*; do
-               echo -e "${_G}[${i} start]${C_}"
-               $i start
-       done
-       exit 0
-fi
-
-# mount all partitions
-mount -a
-mount --bind /run/ /var/run/
-
-echo -e "[${_G}create base directory in /opt, /var${C_}]"
-# construct directory hierarchy
-mkdir -p /opt/var/log/apt
-mkdir -p /opt/var/lib
-mkdir -p /opt/var/cache
-
-
-echo -e "[${_G}set device node perm & security${C_}]"
-# Set device node permissions for security
-chown 0:6501 /dev/video1
-chown 0:6501 /dev/s3c-jpg
-#chmod 666 /dev/pvrsrvkm
-chown 0:6509 /dev/log_main
-chown 0:6509 /dev/log_events
-chown 0:6509 /dev/log_radio
-chown :audio /dev/snd/
-chmod 775 /dev/snd/
-chown :audio /dev/snd/controlC0
-chown :audio /dev/snd/pcmC0D0p
-chown :audio /dev/snd/pcmC0D1p
-chown :audio /dev/snd/pcmC0D2p
-chown :audio /dev/snd/pcmC0D3p
-chown :audio /dev/snd/timer
-chown 0:6508 /dev/snd/pcmC0D0c
-chown 0:6508 /dev/snd/pcmC0D1c
-chown 0:6508 /dev/snd/pcmC0D2c
-chown 0:6508 /dev/snd/pcmC0D3c
-chown 0:6510 /dev/s3c-mfc
-chown 0:6510 /dev/video5
-chown 0:6510 /dev/video6
-chmod 666 /dev/random
-chmod 666 /dev/urandom
-chown :video /dev/fb0
-chown :video /dev/video0
-chown :video /dev/video2
-chown :video /dev/video3
-chown :video /dev/s3c-mem
-chown :6512 /dev/radio0
-chown :6702 /sys/class/backlight/*/brightness
-# change node's owner for torch light
-chown :6703 /sys/class/leds/leds-torch/brightness
-chmod 664 /sys/class/backlight/*/brightness
-# change files permission for 3D application
-chmod 666 /dev/ump
-chmod 666 /dev/mali
-chmod 666 /dev/slp_global_lock
-
-# Set gst-openmax configure file
-export OMX_CONFIG=/opt/etc/gst-openmax.conf
-
-echo -e "[${_G}make gstreamer registery${C_}]"
-# Make gst registry
-export GST_REGISTRY=/opt/etc/.gstreamer-0.10/registry.bin.arm
-gst-inspect 1> /dev/null
-chmod 655 /opt/etc/.gstreamer-0.10
-chmod 644 /opt/etc/.gstreamer-0.10/registry.bin.arm
-
-# Modem power on
-echo -e "[${_Y}modem power on${C_}]"
-ln -s /boot/modem.bin /modem/modem.bin
-/usr/bin/xmm6262-boot &
-
-#touch sensor start
-echo 1 > /sys/class/i2c-adapter/i2c-2/2-004a/touchstart
-
-echo -e "[${_G}run profile${C_}]"
-# Run profile
-. /etc/profile
-
-if [ -e /opt/etc/.debugmode ]; then
-       echo "debug mode enabled"
-       # for bluescreen
-       export LD_PRELOAD=/usr/lib/libsys-assert.so
-       # enable coredump
-       echo "/opt/bs/core/core.%p" > /proc/sys/kernel/core_pattern
-       ulimit -c unlimited
-else
-       echo "debug mode disabled"
-fi
-
-/usr/bin/press 1 # wait input to stop running scripts
-if [ $? -eq 0 ]; then
-       echo "script is stopped"
-       # prepare usbnet before exit
-       insmod /usr/driver/g_ether.ko
-       sleep 1
-       ifconfig usb0 192.168.129.3 netmask 255.255.255.0
-       # Run all rc0 scripts
-       for i in /etc/rc.d/rc0.d/*; do
-               echo -e "[${_G}${i} start${C_}]"
-               $i start
-       done
-else
-       # Run all rc3 scripts
-       echo -e "[${_G}run all rc3 scripts${C_}]"
-       echo "normal boot"
-       for i in /etc/rc.d/rc3.d/*; do
-               echo -e "[${_G}${i} start${C_}]"
-               $i start
-       done
-fi
-
-# change owner and group about /opt/media directory
-chown 5000:5000 /opt/media
-
-echo -e "[${_G}set cpufreq governor${C_}]"
-# Set default cpufreq governor
-echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
-
-# symbolic link
-if [ ! -e /opt/apps ]; then
-       echo -e "[${_G}link /opt/apps -> /opt/media/apps${C_}]"
-       ln -s /opt/media/apps /opt/apps
-fi
-
-# inhouse home-directory
-chown 5000:5000 /home/inhouse
-
diff --git a/mount-generator.pl b/mount-generator.pl
deleted file mode 100755 (executable)
index 4e118a9..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Generate systemd mount units based on information from fstab file.
-#
-# Copyright (C) 2012 Samsung Electronics
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 as published by the Free Software Foundation.
-#
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
-# Author: Ćukasz Stelmach <l.stelmach@samsung.com>
-#
-use strict;
-use Cwd 'abs_path';
-
-my $out_dir = pop @ARGV;
-my ($fs_dev, $fs_dir, $fs_type, $fs_opts, $fs_dump, $fs_pass);
-
-sub name_from_path($) {
-       my $dev=shift;
-       $dev =~ s:/+:-:g;
-
-       if ($dev=~m/^-$/) {
-               return $dev;
-       }
-
-       $dev =~ s/^-|-$//g;
-       return $dev;
-}
-
-while(<>) {
-       chomp;
-       ($fs_dev, $fs_dir, $fs_type, $fs_opts, $fs_dump, $fs_pass)=split;
-       next unless ($fs_dev=~m/mmcblk/);
-       next unless ($fs_type=~m/ext[234]/);
-
-       my $fs_tab=abs_path $ARGV;
-       my $unit_name=$out_dir ."/". name_from_path($fs_dir) . ".mount";
-       my $devname=name_from_path $fs_dev;
-       my ($after,$req,$wants);
-       if ($fs_dir eq "/") {
-           $after = "fsck-root.service resize2fs-root.service";
-           $req = "fsck-root.service";
-           $wants = "resize2fs-root.service";
-       } else {
-           $after = "fsck\@$devname.service resize2fs\@$devname.service";
-           $req = "fsck\@$devname.service";
-           $wants = "resize2fs\@$devname.service";
-       }
-
-       my $unit=<<EOF;
-# Automaticall generated by mount-generator.pl
-
-[Unit]
-# FIXME: Is this required?
-#SourcePath=$fs_tab
-DefaultDependencies=no
-Before=local-fs.target
-Requires=$req
-After=local-fs-pre.target $after
-Wants=$wants
-
-[Mount]
-What=$fs_dev
-Where=$fs_dir
-Type=$fs_type
-Options=$fs_opts
-EOF
-       open (UNIT, ">", $unit_name) || die $!;
-       print UNIT $unit,"\n";
-       close UNIT;
-}
index f9f03dd..2e57999 100755 (executable)
@@ -7,10 +7,8 @@ Release: 62
 ExclusiveArch: %arm
 Source: %{name}-%{version}.tar.gz
 BuildRequires: cmake
-BuildRequires: perl
 BuildRequires: pkgconfig(libudev)
 Requires: udev
-Requires: sysvinit
 
 %description
 Startup files
@@ -21,42 +19,19 @@ Startup files
 %build
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSCONFDIR=%{_sysconfdir}
 make %{?_smp_mflags}
-./mount-generator.pl etc/fstab usr/lib/systemd/system 
 
 %install
 %make_install
 
 cp -a etc usr bin %{buildroot}
 
-mkdir -p %{buildroot}/usr/lib/systemd/system/local-fs.target.wants
-for mount in usr/lib/systemd/system/*.mount; do
-    if grep -q '^Options[[:space:]]*=.*noauto' $mount; then continue; fi
-    m=$(basename $mount)
-    ln -s ../$m %{buildroot}/usr/lib/systemd/system/local-fs.target.wants/$m
-done
-mkdir -p %{buildroot}/%{_libdir}/systemd/system/local-fs.target.wants
-ln -s ../resize2fs-root.service %{buildroot}/%{_libdir}/systemd/system/local-fs.target.wants
-
-mkdir -p %{buildroot}/lib/modules
-
 mkdir -p %{buildroot}/usr/share/license
 cp -f LICENSE %{buildroot}/usr/share/license/%{name}
 
 %files
 /bin/with-dev-root-do
-/etc/fstab
 /etc/fta_version.txt
-/etc/inittab
 /etc/mtools.conf
-/etc/rc.d/rc.firstboot
-/etc/rc.d/rc.shutdown
-/etc/rc.d/rc.sysinit
 /usr/bin/save_blenv
 /bin/check-booting-mode.sh
-/usr/lib/systemd/system/resize2fs-root.service
-/usr/lib/systemd/system/resize2fs@.service
-/usr/lib/systemd/system/*.mount
-/usr/lib/systemd/system/local-fs.target.wants/*.mount
-/usr/lib/systemd/system/local-fs.target.wants/resize2fs-root.service
-/lib/modules
 /usr/share/license/%{name}
diff --git a/usr/lib/systemd/system/resize2fs-root.service b/usr/lib/systemd/system/resize2fs-root.service
deleted file mode 100755 (executable)
index aeb9435..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=Resize of File System on the Root Device
-DefaultDependencies=no
-Requires=fsck-root.service
-After=fsck-root.service
-Before=remount-rootfs.service local-fs.target shutdown.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=no
-ExecStartPre=/bin/mount -o remount,rw /
-ExecStart=/bin/with-dev-root-do /sbin/resize2fs
-ExecStartPost=/bin/ln -s /dev/null /etc/systemd/system/resize2fs-root.service
-ExecStartPost=/bin/mount -o remount /
-StandardOutput=journal+console
-TimeoutSec=0
diff --git a/usr/lib/systemd/system/resize2fs@.service b/usr/lib/systemd/system/resize2fs@.service
deleted file mode 100755 (executable)
index c203742..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Resize of File System on %f
-DefaultDependencies=no
-BindTo=%i.device
-After=fsck@%i.service
-Requires=fsck@%i.service
-Before=local-fs.target shutdown.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=no
-ExecStart=/sbin/resize2fs %f
-StandardOutput=journal+console
-TimeoutSec=0